--- /dev/null
+Philip Withnall <philip@tecnocode.co.uk>
--- /dev/null
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+\f
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+\f
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+\f
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+\f
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+\f
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+\f
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+\f
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+\f
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+\f
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
--- /dev/null
+Formatting
+==========
+
+All code should follow the same formatting standards which are broadly based on the GNU style (http://www.gnu.org/prep/standards.html) with some
+additions. Briefly:
+
+ - Tab indents are used and braces for blocks go on the same line as the block statement:
+
+ if (x < foo (y, z)) {
+ haha = bar[4] + 5;
+ } else {
+ while (z) {
+ haha += foo (z, z);
+ z--;
+ }
+ return abc (haha);
+ }
+
+ Braces should be omitted for single-line blocks, but included for all blocks in a multi-part if statement which has blocks containing more than
+ one line (as above).
+
+ - Spaces should be present between function name and argument block, and after commas:
+
+ foo (z, z)
+
+ - In pointer types, the '*' is grouped with the variable name, not with the base type.
+
+ int *a;
+
+ Not:
+
+ int* a;
+
+ In cases where there is no variable name, for instance, return values, there should be a single space between the base type and the '*'.
+
+ Type casts should have no space between the type and '*', but a space before the variable being cast:
+
+ (gchar*) foobar;
+ (gchar**) &foobar;
+
+ - Function and variable names are lower_case_with_underscores, type names are CamelCase and macro names are UPPER_CASE_WITH_UNDERSCORES.
+
+ - Comparisons to NULL, TRUE and FALSE should always be made explicit, for clarity.
+
+ - Code should be wrapped at the 150th column, such that it doesn't require horizontal scrolling on a decent-sized display.
+ Don't wrap at the 80th column.
+
+Documentation comments
+======================
+
+All public API functions should have inline documentation headers in the gtk-doc style. For more information about gtk-doc comments, see the gtk-doc
+manual (http://library.gnome.org/devel/gtk-doc-manual/stable/). There are a few conventions above and beyond the standard gtk-doc formatting which
+libgdata employs:
+
+ - For API which returns allocated memory, the relevant free/unref function must be mentioned in the "Return value" part of the documentation:
+
+ * Return value: a new #GDataEntry; unref with g_object_unref()
+
+ If the function can also return NULL (on error, for example) or some other "default" value (-1, 0, etc.), format it as follows:
+
+ * Return value: a new #GDataGDFeedLink, or %NULL; free with gdata_gd_feed_link_free()
+
+ Note that if a function returns NULL as a result of a precondition or assertion failure, this should not be listed in the documentation. The
+ precondition itself may be listed in the function documentation prose, but if it's the only reason for a function to return NULL, the "or %NULL"
+ clause should be omitted.
+
+ - When adding API, make sure to add a "Since" clause:
+
+ * Since: 0.2.0
+
+ - For object methods, the "self" parameter should be documented simply as "a #GObjectType":
+
+ * @self: a #GDataQuery
+
+ - For function parameters which can legitimately be set to NULL (or some other default value), list that as follows:
+
+ * @updated_max: the new maximum update time, or %NULL
+
+ - If numbers, such as -1, are mentioned in documentation as values to be passed around in code, they should be wrapped in a DocBook "code" tag
+ (e.g. "<code class="literal">-1</code>"), so that they appear similarly to NULL in the documentation.
+
+ - The documentation explaining the purpose of a property, its limitations, interpretation, etc., should be given in the gtk-doc comment for the
+ GObject property itself, not in the documentation for its getter or setter. The documentation for the getter and setter should be stubs which
+ refer to the property's documentation. The getter and setter documentation should, however, still include full details about whether NULL values
+ are permissible for the function parameters, or are possible as the return value, for example.
+
+Adding public API
+=================
+
+ - Ensure it has proper guards against bad parameters:
+
+ g_return_if_fail (GDATA_IS_QUERY (self));
+ g_return_if_fail (foobar != NULL);
+
+ - All public API must have a gtk-doc comment, and be added to the docs/reference/gdata-sections.txt file, to include it in the documentation.
+ The documentation comment must have a "Since" clause (see "Documentation comments" section).
+
+ - All public API must be listed in gdata/gdata-*.symbols.
+
+ - Non-trivial API should have a test case added in the relevant test suite file in gdata/tests. Note that the "general" test suite file cannot make
+ network requests in the course of running its test cases.
+
+ - All GObject properties must have getter/setter functions.
+
+ - All API which returns allocated memory must be tagged with G_GNUC_WARN_UNUSED_RESULT after its declaration, to safeguard against consumers of the
+ API forgetting to use (and consequently free) the memory. This is unlikely, but adding the macro costs little and acts as a reminder in the API
+ documentation to free the result.
+
+ - All GObject *_get_type function declarations must be tagged with the G_GNUC_CONST macro, as well as any other applicable functions
+ (see the gcc documentation: http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#index-g_t_0040code_007bconst_007d-function-attribute-2207).
+
+ - All properties which could be considered to use an enumerated value should almost definitely use a string instead. See the documentation section
+ on "Enumerable Properties" in the "GData Overview" section. Where appropriate, the values for these string properties should be made available
+ as #defines.
+
+ - New services should be implemented in libgdata itself, not by applications which use libgdata. See the documentation section on "New Services" in
+ the "GData Overview" section.
+
+ - New API must never be added in a stable micro release. API additions can only be made in a major or minor release; this is to prevent the LT version
+ of one minor version's micro releases exceeding the LT version of the next minor version as almost happened between versions 0.6.3 and 0.7.0.
+ See http://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html for information about libtool's versioning system. See also the
+ “Versioning” section below.
+
+ - Any async function which uses non-async-scope callbacks as well as the async ready callback should provide GDestroyNotify callbacks for destroying
+ the user data for those callbacks. See https://bugzilla.gnome.org/show_bug.cgi?id=649728 for details.
+
+ - Any new class’ class structure (e.g. GDataServiceClass) must have reserved slots to allow future API additions of virtual functions without
+ breaking ABI.
+
+Choosing function names
+=======================
+
+In general, use common sense. However, there are some specific cases where a standard is enforced:
+
+ - For boolean getters (e.g. for FooBar:is-baz) use foo_bar_is_baz, rather than foo_bar_get_is_baz. Note that the property name should be "is-baz",
+ rather than just "baz".
+
+ - For boolean setters use foo_bar_set_is_baz, rather than foo_bar_set_baz.
+
+ - In general, try to keep API named similarly to the actual GData API constructs. In certain cases, however, it might make more sense to rename pieces
+ of API to be less cryptic (e.g. "timezone" instead of "ctz").
+
+Deprecating public API
+======================
+
+As libgdata moves towards API stability, old API should be deprecated rather than broken or removed entirely. The following should be ensured when
+deprecating API:
+
+ - G_GNUC_DEPRECATED_FOR is added to the API in the public header file.
+
+ - A “Deprecated:” line is added to the gtk-doc comment for the API. This should mention what API replaces it, give a brief explanation of why the
+ API has been deprecated, and finish with “(Since: [version].)” to list the version the API was deprecated.
+
+ - “#ifndef LIBGDATA_DISABLE_DEPRECATED” should be wrapped around the API in the public header file.
+
+ - All references to the API/uses of the API in libgdata code (including demos and the test suite) should be ported to use the replacement API instead.
+ If this isn't possible, the deprecated function should be split into a static function which contains all the code, and the public symbol should
+ become a simple wrapper of this static function. This allows the static function to be used inside libgdata without causing deprecation warnings.
+
+ - Don't remove deprecated symbols from gdata-*.symbols.
+
+ - Don't forget to also deprecate related symbols, such as the getter/setter for a property (or vice-versa).
+
+Commit messages
+===============
+
+libgdata does not use a ChangeLog; it is auto-generated from the git log when packaging a release. Commit messages should follow the GNOME commit
+message guidelines (https://wiki.gnome.org/Git/CommitMessages), with the exception that when a commit closes a bug, the short explanation of the commit
+should simply be the bug's title, as copied from Bugzilla (e.g. "Bug 579885 – Add code examples to documentation"). The long explanation should then
+be used to give details of the changes. If the bug's title is not relevant, it should be changed before committing the changes.
+
+Unless the short explanation of a commit is a bug title, it should always be prefixed by a tag to describe the part of the library it touches, using
+the following format "tag: Short explanation". The following tags are valid:
+
+ - core: for the core code in the gdata directory, such as GDataEntry.
+
+ - atom: for the Atom-namespaced code in the gdata/atom directory.
+
+ - gcontact: for the gContact-namespaced code in the gdata/gcontact directory.
+
+ - gd: for the GData-namespaced code in the gdata/gd directory.
+
+ - media: for the Media RSS-namespaced code in the gdata/media directory.
+
+ - build: for build changes and releases.
+
+ - docs: for documentation changes which are not specific to a service, such as updates to the docs directory, NEWS, README, this file, etc.
+
+ - tests: for changes to the test code in gdata/tests which are not specific to a service or namespace.
+
+ - demos: for changes to the demo applications in the demos directory.
+
+ - introspection: for introspection annotations and build changes.
+
+ - calendar: for the Google Calendar code in gdata/services/calendar.
+
+ - contacts: for the Google Contacts code in gdata/services/contacts.
+
+ - documents: for the Google Documents code in gdata/services/documents.
+
+ - picasaweb: for the PicasaWeb code in gdata/services/picasaweb.
+
+ - youtube: for the YouTube code in gdata/services/youtube.
+
+The only commits which should not have a tag are translation commits, touching only the po directory.
+
+Versioning
+==========
+
+Starting with version 0.9.0, libgdata has adopted an even–odd/stable–unstable versioning policy, where odd minor version numbers are unstable releases,
+released periodically (with increasing micro version numbers) and leading to a stable release with the next even minor version number. API breaks of
+new API are allowed in micro releases with an odd minor version number, but not in micro releases with an even minor version number.
+
+ABI and API backwards compatibility must be preserved unless the major version number is changed. libgdata is now ABI-stable.
+
+It is encouraged to make a new micro release of an odd minor series after each large API addition or break.
--- /dev/null
+Overview of changes from libgdata 0.17.12 to libgdata 0.17.13
+=============================================================
+
+* Default to not installing installed-tests (see !24)
+
+* Default to not building documentation (see !23) (thanks Debarshi Ray)
+
+* Bugs fixed:
+ - !23 build: Disable the gtk-doc documentation by default
+ - !24 Various minor fixes to meson_options.txt
+ - !25 all: Fix various typos and incorrect terminology
+ - !26 core: Add g_autoptr() support for GDataUploadStream
+
+* Translation updates:
+ - Chinese (China)
+ - English (United Kingdom)
+ - Latvian
+ - Ukrainian
+
+
+Overview of changes from libgdata 0.17.11 to libgdata 0.17.12
+=============================================================
+
+* Make OAuth 1 support optional and disabled by default; this makes the `oauth`
+ dependency optional on `-Doauth1=enabled` (#1)
+
+* Bugs fixed:
+ - #1 Consider loosening the liboauth dependency
+ - #23 Authentication errors with Google Drive
+ - #36 Clarify license in meson.build
+
+* Translation updates:
+ - Basque
+ - Catalan
+ - Chinese (Taiwan)
+ - Croatian
+ - Czech
+ - Danish
+ - Dutch
+ - Finnish
+ - French
+ - Friulian
+ - Galician
+ - German
+ - Hungarian
+ - Indonesian
+ - Italian
+ - Japanese
+ - Korean
+ - Latvian
+ - Lithuanian
+ - Malay
+ - Polish
+ - Portuguese (Brazil)
+ - Romanian
+ - Serbian
+ - Slovenian
+ - Spanish
+ - Swedish
+ - Turkish
+
+
+Overview of changes from libgdata 0.17.10 to libgdata 0.17.11
+=============================================================
+
+* Various fixes to the Meson port, including a soversion fix (#30, #32, #35, !9, !10)
+
+* Add support for user-specified properties of documents in Drive (!7)
+
+* Bugs fixed:
+ - #30 meson: debug messages of libgdata don't come from correct log domain - "libgdata"
+ - #31 gdata_entry_get_id should not free current value if not changed
+ - #32 Build failure on Continuous
+ - #33 en_GBism in a string
+ - #35 Installed tests fails with an assert in gdata_oauth2_authorizer_request_authorization
+ - !7 Drive v2 Properties API
+ - !9 Meson fixes
+ - !10 meson minor fixes
+ - !13 docs: Drop use of `<!-- -->` to delimit plurals
+ - !16 Minor revision of italian translation (after >2ys)
+
+* Translation updates:
+ - Basque
+ - Czech
+ - English (United Kingdom)
+ - German
+ - Indonesian
+ - Italian
+ - Lithuanian
+ - Polish
+ - Portuguese (Brazil)
+ - Romanian
+ - Spanish
+ - Swedish
+
+
+Overview of changes from libgdata 0.17.9 to libgdata 0.17.10
+============================================================
+
+* Port to Meson and drop autotools support (#27)
+
+* Migrate from intltool to gettext (bug #787252)
+
+* Bugs fixed:
+ - #26 Support deleting shared Google Drive files
+ - #27 Port to Meson
+ - !1 Remove use of foreach with wrong function prototype and use g_list_free_full
+ - !3 core: Move the header guards before including other headers
+ - !4 tasks: Turn 'position' and 'parent' into writable properties
+ - Bug 787252 — [Patch] Migrate from intltool to gettext
+
+* Translation updates:
+ - Catalan
+ - Chinese (Taiwan)
+ - Croatian
+ - Danish
+ - Dutch
+ - English (United Kingdom)
+ - Esperanto
+ - French
+ - Indonesian
+ - Nepali
+ - Romanian
+ - Turkish
+
+
+Overview of changes from libgdata 0.17.8 to libgdata 0.17.9
+===========================================================
+
+Major changes:
+ • Support reporting quotas for Drive usage (thanks to Michael Terry)
+ • Bump GLib dependency to 2.44 for g_autoptr() support
+ • Add g_autoptr() support for some core classes
+ • Port from GSimpleAsyncResult to GTask
+ • More porting to the Google Drive v2 API
+ (ongoing thanks to Debarshi Ray for working on and maintaining this)
+
+API changes:
+ • Add GDataDocumentsMetadata
+ • Add gdata_documents_service_get_metadata(),
+ gdata_documents_service_get_metadata_async(),
+ gdata_documents_service_get_metadata_finish()
+ • Initial g_autoptr() support for core classes
+
+Bugs fixed:
+ • Bug 783046 — Invalid URIs are generated when q and q_internal properties are set
+ • GitHub PR #1 — added initial .travis.yml
+ • Bug 785885 — Expose information about quota usage
+ • Bug 684920 — Port to Google Drive API v2
+
+
+Overview of changes from libgdata 0.17.7 to libgdata 0.17.8
+===========================================================
+
+Major changes:
+ • Bump GLib dependency to 2.38.0 for G_TEST_DIST
+ • Bump libsoup dependency for tests to 2.55.90; the dependency if building
+ libgdata without tests is still 2.42.0
+ • Fix use of deprecated GTK+ API in the demos
+
+Bugs fixed:
+ • Bug 779641 — test_query_properties broken on i686
+ • Bug 780067 — Unable to sync Google Contacts
+ • Bug 780081 — libgdata 0.17.7 fails streams tests (unable to set up SSL cert)
+
+Updated translations:
+ • be (Yuras Shumovich)
+ • da (Alan Mortensen)
+ • el (Tom Tryfonidis)
+ • fi (Jiri Grönroos)
+ • gl (Fran Dieguez)
+ • oc (Cédric Valmary)
+ • ru (Yuri Myasoedov)
+
+
+Overview of changes from libgdata 0.17.6 to libgdata 0.17.7
+===========================================================
+
+Major changes:
+ • Fix licensing in OAuth2 files (they were mistakenly declared as GPLv3+; they’re actually LGPLv2.1+)
+ • More Google Drive fixes and tests
+ • Documentation improvements (including bumping the gtk-doc dependency to 1.25)
+ • Google Calendar parsing fixes
+ • Pagination fixes for more modern APIs (Calendar, Documents, Tasks, YouTube)
+ • Pagination support in demo programs
+ • Add a demo program for Google Tasks
+ • Fix Google Calendar query parameters for v3 of the API
+ • Disable PicasaWeb tests as PicasaWeb server is now mostly read-only
+ • Deprecate Freebase service as Freebase server is now shutdown
+
+API changes:
+ • Add GDataDocumentsEntry:file-size
+ • Add gdata_parsable_get_content_type()
+ • Add GDataFeed:next-page-token
+ • Deprecate GDataCalendarQuery:recurrence-expansion-start
+ • Deprecate GDataCalendarQuery:recurrence-expansion-end
+ • Deprecate GDataCalendarQuery:sort-order
+ • Deprecate everything to do with GDataFreebase*
+
+Bugs fixed:
+ • Bug 684920 — Port to Google Drive API v2
+ • Bug 772756 — Take advantage of Unicode
+ • Bug 773057 — Provide document file size
+ • Bug 774179 — Fails to build VAPI file with GOA enabled
+ • Bug 777980 — Add a public wrapper for GDataParsable:get_content_type
+ • Bug 775813 — GTasks pagination doesn't work
+
+Updated translations:
+ • cs (Marek Černocký)
+ • da (Ask Hjorth Larsen)
+ • de (Mario Blättermann)
+ • es (Daniel Mustieles)
+ • eu (Inaki Larranaga Murgoitio)
+ • fi (Jiri Grönroos)
+ • fr (Claude Paroz)
+ • fur (Fabio Tomat)
+ • hu (Gábor Kelemen)
+ • id (Kukuh Syafaat)
+ • it (Gianvito Cavasoli)
+ • ko (Changwoo Ryu)
+ • lt (Aurimas Černius)
+ • lv (Rūdolfs Mazurs)
+ • nb (Kjartan Maraas)
+ • pl (Piotr Drąg)
+ • pt (Tiago Santos)
+ • pt_BR (Rafael Fontenelle)
+ • sk (Dušan Kazik)
+ • sl (Matej Urbančič)
+ • sr (Марко М. Костић)
+ • sv (Anders Jonsson)
+ • zh_CN (Qizhi Zhou)
+ • zh_TW (Chao-Hsiung Liao)
+
+
+Overview of changes from libgdata 0.17.5 to libgdata 0.17.6
+===========================================================
+
+Major changes:
+ • Minor test case fixes
+ • Fix a download crash on zero-length files (thanks Ondrej Holy)
+
+Bugs fixed:
+ • Bug 768278 — release tarball 0.17.5 contains empty ChangeLog
+ • Bug 768363 — dev-libs/libgdata-0.17.5 fails tests (on the alpha architecture, possibly elsewhere)
+ • Bug 768282 — test-suite failure: ERROR: general - too few tests run (expected 98, got 2)
+ • Bug 769727 — Crashes on zero-length files
+
+Updated translations:
+ • en_GB (David King)
+ • he (Yosef Or Boczko)
+ • pl (Piotr Drąg)
+ • th (Akom Chotiphantawanon)
+
+
+Overview of changes from libgdata 0.17.4 to libgdata 0.17.5
+===========================================================
+
+Major changes:
+ • Google Drive documentation and test fixes
+ • Minor memory leak fixes
+ • Update autogen.sh to latest GNOME recommendations, fixing builddir ≠ srcdir
+
+Bugs fixed:
+ • Bug 684920 — Port to Google Drive API v2
+ • Bug 759180 — Can't open PDF file shared in Google Drive
+ • Bug 767784 — picasaweb: Clarify how to handle authentication failures during upload
+ • Bug 767785 — Mention that GDataGoaAuthorizer uses OAuth 2.0
+
+Updated translations:
+ • cs (Marek Černocký)
+ • da (Ask Hjorth Larsen)
+ • de (Mario Blättermann)
+ • el (Tom Tryfonidis)
+ • es (Daniel Mustieles)
+ • eu (Inaki Larranaga Murgoitio)
+ • fr (Alexandre Franke)
+ • fur (Fabio Tomat)
+ • gl (Fran Dieguez)
+ • id (Andika Triwidada)
+ • it (Milo Casagrande)
+ • ko (Changwoo Ryu)
+ • lt (Aurimas Černius)
+ • lv (Rūdolfs Mazurs)
+ • hu (Balázs Meskó)
+ • nb (Kjartan Maraas)
+ • oc (Cédric Valmary)
+ • pl (Piotr Drąg)
+ • pt (Sérgio Cardeira)
+ • pt_BR (Enrico Nicoletto, Rafael Fontenelle)
+ • ru (Stas Solovey)
+ • sk (Dušan Kazik)
+ • sl (Matej Urbančič)
+ • sr (Мирослав Николић)
+ • sv (Anders Jonsson)
+ • th (Akom Chotiphantawanon)
+ • vi (Trần Ngọc Quân)
+ • zh_CN (Jeff Bai)
+ • zh_TW (Chao-Hsiung Liao)
+
+Overview of changes from libgdata 0.17.3 to libgdata 0.17.4
+===========================================================
+
+Major changes:
+ • Download stream data corruption fixes and fixes to content length
+ calculation
+ • Fix symbol exporting on OS X
+ • Fix copying and deleting documents in Google Drive
+ • Fix folder creation in Google Drive
+ • Fix metadata-only uploads in Google Drive
+ • Fix searching by title in Google Drive
+
+API changes:
+ • Remove a couple of incorrect GIR annotations
+
+Bugs fixed:
+ • Bug 755976 — Seeking with GDataDownloadStream can be broken if a range was
+ set in the HTTP request
+ • Bug 754821 — Compilation issues on Mac OS X
+ • Bug 758119 — make check fails in git master (3.19.x)
+ • Bug 684920 — Port to Google Drive API v2
+ • Bug 758524 — Cannot search documents by title
+
+Updated translations:
+ • cs (Marek Černocký)
+ • da (Ask Hjorth Larsen)
+ • de (Wolfgang Stöggl)
+ • es (Daniel Mustieles)
+ • eu (Iñaki Larrañaga Murgoitio)
+ • hu (Balázs Meskó)
+ • lt (Aurimas Černius)
+ • lv (Rūdolfs Mazurs)
+ • pl (Piotr Drąg)
+ • pt (Pedro Albuquerque)
+ • pt_BR (Enrico Nicoletto)
+ • ru (Stas Solovey)
+ • sk (Dušan Kazik)
+ • sr (Марко Костић, Милош Поповић)
+ • tr (Muhammet Kara)
+
+Overview of changes from libgdata 0.17.2 to libgdata 0.17.3
+===========================================================
+
+Major changes:
+ • More Google Drive improvements
+ • A few memory leak fixes and improvements in the unit tests
+
+API changes:
+ • Soft API break for gdata_service_insert_entry() when creating Google Drive
+ folders — you must now use gdata_documents_service_add_entry_to_folder() due
+ to changes on the server API
+ (see https://bugzilla.gnome.org/show_bug.cgi?id=684920)
+ • Remove two unused symbols from the export list; these were never intended
+ to be public API: gdata_freebase_result_error_get_type,
+ gdata_freebase_result_error_quark
+
+Bugs fixed:
+ • Bug 684920 — Port to Google Drive API v2
+ • Bug 754821 — Compilation issues on Mac OS X
+
+Updated translations:
+ • cs (Marek Černocký)
+ • de (Paul Seyfert)
+ • el (Tom Tryfonidis)
+ • es (Daniel Mustieles)
+ • fr (Bruno Brouard)
+ • gl (Fran Dieguez)
+ • hu (Balázs Úr)
+ • id (Andika Triwidada)
+ • it (Claudio Arseni)
+ • ko (Changwoo Ryu)
+ • lt (Aurimas Černius)
+ • nb (Kjartan Maraas)
+ • pl (Piotr Drąg)
+ • pt (Pedro Albuquerque)
+ • sk (Dušan Kazik)
+ • sl (Matej Urbančič)
+ • sv (Anders Jonsson, Mattias Eriksson)
+ • th (Akom Chotiphantawanon)
+ • zh_TW (Chao-Hsiung Liao)
+
+Overview of changes from libgdata 0.17.1 to libgdata 0.17.2
+===========================================================
+
+Major changes:
+ • More Google Drive API porting
+ • Port from v2 to v3 of the Calendar API
+ • Update and re-enable a lot of unit tests
+ (streams, youtube, freebase, calendar).
+ • Add calendar-cli demo
+ • Port to use installed-tests; this adds --enable-always-build-tests and
+ --enable-installed-tests configure options
+ • Port to autoconf-archive macros and add an implicit build-time dependency
+ on autoconf-archive
+ • Allow applications to store and restore the refresh token for a
+ GDataOAuth2Authorizer to avoid re-authenticating on each startup
+ • Bump libuhttpmock dependency to 0.5.0
+
+API changes:
+ • Add gdata_calendar_service_insert_calendar_event(),
+ gdata_calendar_service_insert_calendar_event_async()
+ • Deprecate GDataCalendarCalendar:times-cleaned,
+ gdata_calendar_calendar_get_times_cleaned(), GDataCalendarCalendar:edited,
+ gdata_calendar_calendar_get_edited()
+ • Deprecate GDataCalendarFeed:timezone, gdata_calendar_feed_get_timezone(),
+ GDataCalendarFeed:times-cleaned, gdata_calendar_feed_get_times_cleaned()
+ • Add GDataAccessHandlerIface.get_rules as a virtual method backing
+ gdata_access_handler_get_rules()
+ • Add GDataCalendarAccessRule
+ • Add GDataDocumentsAccessRule
+ • Add gdata_oauth2_authorizer_dup_refresh_token(),
+ gdata_oauth2_authorizer_set_refresh_token()
+ • Add GDataBatchable.is_supported virtual function
+
+Bugs fixed:
+ • Bug 684920 — Port to Google Drive API v2
+ • Bug 664353 — Upgrade to Calendar API version 3
+ • Bug 750335 — Silence a bunch of warnings
+ • Bug 750480 — Fix -Werror build for clang
+ • Bug 750395 — Fix the GDataAccessRule example
+ • Bug 750746 — Cold start OAuth2 authorization
+ • Bug 751782 — Enable Drive authorization domains if a GOA account has "files" enabled
+ • Bug 750914 — Build fails because -Werror=unused-function
+
+Updated translations:
+ • oc (Cédric Valmary (Tot en òc))
+ • pl (Piotr Drąg)
+ • pt (Pedro Albuquerque)
+ • th (Akom Chotiphantawanon)
+
+Overview of changes from libgdata 0.17.0 to libgdata 0.17.1
+===========================================================
+
+Major changes:
+ • Correctly increment LT version; this release should always be used instead
+ of 0.17.0
+
+Overview of changes from libgdata 0.16.0 to libgdata 0.17.0
+===========================================================
+
+Major changes:
+ • Port from v2 to v3 of the YouTube API — your client’s developer key may stop
+ working due to never being conigured for v3; refresh it here:
+ https://developers.google.com/youtube/registering_an_application
+ • Port from the Google Docs API to the Google Drive API (v2) — the same
+ libgdata APIs should continue to work unchanged
+ • Both the YouTube and Drive API ports are not thoroughly tested, and a number
+ of unit tests have been disabled temporarily; code quality will be ramped up
+ again in subsequent releases
+ • Add support for OAuth 2.0 authorisation
+ • Commit to API and ABI stability
+ • Add --disable-tests configure flag to skip building tests
+ • Various improvements to the unit tests
+ • Fix pagination handling in Google Docs
+ • Add demo applications for Google Docs and YouTube
+ • Various Freebase fixes, including a huge number of new tests and
+ authentication fixes
+ • Various JSON parser fixes
+ • Note that the Calendar v2 API has now been withdrawn; there has not been
+ enough time to port libgdata to version 3 (ongoing:
+ https://bugzilla.gnome.org/show_bug.cgi?id=664353), but clients can (and
+ should, regardless) use the CalDAV API provided by Google Calendar
+
+API changes:
+ • Add GDATA_OAUTH2_REDIRECT_URI_OOB
+ • Add GDATA_OAUTH2_REDIRECT_URI_OOB_AUTO
+ • Add GDataOAuth2Authorizer
+ • Add API padding and commit to API stability
+ • Add GDataServiceClass.parse_feed
+ • Add gdata_freebase_search_result_item_get_type(),
+ GDATA_TYPE_FREEBASE_SEARCH_RESULT_ITEM
+ • Add GDATA_CATEGORY_SCHEMA_LABELS_SHARED
+ • Add GDATA_CATEGORY_SCHEMA_LABELS_VIEWED
+ • Add GDataYouTubeFeed
+ • Deprecate GDataYouTubeQuery:format, gdata_youtube_query_get_format(),
+ gdata_youtube_query_set_format()
+ • Deprecate GDataYouTubeQuery:has-location
+ • Deprecate GDataYouTubeQuery:language, gdata_youtube_query_get_language(),
+ gdata_youtube_query_set_language()
+ • Deprecate GDataYouTubeQuery:sort-order, gdata_youtube_query_get_sort_order(),
+ gdata_youtube_query_set_sort_order()
+ • Deprecate GDataYouTubeQuery:uploader, gdata_youtube_query_get_uploader(),
+ gdata_youtube_query_set_uploader()
+ • Deprecate GDataYouTubeSortOrder
+ • Deprecate GDataYouTubeUploader
+ • Deprecate GDataYouTubeContent
+ • Deprecate GDataYouTubeFormat
+ • Deprecate GDataYouTubeVideo:video-id, gdata_youtube_video_get_video_id()
+ • Deprecate gdata_youtube_video_look_up_content()
+ (use gdata_youtube_video_get_player_uri() instead)
+ • Deprecate GDATA_YOUTUBE_RATING_TYPE_SIMPLE
+ • Deprecate GDataYouTubeCredit, GDATA_YOUTUBE_CREDIT_ENTITY_PARTNER
+ • Deprecate GDataYouTubeVideo:credit, gdata_youtube_video_get_credit()
+ • Deprecate GDataYouTubeVideo:is-draft, gdata_youtube_video_is_draft(),
+ gdata_youtube_video_set_is_draft()
+ • Deprecate GDATA_YOUTUBE_*_FEED except GDATA_YOUTUBE_MOST_POPULAR_FEED (all
+ others have been deprecated online and will transparently return the
+ most popular videos from the past 24 hours)
+ • GDataYouTubeQuery:restriction no longer accepts IP addresses
+ • All GDataCommentable functionality on GDataYouTubeVideo is disabled
+ at runtime until the v3 YouTube API for comments is finished online
+ • Not all properties of a GDataYouTubeVideo may be retrieved when doing
+ searches, retrieving related videos, or listing standard feeds — to
+ guarantee getting all properties, use gdata_service_query_single_entry() for
+ the video in question; common properties such as title, description, player
+ URI and thumbnails will always be retrieved
+ • Deprecate GDataDocumentsEntry:edited
+
+Bugs fixed:
+ • Bug 646285 — Add OAuth 2 support
+ • Bug 657539 — Add support for Google Tasks
+ • Bug 739395 — Add an option to build without uhttpmock
+ • Bug 737799 — Error while updating google address book
+ • Bug 739956 — libgdata-0.16.1: tests fail
+ • Bug 741345 — Paging does not work
+ • Bug 737539 — Freebase: topic results are shallower than expected
+ • Bug 737936 — Freebase: Add GType for GDataFreebaseSearchResultItem
+ • Bug 737540 — Freebase: async topic queries use the wrong result gtype
+ • Bug 737541 — freebase: search query buglets
+ • Bug 742472 — Freebase: Pass API key on all service requests
+ • Bug 742473 — Small freebase oauth2 access bugs
+ • Bug 687597 — Update to YouTube API v3
+ • Bug 684920 — Port to Google Drive API v2
+
+Updated translations:
+ • bg (Alexander Shopov)
+ • bs (Samir Ribić)
+ • da (Aputsiaq Niels Janussen)
+ • de (Bernd Homuth)
+ • et (Mattias Põldaru)
+ • pa (A S Alam)
+ • sk (Dušan Kazik)
+ • sr (Мирослав Николић)
+ • sv (Mattias Eriksson)
+ • tr (Muhammet Kara)
+ • zh_CN (Iris Gou)
+
+Overview of changes from libgdata 0.15.2 to libgdata 0.16.0
+===========================================================
+
+Major changes:
+ • Update date parsing to handle recent changes in Google’s servers
+ • Support ACLs with keys (e.g. for link-only sharing of documents)
+ • Add gzip encoding support for network packet compression
+ • Support for libsoup ≥ 2.47.3 (but the dependency has not been bumped)
+ • Basic test suite for the Google Tasks service
+ • Fix mutex warnings with new GLib versions
+
+API changes:
+ • Add GDataAccessRule:key
+ • Add gdata_access_rule_get_key()
+ • Add GDATA_TASKS_STATUS_NEEDS_ACTION
+ • Add GDATA_TASKS_STATUS_COMPLETED
+ • Deprecate the ‘q’ parameter of gdata_tasks_query_new()
+ • Add GDATA_SERVICE_ERROR_API_QUOTA_EXCEEDED
+
+Bugs fixed:
+ • Bug 732809 — evolution-3.12.3: cannot edit google contact due to invalid
+ format of timestamp
+ • Bug 734863 — Google contacts without email address block search/autocomplete
+ • Bug 690628 — <gAcl:withKey/> element Not Handled by libgdata
+ • Bug 703192 — The global log handler interferes with other application
+ • Bug 666623 — Add gzip encoding support
+
+Updated translations:
+ • as (Nilamdyuti Goswami)
+ • ca (Gil Forcada)
+ • cs (Marek Černocký)
+ • fr (Bruno Brouard)
+ • gu (Sweta Kothari)
+ • he (Yosef Or Boczko)
+ • hu (Balázs Úr)
+ • id (Andika Triwidada)
+ • it (Claudio Arseni)
+ • ko (Changwoo Ryu)
+ • lv (Rūdolfs Mazurs)
+ • nb (Kjartan Maraas)
+ • ru (Yuri Myasoedov)
+ • sl (Matej Urbančič)
+ • zh_HK (Chao-Hsiung Liao)
+ • zh_TW (Chao-Hsiung Liao)
+
+Overview of changes from libgdata 0.15.1 to libgdata 0.15.2
+===========================================================
+
+Major changes:
+ • Support PicasaWeb in the GOA authoriser (thanks to Saurav Agarwalla)
+ • Fix a data corruption bug in the downloads/uploads code
+
+Bugs fixed:
+ • Bug 731269 — Wrong scope information in authorization domain
+ • Bug 731949 — Memory leak from gdata_parser_int64_to_iso8601()
+ • Bug 731946 — Removing a task result in error, but succeeds
+ • Bug 732890 — Refresh authoriser on receiving SOUP_STATUS_NOT_FOUND
+
+Updated translations:
+ • el (Tom Tryfonidis)
+ • en_GB (Philip Withnall)
+ • es (Daniel Mustieles)
+ • eu (Iñaki Larrañaga Murgoitio)
+ • gl (Fran Dieguez)
+ • lt (Aurimas Černius)
+ • pt_BR (Enrico Nicoletto)
+ • sv (Anders Jonsson)
+
+Overview of changes from libgdata 0.15.0 to libgdata 0.15.1
+===========================================================
+
+Major changes:
+ • Add a Freebase service and demo (thanks to Carlos Garnacho)
+ • Various minor fixes to make libgdata compile without Coverity errors
+
+API changes:
+ • Add GDATA_LINK_PARENT
+ • Add GDataFreebase*
+
+Bugs fixed:
+ • Bug 707477 — Fill in GDataCategory::label for GDataDocumentsDocument
+ instances
+ • Bug 725827 — Define GDATA_LINK_PARENT
+ • Bug 726486 — Add support for the Freebase service
+
+Updated translations:
+ • ca (Gil Forcada)
+ • da (Aputsiaq Niels Janussen)
+ • de (Benjamin Steinwender)
+ • eu (Iñaki Larrañaga Murgoitio)
+ • fr (Bruno Brouard)
+ • he (Yosef Or Boczko)
+ • ko (Changwoo Ryu)
+ • lv (Rūdolfs Mazurs)
+ • nb (Kjartan Maraas)
+ • pl (Piotr Drąg, Aviary.pl)
+ • pt (Tiago S.)
+ • ru (Yuri Myasoedov)
+ • zh_HK (Chao-Hsiung Liao)
+ • zh_TW (Chao-Hsiung Liao)
+
+Overview of changes from libgdata 0.14.0 to libgdata 0.15.0
+===========================================================
+
+Major changes:
+ • Add JSON support and a Google Tasks service (thanks to Pēteris Krišjānis)
+ - This adds a dependency on json-glib ≥ 0.15 and breaks ABI (but not API)
+ • Add support for GProxyResolver proxies (thanks to Matthew Barnes)
+ • Fix build with recent gnome-common versions
+ • Fix build and installed header files for C++
+ • Remove deprecated function calls
+ • Fix compilation with -fstrict-aliasing
+ • Port local tests to use libuhttpmock (which is a new dependency)
+
+API changes:
+ • Add gdata_parsable_new_from_json()
+ • Add gdata_parsable_get_json()
+ • Add GDataParsable->get_content_type
+ • Add GDataService:proxy-resolver, gdata_service_get_proxy_resolver(),
+ gdata_service_set_proxy_resolver()
+ • Add GDataClientLoginAuthorizer:proxy-resolver,
+ gdata_client_login_authorizer_get_proxy_resolver(),
+ gdata_client_login_authorizer_set_proxy_resolver()
+ • Add GDataOAuth1Authorizer:proxy-resolver,
+ gdata_oauth1_authorizer_get_proxy_resolver(),
+ gdata_oauth1_authorizer_set_proxy_resolver()
+ • Add Google Tasks service: GDataTasksService, GDataTasksQuery,
+ GDataTasksTasklist, GDataTasksTask
+
+Bugs fixed:
+ • Bug 712565 — Fix compilation's warnings
+ • Bug 719647 — gdata-goa-authorizer.h broken for C++
+
+Updated translations:
+ • as (Nilamdyuti Goswami)
+ • be (Ihar Hrachyshka)
+ • ca (Gil Forcada)
+ • cs (Marek Černocký)
+ • da (Aputsiaq Niels Janussen)
+ • de (Christian Kirbach)
+ • el (Dimitris Spingos, Efstathios Iosifidis)
+ • es (Daniel Mustieles)
+ • et (Mattias Põldaru)
+ • fi (Jiri Grönroos)
+ • fr (Bruno Brouard)
+ • gl (Fran Dieguez)
+ • hu (Gabor Kelemen)
+ • id (Andika Triwidada)
+ • it (Claudio Arseni, Milo Casagrande)
+ • ja (Jiro Matsuzawa)
+ • ko (Changwoo Ryu)
+ • lt (Aurimas Černius)
+ • lv (Rūdolfs Mazurs)
+ • nb (Kjartan Maraas)
+ • pa (A S Alam)
+ • pl (Piotr Drąg)
+ • pt (António Lima)
+ • pt_BR (Enrico Nicoletto)
+ • ru (Yuri Myasoedov)
+ • sk (Ján Kyselica)
+ • sl (Matej Urbančič)
+ • sr (Мирослав Николић)
+ • th (Akom Chotiphantawanon)
+ • zh_CN (甘露)
+ • zh_HK (Chao-Hsiung Liao)
+ • zh_TW (Chao-Hsiung Liao)
+
+Overview of changes from libgdata 0.13.4 to libgdata 0.14.0
+===========================================================
+
+Updated translations:
+ • ca (Gil Forcada)
+ • cs (Marek Černocký)
+ • de (Christian Kirbach)
+ • el (Dimitris Spingos)
+ • es (Daniel Mustieles)
+ • fr (Alexandre Franke)
+ • he (Yaron Shahrabani)
+ • it (Claudio Arseni)
+ • lt (Aurimas Černius)
+ • nb (Kjartan Maraas)
+ • nl (Reinout van Schouwen)
+ • pt_BR (Rafael Ferreira)
+ • sl (Matej Urbančič)
+ • th (Akom Chotiphantawanon)
+ • zh_HK (Chao-Hsiung Liao)
+ • zh_TW (Chao-Hsiung Liao)
+
+Overview of changes from libgdata 0.13.3 to libgdata 0.13.4
+===========================================================
+
+Major changes:
+ • Fixes to request cancellation and progress notification
+ • Fix tests to be more reliable in the face of distributed system
+ non-synchronisation
+ • Add support for running tests offline using stored HTTP request traces
+
+API changes:
+ • Added GDATA_YOUTUBE_SERVICE_ERROR_CHANNEL_REQUIRED
+
+Bugs fixed:
+ • Bug 627895 — Pretty-print XML in test output
+ • Bug 703192 — The global log handler interferes with other application
+ • Bug 705266 — make check fails
+
+Updated translations:
+ • eu (Iñaki Larrañaga Murgoitio)
+ • gl (Fran Diéguez)
+ • pl (Piotr Drąg)
+ • pt (António Lima)
+ • tg (Victor Ibragimov)
+
+Overview of changes from libgdata 0.13.2 to libgdata 0.13.3
+===========================================================
+
+Major changes:
+ • Fix dependencies in pkg-config file
+ • Add OAuth 2.0 support to the GOA authoriser
+ • Fix some licencing inconsistencies (libgdata is entirely licenced under
+ LGPLv2.1+)
+ • Add support for PDF documents in Google Documents
+ • Add in-tree Vala bindings (they were previously in Vala’s tree)
+
+Bugs fixed:
+ • Bug 685464 — [PATCH] Package config file depends on too much
+ • Bug 685289 — GOA now uses OAuth 2.0 for Calendar, Contacts and Documents
+ • Bug 690281 — do not add unused gnome dependencies to libgdata.pc when
+ configured with --disable-gnome
+ • Bug 690225 — [patch] Make GOA optional
+ • Bug 690656 — unhandled XML warnings from totem youtube plugin
+ • Bug 693855 — Port introspection fixes from Vala bindings
+ • Bug 693958 — Add PDF support
+ • Bug 693865 — Add Vala bindings
+ • Bug 694415 — Don't require introspection.m4 to be installed system-wide
+
+Updated translations:
+ • et (Mattias Põldaru)
+ • sk (Ján Kyselica)
+ • ug (Gheyret Kenji)
+
+Overview of changes from libgdata 0.13.1 to libgdata 0.13.2
+===========================================================
+
+Major changes:
+ • Expand the documentation and add more examples
+ • Explicitly check for libxml2 in configure
+ • Port code coverage support to use gnome-common
+
+Bugs fixed:
+ • Bug 683209 — Port to gnome-common code coverage macros
+
+Updated translations:
+ • as (Nilamdyuti Goswami)
+ • bg (Alexander Shopov)
+ • ca (Joan Duran)
+ • cs (Marek Černocký)
+ • da (Ask H. Larsen)
+ • de (Mario Blättermann)
+ • el (Tom Tryfonidis)
+ • es (Daniel Mustieles)
+ • fr (Alexandre Franke)
+ • gl (Fran Dieguez, Leandro Regueiro)
+ • hi (Rajesh Ranjan)
+ • hu (Gabor Kelemen)
+ • it (Milo Casagrande)
+ • ko (Changwoo Ryu)
+ • lt (Aurimas Černius)
+ • lv (Rūdolfs Mazurs)
+ • ml (Anish A)
+ • pa (A S Alam)
+ • pl (Piotr Drąg)
+ • pt (António Lima)
+ • pt_BR (Rafael Ferreira)
+ • ru (Yuri Kozlov)
+ • te (Krishnababu Krothapalli)
+ • th (Akom Chotiphantawanon)
+ • tr (Muhammet Kara)
+ • vi (Nguyễn Thái Ngọc Duy)
+ • zh_HK (Chao-Hsiung Liao)
+ • zh_TW (Chao-Hsiung Liao)
+
+Overview of changes from libgdata 0.13.0 to libgdata 0.13.1
+===========================================================
+
+Major changes:
+ • Add support for Google Drawings
+ • Fix some of the test suite
+ • Add support for copying Google documents
+ • Moved GOA authoriser from EDS/GNOME Documents into libgdata (adding a GOA dependency)
+ • Remove libgnome-keyring dependency in favour of libgcr-base
+
+API changes:
+ • Added GDataDocumentsDrawing
+ • Added gdata_documents_service_copy_document(), gdata_documents_service_copy_document_async(), gdata_documents_service_copy_document_finish()
+ • Added GDataGoaAuthorizer
+ • Added gdata_documents_document_get_download_uri()
+
+Bugs fixed:
+ • Bug 633548 — Add Google Drawings support
+ • Bug 679072 — Tests for all Google services fail
+ • Bug 607270 — Support copying documents
+ • Bug 656976 — Merge eds and GNOME Documents GOA authorisers
+ • Bug 679867 — Use libgcr-base instead of libgnome-keyring for secure memory
+ • Bug 656970 — Add thumbnail support
+
+Updated translations:
+ • be (Ihar Hrachyshka)
+ • bg (Alexander Shopov)
+ • el (Γιώργος Στεφανάκης, Tom Tryfonidis)
+ • en_GB (Philip Withnall)
+ • es (Daniel Mustieles)
+ • gl (Fran Dieguez)
+ • he (Yaron Shahrabani)
+ • id (Andika Triwidada)
+ • nb (Kjartan Maraas)
+ • nl (Willem Heppe, Wouter Bolsterlee)
+ • sl (Matej Urbančič)
+ • sr (Мирослав Николић)
+ • te (Sasi Bhushan Boddepalli)
+ • zh_HK (Chao-Hsiung Liao)
+ • zh_TW (Chao-Hsiung Liao)
+
+Overview of changes from libgdata 0.12.0 to libgdata 0.13.0
+===========================================================
+
+Major changes:
+ • Bump GLib dependency to 2.31.0 in order to use its new threading primitives
+ • Add basic support for resumable uploads to GDataUploadStream (bug #607272)
+ • Update support for Google Documents to v3 of the API
+ • Add support for arbitrary file uploads to Google Documents (using GDataDocumentsDocuemtn),
+ and document conversion on upload (using GDataDocumentsUploadQuery)
+
+API changes:
+ • Added gdata_upload_stream_new_resumable()
+ • Added GDataUploadStream:content-length, gdata_upload_stream_get_content_length()
+ • Added gdata_documents_service_upload_document_resumable()
+ • Added gdata_documents_service_update_document_resumable()
+ • Added GDataDocumentsUploadQuery
+ • Made GDataDocumentsDocument instantiable (this isn’t a real API break, though)
+ • Added GDATA_DOCUMENTS_TEXT_JPEG
+ • GDataDocumentsEntry:quota-used, gdata_documents_entry_get_quota_used()
+
+Bugs fixed:
+ • Bug 593537 — Upgrade Documents service to version 3.0
+ • Bug 607616 — Permit the uploading of documents of any type
+ • Bug 656971 — Deprecate GDataDocumentsDocument subclasses
+ • Bug 588714 — <gd:quotaBytesUsed> handling in GDataDocumentsEntry
+
+Updated translations:
+ • ca (Jordi Serratosa)
+ • en_GB (Philip Withnall)
+ • es (Daniel Mustieles)
+ • he (Yaron Shahrabani)
+ • sv (Daniel Nylander)
+
+Overview of changes from libgdata 0.11.0 to libgdata 0.11.1
+===========================================================
+
+Major changes:
+* Bump libsoup dependency to 2.37.91 in order to ensure it checks the validity of TLS certificates before accepting them
+ (Note that this was implemented in 0.10.2 using a --with-ca-certs configure argument. This argument isn't necessary with 0.11.1, since the newer
+ libsoup version which 0.11.1 requires already knows where the system CA cert file is.)
+
+Bugs fixed:
+* Bug 667577 — fix introspection for srcdir != builddir builds
+* Bug 668365 — libgdata 0.10.x link error because of exported symbols that don't exist
+* Bug 671535 — Security issue in libgdata
+
+Updated translations:
+* be (Kasia Bondarava)
+* te (Praveen Illa)
+* uk (Korostil Daniel)
+
+Overview of changes from libgdata 0.10.0 to libgdata 0.11.0
+===========================================================
+
+Major changes:
+* Added version checking macros (thanks to Holger Berndt)
+* Ported scrapbook demo to GtkGrid; this sets our GTK+ dependency to 2.91.2
+* Added a LIBGDATA_DISABLE_DEPRECATED macro for disabling deprecated API in headers
+* Sensitive details (passwords, auth. tokens, etc.) are now redacted from logs unless LIBGDATA_DEBUG=4 is set (which is a new logging level)
+* Sensitive details are also now stored in non-pageable memory as much as possible to reduce the risk of them being leaked
+ NOTE: This has not been formally certified or reviewed, and is a precaution rather than a guarantee of security
+ This adds a dependency on libgnome-keyring when libgdata is configured with --enable-gnome (and is disabled otherwise)
+* Use GHmac instead of liboauth's HMAC; this bumps our GLib dependency to 2.30.0
+* Use the new GLib threading API iff compiled with GLib ≥ 2.31.0 (this doesn't bump the hard dependency, though)
+
+API changes:
+* Added GDATA_MAJOR_VERSION, GDATA_MINOR_VERSION, GDATA_MICRO_VERSION, GDATA_CHECK_VERSION
+* Added GDataDocumentsEntry:resource-id, gdata_documents_entry_get_resource_id()
+* Deprecated GDataDocumentsEntry:document-id, gdata_documents_entry_get_document_id()
+* Added GDataYouTubeQuery:license, gdata_youtube_query_get_license(), gdata_youtube_query_set_license()
+* Deprecated GDATA_DOCUMENTS_PRESENTATION_SWF
+* Added GDATA_CATEGORY_SCHEMA_LABELS, GDATA_CATEGORY_SCHEMA_LABELS_STARRED
+* Added GDataContactsContact:file-as, gdata_contacts_contact_get_file_as(), gdata_contacts_contact_set_file_as()
+
+Bugs fixed:
+* Bug 659016 — @rel not mandatory in website references
+* Bug 660038 — Add preprocessor macro for version checking
+* Bug 656972 — Tidy up document IDs
+* Bug 658865 — Add support for the license query parameter
+* Bug 660174 — Deprecate SWF export of presentations
+* Bug 659148 — Add search-term query example to documentation
+* Bug 656973 — Add an example of starring a document
+* Bug 656783 — Review security of memory storing authentication details
+* Bug 662290 — Can't update contact that has no full name
+
+Updated translations:
+* as (Nilamdyuti Goswami)
+* da (Aputsiaq Niels Janussen)
+* eu (Iñaki Larrañaga Murgoitio)
+* fi (Tommi Vainikainen)
+* hu (Gabor Kelemen)
+* it (Claudio Arseni)
+* ja (Jiro Matsuzawa)
+* kn (Shankar Prasad)
+* ko (Changwoo Ryu)
+* lt (Žygimantas Beručka)
+* lv (Rūdofls Mazurs)
+* or (Manoj Kumar Giri)
+* pa (A S Alam)
+* pl (Piotr Drąg)
+* pt (António Lima)
+* pt_BR (Flamarion Jorge)
+* sr (Мирослав Николић)
+* ta (I Felix)
+* vi (Nguyễn Thái Ngọc Duy)
+* zh_CN (YunQiang Su)
+* zh_HK (Chao-Hsiung Liao)
+* zh_TW (Chao-Hsiung Liao)
+
+Overview of changes from libgdata 0.9.1 to libgdata 0.10.0
+==========================================================
+
+Major changes:
+* Added support for comments to YouTube and PicasaWeb (thanks to Richard Schwarting)
+* Added a “scrapbook” demo application (thanks to Joe Cortes)
+* Added lots of cancellation tests
+
+API changes:
+* Added GDataCommentable
+* Added GDataComment, GDataYouTubeComment, GDataPicasaWebComment
+* Added gdata_entry_remove_link()
+* Added gdata_youtube_video_get_media_rating(), GDATA_YOUTUBE_RATING_TYPE_SIMPLE, GDATA_YOUTUBE_RATING_TYPE_MPAA, GDATA_YOUTUBE_RATING_TYPE_V_CHIP
+
+Bugs fixed:
+* Bug 618587 — Implement GDataGDFeedLink
+* Bug 598752 — Support comments
+* Bug 647882 — Support rating schemes
+* Bug 628069 — Add some demo applications
+* Bug 656529 — undefined references trying to compile/build libgdata
+* Bug 633364 — Add cancellation tests
+
+Updated translations:
+* bg (Alexander Shopov)
+* ca, ca@valencia (Gil Forcada)
+* cs (Andre Klapper)
+* de (Mario Blättermann)
+* eo (Kristjan SCHMIDT)
+* es (Jorge González)
+* fr (Bruno Brouard)
+* gl (Fran Diéguez)
+* he (Yaron Shahrabani)
+* id (Andika Triwidada)
+* lt (Aurimas Černius)
+* lv (Rūdofls Mazurs)
+* nb (Kjartan Maraas)
+* ru (Yuri Kozlov)
+* sl (Matej Urbančič)
+* sv (Daniel Nylander)
+* th (Akom Chotiphantawanon)
+* ug (Gheyret Kenji)
+
+Overview of changes from libgdata 0.9.0 to libgdata 0.9.1
+=========================================================
+
+Major changes:
+* Added GDestroyNotify parameters to query-type methods so that they're properly introspectable, breaking API (see below)
+* Fixed seeking in GDataDownloadStream
+* Made the tests individually idempotent, so the test suites should be less of a tangled mess now
+* Fixed uploading to non-default PicasaWeb albums
+* Fixed GDataAuthorizer to re-process requests after refreshing, involving a slight change to the semantics of GDataAuthorizer (see bgo#653535)
+* Ensure that Google Contacts uses HTTPS for everything
+* Fixed the IDs used for Google Documents so that deleting documents now consistently works, even when they're in folders
+
+API changes:
+* Changed the following methods, adding GDestroyNotify parameters for their progress user data parameters:
+ - gdata_access_handler_get_rules_async()
+ - gdata_service_query_async()
+ - gdata_calendar_service_query_all_calendars_async()
+ - gdata_calendar_service_query_own_calendars_async()
+ - gdata_calendar_service_query_events_async()
+ - gdata_contacts_service_query_contacts_async()
+ - gdata_contacts_service_query_groups_async()
+ - gdata_documents_service_query_documents_async()
+ - gdata_picasaweb_service_query_all_albums_async()
+ - gdata_picasaweb_service_query_files_async()
+ - gdata_youtube_service_query_standard_feed_async()
+ - gdata_youtube_service_query_videos_async()
+ - gdata_youtube_service_query_related_async()
+* Added GDataCalendarQuery:max-attendees, gdata_calendar_query_get_max_attendees(), gdata_calendar_query_set_max_attendees()
+* Added GDataCalendarQuery:show-deleted, gdata_calendar_query_show_deleted(), gdata_calendar_query_set_show_deleted()
+* Added gdata_picasaweb_service_get_user_async(), gdata_picasaweb_service_get_user_finish()
+
+Bugs fixed:
+* Bug 649728 — Add introspection annotations for documents_service_query(_async)
+* Bug 639405 — Add max-attendees query parameter
+* Bug 637664 — Fix GSeekable interface implementation in GDataDownloadStream
+* Bug 633359 — Make tests individually idempotent
+* Bug 653535 — Let GDataAuthorizer re-process request after refreshing
+* Bug 653530 — Bogus run-time warnings
+* Bug 653224 — Add gdata_picasaweb_service_get_user_async()
+
+Updated translations:
+* ca, ca@valencia (Joan Duran)
+* cs (Andre Klapper)
+* de (Mario Blättermann)
+* es (Daniel Mustieles)
+* fi (Tommi Vainikainen)
+* gl (Fran Diéguez)
+* he (Yaron Shahrabani)
+* lt (Aurimas Černius)
+* ru (Yuri Kozlov)
+* sl (Matej Urbančič)
+* sr (Мирослав Николић)
+* sv (Daniel Nylander)
+* tr (Muhammet Kara)
+
+Overview of changes from libgdata 0.8.0 to libgdata 0.9.0
+=========================================================
+
+Major changes:
+* Switched to even–odd/stable–unstable versioning (so 0.9.0 is an *unstable* release)
+* Use HTTPS for all requests
+* Some minor parsing fixes
+* Fixed some nasty threading/cancellation problems
+* Removed the old authentication API in favour of a more extensible, flexible one based on a GDataAuthorizer interface:
+ - ClientLogin is now handled by GDataClientLoginAuthorizer
+ - OAuth 1.0 support has been added with GDataOAuth1Authorizer
+* Added a dependency on liboauth ≥ 0.9.4
+* Introspection annotation improvements by Philip Chimento <philip.chimento@gmail.com>
+* Removed some outdated contact photo API
+
+API changes:
+* Added GDATA_AUTHENTICATION_ERROR_INVALID_SECOND_FACTOR (later renamed to GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_INVALID_SECOND_FACTOR as below).
+* Rename GDataAuthenticationError to GDataClientLoginAuthorizerError
+* Rename GDATA_AUTHENTICATION_ERROR and gdata_authentication_error_quark() similarly.
+* Remove gdata_service_authenticate() in favour of using GDataClientLoginAuthorizer with GDataService::authorizer:
+ - Remove gdata_service_authenticate(), gdata_service_authenticate_async() and gdata_service_authenticate_finish().
+ - Replace gdata_service_is_authenticated() by gdata_service_is_authorized() with much the same functionality.
+ - Add GDataService::authorizer, gdata_service_get_authorizer(), gdata_service_set_authorizer() and gdata_service_get_authorization_domains().
+ - Remove gdata_service_get_client_id() in favour of GDataClientLoginAuthorizer::client-id.
+ - Remove gdata_service_get_username() in favour of GDataClientLoginAuthorizer::username.
+ - Remove gdata_service_get_password() in favour of GDataClientLoginAuthorizer::password.
+ - Remove GDataServiceClass->service_name in favour of GDataAuthorizationDomain::service-name.
+ - Remove GDataServiceClass->authentication_uri and GDataServiceClass->parse_authentication_response in favour of different GDataAuthorizer
+ implementations.
+ - Add GDataAuthorizer parameters to and remove client_id parameters from: gdata_calendar_service_new(), gdata_contacts_service_new(),
+ gdata_documents_service_new(), gdata_picasaweb_service_new() and gdata_youtube_service_new().
+* Add GDataAuthorizationDomain.
+ - Add GDataServiceClass->get_authorization_domains and gdata_service_get_authorization_domains().
+ - Add auth. domain getters to various GDataService subclasses: gdata_youtube_service_get_primary_authorization_domain(),
+ gdata_contacts_service_get_primary_authorization_domain(), gdata_calendar_service_get_primary_authorization_domain(),
+ gdata_picasaweb_service_get_primary_authorization_domain(), gdata_documents_service_get_primary_authorization_domain() and
+ gdata_documents_service_get_spreadsheet_authorization_domain().
+ - Add auth. domain properties to various standalone request objects: GDataDownloadStream::authorization-domain with
+ gdata_download_stream_get_authorization_domain(), GDataUploadStream::authorization-domain with gdata_upload_stream_get_authorization_domain() and
+ GDataBatchOperation::authorization-domain with gdata_batch_operation_get_authorization_domain().
+ - Add GDataAccessHandlerIface->get_authorization_domain. This doesn't have to be implemented by existing GDataAccessHandlers, but it's
+ highly recommended.
+ - Add a GDataAuthorizationDomain parameter to GDataServiceClass->append_query_headers, gdata_service_query(), gdata_service_query_async(),
+ gdata_service_query_single_entry(), gdata_service_query_single_entry_async(), gdata_service_insert_entry(), gdata_service_insert_entry_async(),
+ gdata_service_update_entry(), gdata_service_update_entry_async(), gdata_service_delete_entry(), gdata_service_delete_entry_async(),
+ gdata_batchable_create_operation(), gdata_download_stream_new() and gdata_upload_stream_new().
+* Add GDataAuthorizer as described above, implemented by GDataClientLoginAuthorizer.
+* Add GDataOAuth1Authorizer and all its properties and methods.
+* Remove gdata_contacts_contact_has_photo() and GDataContactsContact:has-photo (use gdata_contacts_contact_get_photo_etag() instead).
+
+Bugs fixed:
+* Bug 642983 — libgdata-0.8.0: test fail with --enable-gtk-doc
+* Bug 644940 — Use HTTPS only
+* Bug 644946 — Support two-factor authentication
+* Bug 639610 — Allow access to a contact's photo ETag
+* Bug 648058 — Doesn't allow empty names for user defined fields
+* Bug 650835 — [abrt] evolution-data-server-3.0.1-1.fc15: Process /usr/libexec/e-addressbook-factory was killed by signal 6 (SIGABRT)
+
+Updated translations:
+* as (Nilamdyuti Goswami)
+* da (Kris Thomsen)
+* de (Wolfgang Stöggl)
+* bg (Ivaylo Valkov)
+* bn_IN (Runa Bhattacharjee)
+* ca (Joan Duran)
+* cs (Marek Černocký)
+* de (Mario Blättermann)
+* el (Γιώργος Στεφανάκης, Michael Kotsarinis)
+* en_GB (Bruce Cowan)
+* eo (Kristjan SCHMIDT)
+* es (Daniel Mustieles, Jorge González)
+* eu (Iñaki Larrañaga Murgoitio)
+* fr (Bruno Brouard)
+* gl (Leandro Regueiro, Fran Diéguez)
+* gu (Sweta Kothari)
+* he (Yaron Shahrabani)
+* hi (Rajesh Ranjan)
+* hu (Gabor Kelemen)
+* id (Andika Triwidada)
+* it (Claudio Arseni)
+* kn (Shankar Prasad)
+* ko (Changwoo Ryu)
+* lv (Rudolfs)
+* mr (Sandeep Shedmake)
+* nb (Kjartan Maraas)
+* or (Manoj Kumar Giri)
+* pa (A S Alam)
+* pl (Piotr Drąg)
+* pt (António Lima)
+* pt_BR (Rodrigo Padula de Oliveira)
+* ro (Lucian Adrian Grijincu)
+* ru (Yuri Kozlov)
+* sl (Matej Urbančič)
+* sr, sr@latin (Мирослав Николић)
+* sv (Daniel Nylander)
+* th (Akom Chotiphantawanon)
+* tr (Senol Korkmaz)
+* ug (Gheyret Kenji)
+* uk (Korostil Daniel)
+* zh_CN (ben)
+* zh_HK (Chao-Hsiung Liao)
+* zh_TW (Chao-Hsiung Liao)
+
+Overview of changes from libgdata 0.7.0 to libgdata 0.8.0
+=========================================================
+
+Major changes:
+* Added async counterparts to all remaining blocking methods
+* Added various cancellation tests to the test suite
+* Many fixes and improvements for cancellation of various operations
+* Fixed many race conditions in authentication and cancellation of operations
+* Removed the separate youtube-user property for YouTube authentication
+* Fixed attribute escaping across all of libgdata
+* Removed some deprecated PicasaWeb properties (file clients and positions)
+* Switched to stream-based downloading for all download operations
+* Tidied up (i.e. broke) the Documents service API a lot
+* Tidied up a few test cases and made them idempotent
+* Fixed several minor and major memory leaks
+* Ensured that batch operations' callbacks are always called, even if the entire batch operation errors out
+* Bumped our gdk-pixbuf dependency to 2.14
+* Fixed all the XML comparison tests in light of an invalid assumption we made about hash table ordering being broken
+* Added GeoRSS support to YouTube videos
+* Overhauled download and upload streams, fixing many race conditions and deadlocks and adding some test cases
+* Added support for flushing GDataUploadStream instances
+* Added many code examples to the documentation and expanded a few other bits of the documentation
+
+API changes:
+* Added gdata_picasaweb_service_insert_album_async()
+* Added gdata_picasaweb_service_query_files_async()
+* Removed GDataYouTubeService:youtube-user, gdata_youtube_service_get_youtube_user()
+* Removed GDataPicasaWebFile:client, gdata_picasaweb_file_get_client(), gdata_picasaweb_file_set_client()
+* Removed GDataPicasaWebFile:position, gdata_picasaweb_file_get_position(), gdata_picasaweb_file_set_position()
+* Changed gdata_documents_document_download() to be stream-based
+* Changed gdata_documents_service_upload_document(), gdata_documents_service_update_document() to be stream-based
+* Added gdata_documents_service_finish_upload()
+* Renamed gdata_documents_service_move_document_to_folder() to gdata_documents_service_add_entry_to_folder()
+* Renamed gdata_documents_service_remove_document_from_folder() to gdata_documents_service_remove_entry_from_folder()
+* Added gdata_documents_service_add_entry_to_folder_async(), gdata_documents_service_add_entry_to_folder_finish()
+* Added gdata_documents_service_from_entry_from_folder_async(), gdata_documents_service_from_entry_from_folder_finish()
+* Changed GDataDownloadStream::content-length, GDataDownloadStream::content-type to be emitted in the download thread rather than the main thread
+* Changed gdata_picasaweb_service_upload_file() to be stream-based
+* Removed gdata_picasaweb_service_upload_file_async(), gdata_picasaweb_service_upload_file_finish()
+* Added gdata_picasaweb_service_finish_file_upload()
+* Changed gdata_media_content_download() to be stream-based
+* Changed gdata_media_thumbnail_download() to be stream-based
+* Changed gdata_youtube_service_upload_video() to be stream-based
+* Added gdata_youtube_service_finish_video_upload()
+* Added gdata_calendar_service_query_events_async()
+* Added gdata_calendar_service_insert_event_async()
+* Changed gdata_contacts_contact_get_photo(), gdata_contacts_contact_set_photo() to use guint8 instead of gchar for image data
+* Added gdata_contacts_contact_get_photo_async(), gdata_contacts_contact_get_photo_finish()
+* Changed gdata_contacts_contact_set_photo() to require a content type to be passed in
+* Added gdata_contacts_contact_set_photo_async(), gdata_contacts_contact_set_photo_finish()
+* Added GDataYouTubeVideo:latitude, GDataYouTubeVideo:longitude, gdata_youtube_video_get_coordinates(), gdata_youtube_video_set_coordinates()
+* Changed gdata_upload_stream_new() to take a GCancellable
+* Added GDataUploadStream:cancellable, gdata_upload_stream_get_cancellable()
+* Changed gdata_download_stream_new() to take a GCancellable
+* Added GDataDownloadStream:cancellable, gdata_download_stream_get_cancellable()
+
+Bugs fixed:
+* Bug 607620 — Cancelled uploads appear partially complete in PicasaWeb
+* Bug 635959 — Proper cancellation support for GDataUploadStream
+* Bug 635736 — Asynchronous authentication tests broken
+* Bug 634033 — Use standard login URI for YouTube
+* Bug 635335 — GIR missing exported packages information
+* Bug 631033 — Fix escaping and add tests
+* Bug 633363 — Add missing *_async() methods
+* Bug 594814 — Handle GeoRSS for YouTube videos
+* Bug 637036 — Overhaul cancellation support
+* Bug 579885 — Add code examples to documentation
+
+Updated translations:
+* ca@valencia (Joan Duran)
+* cs (Marek Černocký)
+* da (Kris Thomsen)
+* de (Mario Blättermann)
+* en_GB (Philip Withnall)
+* es (Jorge González)
+* eu (Iñaki Larrañaga Murgoitio)
+* fr (Bruno Brouard)
+* hu (Gabor Kelemen)
+* sl (Matej Urbančič)
+* sv (Daniel Nylander)
+* zh_CN (Eleanor Chen)
+
+Overview of changes from libgdata 0.6.0 to libgdata 0.7.0
+=========================================================
+
+Major changes:
+* Improved and updated introspection support and annotations for gobject-introspection >= 0.9.7 (which we now depend on)
+* Added more code examples to documentation
+* Added support for service localisation using gdata_service_set_locale()
+* Added support for listing video categories from YouTube
+* Tidied up object comparison using a new GDataComparable interface instead of lots of *_compare() methods
+* Added batch operation support and implemented it for the Contacts, YouTube, Calendar and Documents services
+* Fixed ID projection issues with Contact entries
+* Added support for alerting the user of account migration with GDATA_AUTHENTICATION_ERROR_ACCOUNT_MIGRATED
+* Added support for a --no-internet option to the tests, so that more of the test suite can be run automatically without an internet connection
+* Split handling of entries with inline content from external content (using the new gdata_entry_get_content_uri())
+* Rearranged Documents classes so that instantiable entries are now subclasses of a new GDataDocumentsDocument, which handles downloading of document
+ files
+* Use gtk-doc's no-tmpl flavour, bumping our gtk-doc requirement to 1.14
+* Tightened up URI escaping
+* Switched to depending on only gdk-pixbuf instead of the whole of GDK, since we only (optionally) use GdkPixbuf for the test suite
+* Tightened up attribute escaping
+* Switched from GTimeVal to gint64 for representing UNIX timestamps
+* Switched to using upstream gettext instead of glib-gettext
+* Added support for manipulating Contact groups
+
+API changes:
+* Added gdata_entry_get_authors
+* Added gdata_service_get_locale, gdata_service_set_locale
+* Added GDataYouTubeCategory, GDataAPPCategories
+* Added gdata_youtube_service_get_categories, gdata_youtube_service_get_categories_async, gdata_youtube_service_get_categories_finish
+* Added GDataComparable
+* Removed *_compare() functions in favour of implementing the GDataComparable interface
+* Added GDataEntryClass->kind_term
+* Added GDataBatchable, GDataBatchOperation
+* Added GDATA_AUTHENTICATION_ERROR_ACCOUNT_MIGRATED
+* Added GDATA_DOCUMENTS_PRESENTATION_PDF, GDATA_DOCUMENTS_PRESENTATION_PNG, GDATA_DOCUMENTS_PRESENTATION_PPT, GDATA_DOCUMENTS_PRESENTATION_SWF
+ GDATA_DOCUMENTS_PRESENTATION_TXT, GDATA_DOCUMENTS_SPREADSHEET_CSV, GDATA_DOCUMENTS_SPREADSHEET_HTML, GDATA_DOCUMENTS_SPREADSHEET_ODS,
+ GDATA_DOCUMENTS_SPREADSHEET_PDF, GDATA_DOCUMENTS_SPREADSHEET_TSV, GDATA_DOCUMENTS_SPREADSHEET_XLS, GDATA_DOCUMENTS_TEXT_DOC,
+ GDATA_DOCUMENTS_TEXT_HTML, GDATA_DOCUMENTS_TEXT_ODT, GDATA_DOCUMENTS_TEXT_PDF, GDATA_DOCUMENTS_TEXT_PNG, GDATA_DOCUMENTS_TEXT_RTF,
+ GDATA_DOCUMENTS_TEXT_TXT, GDATA_DOCUMENTS_TEXT_ZIP
+* Removed GDataDocumentsPresentationFormat, GDataDocumentsSpreadsheetFormat, GDataDocumentsTextFormat and made the appropriate changes to the relevant
+ Documents functions which took them
+* Added gdata_entry_get_content_uri, gdata_entry_set_content_uri and changed the behaviour of gdata_entry_get_content as appropriate
+* Added GDataDocumentsDocument as a subclass of GDataDocumentsEntry and the parent of GDataDocumentsPresentation, GDataDocumentsSpreadsheet and
+ GDataDocumentsText
+* Added gdata_documents_document_download, gdata_documents_document_get_download_uri
+* Removed gdata_documents_presentation_download_document, gdata_documents_presentation_get_download_uri,
+ gdata_documents_spreadsheet_download_document, gdata_documents_text_download_document, gdata_documents_text_get_download_uri (moved to
+ GDataDocumentsDocument)
+* Made GDataDocumentsEntry abstract
+* Removed gdata_contacts_service_update_contact (use gdata_service_update_entry instead)
+* Removed GDataTimeVal (boxed type)
+* Removed GTimeVal from the public API, in favour of gint64
+* Added GDATA_LINK_ACCESS_CONTROL_LIST
+* Removed gdata_access_handler_insert_rule (use gdata_service_insert_entry instead), gdata_access_handler_update_rule (use gdata_service_update_entry
+ instead), gdata_access_handler_delete_rule (use gdata_service_delete_entry instead)
+* Added gdata_access_handler_get_rules_async
+* Added gdata_contacts_service_insert_contact_async
+* Added GDataContactsGroup
+* Added gdata_contacts_service_query_groups, gdata_contacts_service_query_groups_async, gdata_contacts_service_insert_group,
+ gdata_contacts_service_insert_group_async
+
+Bugs fixed:
+* Bug 616222 — libgdata fails to build from a remote directory
+* Bug 579885 — Add code examples to documentation
+* Bug 618584 — Implement gdata_entry_get_authors()
+* Bug 615721 — Support listing video categories
+* Bug 618586 — gdata_service_query_single_entry() encounters NULL type class
+* Bug 579169 — Add batch processing support
+* Bug 624142 — Add batch operation support to Calendar service
+* Bug 624141 — Add batch operation support to Documents service
+* Bug 630350 — Email address cannot contain name
+
+Updated translations:
+* ca (Gil Forcada)
+* cs (Marek Cernocky)
+* da (Kris Thomsen)
+* de (Mario Blättermann, Christian Kirbach)
+* en_GB (Philip Withnall)
+* es (Jorge González)
+* fr (Claude Paroz)
+* gl (Fran Diéguez)
+* hu (Gabor Kelemen)
+* id (Andika Triwidada)
+* it (Milo Casagrande)
+* lt (Aurimas Černius)
+* pl (Piotr Drąg)
+* pt (António Lima)
+* pt_BR (Djavan Fagundes)
+* ro (Daniel Șerbănescu, Lucian Adrian Grijincu)
+* sl (Matej Urbančič)
+* sv (Daniel Nylander)
+* zh_CN (Yinghua Wang, Eleanor Chen, YunQiang Su)
+
+Overview of changes from libgdata 0.5.0 to libgdata 0.6.0
+=========================================================
+
+Major changes:
+* Added feed icon support
+* Added support for querying for user information on the PicasaWeb service
+* Added some code examples to the documentation
+* Ensured UTF-8 is supported correctly everywhere
+* Added GObject introspection support (GData-0.0.gir)
+* Added a download API for PicasaWeb images and thumbnails
+* Added an asynchronous PicasaWeb upload API
+* Reorganised the build system to use non-recursive automake
+* Added gcov support and consequently improved test coverage somewhat
+* Ensured HTTPS requests are used wherever possible, unless the LIBGDATA_FORCE_HTTP environment variable is set
+* Modified memory management to consistently use the GLib memory manager, eliminating 53 calls to g_strdup() on an average test run
+* Consolidated generic API errors to GDATA_SERVICE_ERROR_PROTOCOL_ERROR
+
+API changes:
+* Added gdata_picasaweb_query_new_with_limits
+* Added gdata_feed_get_icon
+* Added GDataPicasaWebUser, gdata_picasaweb_service_get_user
+* Removed gdata_picasaweb_album_get_name, gdata_picasaweb_album_get_description, gdata_picasaweb_album_set_description and corresponding properties
+* Added GDataPicasaWebFeed
+* Removed gdata_youtube_video_get_title, gdata_youtube_video_set_title
+* Added gdata_media_content_download, gdata_media_thumbnail_download
+* Added gdata_picasaweb_service_insert_album
+* Added gdata_picasaweb_service_upload_file_async, gdata_picasaweb_service_upload_file_finish
+* Added gdata_gd_organization_get_location, gdata_gd_organization_set_location,
+ gdata_gd_email_address_get_display_name, gdata_gd_email_address_set_display_name
+* Added GDataOperationType
+* Removed GDATA_SERVICE_ERROR_WITH_*; GDATA_SERVICE_ERROR_PROTOCOL_ERROR is now returned instead
+
+Bugs fixed:
+* Bug 597248 — Add gdata_picasaweb_query_new_with_limits
+* Bug 598746 — gdata_picasaweb_query_set_image_size documentation fix
+* Bug 598910 — Timestamp bug
+* Bug 598912 — Test data was changed by my mucking around with comments
+* Bug 598893 — gdata_picasaweb_album_new doesn't set a valid visibility
+* Bug 599140 — Have albums initialise date to now by default
+* Bug 589858 — Handle gphoto XML elements found in 'GDataFeed'
+* Bug 598913 — Add gdata_picasaweb_service_insert_album()
+* Bug 602156 — GDataUploadStream should close GOutputStream on dispose
+* Bug 598649 — Download API for PicasaWeb images and thumbnails
+* Bug 600262 — Add async PicasaWeb upload API
+* Bug 604313 — Test failures in 0.5.1
+* Bug 601919 — Expand a comment, organise some media tests
+* Bug 598748 — *_download_document prevents non-overwriting saving into directories
+* Bug 607607 — Undefined symbol with introspection
+
+Updated translations:
+* cs (Marek Cernocky, Petr Kovar)
+* de (Mario Blättermann)
+* es (Jorge González)
+* fr (Claude Paroz, Julien Hardelin)
+* gl (Fran Dieguez)
+* hu (Gabor Kelemen)
+* it (Rita Bandiera)
+* ja (Takeshi AIHANA)
+* pt (António Lima)
+* pt_BR (Djavan Fagundes, Og Maciel)
+* sl (Matej Urbančič)
+* sv (Daniel Nylander)
+* zh_CN (Aron Xu)
+
+Overview of changes from libgdata 0.4.0 to libgdata 0.5.0
+=========================================================
+
+Major changes:
+* Added Exif support for PicasaWeb files
+* Added the ability to query single Google Documents files
+* Errors are now logged in the "libgdata" domain
+* Added GeoRSS support for PicasaWeb files and albums
+* Optimisation to the XML output functions
+* Added streaming download and upload support using GDataDownloadStream and GDataUploadStream
+* Added support for silent building with AM_SILENT_RULES
+* Updated the GData namespace to version 3, improving name and address support
+
+API changes:
+* Changed gdata_documents_*_download_document to accept a destination file, rather than a directory
+* Added gdata_picasaweb_file_get_distance, gdata_picasaweb_file_get_exposure, gdata_picasaweb_file_get_flash, gdata_picasaweb_file_get_focal_length
+ gdata_picasaweb_file_get_fstop, gdata_picasaweb_file_get_image_unique_id, gdata_picasaweb_file_get_iso, gdata_picasaweb_file_get_make
+ gdata_picasaweb_file_get_model and corresponding properties
+* Added GDataExifTags
+* Added gdata_documents_entry_is_deleted
+* Added GDataEntry:rights, gdata_entry_get_rights, gdata_entry_set_rights
+* Added gdata_documents_service_query_single_document
+* Added GDataPicasaWebAlbum:latitude, GDataPicasaWebAlbum:longitude, gdata_picasaweb_album_get_coordinates, gdata_picasaweb_album_set_coordinates,
+ GDataPicasaWebFile:latitude, GDataPicasaWebFile:longitude, gdata_picasaweb_file_get_coordinates, gdata_picasaweb_file_set_coordinates
+* Added GDataGeoRSSWhere
+* Added GDataDownloadStream
+* Added GDATA_SERVICE_ERROR_WITH_DOWNLOAD, GDATA_SERVICE_ERROR_WITH_UPLOAD service errors
+* Added gdata_documents_*_get_download_uri
+* Added GDataUploadStream
+* Added GDataGDName
+* Added GDataGDOrganization:department, gdata_gd_organization_get_department, gdata_gd_organization_set_department, GDataGDOrganization:job-description,
+ gdata_gd_organization_get_job_description, gdata_gd_organization_set_job_description, GDataGDOrganization:symbol, gdata_gd_organization_get_symbol,
+ gdata_gd_organization_set_symbol
+* Added GDATA_GD_MAIL_CLASS_*, GDATA_GD_ADDRESS_USAGE_*
+* Removed the address parameter from gdata_gd_postal_address_new
+* Added GDataGDPostalAddress:mail-class, gdata_gd_postal_address_get_mail_class, gdata_gd_postal_address_set_mail_class, GDataGDPostalAddress:usage,
+ gdata_gd_postal_address_get_usage, gdata_gd_postal_address_set_usage, GDataGDPostalAddress:agent, gdata_gd_postal_address_get_agent,
+ gdata_gd_postal_address_set_agent, GDataGDPostalAddress:house-name, gdata_gd_postal_address_get_house_name, gdata_gd_postal_address_set_house_name,
+ GDataGDPostalAddress:street, gdata_gd_postal_address_get_street, gdata_gd_postal_address_set_street, GDataGDPostalAddress:po-box,
+ gdata_gd_postal_address_get_po_box, gdata_gd_postal_address_set_po_box, GDataGDPostalAddress:neighborhood, gdata_gd_postal_address_get_neighborhood,
+ gdata_gd_postal_address_set_neighborhood, GDataGDPostalAddress:city, gdata_gd_postal_address_get_city, gdata_gd_postal_address_set_city,
+ GDataGDPostalAddress:subregion, gdata_gd_postal_address_get_subregion, gdata_gd_postal_address_set_subregion, GDataGDPostalAddress:region,
+ gdata_gd_postal_address_get_region, gdata_gd_postal_address_set_region, GDataGDPostalAddress:postcode, gdata_gd_postal_address_get_postcode,
+ gdata_gd_postal_address_set_postcode, GDataGDPostalAddress:country, GDataGDPostalAddress:country-code, gdata_gd_postal_address_get_country,
+ gdata_gd_postal_address_get_country_code, gdata_gd_postal_address_set_country
+* Added GDataContactsContact:name, gdata_contacts_contact_get_name
+* Added gdata_documents_service_get_upload_uri
+
+Bugs fixed:
+* Bug 589265 – Crash on query error
+* Bug 589545 – *_download_document(): let the client decide where to download
+* Bug 589201 – Add EXIF support for PicasaWeb image files
+* Bug 589850 – gdata_picasaweb_album_get_timestamp() returns date in 1970!
+* Bug 590345 – <gd:deleted> handling in GDataDocumentsEntry
+* Bug 589855 – Obsolete <rights> not handled in GDataPicasaWebAlbum parse_xml()
+* Bug 590341 – Allow querying of single documents
+* Bug 590132 – Unhandled XML for georss
+* Bug 590568 – Crash on querying inside a folder
+* Bug 591966 — Can't query single spreadsheets
+* Bug 591974 — remove_document_from_folder moves documents to the trash
+* Bug 591691 — Getting a feed containing PDF documents returns NULL
+* Bug 592124 — G_LOG_DOMAIN not set for subdirectories
+* Bug 592845 — Undefined symbol: gdata_picasaweb_query_new_with_limits
+* Bug 593239 — Use GDataUploadStream for uploading files
+* Bug 593336 — Query parameter "q=..." isn't valid for album kinds
+
+Updated translations:
+* de (Mario Blättermann)
+* en_GB (Philip Withnall)
+* es (Jorge González)
+* eu (Iñaki Larrañaga Murgoitio)
+* fr (Nicolas Repentin)
+* gl (Fran Dieguez)
+* hu (Gabor Kelemen)
+* nb (Kjartan Maraas)
+* po (Piotr Drąg)
+* pt (António Lima)
+* pt_BR (Flamarion Jorge)
+* sv (Daniel Nylander)
+* zh_HK (Chao-Hsiung Liao)
+* zh_TW (Chao-Hsiung Liao)
+
+Overview of changes from libgdata 0.3.0 to libgdata 0.4.0
+=========================================================
+
+Major changes:
+* Added comparison functions for all small XML elements (such as GDataLink and friends)
+* Added GDataContactsContact photo support
+* Translatable strings are now even clearer, and all have translator comments
+* Fixed a number of locale-dependent bugs
+* Converted small XML element structs to full GObjects
+* Added a PicasaWeb service by Richard Schwarting <aquarichy@gmail.com>
+* Fixed more licencing issues (libgdata is licenced under LGPLv2.1+)
+* Required link relation types to be full URIs
+* Added a Google Documents service by Thibault Saunier <saunierthibault@gmail.com>
+
+API changes:
+* Added gdata_contacts_contact_get_extended_properties
+* Added *_compare
+* Added GDataContactsContact:has-photo, gdata_contacts_contact_has_photo, gdata_contacts_contact_get_photo, gdata_contacts_contact_set_photo
+* Converted GDataAuthor, GDataCategory, GDataLink, GDataGenerator to GObjects (removed *_free functions and added mandatory field accessors)
+* Converted GDataGDEmailAddress, GDataGDFeedLink, GDataGDIMAddress, GDataGDOrganization, GDataGDPhoneNumber, GDataGDPostalAddress, GDataGDRating,
+ GDataGDWhen, GDataGDReminder, GDataGDWhere, GDataGDWho to GObjects (removed *_free functions and added mandatory field accessors)
+* Converted GDataMediaCategory, GDataMediaContent, GDataMediaCredit, GDataMediaRating, GDataMediaRestriction, GDataMediaThumbnail to GObjects
+ (removed *_free functions and added mandatory field accessors)
+* Removed gdata_media_thumbnail_parse_time, gdata_media_thumbnail_build_time
+* Converted GDataYouTubeState to GObject (removed gdata_youtube_state_free and added mandatory field accessors)
+* Added GDataYouTubeControl
+* Added PicasaWeb service API
+* Removed gdata_entry_new_from_xml, other *_new_from_xml functions, gdata_entry_get_xml
+* Added gdata_parsable_new_from_xml, gdata_parsable_get_xml
+* Removed GDATA_PARSER_ERROR_UNHANDLED_XML_ELEMENT parser error
+* Added GDataParsableClass->element_name, GDataParsableClass->element_namespace
+* Added GDATA_LINK_ALTERNATE, GDATA_LINK_EDIT, GDATA_LINK_EDIT_MEDIA, GDATA_LINK_ENCLOSURE, GDATA_LINK_RELATED, GDATA_LINK_SELF, GDATA_LINK_VIA
+ for use with gdata_entry_look_up_link
+* Added gdata_contacts_service_update_contact
+* Added gdata_youtube_service_query_single_video, gdata_youtube_service_query_single_video_async, gdata_youtube_service_query_single_video_finish
+* Added gdata_youtube_video_get_video_id_from_uri
+* Added GDataYouTubeAspectRatio, gdata_youtube_video_get_aspect_ratio, gdata_youtube_video_set_aspect_ratio
+* Added Google Documents service API
+* Added gdata_contacts_contact_remove_all_email_addresses, gdata_contacts_contact_remove_all_im_addresses,
+ gdata_contacts_contact_remove_all_postal_addresses, gdata_contacts_contact_remove_all_phone_numbers, gdata_contacts_contact_remove_all_organizations
+
+Bugs fixed:
+* Bug 584417 – Strings are not properly formed for localisation
+* Bug 584737 – String parsing is locale-sensitive
+* Bug 579170 – Eliminate gdata_parser_error_unhandled_element
+* Bug 587277 – Some files are GPLv3 but license is LGPLv2.1?
+* Bug 588052 – Parse the yt:aspectratio tag
+* Bug 587073 – Add Google Documents service
+* Bug 588995 – float radix character depends on LC_NUMERIC, but Google wants "."
+
+Updated translations:
+* ca (Joan Duran)
+* de (Mario Blättermann)
+* en_GB (Philip Withnall)
+* es (Jorge González)
+* nb (Kjartan Maraas)
+* pa (A S Alam)
+* sv (Daniel Nylander)
+* uk (Maxim Dziumanenko)
+
+Overview of changes from libgdata 0.2.0 to libgdata 0.3.0
+=========================================================
+
+Major changes:
+* Empty (but present) entry titles are now set to an empty string, rather than NULL
+* GDataCalendarEvent has basic recurrence support
+* Optional GNOME support has been added for automagic proxy configuration (depends on libsoup-gnome-2.4)
+* Deprecated libsoup API has been removed, bumping the requirement to 2.26.1
+* Translation comments and some translatable strings have been made clearer
+* Default error handling has been improved
+* More async versions of functions have been added
+* The XML output of GDataCalendarCalendar has been completed
+* GDataYouTubeVideo now has support for recorded times and comment feed links
+* Added a GDataYouTubeQuery class
+* Access control list (ACL) support, implemented on GDataCalendarCalendar
+* Abstract XML parsing into GDataParsable to allow GDataFeed to be overridden
+* Added a GDataCalendarFeed class to deal with calendar-specific properties
+
+API changes:
+* Added GDataCalendarEvent:recurrence, gdata_calendar_event_get_recurrence, gdata_calendar_event_set_recurrence
+* Added GDataCalendarEvent:original-event-id, GDataCalendarEvent:original-event-uri, gdata_calendar_event_get_original_event_details
+* Added gdata_calendar_event_is_exception
+* Added GDATA_SERVICE_ERROR_NOT_FOUND, GDATA_SERVICE_ERROR_CONFLICT
+* Changed GDataServiceClass->parse_error_response
+* Added gdata_service_insert_entry_async, gdata_service_insert_entry_finish
+* Added gdata_service_update_entry_async, gdata_service_update_entry_finish
+* Added gdata_service_delete_entry_async, gdata_service_delete_entry_finish
+* Added gdata_color_to_hexadecimal
+* Added GDataYouTubeVideo:comments-feed-link, gdata_youtube_video_get_comments_feed_link
+* Added GDataYouTubeVideo:recorded, gdata_youtube_video_get_recorded, gdata_youtube_video_set_recorded
+* Added read_only parameter to gdata_gd_feed_link_new and member to GDataGDFeedLink
+* Added GDataYouTubeQuery
+* Added GDataAccessHandler, GDataAccessRule
+* Added GDATA_SERVICE_ERROR_FORBIDDEN
+* Added GDataParsable
+* Changed GDataEntry to extend GDataParsable, rather than GObject
+* Removed GDataEntry->parse_xml
+* Changed GDataFeed to extend GDataParsable, rather than GObject
+* Added GDataCalendarFeed
+* Added GDataServiceClass->feed_type
+
+Bugs fixed:
+* Bug 582026 – Access Control List functionality
+* Bug 578367 – Add support for YouTube-specific query parameters
+* Bug 581706 – translation issues
+* Bug 580330 – Rejects empty entry titles
+
+Updated translations:
+* de (Mario Blättermann)
+* el (Giannis Katsampirhs)
+* en_GB (Philip Withnall)
+* es (Jorge González)
+* gl (Fran Diéguez, Antón Méixome)
+
+Overview of changes from libgdata 0.1.0 to libgdata 0.2.0
+=========================================================
+
+Major changes:
+* The updated entry is now returned when inserting an entry
+* Entries can be updated with gdata_service_update_entry
+* Entries can be deleted with gdata_service_delete_entry
+* GDataService has proxy support with the proxy-uri property
+* Redirects from the server are now handled correctly
+* API documentation is now complete
+* Unknown XML elements are stored and returned when building the XML for an entry
+* ETag support for entries and feeds
+* Added a Google Contacts service
+
+API changes:
+* Added GDataEntry:etag, gdata_entry_get_etag
+* Added gdata_entry_get_categories
+* Added GDataFeed:etag, gdata_feed_get_etag
+* Added gdata_feed_look_up_entry
+* Added GDataGDWhen, gdata_gd_when_new, gdata_gd_when_free
+* Added GDataGDEmailAddress, gdata_gd_email_address_new, gdata_gd_email_address_free
+* Added GDataGDIMAddress, gdata_gd_im_address_new, gdata_gd_im_address_free
+* Added GDataGDPhoneNumber, gdata_gd_phone_number_new, gdata_gd_phone_number_free
+* Added GDataGDPostalAddress, gdata_gd_postal_address_new, gdata_gd_postal_address_free
+* Added GDataGDOrganization, gdata_gd_organization_new, gdata_gd_organization_free
+* Added GDataGDReminder, gdata_gd_reminder_new, gdata_gd_reminder_free
+* Renamed GDataQuery:strict to GDataQuery:is-strict, gdata_query_get_strict to gdata_query_is_strict, gdata_query_set_strict to gdata_query_set_is_strict
+* Added GDataQuery:etag, gdata_query_get_etag, gdata_query_set_etag
+* Added GDataService:proxy-uri, gdata_service_get_proxy_uri, gdata_service_set_proxy_uri
+* Added gdata_service_update_entry
+* Added gdata_service_update_entry
+* Removed gdata_service_get_session
+* Renamed GDataCalendarCalendar:hidden to GDataCalendarCalendar:is-hidden, gdata_calendar_calendar_get_hidden to gdata_calendar_calendar_is_hidden,
+ gdata_calendar_calendar_set_hidden to gdata_calendar_calendar_set_is_hidden
+* Renamed GDataCalendarCalendar:selected to GDataCalendarCalendar:is-selected,
+ gdata_calendar_calendar_get_selected to gdata_calendar_calendar_is_selected,
+ gdata_calendar_calendar_set_selected to gdata_calendar_calendar_set_is_selected
+* Renamed GDataCalendarEvent:event-status to GDataCalendarEvent:status, gdata_calendar_event_get_event_status to gdata_calendar_event_get_status,
+ gdata_calendar_event_set_event_status to gdata_calendar_event_set_status
+* Added gdata_calendar_event_get_people
+* Added gdata_calendar_event_get_places
+* Added gdata_calendar_event_add_time, gdata_calendar_event_get_times, gdata_calendar_event_get_primary_time
+* Removed gdata_calendar_event_set_edited
+* Made GDataCalendarEvent:edited read-only
+* Removed gdata_calendar_event_get_start_time, gdata_calendar_event_set_start_time, gdata_calendar_event_get_end_time, gdata_calendar_event_set_end_time,
+ gdata_calendar_event_get_when_value, gdata_calendar_event_set_when_value
+* Renamed GDataCalendarQuery:ctz to GDataCalendarQuery:timezone, gdata_calendar_query_get_ctz to gdata_calendar_query_get_timezone,
+ gdata_calendar_query_set_ctz to gdata_calendar_query_set_timezone
+* Added gdata_calendar_service_insert_event
+* Renamed g_time_val_get_type to gdata_g_time_val_get_type
+* Added Google Contacts service API
+
+Bugs fixed:
+* Bug 579631 – Add G_GNUC_WARN_UNUSED_RESULT to functions
+* Bug 578661 – ETag support
+* Bug 578662 – Support unknown XML elements
+* Bug 578653 – self-test fails to build on glib-2.18.x
+* Bug 578652 – Build failure: missing symbol: gdata_query_param_get_type
+
+Updated translations:
+* de (Mario Blättermann)
+* en_GB (Philip Withnall)
+* sv (Daniel Nylander)
+
+Overview of changes from libgdata 0.1.0 to libgdata 0.1.1
+=========================================================
+
+Major changes:
+* Fixed licencing issues
+* Changed website to http://live.gnome.org/libgdata
+
+API changes:
+* Renamed gdata_entry_lookup_link to gdata_entry_look_up_link
+* Renamed gdata_feed_lookup_link to gdata_feed_look_up_link
+
+Initial release of libgdata 0.1.0
+=================================
+
+Major changes:
+* Create project
+* Add mostly-complete support for YouTube queries and video uploads
+* Add basic and incomplete support for Google Calendar queries
--- /dev/null
+libgdata
+========
+
+libgdata is a GLib-based library for accessing online service APIs using the
+GData protocol --- most notably, Google's services. It provides APIs to access
+the common Google services, and has full asynchronous support.
+
+See the test programs in gdata/tests/ for simple examples of how to use the
+code.
+
+libgdata is API and ABI stable.
+
+Dependencies
+============
+
+ • glib-2.0 ≥ 2.44.0
+ • libxml-2.0
+ • gio-2.0 ≥ 2.44.0
+ • libsoup-2.4 ≥ 2.42.0
+ • liboauth ≥ 0.9.4
+ • json-glib ≥ 0.15.0
+
+If compiling with --enable-gnome (for GNOME support):
+ • gcr-base-3
+ • goa-1.0 ≥ 3.8
+
+If compiling the demos:
+ • gtk+-3.0 ≥ 2.91.2
+
+Environment variables
+=====================
+
+If the environment variable LIBGDATA_DEBUG is set to one of the following
+values, libgdata will give debug output (at various levels):
+ 0: Output no debug messages or network logs
+ 1: Output debug messages, but not network logs
+ 2: Output debug messages and network traffic headers
+ 3: Output debug messages and full network traffic logs, redacting usernames,
+ passwords and auth. tokens
+ 4: Output debug messages and full network traffic logs, and don't redact
+ usernames, passwords and auth. tokens
+If LIBGDATA_DEBUG is unset, no debug output will be produced.
+
+So, to debug a program which uses libgdata, run it from a terminal with the
+following command:
+
+$ LIBGDATA_DEBUG=3 ./my-program-name &> libgdata.log
+
+Deprecation guards
+==================
+
+If LIBGDATA_DISABLE_DEPRECATED is defined when compiling against libgdata, all
+deprecated API will be removed from included headers.
+
+Licensing
+=========
+
+libgdata is licensed under the LGPL; see COPYING for more details.
+
+Contact
+=======
+
+Philip Withnall <philip@tecnocode.co.uk>
+https://wiki.gnome.org/Projects/libgdata
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) 2015 Philip Withnall <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <gdata/gdata.h>
+#include <locale.h>
+#include <string.h>
+
+#define CLIENT_ID "1074795795536-necvslvs0pchk65nf6ju4i6mniogg8fr.apps.googleusercontent.com"
+#define CLIENT_SECRET "8totRi50eo2Zfr3SD2DeNAzo"
+#define REDIRECT_URI "urn:ietf:wg:oauth:2.0:oob"
+
+static int
+print_usage (char *argv[])
+{
+ g_printerr ("%s: Usage — %s <subcommand>\n"
+ "Subcommands:\n"
+ " calendars [--all|--own]\n"
+ " events <calendar ID> [query string]\n"
+ " insert-event <calendar ID> <title> <start time> "
+ "<end time> <attendee 1> [attendee 2 …]\n",
+ argv[0], argv[0]);
+ return -1;
+}
+
+/* Convert a GTimeVal to an ISO 8601 date string (without a time component). */
+static gchar *
+tv_to_iso8601_date (GTimeVal *tv)
+{
+ struct tm *tm;
+
+ tm = gmtime (&tv->tv_sec);
+
+ return g_strdup_printf ("%04d-%02d-%02d",
+ tm->tm_year + 1900,
+ tm->tm_mon + 1,
+ tm->tm_mday);
+}
+
+static void
+print_calendar (GDataCalendarCalendar *calendar)
+{
+ const gchar *id, *title, *time_zone, *access_level, *description;
+ gboolean is_hidden, is_selected;
+
+ id = gdata_entry_get_id (GDATA_ENTRY (calendar));
+ title = gdata_entry_get_title (GDATA_ENTRY (calendar));
+ time_zone = gdata_calendar_calendar_get_timezone (calendar);
+ is_hidden = gdata_calendar_calendar_is_hidden (calendar);
+ is_selected = gdata_calendar_calendar_is_selected (calendar);
+ access_level = gdata_calendar_calendar_get_access_level (calendar);
+ description = gdata_entry_get_summary (GDATA_ENTRY (calendar));
+
+ g_print ("%s — %s\n", id, title);
+ g_print (" Timezone: %s\n", time_zone);
+ g_print (" Access level: %s\n", access_level);
+ g_print (" Hidden? %s\n", is_hidden ? "Yes" : "No");
+ g_print (" Selected? %s\n", is_selected ? "Yes" : "No");
+ g_print (" Description:\n %s\n", description);
+
+ g_print ("\n");
+}
+
+static void
+print_event (GDataCalendarEvent *event)
+{
+ const gchar *title, *id, *description, *status, *visibility;
+ const gchar *transparency, *uid;
+ GTimeVal date_published_tv = { 0, };
+ GTimeVal date_edited_tv = { 0, };
+ gchar *date_published = NULL; /* owned */
+ gchar *date_edited = NULL; /* owned */
+ guint sequence;
+ gboolean guests_can_modify, guests_can_invite_others;
+ gboolean guests_can_see_guests, anyone_can_add_self;
+ GList/*<unowned GDataGDWho>*/ *people; /* unowned */
+ GList/*<unowned GDataGDWhere>*/ *places; /* unowned */
+ GList/*<unowned GDataGDWhen>*/ *times; /* unowned */
+
+ title = gdata_entry_get_title (GDATA_ENTRY (event));
+ id = gdata_entry_get_id (GDATA_ENTRY (event));
+ description = gdata_entry_get_content (GDATA_ENTRY (event));
+ date_published_tv.tv_sec = gdata_entry_get_published (GDATA_ENTRY (event));
+ date_published = g_time_val_to_iso8601 (&date_published_tv);
+ date_edited_tv.tv_sec = gdata_calendar_event_get_edited (event);
+ date_edited = g_time_val_to_iso8601 (&date_edited_tv);
+ status = gdata_calendar_event_get_status (event);
+ visibility = gdata_calendar_event_get_visibility (event);
+ transparency = gdata_calendar_event_get_transparency (event);
+ uid = gdata_calendar_event_get_uid (event);
+ sequence = gdata_calendar_event_get_sequence (event);
+ guests_can_modify = gdata_calendar_event_get_guests_can_modify (event);
+ guests_can_invite_others = gdata_calendar_event_get_guests_can_invite_others (event);
+ guests_can_see_guests = gdata_calendar_event_get_guests_can_see_guests (event);
+ anyone_can_add_self = gdata_calendar_event_get_anyone_can_add_self (event);
+ people = gdata_calendar_event_get_people (event);
+ places = gdata_calendar_event_get_places (event);
+ times = gdata_calendar_event_get_times (event);
+
+ g_print ("%s — %s\n", id, title);
+ g_print (" UID: %s\n", uid);
+ g_print (" Sequence: %u\n", sequence);
+ g_print (" Published: %s\n", date_published);
+ g_print (" Edited: %s\n", date_edited);
+ g_print (" Status: %s\n", status);
+ g_print (" Visibility: %s\n", visibility);
+ g_print (" Transparency: %s\n", transparency);
+ g_print (" Guests can modify event? %s\n",
+ guests_can_modify ? "Yes" : "No");
+ g_print (" Guests can invite others? %s\n",
+ guests_can_invite_others ? "Yes" : "No");
+ g_print (" Guests can see guest list? %s\n",
+ guests_can_see_guests ? "Yes" : "No");
+ g_print (" Anyone can add themselves? %s\n",
+ anyone_can_add_self ? "Yes" : "No");
+ g_print (" Description:\n %s\n", description);
+
+ g_print (" Guests:\n");
+
+ for (; people != NULL; people = people->next) {
+ GDataGDWho *who;
+
+ who = GDATA_GD_WHO (people->data);
+ g_print (" • %s — %s (%s)\n",
+ gdata_gd_who_get_value_string (who),
+ gdata_gd_who_get_email_address (who),
+ gdata_gd_who_get_relation_type (who));
+ }
+
+ g_print (" Locations:\n");
+
+ for (; places != NULL; places = places->next) {
+ GDataGDWhere *where;
+
+ where = GDATA_GD_WHERE (places->data);
+ g_print (" • %s\n", gdata_gd_where_get_value_string (where));
+ }
+
+ g_print (" Times:\n");
+
+ for (; times != NULL; times = times->next) {
+ GDataGDWhen *when;
+ GTimeVal start_time = { 0, }, end_time = { 0, };
+ gchar *start = NULL, *end = NULL; /* owned */
+
+ when = GDATA_GD_WHEN (times->data);
+
+ start_time.tv_sec = gdata_gd_when_get_start_time (when);
+ end_time.tv_sec = gdata_gd_when_get_end_time (when);
+
+ if (gdata_gd_when_is_date (when)) {
+ start = tv_to_iso8601_date (&start_time);
+ end = tv_to_iso8601_date (&end_time);
+ } else {
+ start = g_time_val_to_iso8601 (&start_time);
+ end = g_time_val_to_iso8601 (&end_time);
+ }
+
+ g_print (" • %s to %s (%s)\n",
+ start, end, gdata_gd_when_get_value_string (when));
+
+ /* TODO: Reminders are not supported yet. */
+ }
+
+ g_print ("\n");
+
+ g_free (date_published);
+}
+
+static GDataAuthorizer *
+create_authorizer (GError **error)
+{
+ GDataOAuth2Authorizer *authorizer = NULL; /* owned */
+ gchar *uri = NULL;
+ gchar code[100];
+ GError *child_error = NULL;
+
+ /* Go through the interactive OAuth dance. */
+ authorizer = gdata_oauth2_authorizer_new (CLIENT_ID, CLIENT_SECRET,
+ REDIRECT_URI,
+ GDATA_TYPE_CALENDAR_SERVICE);
+
+ /* Get an authentication URI */
+ uri = gdata_oauth2_authorizer_build_authentication_uri (authorizer,
+ NULL, FALSE);
+
+ /* Wait for the user to retrieve and enter the verifier. */
+ g_print ("Please navigate to the following URI and grant access:\n"
+ " %s\n", uri);
+ g_print ("Enter verifier (EOF to abort): ");
+
+ g_free (uri);
+
+ if (scanf ("%100s", code) != 1) {
+ /* User chose to abort. */
+ g_print ("\n");
+ g_clear_object (&authorizer);
+ return NULL;
+ }
+
+ /* Authorise the token. */
+ gdata_oauth2_authorizer_request_authorization (authorizer, code, NULL,
+ &child_error);
+
+ if (child_error != NULL) {
+ g_propagate_error (error, child_error);
+ g_clear_object (&authorizer);
+ return NULL;
+ }
+
+ return GDATA_AUTHORIZER (authorizer);
+}
+
+/* List all the user’s calendars. */
+static int
+command_calendars (int argc, char *argv[])
+{
+ GDataCalendarService *service = NULL;
+ GDataCalendarQuery *query = NULL;
+ GDataFeed *feed = NULL;
+ GList/*<unowned GDataCalendarCalendar>*/ *entries;
+ GError *error = NULL;
+ gint retval = 0;
+ gboolean only_own; /* only query for calendars the user owns */
+ GDataAuthorizer *authorizer = NULL;
+
+ if (argc < 2) {
+ return print_usage (argv);
+ } else if (argc == 2) {
+ only_own = FALSE;
+ } else if (g_strcmp0 (argv[2], "--all") == 0 ||
+ g_strcmp0 (argv[2], "--own") == 0) {
+ only_own = (g_strcmp0 (argv[2], "--own") == 0);
+ } else {
+ only_own = FALSE;
+ }
+
+ /* Authenticate and create a service. */
+ authorizer = create_authorizer (&error);
+
+ if (error != NULL) {
+ g_printerr ("%s: Error authenticating: %s\n",
+ argv[0], error->message);
+ g_error_free (error);
+ retval = 1;
+ goto done;
+ } else if (authorizer == NULL) {
+ g_printerr ("%s: User chose to abort authentication.\n",
+ argv[0]);
+ retval = 1;
+ goto done;
+ }
+
+ service = gdata_calendar_service_new (authorizer);
+ query = gdata_calendar_query_new (NULL);
+
+ if (only_own) {
+ feed = gdata_calendar_service_query_own_calendars (service,
+ GDATA_QUERY (query),
+ NULL, NULL,
+ NULL,
+ &error);
+ } else {
+ feed = gdata_calendar_service_query_all_calendars (service,
+ GDATA_QUERY (query),
+ NULL, NULL,
+ NULL,
+ &error);
+ }
+
+ if (error != NULL) {
+ g_printerr ("%s: Error querying calendars: %s\n",
+ argv[0], error->message);
+ g_error_free (error);
+ retval = 1;
+ goto done;
+ }
+
+ /* Print results. */
+ for (entries = gdata_feed_get_entries (feed); entries != NULL;
+ entries = entries->next) {
+ GDataCalendarCalendar *calendar;
+
+ calendar = GDATA_CALENDAR_CALENDAR (entries->data);
+ print_calendar (calendar);
+ }
+
+ g_print ("Total of %u results.\n",
+ g_list_length (gdata_feed_get_entries (feed)));
+
+done:
+ g_clear_object (&feed);
+ g_clear_object (&query);
+ g_clear_object (&authorizer);
+ g_clear_object (&service);
+
+ return retval;
+}
+
+/* Query the events in a calendar. */
+static int
+command_events (int argc, char *argv[])
+{
+ GDataCalendarService *service = NULL;
+ GDataCalendarCalendar *calendar = NULL;
+ GDataCalendarQuery *query = NULL;
+ GError *error = NULL;
+ gint retval = 0;
+ const gchar *query_string, *calendar_id;
+ GDataAuthorizer *authorizer = NULL;
+ guint n_results;
+
+ if (argc < 3) {
+ return print_usage (argv);
+ }
+
+ calendar_id = argv[2];
+ query_string = (argc > 3) ? argv[3] : NULL;
+
+ /* Authenticate and create a service. */
+ authorizer = create_authorizer (&error);
+
+ if (error != NULL) {
+ g_printerr ("%s: Error authenticating: %s\n",
+ argv[0], error->message);
+ g_error_free (error);
+ retval = 1;
+ goto done;
+ } else if (authorizer == NULL) {
+ g_printerr ("%s: User chose to abort authentication.\n",
+ argv[0]);
+ retval = 1;
+ goto done;
+ }
+
+ service = gdata_calendar_service_new (authorizer);
+ query = gdata_calendar_query_new (query_string);
+ gdata_query_set_max_results (GDATA_QUERY (query), 10);
+ calendar = gdata_calendar_calendar_new (calendar_id);
+ n_results = 0;
+
+ while (TRUE) {
+ GList/*<unowned GDataCalendarEvent>*/ *entries, *l;
+ GDataFeed *feed = NULL;
+
+ feed = gdata_calendar_service_query_events (service, calendar,
+ GDATA_QUERY (query), NULL,
+ NULL, NULL, &error);
+
+ if (error != NULL) {
+ g_printerr ("%s: Error querying events: %s\n",
+ argv[0], error->message);
+ g_error_free (error);
+ retval = 1;
+ goto done;
+ }
+
+ /* Print results. */
+ entries = gdata_feed_get_entries (feed);
+
+ if (entries == NULL) {
+ retval = 0;
+ g_object_unref (feed);
+ goto done;
+ }
+
+ for (l = entries; l != NULL; l = l->next) {
+ GDataCalendarEvent *event;
+
+ event = GDATA_CALENDAR_EVENT (l->data);
+ print_event (event);
+ n_results++;
+ }
+
+ gdata_query_next_page (GDATA_QUERY (query));
+ g_object_unref (feed);
+ }
+
+ g_print ("Total of %u results.\n", n_results);
+
+done:
+ g_clear_object (&query);
+ g_clear_object (&authorizer);
+ g_clear_object (&calendar);
+ g_clear_object (&service);
+
+ return retval;
+}
+
+/* Insert a new event into a calendar. */
+static int
+command_insert_event (int argc, char *argv[])
+{
+ GDataCalendarService *service = NULL;
+ GDataCalendarCalendar *calendar = NULL;
+ GDataCalendarEvent *event = NULL;
+ GDataCalendarEvent *inserted_event = NULL;
+ GError *error = NULL;
+ gint retval = 0;
+ const gchar *calendar_id, *title, *start, *end;
+ GDataAuthorizer *authorizer = NULL;
+ GDataGDWhen *when = NULL;
+ gboolean is_date;
+ gchar *start_with_time = NULL, *end_with_time = NULL;
+ GTimeVal start_tv = { 0, }, end_tv = { 0, };
+ gint i;
+
+ if (argc < 7) {
+ return print_usage (argv);
+ }
+
+ calendar_id = argv[2];
+ title = argv[3];
+ start = argv[4];
+ end = argv[5];
+ /* subsequent arguments are e-mail addresses of attendees,
+ * with at least one required. */
+
+ /* Authenticate and create a service. */
+ authorizer = create_authorizer (&error);
+
+ if (error != NULL) {
+ g_printerr ("%s: Error authenticating: %s\n",
+ argv[0], error->message);
+ g_error_free (error);
+ retval = 1;
+ goto done;
+ } else if (authorizer == NULL) {
+ g_printerr ("%s: User chose to abort authentication.\n",
+ argv[0]);
+ retval = 1;
+ goto done;
+ }
+
+ service = gdata_calendar_service_new (authorizer);
+ calendar = gdata_calendar_calendar_new (calendar_id);
+
+ /* Create the event to insert. */
+ event = gdata_calendar_event_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (event), title);
+
+ start_with_time = g_strconcat (start, "T00:00:00Z", NULL);
+ end_with_time = g_strconcat (end, "T00:00:00Z", NULL);
+
+ if (g_time_val_from_iso8601 (start, &start_tv) &&
+ g_time_val_from_iso8601 (end, &end_tv)) {
+ /* Includes time. */
+ is_date = FALSE;
+ } else if (g_time_val_from_iso8601 (start_with_time, &start_tv) &&
+ g_time_val_from_iso8601 (end_with_time, &end_tv)) {
+ /* Does not include time. */
+ is_date = TRUE;
+ } else {
+ g_printerr ("%s: Could not parse start time ‘%s’ and end time "
+ "‘%s’ as ISO 8601.\n", argv[0], start, end);
+ retval = 1;
+ goto done;
+ }
+
+ when = gdata_gd_when_new (start_tv.tv_sec, end_tv.tv_sec, is_date);
+ gdata_calendar_event_add_time (event, when);
+ g_object_unref (when);
+
+ for (i = 6; i < argc; i++) {
+ GDataGDWho *who = NULL;
+ const gchar *relation_type, *email_address;
+
+ relation_type = GDATA_GD_WHO_EVENT_ATTENDEE;
+ email_address = argv[i];
+
+ who = gdata_gd_who_new (relation_type, NULL, email_address);
+ gdata_calendar_event_add_person (event, who);
+ g_object_unref (who);
+ }
+
+ /* Insert the event. */
+ inserted_event = gdata_calendar_service_insert_calendar_event (service,
+ calendar,
+ event,
+ NULL,
+ &error);
+
+ if (error != NULL) {
+ g_printerr ("%s: Error inserting event: %s\n",
+ argv[0], error->message);
+ g_error_free (error);
+ retval = 1;
+ goto done;
+ }
+
+ /* Print results. */
+ print_event (inserted_event);
+
+done:
+ g_free (start_with_time);
+ g_free (end_with_time);
+ g_clear_object (&inserted_event);
+ g_clear_object (&event);
+ g_clear_object (&authorizer);
+ g_clear_object (&calendar);
+ g_clear_object (&service);
+
+ return retval;
+}
+
+static const struct {
+ const gchar *command;
+ int (*handler_fn) (int argc, char **argv);
+} command_handlers[] = {
+ { "calendars", command_calendars },
+ { "events", command_events },
+ { "insert-event", command_insert_event },
+};
+
+int
+main (int argc, char *argv[])
+{
+ guint i;
+ gint retval = -1;
+
+ setlocale (LC_ALL, "");
+
+ if (argc < 2) {
+ return print_usage (argv);
+ }
+
+ for (i = 0; i < G_N_ELEMENTS (command_handlers); i++) {
+ if (strcmp (argv[1], command_handlers[i].command) == 0) {
+ retval = command_handlers[i].handler_fn (argc, argv);
+ }
+ }
+
+ if (retval == -1) {
+ retval = print_usage (argv);
+ }
+
+ return retval;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) 2014 Debarshi Ray <rishi.is@lostca.se>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * Simple example program to list all documents in the user’s Google Documents
+ * account, retrieving the account information from GOA.
+ */
+
+#include <gio/gio.h>
+#include <glib.h>
+#include <locale.h>
+
+#define GOA_API_IS_SUBJECT_TO_CHANGE
+#include <gdata/gdata.h>
+#include <goa/goa.h>
+
+gint
+main (void)
+{
+ GDataDocumentsFeed *feed = NULL;
+ GDataDocumentsQuery *query = NULL;
+ GDataDocumentsService *service = NULL;
+ GError *error = NULL;
+ GList *accounts = NULL;
+ GList *entries;
+ GList *l;
+ GoaClient *client = NULL;
+ gint retval;
+
+ setlocale (LC_ALL, "");
+
+ client = goa_client_new_sync (NULL, &error);
+ if (error != NULL) {
+ g_warning ("%s", error->message);
+ g_error_free (error);
+ retval = 1;
+ goto out;
+ }
+
+ accounts = goa_client_get_accounts (client);
+ for (l = accounts; l != NULL; l = l->next) {
+ GoaAccount *account;
+ GoaObject *object = GOA_OBJECT (l->data);
+ const gchar *provider_type;
+
+ account = goa_object_peek_account (object);
+ provider_type = goa_account_get_provider_type (account);
+
+ if (g_strcmp0 (provider_type, "google") == 0) {
+ GDataGoaAuthorizer *authorizer;
+
+ authorizer = gdata_goa_authorizer_new (object);
+ service = gdata_documents_service_new (GDATA_AUTHORIZER (authorizer));
+ g_object_unref (authorizer);
+ }
+ }
+
+ if (service == NULL) {
+ g_warning ("Account not found");
+ retval = 1;
+ goto out;
+ }
+
+ query = gdata_documents_query_new_with_limits (NULL, 1, 10);
+ gdata_documents_query_set_show_folders (query, TRUE);
+
+ while (TRUE) {
+ feed = gdata_documents_service_query_documents (service, query, NULL, NULL, NULL, &error);
+ if (error != NULL) {
+ g_warning ("%s", error->message);
+ g_error_free (error);
+ retval = 1;
+ goto out;
+ }
+
+ entries = gdata_feed_get_entries (GDATA_FEED (feed));
+ if (entries == NULL) {
+ retval = 0;
+ goto out;
+ }
+
+ for (l = entries; l != NULL; l = l->next) {
+ GDataEntry *entry = GDATA_ENTRY (l->data);
+ const gchar *title;
+
+ title = gdata_entry_get_title (entry);
+ g_message ("%s", title);
+ }
+
+ gdata_query_next_page (GDATA_QUERY (query));
+ g_object_unref (feed);
+ }
+
+ retval = 0;
+
+out:
+ g_clear_object (&feed);
+ g_clear_object (&query);
+ g_clear_object (&service);
+ g_clear_object (&client);
+ g_list_free_full (accounts, g_object_unref);
+
+ return retval;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) 2019 Mayank Sharma <mayank8019@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * Simple example program to fetch a list of all the files from a user's Google Drive,
+ * then set the documents property and finally remove those set properties.
+ *
+ * This program is just meant to show how to set/get/remove GDataDocumentsProperty
+ * , i.e. the Property Resource on a file.
+ */
+
+#include <gio/gio.h>
+#include <glib.h>
+#include <locale.h>
+
+#define GOA_API_IS_SUBJECT_TO_CHANGE
+#include <gdata/gdata.h>
+#include <goa/goa.h>
+
+#define SET_DUMMY_PROPERTIES TRUE
+
+static void print_documents_properties (GDataDocumentsEntry *entry);
+static void set_dummy_properties (GDataDocumentsEntry *entry);
+static void unset_dummy_properties (GDataDocumentsEntry *entry);
+static gboolean is_owner (GDataService *service, GDataEntry *entry);
+
+static void test_dummy_properties (GDataDocumentsService *service, gboolean set, GCancellable *cancellable, GError **error);
+
+/* FIXME: Work around https://gitlab.gnome.org/GNOME/gnome-online-accounts/issues/73 */
+typedef GoaObject AutoGoaObject;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(AutoGoaObject, g_object_unref)
+
+gint
+main (void)
+{
+ g_autoptr(GDataDocumentsService) service = NULL;
+ g_autoptr(GError) error = NULL;
+ g_autolist(AutoGoaObject) accounts = NULL;
+ GList *l = NULL;
+ g_autoptr(GoaClient) client = NULL;
+ gint retval = 0;
+
+ setlocale (LC_ALL, "");
+
+ client = goa_client_new_sync (NULL, &error);
+ if (error != NULL) {
+ g_warning ("%s", error->message);
+ return 1;
+ }
+
+ accounts = goa_client_get_accounts (client);
+ for (l = accounts; l != NULL; l = l->next) {
+ GoaAccount *account;
+ GoaObject *object = GOA_OBJECT (l->data);
+ const gchar *provider_type, *account_identity;
+
+ account = goa_object_peek_account (object);
+ provider_type = goa_account_get_provider_type (account);
+ account_identity = goa_account_get_identity (account);
+
+ if (g_strcmp0 (provider_type, "google") == 0) {
+ g_autoptr(GDataGoaAuthorizer) authorizer = NULL;
+
+ authorizer = gdata_goa_authorizer_new (object);
+ service = gdata_documents_service_new (GDATA_AUTHORIZER (authorizer));
+
+ if (service == NULL) {
+ g_warning ("Account not found");
+ retval = 1;
+ continue;
+ }
+
+ g_message ("Setting dummy properties on the files owned by user - %s", account_identity);
+ test_dummy_properties (service, SET_DUMMY_PROPERTIES, NULL, &error);
+ if (error != NULL) {
+ g_warning ("Error: %s", error->message);
+ retval = 1;
+ continue;
+ }
+
+ g_message ("Removing dummy properties from the files owned by user - %s", account_identity);
+ test_dummy_properties (service, !SET_DUMMY_PROPERTIES, NULL, &error);
+ if (error != NULL) {
+ g_warning ("Error: %s", error->message);
+ retval = 1;
+ continue;
+ }
+ }
+ }
+
+ return retval;
+}
+
+static void
+test_dummy_properties (GDataDocumentsService *service, gboolean set, GCancellable *cancellable, GError **error)
+{
+ g_autoptr(GDataDocumentsQuery) query = NULL;
+ g_autoptr(GDataDocumentsFeed) feed = NULL;
+ g_autoptr(GError) child_error = NULL;
+ GList *entries;
+ GList *l;
+
+ query = gdata_documents_query_new_with_limits (NULL, 1, 10);
+ gdata_documents_query_set_show_folders (query, TRUE);
+
+ /* Since our query supports fetching 10 results in one go, we just
+ * perform fetch a single page of query. You can use pagination here
+ * and call gdata_query_next_page (GDATA_QUERY (query)) inside a while
+ * loop to set/unset properties on all the files.
+ * */
+ feed = gdata_documents_service_query_documents (service, query, NULL, NULL, NULL, &child_error);
+ if (child_error != NULL) {
+ g_propagate_error (error, g_steal_pointer (&child_error));
+ return;
+ }
+
+ entries = gdata_feed_get_entries (GDATA_FEED (feed));
+ if (entries == NULL) {
+ return;
+ }
+
+ for (l = entries; l != NULL; l = l->next) {
+ const gchar *title;
+ g_autoptr(GDataEntry) new_entry = NULL;
+ GDataEntry *entry = GDATA_ENTRY (l->data);
+
+ title = gdata_entry_get_title (entry);
+ g_message ("File = %s, id = %s", title, gdata_entry_get_id (GDATA_ENTRY (entry)));
+
+ if (!is_owner (GDATA_SERVICE (service), entry)) {
+ g_message ("\t**NOT OWNED**");
+ continue;
+ }
+
+ if (set) {
+ set_dummy_properties (GDATA_DOCUMENTS_ENTRY (entry));
+ } else {
+ unset_dummy_properties (GDATA_DOCUMENTS_ENTRY (entry));
+ }
+
+ new_entry = gdata_service_update_entry (GDATA_SERVICE (service),
+ gdata_documents_service_get_primary_authorization_domain(),
+ entry,
+ NULL,
+ &child_error);
+
+ if (child_error != NULL) {
+ g_propagate_error (error, g_steal_pointer (&child_error));
+ return;
+ }
+
+ print_documents_properties (GDATA_DOCUMENTS_ENTRY (new_entry));
+ }
+}
+
+static gboolean
+is_owner (GDataService *service, GDataEntry *entry) {
+ GList *l;
+ GDataGoaAuthorizer *goa_authorizer;
+ GoaAccount *account;
+ const gchar *account_identity;
+
+ goa_authorizer = GDATA_GOA_AUTHORIZER (gdata_service_get_authorizer (service));
+ account = goa_object_peek_account (gdata_goa_authorizer_get_goa_object (goa_authorizer));
+ account_identity = goa_account_get_identity (account);
+
+ for (l = gdata_entry_get_authors (entry); l != NULL; l = l->next) {
+ GDataAuthor *author = GDATA_AUTHOR (l->data);
+
+ if (g_strcmp0 (gdata_author_get_email_address (author), account_identity) == 0) {
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
+static void
+print_documents_properties (GDataDocumentsEntry *entry)
+{
+ GList *l, *properties;
+
+ g_return_if_fail (GDATA_IS_DOCUMENTS_ENTRY (entry));
+
+ properties = gdata_documents_entry_get_document_properties (GDATA_DOCUMENTS_ENTRY (entry));
+ for (l = properties; l != NULL; l = l->next) {
+ GDataDocumentsProperty *property = GDATA_DOCUMENTS_PROPERTY (l->data);
+
+ g_message ("\tkey = %s, value = %s, %s",
+ gdata_documents_property_get_key (GDATA_DOCUMENTS_PROPERTY (property)),
+ gdata_documents_property_get_value (GDATA_DOCUMENTS_PROPERTY (property)),
+ gdata_documents_property_get_visibility (GDATA_DOCUMENTS_PROPERTY (property))
+ );
+ }
+
+}
+
+static void
+set_dummy_properties (GDataDocumentsEntry *entry)
+{
+ g_autoptr(GDataDocumentsProperty) p1 = NULL, p2 = NULL, p3 = NULL, p4 = NULL;
+
+ p1 = gdata_documents_property_new ("1");
+ gdata_documents_property_set_visibility (p1, GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PUBLIC);
+ gdata_documents_property_set_value (p1, "ONE");
+ gdata_documents_entry_add_documents_property (entry, p1);
+
+ p2 = gdata_documents_property_new ("2");
+ gdata_documents_property_set_visibility (p2, GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PRIVATE);
+ gdata_documents_property_set_value (p2, "TWO");
+ gdata_documents_entry_add_documents_property (entry, p2);
+
+ p3 = gdata_documents_property_new ("3");
+ gdata_documents_property_set_visibility (p3, GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PUBLIC);
+ gdata_documents_entry_add_documents_property (entry, p3);
+
+ p4 = gdata_documents_property_new ("4");
+ gdata_documents_property_set_visibility (p4, GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PRIVATE);
+ gdata_documents_entry_add_documents_property (entry, p4);
+}
+
+static void
+unset_dummy_properties (GDataDocumentsEntry *entry)
+{
+ g_autoptr(GDataDocumentsProperty) p1 = NULL, p2 = NULL, p3 = NULL, p4 = NULL;
+
+ p1 = gdata_documents_property_new ("1");
+ gdata_documents_property_set_visibility (p1, GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PUBLIC);
+ gdata_documents_entry_remove_documents_property (entry, p1);
+
+ p2 = gdata_documents_property_new ("2");
+ gdata_documents_property_set_visibility (p2, GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PRIVATE);
+ gdata_documents_entry_remove_documents_property (entry, p2);
+
+ p3 = gdata_documents_property_new ("3");
+ gdata_documents_property_set_visibility (p3, GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PUBLIC);
+ gdata_documents_entry_remove_documents_property (entry, p3);
+
+ p4 = gdata_documents_property_new ("4");
+ gdata_documents_property_set_visibility (p4, GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PRIVATE);
+ gdata_documents_entry_remove_documents_property (entry, p4);
+}
--- /dev/null
+demos_c_args = [
+ '-DLIBGDATA_DISABLE_DEPRECATED',
+]
+
+# demos = [subdir, executable name, custom objects (for sources)]
+demos = [
+ ['calendar', 'calendar-cli', {'sources': 'calendar/calendar-cli.c'}],
+ ['tasks', 'task-cli', {'sources': 'tasks/tasks-cli.c'}],
+ ['youtube', 'youtube-cli', {'sources': 'youtube/youtube-cli.c'}],
+]
+
+if enable_goa
+ demos += [
+ ['docs-list', 'docs-list', {'sources': 'docs-list/docs-list.c'}],
+ ['docs-property', 'docs-property', {'sources': 'docs-property/docs-property.c'}]
+ ]
+endif
+
+if gtk_dep.found()
+ demos += [['scrapbook', 'scrapbook', {'sources': 'scrapbook/scrapbook.c', 'dependencies': [gtk_dep]}]]
+endif
+
+foreach demo: demos
+ kwargs = demo[2] + {'dependencies': [libgdata_dep] + demo[2].get('dependencies', [])}
+
+ executable(
+ demo[1],
+ c_args: demos_c_args + common_c_args + ['-DG_LOG_DOMAIN="@0@"'.format(demo[1])],
+ include_directories: top_inc_dir,
+ kwargs: kwargs,
+ )
+endforeach
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Joe Cortes 2010 <escozzia@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * This is an extremely simple example program to query youtube videos
+ * and picasa pictures and add them to a grid.
+ * It was coded as part of the 2010 Google Code-In.
+ * Click on Properties to change the window's title, or authenticate
+ * yourself (it's assumed that your google and picasa ids are the same)
+ * It's also possible to upload files to picasa.
+ * Since this is only an example, intended to serve as documentation,
+ * it's probably full of bugs and a couple of awful programming practices.
+ * The program itself is of no practical use, but it does what it is
+ * meant to do and doesn't segfault randomly (I hope so :p).
+ */
+
+#include "scrapbook.h"
+
+static void
+open_in_web_browser (GtkWidget *widget, gchar *uri) /* quicky wrapper for gtk_show_uri */
+{
+ gtk_show_uri_on_window (GTK_WINDOW (gtk_widget_get_toplevel (widget)), uri, GDK_CURRENT_TIME, NULL);
+}
+
+static void
+picture_selected (GtkTreeView *tree, GtkTreePath *path, GtkTreeViewColumn *column, ScrapPicSearch *self)
+{
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ GDataEntry *pic;
+ GdkPixbuf *thumbnail;
+ GtkWidget *button;
+ GtkWidget *image;
+
+ pic = g_slice_new (GDataEntry);
+ model = gtk_tree_view_get_model (tree);
+ gtk_tree_model_get_iter (model, &iter, path);
+ gtk_tree_model_get (model, &iter, COL_PIXBUF, &(thumbnail), P_COL_PIC, &(pic), -1);
+ gtk_widget_destroy (self->search_data->window);
+ gtk_list_store_append (self->main_data->lStore, &iter);
+ gtk_list_store_set (self->main_data->lStore, &iter,
+ ORIG_COL_PIXBUF, thumbnail,
+ ORIG_COL_TITLE, gdata_entry_get_title (pic),
+ ORIG_COL_ENTRY, pic, -1);
+ if (self->main_data->currentRow[self->main_data->currentCol] > self->main_data->max_rows) {
+ self->main_data->currentCol++;
+ self->main_data->currentRow[self->main_data->currentCol] = 0;
+ }
+ image = gtk_image_new_from_pixbuf (thumbnail);
+ button = gtk_button_new ();
+ self->file = GDATA_PICASAWEB_FILE (pic);
+ gtk_widget_show (image);
+ gtk_container_add (GTK_CONTAINER (button), image);
+ /*g_signal_connect (button, "clicked", G_CALLBACK (open_in_web_browser), gdata_entry_get_id (pic));
+ * commented out, I can't seem to find anything that will give me a picture's URI */
+
+ gtk_grid_attach (GTK_GRID (self->main_data->grid), button,
+ self->main_data->currentCol,
+ self->main_data->currentRow[self->main_data->currentCol],
+ 1, 1);
+
+ gtk_widget_show (button);
+ self->main_data->currentRow[self->main_data->currentCol]++;
+}
+
+
+
+static void
+video_selected (GtkTreeView *tree, GtkTreePath *path, GtkTreeViewColumn *column, ScrapYTSearch *self)
+{
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ GDataEntry *video;
+ GdkPixbuf *thumbnail;
+ GtkWidget *button;
+ GtkWidget *image;
+ video = g_slice_new (GDataEntry);
+ model = gtk_tree_view_get_model (tree);
+ gtk_tree_model_get_iter (model, &iter, path);
+ gtk_tree_model_get (model, &iter, COL_PIXBUF, &(thumbnail), COL_VIDEO, &(video), -1);
+ gtk_widget_destroy (self->window);
+ gtk_list_store_append (self->main_data->lStore, &iter);
+ gtk_list_store_set (self->main_data->lStore, &iter,
+ ORIG_COL_PIXBUF, thumbnail,
+ ORIG_COL_TITLE, gdata_entry_get_title (video),
+ ORIG_COL_ENTRY, video, -1);
+ if (self->main_data->currentRow[self->main_data->currentCol] > self->main_data->max_rows) {
+ self->main_data->currentCol++;
+ self->main_data->currentRow[self->main_data->currentCol] = 0;
+ }
+ image = gtk_image_new_from_pixbuf (thumbnail);
+ button = gtk_button_new ();
+ gtk_widget_show (image);
+ gtk_container_add (GTK_CONTAINER (button), image);
+ g_signal_connect (button, "clicked", G_CALLBACK (open_in_web_browser),
+ (gpointer) gdata_youtube_video_get_player_uri (GDATA_YOUTUBE_VIDEO (video)));
+
+ gtk_grid_attach (GTK_GRID (self->main_data->grid), button,
+ self->main_data->currentCol,
+ self->main_data->currentRow[self->main_data->currentCol],
+ 1, 1);
+
+ gtk_widget_show (button);
+ self->main_data->currentRow[self->main_data->currentCol]++;
+}
+
+static void
+p_display_tree (ScrapPicSearch *self)
+{
+ GtkCellRenderer *renderer;
+ GtkWidget *scrollWin;
+ scrollWin = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(scrollWin), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
+
+ renderer = gtk_cell_renderer_pixbuf_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (self->tView), -1,
+ "", renderer, "pixbuf",
+ P_COL_PIXBUF, NULL);
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (self->tView), -1,
+ "", renderer, "text",
+ P_COL_USER, NULL);
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (self->tView), -1,
+ "", renderer, "text",
+ P_COL_TITLE, NULL);
+
+ gtk_tree_view_set_model (GTK_TREE_VIEW (self->tView), GTK_TREE_MODEL (self->lStore));
+ gtk_container_add (GTK_CONTAINER (scrollWin), self->tView);
+
+ g_signal_connect (self->tView, "row-activated", G_CALLBACK (picture_selected), self);
+
+ gtk_widget_show (self->tView);
+ gtk_widget_show (scrollWin);
+ gtk_box_pack_start (GTK_BOX(self->search_data->box1), scrollWin, TRUE, TRUE, 2);
+}
+
+
+static void
+yt_display_tree (ScrapYTSearch *self)
+{
+ GtkCellRenderer *renderer;
+ GtkWidget *scrollWin;
+ scrollWin = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(scrollWin), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
+ renderer = gtk_cell_renderer_pixbuf_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (self->tView), -1,
+ "", renderer, "pixbuf",
+ COL_PIXBUF, NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (self->tView), -1,
+ "", renderer, "text",
+ COL_TITLE, NULL);
+ gtk_tree_view_set_model (GTK_TREE_VIEW (self->tView), GTK_TREE_MODEL (self->lStore));
+ gtk_container_add (GTK_CONTAINER (scrollWin), self->tView);
+ g_signal_connect (self->tView, "row-activated", G_CALLBACK (video_selected), self);
+ gtk_widget_show (self->tView);
+ gtk_widget_show (scrollWin);
+ gtk_box_pack_start (GTK_BOX(self->box1), scrollWin, TRUE, TRUE, 2);
+}
+
+GDataMediaThumbnail *
+choose_best_thumbnail (GList *thumbnails, gint ideal_size)
+{
+ gint delta = G_MININT;
+ GDataMediaThumbnail *thumbnail = NULL;
+ for (; thumbnails != NULL; thumbnails = thumbnails->next) {
+ gint new_delta;
+ GDataMediaThumbnail *current = (GDataMediaThumbnail *) thumbnails->data;
+ new_delta = gdata_media_thumbnail_get_width (current) - ideal_size;
+ if (delta == 0) {
+ break;
+ } else if ((delta == G_MININT)
+ || (delta < 0 && new_delta > delta)
+ || (delta > 0 && new_delta < delta)) {
+ delta = new_delta;
+ thumbnail = current;
+ }
+ }
+ return thumbnail;
+}
+
+static void
+find_pictures (GDataEntry *entry, guint entry_key, guint entry_count, ScrapPicSearch *self)
+{
+ GtkTreeIter iter;
+ GList *thumbnails;
+ GDataMediaThumbnail *thumbnail;
+ GFileInputStream *input_stream;
+
+ gtk_list_store_append (self->lStore, &iter);
+ gtk_list_store_set (self->lStore, &iter,
+ P_COL_PIXBUF, NULL,
+ P_COL_TITLE, self->title,
+ P_COL_USER, self->user,
+ P_COL_PIC, entry, -1);
+ thumbnails = gdata_picasaweb_file_get_thumbnails (GDATA_PICASAWEB_FILE (entry));
+ thumbnail = choose_best_thumbnail (thumbnails, THUMBNAIL_WIDTH);
+ if (thumbnail != NULL) {
+ GFile *thumbnail_file;
+ thumbnail_file = g_file_new_for_uri (gdata_media_thumbnail_get_uri (thumbnail));
+ input_stream = g_file_read (thumbnail_file, NULL, NULL);
+ self->thumbnail = gdk_pixbuf_new_from_stream_at_scale (G_INPUT_STREAM (input_stream), THUMBNAIL_WIDTH, -1,
+ TRUE, NULL, NULL);
+ gtk_list_store_set (self->lStore, &iter, P_COL_PIXBUF, self->thumbnail, -1); /* we can now set the thumbnail ;) */
+ g_object_unref (thumbnail_file);
+ }
+ gdata_query_set_q (self->query, NULL);
+}
+
+
+static void
+p_query_element (GDataEntry *entry, guint entry_key, guint entry_count, ScrapPSearch *self)
+{
+ GError *error=NULL;
+ ScrapPicSearch *picture;
+ GDataFeed *feed;
+
+ picture = self->pic;
+ picture->title = gdata_entry_get_title (entry);
+ picture->query = picture->search_data->query;
+ picture->user = self->user;
+ gdata_query_set_q (picture->query, picture->title);
+ feed = gdata_picasaweb_service_query_files (self->main_data->picasaweb_service, GDATA_PICASAWEB_ALBUM (entry), picture->query, NULL,
+ (GDataQueryProgressCallback) find_pictures, picture, &error);
+
+ if (error != NULL) {
+ g_print ("whoops, somebody raised an error!\n%s", error->message);
+ g_error_free (error);
+ }
+
+ if (feed != NULL) {
+ g_object_unref (feed);
+ }
+}
+
+static void
+p_text_callback (GtkWidget *widget, ScrapPSearch *self)
+{
+ GError *error = NULL;
+ GDataFeed *feed;
+
+ self->user = gtk_entry_get_text (GTK_ENTRY (self->user_entry));
+ self->pic->tView = gtk_tree_view_new ();
+ feed = gdata_picasaweb_service_query_all_albums (self->main_data->picasaweb_service, self->query, self->user, NULL,
+ (GDataQueryProgressCallback) p_query_element, self, &error);
+ if (error != NULL) {
+ g_print ("someone raised an error\n%s\n",error->message);
+ g_error_free (error);
+ }
+
+ if (feed != NULL) {
+ g_object_unref (feed);
+ }
+
+ p_display_tree (self->pic);
+}
+
+
+/* ran as a callback for each individual element queried
+ * it takes the video found, a unique entry_key and entry_count and the data structure as arguments
+ * parts of this function were inspired (or simply taken) from the totem youtube plugin */
+static void
+yt_query_element (GDataEntry *entry, guint entry_key, guint entry_count, ScrapYTSearch *self)
+{
+ GtkTreeIter iter;
+ GList *thumbnails;
+ GDataMediaThumbnail *thumbnail;
+ const gchar *title; /* the video's title */
+ const gchar *uri; /* the video's URI */
+ GFileInputStream *input_stream; /* this will be used to make a pixbuf to store the thumbnail */
+
+ title = gdata_entry_get_title (entry); /* self-explanatory, I hope */
+ uri = gdata_youtube_video_get_player_uri (GDATA_YOUTUBE_VIDEO (entry)); /* ditto */
+ g_print ("%s %s", title, uri);
+ gtk_list_store_append (self->lStore, &iter); /* make a new entry for this vid */
+ gtk_list_store_set (self->lStore, &iter,
+ COL_PIXBUF, NULL, /* this will be set in a few moments */
+ COL_TITLE, title,
+ COL_VIDEO, entry,
+ -1);
+ /* get a GList of thumbnails for the vid */
+ thumbnails = gdata_youtube_video_get_thumbnails (GDATA_YOUTUBE_VIDEO (entry));
+ thumbnail = choose_best_thumbnail (thumbnails, THUMBNAIL_WIDTH);
+ if (thumbnail != NULL) {
+ GFile *thumbnail_file;
+ thumbnail_file = g_file_new_for_uri (gdata_media_thumbnail_get_uri (thumbnail));
+ input_stream = g_file_read (thumbnail_file, NULL, NULL);
+ self->thumbnail = gdk_pixbuf_new_from_stream_at_scale (G_INPUT_STREAM (input_stream), THUMBNAIL_WIDTH, -1,
+ TRUE, NULL, NULL);
+ gtk_list_store_set (self->lStore, &iter, COL_PIXBUF, self->thumbnail, -1); /* we can now set the thumbnail ;) */
+ g_object_unref (thumbnail_file);
+ }
+}
+
+
+static void
+yt_text_callback (GtkWidget *widget, ScrapYTSearch *self)
+{
+ GDataFeed *feed;
+
+ self->txt = gtk_entry_get_text (GTK_ENTRY (self->txt_entry));
+ gdata_query_set_q (self->query, self->txt); /* set the string we'll be searching for in youtube */
+
+ /* do the actual query, running yt_query_element for each object found */
+ feed = gdata_youtube_service_query_videos (self->main_data->youtube_service, self->query, NULL, (GDataQueryProgressCallback) yt_query_element,
+ self, NULL);
+ if (feed != NULL) {
+ g_object_unref (feed);
+ }
+
+ yt_display_tree (self); /* run yt_display_tree to show the results */
+}
+
+
+static void
+start_new_picasa_search (GtkWidget *widget, ScrapData *first)
+{
+ ScrapPSearch *self;
+ ScrapPicSearch *picture;
+ GtkWidget *button, *box2;
+
+ self = first->p_search;
+ picture = first->pic_search;
+ picture->search_data = self;
+ picture->search_data->pic = picture;
+ picture->main_data = self->main_data;
+ g_assert (GDATA_IS_PICASAWEB_SERVICE (first->picasaweb_service));
+ gtk_list_store_clear (self->pic->lStore);
+
+ self->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_resize (GTK_WINDOW (self->window), 400, 400);
+ g_signal_connect (self->window, "destroy", G_CALLBACK (gtk_widget_destroy), NULL);
+ g_signal_connect_swapped (self->window, "delete-event", G_CALLBACK (gtk_widget_destroy), NULL);
+
+ /* our two boxes */
+
+ self->box1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10); /* this box contains everything in our window */
+ gtk_container_add (GTK_CONTAINER (self->window), self->box1);
+ box2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
+
+ /* search bar */
+
+ self->user_entry = gtk_entry_new ();
+ gtk_entry_set_text (GTK_ENTRY (self->user_entry), "User to search for");
+ g_signal_connect (self->user_entry, "activate", (GCallback) p_text_callback, self);
+ gtk_box_pack_start (GTK_BOX(box2), self->user_entry, TRUE, TRUE, 0);
+ gtk_widget_show (self->user_entry);
+
+ /* Search button */
+ button = gtk_button_new_with_mnemonic ("_Search");
+ g_signal_connect (button, "clicked", (GCallback) p_text_callback, self);
+ gtk_box_pack_start (GTK_BOX (box2), button, FALSE, FALSE, 0);
+ gtk_widget_show (button);
+
+ gtk_box_pack_end (GTK_BOX (self->box1), box2, FALSE, FALSE, 0); /* pack the box with the button and search bar */
+ gtk_widget_show (box2);
+
+ gtk_widget_show (self->box1);
+ gtk_widget_show (self->window);
+}
+
+
+
+static void
+start_new_youtube_search (GtkWidget *widget, ScrapData *first) /* *first is a pointer we use to talk to the main window */
+{
+ ScrapYTSearch *self; /* this struct will be used for all the data in the search, if there's time I'll make it into a GObject */
+ GtkWidget *button, *box2;
+
+ self = first->yt_search;
+
+ gtk_list_store_clear (self->lStore); /* clear it out */
+ self->tView = gtk_tree_view_new ();
+ /* window stuff */
+ self->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_resize (GTK_WINDOW (self->window), 400, 400);
+ g_signal_connect (self->window, "destroy", G_CALLBACK (gtk_widget_destroy), NULL);
+ g_signal_connect_swapped (self->window, "delete-event", G_CALLBACK (gtk_widget_destroy), NULL);
+
+ /* our two boxes */
+
+ self->box1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10); /* this box contains everything in our window */
+ gtk_container_add (GTK_CONTAINER (self->window), self->box1);
+ box2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
+
+ /* search bar */
+
+ self->txt_entry = gtk_entry_new ();
+ g_signal_connect (self->txt_entry, "activate", G_CALLBACK (yt_text_callback), self);
+ gtk_box_pack_start (GTK_BOX (box2), self->txt_entry, TRUE, TRUE, 0);
+ gtk_widget_show (self->txt_entry);
+
+ /* Search button */
+ button = gtk_button_new_with_mnemonic ("_Search");
+ g_signal_connect (button, "clicked", (GCallback) yt_text_callback, self);
+ gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
+ gtk_widget_show (button);
+
+ gtk_box_pack_end (GTK_BOX (self->box1), box2, FALSE, FALSE, 0); /* pack the box with the button and search bar */
+
+ gtk_widget_show (box2);
+ gtk_widget_show (self->box1);
+ gtk_widget_show (self->window);
+
+
+ /* everything else is implemented somewhere else */
+}
+
+
+static void
+properties_set (GtkWidget *widget, ScrapProps *self)
+{
+ GDataClientLoginAuthorizer *authorizer;
+ GList *domains = NULL; /* list of GDataAuthorizationDomains */
+ GError *error = NULL;
+
+ /* Get the username and password to use */
+ self->main_data->username = g_strdup (gtk_entry_get_text (GTK_ENTRY (self->username_entry)));
+ self->main_data->password = g_strdup (gtk_entry_get_text (GTK_ENTRY (self->password_entry)));
+
+ /* Domains we need to be authorised for */
+ domains = g_list_prepend (domains, gdata_youtube_service_get_primary_authorization_domain ());
+ domains = g_list_prepend (domains, gdata_picasaweb_service_get_primary_authorization_domain ());
+
+ /* Authenticate */
+ authorizer = gdata_client_login_authorizer_new_for_authorization_domains (CLIENT_ID, domains);
+
+ gdata_client_login_authorizer_authenticate (authorizer, self->main_data->username, self->main_data->password, NULL, &error);
+
+ if (error != NULL) { /* we show this to the user in case they mistyped their password */
+ GtkWidget *label;
+
+ label = gtk_label_new (error->message);
+ gtk_widget_show (label);
+ gtk_box_pack_end (GTK_BOX (self->box1), label, FALSE, FALSE, 0);
+
+ g_print ("error\n%s\n", error->message);
+
+ g_error_free (error);
+ }
+
+ gdata_service_set_authorizer (GDATA_SERVICE (self->main_data->youtube_service), GDATA_AUTHORIZER (authorizer));
+ gdata_service_set_authorizer (GDATA_SERVICE (self->main_data->picasaweb_service), GDATA_AUTHORIZER (authorizer));
+
+ gtk_widget_destroy (self->window);
+ g_object_unref (authorizer);
+}
+
+static void
+properties_show (GtkWidget *widget, ScrapData *first)
+{
+ ScrapProps *self;
+ GtkWidget *label, *button, *box2;
+
+ self = g_slice_new (struct _ScrapProps);
+ self->main_data = first;
+ self->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ g_signal_connect (self->window, "destroy", G_CALLBACK (gtk_widget_destroy), NULL);
+ g_signal_connect (self->window, "delete-event", G_CALLBACK (gtk_widget_destroy), NULL);
+
+ self->box1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
+
+ /* Username/Password labels box */
+ box2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
+
+ label = gtk_label_new ("Username");
+ gtk_widget_show (label);
+ gtk_box_pack_start (GTK_BOX (box2), label, TRUE, TRUE, 0);
+
+ label = gtk_label_new ("Password");
+ gtk_widget_show (label);
+ gtk_box_pack_start (GTK_BOX (box2), label, TRUE, TRUE, 0);
+
+ gtk_widget_show (box2);
+ gtk_box_pack_start (GTK_BOX (self->box1), box2, FALSE, FALSE, 0);
+
+ /* Username/Password entries box */
+ box2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
+ self->username_entry = gtk_entry_new ();
+
+ if (self->main_data->username != NULL)
+ gtk_entry_set_text (GTK_ENTRY(self->username_entry), self->main_data->username);
+
+ gtk_widget_show (self->username_entry);
+ gtk_box_pack_start (GTK_BOX (box2), self->username_entry, TRUE, TRUE, 0);
+
+ self->password_entry = gtk_entry_new ();
+ gtk_entry_set_visibility (GTK_ENTRY (self->password_entry), FALSE);
+
+ if (self->main_data->password != NULL)
+ gtk_entry_set_text (GTK_ENTRY(self->password_entry), self->main_data->password);
+
+ gtk_widget_show (self->password_entry);
+ gtk_box_pack_start (GTK_BOX (box2), self->password_entry, TRUE, TRUE, 0);
+
+ gtk_box_pack_start (GTK_BOX (self->box1), box2, FALSE, FALSE, 0);
+ gtk_widget_show (box2);
+
+ /* OK button */
+ button = gtk_button_new_with_label ("_OK");
+ g_signal_connect (button, "clicked", (GCallback) properties_set, self);
+ gtk_widget_show (button);
+ gtk_box_pack_start (GTK_BOX (self->box1), button, FALSE, FALSE, 0);
+
+ gtk_widget_show (self->box1);
+ gtk_container_add (GTK_CONTAINER (self->window), self->box1);
+ gtk_widget_show (self->window);
+}
+
+static void
+select_file (ScrapPUpload *self, GtkFileChooser *file_chooser)
+{
+ GFile *file;
+ GError *error = NULL;
+ GFileInfo *file_info;
+ GDataUploadStream *upload_stream;
+ GFileInputStream *file_stream;
+
+ file = gtk_file_chooser_get_file (file_chooser);
+
+ file_info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME "," G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
+ G_FILE_QUERY_INFO_NONE, NULL, NULL);
+
+ /* upload our file, using the service we've set up, and metadata
+ * set up in upload ()
+ * no album is specified, but that should be easy to add */
+ upload_stream = gdata_picasaweb_service_upload_file (self->main_data->picasaweb_service, NULL /* for now uploading to drop box */,
+ self->file, g_file_info_get_display_name (file_info),
+ g_file_info_get_content_type (file_info), NULL, &error);
+
+ g_object_unref (file_info);
+ g_object_unref (self->file);
+ self->file = NULL;
+
+ if (error != NULL) {
+ g_print ("Error: %s\n", error->message);
+ g_error_free (error);
+
+ g_object_unref (file);
+
+ return;
+ }
+
+ file_stream = g_file_read (file, NULL, NULL);
+ g_object_unref (file);
+
+ g_output_stream_splice (G_OUTPUT_STREAM (upload_stream), G_INPUT_STREAM (file_stream),
+ G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, NULL, NULL);
+
+ self->file = gdata_picasaweb_service_finish_file_upload (self->main_data->picasaweb_service, upload_stream, NULL);
+
+ g_object_unref (file_stream);
+ g_object_unref (upload_stream);
+}
+
+static void
+got_name (GtkWidget *widget, ScrapData *scrap_data)
+{
+ ScrapPUpload *self;
+ GtkWidget *file_dialog;
+
+ self = scrap_data->p_upload;
+
+ gdata_entry_set_title (GDATA_ENTRY (self->file),
+ gtk_entry_get_text (GTK_ENTRY (self->name)));
+ gdata_entry_set_summary (GDATA_ENTRY (self->file),
+ gtk_entry_get_text (GTK_ENTRY (self->description)));
+ gtk_widget_destroy (self->dialog);
+
+ file_dialog = gtk_file_chooser_dialog_new ("Upload Photo", GTK_WINDOW (scrap_data->window), GTK_FILE_CHOOSER_ACTION_SAVE,
+ "_Cancel", GTK_RESPONSE_CANCEL,
+ "_Open", GTK_RESPONSE_ACCEPT,
+ NULL);
+
+ if (gtk_dialog_run (GTK_DIALOG (file_dialog)) == GTK_RESPONSE_ACCEPT) {
+ select_file (self, GTK_FILE_CHOOSER (file_dialog));
+ }
+
+ /* since the upload blocks, it's safe to assume the widget won't
+ * be destroyed until we're done */
+ gtk_widget_destroy (file_dialog);
+}
+
+static void
+upload (GtkWidget *widget, ScrapData *first)
+{
+ ScrapPUpload *self;
+ GtkWidget *label, *content_area;
+ label = gtk_label_new ("Enter photo name and description");
+ self = first->p_upload;
+
+ /* we make a new file, without an id (it will be assigned automatically later on) */
+ self->file = gdata_picasaweb_file_new (NULL);
+ /* dialog to get the file's name and description */
+ self->dialog = gtk_dialog_new();
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (self->dialog));
+
+ gtk_widget_show (label);
+ gtk_box_pack_start (GTK_BOX (content_area), label, FALSE, FALSE, 0);
+
+ self->name = gtk_entry_new ();
+ g_signal_connect (self->name, "activate", G_CALLBACK (got_name), self);
+ gtk_widget_show (self->name);
+ gtk_box_pack_start (GTK_BOX (content_area), self->name, TRUE, TRUE, 0);
+
+ self->description = gtk_entry_new ();
+ g_signal_connect (self->description, "activate", G_CALLBACK (got_name), first);
+ gtk_widget_show (self->description);
+ gtk_box_pack_start (GTK_BOX (content_area), self->description, TRUE, TRUE, 0);
+
+ gtk_widget_show (self->dialog);
+}
+
+int
+main(int argc, char **argv)
+{
+ ScrapData *scrapbook;
+ ScrapPSearch *picasaSearch;
+ ScrapYTSearch *youtubeSearch;
+ ScrapPicSearch *photoSearch;
+ ScrapPUpload *fUpload;
+ GtkWidget *button;
+ GtkWidget *vbox;
+
+ scrapbook = g_slice_new (struct _ScrapData);
+ scrapbook->max_rows = 5;
+
+ gtk_init (&argc, &argv);
+
+ scrapbook->currentCol = 0;
+ scrapbook->currentRow[scrapbook->currentCol] = 0;
+
+ scrapbook->lStore = gtk_list_store_new (ORIG_N_COLS, GDK_TYPE_PIXBUF, G_TYPE_STRING, GDATA_TYPE_ENTRY);
+ scrapbook->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_title (GTK_WINDOW (scrapbook->window), "Scrapbook");
+ g_signal_connect (scrapbook->window, "destroy", G_CALLBACK (gtk_main_quit), NULL);
+ g_signal_connect (scrapbook->window, "delete-event", G_CALLBACK (gtk_main_quit), NULL);
+
+ youtubeSearch = g_slice_new (struct _ScrapYTSearch); /* get some memory for the structure */
+ youtubeSearch->txt = NULL;
+ scrapbook->yt_search = youtubeSearch;
+ youtubeSearch->main_data = scrapbook;
+ /* create a new query, without any search text, starting at 0, and search only MAX_RESULTS results */
+ youtubeSearch->query = gdata_query_new_with_limits (NULL, 0, MAX_RESULTS);
+ /* create a new youtube service, giving it our developer key; google no longer uses client ids so we send in an empty string (NULL gives an error) */
+ scrapbook->youtube_service = gdata_youtube_service_new (DEVELOPER_KEY, NULL);
+ /* create a new list store and tree to show the user the results
+ * it has three columns (two of which are displayed): a pixbuf for the thumbnail, the title, and the video data itself (as a gdata generic entry) */
+ youtubeSearch->lStore = gtk_list_store_new (N_COLS, GDK_TYPE_PIXBUF, G_TYPE_STRING, GDATA_TYPE_ENTRY);
+
+ picasaSearch = g_slice_new (struct _ScrapPSearch);
+ scrapbook->p_search = picasaSearch;
+ picasaSearch->main_data = scrapbook;
+ picasaSearch->query = gdata_query_new_with_limits (NULL, 0, MAX_RESULTS);
+ scrapbook->picasaweb_service = gdata_picasaweb_service_new (NULL);
+
+ photoSearch = g_slice_new (struct _ScrapPicSearch);
+ scrapbook->p_search->pic = photoSearch;
+ scrapbook->pic_search = photoSearch;
+ photoSearch->lStore = gtk_list_store_new (P_N_COLS, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, GDATA_TYPE_ENTRY);
+
+ fUpload = g_slice_new (struct _ScrapPUpload);
+ scrapbook->p_upload = fUpload;
+ fUpload->main_data = scrapbook;
+
+ scrapbook->box1 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+ scrapbook->grid = gtk_grid_new ();
+
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
+
+ /* Add buttons to the main window */
+ button = gtk_button_new_with_mnemonic ("Add YouTube _Video");
+ g_signal_connect (button, "clicked", (GCallback) start_new_youtube_search, scrapbook);
+ gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
+ gtk_widget_show (button);
+
+ button = gtk_button_new_with_mnemonic ("Add PicasaWeb _Photo");
+ g_signal_connect (button, "clicked", (GCallback) start_new_picasa_search, scrapbook);
+ gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
+ gtk_widget_show (button);
+
+ button = gtk_button_new_with_mnemonic ("P_roperties");
+ g_signal_connect (button, "clicked", (GCallback) properties_show, scrapbook);
+ gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
+ gtk_widget_show (button);
+
+ button = gtk_button_new_with_mnemonic ("_Upload Photo to PicasaWeb");
+ g_signal_connect (button, "clicked", (GCallback) upload, scrapbook);
+ gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
+ gtk_widget_show (button);
+
+ gtk_widget_show (vbox);
+ gtk_box_pack_start (GTK_BOX (scrapbook->box1), vbox, FALSE, FALSE, 5);
+
+ gtk_box_pack_start (GTK_BOX (scrapbook->box1), scrapbook->grid, TRUE, TRUE, 0);
+ gtk_widget_show (scrapbook->grid);
+ gtk_widget_show (scrapbook->box1);
+ gtk_container_add (GTK_CONTAINER (scrapbook->window), scrapbook->box1);
+ gtk_widget_show (scrapbook->window);
+ gtk_main ();
+ return 0;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Joe Cortes 2010 <escozzia@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <gtk/gtk.h>
+#include <gdata/gdata.h>
+#include <glib.h>
+#include <glib-object.h>
+#define DEVELOPER_KEY "AI39si5MkSF-0bzTmP5WETk1D-Z7inHaQJzX13PeG_5Uzeu8mz3vo40cFoqnxjejB-UqzYFrqzOSlsqJvHuPNEGqdycqnPo30A"
+#define CLIENT_ID "ytapi-GNOME-libgdata-444fubtt-0"
+#define THUMBNAIL_WIDTH 180
+#define MAX_RESULTS 10
+
+/* how this works is that there's a struct for every window opened
+ * they contain that individual window's data
+ * and every one of them (except for scrap data, which is for the main window)
+ * has a pointer to the one for the main window called main_data */
+
+enum {
+ COL_PIXBUF,
+ COL_TITLE,
+ COL_VIDEO,
+ N_COLS
+};
+
+enum {
+ P_COL_PIXBUF,
+ P_COL_TITLE,
+ P_COL_USER,
+ P_COL_PIC,
+ P_N_COLS
+};
+
+
+enum {
+ ORIG_COL_PIXBUF,
+ ORIG_COL_TITLE,
+ ORIG_COL_ENTRY,
+ ORIG_N_COLS
+};
+
+typedef struct _ScrapYTSearch ScrapYTSearch;
+typedef struct _ScrapPSearch ScrapPSearch;
+typedef struct _ScrapPUpload ScrapPUpload;
+typedef struct _ScrapPicSearch ScrapPicSearch;
+
+typedef struct _ScrapData {
+ GtkWidget *window;
+ gint currentCol;
+ gint currentRow[5];
+ GtkWidget *box1;
+ GtkWidget *grid;
+ GtkWidget *scrollWindow;
+ ScrapYTSearch *yt_search;
+ ScrapPSearch *p_search;
+ ScrapPicSearch *pic_search;
+ ScrapPUpload *p_upload;
+ gint max_rows;
+ gchar *username;
+ gchar *password;
+ GtkListStore *lStore;
+
+ GDataYouTubeService *youtube_service;
+ GDataPicasaWebService *picasaweb_service;
+} ScrapData;
+struct _ScrapPUpload {
+ ScrapData *main_data;
+ GDataPicasaWebFile *file;
+ GtkWidget *dialog;
+ GtkWidget *name;
+ GtkWidget *description;
+};
+
+struct _ScrapPicSearch { /* for finding pictures */
+ const gchar *title;
+ gchar *uri;
+ const gchar *user;
+ GdkPixbuf *thumbnail;
+ ScrapData *main_data;
+ ScrapPSearch *search_data;
+ GDataQuery *query;
+ GDataPicasaWebFile *file;
+ GtkListStore *lStore;
+ GtkWidget *tView;
+};
+
+struct _ScrapYTSearch { /* youtube search data */
+ GtkWidget *txt_entry;
+ const gchar *txt;
+ GtkWidget *window;
+ GDataQuery *query;
+ gchar *title;
+ gchar *uri;
+ GdkPixbuf *thumbnail;
+ GtkWidget *box1;
+ ScrapData *main_data; /* <- points to a structure containing main vars */
+ GtkListStore *lStore;
+ GtkWidget *tView;
+};
+
+struct _ScrapPSearch { /* for finding albums */
+ GtkWidget *window;
+ GDataQuery *query;
+ gchar *title;
+ gchar *uri;
+ GdkPixbuf *thumbnail;
+ GtkWidget *box1;
+ ScrapData *main_data;
+ GtkWidget *user_entry;
+ const gchar *user;
+ ScrapPicSearch *pic;
+};
+
+typedef struct _ScrapProps {
+ GtkWidget *window;
+ GtkWidget *box1;
+ GtkWidget *username_entry, *password_entry;
+ ScrapData *main_data;
+} ScrapProps;
+
+
+static void
+open_in_web_browser (GtkWidget *widget, gchar *uri);
+
+static void
+picture_selected (GtkTreeView *tree, GtkTreePath *path, GtkTreeViewColumn *column, ScrapPicSearch *self);
+
+static void
+video_selected (GtkTreeView *tree, GtkTreePath *path, GtkTreeViewColumn *column, ScrapYTSearch *self);
+
+static void
+p_display_tree (ScrapPicSearch *self);
+
+static void
+yt_display_tree (ScrapYTSearch *self);
+
+GDataMediaThumbnail *
+choose_best_thumbnail (GList *thumbnails, gint ideal_size);
+
+static void
+find_pictures (GDataEntry *entry, guint entry_key, guint entry_count, ScrapPicSearch *self);
+
+static void
+p_query_element (GDataEntry *entry, guint entry_key, guint entry_count, ScrapPSearch *self);
+
+static void
+p_text_callback (GtkWidget *widget, ScrapPSearch *self);
+
+static void
+yt_query_element (GDataEntry *entry, guint entry_key, guint entry_count, ScrapYTSearch *self);
+
+static void
+yt_text_callback (GtkWidget *widget, ScrapYTSearch *self);
+
+static void
+start_new_picasa_search (GtkWidget *widget, ScrapData *first);
+
+static void
+start_new_youtube_search (GtkWidget *widget, ScrapData *first);
+
+static void
+properties_set (GtkWidget *widget, ScrapProps *self);
+
+static void
+properties_show (GtkWidget *widget, ScrapData *first);
+
+static void
+upload (GtkWidget *widget, ScrapData *first);
+
+
+
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright © 2017 Philip Withnall <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <gdata/gdata.h>
+#include <locale.h>
+#include <string.h>
+
+#define CLIENT_ID "1074795795536-necvslvs0pchk65nf6ju4i6mniogg8fr.apps.googleusercontent.com"
+#define CLIENT_SECRET "8totRi50eo2Zfr3SD2DeNAzo"
+#define REDIRECT_URI "urn:ietf:wg:oauth:2.0:oob"
+
+static int
+print_usage (char *argv[])
+{
+ g_printerr ("%s: Usage — %s <subcommand>\n"
+ "Subcommands:\n"
+ " tasklists\n"
+ " tasks <tasklist ID> [query string]\n",
+ argv[0], argv[0]);
+ return -1;
+}
+
+static void
+print_tasklist (GDataTasksTasklist *tasklist)
+{
+ const gchar *id, *title, *description;
+
+ id = gdata_entry_get_id (GDATA_ENTRY (tasklist));
+ title = gdata_entry_get_title (GDATA_ENTRY (tasklist));
+ description = gdata_entry_get_summary (GDATA_ENTRY (tasklist));
+
+ g_print ("%s — %s\n", id, title);
+ g_print (" Description:\n %s\n", description);
+
+ g_print ("\n");
+}
+
+static const gchar *
+format_status (const gchar *status)
+{
+ if (g_strcmp0 (status, GDATA_TASKS_STATUS_NEEDS_ACTION) == 0)
+ return "needs action";
+ else if (g_strcmp0 (status, GDATA_TASKS_STATUS_COMPLETED) == 0)
+ return "completed";
+ else
+ return status;
+}
+
+static void
+print_task (GDataTasksTask *task)
+{
+ const gchar *title, *id, *description, *parent_id, *position, *notes;
+ const gchar *status;
+ GTimeVal date_published_tv = { 0, };
+ gchar *date_published = NULL; /* owned */
+ GTimeVal due_tv = { 0, };
+ gchar *due = NULL; /* owned */
+ GTimeVal completed_tv = { 0, };
+ gchar *completed = NULL; /* owned */
+ gboolean is_deleted, is_hidden;
+
+ title = gdata_entry_get_title (GDATA_ENTRY (task));
+ id = gdata_entry_get_id (GDATA_ENTRY (task));
+ description = gdata_entry_get_content (GDATA_ENTRY (task));
+ date_published_tv.tv_sec = gdata_entry_get_published (GDATA_ENTRY (task));
+ date_published = g_time_val_to_iso8601 (&date_published_tv);
+ parent_id = gdata_tasks_task_get_parent (task);
+ position = gdata_tasks_task_get_position (task);
+ notes = gdata_tasks_task_get_notes (task);
+ status = gdata_tasks_task_get_status (task);
+ due_tv.tv_sec = gdata_tasks_task_get_due (task);
+ due = g_time_val_to_iso8601 (&due_tv);
+ completed_tv.tv_sec = gdata_tasks_task_get_completed (task);
+ completed = g_time_val_to_iso8601 (&completed_tv);
+ is_deleted = gdata_tasks_task_is_deleted (task);
+ is_hidden = gdata_tasks_task_is_hidden (task);
+
+ g_print ("%s — %s\n", id, title);
+ g_print (" Published: %s\n", date_published_tv.tv_sec != 0 ? date_published : "unknown");
+ g_print (" Status: %s\n", format_status (status));
+ g_print (" Due: %s\n", due_tv.tv_sec != 0 ? due : "not set");
+ g_print (" Completed: %s\n", completed_tv.tv_sec != 0 ? completed : "not yet");
+ g_print (" Deleted? %s\n", is_deleted ? "Yes" : "No");
+ g_print (" Hidden? %s\n", is_hidden ? "Yes" : "No");
+ g_print (" Position: %s\n", position);
+ g_print (" Parent ID: %s\n", parent_id);
+ g_print (" Description:\n %s\n", description);
+ g_print (" Notes:\n %s\n", notes);
+
+ g_print ("\n");
+
+ g_free (completed);
+ g_free (due);
+ g_free (date_published);
+}
+
+/* FIXME: Factor all this code out of all the demos */
+static GDataAuthorizer *
+create_authorizer (GError **error)
+{
+ GDataOAuth2Authorizer *authorizer = NULL; /* owned */
+ gchar *uri = NULL;
+ gchar code[100];
+ GError *child_error = NULL;
+
+ /* Go through the interactive OAuth dance. */
+ authorizer = gdata_oauth2_authorizer_new (CLIENT_ID, CLIENT_SECRET,
+ REDIRECT_URI,
+ GDATA_TYPE_TASKS_SERVICE);
+
+ /* Get an authentication URI */
+ uri = gdata_oauth2_authorizer_build_authentication_uri (authorizer,
+ NULL, FALSE);
+
+ /* Wait for the user to retrieve and enter the verifier. */
+ g_print ("Please navigate to the following URI and grant access:\n"
+ " %s\n", uri);
+ g_print ("Enter verifier (EOF to abort): ");
+
+ g_free (uri);
+
+ if (scanf ("%100s", code) != 1) {
+ /* User chose to abort. */
+ g_print ("\n");
+ g_clear_object (&authorizer);
+ return NULL;
+ }
+
+ /* Authorise the token. */
+ gdata_oauth2_authorizer_request_authorization (authorizer, code, NULL,
+ &child_error);
+
+ if (child_error != NULL) {
+ g_propagate_error (error, child_error);
+ g_clear_object (&authorizer);
+ return NULL;
+ }
+
+ return GDATA_AUTHORIZER (authorizer);
+}
+
+/* List all the user’s task-lists. */
+static int
+command_tasklists (int argc, char *argv[])
+{
+ GDataTasksService *service = NULL;
+ GDataTasksQuery *query = NULL;
+ GDataFeed *feed = NULL;
+ GList/*<unowned GDataTasksTasklist>*/ *entries;
+ GError *error = NULL;
+ gint retval = 0;
+ GDataAuthorizer *authorizer = NULL;
+
+ if (argc != 2) {
+ return print_usage (argv);
+ }
+
+ /* Authenticate and create a service. */
+ authorizer = create_authorizer (&error);
+
+ if (error != NULL) {
+ g_printerr ("%s: Error authenticating: %s\n",
+ argv[0], error->message);
+ g_error_free (error);
+ retval = 1;
+ goto done;
+ } else if (authorizer == NULL) {
+ g_printerr ("%s: User chose to abort authentication.\n",
+ argv[0]);
+ retval = 1;
+ goto done;
+ }
+
+ service = gdata_tasks_service_new (authorizer);
+ query = gdata_tasks_query_new (NULL);
+
+ feed = gdata_tasks_service_query_all_tasklists (service,
+ GDATA_QUERY (query),
+ NULL, NULL,
+ NULL,
+ &error);
+
+ if (error != NULL) {
+ g_printerr ("%s: Error querying tasklists: %s\n",
+ argv[0], error->message);
+ g_error_free (error);
+ retval = 1;
+ goto done;
+ }
+
+ /* Print results. */
+ for (entries = gdata_feed_get_entries (feed); entries != NULL;
+ entries = entries->next) {
+ GDataTasksTasklist *tasklist;
+
+ tasklist = GDATA_TASKS_TASKLIST (entries->data);
+ print_tasklist (tasklist);
+ }
+
+ g_print ("Total of %u results.\n",
+ g_list_length (gdata_feed_get_entries (feed)));
+
+done:
+ g_clear_object (&feed);
+ g_clear_object (&query);
+ g_clear_object (&authorizer);
+ g_clear_object (&service);
+
+ return retval;
+}
+
+/* Query the tasks in a tasklist. */
+static int
+command_tasks (int argc, char *argv[])
+{
+ GDataTasksService *service = NULL;
+ GDataTasksTasklist *tasklist = NULL;
+ GDataTasksQuery *query = NULL;
+ GError *error = NULL;
+ gint retval = 0;
+ const gchar *query_string, *tasklist_id;
+ GDataAuthorizer *authorizer = NULL;
+ guint n_results;
+
+ if (argc < 3) {
+ return print_usage (argv);
+ }
+
+ tasklist_id = argv[2];
+ query_string = (argc > 3) ? argv[3] : NULL;
+
+ /* Authenticate and create a service. */
+ authorizer = create_authorizer (&error);
+
+ if (error != NULL) {
+ g_printerr ("%s: Error authenticating: %s\n",
+ argv[0], error->message);
+ g_error_free (error);
+ retval = 1;
+ goto done;
+ } else if (authorizer == NULL) {
+ g_printerr ("%s: User chose to abort authentication.\n",
+ argv[0]);
+ retval = 1;
+ goto done;
+ }
+
+ service = gdata_tasks_service_new (authorizer);
+ query = gdata_tasks_query_new (query_string);
+ gdata_query_set_max_results (GDATA_QUERY (query), 10);
+ tasklist = gdata_tasks_tasklist_new (tasklist_id);
+ n_results = 0;
+
+ while (TRUE) {
+ GList/*<unowned GDataTasksTask>*/ *entries, *l;
+ GDataFeed *feed = NULL;
+
+ feed = gdata_tasks_service_query_tasks (service, tasklist,
+ GDATA_QUERY (query),
+ NULL, NULL, NULL,
+ &error);
+
+ if (error != NULL) {
+ g_printerr ("%s: Error querying tasks: %s\n",
+ argv[0], error->message);
+ g_error_free (error);
+ retval = 1;
+ goto done;
+ }
+
+ /* Print results. */
+ entries = gdata_feed_get_entries (feed);
+
+ if (entries == NULL) {
+ retval = 0;
+ g_object_unref (feed);
+ break;
+ }
+
+ for (l = entries; l != NULL; l = l->next) {
+ GDataTasksTask *task;
+
+ task = GDATA_TASKS_TASK (l->data);
+ print_task (task);
+ n_results++;
+ }
+
+ gdata_query_next_page (GDATA_QUERY (query));
+ g_object_unref (feed);
+ }
+
+ g_print ("Total of %u results.\n", n_results);
+
+done:
+ g_clear_object (&query);
+ g_clear_object (&authorizer);
+ g_clear_object (&tasklist);
+ g_clear_object (&service);
+
+ return retval;
+}
+
+static const struct {
+ const gchar *command;
+ int (*handler_fn) (int argc, char **argv);
+} command_handlers[] = {
+ { "tasklists", command_tasklists },
+ { "tasks", command_tasks },
+};
+
+int
+main (int argc, char *argv[])
+{
+ guint i;
+ gint retval = -1;
+
+ setlocale (LC_ALL, "");
+
+ if (argc < 2) {
+ return print_usage (argv);
+ }
+
+ for (i = 0; i < G_N_ELEMENTS (command_handlers); i++) {
+ if (strcmp (argv[1], command_handlers[i].command) == 0) {
+ retval = command_handlers[i].handler_fn (argc, argv);
+ }
+ }
+
+ if (retval == -1) {
+ retval = print_usage (argv);
+ }
+
+ return retval;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) 2015 Philip Withnall <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <gdata/gdata.h>
+#include <locale.h>
+#include <string.h>
+
+#define CLIENT_ID "1074795795536-necvslvs0pchk65nf6ju4i6mniogg8fr.apps.googleusercontent.com"
+#define CLIENT_SECRET "8totRi50eo2Zfr3SD2DeNAzo"
+#define REDIRECT_URI "urn:ietf:wg:oauth:2.0:oob"
+#define DEVELOPER_KEY "AIzaSyCENhl8yDxDZbyhTF6p-ok-RefK07xdXUg"
+
+static int
+print_usage (char *argv[])
+{
+ g_printerr ("%s: Usage — %s <subcommand>\n"
+ "Subcommands:\n"
+ " search <query string>\n"
+ " info <video ID>\n"
+ " standard-feed <feed name>\n"
+ " categories\n"
+ " related <video ID>\n"
+ " upload <filename> <title> [description]\n",
+ argv[0], argv[0]);
+ return -1;
+}
+
+static void
+print_video (GDataYouTubeVideo *video)
+{
+ const gchar *title, *player_uri, *id, *description;
+ GList/*<unowned GDataMediaThumbnail>*/ *thumbnails;
+ GTimeVal date_published_tv = { 0, };
+ gchar *date_published = NULL; /* owned */
+ guint duration; /* seconds */
+ guint rating_min = 0, rating_max = 0, rating_count = 0;
+ gdouble rating_average = 0.0;
+
+ title = gdata_entry_get_title (GDATA_ENTRY (video));
+ player_uri = gdata_youtube_video_get_player_uri (video);
+ id = gdata_entry_get_id (GDATA_ENTRY (video));
+ description = gdata_youtube_video_get_description (video);
+ thumbnails = gdata_youtube_video_get_thumbnails (video);
+ date_published_tv.tv_sec = gdata_entry_get_published (GDATA_ENTRY (video));
+ date_published = g_time_val_to_iso8601 (&date_published_tv);
+ duration = gdata_youtube_video_get_duration (video);
+ gdata_youtube_video_get_rating (video, &rating_min, &rating_max,
+ &rating_count, &rating_average);
+
+ g_print ("%s — %s\n", player_uri, title);
+ g_print (" ID: %s\n", id);
+ g_print (" Published: %s\n", date_published);
+ g_print (" Duration: %us\n", duration);
+ g_print (" Rating: %.2f (min: %u, max: %u, count: %u)\n",
+ rating_average, rating_min, rating_max, rating_count);
+ g_print (" Description:\n %s\n", description);
+ g_print (" Thumbnails:\n");
+
+ for (; thumbnails != NULL; thumbnails = thumbnails->next) {
+ GDataMediaThumbnail *thumbnail;
+
+ thumbnail = GDATA_MEDIA_THUMBNAIL (thumbnails->data);
+ g_print (" • %s\n",
+ gdata_media_thumbnail_get_uri (thumbnail));
+ }
+
+ g_print ("\n");
+
+ g_free (date_published);
+}
+
+static void
+print_category (GDataCategory *category)
+{
+ const gchar *term, *label;
+
+ term = gdata_category_get_term (category);
+ label = gdata_category_get_label (category);
+
+ g_print ("%s — %s\n", term, label);
+}
+
+static GDataAuthorizer *
+create_authorizer (GError **error)
+{
+ GDataOAuth2Authorizer *authorizer = NULL; /* owned */
+ gchar *uri = NULL;
+ gchar code[100];
+ GError *child_error = NULL;
+
+ /* Go through the interactive OAuth dance. */
+ authorizer = gdata_oauth2_authorizer_new (CLIENT_ID, CLIENT_SECRET,
+ REDIRECT_URI,
+ GDATA_TYPE_YOUTUBE_SERVICE);
+
+ /* Get an authentication URI */
+ uri = gdata_oauth2_authorizer_build_authentication_uri (authorizer,
+ NULL, FALSE);
+
+ /* Wait for the user to retrieve and enter the verifier. */
+ g_print ("Please navigate to the following URI and grant access:\n"
+ " %s\n", uri);
+ g_print ("Enter verifier (EOF to abort): ");
+
+ g_free (uri);
+
+ if (scanf ("%100s", code) != 1) {
+ /* User chose to abort. */
+ g_print ("\n");
+ g_clear_object (&authorizer);
+ return NULL;
+ }
+
+ /* Authorise the token. */
+ gdata_oauth2_authorizer_request_authorization (authorizer, code, NULL,
+ &child_error);
+
+ if (child_error != NULL) {
+ g_propagate_error (error, child_error);
+ g_clear_object (&authorizer);
+ return NULL;
+ }
+
+ return GDATA_AUTHORIZER (authorizer);
+}
+
+/* Search for videos given a simple query string. */
+static int
+command_search (int argc, char *argv[])
+{
+ GDataYouTubeService *service = NULL;
+ GDataYouTubeQuery *query = NULL;
+ GDataFeed *feed = NULL;
+ GList/*<unowned GDataYouTubeVideo>*/ *entries;
+ GError *error = NULL;
+ gint retval = 0;
+ const gchar *query_string;
+
+ if (argc < 3) {
+ return print_usage (argv);
+ }
+
+ query_string = argv[2];
+
+ service = gdata_youtube_service_new (DEVELOPER_KEY, NULL);
+ query = gdata_youtube_query_new (query_string);
+ feed = gdata_youtube_service_query_videos (service, GDATA_QUERY (query),
+ NULL, NULL, NULL, &error);
+
+ if (error != NULL) {
+ g_printerr ("%s: Error querying YouTube: %s\n",
+ argv[0], error->message);
+ g_error_free (error);
+ retval = 1;
+ goto done;
+ }
+
+ /* Print results. */
+ for (entries = gdata_feed_get_entries (feed); entries != NULL;
+ entries = entries->next) {
+ GDataYouTubeVideo *video;
+
+ video = GDATA_YOUTUBE_VIDEO (entries->data);
+ print_video (video);
+ }
+
+ g_print ("Total of %u results.\n", gdata_feed_get_total_results (feed));
+
+done:
+ g_clear_object (&feed);
+ g_clear_object (&query);
+ g_clear_object (&service);
+
+ return retval;
+}
+
+/* Display information about a single video. */
+static int
+command_info (int argc, char *argv[])
+{
+ GDataYouTubeService *service = NULL;
+ GDataEntry *result = NULL;
+ GDataYouTubeVideo *video; /* unowned */
+ GError *error = NULL;
+ gint retval = 0;
+ const gchar *entry_id;
+
+ if (argc < 3) {
+ return print_usage (argv);
+ }
+
+ entry_id = argv[2];
+
+ service = gdata_youtube_service_new (DEVELOPER_KEY, NULL);
+ result = gdata_service_query_single_entry (GDATA_SERVICE (service),
+ NULL, entry_id, NULL,
+ GDATA_TYPE_YOUTUBE_VIDEO,
+ NULL, &error);
+
+ if (error != NULL) {
+ g_printerr ("%s: Error querying YouTube: %s\n",
+ argv[0], error->message);
+ g_error_free (error);
+ retval = 1;
+ goto done;
+ }
+
+ /* Print results. */
+ video = GDATA_YOUTUBE_VIDEO (result);
+ print_video (video);
+
+done:
+ g_clear_object (&result);
+ g_clear_object (&service);
+
+ return retval;
+}
+
+static gboolean
+standard_feed_type_from_name (const gchar *name,
+ GDataYouTubeStandardFeedType *out)
+{
+ /* Indexed by GDataYouTubeStandardFeedType. */
+ const gchar *feed_type_names[] = {
+ "top-rated",
+ "top-favorites",
+ "most-viewed",
+ "most-popular",
+ "most-recent",
+ "most-discussed",
+ "most-linked",
+ "most-responded",
+ "recently-featured",
+ "watch-on-mobile",
+ };
+ guint i;
+
+ G_STATIC_ASSERT (G_N_ELEMENTS (feed_type_names) ==
+ GDATA_YOUTUBE_WATCH_ON_MOBILE_FEED + 1);
+
+ for (i = 0; i < G_N_ELEMENTS (feed_type_names); i++) {
+ if (g_strcmp0 (feed_type_names[i], name) == 0) {
+ *out = (GDataYouTubeStandardFeedType) i;
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
+/* List all videos in a standard feed. */
+static int
+command_standard_feed (int argc, char *argv[])
+{
+ GDataYouTubeService *service = NULL;
+ GDataFeed *feed = NULL;
+ GList/*<unowned GDataYouTubeVideo>*/ *entries;
+ GError *error = NULL;
+ gint retval = 0;
+ GDataYouTubeStandardFeedType feed_type;
+
+ if (argc < 3) {
+ return print_usage (argv);
+ }
+
+ if (!standard_feed_type_from_name (argv[2], &feed_type)) {
+ g_printerr ("%s: Invalid feed type ‘%s’.\n", argv[0], argv[2]);
+ retval = 1;
+ goto done;
+ }
+
+ service = gdata_youtube_service_new (DEVELOPER_KEY, NULL);
+ feed = gdata_youtube_service_query_standard_feed (service, feed_type,
+ NULL, NULL, NULL,
+ NULL, &error);
+
+ if (error != NULL) {
+ g_printerr ("%s: Error querying YouTube: %s\n",
+ argv[0], error->message);
+ g_error_free (error);
+ retval = 1;
+ goto done;
+ }
+
+ /* Print results. */
+ for (entries = gdata_feed_get_entries (feed); entries != NULL;
+ entries = entries->next) {
+ GDataYouTubeVideo *video;
+
+ video = GDATA_YOUTUBE_VIDEO (entries->data);
+ print_video (video);
+ }
+
+ g_print ("Total of %u results.\n", gdata_feed_get_total_results (feed));
+
+done:
+ g_clear_object (&feed);
+ g_clear_object (&service);
+
+ return retval;
+}
+
+/* List videos related to a given one. */
+static int
+command_related (int argc, char *argv[])
+{
+ GDataYouTubeService *service = NULL;
+ GDataFeed *feed = NULL;
+ GList/*<unowned GDataYouTubeVideo>*/ *entries;
+ GError *error = NULL;
+ gint retval = 0;
+ const gchar *entry_id;
+ GDataYouTubeVideo *query_video = NULL;
+
+ if (argc < 3) {
+ return print_usage (argv);
+ }
+
+ entry_id = argv[2];
+ query_video = gdata_youtube_video_new (entry_id);
+
+ service = gdata_youtube_service_new (DEVELOPER_KEY, NULL);
+ feed = gdata_youtube_service_query_related (service, query_video, NULL,
+ NULL, NULL, NULL, &error);
+
+ if (error != NULL) {
+ g_printerr ("%s: Error querying YouTube: %s\n",
+ argv[0], error->message);
+ g_error_free (error);
+ retval = 1;
+ goto done;
+ }
+
+ /* Print results. */
+ for (entries = gdata_feed_get_entries (feed); entries != NULL;
+ entries = entries->next) {
+ GDataYouTubeVideo *video;
+
+ video = GDATA_YOUTUBE_VIDEO (entries->data);
+ print_video (video);
+ }
+
+ g_print ("Total of %u results.\n", gdata_feed_get_total_results (feed));
+
+done:
+ g_clear_object (&query_video);
+ g_clear_object (&feed);
+ g_clear_object (&service);
+
+ return retval;
+}
+
+/* List all available video categories. */
+static int
+command_categories (int argc, char *argv[])
+{
+ GDataYouTubeService *service = NULL;
+ GDataAPPCategories *app_categories = NULL;
+ GList/*<unowned GDataCategory>*/ *categories;
+ GError *error = NULL;
+ gint retval = 0;
+
+ service = gdata_youtube_service_new (DEVELOPER_KEY, NULL);
+ app_categories = gdata_youtube_service_get_categories (service, NULL,
+ &error);
+
+ if (error != NULL) {
+ g_printerr ("%s: Error querying YouTube: %s\n",
+ argv[0], error->message);
+ g_error_free (error);
+ retval = 1;
+ goto done;
+ }
+
+ /* Print results. */
+ for (categories = gdata_app_categories_get_categories (app_categories);
+ categories != NULL;
+ categories = categories->next) {
+ GDataCategory *category;
+
+ category = GDATA_CATEGORY (categories->data);
+ print_category (category);
+ }
+
+ g_print ("Total of %u results.\n",
+ g_list_length (gdata_app_categories_get_categories (app_categories)));
+
+done:
+ g_clear_object (&app_categories);
+ g_clear_object (&service);
+
+ return retval;
+}
+
+/* Upload a video. */
+static int
+command_upload (int argc, char *argv[])
+{
+ GDataYouTubeService *service = NULL;
+ GDataUploadStream *upload_stream = NULL;
+ GError *error = NULL;
+ gint retval = 0;
+ const gchar *filename;
+ GFile *video_file = NULL;
+ GFileInputStream *video_file_stream = NULL;
+ GFileInfo *video_file_info = NULL;
+ GDataYouTubeVideo *video = NULL;
+ GDataYouTubeVideo *uploaded_video = NULL;
+ gssize transfer_size;
+ const gchar *content_type, *slug;
+ GDataAuthorizer *authorizer = NULL;
+ const gchar *title, *description;
+
+ if (argc < 3) {
+ return print_usage (argv);
+ }
+
+ filename = argv[2];
+ title = (argc > 3) ? argv[3] : NULL;
+ description = (argc > 4) ? argv[4] : NULL;
+
+ /* Load the file and query its details. */
+ video_file = g_file_new_for_commandline_arg (filename);
+
+ video_file_info = g_file_query_info (video_file,
+ G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE ","
+ G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME,
+ G_FILE_QUERY_INFO_NONE, NULL,
+ &error);
+
+ if (error != NULL) {
+ g_printerr ("%s: Error loading video information ‘%s’: %s\n",
+ argv[0], filename, error->message);
+ g_error_free (error);
+ retval = 1;
+ goto done;
+ }
+
+ content_type = g_file_info_get_content_type (video_file_info);
+ slug = g_file_info_get_display_name (video_file_info);
+
+ video_file_stream = g_file_read (video_file, NULL, &error);
+
+ if (error != NULL) {
+ g_printerr ("%s: Error loading video ‘%s’: %s\n",
+ argv[0], filename, error->message);
+ g_error_free (error);
+ retval = 1;
+ goto done;
+ }
+
+ /* Build the video. */
+ video = gdata_youtube_video_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (video), title);
+ gdata_entry_set_summary (GDATA_ENTRY (video), description);
+
+ /* Authenticate and create a service. */
+ authorizer = create_authorizer (&error);
+
+ if (error != NULL) {
+ g_printerr ("%s: Error authenticating: %s\n",
+ argv[0], error->message);
+ g_error_free (error);
+ retval = 1;
+ goto done;
+ } else if (authorizer == NULL) {
+ g_printerr ("%s: User chose to abort authentication.\n",
+ argv[0]);
+ retval = 1;
+ goto done;
+ }
+
+ service = gdata_youtube_service_new (DEVELOPER_KEY,
+ GDATA_AUTHORIZER (authorizer));
+
+ /* Start the upload. */
+ upload_stream = gdata_youtube_service_upload_video (service, video,
+ slug, content_type,
+ NULL, &error);
+
+ if (error != NULL) {
+ g_printerr ("%s: Error initializing upload with YouTube: %s\n",
+ argv[0], error->message);
+ g_error_free (error);
+ retval = 1;
+ goto done;
+ }
+
+ /* Upload the video */
+ transfer_size = g_output_stream_splice (G_OUTPUT_STREAM (upload_stream),
+ G_INPUT_STREAM (video_file_stream),
+ G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE |
+ G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET,
+ NULL, &error);
+
+ if (error != NULL) {
+ g_printerr ("%s: Error transferring file: %s\n",
+ argv[0], error->message);
+ g_error_free (error);
+ retval = 1;
+ goto done;
+ }
+
+ /* Finish off the upload */
+ uploaded_video = gdata_youtube_service_finish_video_upload (service,
+ upload_stream,
+ &error);
+
+ if (error != NULL) {
+ g_printerr ("%s: Error finishing upload with YouTube: %s\n",
+ argv[0], error->message);
+ g_error_free (error);
+ retval = 1;
+ goto done;
+ }
+
+ /* Print the uploaded video as confirmation. */
+ g_print ("Uploaded %" G_GSSIZE_FORMAT " bytes.\n", transfer_size);
+ print_video (uploaded_video);
+
+done:
+ g_clear_object (&authorizer);
+ g_clear_object (&uploaded_video);
+ g_clear_object (&video);
+ g_clear_object (&video_file_info);
+ g_clear_object (&video_file_stream);
+ g_clear_object (&video_file);
+ g_clear_object (&upload_stream);
+ g_clear_object (&service);
+
+ return retval;
+}
+
+static const struct {
+ const gchar *command;
+ int (*handler_fn) (int argc, char **argv);
+} command_handlers[] = {
+ { "search", command_search },
+ { "info", command_info },
+ { "standard-feed", command_standard_feed },
+ { "categories", command_categories },
+ { "related", command_related },
+ { "upload", command_upload },
+};
+
+int
+main (int argc, char *argv[])
+{
+ guint i;
+ gint retval = -1;
+
+ setlocale (LC_ALL, "");
+
+ if (argc < 2) {
+ return print_usage (argv);
+ }
+
+ for (i = 0; i < G_N_ELEMENTS (command_handlers); i++) {
+ if (strcmp (argv[1], command_handlers[i].command) == 0) {
+ retval = command_handlers[i].handler_fn (argc, argv);
+ }
+ }
+
+ if (retval == -1) {
+ retval = print_usage (argv);
+ }
+
+ return retval;
+}
--- /dev/null
+<?xml version="1.0"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+ <!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
+ <!ENTITY % gtkdocentities SYSTEM "xml/gtkdocentities.ent">
+ %gtkdocentities;
+]>
+<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
+ <bookinfo>
+ <title>GData Reference Manual</title>
+ <releaseinfo>for GData &package_version;.<!-- The latest version of this documentation can be found online at
+ <ulink role="online-location" url="http://[SERVER]/gdata/index.html">http://[SERVER]/gdata/</ulink>.-->
+ </releaseinfo>
+ </bookinfo>
+
+ <part>
+ <title>GData Overview</title>
+ <xi:include href="gdata-overview.xml"/>
+ <xi:include href="gdata-running.xml"/>
+ <chapter>
+ <title>Object Hierarchy</title>
+ <xi:include href="xml/tree_index.sgml"/>
+ </chapter>
+ </part>
+
+ <part>
+ <title>Core API</title>
+ <chapter>
+ <title>Core API</title>
+ <xi:include href="xml/gdata-version.xml"/>
+ <xi:include href="xml/gdata-service.xml"/>
+ <xi:include href="xml/gdata-query.xml"/>
+ <xi:include href="xml/gdata-feed.xml"/>
+ <xi:include href="xml/gdata-entry.xml"/>
+ <xi:include href="xml/gdata-types.xml"/>
+ <xi:include href="xml/gdata-parsable.xml"/>
+ <xi:include href="xml/gdata-download-stream.xml"/>
+ <xi:include href="xml/gdata-upload-stream.xml"/>
+ <xi:include href="xml/gdata-comparable.xml"/>
+ </chapter>
+
+ <chapter>
+ <title>Access Control List API</title>
+ <xi:include href="xml/gdata-access-handler.xml"/>
+ <xi:include href="xml/gdata-access-rule.xml"/>
+ </chapter>
+
+ <chapter>
+ <title>Batch Operation API</title>
+ <xi:include href="xml/gdata-batchable.xml"/>
+ <xi:include href="xml/gdata-batch-operation.xml"/>
+ </chapter>
+
+ <chapter>
+ <title>Authentication/Authorization API</title>
+ <xi:include href="xml/gdata-authorizer.xml"/>
+ <xi:include href="xml/gdata-authorization-domain.xml"/>
+ <xi:include href="xml/gdata-client-login-authorizer.xml"/>
+ <xi:include href="xml/gdata-goa-authorizer.xml"><xi:fallback /></xi:include>
+ <xi:include href="xml/gdata-oauth1-authorizer.xml"/>
+ <xi:include href="xml/gdata-oauth2-authorizer.xml"/>
+ </chapter>
+
+ <chapter>
+ <title>Comment API</title>
+ <xi:include href="xml/gdata-commentable.xml"/>
+ <xi:include href="xml/gdata-comment.xml"/>
+ </chapter>
+ </part>
+
+ <part>
+ <title>Namespace API</title>
+ <chapter>
+ <title>Atom API</title>
+ <xi:include href="xml/gdata-author.xml"/>
+ <xi:include href="xml/gdata-category.xml"/>
+ <xi:include href="xml/gdata-generator.xml"/>
+ <xi:include href="xml/gdata-link.xml"/>
+ </chapter>
+
+ <chapter>
+ <title>Atom Publishing Protocol API</title>
+ <xi:include href="xml/gdata-app-categories.xml"/>
+ </chapter>
+
+ <chapter>
+ <title>GData API</title>
+ <xi:include href="xml/gdata-gd-email-address.xml"/>
+ <xi:include href="xml/gdata-gd-im-address.xml"/>
+ <xi:include href="xml/gdata-gd-name.xml"/>
+ <xi:include href="xml/gdata-gd-organization.xml"/>
+ <xi:include href="xml/gdata-gd-phone-number.xml"/>
+ <xi:include href="xml/gdata-gd-postal-address.xml"/>
+ <xi:include href="xml/gdata-gd-reminder.xml"/>
+ <xi:include href="xml/gdata-gd-when.xml"/>
+ <xi:include href="xml/gdata-gd-where.xml"/>
+ <xi:include href="xml/gdata-gd-who.xml"/>
+ </chapter>
+
+ <chapter>
+ <title>GContact API</title>
+ <xi:include href="xml/gdata-gcontact-calendar.xml"/>
+ <xi:include href="xml/gdata-gcontact-event.xml"/>
+ <xi:include href="xml/gdata-gcontact-external-id.xml"/>
+ <xi:include href="xml/gdata-gcontact-jot.xml"/>
+ <xi:include href="xml/gdata-gcontact-language.xml"/>
+ <xi:include href="xml/gdata-gcontact-relation.xml"/>
+ <xi:include href="xml/gdata-gcontact-website.xml"/>
+ </chapter>
+
+ <chapter>
+ <title>Media RSS API</title>
+ <xi:include href="xml/gdata-media-category.xml"/>
+ <xi:include href="xml/gdata-media-content.xml"/>
+ <xi:include href="xml/gdata-media-credit.xml"/>
+ <xi:include href="xml/gdata-media-thumbnail.xml"/>
+ </chapter>
+
+ <chapter>
+ <title>YouTube API</title>
+ <xi:include href="xml/gdata-youtube-category.xml"/>
+ <xi:include href="xml/gdata-youtube-content.xml"/>
+ <xi:include href="xml/gdata-youtube-credit.xml"/>
+ <xi:include href="xml/gdata-youtube-state.xml"/>
+ </chapter>
+ </part>
+
+ <part>
+ <title>Service APIs</title>
+ <chapter>
+ <title>YouTube API</title>
+ <xi:include href="xml/gdata-youtube-service.xml"/>
+ <xi:include href="xml/gdata-youtube-feed.xml"/>
+ <xi:include href="xml/gdata-youtube-query.xml"/>
+ <xi:include href="xml/gdata-youtube-video.xml"/>
+ <xi:include href="xml/gdata-youtube-comment.xml"/>
+ </chapter>
+
+ <chapter>
+ <title>Google Calendar API</title>
+ <xi:include href="xml/gdata-calendar-service.xml"/>
+ <xi:include href="xml/gdata-calendar-feed.xml"/>
+ <xi:include href="xml/gdata-calendar-query.xml"/>
+ <xi:include href="xml/gdata-calendar-calendar.xml"/>
+ <xi:include href="xml/gdata-calendar-event.xml"/>
+ <xi:include href="xml/gdata-calendar-access-rule.xml"/>
+ </chapter>
+
+ <chapter>
+ <title>Google Contacts API</title>
+ <xi:include href="xml/gdata-contacts-service.xml"/>
+ <xi:include href="xml/gdata-contacts-query.xml"/>
+ <xi:include href="xml/gdata-contacts-contact.xml"/>
+ <xi:include href="xml/gdata-contacts-group.xml"/>
+ </chapter>
+
+ <chapter>
+ <title>Google Documents/Drive API</title>
+ <xi:include href="xml/gdata-documents-service.xml"/>
+ <xi:include href="xml/gdata-documents-property.xml"/>
+ <xi:include href="xml/gdata-documents-feed.xml"/>
+ <xi:include href="xml/gdata-documents-query.xml"/>
+ <xi:include href="xml/gdata-documents-upload-query.xml"/>
+ <xi:include href="xml/gdata-documents-entry.xml"/>
+ <xi:include href="xml/gdata-documents-document.xml"/>
+ <xi:include href="xml/gdata-documents-folder.xml"/>
+ <xi:include href="xml/gdata-documents-drawing.xml"/>
+ <xi:include href="xml/gdata-documents-pdf.xml"/>
+ <xi:include href="xml/gdata-documents-presentation.xml"/>
+ <xi:include href="xml/gdata-documents-spreadsheet.xml"/>
+ <xi:include href="xml/gdata-documents-text.xml"/>
+ <xi:include href="xml/gdata-documents-metadata.xml"/>
+ <xi:include href="xml/gdata-documents-access-rule.xml"/>
+ </chapter>
+
+ <chapter>
+ <title>Google PicasaWeb API</title>
+ <xi:include href="xml/gdata-picasaweb-service.xml"/>
+ <xi:include href="xml/gdata-picasaweb-feed.xml"/>
+ <xi:include href="xml/gdata-picasaweb-query.xml"/>
+ <xi:include href="xml/gdata-picasaweb-album.xml"/>
+ <xi:include href="xml/gdata-picasaweb-file.xml"/>
+ <xi:include href="xml/gdata-picasaweb-user.xml"/>
+ <xi:include href="xml/gdata-picasaweb-comment.xml"/>
+ </chapter>
+
+ <chapter>
+ <title>Google Tasks API</title>
+ <xi:include href="xml/gdata-tasks-service.xml"/>
+ <xi:include href="xml/gdata-tasks-query.xml"/>
+ <xi:include href="xml/gdata-tasks-tasklist.xml"/>
+ <xi:include href="xml/gdata-tasks-task.xml"/>
+ </chapter>
+
+ <chapter>
+ <title>Google Freebase API</title>
+ <xi:include href="xml/gdata-freebase-service.xml"/>
+ <xi:include href="xml/gdata-freebase-query.xml"/>
+ <xi:include href="xml/gdata-freebase-result.xml"/>
+ <xi:include href="xml/gdata-freebase-topic-query.xml"/>
+ <xi:include href="xml/gdata-freebase-topic-result.xml"/>
+ <xi:include href="xml/gdata-freebase-search-query.xml"/>
+ <xi:include href="xml/gdata-freebase-search-result.xml"/>
+ </chapter>
+ </part>
+
+ <part>
+ <title>Appendices</title>
+ <index role="api-index-full">
+ <title>API Index</title>
+ <xi:include href="xml/api-index-full.xml"><xi:fallback/></xi:include>
+ </index>
+ <index role="api-index-deprecated">
+ <title>Index of deprecated symbols</title>
+ <xi:include href="xml/api-index-deprecated.xml"><xi:fallback/></xi:include>
+ </index>
+ <index role="0.1.1">
+ <title>Index of new symbols in 0.1.1</title>
+ <xi:include href="xml/api-index-0.1.1.xml"><xi:fallback/></xi:include>
+ </index>
+ <index role="0.2.0">
+ <title>Index of new symbols in 0.2.0</title>
+ <xi:include href="xml/api-index-0.2.0.xml"><xi:fallback/></xi:include>
+ </index>
+ <index role="0.3.0">
+ <title>Index of new symbols in 0.3.0</title>
+ <xi:include href="xml/api-index-0.3.0.xml"><xi:fallback/></xi:include>
+ </index>
+ <index role="0.4.0">
+ <title>Index of new symbols in 0.4.0</title>
+ <xi:include href="xml/api-index-0.4.0.xml"><xi:fallback/></xi:include>
+ </index>
+ <index role="0.5.0">
+ <title>Index of new symbols in 0.5.0</title>
+ <xi:include href="xml/api-index-0.5.0.xml"><xi:fallback/></xi:include>
+ </index>
+ <index role="0.6.0">
+ <title>Index of new symbols in 0.6.0</title>
+ <xi:include href="xml/api-index-0.6.0.xml"><xi:fallback/></xi:include>
+ </index>
+ <index role="0.7.0">
+ <title>Index of new symbols in 0.7.0</title>
+ <xi:include href="xml/api-index-0.7.0.xml"><xi:fallback/></xi:include>
+ </index>
+ <index role="0.8.0">
+ <title>Index of new symbols in 0.8.0</title>
+ <xi:include href="xml/api-index-0.8.0.xml"><xi:fallback/></xi:include>
+ </index>
+ <index role="0.9.0">
+ <title>Index of new symbols in 0.9.0</title>
+ <xi:include href="xml/api-index-0.9.0.xml"><xi:fallback/></xi:include>
+ </index>
+ <index role="0.9.1">
+ <title>Index of new symbols in 0.9.1</title>
+ <xi:include href="xml/api-index-0.9.1.xml"><xi:fallback/></xi:include>
+ </index>
+ <index role="0.10.0">
+ <title>Index of new symbols in 0.10.0</title>
+ <xi:include href="xml/api-index-0.10.0.xml"><xi:fallback/></xi:include>
+ </index>
+ <index role="0.11.0">
+ <title>Index of new symbols in 0.11.0</title>
+ <xi:include href="xml/api-index-0.11.0.xml"><xi:fallback/></xi:include>
+ </index>
+ <index role="0.13.0">
+ <title>Index of new symbols in 0.13.0</title>
+ <xi:include href="xml/api-index-0.13.0.xml"><xi:fallback/></xi:include>
+ </index>
+ <index role="0.13.1">
+ <title>Index of new symbols in 0.13.1</title>
+ <xi:include href="xml/api-index-0.13.1.xml"><xi:fallback/></xi:include>
+ </index>
+ <index role="0.13.3">
+ <title>Index of new symbols in 0.13.3</title>
+ <xi:include href="xml/api-index-0.13.3.xml"><xi:fallback/></xi:include>
+ </index>
+ <index role="0.13.4">
+ <title>Index of new symbols in 0.13.4</title>
+ <xi:include href="xml/api-index-0.13.4.xml"><xi:fallback/></xi:include>
+ </index>
+ <index role="0.15.0">
+ <title>Index of new symbols in 0.15.0</title>
+ <xi:include href="xml/api-index-0.15.0.xml"><xi:fallback/></xi:include>
+ </index>
+ <index role="0.15.1">
+ <title>Index of new symbols in 0.15.1</title>
+ <xi:include href="xml/api-index-0.15.1.xml"><xi:fallback/></xi:include>
+ </index>
+ <index role="0.16.0">
+ <title>Index of new symbols in 0.16.0</title>
+ <xi:include href="xml/api-index-0.16.0.xml"><xi:fallback/></xi:include>
+ </index>
+ <index role="0.17.0">
+ <title>Index of new symbols in 0.17.0</title>
+ <xi:include href="xml/api-index-0.17.0.xml"><xi:fallback/></xi:include>
+ </index>
+ <index role="0.17.2">
+ <title>Index of new symbols in 0.17.2</title>
+ <xi:include href="xml/api-index-0.17.2.xml"><xi:fallback/></xi:include>
+ </index>
+ <index role="0.17.7">
+ <title>Index of new symbols in 0.17.7</title>
+ <xi:include href="xml/api-index-0.17.7.xml"><xi:fallback/></xi:include>
+ </index>
+ <index role="0.17.9">
+ <title>Index of new symbols in 0.17.9</title>
+ <xi:include href="xml/api-index-0.17.9.xml"><xi:fallback/></xi:include>
+ </index>
+ <index role="0.17.10">
+ <title>Index of new symbols in 0.17.10</title>
+ <xi:include href="xml/api-index-0.17.10.xml"><xi:fallback/></xi:include>
+ </index>
+ <index role="0.17.11">
+ <title>Index of new symbols in 0.17.11</title>
+ <xi:include href="xml/api-index-0.17.11.xml"><xi:fallback/></xi:include>
+ </index>
+ <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
+ </part>
+</book>
--- /dev/null
+<?xml version="1.0"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
+<refentry id="gdata-overview">
+ <refmeta>
+ <refentrytitle role="top_of_page" id="gdata-overview.top_of_page">GData Overview</refentrytitle>
+ <manvolnum>3</manvolnum>
+ <refmiscinfo>GDATA Library</refmiscinfo>
+ </refmeta>
+ <refnamediv>
+ <refname>GData Overview</refname>
+ <refpurpose>overview of libgdata's architecture</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Introduction</title>
+ <para>libgdata is a library to allow access to web services using the GData protocol from the desktop. The <ulink type="http"
+ url="http://code.google.com/apis/gdata/overview.html">GData protocol</ulink> is a simple protocol for reading and writing
+ data on the web, designed by Google.</para>
+
+ <refsect2>
+ <title>Protocols</title>
+ <para>Google's services were originally only accessible using an XML-based protocol called <firstterm>GData</firstterm>. However, later additions
+ to the set of available services use a REST-style JSON protocol. libgdata supports both protocols, although specific
+ services use exactly one of the two protocols.</para>
+ <para>The core API in libgdata transparently supports both protocols, so client code need not consider which protocol to use.</para>
+ </refsect2>
+
+ <refsect2>
+ <title>XML protocol</title>
+ <para>The GData XML protocol is designed by Google to allow interaction with their web services. It is based on the Atom Publishing
+ protocol, with namespaced XML additions. Communication between the client and server is broadly achieved through HTTP
+ requests with query parameters, and Atom feeds being returned with result entries. Each <firstterm>service</firstterm>
+ has its own namespaced additions to the GData protocol; for example, the Google Calendar service's API has
+ specialisations for addresses and time periods.
+ <figure>
+ <mediaobject>
+ <imageobject><imagedata fileref="data-flow.png" format="PNG" align="center"/></imageobject>
+ </mediaobject>
+ <textobject><phrase>An overview of the data flow when making a request of a GData service.</phrase></textobject>
+ </figure>
+ </para>
+ <para>Results are always returned in the form of result <firstterm>feeds</firstterm>, containing multiple
+ <firstterm>entries</firstterm>. How the entries are interpreted depends on what was queried of the service, but when
+ using libgdata, this is all taken care of transparently.</para>
+ </refsect2>
+
+ <refsect2>
+ <title>JSON protocol</title>
+ <para>The more recent JSON protocol is similar in architecture to the XML protocol: entries are arranged into feeds, and the core
+ operations available are: listing all entries, getting a specific entry, inserting an entry, updating an entry and deleting an entry.</para>
+ <para>The key difference between the two protocols, apart from the serialisation format, is that the JSON protocol is not namespaced. Each
+ service uses a specific JSON format, and there is no formal sharing of data structures between services. For example, every entry
+ in the XML protocol is required to have a title, ID and update time (as per the Atom specification). Such commonality between
+ JSON entries is purely ad-hoc.</para>
+ <para>Differences between the XML and JSON protocols are hidden by the libgdata API. Both protocols are implemented by the standard
+ <type><link linkend="GDataService">GDataService</link></type>, <type><link linkend="GDataFeed">GDataFeed</link></type> and
+ <type><link linkend="GDataEntry">GDataEntry</link></type> classes.</para>
+ </refsect2>
+
+ <refsect2>
+ <title>Structure</title>
+ <para>The basic design of libgdata mirrors the protocol's structure quite closely:
+ <figure>
+ <mediaobject>
+ <imageobject><imagedata fileref="structure.png" format="PNG" align="center"/></imageobject>
+ </mediaobject>
+ <textobject><phrase>An overview of the libgdata class structure.</phrase></textobject>
+ </figure>
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term><type><link linkend="GDataService">GDataService</link></type></term>
+ <listitem><para>Subclassed for each different web service implemented, this class represents a single client's
+ connection to the relevant web service, holding their authentication state, and making the necessary
+ requests to read and write data to and from the service. All top-level actions, such as creating a new
+ object on the server, are carried out through a service.</para>
+ <para>There should be one <type><link linkend="GDataService">GDataService</link></type> subclass for
+ each of the services listed <ulink type="http" url="http://code.google.com/apis/gdata/">in the GData
+ documentation</ulink>.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><type><link linkend="GDataQuery">GDataQuery</link></type></term>
+ <listitem><para>For queries to have multiple individual parameters, a
+ <type><link linkend="GDataQuery">GDataQuery</link></type> can be used to specify the parameters.</para>
+ <para>Query objects are optional, and can only be used with queries (not with entry insertions, updates
+ or deletions). The query object builds the query URI used by the
+ <type><link linkend="GDataService">GDataService</link></type> when sending the query to the
+ server.</para>
+ <para>Services can subclass <type><link linkend="GDataQuery">GDataQuery</link></type> if the service
+ supports non-standard query parameters.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><type><link linkend="GDataFeed">GDataFeed</link></type></term>
+ <listitem><para>Effectively a list of <type><link linkend="GDataEntry">GDataEntry</link></type>s, the
+ <type><link linkend="GDataFeed">GDataFeed</link></type> class is a direct counterpart of the root
+ <type><feed></type> element in the Atom feeds which form the GData protocol. It contains the
+ elements in a query response, as well as general information about the response, such as links to
+ related feeds and the categories under which the query response falls.</para>
+ <para><type><link linkend="GDataFeed">GDataFeed</link></type> is usually not subclassed by services,
+ as there are rarely service-specific elements in a feed itself.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><type><link linkend="GDataEntry">GDataEntry</link></type></term>
+ <listitem><para>A <type><link linkend="GDataEntry">GDataEntry</link></type> is a direct counterpart of the
+ <type><entry></type> element in the Atom feeds which form the GData protocol. It represents a
+ single object of unspecified semantics; an entry could be anything from a calendar event to a video
+ comment or access control rule. Semantics are given to entries by subclassing
+ <type><link linkend="GDataEntry">GDataEntry</link></type> for the various types of entries returned
+ by queries to a service. Such subclasses implement useful, relevant and query-specific properties
+ on the entry (such as the duration of a video, or the recurrence rules of a calendar event).</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+ </refsect1>
+
+ <refsect1>
+ <title>Development Philosophy</title>
+ <para>As the GData protocol (and all the service-specific protocols which extend it) is reasonably young, it is subject to fairly
+ frequent updates and expansions. While backwards compatibility is maintained, these updates necessitate that libgdata
+ remains fairly flexible in how it treats data. The sections below detail some of the ways in which libgdata achieves this,
+ and the reasoning behind them, as well as other major design decisions behind libgdata's API.</para>
+
+ <refsect2 id="enumerable-properties">
+ <title>Enumerable Properties</title>
+ <para>There are many class properties in libgdata which should, at first glance, be implemented as enumerated types. Function
+ calls such as <function><link linkend="gdata-link-get-relation-type">gdata_link_get_relation_type()</link></function>
+ and <function><link linkend="gdata-gd-im-address-get-protocol">gdata_gd_im_address_get_protocol()</link></function>
+ would, in a conventional library, return a value from an enum, which would work well, and be more typesafe and
+ memory-efficient than using arbitrary strings.</para>
+ <para>However, such an implementation would not be forwards-compatible. If a protocol addition was made which added another
+ link relation type, or added supportf or another IM protocol, there would be no way for libgdata to represent some
+ of the data it retrieved from the server. It could return an “other” value from the enum, but that could lead to
+ data loss in the common case of GData entries being queried from the server, processed, then updated again.</para>
+ <para>For this reason – which is made more troublesome by the fact that it is unpredictable when updates to the protocol are
+ released, or when updated XML/JSON will start coming over the wire – libgdata uses enumerated types sparingly; they are
+ only used when it is very improbable (or even impossible) for the property in question to be extended or changed in
+ the future. In any other case, a string value is used instead, with libgdata providing <code>#define</code>d values
+ for the known values of the property. These values should be used as much as possible by applications which use
+ libgdata (i.e. they should be treated as if they were enumerated values), but applications are free to use strings
+ of their own, too. All validation of such pseudo-enums is left to the server.</para>
+ <para>One situation where it is acceptable to use enumerated types is in API which is only ever used to query the server, and
+ isn't involved in processing or representing the response at all, i.e. subclasses of
+ <type><link linkend="GDataQuery">GDataQuery</link></type>.</para>
+ </refsect2>
+
+ <refsect2>
+ <title>String Constants</title>
+ <para>As the protocols are XML- or JSON-based, they make extensive use of string constants, typically as
+ <link linkend="enumerable-properties">enumerated types</link> or namespaced URIs. To stop the authors of applications
+ which use libgdata from having to continually look up the correct “magic strings” to use, all such strings should
+ be <code>#define</code>d in libgdata, and referenced in the appropriate function documentation.</para>
+ </refsect2>
+
+ <refsect2>
+ <title>New Services</title>
+ <para>The API required to implement support for a new service using libgdata is not publicly exposed. This is because doing
+ so would clutter the API to a large extent; for example, exposing various properties as writeable which are currently
+ only readable. While the freedom for users of libgdata to write their own services is a good one, it is outweighed by
+ the muddlement that this would bring to the API.</para>
+ <para>Furthermore, since it is highly unlikely that anyone except Google will use GData as a basis for communicating with
+ their service, there is little harm in restricting the implementation of services to libgdata. If someone wants to
+ implement support for a new GData service, it is for the benefit of everyone if this implementation is done in libgdata
+ itself, rather than their application.</para>
+ </refsect2>
+
+ <refsect2 id="cancellable-support">
+ <title>Cancellable Support</title>
+ <para>As libgdata is a network library, it has to be able to deal with operations which take a long (and indeterminate) amount
+ of time due to network latencies. As well as providing asynchronous operation support, every such operation in libgdata
+ is cancellable, using <type><link linkend="GCancellable">GCancellable</link></type>.</para>
+ <para>Using <type><link linkend="GCancellable">GCancellable</link></type>, any ongoing libgdata operation can be cancelled
+ from any other thread by calling <function><link linkend="g-cancellable-cancel">g_cancellable_cancel</link></function>.
+ If the ongoing operation is doing network activity, the operation will be cancelled as safely as possible (although
+ the server's state cannot be guaranteed when cancelling a non-idempotent operation, such as an insertion or update,
+ since the server may have already committed the results of the operation, but might not have returned them to libgdata
+ yet) and the operation will return to its calling function with a
+ <link linkend="G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></link> error. Similarly,
+ if the operation is yet to do network activity, it will return with the above error before the network activity is
+ started, leaving the server unchanged.</para>
+ <para>However, if the operation has finished its network activity, libgdata does not guarantee that it will return with an
+ error — it may return successfully. There is no way to fix this, as it is an inherent race condition between checking
+ for cancellation for the last time, and returning the successful result. Rather than reduce the probability of the race
+ condition occurring, but still have the possibility of it occurring, libgdata will just continue to process an operation
+ after its network activity is over, and return success.</para>
+ <para>This may be useful in situations where the user is cancelling an operation due to it taking too long; the application
+ using libgdata may want to make use of the result of the operation, even if it has previously tried to cancel the
+ operation after network activity finished.</para>
+ <para>The behaviour of cancellation in libgdata can be represented as follows:
+ <figure>
+ <mediaobject>
+ <imageobject><imagedata fileref="cancellation.png" format="PNG" align="center"/></imageobject>
+ </mediaobject>
+ <textobject><phrase>The behaviour of cancellation in libgdata.</phrase></textobject>
+ </figure>
+ </para>
+ </refsect2>
+
+ <refsect2>
+ <title>Privacy</title>
+ <para>Privacy is an important consideration with code such as libgdata's, which handles valuable data such as people's
+ address books and Google Account login details.</para>
+ <para>Unfortunately, it's infeasible for libgdata to ensure that no private data is ever leaked from a process. To do this
+ properly would require almost all the data allocated by libgdata (and all the libraries it depends on, all the way down
+ to the TLS implementation) to use non-pageable memory for all network requests and responses, and to be careful about
+ zeroing them before freeing them. There isn't enough support for this level of paranoia in the lower levels of the
+ stack (such as libsoup).</para>
+ <para>However, it is feasible to ensure that the user's password and authentication/authorization tokens aren't leaked. This
+ is done in several ways in libgdata:</para>
+ <itemizedlist>
+ <listitem>
+ <para>If libgdata is compiled with libgcr support enabled (using the
+ <code class="literal">--enable-gnome</code> configuration flag), it will use libgcr's support for
+ non-pageable memory. This will try hard to avoid passwords and auth. tokens being paged out to disk at
+ any point (although there are circumstances, such as when hibernating, where this is
+ unavoidable).</para>
+ <para>Otherwise, libgdata will ensure that passwords and auth. tokens are zeroed out in memory before being
+ freed, which lowers the chance of them reaching disk at a later stage.</para>
+ </listitem>
+ <listitem>
+ <para>Unless run with <envar>LIBGDATA_DEBUG</envar> set to <literal>4</literal>, libgdata will attempt to
+ redact all usernames, passwords and auth. tokens from debug log output. This aims to prevent accidental
+ disclosure of passwords, etc. in bug reports. Currently, this is implemented using a fixed set of
+ search patterns, so it's possible that certain bits of private information will not be redacted; any
+ such occurrence is a bug which should be reported on
+ <ulink type="http" url="https://bugzilla.gnome.org/enter_bug.cgi?product=libgdata">GNOME
+ Bugzilla</ulink>.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>libgdata universally uses HTTPS rather than HTTP for communicating with servers. The port which is used may be changed
+ for testing purposes, using the <envar>LIBGDATA_HTTPS_PORT</envar> environment variable; but the protocol used will
+ always be HTTPS.</para>
+
+ <para>libgdata provides ways to upload and download files, but does not implement code for loading or saving those files to
+ or from disk. Since these files will typically be user data (such as their Google Drive documents), it is highly
+ recommended that they are given restricted permissions, any temporary files are only readable by the current user,
+ and files are potentially encrypted on disk where appropriate. The aim is to avoid leaking user data to other users
+ of the system, or to attackers who gain access to the user’s hard drive (which may not be encrypted). libgdata itself
+ only guarantees that data is encrypted while being sent over the network.</para>
+ </refsect2>
+ </refsect1>
+</refentry>
--- /dev/null
+<?xml version="1.0"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
+<refentry id="gdata-running">
+ <refmeta>
+ <refentrytitle role="top_of_page" id="gdata-overview.top_of_page">Running GData Applications</refentrytitle>
+ <manvolnum>3</manvolnum>
+ <refmiscinfo>GDATA Library</refmiscinfo>
+ </refmeta>
+ <refnamediv>
+ <refname>Running GData Applications</refname>
+ <refpurpose>running and debugging GData applications</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Running and Debugging GData Applications</title>
+
+ <refsect2>
+ <title>Environment variables</title>
+ <para>libgdata makes use of a few environment variables which affect how it runs, mainly with respect to debugging.</para>
+
+ <formalpara id="LIBGDATA_DEBUG">
+ <title><envar>LIBGDATA_DEBUG</envar></title>
+ <para>If this environment variable is set to one of the following values, libgdata will give debug output
+ (at various levels). If it's unset, no debug output will be produced.
+ <variablelist>
+ <varlistentry>
+ <term>0</term>
+ <listitem><para>Output no debug messages or network logs.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>1</term>
+ <listitem><para>Output debug messages, but not network logs.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>2</term>
+ <listitem><para>Output debug messages and network traffic headers.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>3</term>
+ <listitem><para>Output debug messages and full network traffic logs.</para></listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ <para>So, to debug a program which uses libgdata, run it from a terminal with the following command:</para>
+ <screen><prompt>$</prompt><userinput>LIBGDATA_DEBUG=3 ./my-program-name &> libgdata.log</userinput></screen>
+ </formalpara>
+ </refsect2>
+
+ <refsect2>
+ <title>Debugging Advice</title>
+ <para>The easiest way to debug problems with libgdata is to use the
+ <link linkend="LIBGDATA_DEBUG"><envar>LIBGDATA_DEBUG</envar></link> environment variable to observe all the network
+ traffic being transmitted and received by libgdata. Typically, any problems will occur in the final network
+ request/response, which is the last one in the log output.</para>
+ <para>If debugging using the environment variables and log output is not possible, it is sometimes possible to diagnose problems
+ by examining the error responses sent by the Google servers to libgdata. These are exposed as the error messages returned
+ by libgdata methods; so when handling errors from libgdata method calls, it is a good idea to output the message from
+ the <link linkend="GError"><type>GError</type></link> to a debug log, or even as a warning in the user's
+ <filename>.xsession-errors</filename> file.</para>
+ <example>
+ <title>Error Handling when Uploading a Document</title>
+ <programlisting>
+ GDataUploadStream *upload_stream;
+ GError *error = NULL; /<!-- -->* make sure to initialise the GError to NULL *<!-- -->/
+
+ /<!-- -->* Other code goes here. *<!-- -->/
+
+ upload_stream = gdata_documents_service_upload_document (service, document, slug, content_type, destination_folder, NULL,
+ &error);
+
+ /<!-- -->* Handle any errors. *<!-- -->/
+ if (error != NULL) {
+ /<!-- -->* Note that the error message is outputted to the terminal/logs.
+ * It will contain important debugging information from the Google servers. *<!-- -->/
+ g_error ("Error getting upload stream: %s", error->message);
+ g_error_free (error);
+
+ return;
+ }
+ </programlisting>
+ </example>
+ </refsect2>
+ </refsect1>
+</refentry>
--- /dev/null
+<SECTION>
+<FILE>gdata-version</FILE>
+<TITLE>Version Information</TITLE>
+GDATA_MAJOR_VERSION
+GDATA_MINOR_VERSION
+GDATA_MICRO_VERSION
+GDATA_CHECK_VERSION
+</SECTION>
+
+<SECTION>
+<FILE>gdata-service</FILE>
+<TITLE>GDataService</TITLE>
+GDataService
+GDataServiceClass
+GDataServiceError
+GDataParserError
+GDataOperationType
+GDataQueryProgressCallback
+gdata_service_is_authorized
+gdata_service_get_authorizer
+gdata_service_set_authorizer
+gdata_service_get_authorization_domains
+gdata_service_query
+gdata_service_query_async
+gdata_service_query_finish
+gdata_service_query_single_entry
+gdata_service_query_single_entry_async
+gdata_service_query_single_entry_finish
+gdata_service_insert_entry
+gdata_service_insert_entry_async
+gdata_service_insert_entry_finish
+gdata_service_update_entry
+gdata_service_update_entry_async
+gdata_service_update_entry_finish
+gdata_service_delete_entry
+gdata_service_delete_entry_async
+gdata_service_delete_entry_finish
+gdata_service_get_proxy_uri
+gdata_service_set_proxy_uri
+gdata_service_get_proxy_resolver
+gdata_service_set_proxy_resolver
+gdata_service_get_timeout
+gdata_service_set_timeout
+gdata_service_get_locale
+gdata_service_set_locale
+<SUBSECTION Standard>
+GDATA_SERVICE
+GDATA_IS_SERVICE
+GDATA_TYPE_SERVICE
+gdata_service_get_type
+GDATA_SERVICE_GET_CLASS
+GDATA_SERVICE_CLASS
+GDATA_IS_SERVICE_CLASS
+gdata_service_error_quark
+GDATA_SERVICE_ERROR
+GDATA_PARSER_ERROR
+gdata_parser_error_quark
+<SUBSECTION Private>
+GDataServicePrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-query</FILE>
+<TITLE>GDataQuery</TITLE>
+GDataQuery
+GDataQueryClass
+gdata_query_new
+gdata_query_new_with_limits
+gdata_query_get_query_uri
+gdata_query_next_page
+gdata_query_previous_page
+gdata_query_get_q
+gdata_query_set_q
+gdata_query_get_etag
+gdata_query_set_etag
+gdata_query_get_author
+gdata_query_set_author
+gdata_query_get_categories
+gdata_query_set_categories
+gdata_query_get_published_min
+gdata_query_set_published_min
+gdata_query_get_published_max
+gdata_query_set_published_max
+gdata_query_get_updated_min
+gdata_query_set_updated_min
+gdata_query_get_updated_max
+gdata_query_set_updated_max
+gdata_query_get_start_index
+gdata_query_set_start_index
+gdata_query_get_max_results
+gdata_query_set_max_results
+gdata_query_is_strict
+gdata_query_set_is_strict
+<SUBSECTION Standard>
+gdata_query_get_type
+GDATA_QUERY
+GDATA_QUERY_CLASS
+GDATA_QUERY_GET_CLASS
+GDATA_TYPE_QUERY
+GDATA_IS_QUERY
+GDATA_IS_QUERY_CLASS
+<SUBSECTION Private>
+GDataQueryPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-feed</FILE>
+<TITLE>GDataFeed</TITLE>
+GDataFeed
+GDataFeedClass
+gdata_feed_get_title
+gdata_feed_get_subtitle
+gdata_feed_get_id
+gdata_feed_get_etag
+gdata_feed_get_authors
+gdata_feed_get_categories
+gdata_feed_get_entries
+gdata_feed_look_up_entry
+gdata_feed_get_generator
+gdata_feed_get_links
+gdata_feed_look_up_link
+gdata_feed_get_logo
+gdata_feed_get_icon
+gdata_feed_get_updated
+gdata_feed_get_rights
+gdata_feed_get_start_index
+gdata_feed_get_total_results
+gdata_feed_get_items_per_page
+gdata_feed_get_next_page_token
+<SUBSECTION Standard>
+GDATA_FEED
+GDATA_FEED_CLASS
+GDATA_FEED_GET_CLASS
+gdata_feed_get_type
+GDATA_IS_FEED
+GDATA_IS_FEED_CLASS
+GDATA_TYPE_FEED
+<SUBSECTION Private>
+GDataFeedPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-entry</FILE>
+<TITLE>GDataEntry</TITLE>
+GDataEntry
+GDataEntryClass
+gdata_entry_new
+gdata_entry_get_title
+gdata_entry_set_title
+gdata_entry_get_summary
+gdata_entry_set_summary
+gdata_entry_get_id
+gdata_entry_get_etag
+gdata_entry_get_content
+gdata_entry_set_content
+gdata_entry_get_content_uri
+gdata_entry_set_content_uri
+gdata_entry_get_published
+gdata_entry_get_updated
+gdata_entry_get_authors
+gdata_entry_add_author
+gdata_entry_add_category
+gdata_entry_get_categories
+gdata_entry_add_link
+gdata_entry_remove_link
+gdata_entry_look_up_link
+gdata_entry_look_up_links
+gdata_entry_is_inserted
+gdata_entry_get_rights
+gdata_entry_set_rights
+<SUBSECTION Standard>
+gdata_entry_get_type
+GDATA_ENTRY
+GDATA_ENTRY_CLASS
+GDATA_ENTRY_GET_CLASS
+GDATA_IS_ENTRY
+GDATA_IS_ENTRY_CLASS
+GDATA_TYPE_ENTRY
+<SUBSECTION Private>
+GDataEntryPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-youtube-service</FILE>
+<TITLE>GDataYouTubeService</TITLE>
+GDataYouTubeService
+GDataYouTubeServiceClass
+GDataYouTubeServiceError
+GDataYouTubeStandardFeedType
+gdata_youtube_service_new
+gdata_youtube_service_get_primary_authorization_domain
+gdata_youtube_service_query_videos
+gdata_youtube_service_query_videos_async
+gdata_youtube_service_query_related
+gdata_youtube_service_query_related_async
+gdata_youtube_service_query_standard_feed
+gdata_youtube_service_query_standard_feed_async
+gdata_youtube_service_upload_video
+gdata_youtube_service_finish_video_upload
+gdata_youtube_service_get_categories
+gdata_youtube_service_get_categories_async
+gdata_youtube_service_get_categories_finish
+gdata_youtube_service_get_developer_key
+<SUBSECTION Standard>
+GDATA_YOUTUBE_SERVICE
+GDATA_YOUTUBE_SERVICE_CLASS
+GDATA_YOUTUBE_SERVICE_ERROR
+GDATA_YOUTUBE_SERVICE_GET_CLASS
+GDATA_IS_YOUTUBE_SERVICE
+GDATA_IS_YOUTUBE_SERVICE_CLASS
+GDATA_TYPE_YOUTUBE_SERVICE
+gdata_youtube_service_get_type
+gdata_youtube_service_error_quark
+<SUBSECTION Private>
+GDataYouTubeServicePrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-youtube-video</FILE>
+<TITLE>GDataYouTubeVideo</TITLE>
+GDATA_YOUTUBE_ASPECT_RATIO_WIDESCREEN
+GDATA_YOUTUBE_ACTION_RATE
+GDATA_YOUTUBE_ACTION_COMMENT
+GDATA_YOUTUBE_ACTION_COMMENT_VOTE
+GDATA_YOUTUBE_ACTION_VIDEO_RESPOND
+GDATA_YOUTUBE_ACTION_EMBED
+GDATA_YOUTUBE_ACTION_SYNDICATE
+GDATA_YOUTUBE_LICENSE_CC
+GDATA_YOUTUBE_LICENSE_STANDARD
+GDATA_YOUTUBE_RATING_TYPE_SIMPLE
+GDATA_YOUTUBE_RATING_TYPE_MPAA
+GDATA_YOUTUBE_RATING_TYPE_V_CHIP
+GDataYouTubeVideo
+GDataYouTubeVideoClass
+GDataYouTubePermission
+gdata_youtube_video_new
+gdata_youtube_video_look_up_content
+gdata_youtube_video_get_thumbnails
+gdata_youtube_video_get_category
+gdata_youtube_video_set_category
+gdata_youtube_video_get_credit
+gdata_youtube_video_get_description
+gdata_youtube_video_set_description
+gdata_youtube_video_get_duration
+gdata_youtube_video_get_keywords
+gdata_youtube_video_set_keywords
+gdata_youtube_video_get_location
+gdata_youtube_video_set_location
+gdata_youtube_video_get_view_count
+gdata_youtube_video_get_favorite_count
+gdata_youtube_video_is_restricted_in_country
+gdata_youtube_video_get_media_rating
+gdata_youtube_video_get_access_control
+gdata_youtube_video_set_access_control
+gdata_youtube_video_get_player_uri
+gdata_youtube_video_is_private
+gdata_youtube_video_set_is_private
+gdata_youtube_video_is_draft
+gdata_youtube_video_set_is_draft
+gdata_youtube_video_get_state
+gdata_youtube_video_get_rating
+gdata_youtube_video_get_uploaded
+gdata_youtube_video_get_recorded
+gdata_youtube_video_set_recorded
+gdata_youtube_video_get_video_id
+gdata_youtube_video_get_video_id_from_uri
+gdata_youtube_video_get_aspect_ratio
+gdata_youtube_video_set_aspect_ratio
+gdata_youtube_video_get_coordinates
+gdata_youtube_video_set_coordinates
+<SUBSECTION Standard>
+GDATA_IS_YOUTUBE_VIDEO
+GDATA_IS_YOUTUBE_VIDEO_CLASS
+GDATA_TYPE_YOUTUBE_VIDEO
+GDATA_YOUTUBE_VIDEO
+GDATA_YOUTUBE_VIDEO_CLASS
+GDATA_YOUTUBE_VIDEO_GET_CLASS
+gdata_youtube_video_get_type
+<SUBSECTION Private>
+GDataYouTubeVideoPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-contacts-service</FILE>
+<TITLE>GDataContactsService</TITLE>
+GDataContactsService
+GDataContactsServiceClass
+gdata_contacts_service_new
+gdata_contacts_service_get_primary_authorization_domain
+gdata_contacts_service_query_contacts
+gdata_contacts_service_query_contacts_async
+gdata_contacts_service_insert_contact
+gdata_contacts_service_insert_contact_async
+gdata_contacts_service_query_groups
+gdata_contacts_service_query_groups_async
+gdata_contacts_service_insert_group
+gdata_contacts_service_insert_group_async
+<SUBSECTION Standard>
+gdata_contacts_service_get_type
+GDATA_CONTACTS_SERVICE
+GDATA_CONTACTS_SERVICE_CLASS
+GDATA_CONTACTS_SERVICE_GET_CLASS
+GDATA_IS_CONTACTS_SERVICE
+GDATA_IS_CONTACTS_SERVICE_CLASS
+GDATA_TYPE_CONTACTS_SERVICE
+<SUBSECTION Private>
+GDataContactsServicePrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-contacts-query</FILE>
+<TITLE>GDataContactsQuery</TITLE>
+GDataContactsQuery
+GDataContactsQueryClass
+gdata_contacts_query_new
+gdata_contacts_query_new_with_limits
+gdata_contacts_query_get_order_by
+gdata_contacts_query_set_order_by
+gdata_contacts_query_get_sort_order
+gdata_contacts_query_set_sort_order
+gdata_contacts_query_show_deleted
+gdata_contacts_query_set_show_deleted
+gdata_contacts_query_get_group
+gdata_contacts_query_set_group
+<SUBSECTION Standard>
+gdata_contacts_query_get_type
+GDATA_CONTACTS_QUERY
+GDATA_CONTACTS_QUERY_CLASS
+GDATA_CONTACTS_QUERY_GET_CLASS
+GDATA_IS_CONTACTS_QUERY
+GDATA_IS_CONTACTS_QUERY_CLASS
+GDATA_TYPE_CONTACTS_QUERY
+<SUBSECTION Private>
+GDataContactsQueryPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-contacts-contact</FILE>
+<TITLE>GDataContactsContact</TITLE>
+GDATA_CONTACTS_GENDER_MALE
+GDATA_CONTACTS_GENDER_FEMALE
+GDATA_CONTACTS_PRIORITY_LOW
+GDATA_CONTACTS_PRIORITY_NORMAL
+GDATA_CONTACTS_PRIORITY_HIGH
+GDATA_CONTACTS_SENSITIVITY_CONFIDENTIAL
+GDATA_CONTACTS_SENSITIVITY_NORMAL
+GDATA_CONTACTS_SENSITIVITY_PERSONAL
+GDATA_CONTACTS_SENSITIVITY_PRIVATE
+GDataContactsContact
+GDataContactsContactClass
+gdata_contacts_contact_new
+gdata_contacts_contact_get_name
+gdata_contacts_contact_set_name
+gdata_contacts_contact_get_short_name
+gdata_contacts_contact_set_short_name
+gdata_contacts_contact_get_initials
+gdata_contacts_contact_set_initials
+gdata_contacts_contact_get_maiden_name
+gdata_contacts_contact_set_maiden_name
+gdata_contacts_contact_get_nickname
+gdata_contacts_contact_set_nickname
+gdata_contacts_contact_get_file_as
+gdata_contacts_contact_set_file_as
+gdata_contacts_contact_get_birthday
+gdata_contacts_contact_set_birthday
+gdata_contacts_contact_get_gender
+gdata_contacts_contact_set_gender
+gdata_contacts_contact_get_mileage
+gdata_contacts_contact_set_mileage
+gdata_contacts_contact_get_occupation
+gdata_contacts_contact_set_occupation
+gdata_contacts_contact_get_subject
+gdata_contacts_contact_set_subject
+gdata_contacts_contact_get_priority
+gdata_contacts_contact_set_priority
+gdata_contacts_contact_get_sensitivity
+gdata_contacts_contact_set_sensitivity
+gdata_contacts_contact_get_directory_server
+gdata_contacts_contact_set_directory_server
+gdata_contacts_contact_get_billing_information
+gdata_contacts_contact_set_billing_information
+gdata_contacts_contact_get_email_addresses
+gdata_contacts_contact_get_primary_email_address
+gdata_contacts_contact_add_email_address
+gdata_contacts_contact_remove_all_email_addresses
+gdata_contacts_contact_get_im_addresses
+gdata_contacts_contact_get_primary_im_address
+gdata_contacts_contact_add_im_address
+gdata_contacts_contact_remove_all_im_addresses
+gdata_contacts_contact_get_postal_addresses
+gdata_contacts_contact_get_primary_postal_address
+gdata_contacts_contact_add_postal_address
+gdata_contacts_contact_remove_all_postal_addresses
+gdata_contacts_contact_get_phone_numbers
+gdata_contacts_contact_get_primary_phone_number
+gdata_contacts_contact_add_phone_number
+gdata_contacts_contact_remove_all_phone_numbers
+gdata_contacts_contact_get_organizations
+gdata_contacts_contact_get_primary_organization
+gdata_contacts_contact_add_organization
+gdata_contacts_contact_remove_all_organizations
+gdata_contacts_contact_add_jot
+gdata_contacts_contact_get_jots
+gdata_contacts_contact_remove_all_jots
+gdata_contacts_contact_add_relation
+gdata_contacts_contact_get_relations
+gdata_contacts_contact_remove_all_relations
+gdata_contacts_contact_add_website
+gdata_contacts_contact_get_websites
+gdata_contacts_contact_get_primary_website
+gdata_contacts_contact_remove_all_websites
+gdata_contacts_contact_add_event
+gdata_contacts_contact_get_events
+gdata_contacts_contact_remove_all_events
+gdata_contacts_contact_add_calendar
+gdata_contacts_contact_get_calendars
+gdata_contacts_contact_get_primary_calendar
+gdata_contacts_contact_remove_all_calendars
+gdata_contacts_contact_add_external_id
+gdata_contacts_contact_get_external_ids
+gdata_contacts_contact_remove_all_external_ids
+gdata_contacts_contact_add_hobby
+gdata_contacts_contact_get_hobbies
+gdata_contacts_contact_remove_all_hobbies
+gdata_contacts_contact_add_language
+gdata_contacts_contact_get_languages
+gdata_contacts_contact_remove_all_languages
+gdata_contacts_contact_get_groups
+gdata_contacts_contact_add_group
+gdata_contacts_contact_remove_group
+gdata_contacts_contact_is_group_deleted
+gdata_contacts_contact_get_extended_property
+gdata_contacts_contact_get_extended_properties
+gdata_contacts_contact_set_extended_property
+gdata_contacts_contact_get_user_defined_field
+gdata_contacts_contact_get_user_defined_fields
+gdata_contacts_contact_set_user_defined_field
+gdata_contacts_contact_get_edited
+gdata_contacts_contact_is_deleted
+gdata_contacts_contact_get_photo_etag
+gdata_contacts_contact_get_photo
+gdata_contacts_contact_get_photo_async
+gdata_contacts_contact_get_photo_finish
+gdata_contacts_contact_set_photo
+gdata_contacts_contact_set_photo_async
+gdata_contacts_contact_set_photo_finish
+<SUBSECTION Standard>
+gdata_contacts_contact_get_type
+GDATA_CONTACTS_CONTACT
+GDATA_CONTACTS_CONTACT_CLASS
+GDATA_CONTACTS_CONTACT_GET_CLASS
+GDATA_IS_CONTACTS_CONTACT
+GDATA_IS_CONTACTS_CONTACT_CLASS
+GDATA_TYPE_CONTACTS_CONTACT
+<SUBSECTION Private>
+GDataContactsContactPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-calendar-service</FILE>
+<TITLE>GDataCalendarService</TITLE>
+GDataCalendarService
+GDataCalendarServiceClass
+gdata_calendar_service_new
+gdata_calendar_service_get_primary_authorization_domain
+gdata_calendar_service_query_all_calendars
+gdata_calendar_service_query_all_calendars_async
+gdata_calendar_service_query_own_calendars
+gdata_calendar_service_query_own_calendars_async
+gdata_calendar_service_query_events
+gdata_calendar_service_query_events_async
+gdata_calendar_service_insert_event
+gdata_calendar_service_insert_event_async
+gdata_calendar_service_insert_calendar_event
+gdata_calendar_service_insert_calendar_event_async
+<SUBSECTION Standard>
+gdata_calendar_service_get_type
+GDATA_CALENDAR_SERVICE
+GDATA_CALENDAR_SERVICE_CLASS
+GDATA_CALENDAR_SERVICE_GET_CLASS
+GDATA_IS_CALENDAR_SERVICE
+GDATA_IS_CALENDAR_SERVICE_CLASS
+GDATA_TYPE_CALENDAR_SERVICE
+<SUBSECTION Private>
+GDataCalendarServicePrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-calendar-query</FILE>
+<TITLE>GDataCalendarQuery</TITLE>
+GDataCalendarQuery
+GDataCalendarQueryClass
+gdata_calendar_query_new
+gdata_calendar_query_new_with_limits
+gdata_calendar_query_get_future_events
+gdata_calendar_query_set_future_events
+gdata_calendar_query_get_single_events
+gdata_calendar_query_set_single_events
+gdata_calendar_query_get_order_by
+gdata_calendar_query_set_order_by
+gdata_calendar_query_get_sort_order
+gdata_calendar_query_set_sort_order
+gdata_calendar_query_get_start_min
+gdata_calendar_query_set_start_min
+gdata_calendar_query_get_start_max
+gdata_calendar_query_set_start_max
+gdata_calendar_query_get_recurrence_expansion_start
+gdata_calendar_query_set_recurrence_expansion_start
+gdata_calendar_query_get_recurrence_expansion_end
+gdata_calendar_query_set_recurrence_expansion_end
+gdata_calendar_query_get_timezone
+gdata_calendar_query_set_timezone
+gdata_calendar_query_get_max_attendees
+gdata_calendar_query_set_max_attendees
+gdata_calendar_query_show_deleted
+gdata_calendar_query_set_show_deleted
+<SUBSECTION Standard>
+gdata_calendar_query_get_type
+GDATA_CALENDAR_QUERY
+GDATA_CALENDAR_QUERY_CLASS
+GDATA_CALENDAR_QUERY_GET_CLASS
+GDATA_IS_CALENDAR_QUERY
+GDATA_IS_CALENDAR_QUERY_CLASS
+GDATA_TYPE_CALENDAR_QUERY
+<SUBSECTION Private>
+GDataCalendarQueryPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-calendar-calendar</FILE>
+<TITLE>GDataCalendarCalendar</TITLE>
+GDataCalendarCalendar
+GDataCalendarCalendarClass
+gdata_calendar_calendar_new
+gdata_calendar_calendar_get_color
+gdata_calendar_calendar_set_color
+gdata_calendar_calendar_is_hidden
+gdata_calendar_calendar_set_is_hidden
+gdata_calendar_calendar_is_selected
+gdata_calendar_calendar_set_is_selected
+gdata_calendar_calendar_get_timezone
+gdata_calendar_calendar_set_timezone
+gdata_calendar_calendar_get_edited
+gdata_calendar_calendar_get_times_cleaned
+gdata_calendar_calendar_get_access_level
+<SUBSECTION Standard>
+gdata_calendar_calendar_get_type
+GDATA_CALENDAR_CALENDAR
+GDATA_CALENDAR_CALENDAR_CLASS
+GDATA_CALENDAR_CALENDAR_GET_CLASS
+GDATA_IS_CALENDAR_CALENDAR
+GDATA_IS_CALENDAR_CALENDAR_CLASS
+GDATA_TYPE_CALENDAR_CALENDAR
+<SUBSECTION Private>
+GDataCalendarCalendarPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-calendar-event</FILE>
+<TITLE>GDataCalendarEvent</TITLE>
+GDataCalendarEvent
+GDataCalendarEventClass
+gdata_calendar_event_new
+gdata_calendar_event_get_people
+gdata_calendar_event_add_person
+gdata_calendar_event_get_places
+gdata_calendar_event_add_place
+gdata_calendar_event_get_times
+gdata_calendar_event_get_primary_time
+gdata_calendar_event_add_time
+gdata_calendar_event_get_recurrence
+gdata_calendar_event_set_recurrence
+gdata_calendar_event_get_original_event_details
+gdata_calendar_event_is_exception
+gdata_calendar_event_get_anyone_can_add_self
+gdata_calendar_event_set_anyone_can_add_self
+gdata_calendar_event_get_guests_can_invite_others
+gdata_calendar_event_set_guests_can_invite_others
+gdata_calendar_event_get_guests_can_modify
+gdata_calendar_event_set_guests_can_modify
+gdata_calendar_event_get_guests_can_see_guests
+gdata_calendar_event_set_guests_can_see_guests
+gdata_calendar_event_get_sequence
+gdata_calendar_event_set_sequence
+gdata_calendar_event_get_status
+gdata_calendar_event_set_status
+gdata_calendar_event_get_transparency
+gdata_calendar_event_set_transparency
+gdata_calendar_event_get_uid
+gdata_calendar_event_set_uid
+gdata_calendar_event_get_visibility
+gdata_calendar_event_set_visibility
+gdata_calendar_event_get_edited
+<SUBSECTION Standard>
+gdata_calendar_event_get_type
+GDATA_CALENDAR_EVENT
+GDATA_CALENDAR_EVENT_CLASS
+GDATA_CALENDAR_EVENT_GET_CLASS
+GDATA_IS_CALENDAR_EVENT
+GDATA_IS_CALENDAR_EVENT_CLASS
+GDATA_TYPE_CALENDAR_EVENT
+<SUBSECTION Private>
+GDataCalendarEventPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-types</FILE>
+<TITLE>GData Types</TITLE>
+GDataColor
+gdata_color_from_hexadecimal
+gdata_color_to_hexadecimal
+<SUBSECTION Standard>
+GDATA_TYPE_COLOR
+gdata_color_get_type
+</SECTION>
+
+<SECTION>
+<FILE>gdata-youtube-query</FILE>
+<TITLE>GDataYouTubeQuery</TITLE>
+GDataYouTubeQuery
+GDataYouTubeQueryClass
+GDataYouTubeAge
+GDataYouTubeFormat
+GDataYouTubeSafeSearch
+GDataYouTubeSortOrder
+GDataYouTubeUploader
+gdata_youtube_query_new
+gdata_youtube_query_get_age
+gdata_youtube_query_set_age
+gdata_youtube_query_get_format
+gdata_youtube_query_set_format
+gdata_youtube_query_get_language
+gdata_youtube_query_set_language
+gdata_youtube_query_get_license
+gdata_youtube_query_set_license
+gdata_youtube_query_get_location
+gdata_youtube_query_set_location
+gdata_youtube_query_get_order_by
+gdata_youtube_query_set_order_by
+gdata_youtube_query_get_restriction
+gdata_youtube_query_set_restriction
+gdata_youtube_query_get_safe_search
+gdata_youtube_query_set_safe_search
+gdata_youtube_query_get_sort_order
+gdata_youtube_query_set_sort_order
+gdata_youtube_query_get_uploader
+gdata_youtube_query_set_uploader
+<SUBSECTION Standard>
+GDATA_IS_YOUTUBE_QUERY
+GDATA_IS_YOUTUBE_QUERY_CLASS
+GDATA_TYPE_YOUTUBE_QUERY
+GDATA_YOUTUBE_QUERY
+GDATA_YOUTUBE_QUERY_CLASS
+GDATA_YOUTUBE_QUERY_GET_CLASS
+gdata_youtube_query_get_type
+<SUBSECTION Private>
+GDataYouTubeQueryPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-access-handler</FILE>
+<TITLE>GDataAccessHandler</TITLE>
+GDATA_LINK_ACCESS_CONTROL_LIST
+GDataAccessHandler
+GDataAccessHandlerIface
+gdata_access_handler_get_rules
+gdata_access_handler_get_rules_async
+<SUBSECTION Standard>
+gdata_access_handler_get_type
+GDATA_ACCESS_HANDLER
+GDATA_ACCESS_HANDLER_CLASS
+GDATA_ACCESS_HANDLER_GET_IFACE
+GDATA_IS_ACCESS_HANDLER
+GDATA_TYPE_ACCESS_HANDLER
+</SECTION>
+
+<SECTION>
+<FILE>gdata-access-rule</FILE>
+<TITLE>GDataAccessRule</TITLE>
+GDATA_ACCESS_SCOPE_USER
+GDATA_ACCESS_SCOPE_DOMAIN
+GDATA_ACCESS_SCOPE_DEFAULT
+GDATA_ACCESS_ROLE_NONE
+GDataAccessRule
+GDataAccessRuleClass
+gdata_access_rule_new
+gdata_access_rule_get_role
+gdata_access_rule_set_role
+gdata_access_rule_get_scope
+gdata_access_rule_set_scope
+gdata_access_rule_get_edited
+gdata_access_rule_get_key
+<SUBSECTION Standard>
+gdata_access_rule_get_type
+GDATA_ACCESS_RULE
+GDATA_ACCESS_RULE_CLASS
+GDATA_ACCESS_RULE_GET_CLASS
+GDATA_IS_ACCESS_RULE
+GDATA_IS_ACCESS_RULE_CLASS
+GDATA_TYPE_ACCESS_RULE
+<SUBSECTION Private>
+GDataAccessRulePrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-parsable</FILE>
+<TITLE>GDataParsable</TITLE>
+GDataParsable
+GDataParsableClass
+gdata_parsable_get_content_type
+gdata_parsable_new_from_xml
+gdata_parsable_get_xml
+gdata_parsable_new_from_json
+gdata_parsable_get_json
+<SUBSECTION Standard>
+gdata_parsable_get_type
+GDATA_IS_PARSABLE
+GDATA_IS_PARSABLE_CLASS
+GDATA_PARSABLE
+GDATA_PARSABLE_CLASS
+GDATA_PARSABLE_GET_CLASS
+GDATA_TYPE_PARSABLE
+<SUBSECTION Private>
+GDataParsablePrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-calendar-feed</FILE>
+<TITLE>GDataCalendarFeed</TITLE>
+GDataCalendarFeed
+GDataCalendarFeedClass
+gdata_calendar_feed_get_timezone
+gdata_calendar_feed_get_times_cleaned
+<SUBSECTION Standard>
+gdata_calendar_feed_get_type
+GDATA_CALENDAR_FEED
+GDATA_CALENDAR_FEED_CLASS
+GDATA_CALENDAR_FEED_GET_CLASS
+GDATA_IS_CALENDAR_FEED
+GDATA_IS_CALENDAR_FEED_CLASS
+GDATA_TYPE_CALENDAR_FEED
+<SUBSECTION Private>
+GDataCalendarFeedPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-category</FILE>
+<TITLE>GDataCategory</TITLE>
+GDATA_CATEGORY_SCHEMA_LABELS
+GDATA_CATEGORY_SCHEMA_LABELS_SHARED
+GDATA_CATEGORY_SCHEMA_LABELS_STARRED
+GDATA_CATEGORY_SCHEMA_LABELS_VIEWED
+GDataCategory
+GDataCategoryClass
+gdata_category_new
+gdata_category_get_term
+gdata_category_set_term
+gdata_category_get_scheme
+gdata_category_set_scheme
+gdata_category_get_label
+gdata_category_set_label
+<SUBSECTION Standard>
+gdata_category_get_type
+GDATA_CATEGORY
+GDATA_CATEGORY_CLASS
+GDATA_CATEGORY_GET_CLASS
+GDATA_IS_CATEGORY
+GDATA_IS_CATEGORY_CLASS
+GDATA_TYPE_CATEGORY
+<SUBSECTION Private>
+GDataCategoryPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-link</FILE>
+<TITLE>GDataLink</TITLE>
+GDATA_LINK_ALTERNATE
+GDATA_LINK_BATCH
+GDATA_LINK_EDIT
+GDATA_LINK_EDIT_MEDIA
+GDATA_LINK_ENCLOSURE
+GDATA_LINK_RELATED
+GDATA_LINK_SELF
+GDATA_LINK_VIA
+GDATA_LINK_PARENT
+GDataLink
+GDataLinkClass
+gdata_link_new
+gdata_link_get_uri
+gdata_link_set_uri
+gdata_link_get_relation_type
+gdata_link_set_relation_type
+gdata_link_get_content_type
+gdata_link_set_content_type
+gdata_link_get_language
+gdata_link_set_language
+gdata_link_get_title
+gdata_link_set_title
+gdata_link_get_length
+gdata_link_set_length
+<SUBSECTION Standard>
+gdata_link_get_type
+GDATA_IS_LINK
+GDATA_IS_LINK_CLASS
+GDATA_LINK
+GDATA_LINK_CLASS
+GDATA_LINK_GET_CLASS
+GDATA_TYPE_LINK
+<SUBSECTION Private>
+GDataLinkPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-author</FILE>
+<TITLE>GDataAuthor</TITLE>
+GDataAuthor
+GDataAuthorClass
+gdata_author_new
+gdata_author_get_name
+gdata_author_set_name
+gdata_author_get_uri
+gdata_author_set_uri
+gdata_author_get_email_address
+gdata_author_set_email_address
+<SUBSECTION Standard>
+gdata_author_get_type
+GDATA_AUTHOR
+GDATA_AUTHOR_CLASS
+GDATA_AUTHOR_GET_CLASS
+GDATA_IS_AUTHOR
+GDATA_IS_AUTHOR_CLASS
+GDATA_TYPE_AUTHOR
+<SUBSECTION Private>
+GDataAuthorPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-generator</FILE>
+<TITLE>GDataGenerator</TITLE>
+GDataGenerator
+GDataGeneratorClass
+gdata_generator_get_name
+gdata_generator_get_uri
+gdata_generator_get_version
+<SUBSECTION Standard>
+gdata_generator_get_type
+GDATA_GENERATOR
+GDATA_GENERATOR_CLASS
+GDATA_GENERATOR_GET_CLASS
+GDATA_IS_GENERATOR
+GDATA_IS_GENERATOR_CLASS
+GDATA_TYPE_GENERATOR
+<SUBSECTION Private>
+GDataGeneratorPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-gd-organization</FILE>
+<TITLE>GDataGDOrganization</TITLE>
+GDATA_GD_ORGANIZATION_WORK
+GDATA_GD_ORGANIZATION_OTHER
+GDataGDOrganization
+GDataGDOrganizationClass
+gdata_gd_organization_new
+gdata_gd_organization_get_name
+gdata_gd_organization_set_name
+gdata_gd_organization_get_title
+gdata_gd_organization_set_title
+gdata_gd_organization_get_relation_type
+gdata_gd_organization_set_relation_type
+gdata_gd_organization_get_label
+gdata_gd_organization_set_label
+gdata_gd_organization_is_primary
+gdata_gd_organization_set_is_primary
+gdata_gd_organization_get_department
+gdata_gd_organization_set_department
+gdata_gd_organization_get_job_description
+gdata_gd_organization_set_job_description
+gdata_gd_organization_get_symbol
+gdata_gd_organization_set_symbol
+gdata_gd_organization_get_location
+gdata_gd_organization_set_location
+<SUBSECTION Standard>
+gdata_gd_organization_get_type
+GDATA_GD_ORGANIZATION
+GDATA_GD_ORGANIZATION_CLASS
+GDATA_GD_ORGANIZATION_GET_CLASS
+GDATA_IS_GD_ORGANIZATION
+GDATA_IS_GD_ORGANIZATION_CLASS
+GDATA_TYPE_GD_ORGANIZATION
+<SUBSECTION Private>
+GDataGDOrganizationPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-gd-when</FILE>
+<TITLE>GDataGDWhen</TITLE>
+GDATA_GD_EVENT_STATUS_CANCELED
+GDATA_GD_EVENT_STATUS_CONFIRMED
+GDATA_GD_EVENT_STATUS_TENTATIVE
+GDATA_GD_EVENT_VISIBILITY_CONFIDENTIAL
+GDATA_GD_EVENT_VISIBILITY_DEFAULT
+GDATA_GD_EVENT_VISIBILITY_PRIVATE
+GDATA_GD_EVENT_VISIBILITY_PUBLIC
+GDATA_GD_EVENT_TRANSPARENCY_OPAQUE
+GDATA_GD_EVENT_TRANSPARENCY_TRANSPARENT
+GDataGDWhen
+GDataGDWhenClass
+gdata_gd_when_new
+gdata_gd_when_get_start_time
+gdata_gd_when_set_start_time
+gdata_gd_when_get_end_time
+gdata_gd_when_set_end_time
+gdata_gd_when_is_date
+gdata_gd_when_set_is_date
+gdata_gd_when_get_value_string
+gdata_gd_when_set_value_string
+gdata_gd_when_get_reminders
+gdata_gd_when_add_reminder
+<SUBSECTION Standard>
+gdata_gd_when_get_type
+GDATA_GD_WHEN
+GDATA_GD_WHEN_CLASS
+GDATA_GD_WHEN_GET_CLASS
+GDATA_IS_GD_WHEN
+GDATA_IS_GD_WHEN_CLASS
+GDATA_TYPE_GD_WHEN
+<SUBSECTION Private>
+GDataGDWhenPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-gd-who</FILE>
+<TITLE>GDataGDWho</TITLE>
+GDATA_GD_WHO_EVENT_ATTENDEE
+GDATA_GD_WHO_EVENT_ORGANIZER
+GDATA_GD_WHO_EVENT_PERFORMER
+GDATA_GD_WHO_EVENT_SPEAKER
+GDataGDWho
+GDataGDWhoClass
+gdata_gd_who_new
+gdata_gd_who_get_relation_type
+gdata_gd_who_set_relation_type
+gdata_gd_who_get_value_string
+gdata_gd_who_set_value_string
+gdata_gd_who_get_email_address
+gdata_gd_who_set_email_address
+<SUBSECTION Standard>
+gdata_gd_who_get_type
+GDATA_GD_WHO
+GDATA_GD_WHO_CLASS
+GDATA_GD_WHO_GET_CLASS
+GDATA_IS_GD_WHO
+GDATA_IS_GD_WHO_CLASS
+GDATA_TYPE_GD_WHO
+<SUBSECTION Private>
+GDataGDWhoPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-gd-where</FILE>
+<TITLE>GDataGDWhere</TITLE>
+GDATA_GD_WHERE_EVENT
+GDATA_GD_WHERE_EVENT_ALTERNATE
+GDATA_GD_WHERE_EVENT_PARKING
+GDataGDWhere
+GDataGDWhereClass
+gdata_gd_where_new
+gdata_gd_where_get_relation_type
+gdata_gd_where_set_relation_type
+gdata_gd_where_get_value_string
+gdata_gd_where_set_value_string
+gdata_gd_where_get_label
+gdata_gd_where_set_label
+<SUBSECTION Standard>
+gdata_gd_where_get_type
+GDATA_GD_WHERE
+GDATA_GD_WHERE_CLASS
+GDATA_GD_WHERE_GET_CLASS
+GDATA_IS_GD_WHERE
+GDATA_IS_GD_WHERE_CLASS
+GDATA_TYPE_GD_WHERE
+<SUBSECTION Private>
+GDataGDWherePrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-gd-email-address</FILE>
+<TITLE>GDataGDEmailAddress</TITLE>
+GDATA_GD_EMAIL_ADDRESS_HOME
+GDATA_GD_EMAIL_ADDRESS_OTHER
+GDATA_GD_EMAIL_ADDRESS_WORK
+GDataGDEmailAddress
+GDataGDEmailAddressClass
+gdata_gd_email_address_new
+gdata_gd_email_address_get_address
+gdata_gd_email_address_set_address
+gdata_gd_email_address_get_relation_type
+gdata_gd_email_address_set_relation_type
+gdata_gd_email_address_get_label
+gdata_gd_email_address_set_label
+gdata_gd_email_address_is_primary
+gdata_gd_email_address_set_is_primary
+gdata_gd_email_address_get_display_name
+gdata_gd_email_address_set_display_name
+<SUBSECTION Standard>
+gdata_gd_email_address_get_type
+GDATA_GD_EMAIL_ADDRESS
+GDATA_GD_EMAIL_ADDRESS_CLASS
+GDATA_GD_EMAIL_ADDRESS_GET_CLASS
+GDATA_IS_GD_EMAIL_ADDRESS
+GDATA_IS_GD_EMAIL_ADDRESS_CLASS
+GDATA_TYPE_GD_EMAIL_ADDRESS
+<SUBSECTION Private>
+GDataGDEmailAddressPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-gd-im-address</FILE>
+<TITLE>GDataGDIMAddress</TITLE>
+GDATA_GD_IM_ADDRESS_HOME
+GDATA_GD_IM_ADDRESS_NETMEETING
+GDATA_GD_IM_ADDRESS_OTHER
+GDATA_GD_IM_ADDRESS_WORK
+GDATA_GD_IM_PROTOCOL_AIM
+GDATA_GD_IM_PROTOCOL_LIVE_MESSENGER
+GDATA_GD_IM_PROTOCOL_YAHOO_MESSENGER
+GDATA_GD_IM_PROTOCOL_SKYPE
+GDATA_GD_IM_PROTOCOL_QQ
+GDATA_GD_IM_PROTOCOL_GOOGLE_TALK
+GDATA_GD_IM_PROTOCOL_ICQ
+GDATA_GD_IM_PROTOCOL_JABBER
+GDataGDIMAddress
+GDataGDIMAddressClass
+gdata_gd_im_address_new
+gdata_gd_im_address_get_address
+gdata_gd_im_address_set_address
+gdata_gd_im_address_get_protocol
+gdata_gd_im_address_set_protocol
+gdata_gd_im_address_get_relation_type
+gdata_gd_im_address_set_relation_type
+gdata_gd_im_address_get_label
+gdata_gd_im_address_set_label
+gdata_gd_im_address_is_primary
+gdata_gd_im_address_set_is_primary
+<SUBSECTION Standard>
+gdata_gd_im_address_get_type
+GDATA_GD_IM_ADDRESS
+GDATA_GD_IM_ADDRESS_CLASS
+GDATA_GD_IM_ADDRESS_GET_CLASS
+GDATA_IS_GD_IM_ADDRESS
+GDATA_IS_GD_IM_ADDRESS_CLASS
+GDATA_TYPE_GD_IM_ADDRESS
+<SUBSECTION Private>
+GDataGDIMAddressPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-gd-postal-address</FILE>
+<TITLE>GDataGDPostalAddress</TITLE>
+GDATA_GD_POSTAL_ADDRESS_WORK
+GDATA_GD_POSTAL_ADDRESS_HOME
+GDATA_GD_POSTAL_ADDRESS_OTHER
+GDATA_GD_ADDRESS_USAGE_GENERAL
+GDATA_GD_ADDRESS_USAGE_LOCAL
+GDATA_GD_MAIL_CLASS_BOTH
+GDATA_GD_MAIL_CLASS_LETTERS
+GDATA_GD_MAIL_CLASS_NEITHER
+GDATA_GD_MAIL_CLASS_PARCELS
+GDataGDPostalAddress
+GDataGDPostalAddressClass
+gdata_gd_postal_address_new
+gdata_gd_postal_address_get_address
+gdata_gd_postal_address_set_address
+gdata_gd_postal_address_get_relation_type
+gdata_gd_postal_address_set_relation_type
+gdata_gd_postal_address_get_label
+gdata_gd_postal_address_set_label
+gdata_gd_postal_address_is_primary
+gdata_gd_postal_address_set_is_primary
+gdata_gd_postal_address_get_mail_class
+gdata_gd_postal_address_set_mail_class
+gdata_gd_postal_address_get_usage
+gdata_gd_postal_address_set_usage
+gdata_gd_postal_address_get_agent
+gdata_gd_postal_address_set_agent
+gdata_gd_postal_address_get_house_name
+gdata_gd_postal_address_set_house_name
+gdata_gd_postal_address_get_street
+gdata_gd_postal_address_set_street
+gdata_gd_postal_address_get_po_box
+gdata_gd_postal_address_set_po_box
+gdata_gd_postal_address_get_neighborhood
+gdata_gd_postal_address_set_neighborhood
+gdata_gd_postal_address_get_city
+gdata_gd_postal_address_set_city
+gdata_gd_postal_address_get_subregion
+gdata_gd_postal_address_set_subregion
+gdata_gd_postal_address_get_region
+gdata_gd_postal_address_set_region
+gdata_gd_postal_address_get_postcode
+gdata_gd_postal_address_set_postcode
+gdata_gd_postal_address_get_country
+gdata_gd_postal_address_get_country_code
+gdata_gd_postal_address_set_country
+<SUBSECTION Standard>
+gdata_gd_postal_address_get_type
+GDATA_GD_POSTAL_ADDRESS
+GDATA_GD_POSTAL_ADDRESS_CLASS
+GDATA_GD_POSTAL_ADDRESS_GET_CLASS
+GDATA_IS_GD_POSTAL_ADDRESS
+GDATA_IS_GD_POSTAL_ADDRESS_CLASS
+GDATA_TYPE_GD_POSTAL_ADDRESS
+<SUBSECTION Private>
+GDataGDPostalAddressPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-gd-phone-number</FILE>
+<TITLE>GDataGDPhoneNumber</TITLE>
+GDATA_GD_PHONE_NUMBER_ASSISTANT
+GDATA_GD_PHONE_NUMBER_CALLBACK
+GDATA_GD_PHONE_NUMBER_CAR
+GDATA_GD_PHONE_NUMBER_COMPANY_MAIN
+GDATA_GD_PHONE_NUMBER_FAX
+GDATA_GD_PHONE_NUMBER_HOME
+GDATA_GD_PHONE_NUMBER_HOME_FAX
+GDATA_GD_PHONE_NUMBER_ISDN
+GDATA_GD_PHONE_NUMBER_MAIN
+GDATA_GD_PHONE_NUMBER_MOBILE
+GDATA_GD_PHONE_NUMBER_OTHER
+GDATA_GD_PHONE_NUMBER_OTHER_FAX
+GDATA_GD_PHONE_NUMBER_PAGER
+GDATA_GD_PHONE_NUMBER_RADIO
+GDATA_GD_PHONE_NUMBER_TELEX
+GDATA_GD_PHONE_NUMBER_TTY_TDD
+GDATA_GD_PHONE_NUMBER_WORK
+GDATA_GD_PHONE_NUMBER_WORK_FAX
+GDATA_GD_PHONE_NUMBER_WORK_MOBILE
+GDATA_GD_PHONE_NUMBER_WORK_PAGER
+GDataGDPhoneNumber
+GDataGDPhoneNumberClass
+gdata_gd_phone_number_new
+gdata_gd_phone_number_get_number
+gdata_gd_phone_number_set_number
+gdata_gd_phone_number_get_uri
+gdata_gd_phone_number_set_uri
+gdata_gd_phone_number_get_relation_type
+gdata_gd_phone_number_set_relation_type
+gdata_gd_phone_number_get_label
+gdata_gd_phone_number_set_label
+gdata_gd_phone_number_is_primary
+gdata_gd_phone_number_set_is_primary
+<SUBSECTION Standard>
+gdata_gd_phone_number_get_type
+GDATA_GD_PHONE_NUMBER
+GDATA_GD_PHONE_NUMBER_CLASS
+GDATA_GD_PHONE_NUMBER_GET_CLASS
+GDATA_IS_GD_PHONE_NUMBER
+GDATA_IS_GD_PHONE_NUMBER_CLASS
+GDATA_TYPE_GD_PHONE_NUMBER
+<SUBSECTION Private>
+GDataGDPhoneNumberPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-gd-reminder</FILE>
+<TITLE>GDataGDReminder</TITLE>
+GDATA_GD_REMINDER_ALERT
+GDATA_GD_REMINDER_EMAIL
+GDATA_GD_REMINDER_SMS
+GDataGDReminder
+GDataGDReminderClass
+gdata_gd_reminder_new
+gdata_gd_reminder_get_method
+gdata_gd_reminder_set_method
+gdata_gd_reminder_get_absolute_time
+gdata_gd_reminder_set_absolute_time
+gdata_gd_reminder_is_absolute_time
+gdata_gd_reminder_get_relative_time
+gdata_gd_reminder_set_relative_time
+<SUBSECTION Standard>
+gdata_gd_reminder_get_type
+GDATA_GD_REMINDER
+GDATA_GD_REMINDER_CLASS
+GDATA_GD_REMINDER_GET_CLASS
+GDATA_IS_GD_REMINDER
+GDATA_IS_GD_REMINDER_CLASS
+GDATA_TYPE_GD_REMINDER
+<SUBSECTION Private>
+GDataGDReminderPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-media-category</FILE>
+<TITLE>GDataMediaCategory</TITLE>
+GDataMediaCategory
+GDataMediaCategoryClass
+gdata_media_category_new
+gdata_media_category_get_category
+gdata_media_category_set_category
+gdata_media_category_get_scheme
+gdata_media_category_set_scheme
+gdata_media_category_get_label
+gdata_media_category_set_label
+<SUBSECTION Standard>
+gdata_media_category_get_type
+GDATA_MEDIA_CATEGORY
+GDATA_MEDIA_CATEGORY_CLASS
+GDATA_MEDIA_CATEGORY_GET_CLASS
+GDATA_IS_MEDIA_CATEGORY
+GDATA_IS_MEDIA_CATEGORY_CLASS
+GDATA_TYPE_MEDIA_CATEGORY
+<SUBSECTION Private>
+GDataMediaCategoryPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-media-credit</FILE>
+<TITLE>GDataMediaCredit</TITLE>
+GDataMediaCredit
+GDataMediaCreditClass
+gdata_media_credit_get_credit
+gdata_media_credit_get_scheme
+gdata_media_credit_get_role
+<SUBSECTION Standard>
+gdata_media_credit_get_type
+GDATA_MEDIA_CREDIT
+GDATA_MEDIA_CREDIT_CLASS
+GDATA_MEDIA_CREDIT_GET_CLASS
+GDATA_IS_MEDIA_CREDIT
+GDATA_IS_MEDIA_CREDIT_CLASS
+GDATA_TYPE_MEDIA_CREDIT
+<SUBSECTION Private>
+GDataMediaCreditPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-youtube-credit</FILE>
+<TITLE>GDataYouTubeCredit</TITLE>
+GDATA_YOUTUBE_CREDIT_ENTITY_PARTNER
+GDataYouTubeCredit
+GDataYouTubeCreditClass
+gdata_youtube_credit_get_entity_type
+<SUBSECTION Standard>
+gdata_youtube_credit_get_type
+GDATA_YOUTUBE_CREDIT
+GDATA_YOUTUBE_CREDIT_CLASS
+GDATA_YOUTUBE_CREDIT_GET_CLASS
+GDATA_IS_YOUTUBE_CREDIT
+GDATA_IS_YOUTUBE_CREDIT_CLASS
+GDATA_TYPE_YOUTUBE_CREDIT
+<SUBSECTION Private>
+GDataYouTubeCreditPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-media-content</FILE>
+<TITLE>GDataMediaContent</TITLE>
+GDataMediaContent
+GDataMediaContentClass
+GDataMediaMedium
+GDataMediaExpression
+gdata_media_content_get_uri
+gdata_media_content_get_filesize
+gdata_media_content_get_content_type
+gdata_media_content_get_medium
+gdata_media_content_is_default
+gdata_media_content_get_expression
+gdata_media_content_get_duration
+gdata_media_content_get_height
+gdata_media_content_get_width
+gdata_media_content_download
+<SUBSECTION Standard>
+gdata_media_content_get_type
+GDATA_MEDIA_CONTENT
+GDATA_MEDIA_CONTENT_CLASS
+GDATA_MEDIA_CONTENT_GET_CLASS
+GDATA_IS_MEDIA_CONTENT
+GDATA_IS_MEDIA_CONTENT_CLASS
+GDATA_TYPE_MEDIA_CONTENT
+<SUBSECTION Private>
+GDataMediaContentPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-youtube-content</FILE>
+<TITLE>GDataYouTubeContent</TITLE>
+GDataYouTubeContent
+GDataYouTubeContentClass
+gdata_youtube_content_get_format
+<SUBSECTION Standard>
+gdata_youtube_content_get_type
+GDATA_YOUTUBE_CONTENT
+GDATA_YOUTUBE_CONTENT_CLASS
+GDATA_YOUTUBE_CONTENT_GET_CLASS
+GDATA_IS_YOUTUBE_CONTENT
+GDATA_IS_YOUTUBE_CONTENT_CLASS
+GDATA_TYPE_YOUTUBE_CONTENT
+<SUBSECTION Private>
+GDataYouTubeContentPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-media-thumbnail</FILE>
+<TITLE>GDataMediaThumbnail</TITLE>
+GDataMediaThumbnail
+GDataMediaThumbnailClass
+gdata_media_thumbnail_get_uri
+gdata_media_thumbnail_get_height
+gdata_media_thumbnail_get_width
+gdata_media_thumbnail_get_time
+gdata_media_thumbnail_download
+<SUBSECTION Standard>
+gdata_media_thumbnail_get_type
+GDATA_MEDIA_THUMBNAIL
+GDATA_MEDIA_THUMBNAIL_CLASS
+GDATA_MEDIA_THUMBNAIL_GET_CLASS
+GDATA_IS_MEDIA_THUMBNAIL
+GDATA_IS_MEDIA_THUMBNAIL_CLASS
+GDATA_TYPE_MEDIA_THUMBNAIL
+<SUBSECTION Private>
+GDataMediaThumbnailPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-youtube-state</FILE>
+<TITLE>GDataYouTubeState</TITLE>
+GDataYouTubeState
+GDataYouTubeStateClass
+gdata_youtube_state_get_name
+gdata_youtube_state_get_reason_code
+gdata_youtube_state_get_help_uri
+gdata_youtube_state_get_message
+<SUBSECTION Standard>
+gdata_youtube_state_get_type
+GDATA_YOUTUBE_STATE
+GDATA_YOUTUBE_STATE_CLASS
+GDATA_YOUTUBE_STATE_GET_CLASS
+GDATA_IS_YOUTUBE_STATE
+GDATA_IS_YOUTUBE_STATE_CLASS
+GDATA_TYPE_YOUTUBE_STATE
+<SUBSECTION Private>
+GDataYouTubeStatePrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-picasaweb-service</FILE>
+<TITLE>GDataPicasaWebService</TITLE>
+GDataPicasaWebService
+GDataPicasaWebServiceClass
+gdata_picasaweb_service_new
+gdata_picasaweb_service_get_primary_authorization_domain
+gdata_picasaweb_service_get_user
+gdata_picasaweb_service_get_user_async
+gdata_picasaweb_service_get_user_finish
+gdata_picasaweb_service_query_all_albums
+gdata_picasaweb_service_query_all_albums_async
+gdata_picasaweb_service_query_files
+gdata_picasaweb_service_query_files_async
+gdata_picasaweb_service_upload_file
+gdata_picasaweb_service_finish_file_upload
+gdata_picasaweb_service_insert_album
+gdata_picasaweb_service_insert_album_async
+<SUBSECTION Standard>
+gdata_picasaweb_service_get_type
+GDATA_IS_PICASAWEB_SERVICE
+GDATA_IS_PICASAWEB_SERVICE_CLASS
+GDATA_PICASAWEB_SERVICE
+GDATA_PICASAWEB_SERVICE_CLASS
+GDATA_PICASAWEB_SERVICE_GET_CLASS
+GDATA_TYPE_PICASAWEB_SERVICE
+</SECTION>
+
+<SECTION>
+<FILE>gdata-picasaweb-feed</FILE>
+<TITLE>GDataPicasaWebFeed</TITLE>
+GDataPicasaWebFeed
+GDataPicasaWebFeedClass
+<SUBSECTION Standard>
+gdata_picasaweb_feed_get_type
+GDATA_PICASAWEB_FEED
+GDATA_PICASAWEB_FEED_CLASS
+GDATA_PICASAWEB_FEED_GET_CLASS
+GDATA_IS_PICASAWEB_FEED
+GDATA_IS_PICASAWEB_FEED_CLASS
+GDATA_TYPE_PICASAWEB_FEED
+</SECTION>
+
+<SECTION>
+<FILE>gdata-picasaweb-user</FILE>
+<TITLE>GDataPicasaWebUser</TITLE>
+GDataPicasaWebUser
+GDataPicasaWebUserClass
+gdata_picasaweb_user_get_user
+gdata_picasaweb_user_get_nickname
+gdata_picasaweb_user_get_quota_limit
+gdata_picasaweb_user_get_quota_current
+gdata_picasaweb_user_get_max_photos_per_album
+gdata_picasaweb_user_get_thumbnail_uri
+<SUBSECTION Standard>
+gdata_picasaweb_user_get_type
+GDATA_PICASAWEB_USER
+GDATA_PICASAWEB_USER_CLASS
+GDATA_PICASAWEB_USER_GET_CLASS
+GDATA_IS_PICASAWEB_USER
+GDATA_IS_PICASAWEB_USER_CLASS
+GDATA_TYPE_PICASAWEB_USER
+<SUBSECTION Private>
+GDataPicasaWebUserPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-picasaweb-query</FILE>
+<TITLE>GDataPicasaWebQuery</TITLE>
+GDataPicasaWebQuery
+GDataPicasaWebQueryClass
+gdata_picasaweb_query_new
+gdata_picasaweb_query_new_with_limits
+gdata_picasaweb_query_get_visibility
+gdata_picasaweb_query_set_visibility
+gdata_picasaweb_query_get_thumbnail_size
+gdata_picasaweb_query_set_thumbnail_size
+gdata_picasaweb_query_get_image_size
+gdata_picasaweb_query_set_image_size
+gdata_picasaweb_query_get_tag
+gdata_picasaweb_query_set_tag
+gdata_picasaweb_query_get_bounding_box
+gdata_picasaweb_query_set_bounding_box
+gdata_picasaweb_query_get_location
+gdata_picasaweb_query_set_location
+<SUBSECTION Standard>
+gdata_picasaweb_query_get_type
+GDATA_IS_PICASAWEB_QUERY
+GDATA_IS_PICASAWEB_QUERY_CLASS
+GDATA_PICASAWEB_QUERY
+GDATA_PICASAWEB_QUERY_CLASS
+GDATA_PICASAWEB_QUERY_GET_CLASS
+GDATA_TYPE_PICASAWEB_QUERY
+<SUBSECTION Private>
+GDataPicasaWebQueryPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-picasaweb-album</FILE>
+<TITLE>GDataPicasaWebAlbum</TITLE>
+GDataPicasaWebAlbum
+GDataPicasaWebAlbumClass
+GDataPicasaWebVisibility
+gdata_picasaweb_album_new
+gdata_picasaweb_album_get_id
+gdata_picasaweb_album_get_user
+gdata_picasaweb_album_get_nickname
+gdata_picasaweb_album_get_edited
+gdata_picasaweb_album_get_location
+gdata_picasaweb_album_set_location
+gdata_picasaweb_album_get_visibility
+gdata_picasaweb_album_set_visibility
+gdata_picasaweb_album_get_timestamp
+gdata_picasaweb_album_set_timestamp
+gdata_picasaweb_album_get_num_photos
+gdata_picasaweb_album_get_num_photos_remaining
+gdata_picasaweb_album_get_bytes_used
+gdata_picasaweb_album_is_commenting_enabled
+gdata_picasaweb_album_set_is_commenting_enabled
+gdata_picasaweb_album_get_comment_count
+gdata_picasaweb_album_get_tags
+gdata_picasaweb_album_set_tags
+gdata_picasaweb_album_get_contents
+gdata_picasaweb_album_get_thumbnails
+gdata_picasaweb_album_get_coordinates
+gdata_picasaweb_album_set_coordinates
+<SUBSECTION Standard>
+gdata_picasaweb_album_get_type
+GDATA_IS_PICASAWEB_ALBUM
+GDATA_IS_PICASAWEB_ALBUM_CLASS
+GDATA_PICASAWEB_ALBUM
+GDATA_PICASAWEB_ALBUM_CLASS
+GDATA_PICASAWEB_ALBUM_GET_CLASS
+GDATA_TYPE_PICASAWEB_ALBUM
+<SUBSECTION Private>
+GDataPicasaWebAlbumPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-picasaweb-file</FILE>
+<TITLE>GDataPicasaWebFile</TITLE>
+GDATA_PICASAWEB_VIDEO_STATUS_PENDING
+GDATA_PICASAWEB_VIDEO_STATUS_READY
+GDATA_PICASAWEB_VIDEO_STATUS_FINAL
+GDATA_PICASAWEB_VIDEO_STATUS_FAILED
+GDataPicasaWebFile
+GDataPicasaWebFileClass
+gdata_picasaweb_file_new
+gdata_picasaweb_file_get_id
+gdata_picasaweb_file_get_edited
+gdata_picasaweb_file_get_version
+gdata_picasaweb_file_get_album_id
+gdata_picasaweb_file_set_album_id
+gdata_picasaweb_file_get_width
+gdata_picasaweb_file_get_height
+gdata_picasaweb_file_get_size
+gdata_picasaweb_file_get_checksum
+gdata_picasaweb_file_set_checksum
+gdata_picasaweb_file_get_timestamp
+gdata_picasaweb_file_set_timestamp
+gdata_picasaweb_file_is_commenting_enabled
+gdata_picasaweb_file_set_is_commenting_enabled
+gdata_picasaweb_file_get_comment_count
+gdata_picasaweb_file_get_rotation
+gdata_picasaweb_file_set_rotation
+gdata_picasaweb_file_get_video_status
+gdata_picasaweb_file_get_tags
+gdata_picasaweb_file_set_tags
+gdata_picasaweb_file_get_credit
+gdata_picasaweb_file_get_caption
+gdata_picasaweb_file_set_caption
+gdata_picasaweb_file_get_contents
+gdata_picasaweb_file_get_thumbnails
+gdata_picasaweb_file_get_distance
+gdata_picasaweb_file_get_exposure
+gdata_picasaweb_file_get_flash
+gdata_picasaweb_file_get_focal_length
+gdata_picasaweb_file_get_fstop
+gdata_picasaweb_file_get_image_unique_id
+gdata_picasaweb_file_get_iso
+gdata_picasaweb_file_get_make
+gdata_picasaweb_file_get_model
+gdata_picasaweb_file_get_coordinates
+gdata_picasaweb_file_set_coordinates
+<SUBSECTION Standard>
+gdata_picasaweb_file_get_type
+GDATA_IS_PICASAWEB_FILE
+GDATA_IS_PICASAWEB_FILE_CLASS
+GDATA_PICASAWEB_FILE
+GDATA_PICASAWEB_FILE_CLASS
+GDATA_PICASAWEB_FILE_GET_CLASS
+GDATA_TYPE_PICASAWEB_FILE
+<SUBSECTION Private>
+GDataPicasaWebFilePrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-documents-entry</FILE>
+<TITLE>GDataDocumentsEntry</TITLE>
+GDATA_DOCUMENTS_ACCESS_ROLE_OWNER
+GDATA_DOCUMENTS_ACCESS_ROLE_WRITER
+GDATA_DOCUMENTS_ACCESS_ROLE_READER
+GDataDocumentsEntry
+GDataDocumentsEntryClass
+gdata_documents_entry_get_path
+gdata_documents_entry_get_resource_id
+gdata_documents_entry_get_document_id
+gdata_documents_entry_get_edited
+gdata_documents_entry_get_last_modified_by
+gdata_documents_entry_get_last_viewed
+gdata_documents_entry_get_quota_used
+gdata_documents_entry_get_file_size
+gdata_documents_entry_writers_can_invite
+gdata_documents_entry_set_writers_can_invite
+gdata_documents_entry_is_deleted
+gdata_documents_entry_get_document_properties
+gdata_documents_entry_add_documents_property
+gdata_documents_entry_remove_documents_property
+<SUBSECTION Standard>
+gdata_documents_entry_get_type
+GDATA_DOCUMENTS_ENTRY
+GDATA_DOCUMENTS_ENTRY_CLASS
+GDATA_DOCUMENTS_ENTRY_GET_CLASS
+GDATA_IS_DOCUMENTS_ENTRY
+GDATA_IS_DOCUMENTS_ENTRY_CLASS
+GDATA_TYPE_DOCUMENTS_ENTRY
+<SUBSECTION Private>
+GDataDocumentsEntryPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-documents-property</FILE>
+<TITLE>GDataDocumentsProperty</TITLE>
+GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PUBLIC
+GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PRIVATE
+GDataDocumentsProperty
+GDataDocumentsPropertyClass
+gdata_documents_property_new
+gdata_documents_property_get_key
+gdata_documents_property_get_etag
+gdata_documents_property_get_value
+gdata_documents_property_set_value
+gdata_documents_property_get_visibility
+gdata_documents_property_set_visibility
+<SUBSECTION Standard>
+gdata_documents_property_get_type
+GDATA_DOCUMENTS_PROPERTY
+GDATA_DOCUMENTS_PROPERTY_CLASS
+GDATA_DOCUMENTS_PROPERTY_GET_CLASS
+GDATA_IS_DOCUMENTS_PROPERTY
+GDATA_IS_DOCUMENTS_PROPERTY_CLASS
+GDATA_TYPE_DOCUMENTS_PROPERTY
+<SUBSECTION Private>
+GDataDocumentsPropertyPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-documents-feed</FILE>
+<TITLE>GDataDocumentsFeed</TITLE>
+GDataDocumentsFeed
+GDataDocumentsFeedClass
+<SUBSECTION Standard>
+gdata_documents_feed_get_type
+GDATA_DOCUMENTS_FEED
+GDATA_DOCUMENTS_FEED_CLASS
+GDATA_DOCUMENTS_FEED_GET_CLASS
+GDATA_IS_DOCUMENTS_FEED
+GDATA_IS_DOCUMENTS_FEED_CLASS
+GDATA_TYPE_DOCUMENTS_FEED
+<SUBSECTION Private>
+GDataDocumentsFeedPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-documents-folder</FILE>
+<TITLE>GDataDocumentsFolder</TITLE>
+GDataDocumentsFolder
+GDataDocumentsFolderClass
+gdata_documents_folder_new
+<SUBSECTION Standard>
+gdata_documents_folder_get_type
+GDATA_DOCUMENTS_FOLDER
+GDATA_DOCUMENTS_FOLDER_CLASS
+GDATA_DOCUMENTS_FOLDER_GET_CLASS
+GDATA_IS_DOCUMENTS_FOLDER
+GDATA_IS_DOCUMENTS_FOLDER_CLASS
+GDATA_TYPE_DOCUMENTS_FOLDER
+<SUBSECTION Private>
+GDataDocumentsFolderPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-documents-document</FILE>
+<TITLE>GDataDocumentsDocument</TITLE>
+GDataDocumentsDocument
+GDataDocumentsDocumentClass
+gdata_documents_document_new
+gdata_documents_document_download
+gdata_documents_document_get_download_uri
+gdata_documents_document_get_thumbnail_uri
+<SUBSECTION Standard>
+gdata_documents_document_get_type
+GDATA_DOCUMENTS_DOCUMENT
+GDATA_DOCUMENTS_DOCUMENT_CLASS
+GDATA_DOCUMENTS_DOCUMENT_GET_CLASS
+GDATA_IS_DOCUMENTS_DOCUMENT
+GDATA_IS_DOCUMENTS_DOCUMENT_CLASS
+GDATA_TYPE_DOCUMENTS_DOCUMENT
+<SUBSECTION Private>
+GDataDocumentsDocumentPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-documents-presentation</FILE>
+<TITLE>GDataDocumentsPresentation</TITLE>
+GDATA_DOCUMENTS_PRESENTATION_PDF
+GDATA_DOCUMENTS_PRESENTATION_PNG
+GDATA_DOCUMENTS_PRESENTATION_PPT
+GDATA_DOCUMENTS_PRESENTATION_SWF
+GDATA_DOCUMENTS_PRESENTATION_TXT
+GDataDocumentsPresentation
+GDataDocumentsPresentationClass
+gdata_documents_presentation_new
+<SUBSECTION Standard>
+gdata_documents_presentation_get_type
+GDATA_DOCUMENTS_PRESENTATION
+GDATA_DOCUMENTS_PRESENTATION_CLASS
+GDATA_DOCUMENTS_PRESENTATION_GET_CLASS
+GDATA_IS_DOCUMENTS_PRESENTATION
+GDATA_IS_DOCUMENTS_PRESENTATION_CLASS
+GDATA_TYPE_DOCUMENTS_PRESENTATION
+<SUBSECTION Private>
+GDataDocumentsPresentationPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-documents-query</FILE>
+<TITLE>GDataDocumentsQuery</TITLE>
+GDataDocumentsQuery
+GDataDocumentsQueryClass
+gdata_documents_query_new
+gdata_documents_query_new_with_limits
+gdata_documents_query_show_deleted
+gdata_documents_query_set_show_deleted
+gdata_documents_query_show_folders
+gdata_documents_query_set_show_folders
+gdata_documents_query_get_folder_id
+gdata_documents_query_set_folder_id
+gdata_documents_query_get_title
+gdata_documents_query_get_exact_title
+gdata_documents_query_set_title
+gdata_documents_query_get_collaborator_addresses
+gdata_documents_query_add_collaborator
+gdata_documents_query_get_reader_addresses
+gdata_documents_query_add_reader
+<SUBSECTION Standard>
+gdata_documents_query_get_type
+GDATA_DOCUMENTS_QUERY
+GDATA_DOCUMENTS_QUERY_CLASS
+GDATA_DOCUMENTS_QUERY_GET_CLASS
+GDATA_IS_DOCUMENTS_QUERY
+GDATA_IS_DOCUMENTS_QUERY_CLASS
+GDATA_TYPE_DOCUMENTS_QUERY
+<SUBSECTION Private>
+GDataDocumentsQueryPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-documents-spreadsheet</FILE>
+<TITLE>GDataDocumentsSpreadsheet</TITLE>
+GDATA_DOCUMENTS_SPREADSHEET_CSV
+GDATA_DOCUMENTS_SPREADSHEET_HTML
+GDATA_DOCUMENTS_SPREADSHEET_ODS
+GDATA_DOCUMENTS_SPREADSHEET_PDF
+GDATA_DOCUMENTS_SPREADSHEET_TSV
+GDATA_DOCUMENTS_SPREADSHEET_XLS
+GDataDocumentsSpreadsheet
+GDataDocumentsSpreadsheetClass
+gdata_documents_spreadsheet_new
+gdata_documents_spreadsheet_get_download_uri
+<SUBSECTION Standard>
+gdata_documents_spreadsheet_get_type
+GDATA_DOCUMENTS_SPREADSHEET
+GDATA_DOCUMENTS_SPREADSHEET_CLASS
+GDATA_DOCUMENTS_SPREADSHEET_GET_CLASS
+GDATA_IS_DOCUMENTS_SPREADSHEET
+GDATA_IS_DOCUMENTS_SPREADSHEET_CLASS
+GDATA_TYPE_DOCUMENTS_SPREADSHEET
+<SUBSECTION Private>
+GDataDocumentsSpreadsheetPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-documents-text</FILE>
+<TITLE>GDataDocumentsText</TITLE>
+GDATA_DOCUMENTS_TEXT_DOC
+GDATA_DOCUMENTS_TEXT_HTML
+GDATA_DOCUMENTS_TEXT_JPEG
+GDATA_DOCUMENTS_TEXT_ODT
+GDATA_DOCUMENTS_TEXT_PDF
+GDATA_DOCUMENTS_TEXT_PNG
+GDATA_DOCUMENTS_TEXT_RTF
+GDATA_DOCUMENTS_TEXT_TXT
+GDATA_DOCUMENTS_TEXT_ZIP
+GDataDocumentsText
+GDataDocumentsTextClass
+gdata_documents_text_new
+<SUBSECTION Standard>
+gdata_documents_text_get_type
+GDATA_DOCUMENTS_TEXT
+GDATA_DOCUMENTS_TEXT_CLASS
+GDATA_DOCUMENTS_TEXT_GET_CLASS
+GDATA_IS_DOCUMENTS_TEXT
+GDATA_IS_DOCUMENTS_TEXT_CLASS
+GDATA_TYPE_DOCUMENTS_TEXT
+<SUBSECTION Private>
+GDataDocumentsTextPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-documents-drawing</FILE>
+<TITLE>GDataDocumentsDrawing</TITLE>
+GDATA_DOCUMENTS_DRAWING_JPEG
+GDATA_DOCUMENTS_DRAWING_PDF
+GDATA_DOCUMENTS_DRAWING_PNG
+GDATA_DOCUMENTS_DRAWING_SVG
+GDataDocumentsDrawing
+GDataDocumentsDrawingClass
+gdata_documents_drawing_new
+<SUBSECTION Standard>
+gdata_documents_drawing_get_type
+GDATA_DOCUMENTS_DRAWING
+GDATA_DOCUMENTS_DRAWING_CLASS
+GDATA_DOCUMENTS_DRAWING_GET_CLASS
+GDATA_IS_DOCUMENTS_DRAWING
+GDATA_IS_DOCUMENTS_DRAWING_CLASS
+GDATA_TYPE_DOCUMENTS_DRAWING
+<SUBSECTION Private>
+GDataDocumentsDrawingPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-documents-pdf</FILE>
+<TITLE>GDataDocumentsPdf</TITLE>
+GDataDocumentsPdf
+GDataDocumentsPdfClass
+gdata_documents_pdf_new
+<SUBSECTION Standard>
+gdata_documents_pdf_get_type
+GDATA_DOCUMENTS_PDF
+GDATA_DOCUMENTS_PDF_CLASS
+GDATA_DOCUMENTS_PDF_GET_CLASS
+GDATA_IS_DOCUMENTS_PDF
+GDATA_IS_DOCUMENTS_PDF_CLASS
+GDATA_TYPE_DOCUMENTS_PDF
+<SUBSECTION Private>
+GDataDocumentsPdfPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-documents-service</FILE>
+<TITLE>GDataDocumentsService</TITLE>
+GDataDocumentsService
+GDataDocumentsServiceClass
+GDataDocumentsServiceError
+gdata_documents_service_new
+gdata_documents_service_get_primary_authorization_domain
+gdata_documents_service_get_spreadsheet_authorization_domain
+gdata_documents_service_get_metadata
+gdata_documents_service_get_metadata_async
+gdata_documents_service_get_metadata_finish
+gdata_documents_service_query_documents
+gdata_documents_service_query_documents_async
+gdata_documents_service_upload_document
+gdata_documents_service_upload_document_resumable
+gdata_documents_service_update_document
+gdata_documents_service_update_document_resumable
+gdata_documents_service_finish_upload
+gdata_documents_service_copy_document
+gdata_documents_service_copy_document_async
+gdata_documents_service_copy_document_finish
+gdata_documents_service_add_entry_to_folder
+gdata_documents_service_add_entry_to_folder_async
+gdata_documents_service_add_entry_to_folder_finish
+gdata_documents_service_remove_entry_from_folder
+gdata_documents_service_remove_entry_from_folder_async
+gdata_documents_service_remove_entry_from_folder_finish
+gdata_documents_service_get_upload_uri
+<SUBSECTION Standard>
+gdata_documents_service_get_type
+GDATA_DOCUMENTS_SERVICE
+GDATA_DOCUMENTS_SERVICE_CLASS
+GDATA_DOCUMENTS_SERVICE_ERROR
+GDATA_DOCUMENTS_SERVICE_GET_CLASS
+GDATA_IS_DOCUMENTS_SERVICE
+GDATA_IS_DOCUMENTS_SERVICE_CLASS
+GDATA_TYPE_DOCUMENTS_SERVICE
+gdata_documents_service_error_quark
+<SUBSECTION Private>
+GDataDocumentsServicePrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-documents-metadata</FILE>
+<TITLE>GDataDocumentsMetadata</TITLE>
+GDataDocumentsMetadata
+GDataDocumentsMetadataClass
+gdata_documents_metadata_get_quota_total
+gdata_documents_metadata_get_quota_used
+<SUBSECTION Standard>
+gdata_documents_metadata_get_type
+GDATA_DOCUMENTS_METADATA
+GDATA_DOCUMENTS_METADATA_CLASS
+GDATA_DOCUMENTS_METADATA_GET_CLASS
+GDATA_IS_DOCUMENTS_METADATA
+GDATA_IS_DOCUMENTS_METADATA_CLASS
+GDATA_TYPE_DOCUMENTS_METADATA
+<SUBSECTION Private>
+GDataDocumentsMetadataPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-download-stream</FILE>
+<TITLE>GDataDownloadStream</TITLE>
+GDataDownloadStream
+GDataDownloadStreamClass
+gdata_download_stream_new
+gdata_download_stream_get_service
+gdata_download_stream_get_authorization_domain
+gdata_download_stream_get_cancellable
+gdata_download_stream_get_download_uri
+gdata_download_stream_get_content_type
+gdata_download_stream_get_content_length
+<SUBSECTION Standard>
+GDATA_DOWNLOAD_STREAM
+GDATA_DOWNLOAD_STREAM_CLASS
+GDATA_DOWNLOAD_STREAM_GET_CLASS
+GDATA_IS_DOWNLOAD_STREAM
+GDATA_IS_DOWNLOAD_STREAM_CLASS
+GDATA_TYPE_DOWNLOAD_STREAM
+gdata_download_stream_get_type
+<SUBSECTION Private>
+GDataDownloadStreamPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-upload-stream</FILE>
+<TITLE>GDataUploadStream</TITLE>
+GDATA_LINK_RESUMABLE_CREATE_MEDIA
+GDATA_LINK_RESUMABLE_EDIT_MEDIA
+GDataUploadStream
+GDataUploadStreamClass
+gdata_upload_stream_new
+gdata_upload_stream_new_resumable
+gdata_upload_stream_get_response
+gdata_upload_stream_get_service
+gdata_upload_stream_get_authorization_domain
+gdata_upload_stream_get_cancellable
+gdata_upload_stream_get_method
+gdata_upload_stream_get_upload_uri
+gdata_upload_stream_get_entry
+gdata_upload_stream_get_slug
+gdata_upload_stream_get_content_type
+gdata_upload_stream_get_content_length
+<SUBSECTION Standard>
+gdata_upload_stream_get_type
+GDATA_UPLOAD_STREAM
+GDATA_UPLOAD_STREAM_CLASS
+GDATA_UPLOAD_STREAM_GET_CLASS
+GDATA_IS_UPLOAD_STREAM
+GDATA_IS_UPLOAD_STREAM_CLASS
+GDATA_TYPE_UPLOAD_STREAM
+<SUBSECTION Private>
+GDataUploadStreamPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-gd-name</FILE>
+<TITLE>GDataGDName</TITLE>
+GDataGDName
+GDataGDNameClass
+gdata_gd_name_new
+gdata_gd_name_get_given_name
+gdata_gd_name_set_given_name
+gdata_gd_name_get_additional_name
+gdata_gd_name_set_additional_name
+gdata_gd_name_get_family_name
+gdata_gd_name_set_family_name
+gdata_gd_name_get_prefix
+gdata_gd_name_set_prefix
+gdata_gd_name_get_suffix
+gdata_gd_name_set_suffix
+gdata_gd_name_get_full_name
+gdata_gd_name_set_full_name
+<SUBSECTION Standard>
+gdata_gd_name_get_type
+GDATA_GD_NAME
+GDATA_GD_NAME_CLASS
+GDATA_GD_NAME_GET_CLASS
+GDATA_IS_GD_NAME
+GDATA_IS_GD_NAME_CLASS
+GDATA_TYPE_GD_NAME
+<SUBSECTION Private>
+GDataGDNamePrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-gcontact-jot</FILE>
+<TITLE>GDataGContactJot</TITLE>
+GDATA_GCONTACT_JOT_HOME
+GDATA_GCONTACT_JOT_KEYWORDS
+GDATA_GCONTACT_JOT_OTHER
+GDATA_GCONTACT_JOT_USER
+GDATA_GCONTACT_JOT_WORK
+GDataGContactJot
+GDataGContactJotClass
+gdata_gcontact_jot_new
+gdata_gcontact_jot_get_content
+gdata_gcontact_jot_set_content
+gdata_gcontact_jot_get_relation_type
+gdata_gcontact_jot_set_relation_type
+<SUBSECTION Standard>
+gdata_gcontact_jot_get_type
+GDATA_GCONTACT_JOT
+GDATA_GCONTACT_JOT_CLASS
+GDATA_GCONTACT_JOT_GET_CLASS
+GDATA_IS_GCONTACT_JOT
+GDATA_IS_GCONTACT_JOT_CLASS
+GDATA_TYPE_GCONTACT_JOT
+<SUBSECTION Private>
+GDataGContactJotPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-gcontact-relation</FILE>
+<TITLE>GDataGContactRelation</TITLE>
+GDATA_GCONTACT_RELATION_ASSISTANT
+GDATA_GCONTACT_RELATION_BROTHER
+GDATA_GCONTACT_RELATION_CHILD
+GDATA_GCONTACT_RELATION_DOMESTIC_PARTNER
+GDATA_GCONTACT_RELATION_FATHER
+GDATA_GCONTACT_RELATION_FRIEND
+GDATA_GCONTACT_RELATION_MANAGER
+GDATA_GCONTACT_RELATION_MOTHER
+GDATA_GCONTACT_RELATION_PARENT
+GDATA_GCONTACT_RELATION_PARTNER
+GDATA_GCONTACT_RELATION_REFERRER
+GDATA_GCONTACT_RELATION_RELATIVE
+GDATA_GCONTACT_RELATION_SISTER
+GDATA_GCONTACT_RELATION_SPOUSE
+GDataGContactRelation
+GDataGContactRelationClass
+gdata_gcontact_relation_new
+gdata_gcontact_relation_get_name
+gdata_gcontact_relation_set_name
+gdata_gcontact_relation_get_relation_type
+gdata_gcontact_relation_set_relation_type
+gdata_gcontact_relation_get_label
+gdata_gcontact_relation_set_label
+<SUBSECTION Standard>
+gdata_gcontact_relation_get_type
+GDATA_GCONTACT_RELATION
+GDATA_GCONTACT_RELATION_CLASS
+GDATA_GCONTACT_RELATION_GET_CLASS
+GDATA_IS_GCONTACT_RELATION
+GDATA_IS_GCONTACT_RELATION_CLASS
+GDATA_TYPE_GCONTACT_RELATION
+<SUBSECTION Private>
+GDataGContactRelationPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-gcontact-website</FILE>
+<TITLE>GDataGContactWebsite</TITLE>
+GDATA_GCONTACT_WEBSITE_HOME_PAGE
+GDATA_GCONTACT_WEBSITE_BLOG
+GDATA_GCONTACT_WEBSITE_PROFILE
+GDATA_GCONTACT_WEBSITE_HOME
+GDATA_GCONTACT_WEBSITE_WORK
+GDATA_GCONTACT_WEBSITE_OTHER
+GDATA_GCONTACT_WEBSITE_FTP
+GDataGContactWebsite
+GDataGContactWebsiteClass
+gdata_gcontact_website_new
+gdata_gcontact_website_get_uri
+gdata_gcontact_website_set_uri
+gdata_gcontact_website_get_relation_type
+gdata_gcontact_website_set_relation_type
+gdata_gcontact_website_get_label
+gdata_gcontact_website_set_label
+gdata_gcontact_website_is_primary
+gdata_gcontact_website_set_is_primary
+<SUBSECTION Standard>
+gdata_gcontact_website_get_type
+GDATA_GCONTACT_WEBSITE
+GDATA_GCONTACT_WEBSITE_CLASS
+GDATA_GCONTACT_WEBSITE_GET_CLASS
+GDATA_IS_GCONTACT_WEBSITE
+GDATA_IS_GCONTACT_WEBSITE_CLASS
+GDATA_TYPE_GCONTACT_WEBSITE
+<SUBSECTION Private>
+GDataGContactWebsitePrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-gcontact-event</FILE>
+<TITLE>GDataGContactEvent</TITLE>
+GDATA_GCONTACT_EVENT_ANNIVERSARY
+GDATA_GCONTACT_EVENT_OTHER
+GDataGContactEvent
+GDataGContactEventClass
+gdata_gcontact_event_new
+gdata_gcontact_event_get_date
+gdata_gcontact_event_set_date
+gdata_gcontact_event_get_relation_type
+gdata_gcontact_event_set_relation_type
+gdata_gcontact_event_get_label
+gdata_gcontact_event_set_label
+<SUBSECTION Standard>
+gdata_gcontact_event_get_type
+GDATA_GCONTACT_EVENT
+GDATA_GCONTACT_EVENT_CLASS
+GDATA_GCONTACT_EVENT_GET_CLASS
+GDATA_IS_GCONTACT_EVENT
+GDATA_IS_GCONTACT_EVENT_CLASS
+GDATA_TYPE_GCONTACT_EVENT
+<SUBSECTION Private>
+GDataGContactEventPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-gcontact-calendar</FILE>
+<TITLE>GDataGContactCalendar</TITLE>
+GDATA_GCONTACT_CALENDAR_HOME
+GDATA_GCONTACT_CALENDAR_WORK
+GDATA_GCONTACT_CALENDAR_FREE_BUSY
+GDataGContactCalendar
+GDataGContactCalendarClass
+gdata_gcontact_calendar_new
+gdata_gcontact_calendar_get_uri
+gdata_gcontact_calendar_set_uri
+gdata_gcontact_calendar_get_relation_type
+gdata_gcontact_calendar_set_relation_type
+gdata_gcontact_calendar_get_label
+gdata_gcontact_calendar_set_label
+gdata_gcontact_calendar_is_primary
+gdata_gcontact_calendar_set_is_primary
+<SUBSECTION Standard>
+gdata_gcontact_calendar_get_type
+GDATA_GCONTACT_CALENDAR
+GDATA_GCONTACT_CALENDAR_CLASS
+GDATA_GCONTACT_CALENDAR_GET_CLASS
+GDATA_IS_GCONTACT_CALENDAR
+GDATA_IS_GCONTACT_CALENDAR_CLASS
+GDATA_TYPE_GCONTACT_CALENDAR
+<SUBSECTION Private>
+GDataGContactCalendarPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-gcontact-external-id</FILE>
+<TITLE>GDataGContactExternalID</TITLE>
+GDATA_GCONTACT_EXTERNAL_ID_ACCOUNT
+GDATA_GCONTACT_EXTERNAL_ID_CUSTOMER
+GDATA_GCONTACT_EXTERNAL_ID_NETWORK
+GDATA_GCONTACT_EXTERNAL_ID_ORGANIZATION
+GDataGContactExternalID
+GDataGContactExternalIDClass
+gdata_gcontact_external_id_new
+gdata_gcontact_external_id_get_value
+gdata_gcontact_external_id_set_value
+gdata_gcontact_external_id_get_relation_type
+gdata_gcontact_external_id_set_relation_type
+gdata_gcontact_external_id_get_label
+gdata_gcontact_external_id_set_label
+<SUBSECTION Standard>
+gdata_gcontact_external_id_get_type
+GDATA_GCONTACT_EXTERNAL_ID
+GDATA_GCONTACT_EXTERNAL_ID_CLASS
+GDATA_GCONTACT_EXTERNAL_ID_GET_CLASS
+GDATA_IS_GCONTACT_EXTERNAL_ID
+GDATA_IS_GCONTACT_EXTERNAL_ID_CLASS
+GDATA_TYPE_GCONTACT_EXTERNAL_ID
+<SUBSECTION Private>
+GDataGContactExternalIDPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-gcontact-language</FILE>
+<TITLE>GDataGContactLanguage</TITLE>
+GDataGContactLanguage
+GDataGContactLanguageClass
+gdata_gcontact_language_new
+gdata_gcontact_language_get_code
+gdata_gcontact_language_set_code
+gdata_gcontact_language_get_label
+gdata_gcontact_language_set_label
+<SUBSECTION Standard>
+gdata_gcontact_language_get_type
+GDATA_GCONTACT_LANGUAGE
+GDATA_GCONTACT_LANGUAGE_CLASS
+GDATA_GCONTACT_LANGUAGE_GET_CLASS
+GDATA_IS_GCONTACT_LANGUAGE
+GDATA_IS_GCONTACT_LANGUAGE_CLASS
+GDATA_TYPE_GCONTACT_LANGUAGE
+<SUBSECTION Private>
+GDataGContactLanguagePrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-youtube-category</FILE>
+<TITLE>GDataYouTubeCategory</TITLE>
+GDataYouTubeCategory
+GDataYouTubeCategoryClass
+gdata_youtube_category_is_assignable
+gdata_youtube_category_is_browsable
+gdata_youtube_category_is_deprecated
+<SUBSECTION Standard>
+gdata_youtube_category_get_type
+GDATA_YOUTUBE_CATEGORY
+GDATA_YOUTUBE_CATEGORY_CLASS
+GDATA_YOUTUBE_CATEGORY_GET_CLASS
+GDATA_IS_YOUTUBE_CATEGORY
+GDATA_IS_YOUTUBE_CATEGORY_CLASS
+GDATA_TYPE_YOUTUBE_CATEGORY
+<SUBSECTION Private>
+GDataYouTubeCategoryPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-app-categories</FILE>
+<TITLE>GDataAPPCategories</TITLE>
+GDataAPPCategories
+GDataAPPCategoriesClass
+gdata_app_categories_get_categories
+gdata_app_categories_is_fixed
+<SUBSECTION Standard>
+gdata_app_categories_get_type
+GDATA_APP_CATEGORIES
+GDATA_APP_CATEGORIES_CLASS
+GDATA_APP_CATEGORIES_GET_CLASS
+GDATA_IS_APP_CATEGORIES
+GDATA_IS_APP_CATEGORIES_CLASS
+GDATA_TYPE_APP_CATEGORIES
+<SUBSECTION Private>
+GDataAPPCategoriesPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-comparable</FILE>
+<TITLE>GDataComparable</TITLE>
+GDataComparable
+GDataComparableIface
+gdata_comparable_compare
+<SUBSECTION Standard>
+gdata_comparable_get_type
+GDATA_COMPARABLE
+GDATA_COMPARABLE_CLASS
+GDATA_COMPARABLE_GET_IFACE
+GDATA_IS_COMPARABLE
+GDATA_TYPE_COMPARABLE
+</SECTION>
+
+<SECTION>
+<FILE>gdata-batch-operation</FILE>
+<TITLE>GDataBatchOperation</TITLE>
+GDataBatchOperation
+GDataBatchOperationClass
+GDataBatchOperationType
+GDataBatchOperationCallback
+gdata_batch_operation_add_query
+gdata_batch_operation_add_insertion
+gdata_batch_operation_add_update
+gdata_batch_operation_add_deletion
+gdata_batch_operation_run
+gdata_batch_operation_run_async
+gdata_batch_operation_run_finish
+gdata_batch_operation_get_service
+gdata_batch_operation_get_authorization_domain
+gdata_batch_operation_get_feed_uri
+<SUBSECTION Standard>
+GDATA_BATCH_OPERATION
+GDATA_IS_BATCH_OPERATION
+GDATA_TYPE_BATCH_OPERATION
+gdata_batch_operation_get_type
+GDATA_BATCH_OPERATION_GET_CLASS
+GDATA_BATCH_OPERATION_CLASS
+GDATA_IS_BATCH_OPERATION_CLASS
+<SUBSECTION Private>
+GDataBatchOperationPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-batchable</FILE>
+<TITLE>GDataBatchable</TITLE>
+GDataBatchable
+GDataBatchableIface
+gdata_batchable_create_operation
+<SUBSECTION Standard>
+gdata_batchable_get_type
+GDATA_BATCHABLE
+GDATA_BATCHABLE_CLASS
+GDATA_BATCHABLE_GET_IFACE
+GDATA_IS_BATCHABLE
+GDATA_TYPE_BATCHABLE
+</SECTION>
+
+<SECTION>
+<FILE>gdata-contacts-group</FILE>
+<TITLE>GDataContactsGroup</TITLE>
+GDATA_CONTACTS_GROUP_CONTACTS
+GDATA_CONTACTS_GROUP_FRIENDS
+GDATA_CONTACTS_GROUP_FAMILY
+GDATA_CONTACTS_GROUP_COWORKERS
+GDataContactsGroup
+GDataContactsGroupClass
+gdata_contacts_group_new
+gdata_contacts_group_get_edited
+gdata_contacts_group_is_deleted
+gdata_contacts_group_get_system_group_id
+gdata_contacts_group_get_extended_property
+gdata_contacts_group_get_extended_properties
+gdata_contacts_group_set_extended_property
+<SUBSECTION Standard>
+GDATA_CONTACTS_GROUP
+GDATA_IS_CONTACTS_GROUP
+GDATA_TYPE_CONTACTS_GROUP
+gdata_contacts_group_get_type
+GDATA_CONTACTS_GROUP_GET_CLASS
+GDATA_CONTACTS_GROUP_CLASS
+GDATA_IS_CONTACTS_GROUP_CLASS
+<SUBSECTION Private>
+GDataContactsGroupPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-authorizer</FILE>
+<TITLE>GDataAuthorizer</TITLE>
+GDataAuthorizer
+GDataAuthorizerInterface
+gdata_authorizer_process_request
+gdata_authorizer_is_authorized_for_domain
+gdata_authorizer_refresh_authorization
+gdata_authorizer_refresh_authorization_async
+gdata_authorizer_refresh_authorization_finish
+<SUBSECTION Standard>
+GDATA_TYPE_AUTHORIZER
+GDATA_AUTHORIZER
+GDATA_AUTHORIZER_CLASS
+GDATA_IS_AUTHORIZER
+GDATA_AUTHORIZER_GET_IFACE
+gdata_authorizer_get_type
+</SECTION>
+
+<SECTION>
+<FILE>gdata-authorization-domain</FILE>
+<TITLE>GDataAuthorizationDomain</TITLE>
+GDataAuthorizationDomain
+GDataAuthorizationDomainClass
+gdata_authorization_domain_get_service_name
+gdata_authorization_domain_get_scope
+<SUBSECTION Standard>
+GDATA_AUTHORIZATION_DOMAIN
+GDATA_IS_AUTHORIZATION_DOMAIN
+GDATA_TYPE_AUTHORIZATION_DOMAIN
+gdata_authorization_domain_get_type
+GDATA_AUTHORIZATION_DOMAIN_GET_CLASS
+GDATA_AUTHORIZATION_DOMAIN_CLASS
+GDATA_IS_AUTHORIZATION_DOMAIN_CLASS
+<SUBSECTION Private>
+GDataAuthorizationDomainPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-client-login-authorizer</FILE>
+<TITLE>GDataClientLoginAuthorizer</TITLE>
+GDataClientLoginAuthorizer
+GDataClientLoginAuthorizerClass
+GDataClientLoginAuthorizerError
+gdata_client_login_authorizer_new
+gdata_client_login_authorizer_new_for_authorization_domains
+gdata_client_login_authorizer_authenticate
+gdata_client_login_authorizer_authenticate_async
+gdata_client_login_authorizer_authenticate_finish
+gdata_client_login_authorizer_get_client_id
+gdata_client_login_authorizer_get_username
+gdata_client_login_authorizer_get_password
+gdata_client_login_authorizer_get_proxy_uri
+gdata_client_login_authorizer_set_proxy_uri
+gdata_client_login_authorizer_get_proxy_resolver
+gdata_client_login_authorizer_set_proxy_resolver
+gdata_client_login_authorizer_get_timeout
+gdata_client_login_authorizer_set_timeout
+<SUBSECTION Standard>
+GDATA_TYPE_CLIENT_LOGIN_AUTHORIZER
+GDATA_CLIENT_LOGIN_AUTHORIZER
+GDATA_CLIENT_LOGIN_AUTHORIZER_CLASS
+GDATA_IS_CLIENT_LOGIN_AUTHORIZER
+GDATA_IS_CLIENT_LOGIN_AUTHORIZER_CLASS
+GDATA_CLIENT_LOGIN_AUTHORIZER_GET_CLASS
+gdata_client_login_authorizer_get_type
+GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR
+gdata_client_login_authorizer_error_quark
+<SUBSECTION Private>
+GDataClientLoginAuthorizerPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-oauth1-authorizer</FILE>
+<TITLE>GDataOAuth1Authorizer</TITLE>
+GDataOAuth1Authorizer
+GDataOAuth1AuthorizerClass
+gdata_oauth1_authorizer_new
+gdata_oauth1_authorizer_new_for_authorization_domains
+gdata_oauth1_authorizer_request_authentication_uri
+gdata_oauth1_authorizer_request_authentication_uri_async
+gdata_oauth1_authorizer_request_authentication_uri_finish
+gdata_oauth1_authorizer_request_authorization
+gdata_oauth1_authorizer_request_authorization_async
+gdata_oauth1_authorizer_request_authorization_finish
+gdata_oauth1_authorizer_get_application_name
+gdata_oauth1_authorizer_get_locale
+gdata_oauth1_authorizer_set_locale
+gdata_oauth1_authorizer_get_proxy_uri
+gdata_oauth1_authorizer_set_proxy_uri
+gdata_oauth1_authorizer_get_proxy_resolver
+gdata_oauth1_authorizer_set_proxy_resolver
+gdata_oauth1_authorizer_get_timeout
+gdata_oauth1_authorizer_set_timeout
+<SUBSECTION Standard>
+GDATA_TYPE_OAUTH1_AUTHORIZER
+GDATA_OAUTH1_AUTHORIZER
+GDATA_OAUTH1_AUTHORIZER_CLASS
+GDATA_IS_OAUTH1_AUTHORIZER
+GDATA_IS_OAUTH1_AUTHORIZER_CLASS
+GDATA_OAUTH1_AUTHORIZER_GET_CLASS
+gdata_oauth1_authorizer_get_type
+<SUBSECTION Private>
+GDataOAuth1AuthorizerPrivate
+</SECTION>
+
+@COMMENT@<SECTION>
+@COMMENT@<FILE>gdata-goa-authorizer</FILE>
+@COMMENT@<TITLE>GDataGoaAuthorizer</TITLE>
+@COMMENT@GDataGoaAuthorizer
+@COMMENT@GDataGoaAuthorizerClass
+@COMMENT@gdata_goa_authorizer_new
+@COMMENT@gdata_goa_authorizer_get_goa_object
+@COMMENT@<SUBSECTION Standard>
+@COMMENT@GDATA_TYPE_GOA_AUTHORIZER
+@COMMENT@GDATA_GOA_AUTHORIZER
+@COMMENT@GDATA_GOA_AUTHORIZER_CLASS
+@COMMENT@GDATA_IS_GOA_AUTHORIZER
+@COMMENT@GDATA_IS_GOA_AUTHORIZER_CLASS
+@COMMENT@GDATA_GOA_AUTHORIZER_GET_CLASS
+@COMMENT@gdata_goa_authorizer_get_type
+@COMMENT@<SUBSECTION Private>
+@COMMENT@GDataGoaAuthorizerPrivate
+@COMMENT@GOA_API_IS_SUBJECT_TO_CHANGE
+@COMMENT@</SECTION>
+
+<SECTION>
+<FILE>gdata-commentable</FILE>
+<TITLE>GDataCommentable</TITLE>
+GDataCommentable
+GDataCommentableInterface
+gdata_commentable_query_comments
+gdata_commentable_query_comments_async
+gdata_commentable_query_comments_finish
+gdata_commentable_insert_comment
+gdata_commentable_insert_comment_async
+gdata_commentable_insert_comment_finish
+gdata_commentable_delete_comment
+gdata_commentable_delete_comment_async
+gdata_commentable_delete_comment_finish
+<SUBSECTION Standard>
+gdata_commentable_get_type
+GDATA_COMMENTABLE
+GDATA_COMMENTABLE_CLASS
+GDATA_COMMENTABLE_GET_IFACE
+GDATA_IS_COMMENTABLE
+GDATA_TYPE_COMMENTABLE
+</SECTION>
+
+<SECTION>
+<FILE>gdata-comment</FILE>
+<TITLE>GDataComment</TITLE>
+GDataComment
+GDataCommentClass
+<SUBSECTION Standard>
+GDATA_TYPE_COMMENT
+GDATA_COMMENT
+GDATA_COMMENT_CLASS
+GDATA_IS_COMMENT
+GDATA_IS_COMMENT_CLASS
+GDATA_COMMENT_GET_CLASS
+gdata_comment_get_type
+<SUBSECTION Private>
+GDataCommentPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-youtube-comment</FILE>
+<TITLE>GDataYouTubeComment</TITLE>
+GDataYouTubeComment
+GDataYouTubeCommentClass
+gdata_youtube_comment_new
+gdata_youtube_comment_get_parent_comment_uri
+gdata_youtube_comment_set_parent_comment_uri
+<SUBSECTION Standard>
+GDATA_TYPE_YOUTUBE_COMMENT
+GDATA_YOUTUBE_COMMENT
+GDATA_YOUTUBE_COMMENT_CLASS
+GDATA_IS_YOUTUBE_COMMENT
+GDATA_IS_YOUTUBE_COMMENT_CLASS
+GDATA_YOUTUBE_COMMENT_GET_CLASS
+gdata_youtube_comment_get_type
+<SUBSECTION Private>
+GDataYouTubeCommentPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-picasaweb-comment</FILE>
+<TITLE>GDataPicasaWebComment</TITLE>
+GDataPicasaWebComment
+GDataPicasaWebCommentClass
+gdata_picasaweb_comment_new
+<SUBSECTION Standard>
+GDATA_TYPE_PICASAWEB_COMMENT
+GDATA_PICASAWEB_COMMENT
+GDATA_PICASAWEB_COMMENT_CLASS
+GDATA_IS_PICASAWEB_COMMENT
+GDATA_IS_PICASAWEB_COMMENT_CLASS
+GDATA_PICASAWEB_COMMENT_GET_CLASS
+gdata_picasaweb_comment_get_type
+<SUBSECTION Private>
+GDataPicasaWebCommentPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-documents-upload-query</FILE>
+<TITLE>GDataDocumentsUploadQuery</TITLE>
+GDataDocumentsUploadQuery
+GDataDocumentsUploadQueryClass
+gdata_documents_upload_query_new
+gdata_documents_upload_query_build_uri
+gdata_documents_upload_query_get_folder
+gdata_documents_upload_query_set_folder
+gdata_documents_upload_query_get_convert
+gdata_documents_upload_query_set_convert
+<SUBSECTION Standard>
+gdata_documents_upload_query_get_type
+GDATA_DOCUMENTS_UPLOAD_QUERY
+GDATA_DOCUMENTS_UPLOAD_QUERY_CLASS
+GDATA_DOCUMENTS_UPLOAD_QUERY_GET_CLASS
+GDATA_IS_DOCUMENTS_UPLOAD_QUERY
+GDATA_IS_DOCUMENTS_UPLOAD_QUERY_CLASS
+GDATA_TYPE_DOCUMENTS_UPLOAD_QUERY
+<SUBSECTION Private>
+GDataDocumentsUploadQueryPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-tasks-service</FILE>
+<TITLE>GDataTasksService</TITLE>
+GDataTasksService
+GDataTasksServiceClass
+gdata_tasks_service_new
+gdata_tasks_service_get_primary_authorization_domain
+gdata_tasks_service_query_all_tasklists
+gdata_tasks_service_query_all_tasklists_async
+gdata_tasks_service_query_tasks
+gdata_tasks_service_query_tasks_async
+gdata_tasks_service_insert_task
+gdata_tasks_service_insert_task_async
+gdata_tasks_service_insert_tasklist
+gdata_tasks_service_insert_tasklist_async
+gdata_tasks_service_delete_task
+gdata_tasks_service_delete_task_async
+gdata_tasks_service_delete_tasklist
+gdata_tasks_service_delete_tasklist_async
+gdata_tasks_service_update_task
+gdata_tasks_service_update_task_async
+gdata_tasks_service_update_tasklist
+gdata_tasks_service_update_tasklist_async
+<SUBSECTION Standard>
+gdata_tasks_service_get_type
+GDATA_TASKS_SERVICE
+GDATA_TASKS_SERVICE_CLASS
+GDATA_TASKS_SERVICE_GET_CLASS
+GDATA_IS_TASKS_SERVICE
+GDATA_IS_TASKS_SERVICE_CLASS
+GDATA_TYPE_TASKS_SERVICE
+<SUBSECTION Private>
+GDataTasksServicePrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-tasks-query</FILE>
+<TITLE>GDataTasksQuery</TITLE>
+GDataTasksQuery
+GDataTasksQueryClass
+gdata_tasks_query_new
+gdata_tasks_query_get_completed_max
+gdata_tasks_query_set_completed_max
+gdata_tasks_query_get_completed_min
+gdata_tasks_query_set_completed_min
+gdata_tasks_query_get_due_max
+gdata_tasks_query_set_due_max
+gdata_tasks_query_get_due_min
+gdata_tasks_query_set_due_min
+gdata_tasks_query_get_show_completed
+gdata_tasks_query_set_show_completed
+gdata_tasks_query_get_show_deleted
+gdata_tasks_query_set_show_deleted
+gdata_tasks_query_get_show_hidden
+gdata_tasks_query_set_show_hidden
+<SUBSECTION Standard>
+gdata_tasks_query_get_type
+GDATA_TASKS_QUERY
+GDATA_TASKS_QUERY_CLASS
+GDATA_TASKS_QUERY_GET_CLASS
+GDATA_IS_TASKS_QUERY
+GDATA_IS_TASKS_QUERY_CLASS
+GDATA_TYPE_TASKS_QUERY
+<SUBSECTION Private>
+GDataTasksQueryPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-tasks-task</FILE>
+<TITLE>GDataTasksTask</TITLE>
+GDATA_TASKS_STATUS_NEEDS_ACTION
+GDATA_TASKS_STATUS_COMPLETED
+GDataTasksTask
+GDataTasksTaskClass
+gdata_tasks_task_new
+gdata_tasks_task_get_parent
+gdata_tasks_task_set_parent
+gdata_tasks_task_get_position
+gdata_tasks_task_set_position
+gdata_tasks_task_get_notes
+gdata_tasks_task_set_notes
+gdata_tasks_task_get_status
+gdata_tasks_task_set_status
+gdata_tasks_task_get_due
+gdata_tasks_task_set_due
+gdata_tasks_task_get_completed
+gdata_tasks_task_set_completed
+gdata_tasks_task_is_deleted
+gdata_tasks_task_set_is_deleted
+gdata_tasks_task_is_hidden
+<SUBSECTION Standard>
+gdata_tasks_task_get_type
+GDATA_TASKS_TASK
+GDATA_TASKS_TASK_CLASS
+GDATA_TASKS_TASK_GET_CLASS
+GDATA_IS_TASKS_TASK
+GDATA_IS_TASKS_TASK_CLASS
+GDATA_TYPE_TASKS_TASK
+<SUBSECTION Private>
+GDataTasksTaskPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-tasks-tasklist</FILE>
+<TITLE>GDataTasksTasklist</TITLE>
+GDataTasksTasklist
+GDataTasksTasklistClass
+gdata_tasks_tasklist_new
+<SUBSECTION Standard>
+gdata_tasks_tasklist_get_type
+GDATA_TASKS_TASKLIST
+GDATA_TASKS_TASKLIST_CLASS
+GDATA_TASKS_TASKLIST_GET_CLASS
+GDATA_IS_TASKS_TASKLIST
+GDATA_IS_TASKS_TASKLIST_CLASS
+GDATA_TYPE_TASKS_TASKLIST
+</SECTION>
+
+<SECTION>
+<FILE>gdata-freebase-service</FILE>
+<TITLE>GDataFreebaseService</TITLE>
+GDataFreebaseService
+GDataFreebaseServiceClass
+gdata_freebase_service_new
+gdata_freebase_service_get_primary_authorization_domain
+gdata_freebase_service_query
+gdata_freebase_service_query_async
+gdata_freebase_service_get_topic
+gdata_freebase_service_get_topic_async
+gdata_freebase_service_search
+gdata_freebase_service_search_async
+gdata_freebase_service_get_image
+<SUBSECTION Standard>
+gdata_freebase_service_get_type
+GDATA_FREEBASE_SERVICE
+GDATA_FREEBASE_SERVICE_CLASS
+GDATA_FREEBASE_SERVICE_GET_CLASS
+GDATA_IS_FREEBASE_SERVICE
+GDATA_IS_FREEBASE_SERVICE_CLASS
+GDATA_TYPE_FREEBASE_SERVICE
+<SUBSECTION Private>
+GDataFreebaseServicePrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-freebase-query</FILE>
+<TITLE>GDataFreebaseQuery</TITLE>
+GDataFreebaseQuery
+GDataFreebaseQueryClass
+gdata_freebase_query_new
+gdata_freebase_query_new_from_variant
+<SUBSECTION Standard>
+gdata_freebase_query_get_type
+GDATA_FREEBASE_QUERY
+GDATA_FREEBASE_QUERY_CLASS
+GDATA_FREEBASE_QUERY_GET_CLASS
+GDATA_IS_FREEBASE_QUERY
+GDATA_IS_FREEBASE_QUERY_CLASS
+GDATA_TYPE_FREEBASE_QUERY
+<SUBSECTION Private>
+GDataFreebaseQueryPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-freebase-result</FILE>
+<TITLE>GDataFreebaseResult</TITLE>
+GDataFreebaseResult
+GDataFreebaseResultClass
+gdata_freebase_result_new
+gdata_freebase_result_dup_variant
+<SUBSECTION Standard>
+gdata_freebase_result_get_type
+GDATA_FREEBASE_RESULT
+GDATA_FREEBASE_RESULT_CLASS
+GDATA_FREEBASE_RESULT_GET_CLASS
+GDATA_IS_FREEBASE_RESULT
+GDATA_IS_FREEBASE_RESULT_CLASS
+GDATA_TYPE_FREEBASE_RESULT
+<SUBSECTION Private>
+GDataFreebaseResultPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-freebase-topic-query</FILE>
+<TITLE>GDataFreebaseTopicQuery</TITLE>
+GDataFreebaseTopicQuery
+GDataFreebaseTopicQueryClass
+gdata_freebase_topic_query_new
+gdata_freebase_topic_query_set_filter
+gdata_freebase_topic_query_get_filter
+gdata_freebase_topic_query_set_language
+gdata_freebase_topic_query_get_language
+<SUBSECTION Standard>
+gdata_freebase_topic_query_get_type
+GDATA_FREEBASE_TOPIC_QUERY
+GDATA_FREEBASE_TOPIC_QUERY_CLASS
+GDATA_FREEBASE_TOPIC_QUERY_GET_CLASS
+GDATA_IS_FREEBASE_TOPIC_QUERY
+GDATA_IS_FREEBASE_TOPIC_QUERY_CLASS
+GDATA_TYPE_FREEBASE_TOPIC_QUERY
+<SUBSECTION Private>
+GDataFreebaseTopicQueryPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-freebase-topic-result</FILE>
+<TITLE>GDataFreebaseTopicResult</TITLE>
+GDataFreebaseTopicResult
+GDataFreebaseTopicResultClass
+gdata_freebase_topic_result_new
+gdata_freebase_topic_result_dup_object
+GDataFreebaseTopicObject
+gdata_freebase_topic_object_ref
+gdata_freebase_topic_object_unref
+gdata_freebase_topic_object_list_properties
+gdata_freebase_topic_object_get_id
+gdata_freebase_topic_object_get_property_count
+gdata_freebase_topic_object_get_property_hits
+gdata_freebase_topic_object_get_property_value
+GDataFreebaseTopicValue
+gdata_freebase_topic_value_ref
+gdata_freebase_topic_value_unref
+gdata_freebase_topic_value_get_property
+gdata_freebase_topic_value_get_text
+gdata_freebase_topic_value_get_language
+gdata_freebase_topic_value_get_creator
+gdata_freebase_topic_value_get_timestamp
+gdata_freebase_topic_value_get_value_type
+gdata_freebase_topic_value_copy_value
+gdata_freebase_topic_value_get_int
+gdata_freebase_topic_value_get_double
+gdata_freebase_topic_value_get_string
+gdata_freebase_topic_value_get_object
+gdata_freebase_topic_value_is_image
+<SUBSECTION Standard>
+gdata_freebase_topic_result_get_type
+gdata_freebase_topic_object_get_type
+gdata_freebase_topic_value_get_type
+GDATA_FREEBASE_TOPIC_RESULT
+GDATA_FREEBASE_TOPIC_RESULT_CLASS
+GDATA_FREEBASE_TOPIC_RESULT_GET_CLASS
+GDATA_IS_FREEBASE_TOPIC_RESULT
+GDATA_IS_FREEBASE_TOPIC_RESULT_CLASS
+GDATA_TYPE_FREEBASE_TOPIC_RESULT
+GDATA_TYPE_FREEBASE_TOPIC_OBJECT
+GDATA_TYPE_FREEBASE_TOPIC_VALUE
+<SUBSECTION Private>
+GDataFreebaseTopicResultPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-freebase-search-query</FILE>
+<TITLE>GDataFreebaseSearchQuery</TITLE>
+GDataFreebaseSearchQuery
+GDataFreebaseSearchQueryClass
+gdata_freebase_search_query_new
+gdata_freebase_search_query_set_language
+gdata_freebase_search_query_get_language
+gdata_freebase_search_query_set_stemmed
+gdata_freebase_search_query_get_stemmed
+GDataFreebaseSearchFilterType
+gdata_freebase_search_query_open_filter
+gdata_freebase_search_query_close_filter
+gdata_freebase_search_query_add_filter
+gdata_freebase_search_query_add_location
+<SUBSECTION Standard>
+gdata_freebase_search_query_get_type
+GDATA_FREEBASE_SEARCH_QUERY
+GDATA_FREEBASE_SEARCH_QUERY_CLASS
+GDATA_FREEBASE_SEARCH_QUERY_GET_CLASS
+GDATA_IS_FREEBASE_SEARCH_QUERY
+GDATA_IS_FREEBASE_SEARCH_QUERY_CLASS
+GDATA_TYPE_FREEBASE_SEARCH_QUERY
+gdata_freebase_search_filter_type_get_type
+GDATA_TYPE_FREEBASE_SEARCH_FILTER_TYPE
+<SUBSECTION Private>
+GDataFreebaseSearchQueryPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-freebase-search-result</FILE>
+<TITLE>GDataFreebaseSearchResult</TITLE>
+GDataFreebaseSearchResult
+GDataFreebaseSearchResultClass
+GDataFreebaseSearchResultItem
+gdata_freebase_search_result_new
+gdata_freebase_search_result_get_num_items
+gdata_freebase_search_result_get_total_hits
+gdata_freebase_search_result_get_item
+gdata_freebase_search_result_item_get_mid
+gdata_freebase_search_result_item_get_id
+gdata_freebase_search_result_item_get_name
+gdata_freebase_search_result_item_get_language
+gdata_freebase_search_result_item_get_notable_id
+gdata_freebase_search_result_item_get_notable_name
+gdata_freebase_search_result_item_get_score
+<SUBSECTION Standard>
+gdata_freebase_search_result_get_type
+gdata_freebase_search_result_item_get_type
+GDATA_FREEBASE_SEARCH_RESULT
+GDATA_FREEBASE_SEARCH_RESULT_CLASS
+GDATA_FREEBASE_SEARCH_RESULT_GET_CLASS
+GDATA_IS_FREEBASE_SEARCH_RESULT
+GDATA_IS_FREEBASE_SEARCH_RESULT_CLASS
+GDATA_TYPE_FREEBASE_SEARCH_RESULT
+GDATA_TYPE_FREEBASE_SEARCH_RESULT_ITEM
+<SUBSECTION Private>
+GDataFreebaseSearchResultPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-oauth2-authorizer</FILE>
+<TITLE>GDataOAuth2Authorizer</TITLE>
+GDATA_OAUTH2_REDIRECT_URI_OOB
+GDATA_OAUTH2_REDIRECT_URI_OOB_AUTO
+GDataOAuth2Authorizer
+GDataOAuth2AuthorizerClass
+gdata_oauth2_authorizer_new
+gdata_oauth2_authorizer_new_for_authorization_domains
+gdata_oauth2_authorizer_build_authentication_uri
+gdata_oauth2_authorizer_request_authorization
+gdata_oauth2_authorizer_request_authorization_async
+gdata_oauth2_authorizer_request_authorization_finish
+gdata_oauth2_authorizer_get_client_id
+gdata_oauth2_authorizer_get_redirect_uri
+gdata_oauth2_authorizer_get_client_secret
+gdata_oauth2_authorizer_dup_refresh_token
+gdata_oauth2_authorizer_set_refresh_token
+gdata_oauth2_authorizer_get_locale
+gdata_oauth2_authorizer_set_locale
+gdata_oauth2_authorizer_get_timeout
+gdata_oauth2_authorizer_set_timeout
+gdata_oauth2_authorizer_get_proxy_resolver
+gdata_oauth2_authorizer_set_proxy_resolver
+<SUBSECTION Standard>
+GDATA_TYPE_OAUTH2_AUTHORIZER
+GDATA_OAUTH2_AUTHORIZER
+GDATA_OAUTH2_AUTHORIZER_CLASS
+GDATA_IS_OAUTH2_AUTHORIZER
+GDATA_IS_OAUTH2_AUTHORIZER_CLASS
+GDATA_OAUTH2_AUTHORIZER_GET_CLASS
+gdata_oauth2_authorizer_get_type
+<SUBSECTION Private>
+GDataOAuth2AuthorizerPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-youtube-feed</FILE>
+<TITLE>GDataYouTubeFeed</TITLE>
+GDataYouTubeFeed
+GDataYouTubeFeedClass
+<SUBSECTION Standard>
+gdata_youtube_feed_get_type
+GDATA_YOUTUBE_FEED
+GDATA_YOUTUBE_FEED_CLASS
+GDATA_YOUTUBE_FEED_GET_CLASS
+GDATA_IS_YOUTUBE_FEED
+GDATA_IS_YOUTUBE_FEED_CLASS
+GDATA_TYPE_YOUTUBE_FEED
+<SUBSECTION Private>
+GDataYouTubeFeedPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-calendar-access-rule</FILE>
+<TITLE>GDataCalendarAccessRule</TITLE>
+GDATA_CALENDAR_ACCESS_ROLE_READ
+GDATA_CALENDAR_ACCESS_ROLE_FREE_BUSY
+GDATA_CALENDAR_ACCESS_ROLE_EDITOR
+GDATA_CALENDAR_ACCESS_ROLE_OWNER
+GDATA_CALENDAR_ACCESS_ROLE_ROOT
+GDataCalendarAccessRule
+GDataCalendarAccessRuleClass
+gdata_calendar_access_rule_new
+<SUBSECTION Standard>
+gdata_calendar_access_rule_get_type
+GDATA_CALENDAR_ACCESS_RULE
+GDATA_CALENDAR_ACCESS_RULE_CLASS
+GDATA_CALENDAR_ACCESS_RULE_GET_CLASS
+GDATA_IS_CALENDAR_ACCESS_RULE
+GDATA_IS_CALENDAR_ACCESS_RULE_CLASS
+GDATA_TYPE_CALENDAR_ACCESS_RULE
+<SUBSECTION Private>
+GDataCalendarAccessRulePrivate
+</SECTION>
+
+<SECTION>
+<FILE>gdata-documents-access-rule</FILE>
+<TITLE>GDataDocumentsAccessRule</TITLE>
+GDataDocumentsAccessRule
+GDataDocumentsAccessRuleClass
+gdata_documents_access_rule_new
+<SUBSECTION Standard>
+gdata_documents_access_rule_get_type
+GDATA_DOCUMENTS_ACCESS_RULE
+GDATA_DOCUMENTS_ACCESS_RULE_CLASS
+GDATA_DOCUMENTS_ACCESS_RULE_GET_CLASS
+GDATA_IS_DOCUMENTS_ACCESS_RULE
+GDATA_IS_DOCUMENTS_ACCESS_RULE_CLASS
+GDATA_TYPE_DOCUMENTS_ACCESS_RULE
+<SUBSECTION Private>
+GDataDocumentsAccessRulePrivate
+</SECTION>
--- /dev/null
+subdir('xml')
+
+doc_module = 'gdata'
+
+ignore_headers = [
+ 'common.h',
+ 'gdata-batch-feed.h',
+ 'gdata-batch-private.h',
+ 'gdata-buffer.h',
+ 'gdata-documents-enums.h',
+ 'gdata-documents-utils.h',
+ 'gdata-dummy-authorizer.h',
+ 'gdata-enums.h',
+ 'gdata-exif-tags.h',
+ 'gdata-gd-feed-link.h',
+ 'gdata-georss-where.h',
+ 'gdata-marshal.h',
+ 'gdata-media-enums.h',
+ 'gdata-media-group.h',
+ 'gdata-parser.h',
+ 'gdata-picasaweb-enums.h',
+ 'gdata-private.h',
+ 'gdata-youtube-enums.h',
+ 'mock-resolver.h',
+ 'mock-server.h',
+ # FIXME: these files are created by enums workaround
+ 'gdata-documents-enums-in.h',
+ 'gdata-enums-in.h',
+ 'gdata-freebase-enums-in.h',
+ 'gdata-media-enums-in.h',
+ 'gdata-picasaweb-enums-in.h',
+ 'gdata-youtube-enums-in.h',
+]
+
+ignore_files = []
+
+if not enable_goa
+ ignore_headers += ['gdata-goa-authorizer.h']
+ ignore_files += ['gdata-goa-authorizer.c']
+endif
+
+scan_args = [
+ '--rebuild-types',
+ '--deprecated-guards=LIBGDATA_DISABLE_DEPRECATED',
+]
+
+content_files = [
+ 'gdata-overview.xml',
+ 'gdata-running.xml',
+]
+
+# Images to copy into HTML directory.
+html_assets = [
+ 'structure.png',
+ 'data-flow.png',
+ 'cancellation.png',
+]
+
+content_files += configure_file(
+ input: 'gdata-sections.txt.in',
+ output: '@BASENAME@',
+ configuration: {'COMMENT': (enable_goa) ? '': '#'},
+)
+
+gnome.gtkdoc(
+ doc_module,
+ main_xml: doc_module + '-docs.xml',
+ src_dir: gdata_inc_dir,
+ ignore_headers: ignore_headers,
+ dependencies: libgdata_dep,
+ namespace: doc_module,
+ scan_args: scan_args,
+ mkdb_args: '--ignore-files=' + ' '.join(ignore_files),
+ fixxref_args: '--html-dir=' + (gdata_prefix / gnome.gtkdoc_html_dir(gdata_name)),
+ content_files: content_files,
+ html_assets: html_assets,
+ install: true,
+)
--- /dev/null
+<!ENTITY package "@PACKAGE@">
+<!ENTITY package_bugreport "@PACKAGE_BUGREPORT@">
+<!ENTITY package_name "@PACKAGE_NAME@">
+<!ENTITY package_string "@PACKAGE_STRING@">
+<!ENTITY package_tarname "@PACKAGE_TARNAME@">
+<!ENTITY package_url "@PACKAGE_URL@">
+<!ENTITY package_version "@PACKAGE_VERSION@">
--- /dev/null
+ent_conf = {
+ 'PACKAGE': gdata_name,
+ 'PACKAGE_BUGREPORT': 'https://gitlab.gnome.org/GNOME/libgdata/issues',
+ 'PACKAGE_NAME': gdata_name,
+ 'PACKAGE_STRING': '@0@ @1@'.format(gdata_name, gdata_version),
+ 'PACKAGE_TARNAME': gdata_name,
+ 'PACKAGE_URL': 'https://wiki.gnome.org/Projects/libgdata',
+ 'PACKAGE_VERSION': gdata_version,
+}
+
+configure_file(
+ input: 'gtkdocentities.ent.in',
+ output: '@BASENAME@',
+ configuration: ent_conf,
+)
--- /dev/null
+Color struct
+
+Parsable.get_xml#method skip
+Parsable.get_json#method skip
+Query.get_query_uri#method skip
+DOCUMENTS_PRESENTATION_* name="DOCUMENTS_PRESENTATION_(.+)" parent="GData.DocumentsPresentationFormat"
+DOCUMENTS_TEXT_* name="DOCUMENTS_TEXT_(.+)" parent="GData.DocumentsTextFormat"
+DOCUMENTS_SPREADSHEET_* name="DOCUMENTS_SPREADSHEET_(.+)" parent="GData.DocumentsSpreadsheetFormat"
+CONTACTS_GENDER_* name="CONTACTS_GENDER_(.+)" parent="GData.ContactsGender"
+CONTACTS_GROUP_* name="CONTACTS_GROUP_(.+)" parent="GData.ContactsGroupType"
+CONTACTS_PRIORITY_* name="CONTACTS_PRIORITY_(.+)" parent="GData.ContactsPriority"
+CONTACTS_SENSITIVITY_* name="CONTACTS_SENSITIVITY_(.+)" parent="GData.ContactsSensitivity"
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010, 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-app-categories
+ * @short_description: GData APP categories object
+ * @stability: Stable
+ * @include: gdata/app/gdata-app-categories.h
+ *
+ * #GDataAPPCategories is a list of categories (#GDataCategory) returned as the result of querying an
+ * <ulink type="http" url="http://www.atomenabled.org/developers/protocol/#category">Atom Publishing Protocol Category Document</ulink>.
+ *
+ * Since: 0.7.0
+ */
+
+#include <config.h>
+#include <glib.h>
+
+#include "gdata-app-categories.h"
+#include "atom/gdata-category.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+
+static void gdata_app_categories_dispose (GObject *object);
+static void gdata_app_categories_finalize (GObject *object);
+static void gdata_app_categories_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static gboolean
+parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data,
+ GError **error);
+static gboolean
+post_parse_json (GDataParsable *parsable, gpointer user_data, GError **error);
+static const gchar *
+get_content_type (void);
+
+struct _GDataAPPCategoriesPrivate {
+ GList *categories;
+ gchar *scheme;
+ gboolean fixed;
+};
+
+enum {
+ PROP_IS_FIXED = 1
+};
+
+G_DEFINE_TYPE (GDataAPPCategories, gdata_app_categories, GDATA_TYPE_PARSABLE)
+
+static void
+gdata_app_categories_class_init (GDataAPPCategoriesClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataAPPCategoriesPrivate));
+
+ gobject_class->get_property = gdata_app_categories_get_property;
+ gobject_class->dispose = gdata_app_categories_dispose;
+ gobject_class->finalize = gdata_app_categories_finalize;
+
+ parsable_class->parse_json = parse_json;
+ parsable_class->post_parse_json = post_parse_json;
+ parsable_class->get_content_type = get_content_type;
+
+ parsable_class->element_name = "categories";
+ parsable_class->element_namespace = "app";
+
+ /**
+ * GDataAPPCategories:is-fixed:
+ *
+ * Whether entries may use categories not in this category list.
+ *
+ * API reference: <ulink type="http" url="http://www.atomenabled.org/developers/protocol/#appCategories2">app:categories</ulink>
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_IS_FIXED,
+ g_param_spec_boolean ("is-fixed",
+ "Fixed?", "Whether entries may use categories not in this category list.",
+ FALSE,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_app_categories_init (GDataAPPCategories *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_APP_CATEGORIES, GDataAPPCategoriesPrivate);
+}
+
+static void
+gdata_app_categories_dispose (GObject *object)
+{
+ GDataAPPCategoriesPrivate *priv = GDATA_APP_CATEGORIES (object)->priv;
+
+ g_list_free_full (priv->categories, g_object_unref);
+ priv->categories = NULL;
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_app_categories_parent_class)->dispose (object);
+}
+
+static void
+gdata_app_categories_finalize (GObject *object)
+{
+ GDataAPPCategoriesPrivate *priv = GDATA_APP_CATEGORIES (object)->priv;
+
+ g_free (priv->scheme);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_app_categories_parent_class)->finalize (object);
+}
+
+static void
+gdata_app_categories_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataAPPCategoriesPrivate *priv = GDATA_APP_CATEGORIES (object)->priv;
+
+ switch (property_id) {
+ case PROP_IS_FIXED:
+ g_value_set_boolean (value, priv->fixed);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+/* Reference: https://developers.google.com/youtube/v3/docs/videoCategories/list */
+static gboolean
+parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error)
+{
+ GDataAPPCategories *self = GDATA_APP_CATEGORIES (parsable);
+ GDataAPPCategoriesPrivate *priv = self->priv;
+ GType category_type;
+
+ category_type = (user_data == NULL) ?
+ GDATA_TYPE_CATEGORY : GPOINTER_TO_SIZE (user_data);
+
+ if (g_strcmp0 (json_reader_get_member_name (reader), "items") == 0) {
+ guint i, elements;
+
+ /* Loop through the elements array. */
+ for (i = 0, elements = (guint) json_reader_count_elements (reader); i < elements; i++) {
+ GDataCategory *category = NULL;
+ const gchar *id, *title;
+ const GError *child_error = NULL;
+
+ json_reader_read_element (reader, i);
+
+ json_reader_read_member (reader, "id");
+ id = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "snippet");
+
+ json_reader_read_member (reader, "title");
+ title = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ child_error = json_reader_get_error (reader);
+
+ if (child_error != NULL) {
+ return gdata_parser_error_from_json_error (reader,
+ child_error,
+ error);
+ }
+
+ /* Create the category. */
+ category = g_object_new (category_type,
+ "term", id,
+ "label", title,
+ NULL);
+ priv->categories = g_list_prepend (priv->categories,
+ category);
+
+ json_reader_end_member (reader); /* snippet */
+ json_reader_end_element (reader); /* category */
+ }
+
+ return TRUE;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "kind") == 0 ||
+ g_strcmp0 (json_reader_get_member_name (reader), "etag") == 0 ||
+ g_strcmp0 (json_reader_get_member_name (reader), "id") == 0) {
+ /* Ignore. */
+ return TRUE;
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_app_categories_parent_class)->parse_json (parsable, reader, user_data, error);
+ }
+}
+
+static gboolean
+post_parse_json (GDataParsable *parsable, gpointer user_data, GError **error)
+{
+ GDataAPPCategoriesPrivate *priv = GDATA_APP_CATEGORIES (parsable)->priv;
+
+ /* Reverse our lists of stuff. */
+ priv->categories = g_list_reverse (priv->categories);
+
+ return TRUE;
+}
+
+static const gchar *
+get_content_type (void)
+{
+ return "application/json";
+}
+
+/**
+ * gdata_app_categories_get_categories:
+ * @self: a #GDataAPPCategories
+ *
+ * Returns a list of the categories in this category list.
+ *
+ * Return value: (element-type GData.Category) (transfer none): a #GList of #GDataCategorys
+ *
+ * Since: 0.7.0
+ */
+GList *
+gdata_app_categories_get_categories (GDataAPPCategories *self)
+{
+ g_return_val_if_fail (GDATA_IS_APP_CATEGORIES (self), NULL);
+ return self->priv->categories;
+}
+
+/**
+ * gdata_app_categories_is_fixed:
+ * @self: a #GDataAPPCategories
+ *
+ * Returns #GDataAPPCategories:is-fixed.
+ *
+ * Return value: whether entries may use categories not in this category list
+ *
+ * Since: 0.7.0
+ */
+gboolean
+gdata_app_categories_is_fixed (GDataAPPCategories *self)
+{
+ g_return_val_if_fail (GDATA_IS_APP_CATEGORIES (self), FALSE);
+ return self->priv->fixed;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_APP_CATEGORIES_H
+#define GDATA_APP_CATEGORIES_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_APP_CATEGORIES (gdata_app_categories_get_type ())
+#define GDATA_APP_CATEGORIES(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_APP_CATEGORIES, GDataAPPCategories))
+#define GDATA_APP_CATEGORIES_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_APP_CATEGORIES, GDataAPPCategoriesClass))
+#define GDATA_IS_APP_CATEGORIES(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_APP_CATEGORIES))
+#define GDATA_IS_APP_CATEGORIES_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_APP_CATEGORIES))
+#define GDATA_APP_CATEGORIES_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_APP_CATEGORIES, GDataAPPCategoriesClass))
+
+typedef struct _GDataAPPCategoriesPrivate GDataAPPCategoriesPrivate;
+
+/**
+ * GDataAPPCategories:
+ *
+ * All the fields in the #GDataAPPCategories structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsable parent;
+ GDataAPPCategoriesPrivate *priv;
+} GDataAPPCategories;
+
+/**
+ * GDataAPPCategoriesClass:
+ *
+ * All the fields in the #GDataAPPCategoriesClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataAPPCategoriesClass;
+
+GType gdata_app_categories_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataAPPCategories, g_object_unref)
+
+GList *gdata_app_categories_get_categories (GDataAPPCategories *self) G_GNUC_PURE;
+gboolean gdata_app_categories_is_fixed (GDataAPPCategories *self) G_GNUC_PURE;
+
+G_END_DECLS
+
+#endif /* !GDATA_APP_CATEGORIES_H */
--- /dev/null
+headers = files('gdata-app-categories.h')
+
+install_headers(
+ headers,
+ subdir: gdata_include_subdir / 'app',
+)
+
+gir_headers += headers
+
+sources += files('gdata-app-categories.c')
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-author
+ * @short_description: Atom author element
+ * @stability: Stable
+ * @include: gdata/atom/gdata-author.h
+ *
+ * #GDataAuthor represents a "author" element from the
+ * <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php">Atom specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+
+#include "gdata-author.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-comparable.h"
+
+static void gdata_author_comparable_init (GDataComparableIface *iface);
+static void gdata_author_finalize (GObject *object);
+static void gdata_author_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_author_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error);
+static gboolean post_parse_xml (GDataParsable *parsable, gpointer user_data, GError **error);
+static void get_xml (GDataParsable *parsable, GString *xml_string);
+
+struct _GDataAuthorPrivate {
+ gchar *name;
+ gchar *uri;
+ gchar *email_address;
+};
+
+enum {
+ PROP_NAME = 1,
+ PROP_URI,
+ PROP_EMAIL_ADDRESS
+};
+
+G_DEFINE_TYPE_WITH_CODE (GDataAuthor, gdata_author, GDATA_TYPE_PARSABLE,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_author_comparable_init))
+
+static void
+gdata_author_class_init (GDataAuthorClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataAuthorPrivate));
+
+ gobject_class->set_property = gdata_author_set_property;
+ gobject_class->get_property = gdata_author_get_property;
+ gobject_class->finalize = gdata_author_finalize;
+
+ parsable_class->parse_xml = parse_xml;
+ parsable_class->post_parse_xml = post_parse_xml;
+ parsable_class->get_xml = get_xml;
+ parsable_class->element_name = "author";
+
+ /**
+ * GDataAuthor:name:
+ *
+ * A human-readable name for the person.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.author">Atom specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_NAME,
+ g_param_spec_string ("name",
+ "Name", "A human-readable name for the person.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataAuthor:uri:
+ *
+ * An IRI associated with the person.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.author">Atom specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_URI,
+ g_param_spec_string ("uri",
+ "URI", "An IRI associated with the person.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataAuthor:email-address:
+ *
+ * An e-mail address associated with the person.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.author">Atom specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_EMAIL_ADDRESS,
+ g_param_spec_string ("email-address",
+ "E-mail address", "An e-mail address associated with the person.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static gint
+compare_with (GDataComparable *self, GDataComparable *other)
+{
+ return g_strcmp0 (((GDataAuthor*) self)->priv->name, ((GDataAuthor*) other)->priv->name);
+}
+
+static void
+gdata_author_comparable_init (GDataComparableIface *iface)
+{
+ iface->compare_with = compare_with;
+}
+
+static void
+gdata_author_init (GDataAuthor *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_AUTHOR, GDataAuthorPrivate);
+}
+
+static void
+gdata_author_finalize (GObject *object)
+{
+ GDataAuthorPrivate *priv = GDATA_AUTHOR (object)->priv;
+
+ g_free (priv->name);
+ g_free (priv->uri);
+ g_free (priv->email_address);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_author_parent_class)->finalize (object);
+}
+
+static void
+gdata_author_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataAuthorPrivate *priv = GDATA_AUTHOR (object)->priv;
+
+ switch (property_id) {
+ case PROP_NAME:
+ g_value_set_string (value, priv->name);
+ break;
+ case PROP_URI:
+ g_value_set_string (value, priv->uri);
+ break;
+ case PROP_EMAIL_ADDRESS:
+ g_value_set_string (value, priv->email_address);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_author_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataAuthor *self = GDATA_AUTHOR (object);
+
+ switch (property_id) {
+ case PROP_NAME:
+ gdata_author_set_name (self, g_value_get_string (value));
+ break;
+ case PROP_URI:
+ gdata_author_set_uri (self, g_value_get_string (value));
+ break;
+ case PROP_EMAIL_ADDRESS:
+ gdata_author_set_email_address (self, g_value_get_string (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ gboolean success;
+ GDataAuthorPrivate *priv = GDATA_AUTHOR (parsable)->priv;
+
+ if (gdata_parser_is_namespace (node, "http://www.w3.org/2005/Atom") == TRUE &&
+ (gdata_parser_string_from_element (node, "name", P_NO_DUPES | P_REQUIRED | P_NON_EMPTY, &(priv->name), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "uri", P_NO_DUPES | P_REQUIRED | P_NON_EMPTY, &(priv->uri), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "email", P_NO_DUPES | P_REQUIRED | P_NON_EMPTY, &(priv->email_address), &success, error) == TRUE
+ )) {
+ return success;
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_author_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ }
+}
+
+static gboolean
+post_parse_xml (GDataParsable *parsable, gpointer user_data, GError **error)
+{
+ GDataAuthorPrivate *priv = GDATA_AUTHOR (parsable)->priv;
+
+ if (priv->name == NULL || *(priv->name) == '\0')
+ return gdata_parser_error_required_element_missing ("name", "author", error);
+
+ return TRUE;
+}
+
+static void
+get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataAuthorPrivate *priv = GDATA_AUTHOR (parsable)->priv;
+
+ gdata_parser_string_append_escaped (xml_string, "<name>", priv->name, "</name>");
+
+ if (priv->uri != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<uri>", priv->uri, "</uri>");
+
+ if (priv->email_address != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<email>", priv->email_address, "</email>");
+}
+
+/**
+ * gdata_author_new:
+ * @name: the author's name
+ * @uri: (allow-none): an IRI describing the author, or %NULL
+ * @email_address: (allow-none): the author's e-mail address, or %NULL
+ *
+ * Creates a new #GDataAuthor. More information is available in the <ulink type="http"
+ * url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.author">Atom specification</ulink>.
+ *
+ * @name must be non-%NULL and non-empty.
+ *
+ * Return value: a new #GDataAuthor, or %NULL; unref with g_object_unref()
+ */
+GDataAuthor *
+gdata_author_new (const gchar *name, const gchar *uri, const gchar *email_address)
+{
+ g_return_val_if_fail (name != NULL && *name != '\0', NULL);
+ return g_object_new (GDATA_TYPE_AUTHOR, "name", name, "uri", uri, "email-address", email_address, NULL);
+}
+
+/**
+ * gdata_author_get_name:
+ * @self: a #GDataAuthor
+ *
+ * Gets the #GDataAuthor:name property. The name will always be a non-%NULL, non-empty string.
+ *
+ * Return value: the author's name
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_author_get_name (GDataAuthor *self)
+{
+ g_return_val_if_fail (GDATA_IS_AUTHOR (self), NULL);
+ return self->priv->name;
+}
+
+/**
+ * gdata_author_set_name:
+ * @self: a #GDataAuthor
+ * @name: the new name for the author
+ *
+ * Sets the #GDataAuthor:name property to @name. @name must be non-%NULL and non-empty.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_author_set_name (GDataAuthor *self, const gchar *name)
+{
+ g_return_if_fail (GDATA_IS_AUTHOR (self));
+ g_return_if_fail (name != NULL && *name != '\0');
+
+ g_free (self->priv->name);
+ self->priv->name = g_strdup (name);
+ g_object_notify (G_OBJECT (self), "name");
+}
+
+/**
+ * gdata_author_get_uri:
+ * @self: a #GDataAuthor
+ *
+ * Gets the #GDataAuthor:uri property. If the URI is non-%NULL, it will be non-empty.
+ *
+ * Return value: the author's URI, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_author_get_uri (GDataAuthor *self)
+{
+ g_return_val_if_fail (GDATA_IS_AUTHOR (self), NULL);
+ return self->priv->uri;
+}
+
+/**
+ * gdata_author_set_uri:
+ * @self: a #GDataAuthor
+ * @uri: (allow-none): the new URI for the author, or %NULL
+ *
+ * Sets the #GDataAuthor:uri property to @uri. @uri must be %NULL or non-empty.
+ *
+ * Set @uri to %NULL to unset the property in the author.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_author_set_uri (GDataAuthor *self, const gchar *uri)
+{
+ g_return_if_fail (GDATA_IS_AUTHOR (self));
+
+ g_free (self->priv->uri);
+ self->priv->uri = g_strdup (uri);
+ g_object_notify (G_OBJECT (self), "uri");
+}
+
+/**
+ * gdata_author_get_email_address:
+ * @self: a #GDataAuthor
+ *
+ * Gets the #GDataAuthor:email-address property. If the e-mail address is non-%NULL, it will be non-empty.
+ *
+ * Return value: the author's e-mail address, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_author_get_email_address (GDataAuthor *self)
+{
+ g_return_val_if_fail (GDATA_IS_AUTHOR (self), NULL);
+ return self->priv->email_address;
+}
+
+/**
+ * gdata_author_set_email_address:
+ * @self: a #GDataAuthor
+ * @email_address: (allow-none): the new e-mail address for the author, or %NULL
+ *
+ * Sets the #GDataAuthor:email-address property to @email_address. @email_address must be %NULL or non-empty.
+ *
+ * Set @email_address to %NULL to unset the property in the author.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_author_set_email_address (GDataAuthor *self, const gchar *email_address)
+{
+ g_return_if_fail (GDATA_IS_AUTHOR (self));
+
+ g_free (self->priv->email_address);
+ self->priv->email_address = g_strdup (email_address);
+ g_object_notify (G_OBJECT (self), "email-address");
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_AUTHOR_H
+#define GDATA_AUTHOR_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_AUTHOR (gdata_author_get_type ())
+#define GDATA_AUTHOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_AUTHOR, GDataAuthor))
+#define GDATA_AUTHOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_AUTHOR, GDataAuthorClass))
+#define GDATA_IS_AUTHOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_AUTHOR))
+#define GDATA_IS_AUTHOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_AUTHOR))
+#define GDATA_AUTHOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_AUTHOR, GDataAuthorClass))
+
+typedef struct _GDataAuthorPrivate GDataAuthorPrivate;
+
+/**
+ * GDataAuthor:
+ *
+ * All the fields in the #GDataAuthor structure are private and should never be accessed directly.
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataAuthorPrivate *priv;
+} GDataAuthor;
+
+/**
+ * GDataAuthorClass:
+ *
+ * All the fields in the #GDataAuthorClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataAuthorClass;
+
+GType gdata_author_get_type (void) G_GNUC_CONST;
+
+GDataAuthor *gdata_author_new (const gchar *name, const gchar *uri, const gchar *email_address) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_author_get_name (GDataAuthor *self) G_GNUC_PURE;
+void gdata_author_set_name (GDataAuthor *self, const gchar *name);
+
+const gchar *gdata_author_get_uri (GDataAuthor *self) G_GNUC_PURE;
+void gdata_author_set_uri (GDataAuthor *self, const gchar *uri);
+
+const gchar *gdata_author_get_email_address (GDataAuthor *self) G_GNUC_PURE;
+void gdata_author_set_email_address (GDataAuthor *self, const gchar *email_address);
+
+G_END_DECLS
+
+#endif /* !GDATA_AUTHOR_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-category
+ * @short_description: Atom category element
+ * @stability: Stable
+ * @include: gdata/atom/gdata-category.h
+ *
+ * #GDataCategory represents a "category" element from the
+ * <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php">Atom specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+
+#include "gdata-category.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-comparable.h"
+
+static void gdata_category_comparable_init (GDataComparableIface *iface);
+static void gdata_category_finalize (GObject *object);
+static void gdata_category_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_category_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static void pre_get_xml (GDataParsable *parsable, GString *xml_string);
+
+struct _GDataCategoryPrivate {
+ gchar *term;
+ gchar *scheme;
+ gchar *label;
+};
+
+enum {
+ PROP_TERM = 1,
+ PROP_SCHEME,
+ PROP_LABEL
+};
+
+G_DEFINE_TYPE_WITH_CODE (GDataCategory, gdata_category, GDATA_TYPE_PARSABLE,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_category_comparable_init))
+
+static void
+gdata_category_class_init (GDataCategoryClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataCategoryPrivate));
+
+ gobject_class->set_property = gdata_category_set_property;
+ gobject_class->get_property = gdata_category_get_property;
+ gobject_class->finalize = gdata_category_finalize;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ parsable_class->pre_get_xml = pre_get_xml;
+ parsable_class->element_name = "category";
+
+ /**
+ * GDataCategory:term:
+ *
+ * Identifies the category to which the entry or feed belongs.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.category">
+ * Atom specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_TERM,
+ g_param_spec_string ("term",
+ "Term", "Identifies the category to which the entry or feed belongs.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCategory:scheme:
+ *
+ * An IRI that identifies a categorization scheme.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.category">
+ * Atom specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SCHEME,
+ g_param_spec_string ("scheme",
+ "Scheme", "An IRI that identifies a categorization scheme.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCategory:label:
+ *
+ * A human-readable label for display in end-user applications.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.category">
+ * Atom specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LABEL,
+ g_param_spec_string ("label",
+ "Label", "A human-readable label for display in end-user applications.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static gint
+compare_with (GDataComparable *self, GDataComparable *other)
+{
+ return g_strcmp0 (((GDataCategory*) self)->priv->term, ((GDataCategory*) other)->priv->term);
+}
+
+static void
+gdata_category_comparable_init (GDataComparableIface *iface)
+{
+ iface->compare_with = compare_with;
+}
+
+static void
+gdata_category_init (GDataCategory *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_CATEGORY, GDataCategoryPrivate);
+}
+
+static void
+gdata_category_finalize (GObject *object)
+{
+ GDataCategoryPrivate *priv = GDATA_CATEGORY (object)->priv;
+
+ g_free (priv->term);
+ g_free (priv->scheme);
+ g_free (priv->label);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_category_parent_class)->finalize (object);
+}
+
+static void
+gdata_category_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataCategoryPrivate *priv = GDATA_CATEGORY (object)->priv;
+
+ switch (property_id) {
+ case PROP_TERM:
+ g_value_set_string (value, priv->term);
+ break;
+ case PROP_SCHEME:
+ g_value_set_string (value, priv->scheme);
+ break;
+ case PROP_LABEL:
+ g_value_set_string (value, priv->label);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_category_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataCategory *self = GDATA_CATEGORY (object);
+
+ switch (property_id) {
+ case PROP_TERM:
+ gdata_category_set_term (self, g_value_get_string (value));
+ break;
+ case PROP_SCHEME:
+ gdata_category_set_scheme (self, g_value_get_string (value));
+ break;
+ case PROP_LABEL:
+ gdata_category_set_label (self, g_value_get_string (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ xmlChar *term, *scheme;
+ GDataCategory *self = GDATA_CATEGORY (parsable);
+
+ term = xmlGetProp (root_node, (xmlChar*) "term");
+ if (term == NULL || *term == '\0') {
+ xmlFree (term);
+ return gdata_parser_error_required_property_missing (root_node, "term", error);
+ }
+
+ scheme = xmlGetProp (root_node, (xmlChar*) "scheme");
+ if (scheme != NULL && *scheme == '\0') {
+ xmlFree (term);
+ xmlFree (scheme);
+ return gdata_parser_error_required_property_missing (root_node, "scheme", error);
+ }
+
+ self->priv->term = (gchar*) term;
+ self->priv->scheme = (gchar*) scheme;
+ self->priv->label = (gchar*) xmlGetProp (root_node, (xmlChar*) "label");
+
+ return TRUE;
+}
+
+static void
+pre_get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataCategoryPrivate *priv = GDATA_CATEGORY (parsable)->priv;
+
+ gdata_parser_string_append_escaped (xml_string, " term='", priv->term, "'");
+
+ if (priv->scheme != NULL)
+ gdata_parser_string_append_escaped (xml_string, " scheme='", priv->scheme, "'");
+
+ if (priv->label != NULL)
+ gdata_parser_string_append_escaped (xml_string, " label='", priv->label, "'");
+}
+
+/**
+ * gdata_category_new:
+ * @term: a category identifier
+ * @scheme: (allow-none): an IRI to define the categorisation scheme, or %NULL
+ * @label: (allow-none): a human-readable label for the category, or %NULL
+ *
+ * Creates a new #GDataCategory. More information is available in the <ulink type="http"
+ * url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.category">Atom specification</ulink>.
+ *
+ * @term must be non-%NULL and non-empty. @scheme must be %NULL or non-empty.
+ *
+ * Return value: a new #GDataCategory, or %NULL; unref with g_object_unref()
+ */
+GDataCategory *
+gdata_category_new (const gchar *term, const gchar *scheme, const gchar *label)
+{
+ g_return_val_if_fail (term != NULL && *term != '\0', NULL);
+ g_return_val_if_fail (scheme == NULL || *scheme != '\0', NULL);
+ return g_object_new (GDATA_TYPE_CATEGORY, "term", term, "scheme", scheme, "label", label, NULL);
+}
+
+/**
+ * gdata_category_get_term:
+ * @self: a #GDataCategory
+ *
+ * Gets the #GDataCategory:term property. The term will always be a non-%NULL, non-empty string.
+ *
+ * Return value: the category's term
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_category_get_term (GDataCategory *self)
+{
+ g_return_val_if_fail (GDATA_IS_CATEGORY (self), NULL);
+ return self->priv->term;
+}
+
+/**
+ * gdata_category_set_term:
+ * @self: a #GDataCategory
+ * @term: the new term for the category
+ *
+ * Sets the #GDataCategory:term property to @term. @term must be non-%NULL and non-empty.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_category_set_term (GDataCategory *self, const gchar *term)
+{
+ g_return_if_fail (GDATA_IS_CATEGORY (self));
+ g_return_if_fail (term != NULL && *term != '\0');
+
+ g_free (self->priv->term);
+ self->priv->term = g_strdup (term);
+ g_object_notify (G_OBJECT (self), "term");
+}
+
+/**
+ * gdata_category_get_scheme:
+ * @self: a #GDataCategory
+ *
+ * Gets the #GDataCategory:scheme property. If the scheme is non-%NULL, it will be non-empty.
+ *
+ * Return value: the category's scheme, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_category_get_scheme (GDataCategory *self)
+{
+ g_return_val_if_fail (GDATA_IS_CATEGORY (self), NULL);
+ return self->priv->scheme;
+}
+
+/**
+ * gdata_category_set_scheme:
+ * @self: a #GDataCategory
+ * @scheme: (allow-none): the new scheme for the category, or %NULL
+ *
+ * Sets the #GDataCategory:scheme property to @scheme. @scheme must be %NULL or non-empty.
+ *
+ * Set @scheme to %NULL to unset the property in the category.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_category_set_scheme (GDataCategory *self, const gchar *scheme)
+{
+ g_return_if_fail (GDATA_IS_CATEGORY (self));
+
+ g_free (self->priv->scheme);
+ self->priv->scheme = g_strdup (scheme);
+ g_object_notify (G_OBJECT (self), "scheme");
+}
+
+/**
+ * gdata_category_get_label:
+ * @self: a #GDataCategory
+ *
+ * Gets the #GDataCategory:label property.
+ *
+ * Return value: the category's label, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_category_get_label (GDataCategory *self)
+{
+ g_return_val_if_fail (GDATA_IS_CATEGORY (self), NULL);
+ return self->priv->label;
+}
+
+/**
+ * gdata_category_set_label:
+ * @self: a #GDataCategory
+ * @label: (allow-none): the new label for the category, or %NULL
+ *
+ * Sets the #GDataCategory:label property to @label.
+ *
+ * Set @label to %NULL to unset the property in the category.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_category_set_label (GDataCategory *self, const gchar *label)
+{
+ g_return_if_fail (GDATA_IS_CATEGORY (self));
+
+ g_free (self->priv->label);
+ self->priv->label = g_strdup (label);
+ g_object_notify (G_OBJECT (self), "label");
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_CATEGORY_H
+#define GDATA_CATEGORY_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_CATEGORY_SCHEMA_LABELS:
+ *
+ * A schema for categories which label the entry they're applied to in some way, such as starring it. The semantics of the various labels
+ * (such as %GDATA_CATEGORY_SCHEMA_LABELS_STARRED) are service-specific.
+ *
+ * Since: 0.11.0
+ */
+#define GDATA_CATEGORY_SCHEMA_LABELS "http://schemas.google.com/g/2005/labels"
+
+/**
+ * GDATA_CATEGORY_SCHEMA_LABELS_SHARED:
+ *
+ * A term for categories of the %GDATA_CATEGORY_SCHEMA_LABELS schema which labels an entry as being “shared”. The semantics of this label are
+ * service-specific, but are obvious for services such as Google Documents.
+ *
+ * Since: 0.17.0
+ */
+#define GDATA_CATEGORY_SCHEMA_LABELS_SHARED GDATA_CATEGORY_SCHEMA_LABELS"#shared"
+
+/**
+ * GDATA_CATEGORY_SCHEMA_LABELS_STARRED:
+ *
+ * A term for categories of the %GDATA_CATEGORY_SCHEMA_LABELS schema which labels an entry as being “starred”. The semantics of this label are
+ * service-specific, but are obvious for services such as Google Documents.
+ *
+ * Since: 0.11.0
+ */
+#define GDATA_CATEGORY_SCHEMA_LABELS_STARRED GDATA_CATEGORY_SCHEMA_LABELS"#starred"
+
+/**
+ * GDATA_CATEGORY_SCHEMA_LABELS_VIEWED:
+ *
+ * A term for categories of the %GDATA_CATEGORY_SCHEMA_LABELS schema which labels an entry as being “viewed”. The semantics of this label are
+ * service-specific, but are obvious for services such as Google Documents.
+ *
+ * Since: 0.17.0
+ */
+#define GDATA_CATEGORY_SCHEMA_LABELS_VIEWED GDATA_CATEGORY_SCHEMA_LABELS"#viewed"
+
+#define GDATA_TYPE_CATEGORY (gdata_category_get_type ())
+#define GDATA_CATEGORY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_CATEGORY, GDataCategory))
+#define GDATA_CATEGORY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_CATEGORY, GDataCategoryClass))
+#define GDATA_IS_CATEGORY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_CATEGORY))
+#define GDATA_IS_CATEGORY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_CATEGORY))
+#define GDATA_CATEGORY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_CATEGORY, GDataCategoryClass))
+
+typedef struct _GDataCategoryPrivate GDataCategoryPrivate;
+
+/**
+ * GDataCategory:
+ *
+ * All the fields in the #GDataCategory structure are private and should never be accessed directly.
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataCategoryPrivate *priv;
+} GDataCategory;
+
+/**
+ * GDataCategoryClass:
+ *
+ * All the fields in the #GDataCategoryClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataCategoryClass;
+
+GType gdata_category_get_type (void) G_GNUC_CONST;
+
+GDataCategory *gdata_category_new (const gchar *term, const gchar *scheme, const gchar *label) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_category_get_term (GDataCategory *self) G_GNUC_PURE;
+void gdata_category_set_term (GDataCategory *self, const gchar *term);
+
+const gchar *gdata_category_get_scheme (GDataCategory *self) G_GNUC_PURE;
+void gdata_category_set_scheme (GDataCategory *self, const gchar *scheme);
+
+const gchar *gdata_category_get_label (GDataCategory *self) G_GNUC_PURE;
+void gdata_category_set_label (GDataCategory *self, const gchar *label);
+
+G_END_DECLS
+
+#endif /* !GDATA_CATEGORY_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-generator
+ * @short_description: Atom generator element
+ * @stability: Stable
+ * @include: gdata/atom/gdata-generator.h
+ *
+ * #GDataGenerator represents a "generator" element from the
+ * <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php">Atom specification</ulink>.
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+
+#include "gdata-generator.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-comparable.h"
+
+static void gdata_generator_comparable_init (GDataComparableIface *iface);
+static void gdata_generator_finalize (GObject *object);
+static void gdata_generator_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+
+struct _GDataGeneratorPrivate {
+ gchar *name;
+ gchar *uri;
+ gchar *version;
+};
+
+enum {
+ PROP_NAME = 1,
+ PROP_URI,
+ PROP_VERSION
+};
+
+G_DEFINE_TYPE_WITH_CODE (GDataGenerator, gdata_generator, GDATA_TYPE_PARSABLE,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_generator_comparable_init))
+
+static void
+gdata_generator_class_init (GDataGeneratorClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataGeneratorPrivate));
+
+ gobject_class->get_property = gdata_generator_get_property;
+ gobject_class->finalize = gdata_generator_finalize;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ parsable_class->parse_xml = parse_xml;
+ parsable_class->element_name = "generator";
+
+ /**
+ * GDataGenerator:name:
+ *
+ * A human-readable name for the generating agent.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.generator">
+ * Atom specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_NAME,
+ g_param_spec_string ("name",
+ "Name", "A human-readable name for the generating agent.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGenerator:uri:
+ *
+ * An IRI reference that is relevant to the agent.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.generator">
+ * Atom specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_URI,
+ g_param_spec_string ("uri",
+ "URI", "An IRI reference that is relevant to the agent.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGenerator:version:
+ *
+ * Indicates the version of the generating agent.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.generator">
+ * Atom specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_VERSION,
+ g_param_spec_string ("version",
+ "Version", "Indicates the version of the generating agent.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+}
+
+static gint
+compare_with (GDataComparable *self, GDataComparable *other)
+{
+ return g_strcmp0 (((GDataGenerator*) self)->priv->name, ((GDataGenerator*) other)->priv->name);
+}
+
+static void
+gdata_generator_comparable_init (GDataComparableIface *iface)
+{
+ iface->compare_with = compare_with;
+}
+
+static void
+gdata_generator_init (GDataGenerator *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GENERATOR, GDataGeneratorPrivate);
+}
+
+static void
+gdata_generator_finalize (GObject *object)
+{
+ GDataGeneratorPrivate *priv = GDATA_GENERATOR (object)->priv;
+
+ g_free (priv->name);
+ g_free (priv->uri);
+ g_free (priv->version);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_generator_parent_class)->finalize (object);
+}
+
+static void
+gdata_generator_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataGeneratorPrivate *priv = GDATA_GENERATOR (object)->priv;
+
+ switch (property_id) {
+ case PROP_NAME:
+ g_value_set_string (value, priv->name);
+ break;
+ case PROP_URI:
+ g_value_set_string (value, priv->uri);
+ break;
+ case PROP_VERSION:
+ g_value_set_string (value, priv->version);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ xmlChar *uri, *name;
+ GDataGeneratorPrivate *priv = GDATA_GENERATOR (parsable)->priv;
+
+ uri = xmlGetProp (root_node, (xmlChar*) "uri");
+ if (uri != NULL && *uri == '\0') {
+ xmlFree (uri);
+ return gdata_parser_error_required_property_missing (root_node, "uri", error);
+ }
+
+ name = xmlNodeListGetString (doc, root_node->children, TRUE);
+ if (name != NULL && *name == '\0') {
+ xmlFree (uri);
+ xmlFree (name);
+ return gdata_parser_error_required_content_missing (root_node, error);
+ }
+
+ priv->uri = (gchar*) uri;
+ priv->name = (gchar*) name;
+ priv->version = (gchar*) xmlGetProp (root_node, (xmlChar*) "version");
+
+ return TRUE;
+}
+
+static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ /* Textual content's handled in pre_parse_xml */
+ if (node->type != XML_ELEMENT_NODE)
+ return TRUE;
+
+ return GDATA_PARSABLE_CLASS (gdata_generator_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+}
+
+/**
+ * gdata_generator_get_name:
+ * @self: a #GDataGenerator
+ *
+ * Gets the #GDataGenerator:name property. The name will be %NULL or non-empty.
+ *
+ * Return value: (nullable): the generator's name
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_generator_get_name (GDataGenerator *self)
+{
+ g_return_val_if_fail (GDATA_IS_GENERATOR (self), NULL);
+ return self->priv->name;
+}
+
+/**
+ * gdata_generator_get_uri:
+ * @self: a #GDataGenerator
+ *
+ * Gets the #GDataGenerator:uri property. The URI will be %NULL or non-empty.
+ *
+ * Return value: (nullable): the generator's URI, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_generator_get_uri (GDataGenerator *self)
+{
+ g_return_val_if_fail (GDATA_IS_GENERATOR (self), NULL);
+ return self->priv->uri;
+}
+
+/**
+ * gdata_generator_get_version:
+ * @self: a #GDataGenerator
+ *
+ * Gets the #GDataGenerator:version property.
+ *
+ * Return value: the generator's version, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_generator_get_version (GDataGenerator *self)
+{
+ g_return_val_if_fail (GDATA_IS_GENERATOR (self), NULL);
+ return self->priv->version;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_GENERATOR_H
+#define GDATA_GENERATOR_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_GENERATOR (gdata_generator_get_type ())
+#define GDATA_GENERATOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_GENERATOR, GDataGenerator))
+#define GDATA_GENERATOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_GENERATOR, GDataGeneratorClass))
+#define GDATA_IS_GENERATOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_GENERATOR))
+#define GDATA_IS_GENERATOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_GENERATOR))
+#define GDATA_GENERATOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_GENERATOR, GDataGeneratorClass))
+
+typedef struct _GDataGeneratorPrivate GDataGeneratorPrivate;
+
+/**
+ * GDataGenerator:
+ *
+ * All the fields in the #GDataGenerator structure are private and should never be accessed directly.
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataGeneratorPrivate *priv;
+} GDataGenerator;
+
+/**
+ * GDataGeneratorClass:
+ *
+ * All the fields in the #GDataGeneratorClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataGeneratorClass;
+
+GType gdata_generator_get_type (void) G_GNUC_CONST;
+
+const gchar *gdata_generator_get_name (GDataGenerator *self) G_GNUC_PURE;
+const gchar *gdata_generator_get_uri (GDataGenerator *self) G_GNUC_PURE;
+const gchar *gdata_generator_get_version (GDataGenerator *self) G_GNUC_PURE;
+
+G_END_DECLS
+
+#endif /* !GDATA_GENERATOR_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-link
+ * @short_description: Atom link element
+ * @stability: Stable
+ * @include: gdata/atom/gdata-link.h
+ *
+ * #GDataLink represents a "link" element from the
+ * <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php">Atom specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+#include <string.h>
+
+#include "gdata-link.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-comparable.h"
+
+static void gdata_link_comparable_init (GDataComparableIface *iface);
+static void gdata_link_finalize (GObject *object);
+static void gdata_link_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_link_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static void pre_get_xml (GDataParsable *parsable, GString *xml_string);
+
+struct _GDataLinkPrivate {
+ gchar *uri;
+ gchar *relation_type;
+ gchar *content_type;
+ gchar *language;
+ gchar *title;
+ gint length;
+};
+
+enum {
+ PROP_URI = 1,
+ PROP_RELATION_TYPE,
+ PROP_CONTENT_TYPE,
+ PROP_LANGUAGE,
+ PROP_TITLE,
+ PROP_LENGTH
+};
+
+G_DEFINE_TYPE_WITH_CODE (GDataLink, gdata_link, GDATA_TYPE_PARSABLE,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_link_comparable_init))
+
+static void
+gdata_link_class_init (GDataLinkClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataLinkPrivate));
+
+ gobject_class->set_property = gdata_link_set_property;
+ gobject_class->get_property = gdata_link_get_property;
+ gobject_class->finalize = gdata_link_finalize;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ parsable_class->pre_get_xml = pre_get_xml;
+ parsable_class->element_name = "link";
+
+ /**
+ * GDataLink:uri:
+ *
+ * The link's IRI.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.link">Atom specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_URI,
+ g_param_spec_string ("uri",
+ "URI", "The link's IRI.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataLink:relation-type:
+ *
+ * The link relation type.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.link">Atom specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_RELATION_TYPE,
+ g_param_spec_string ("relation-type",
+ "Relation type", "The link relation type.",
+ GDATA_LINK_ALTERNATE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataLink:content-type:
+ *
+ * An advisory media type: it is a hint about the type of the representation that is expected to be returned when the value
+ * of the #GDataLink:uri property is dereferenced.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.link">Atom specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_CONTENT_TYPE,
+ g_param_spec_string ("content-type",
+ "Content type", "An advisory media type.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataLink:language:
+ *
+ * Describes the language of the resource pointed to by the #GDataLink:uri property.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.link">Atom specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LANGUAGE,
+ g_param_spec_string ("language",
+ "Language", "Describes the language of the resource pointed to by the uri property.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataLink:title:
+ *
+ * Conveys human-readable information about the link.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.link">Atom specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_TITLE,
+ g_param_spec_string ("title",
+ "Title", "Conveys human-readable information about the link.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataLink:length:
+ *
+ * Indicates an advisory length of the linked content in octets. <code class="literal">-1</code> means the length is unspecified.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.link">Atom specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LENGTH,
+ g_param_spec_int ("length",
+ "Length", "Indicates an advisory length of the linked content in octets.",
+ -1, G_MAXINT, -1,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static gint
+compare_with (GDataComparable *self, GDataComparable *other)
+{
+ GDataLinkPrivate *a = ((GDataLink*) self)->priv, *b = ((GDataLink*) other)->priv;
+
+ if (g_strcmp0 (a->uri, b->uri) == 0 && g_strcmp0 (a->relation_type, b->relation_type) == 0)
+ return 0;
+ return 1;
+}
+
+static void
+gdata_link_comparable_init (GDataComparableIface *iface)
+{
+ iface->compare_with = compare_with;
+}
+
+static void
+gdata_link_init (GDataLink *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_LINK, GDataLinkPrivate);
+ self->priv->length = -1;
+ self->priv->relation_type = g_strdup (GDATA_LINK_ALTERNATE);
+}
+
+static void
+gdata_link_finalize (GObject *object)
+{
+ GDataLinkPrivate *priv = GDATA_LINK (object)->priv;
+
+ g_free (priv->uri);
+ g_free (priv->relation_type);
+ g_free (priv->content_type);
+ g_free (priv->language);
+ g_free (priv->title);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_link_parent_class)->finalize (object);
+}
+
+static void
+gdata_link_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataLinkPrivate *priv = GDATA_LINK (object)->priv;
+
+ switch (property_id) {
+ case PROP_URI:
+ g_value_set_string (value, priv->uri);
+ break;
+ case PROP_RELATION_TYPE:
+ g_value_set_string (value, priv->relation_type);
+ break;
+ case PROP_CONTENT_TYPE:
+ g_value_set_string (value, priv->content_type);
+ break;
+ case PROP_LANGUAGE:
+ g_value_set_string (value, priv->language);
+ break;
+ case PROP_TITLE:
+ g_value_set_string (value, priv->title);
+ break;
+ case PROP_LENGTH:
+ g_value_set_int (value, priv->length);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_link_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataLink *self = GDATA_LINK (object);
+
+ switch (property_id) {
+ case PROP_URI:
+ gdata_link_set_uri (self, g_value_get_string (value));
+ break;
+ case PROP_RELATION_TYPE:
+ gdata_link_set_relation_type (self, g_value_get_string (value));
+ break;
+ case PROP_CONTENT_TYPE:
+ gdata_link_set_content_type (self, g_value_get_string (value));
+ break;
+ case PROP_LANGUAGE:
+ gdata_link_set_language (self, g_value_get_string (value));
+ break;
+ case PROP_TITLE:
+ gdata_link_set_title (self, g_value_get_string (value));
+ break;
+ case PROP_LENGTH:
+ gdata_link_set_length (self, g_value_get_int (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ xmlChar *uri, *relation_type, *content_type, *language, *length;
+ GDataLink *self = GDATA_LINK (parsable);
+
+ /* href */
+ uri = xmlGetProp (root_node, (xmlChar*) "href");
+ if (uri == NULL || *uri == '\0') {
+ xmlFree (uri);
+ return gdata_parser_error_required_property_missing (root_node, "href", error);
+ }
+
+ /* rel */
+ relation_type = xmlGetProp (root_node, (xmlChar*) "rel");
+ if (relation_type != NULL && *relation_type == '\0') {
+ xmlFree (uri);
+ xmlFree (relation_type);
+ return gdata_parser_error_required_property_missing (root_node, "rel", error);
+ }
+
+ /* type */
+ content_type = xmlGetProp (root_node, (xmlChar*) "type");
+ if (content_type != NULL && *content_type == '\0') {
+ xmlFree (uri);
+ xmlFree (relation_type);
+ xmlFree (content_type);
+ return gdata_parser_error_required_property_missing (root_node, "type", error);
+ }
+
+ /* hreflang */
+ language = xmlGetProp (root_node, (xmlChar*) "hreflang");
+ if (language != NULL && *language == '\0') {
+ xmlFree (uri);
+ xmlFree (relation_type);
+ xmlFree (content_type);
+ xmlFree (language);
+ return gdata_parser_error_required_property_missing (root_node, "hreflang", error);
+ }
+
+ self->priv->uri = (gchar*) uri;
+ gdata_link_set_relation_type (self, (const gchar*) relation_type);
+ xmlFree (relation_type);
+ self->priv->content_type = (gchar*) content_type;
+ self->priv->language = (gchar*) language;
+ self->priv->title = (gchar*) xmlGetProp (root_node, (xmlChar*) "title");
+
+ length = xmlGetProp (root_node, (xmlChar*) "length");
+ if (length == NULL)
+ self->priv->length = -1;
+ else
+ self->priv->length = g_ascii_strtoull ((gchar*) length, NULL, 10);
+ xmlFree (length);
+
+ return TRUE;
+}
+
+static void
+pre_get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataLinkPrivate *priv = GDATA_LINK (parsable)->priv;
+
+ gdata_parser_string_append_escaped (xml_string, " href='", priv->uri, "'");
+
+ if (priv->title != NULL)
+ gdata_parser_string_append_escaped (xml_string, " title='", priv->title, "'");
+ if (priv->relation_type != NULL)
+ gdata_parser_string_append_escaped (xml_string, " rel='", priv->relation_type, "'");
+ if (priv->content_type != NULL)
+ gdata_parser_string_append_escaped (xml_string, " type='", priv->content_type, "'");
+ if (priv->language != NULL)
+ gdata_parser_string_append_escaped (xml_string, " hreflang='", priv->language, "'");
+ if (priv->length != -1)
+ g_string_append_printf (xml_string, " length='%i'", priv->length);
+}
+
+/**
+ * gdata_link_new:
+ * @uri: the link's IRI
+ * @relation_type: (allow-none): the relationship of the link to the current document, or %NULL
+ *
+ * Creates a new #GDataLink. More information is available in the <ulink type="http"
+ * url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.link">Atom specification</ulink>.
+ *
+ * @uri must be non-%NULL and non-empty. @relation_type must be %NULL or non-empty.
+ *
+ * Return value: a new #GDataLink, or %NULL; unref with g_object_unref()
+ */
+GDataLink *
+gdata_link_new (const gchar *uri, const gchar *relation_type)
+{
+ g_return_val_if_fail (uri != NULL && *uri != '\0', NULL);
+ g_return_val_if_fail (relation_type == NULL || *relation_type != '\0', NULL);
+
+ return g_object_new (GDATA_TYPE_LINK, "uri", uri, "relation-type", relation_type, NULL);
+}
+
+/**
+ * gdata_link_get_uri:
+ * @self: a #GDataLink
+ *
+ * Gets the #GDataLink:uri property. The return value is guaranteed to be a valid IRI, as
+ * specified by the Atom protocol. Common relationship values such as <literal>alternate</literal>
+ * are returned as <literal>http://www.iana.org/assignments/relation/alternate</literal>.
+ *
+ * For more information, see the <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rel_attribute">
+ * Atom specification</ulink>.
+ *
+ * Return value: the link's URI
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_link_get_uri (GDataLink *self)
+{
+ g_return_val_if_fail (GDATA_IS_LINK (self), NULL);
+ return self->priv->uri;
+}
+
+/**
+ * gdata_link_set_uri:
+ * @self: a #GDataLink
+ * @uri: the new URI for the link
+ *
+ * Sets the #GDataLink:uri property to @uri. @uri must be non-%NULL and non-empty.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_link_set_uri (GDataLink *self, const gchar *uri)
+{
+ g_return_if_fail (GDATA_IS_LINK (self));
+ g_return_if_fail (uri != NULL && *uri != '\0');
+
+ g_free (self->priv->uri);
+ self->priv->uri = g_strdup (uri);
+ g_object_notify (G_OBJECT (self), "uri");
+}
+
+/**
+ * gdata_link_get_relation_type:
+ * @self: a #GDataLink
+ *
+ * Gets the #GDataLink:relation-type property. If the relation type is non-%NULL, it will be non-empty.
+ *
+ * Return value: (nullable): the link's relation type
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_link_get_relation_type (GDataLink *self)
+{
+ g_return_val_if_fail (GDATA_IS_LINK (self), NULL);
+ return self->priv->relation_type;
+}
+
+/**
+ * gdata_link_set_relation_type:
+ * @self: a #GDataLink
+ * @relation_type: (allow-none): the new relation type for the link, or %NULL
+ *
+ * Sets the #GDataLink:relation-type property to @relation_type. If @relation_type is one of the standard Atom relation types,
+ * use one of the defined relation type values, instead of a static string. e.g. %GDATA_LINK_EDIT or %GDATA_LINK_SELF.
+ *
+ * Set @relation_type to %NULL to unset the property in the link.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_link_set_relation_type (GDataLink *self, const gchar *relation_type)
+{
+ g_return_if_fail (GDATA_IS_LINK (self));
+ g_return_if_fail (relation_type == NULL || *relation_type != '\0');
+
+ /* If the relation type is unset, use the default "alternate" relation type. If it's set, and isn't an IRI, turn it into an IRI
+ * by appending it to "http://www.iana.org/assignments/relation/". If it's set and is an IRI, just use the IRI.
+ * See: http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rel_attribute
+ */
+ g_free (self->priv->relation_type);
+ if (relation_type == NULL)
+ self->priv->relation_type = g_strdup (GDATA_LINK_ALTERNATE);
+ else if (strchr ((char*) relation_type, ':') == NULL)
+ self->priv->relation_type = g_strconcat ("http://www.iana.org/assignments/relation/", (const gchar*) relation_type, NULL);
+ else
+ self->priv->relation_type = g_strdup ((gchar*) relation_type);
+
+ g_object_notify (G_OBJECT (self), "relation-type");
+}
+
+/**
+ * gdata_link_get_content_type:
+ * @self: a #GDataLink
+ *
+ * Gets the #GDataLink:content-type property. If the content type is non-%NULL, it will be non-empty.
+ *
+ * Return value: (nullable): the link's content type, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_link_get_content_type (GDataLink *self)
+{
+ g_return_val_if_fail (GDATA_IS_LINK (self), NULL);
+ return self->priv->content_type;
+}
+
+/**
+ * gdata_link_set_content_type:
+ * @self: a #GDataLink
+ * @content_type: (allow-none): the new content type for the link, or %NULL
+ *
+ * Sets the #GDataLink:content-type property to @content_type. @content_type must be %NULL or non-empty.
+ *
+ * Set @content_type to %NULL to unset the property in the link.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_link_set_content_type (GDataLink *self, const gchar *content_type)
+{
+ g_return_if_fail (GDATA_IS_LINK (self));
+ g_return_if_fail (content_type == NULL || *content_type != '\0');
+
+ g_free (self->priv->content_type);
+ self->priv->content_type = g_strdup (content_type);
+ g_object_notify (G_OBJECT (self), "content-type");
+}
+
+/**
+ * gdata_link_get_language:
+ * @self: a #GDataLink
+ *
+ * Gets the #GDataLink:language property. If the language is non-%NULL, it will be non-empty.
+ *
+ * Return value: (nullable): the link's language, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_link_get_language (GDataLink *self)
+{
+ g_return_val_if_fail (GDATA_IS_LINK (self), NULL);
+ return self->priv->language;
+}
+
+/**
+ * gdata_link_set_language:
+ * @self: a #GDataLink
+ * @language: (allow-none): the new language for the link, or %NULL
+ *
+ * Sets the #GDataLink:language property to @language. @language must be %NULL or non-empty.
+ *
+ * Set @language to %NULL to unset the property in the link.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_link_set_language (GDataLink *self, const gchar *language)
+{
+ g_return_if_fail (GDATA_IS_LINK (self));
+ g_return_if_fail (language == NULL || *language != '\0');
+
+ g_free (self->priv->language);
+ self->priv->language = g_strdup (language);
+ g_object_notify (G_OBJECT (self), "language");
+}
+
+/**
+ * gdata_link_get_title:
+ * @self: a #GDataLink
+ *
+ * Gets the #GDataLink:title property.
+ *
+ * Return value: the link's title, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_link_get_title (GDataLink *self)
+{
+ g_return_val_if_fail (GDATA_IS_LINK (self), NULL);
+ return self->priv->title;
+}
+
+/**
+ * gdata_link_set_title:
+ * @self: a #GDataLink
+ * @title: (allow-none): the new title for the link, or %NULL
+ *
+ * Sets the #GDataLink:title property to @title.
+ *
+ * Set @title to %NULL to unset the property in the link.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_link_set_title (GDataLink *self, const gchar *title)
+{
+ g_return_if_fail (GDATA_IS_LINK (self));
+
+ g_free (self->priv->title);
+ self->priv->title = g_strdup (title);
+ g_object_notify (G_OBJECT (self), "title");
+}
+
+/**
+ * gdata_link_get_length:
+ * @self: a #GDataLink
+ *
+ * Gets the #GDataLink:length property.
+ *
+ * Return value: the link's length, or <code class="literal">-1</code>
+ *
+ * Since: 0.4.0
+ */
+gint
+gdata_link_get_length (GDataLink *self)
+{
+ g_return_val_if_fail (GDATA_IS_LINK (self), -1);
+ return self->priv->length;
+}
+
+/**
+ * gdata_link_set_length:
+ * @self: a #GDataLink
+ * @length: the new length for the link, or <code class="literal">-1</code>
+ *
+ * Sets the #GDataLink:length property to @length.
+ *
+ * Set @length to <code class="literal">-1</code> to unset the property in the link.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_link_set_length (GDataLink *self, gint length)
+{
+ g_return_if_fail (GDATA_IS_LINK (self));
+ g_return_if_fail (length >= -1);
+
+ self->priv->length = length;
+ g_object_notify (G_OBJECT (self), "length");
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_LINK_H
+#define GDATA_LINK_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_LINK_ALTERNATE:
+ *
+ * The relation type URI for alternate resources to the current one.
+ *
+ * For more information, see the <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rel_attribute">
+ * Atom specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+#define GDATA_LINK_ALTERNATE "http://www.iana.org/assignments/relation/alternate"
+
+/**
+ * GDATA_LINK_RELATED:
+ *
+ * The relation type URI for resources related to the current one.
+ *
+ * For more information, see the <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rel_attribute">
+ * Atom specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+#define GDATA_LINK_RELATED "http://www.iana.org/assignments/relation/related"
+
+/**
+ * GDATA_LINK_SELF:
+ *
+ * The relation type URI for the current resource.
+ *
+ * For more information, see the <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rel_attribute">
+ * Atom specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+#define GDATA_LINK_SELF "http://www.iana.org/assignments/relation/self"
+
+/**
+ * GDATA_LINK_ENCLOSURE:
+ *
+ * The relation type URI for attached objects which may be large in size.
+ *
+ * For more information, see the <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rel_attribute">
+ * Atom specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+#define GDATA_LINK_ENCLOSURE "http://www.iana.org/assignments/relation/enclosure"
+
+/**
+ * GDATA_LINK_VIA:
+ *
+ * The relation type URI for the source document of the current resource.
+ *
+ * For more information, see the <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rel_attribute">
+ * Atom specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+#define GDATA_LINK_VIA "http://www.iana.org/assignments/relation/via"
+
+/**
+ * GDATA_LINK_EDIT:
+ *
+ * The relation type URI of the edit location for this resource.
+ *
+ * For more information, see the <ulink type="http" url="http://www.atomenabled.org/developers/protocol/atom-protocol-spec.php#new-link-relation">
+ * Atom Publishing Protocol specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+#define GDATA_LINK_EDIT "http://www.iana.org/assignments/relation/edit"
+
+/**
+ * GDATA_LINK_EDIT_MEDIA:
+ *
+ * The relation type URI of the edit location for media resources attached to this resource.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://www.atomenabled.org/developers/protocol/atom-protocol-spec.php#new-media-link-relation">
+ * Atom Publishing Protocol specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+#define GDATA_LINK_EDIT_MEDIA "http://www.iana.org/assignments/relation/edit-media"
+
+/**
+ * GDATA_LINK_PARENT:
+ *
+ * The relation type URI of the of the location of the parent resource in a
+ * hierarchy of entries.
+ *
+ * This is an undocumented GData-specific addition to the Atom specification,
+ * and is not included in the GData documentation except in examples and in the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/v2/schema/document_list_atom.rnc">
+ * RelaxNG schema</ulink>.
+ *
+ * Since: 0.15.1
+ */
+#define GDATA_LINK_PARENT "http://schemas.google.com/docs/2007#parent"
+
+#define GDATA_TYPE_LINK (gdata_link_get_type ())
+#define GDATA_LINK(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_LINK, GDataLink))
+#define GDATA_LINK_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_LINK, GDataLinkClass))
+#define GDATA_IS_LINK(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_LINK))
+#define GDATA_IS_LINK_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_LINK))
+#define GDATA_LINK_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_LINK, GDataLinkClass))
+
+typedef struct _GDataLinkPrivate GDataLinkPrivate;
+
+/**
+ * GDataLink:
+ *
+ * All the fields in the #GDataLink structure are private and should never be accessed directly.
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataLinkPrivate *priv;
+} GDataLink;
+
+/**
+ * GDataLinkClass:
+ *
+ * All the fields in the #GDataLinkClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataLinkClass;
+
+GType gdata_link_get_type (void) G_GNUC_CONST;
+
+GDataLink *gdata_link_new (const gchar *uri, const gchar *relation_type) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_link_get_uri (GDataLink *self) G_GNUC_PURE;
+void gdata_link_set_uri (GDataLink *self, const gchar *uri);
+
+const gchar *gdata_link_get_relation_type (GDataLink *self) G_GNUC_PURE;
+void gdata_link_set_relation_type (GDataLink *self, const gchar *relation_type);
+
+const gchar *gdata_link_get_content_type (GDataLink *self) G_GNUC_PURE;
+void gdata_link_set_content_type (GDataLink *self, const gchar *content_type);
+
+const gchar *gdata_link_get_language (GDataLink *self) G_GNUC_PURE;
+void gdata_link_set_language (GDataLink *self, const gchar *language);
+
+const gchar *gdata_link_get_title (GDataLink *self) G_GNUC_PURE;
+void gdata_link_set_title (GDataLink *self, const gchar *title);
+
+gint gdata_link_get_length (GDataLink *self) G_GNUC_PURE;
+void gdata_link_set_length (GDataLink *self, gint length);
+
+G_END_DECLS
+
+#endif /* !GDATA_LINK_H */
--- /dev/null
+headers = files(
+ 'gdata-author.h',
+ 'gdata-category.h',
+ 'gdata-generator.h',
+ 'gdata-link.h',
+)
+
+install_headers(
+ headers,
+ subdir: gdata_include_subdir / 'atom',
+)
+
+gir_headers += headers
+
+sources += files(
+ 'gdata-author.c',
+ 'gdata-category.c',
+ 'gdata-generator.c',
+ 'gdata-link.c',
+)
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Richard Schwarting 2009 <aquarichy@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * SECTION:gdata-exif-tags
+ * @short_description: EXIF tags element
+ * @stability: Stable
+ * @include: gdata/exif/gdata-exif-tags.h
+ *
+ * #GDataExifTags represents a "tags" element from the
+ * <ulink type="http" url="http://schemas.google.com/photos/exif/2007">EXIF specification</ulink>.
+ *
+ * It is private API, since implementing classes are likely to proxy the properties and functions
+ * of #GDataExifTags as appropriate; most entry types which implement #GDataExifTags have no use
+ * for most of its properties, and it would be unnecessary and confusing to expose #GDataExifTags itself.
+ *
+ * Also note that modified EXIF values submitted back to the Google (in an update or on the original
+ * upload) appear to be ignored. Google's EXIF values for the uploaded image will be set to the EXIF
+ * metadata found in the image itself.
+ *
+ * For these reasons, properties have not been implemented on #GDataExifTags (yet).
+ *
+ * Since: 0.5.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+#include <string.h>
+
+#include "gdata-exif-tags.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-private.h"
+
+static void gdata_exif_tags_finalize (GObject *object);
+static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataExifTagsPrivate {
+ gdouble distance;
+ gdouble exposure;
+ gboolean flash;
+ gdouble focal_length;
+ gdouble fstop;
+ gchar *image_unique_id;
+ gint iso;
+ gchar *make;
+ gchar *model;
+ gint64 _time; /* in milliseconds! */
+};
+
+G_DEFINE_TYPE (GDataExifTags, gdata_exif_tags, GDATA_TYPE_PARSABLE)
+
+static void
+gdata_exif_tags_class_init (GDataExifTagsClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataExifTagsPrivate));
+
+ gobject_class->finalize = gdata_exif_tags_finalize;
+
+ parsable_class->parse_xml = parse_xml;
+ parsable_class->get_namespaces = get_namespaces;
+ parsable_class->element_name = "tags";
+ parsable_class->element_namespace = "exif";
+}
+
+static void
+gdata_exif_tags_init (GDataExifTags *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_EXIF_TAGS, GDataExifTagsPrivate);
+ self->priv->_time = -1;
+}
+
+static void
+gdata_exif_tags_finalize (GObject *object)
+{
+ GDataExifTagsPrivate *priv = GDATA_EXIF_TAGS (object)->priv;
+
+ g_free (priv->make);
+ g_free (priv->model);
+ g_free (priv->image_unique_id);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_exif_tags_parent_class)->finalize (object);
+}
+
+static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ gboolean success;
+ GDataExifTags *self = GDATA_EXIF_TAGS (parsable);
+
+ if (gdata_parser_is_namespace (node, "http://schemas.google.com/photos/exif/2007") == FALSE)
+ return GDATA_PARSABLE_CLASS (gdata_exif_tags_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+
+ if (xmlStrcmp (node->name, (xmlChar*) "distance") == 0 ) {
+ /* exif:distance */
+ xmlChar *distance = xmlNodeListGetString (doc, node->children, TRUE);
+ self->priv->distance = g_ascii_strtod ((gchar*) distance, NULL);
+ xmlFree (distance);
+ } else if (xmlStrcmp (node->name, (xmlChar*) "fstop") == 0) {
+ /* exif:fstop */
+ xmlChar *fstop = xmlNodeListGetString (doc, node->children, TRUE);
+ self->priv->fstop = g_ascii_strtod ((gchar*) fstop, NULL);
+ xmlFree (fstop);
+ } else if (gdata_parser_string_from_element (node, "make", P_NONE, &(self->priv->make), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "model", P_NONE, &(self->priv->model), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "imageUniqueID", P_NONE, &(self->priv->image_unique_id), &success, error) == TRUE) {
+ return success;
+ } else if (xmlStrcmp (node->name, (xmlChar*) "exposure") == 0) {
+ /* exif:exposure */
+ xmlChar *exposure = xmlNodeListGetString (doc, node->children, TRUE);
+ self->priv->exposure = g_ascii_strtod ((gchar*) exposure, NULL);
+ xmlFree (exposure);
+ } else if (xmlStrcmp (node->name, (xmlChar*) "flash") == 0) {
+ /* exif:flash */
+ xmlChar *flash = xmlNodeListGetString (doc, node->children, TRUE);
+ if (flash == NULL)
+ return gdata_parser_error_required_content_missing (node, error);
+ self->priv->flash = (xmlStrcmp (flash, (xmlChar*) "true") == 0 ? TRUE : FALSE);
+ xmlFree (flash);
+ } else if (xmlStrcmp (node->name, (xmlChar*) "focallength") == 0) {
+ /* exif:focal-length */
+ xmlChar *focal_length = xmlNodeListGetString (doc, node->children, TRUE);
+ self->priv->focal_length = g_ascii_strtod ((gchar*) focal_length, NULL);
+ xmlFree (focal_length);
+ } else if (xmlStrcmp (node->name, (xmlChar*) "iso") == 0) {
+ /* exif:iso */
+ xmlChar *iso = xmlNodeListGetString (doc, node->children, TRUE);
+ self->priv->iso = g_ascii_strtoll ((gchar*) iso, NULL, 10);
+ xmlFree (iso);
+ } else if (xmlStrcmp (node->name, (xmlChar*) "time") == 0) {
+ /* exif:time */
+ xmlChar *time_str;
+ guint64 milliseconds;
+
+ time_str = xmlNodeListGetString (doc, node->children, TRUE);
+ milliseconds = g_ascii_strtoull ((gchar*) time_str, NULL, 10);
+ xmlFree (time_str);
+
+ self->priv->_time = (gint64) milliseconds;
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_exif_tags_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ }
+
+ return TRUE;
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ g_hash_table_insert (namespaces, (gchar*) "exif", (gchar*) "http://schemas.google.com/photos/exif/2007");
+}
+
+/**
+ * gdata_exif_tags_get_distance:
+ * @self: a #GDataExifTags
+ *
+ * Gets the #GDataExifTags:distance property.
+ *
+ * Return value: the distance value, or <code class="literal">-1</code> if unknown
+ *
+ * Since: 0.5.0
+ */
+gdouble
+gdata_exif_tags_get_distance (GDataExifTags *self)
+{
+ g_return_val_if_fail (GDATA_IS_EXIF_TAGS (self), -1);
+ return self->priv->distance;
+}
+
+/**
+ * gdata_exif_tags_get_exposure:
+ * @self: a #GDataExifTags
+ *
+ * Gets the #GDataExifTags:exposure property.
+ *
+ * Return value: the exposure value, or <code class="literal">0</code> if unknown
+ *
+ * Since: 0.5.0
+ */
+gdouble
+gdata_exif_tags_get_exposure (GDataExifTags *self)
+{
+ g_return_val_if_fail (GDATA_IS_EXIF_TAGS (self), 0);
+ return self->priv->exposure;
+}
+
+/**
+ * gdata_exif_tags_get_flash:
+ * @self: a #GDataExifTags
+ *
+ * Gets the #GDataExifTags:flash property.
+ *
+ * Return value: %TRUE if flash was used, %FALSE otherwise
+ *
+ * Since: 0.5.0
+ */
+gboolean
+gdata_exif_tags_get_flash (GDataExifTags *self)
+{
+ g_return_val_if_fail (GDATA_IS_EXIF_TAGS (self), FALSE);
+ return self->priv->flash;
+}
+
+/**
+ * gdata_exif_tags_get_focal_length:
+ * @self: a #GDataExifTags
+ *
+ * Gets the #GDataExifTags:focal-length property.
+ *
+ * Return value: the focal-length value, or <code class="literal">-1</code> if unknown
+ *
+ * Since: 0.5.0
+ */
+gdouble
+gdata_exif_tags_get_focal_length (GDataExifTags *self)
+{
+ g_return_val_if_fail (GDATA_IS_EXIF_TAGS (self), -1);
+ return self->priv->focal_length;
+}
+
+/**
+ * gdata_exif_tags_get_fstop:
+ * @self: a #GDataExifTags
+ *
+ * Gets the #GDataExifTags:fstop property.
+ *
+ * Return value: the F-stop value, or <code class="literal">0</code> if unknown
+ *
+ * Since: 0.5.0
+ */
+gdouble
+gdata_exif_tags_get_fstop (GDataExifTags *self)
+{
+ g_return_val_if_fail (GDATA_IS_EXIF_TAGS (self), 0);
+ return self->priv->fstop;
+}
+
+/**
+ * gdata_exif_tags_get_image_unique_id:
+ * @self: a #GDataExifTags
+ *
+ * Gets the #GDataExifTags:image-unique-id property.
+ *
+ * Return value: the photo's unique EXIF identifier, or %NULL
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_exif_tags_get_image_unique_id (GDataExifTags *self)
+{
+ g_return_val_if_fail (GDATA_IS_EXIF_TAGS (self), NULL);
+ return self->priv->image_unique_id;
+}
+
+/**
+ * gdata_exif_tags_get_iso:
+ * @self: a #GDataExifTags
+ *
+ * Gets the #GDataExifTags:iso property.
+ *
+ * Return value: the ISO speed, or <code class="literal">-1</code> if unknown
+ *
+ * Since: 0.5.0
+ */
+gint
+gdata_exif_tags_get_iso (GDataExifTags *self)
+{
+ g_return_val_if_fail (GDATA_IS_EXIF_TAGS (self), -1);
+ return self->priv->iso;
+}
+
+/**
+ * gdata_exif_tags_get_make:
+ * @self: a #GDataExifTags
+ *
+ * Gets the #GDataExifTags:make property.
+ *
+ * Return value: the name of the manufacturer of the camera, or %NULL if unknown
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_exif_tags_get_make (GDataExifTags *self)
+{
+ g_return_val_if_fail (GDATA_IS_EXIF_TAGS (self), NULL);
+ return self->priv->make;
+}
+
+/**
+ * gdata_exif_tags_get_model:
+ * @self: a #GDataExifTags
+ *
+ * Gets the #GDataExifTags:model property.
+ *
+ * Return value: the model name of the camera, or %NULL if unknown
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_exif_tags_get_model (GDataExifTags *self)
+{
+ g_return_val_if_fail (GDATA_IS_EXIF_TAGS (self), NULL);
+ return self->priv->model;
+}
+
+/**
+ * gdata_exif_tags_get_time:
+ * @self: a #GDataExifTags
+ *
+ * Gets the #GDataExifTags:time property as a number of milliseconds since the epoch. If the property is unset, <code class="literal">-1</code> will
+ * be returned.
+ *
+ * Return value: the UNIX timestamp for the time property in milliseconds, or <code class="literal">-1</code>
+ *
+ * Since: 0.5.0
+ */
+gint64
+gdata_exif_tags_get_time (GDataExifTags *self)
+{
+ g_return_val_if_fail (GDATA_IS_EXIF_TAGS (self), -1);
+ return self->priv->_time;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Richard Schwarting 2009 <aquarichy@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_EXIF_TAGS_H
+#define GDATA_EXIF_TAGS_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_EXIF_TAGS (gdata_exif_tags_get_type ())
+#define GDATA_EXIF_TAGS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_EXIF_TAGS, GDataExifTags))
+#define GDATA_EXIF_TAGS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_EXIF_TAGS, GDataExifTagsClass))
+#define GDATA_IS_EXIF_TAGS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_EXIF_TAGS))
+#define GDATA_IS_EXIF_TAGS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_EXIF_TAGS))
+#define GDATA_EXIF_TAGS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_EXIF_TAGS, GDataExifTagsClass))
+
+typedef struct _GDataExifTagsPrivate GDataExifTagsPrivate;
+
+/**
+ * GDataExifTags:
+ *
+ * All the fields in the #GDataExifTags structure are private and should never be accessed directly.
+ *
+ * Since: 0.5.0
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataExifTagsPrivate *priv;
+} GDataExifTags;
+
+/**
+ * GDataExifTagsClass:
+ *
+ * All the fields in the #GDataExifTagsClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.5.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataExifTagsClass;
+
+GType gdata_exif_tags_get_type (void) G_GNUC_CONST;
+
+gdouble gdata_exif_tags_get_distance (GDataExifTags *self) G_GNUC_PURE;
+gdouble gdata_exif_tags_get_exposure (GDataExifTags *self) G_GNUC_PURE;
+gboolean gdata_exif_tags_get_flash (GDataExifTags *self) G_GNUC_PURE;
+gdouble gdata_exif_tags_get_focal_length (GDataExifTags *self) G_GNUC_PURE;
+gdouble gdata_exif_tags_get_fstop (GDataExifTags *self) G_GNUC_PURE;
+const gchar *gdata_exif_tags_get_image_unique_id (GDataExifTags *self) G_GNUC_PURE;
+gint gdata_exif_tags_get_iso (GDataExifTags *self) G_GNUC_PURE;
+const gchar *gdata_exif_tags_get_make (GDataExifTags *self) G_GNUC_PURE;
+const gchar *gdata_exif_tags_get_model (GDataExifTags *self) G_GNUC_PURE;
+gint64 gdata_exif_tags_get_time (GDataExifTags *self);
+
+G_END_DECLS
+
+#endif /* !GDATA_EXIF_TAGS_H */
--- /dev/null
+sources += files('gdata-exif-tags.c')
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-gcontact-calendar
+ * @short_description: gContact calendar element
+ * @stability: Stable
+ * @include: gdata/gcontact/gdata-gcontact-calendar.h
+ *
+ * #GDataGContactCalendar represents a "calendarLink" element from the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcCalendarLink">gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+
+#include "gdata-gcontact-calendar.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-comparable.h"
+
+static void gdata_gcontact_calendar_comparable_init (GDataComparableIface *iface);
+static void gdata_gcontact_calendar_finalize (GObject *object);
+static void gdata_gcontact_calendar_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_gcontact_calendar_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static void pre_get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataGContactCalendarPrivate {
+ gchar *uri;
+ gchar *relation_type;
+ gchar *label;
+ gboolean is_primary;
+};
+
+enum {
+ PROP_URI = 1,
+ PROP_RELATION_TYPE,
+ PROP_LABEL,
+ PROP_IS_PRIMARY
+};
+
+G_DEFINE_TYPE_WITH_CODE (GDataGContactCalendar, gdata_gcontact_calendar, GDATA_TYPE_PARSABLE,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_gcontact_calendar_comparable_init))
+
+static void
+gdata_gcontact_calendar_class_init (GDataGContactCalendarClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataGContactCalendarPrivate));
+
+ gobject_class->get_property = gdata_gcontact_calendar_get_property;
+ gobject_class->set_property = gdata_gcontact_calendar_set_property;
+ gobject_class->finalize = gdata_gcontact_calendar_finalize;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ parsable_class->pre_get_xml = pre_get_xml;
+ parsable_class->get_namespaces = get_namespaces;
+ parsable_class->element_name = "calendarLink";
+ parsable_class->element_namespace = "gContact";
+
+ /**
+ * GDataGContactCalendar:uri:
+ *
+ * The URI of the calendar.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcCalendarLink">gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_URI,
+ g_param_spec_string ("uri",
+ "URI", "The URI of the calendar.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGContactCalendar:relation-type:
+ *
+ * A programmatic value that identifies the type of calendar. It is mutually exclusive with #GDataGContactCalendar:label.
+ * Examples are %GDATA_GCONTACT_CALENDAR_HOME or %GDATA_GCONTACT_CALENDAR_FREE_BUSY.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcCalendarLink">gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_RELATION_TYPE,
+ g_param_spec_string ("relation-type",
+ "Relation type", "A programmatic value that identifies the type of calendar.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGContactCalendar:label:
+ *
+ * A free-form string that identifies the type of calendar. It is mutually exclusive with #GDataGContactCalendar:relation-type.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcCalendarLink">gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LABEL,
+ g_param_spec_string ("label",
+ "Label", "A free-form string that identifies the type of calendar.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGContactCalendar:is-primary:
+ *
+ * Indicates which calendar out of a group is primary.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcCalendarLink">gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_IS_PRIMARY,
+ g_param_spec_boolean ("is-primary",
+ "Primary?", "Indicates which calendar out of a group is primary.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static gint
+compare_with (GDataComparable *self, GDataComparable *other)
+{
+ GDataGContactCalendarPrivate *a = ((GDataGContactCalendar*) self)->priv, *b = ((GDataGContactCalendar*) other)->priv;
+
+ if (g_strcmp0 (a->uri, b->uri) == 0 && g_strcmp0 (a->relation_type, b->relation_type) == 0 && g_strcmp0 (a->label, b->label) == 0)
+ return 0;
+ return 1;
+}
+
+static void
+gdata_gcontact_calendar_comparable_init (GDataComparableIface *iface)
+{
+ iface->compare_with = compare_with;
+}
+
+static void
+gdata_gcontact_calendar_init (GDataGContactCalendar *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GCONTACT_CALENDAR, GDataGContactCalendarPrivate);
+}
+
+static void
+gdata_gcontact_calendar_finalize (GObject *object)
+{
+ GDataGContactCalendarPrivate *priv = GDATA_GCONTACT_CALENDAR (object)->priv;
+
+ g_free (priv->uri);
+ g_free (priv->relation_type);
+ g_free (priv->label);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_gcontact_calendar_parent_class)->finalize (object);
+}
+
+static void
+gdata_gcontact_calendar_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataGContactCalendarPrivate *priv = GDATA_GCONTACT_CALENDAR (object)->priv;
+
+ switch (property_id) {
+ case PROP_URI:
+ g_value_set_string (value, priv->uri);
+ break;
+ case PROP_RELATION_TYPE:
+ g_value_set_string (value, priv->relation_type);
+ break;
+ case PROP_LABEL:
+ g_value_set_string (value, priv->label);
+ break;
+ case PROP_IS_PRIMARY:
+ g_value_set_boolean (value, priv->is_primary);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_gcontact_calendar_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataGContactCalendar *self = GDATA_GCONTACT_CALENDAR (object);
+
+ switch (property_id) {
+ case PROP_URI:
+ gdata_gcontact_calendar_set_uri (self, g_value_get_string (value));
+ break;
+ case PROP_RELATION_TYPE:
+ gdata_gcontact_calendar_set_relation_type (self, g_value_get_string (value));
+ break;
+ case PROP_LABEL:
+ gdata_gcontact_calendar_set_label (self, g_value_get_string (value));
+ break;
+ case PROP_IS_PRIMARY:
+ gdata_gcontact_calendar_set_is_primary (self, g_value_get_boolean (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ xmlChar *uri, *rel, *label;
+ gboolean primary_bool;
+ GDataGContactCalendarPrivate *priv = GDATA_GCONTACT_CALENDAR (parsable)->priv;
+
+ /* Is it the primary calendar? */
+ if (gdata_parser_boolean_from_property (root_node, "primary", &primary_bool, 0, error) == FALSE)
+ return FALSE;
+
+ uri = xmlGetProp (root_node, (xmlChar*) "href");
+ if (uri == NULL || *uri == '\0') {
+ xmlFree (uri);
+ return gdata_parser_error_required_property_missing (root_node, "href", error);
+ }
+
+ rel = xmlGetProp (root_node, (xmlChar*) "rel");
+ label = xmlGetProp (root_node, (xmlChar*) "label");
+ if ((rel == NULL || *rel == '\0') && (label == NULL || *label == '\0')) {
+ xmlFree (uri);
+ xmlFree (rel);
+ xmlFree (label);
+ return gdata_parser_error_required_property_missing (root_node, "rel", error);
+ } else if (rel != NULL && label != NULL) {
+ /* Can't have both set at once */
+ xmlFree (uri);
+ xmlFree (rel);
+ xmlFree (label);
+ return gdata_parser_error_mutexed_properties (root_node, "rel", "label", error);
+ }
+
+ priv->uri = (gchar*) uri;
+ priv->relation_type = (gchar*) rel;
+ priv->label = (gchar*) label;
+ priv->is_primary = primary_bool;
+
+ return TRUE;
+}
+
+static void
+pre_get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataGContactCalendarPrivate *priv = GDATA_GCONTACT_CALENDAR (parsable)->priv;
+
+ gdata_parser_string_append_escaped (xml_string, " href='", priv->uri, "'");
+
+ if (priv->relation_type != NULL)
+ gdata_parser_string_append_escaped (xml_string, " rel='", priv->relation_type, "'");
+ else if (priv->label != NULL)
+ gdata_parser_string_append_escaped (xml_string, " label='", priv->label, "'");
+ else
+ g_assert_not_reached ();
+
+ if (priv->is_primary == TRUE)
+ g_string_append (xml_string, " primary='true'");
+ else
+ g_string_append (xml_string, " primary='false'");
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ g_hash_table_insert (namespaces, (gchar*) "gContact", (gchar*) "http://schemas.google.com/contact/2008");
+}
+
+/**
+ * gdata_gcontact_calendar_new:
+ * @uri: the URI of the calendar
+ * @relation_type: (allow-none): the type of calendar, or %NULL
+ * @label: (allow-none): a free-form label for the calendar, or %NULL
+ * @is_primary: %TRUE if this calendar is its owner's primary calendar, %FALSE otherwise
+ *
+ * Creates a new #GDataGContactCalendar. More information is available in the <ulink type="http"
+ * url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcCalendarLink">gContact specification</ulink>.
+ *
+ * Exactly one of @relation_type and @label should be provided; the other must be %NULL.
+ *
+ * Return value: a new #GDataGContactCalendar; unref with g_object_unref()
+ *
+ * Since: 0.7.0
+ */
+GDataGContactCalendar *
+gdata_gcontact_calendar_new (const gchar *uri, const gchar *relation_type, const gchar *label, gboolean is_primary)
+{
+ g_return_val_if_fail (uri != NULL && *uri != '\0', NULL);
+ g_return_val_if_fail ((relation_type != NULL && *relation_type != '\0' && label == NULL) ||
+ (relation_type == NULL && label != NULL && *label != '\0'), NULL);
+
+ return g_object_new (GDATA_TYPE_GCONTACT_CALENDAR,
+ "uri", uri, "relation-type", relation_type, "label", label, "is-primary", is_primary, NULL);
+}
+
+/**
+ * gdata_gcontact_calendar_get_uri:
+ * @self: a #GDataGContactCalendar
+ *
+ * Gets the #GDataGContactCalendar:uri property.
+ *
+ * Return value: the calendar's URI
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_gcontact_calendar_get_uri (GDataGContactCalendar *self)
+{
+ g_return_val_if_fail (GDATA_IS_GCONTACT_CALENDAR (self), NULL);
+ return self->priv->uri;
+}
+
+/**
+ * gdata_gcontact_calendar_set_uri:
+ * @self: a #GDataGContactCalendar
+ * @uri: the new URI for the calendar
+ *
+ * Sets the #GDataGContactCalendar:uri property to @uri.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_gcontact_calendar_set_uri (GDataGContactCalendar *self, const gchar *uri)
+{
+ g_return_if_fail (GDATA_IS_GCONTACT_CALENDAR (self));
+ g_return_if_fail (uri != NULL && *uri != '\0');
+
+ g_free (self->priv->uri);
+ self->priv->uri = g_strdup (uri);
+ g_object_notify (G_OBJECT (self), "uri");
+}
+
+/**
+ * gdata_gcontact_calendar_get_relation_type:
+ * @self: a #GDataGContactCalendar
+ *
+ * Gets the #GDataGContactCalendar:relation-type property.
+ *
+ * Return value: the type of the relation, or %NULL
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_gcontact_calendar_get_relation_type (GDataGContactCalendar *self)
+{
+ g_return_val_if_fail (GDATA_IS_GCONTACT_CALENDAR (self), NULL);
+ return self->priv->relation_type;
+}
+
+/**
+ * gdata_gcontact_calendar_set_relation_type:
+ * @self: a #GDataGContactCalendar
+ * @relation_type: (allow-none): the new type for the calendar, or %NULL
+ *
+ * Sets the #GDataGContactCalendar:relation-type property to @relation_type,
+ * such as %GDATA_GCONTACT_CALENDAR_HOME or %GDATA_GCONTACT_CALENDAR_FREE_BUSY.
+ *
+ * If @relation_type is %NULL, the relation type will be unset. When the #GDataGContactCalendar is used in a query, however,
+ * exactly one of #GDataGContactCalendar:relation-type and #GDataGContactCalendar:label must be %NULL.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_gcontact_calendar_set_relation_type (GDataGContactCalendar *self, const gchar *relation_type)
+{
+ g_return_if_fail (GDATA_IS_GCONTACT_CALENDAR (self));
+ g_return_if_fail (relation_type == NULL || *relation_type != '\0');
+
+ g_free (self->priv->relation_type);
+ self->priv->relation_type = g_strdup (relation_type);
+ g_object_notify (G_OBJECT (self), "relation-type");
+}
+
+/**
+ * gdata_gcontact_calendar_get_label:
+ * @self: a #GDataGContactCalendar
+ *
+ * Gets the #GDataGContactCalendar:label property.
+ *
+ * Return value: a free-form label for the calendar, or %NULL
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_gcontact_calendar_get_label (GDataGContactCalendar *self)
+{
+ g_return_val_if_fail (GDATA_IS_GCONTACT_CALENDAR (self), NULL);
+ return self->priv->label;
+}
+
+/**
+ * gdata_gcontact_calendar_set_label:
+ * @self: a #GDataGContactCalendar
+ * @label: (allow-none): the new free-form label for the calendar, or %NULL
+ *
+ * Sets the #GDataGContactCalendar:label property to @label.
+ *
+ * If @label is %NULL, the label will be unset. When the #GDataGContactCalendar is used in a query, however,
+ * exactly one of #GDataGContactCalendar:relation-type and #GDataGContactCalendar:label must be %NULL.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_gcontact_calendar_set_label (GDataGContactCalendar *self, const gchar *label)
+{
+ g_return_if_fail (GDATA_IS_GCONTACT_CALENDAR (self));
+ g_return_if_fail (label == NULL || *label != '\0');
+
+ g_free (self->priv->label);
+ self->priv->label = g_strdup (label);
+ g_object_notify (G_OBJECT (self), "label");
+}
+
+/**
+ * gdata_gcontact_calendar_is_primary:
+ * @self: a #GDataGContactCalendar
+ *
+ * Gets the #GDataGContactCalendar:is-primary property.
+ *
+ * Return value: %TRUE if this is the contact's primary calendar, %FALSE otherwise
+ *
+ * Since: 0.7.0
+ */
+gboolean
+gdata_gcontact_calendar_is_primary (GDataGContactCalendar *self)
+{
+ g_return_val_if_fail (GDATA_IS_GCONTACT_CALENDAR (self), FALSE);
+ return self->priv->is_primary;
+}
+
+/**
+ * gdata_gcontact_calendar_set_is_primary:
+ * @self: a #GDataGContactCalendar
+ * @is_primary: %TRUE if this is the contact's primary calendar, %FALSE otherwise
+ *
+ * Sets the #GDataGContactCalendar:is-primary property to @is_primary.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_gcontact_calendar_set_is_primary (GDataGContactCalendar *self, gboolean is_primary)
+{
+ g_return_if_fail (GDATA_IS_GCONTACT_CALENDAR (self));
+
+ self->priv->is_primary = is_primary;
+ g_object_notify (G_OBJECT (self), "is-primary");
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_GCONTACT_CALENDAR_H
+#define GDATA_GCONTACT_CALENDAR_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_GCONTACT_CALENDAR_WORK:
+ *
+ * The relation type URI for a contact's work calendar.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcCalendarLink">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_CALENDAR_WORK "work"
+
+/**
+ * GDATA_GCONTACT_CALENDAR_HOME:
+ *
+ * The relation type URI for a contact's home calendar.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcCalendarLink">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_CALENDAR_HOME "home"
+
+/**
+ * GDATA_GCONTACT_CALENDAR_FREE_BUSY:
+ *
+ * The relation type URI for a contact's free/busy calendar.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcCalendarLink">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_CALENDAR_FREE_BUSY "free-busy"
+
+#define GDATA_TYPE_GCONTACT_CALENDAR (gdata_gcontact_calendar_get_type ())
+#define GDATA_GCONTACT_CALENDAR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_GCONTACT_CALENDAR, GDataGContactCalendar))
+#define GDATA_GCONTACT_CALENDAR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_GCONTACT_CALENDAR, GDataGContactCalendarClass))
+#define GDATA_IS_GCONTACT_CALENDAR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_GCONTACT_CALENDAR))
+#define GDATA_IS_GCONTACT_CALENDAR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_GCONTACT_CALENDAR))
+#define GDATA_GCONTACT_CALENDAR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_GCONTACT_CALENDAR, GDataGContactCalendarClass))
+
+typedef struct _GDataGContactCalendarPrivate GDataGContactCalendarPrivate;
+
+/**
+ * GDataGContactCalendar:
+ *
+ * All the fields in the #GDataGContactCalendar structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataGContactCalendarPrivate *priv;
+} GDataGContactCalendar;
+
+/**
+ * GDataGContactCalendarClass:
+ *
+ * All the fields in the #GDataGContactCalendarClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataGContactCalendarClass;
+
+GType gdata_gcontact_calendar_get_type (void) G_GNUC_CONST;
+
+GDataGContactCalendar *gdata_gcontact_calendar_new (const gchar *uri, const gchar *relation_type,
+ const gchar *label, gboolean is_primary) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_gcontact_calendar_get_uri (GDataGContactCalendar *self) G_GNUC_PURE;
+void gdata_gcontact_calendar_set_uri (GDataGContactCalendar *self, const gchar *uri);
+
+const gchar *gdata_gcontact_calendar_get_relation_type (GDataGContactCalendar *self) G_GNUC_PURE;
+void gdata_gcontact_calendar_set_relation_type (GDataGContactCalendar *self, const gchar *relation_type);
+
+const gchar *gdata_gcontact_calendar_get_label (GDataGContactCalendar *self) G_GNUC_PURE;
+void gdata_gcontact_calendar_set_label (GDataGContactCalendar *self, const gchar *label);
+
+gboolean gdata_gcontact_calendar_is_primary (GDataGContactCalendar *self) G_GNUC_PURE;
+void gdata_gcontact_calendar_set_is_primary (GDataGContactCalendar *self, gboolean is_primary);
+
+G_END_DECLS
+
+#endif /* !GDATA_GCONTACT_CALENDAR_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-gcontact-event
+ * @short_description: gContact event element
+ * @stability: Stable
+ * @include: gdata/gcontact/gdata-gcontact-event.h
+ *
+ * #GDataGContactEvent represents a "event" element from the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcEvent">gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+
+#include <glib.h>
+#include <string.h>
+#include <libxml/parser.h>
+
+#include "gdata-gcontact-event.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+
+static void gdata_gcontact_event_finalize (GObject *object);
+static void gdata_gcontact_event_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_gcontact_event_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static gboolean post_parse_xml (GDataParsable *parsable, gpointer user_data, GError **error);
+static void pre_get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataGContactEventPrivate {
+ GDate date;
+ gchar *relation_type;
+ gchar *label;
+};
+
+enum {
+ PROP_DATE = 1,
+ PROP_RELATION_TYPE,
+ PROP_LABEL
+};
+
+G_DEFINE_TYPE (GDataGContactEvent, gdata_gcontact_event, GDATA_TYPE_PARSABLE)
+
+static void
+gdata_gcontact_event_class_init (GDataGContactEventClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataGContactEventPrivate));
+
+ gobject_class->get_property = gdata_gcontact_event_get_property;
+ gobject_class->set_property = gdata_gcontact_event_set_property;
+ gobject_class->finalize = gdata_gcontact_event_finalize;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ parsable_class->parse_xml = parse_xml;
+ parsable_class->post_parse_xml = post_parse_xml;
+ parsable_class->pre_get_xml = pre_get_xml;
+ parsable_class->get_xml = get_xml;
+ parsable_class->get_namespaces = get_namespaces;
+ parsable_class->element_name = "event";
+ parsable_class->element_namespace = "gContact";
+
+ /**
+ * GDataGContactEvent:date:
+ *
+ * The date of the event.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcEvent">GContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_DATE,
+ g_param_spec_boxed ("date",
+ "Date", "The date of the event.",
+ G_TYPE_DATE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGContactEvent:relation-type:
+ *
+ * A programmatic value that identifies the type of event. It is mutually exclusive with #GDataGContactEvent:label.
+ * Examples are %GDATA_GCONTACT_EVENT_ANNIVERSARY or %GDATA_GCONTACT_EVENT_OTHER.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcEvent">gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_RELATION_TYPE,
+ g_param_spec_string ("relation-type",
+ "Relation type", "A programmatic value that identifies the type of website.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGContactEvent:label:
+ *
+ * A simple string value used to name this event. It is mutually exclusive with #GDataGContactEvent:relation-type.
+ * It allows UIs to display a label such as "Wedding anniversary".
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcEvent">gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LABEL,
+ g_param_spec_string ("label",
+ "Label", "A simple string value used to name this event.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_gcontact_event_init (GDataGContactEvent *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GCONTACT_EVENT, GDataGContactEventPrivate);
+
+ /* Clear the date to an invalid but sane value */
+ g_date_clear (&(self->priv->date), 1);
+}
+
+static void
+gdata_gcontact_event_finalize (GObject *object)
+{
+ GDataGContactEventPrivate *priv = GDATA_GCONTACT_EVENT (object)->priv;
+
+ g_free (priv->relation_type);
+ g_free (priv->label);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_gcontact_event_parent_class)->finalize (object);
+}
+
+static void
+gdata_gcontact_event_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataGContactEventPrivate *priv = GDATA_GCONTACT_EVENT (object)->priv;
+
+ switch (property_id) {
+ case PROP_DATE:
+ g_value_set_boxed (value, &(priv->date));
+ break;
+ case PROP_RELATION_TYPE:
+ g_value_set_string (value, priv->relation_type);
+ break;
+ case PROP_LABEL:
+ g_value_set_string (value, priv->label);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_gcontact_event_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataGContactEvent *self = GDATA_GCONTACT_EVENT (object);
+
+ switch (property_id) {
+ case PROP_DATE:
+ gdata_gcontact_event_set_date (self, g_value_get_boxed (value));
+ break;
+ case PROP_RELATION_TYPE:
+ gdata_gcontact_event_set_relation_type (self, g_value_get_string (value));
+ break;
+ case PROP_LABEL:
+ gdata_gcontact_event_set_label (self, g_value_get_string (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ xmlChar *rel, *label;
+ GDataGContactEventPrivate *priv = GDATA_GCONTACT_EVENT (parsable)->priv;
+
+ rel = xmlGetProp (root_node, (xmlChar*) "rel");
+ label = xmlGetProp (root_node, (xmlChar*) "label");
+ if ((rel == NULL || *rel == '\0') && (label == NULL || *label == '\0')) {
+ xmlFree (rel);
+ xmlFree (label);
+ return gdata_parser_error_required_property_missing (root_node, "rel", error);
+ } else if (rel != NULL && label != NULL) {
+ /* Can't have both set at once */
+ xmlFree (rel);
+ xmlFree (label);
+ return gdata_parser_error_mutexed_properties (root_node, "rel", "label", error);
+ }
+
+ priv->relation_type = (gchar*) rel;
+ priv->label = (gchar*) label;
+
+ return TRUE;
+}
+
+static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ GDataGContactEventPrivate *priv = GDATA_GCONTACT_EVENT (parsable)->priv;
+
+ if (gdata_parser_is_namespace (node, "http://schemas.google.com/g/2005") == TRUE && xmlStrcmp (node->name, (xmlChar*) "when") == 0) {
+ xmlChar *start_time;
+ guint year, month, day;
+
+ /* gd:when; note we don't use GDataGDWhen here because gContact:event only uses a limited subset
+ * of gd:when (i.e. only the startTime property in date format) */
+ if (g_date_valid (&(priv->date)) == TRUE)
+ return gdata_parser_error_duplicate_element (node, error);
+
+ start_time = xmlGetProp (node, (xmlChar*) "startTime");
+ if (start_time == NULL)
+ return gdata_parser_error_required_property_missing (node, "startTime", error);
+
+ /* Try parsing the date format: YYYY-MM-DD */
+ if (strlen ((char*) start_time) == 10 &&
+ sscanf ((char*) start_time, "%4u-%2u-%2u", &year, &month, &day) == 3 && g_date_valid_dmy (day, month, year) == TRUE) {
+ /* Store the values in the GDate */
+ g_date_set_dmy (&(priv->date), day, month, year);
+ xmlFree (start_time);
+ } else {
+ /* Parsing failed */
+ gdata_parser_error_not_iso8601_format (node, (gchar*) start_time, error);
+ xmlFree (start_time);
+ return FALSE;
+ }
+
+ return TRUE;
+ }
+
+ return GDATA_PARSABLE_CLASS (gdata_gcontact_event_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+}
+
+static gboolean
+post_parse_xml (GDataParsable *parsable, gpointer user_data, GError **error)
+{
+ GDataGContactEventPrivate *priv = GDATA_GCONTACT_EVENT (parsable)->priv;
+
+ /* Check for missing required elements */
+ if (g_date_valid (&(priv->date)) == FALSE)
+ return gdata_parser_error_required_element_missing ("gd:when", "gContact:event", error);
+
+ return TRUE;
+}
+
+static void
+pre_get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataGContactEventPrivate *priv = GDATA_GCONTACT_EVENT (parsable)->priv;
+
+ if (priv->relation_type != NULL)
+ gdata_parser_string_append_escaped (xml_string, " rel='", priv->relation_type, "'");
+ else if (priv->label != NULL)
+ gdata_parser_string_append_escaped (xml_string, " label='", priv->label, "'");
+ else
+ g_assert_not_reached ();
+}
+
+static void
+get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataGContactEventPrivate *priv = GDATA_GCONTACT_EVENT (parsable)->priv;
+
+ g_string_append_printf (xml_string, "<gd:when startTime='%04u-%02u-%02u'/>",
+ g_date_get_year (&(priv->date)),
+ g_date_get_month (&(priv->date)),
+ g_date_get_day (&(priv->date)));
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ g_hash_table_insert (namespaces, (gchar*) "gd", (gchar*) "http://schemas.google.com/g/2005");
+ g_hash_table_insert (namespaces, (gchar*) "gContact", (gchar*) "http://schemas.google.com/contact/2008");
+}
+
+/**
+ * gdata_gcontact_event_new:
+ * @date: the date of the event
+ * @relation_type: (allow-none): the relationship between the event and its owner, or %NULL
+ * @label: (allow-none): a human-readable label for the event, or %NULL
+ *
+ * Creates a new #GDataGContactEvent. More information is available in the <ulink type="http"
+ * url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcEvent">gContact specification</ulink>.
+ *
+ * Exactly one of @relation_type and @label should be provided; the other must be %NULL.
+ *
+ * Return value: a new #GDataGContactEvent; unref with g_object_unref()
+ *
+ * Since: 0.7.0
+ */
+GDataGContactEvent *
+gdata_gcontact_event_new (const GDate *date, const gchar *relation_type, const gchar *label)
+{
+ g_return_val_if_fail (date != NULL && g_date_valid (date) == TRUE, NULL);
+ g_return_val_if_fail ((relation_type != NULL && *relation_type != '\0' && label == NULL) ||
+ (relation_type == NULL && label != NULL && *label != '\0'), NULL);
+
+ return g_object_new (GDATA_TYPE_GCONTACT_EVENT, "date", date, "relation-type", relation_type, "label", label, NULL);
+}
+
+/**
+ * gdata_gcontact_event_get_date:
+ * @self: a #GDataGContactEvent
+ * @date: (out caller-allocates): return location for the date of the event
+ *
+ * Gets the #GDataGContactEvent:date property.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_gcontact_event_get_date (GDataGContactEvent *self, GDate *date)
+{
+ g_return_if_fail (GDATA_IS_GCONTACT_EVENT (self));
+ g_return_if_fail (date != NULL);
+ *date = self->priv->date;
+}
+
+/**
+ * gdata_gcontact_event_set_date:
+ * @self: a #GDataGContactEvent
+ * @date: the new date for the event
+ *
+ * Sets the #GDataGContactEvent:date property to @date.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_gcontact_event_set_date (GDataGContactEvent *self, const GDate *date)
+{
+ g_return_if_fail (GDATA_IS_GCONTACT_EVENT (self));
+ g_return_if_fail (date != NULL && g_date_valid (date) == TRUE);
+
+ self->priv->date = *date;
+ g_object_notify (G_OBJECT (self), "date");
+}
+
+/**
+ * gdata_gcontact_event_get_relation_type:
+ * @self: a #GDataGContactEvent
+ *
+ * Gets the #GDataGContactEvent:relation-type property.
+ *
+ * Return value: the event's relation type, or %NULL
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_gcontact_event_get_relation_type (GDataGContactEvent *self)
+{
+ g_return_val_if_fail (GDATA_IS_GCONTACT_EVENT (self), NULL);
+ return self->priv->relation_type;
+}
+
+/**
+ * gdata_gcontact_event_set_relation_type:
+ * @self: a #GDataGContactEvent
+ * @relation_type: (allow-none): the new relation type for the event, or %NULL
+ *
+ * Sets the #GDataGContactEvent:relation-type property to @relation_type
+ * such as %GDATA_GCONTACT_EVENT_ANNIVERSARY or %GDATA_GCONTACT_EVENT_OTHER.
+ *
+ * If @relation_type is %NULL, the relation type will be unset. When the #GDataGContactEvent is used in a query, however,
+ * exactly one of #GDataGContactEvent:relation-type and #GDataGContactEvent:label must be %NULL.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_gcontact_event_set_relation_type (GDataGContactEvent *self, const gchar *relation_type)
+{
+ g_return_if_fail (GDATA_IS_GCONTACT_EVENT (self));
+ g_return_if_fail (relation_type == NULL || *relation_type != '\0');
+
+ g_free (self->priv->relation_type);
+ self->priv->relation_type = g_strdup (relation_type);
+ g_object_notify (G_OBJECT (self), "relation-type");
+}
+
+/**
+ * gdata_gcontact_event_get_label:
+ * @self: a #GDataGContactEvent
+ *
+ * Gets the #GDataGContactEvent:label property.
+ *
+ * Return value: the event's label, or %NULL
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_gcontact_event_get_label (GDataGContactEvent *self)
+{
+ g_return_val_if_fail (GDATA_IS_GCONTACT_EVENT (self), NULL);
+ return self->priv->label;
+}
+
+/**
+ * gdata_gcontact_event_set_label:
+ * @self: a #GDataGContactEvent
+ * @label: (allow-none): the new label for the event, or %NULL
+ *
+ * Sets the #GDataGContactEvent:label property to @label.
+ *
+ * If @label is %NULL, the label will be unset. When the #GDataGContactEvent is used in a query, however,
+ * exactly one of #GDataGContactEvent:relation-type and #GDataGContactEvent:label must be %NULL.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_gcontact_event_set_label (GDataGContactEvent *self, const gchar *label)
+{
+ g_return_if_fail (GDATA_IS_GCONTACT_EVENT (self));
+ g_return_if_fail (label == NULL || *label != '\0');
+
+ g_free (self->priv->label);
+ self->priv->label = g_strdup (label);
+ g_object_notify (G_OBJECT (self), "label");
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_GCONTACT_EVENT_H
+#define GDATA_GCONTACT_EVENT_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_GCONTACT_EVENT_ANNIVERSARY:
+ *
+ * The relation type URI for an anniversary event.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcEvent">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_EVENT_ANNIVERSARY "anniversary"
+
+/**
+ * GDATA_GCONTACT_EVENT_OTHER:
+ *
+ * The relation type URI for a miscellaneous event.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcEvent">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_EVENT_OTHER "other"
+
+#define GDATA_TYPE_GCONTACT_EVENT (gdata_gcontact_event_get_type ())
+#define GDATA_GCONTACT_EVENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_GCONTACT_EVENT, GDataGContactEvent))
+#define GDATA_GCONTACT_EVENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_GCONTACT_EVENT, GDataGContactEventClass))
+#define GDATA_IS_GCONTACT_EVENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_GCONTACT_EVENT))
+#define GDATA_IS_GCONTACT_EVENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_GCONTACT_EVENT))
+#define GDATA_GCONTACT_EVENT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_GCONTACT_EVENT, GDataGContactEventClass))
+
+typedef struct _GDataGContactEventPrivate GDataGContactEventPrivate;
+
+/**
+ * GDataGContactEvent:
+ *
+ * All the fields in the #GDataGContactEvent structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataGContactEventPrivate *priv;
+} GDataGContactEvent;
+
+/**
+ * GDataGContactEventClass:
+ *
+ * All the fields in the #GDataGContactEventClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataGContactEventClass;
+
+GType gdata_gcontact_event_get_type (void) G_GNUC_CONST;
+
+GDataGContactEvent *gdata_gcontact_event_new (const GDate *date, const gchar *relation_type,
+ const gchar *label) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+void gdata_gcontact_event_get_date (GDataGContactEvent *self, GDate *date);
+void gdata_gcontact_event_set_date (GDataGContactEvent *self, const GDate *date);
+
+const gchar *gdata_gcontact_event_get_relation_type (GDataGContactEvent *self) G_GNUC_PURE;
+void gdata_gcontact_event_set_relation_type (GDataGContactEvent *self, const gchar *relation_type);
+
+const gchar *gdata_gcontact_event_get_label (GDataGContactEvent *self) G_GNUC_PURE;
+void gdata_gcontact_event_set_label (GDataGContactEvent *self, const gchar *label);
+
+G_END_DECLS
+
+#endif /* !GDATA_GCONTACT_EVENT_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-gcontact-external-id
+ * @short_description: gContact externalId element
+ * @stability: Stable
+ * @include: gdata/gcontact/gdata-gcontact-external-id.h
+ *
+ * #GDataGContactExternalID represents an "externalId" element from the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcExternalId">gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+
+#include "gdata-gcontact-external-id.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-comparable.h"
+
+static void gdata_gcontact_external_id_comparable_init (GDataComparableIface *iface);
+static void gdata_gcontact_external_id_finalize (GObject *object);
+static void gdata_gcontact_external_id_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_gcontact_external_id_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static void pre_get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataGContactExternalIDPrivate {
+ gchar *value;
+ gchar *relation_type;
+ gchar *label;
+};
+
+enum {
+ PROP_VALUE = 1,
+ PROP_RELATION_TYPE,
+ PROP_LABEL
+};
+
+G_DEFINE_TYPE_WITH_CODE (GDataGContactExternalID, gdata_gcontact_external_id, GDATA_TYPE_PARSABLE,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_gcontact_external_id_comparable_init))
+
+static void
+gdata_gcontact_external_id_class_init (GDataGContactExternalIDClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataGContactExternalIDPrivate));
+
+ gobject_class->get_property = gdata_gcontact_external_id_get_property;
+ gobject_class->set_property = gdata_gcontact_external_id_set_property;
+ gobject_class->finalize = gdata_gcontact_external_id_finalize;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ parsable_class->pre_get_xml = pre_get_xml;
+ parsable_class->get_namespaces = get_namespaces;
+ parsable_class->element_name = "externalId";
+ parsable_class->element_namespace = "gContact";
+
+ /**
+ * GDataGContactExternalID:value:
+ *
+ * The value of the external ID.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcExternalId">gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_VALUE,
+ g_param_spec_string ("value",
+ "Value", "The value of the external ID.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGContactExternalID:relation-type:
+ *
+ * A programmatic value that identifies the type of external ID. It is mutually exclusive with #GDataGContactExternalID:label.
+ * Examples are %GDATA_GCONTACT_EXTERNAL_ID_NETWORK or %GDATA_GCONTACT_EXTERNAL_ID_ACCOUNT.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcExternalId">gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_RELATION_TYPE,
+ g_param_spec_string ("relation-type",
+ "Relation type", "A programmatic value that identifies the type of external ID.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGContactExternalID:label:
+ *
+ * A free-form string that identifies the type of external ID. It is mutually exclusive with #GDataGContactExternalID:relation-type.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcExternalId">gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LABEL,
+ g_param_spec_string ("label",
+ "Label", "A free-form string that identifies the type of external ID.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static gint
+compare_with (GDataComparable *self, GDataComparable *other)
+{
+ GDataGContactExternalIDPrivate *a = ((GDataGContactExternalID*) self)->priv, *b = ((GDataGContactExternalID*) other)->priv;
+
+ if (g_strcmp0 (a->value, b->value) == 0 && g_strcmp0 (a->relation_type, b->relation_type) == 0 && g_strcmp0 (a->label, b->label) == 0)
+ return 0;
+ return 1;
+}
+
+static void
+gdata_gcontact_external_id_comparable_init (GDataComparableIface *iface)
+{
+ iface->compare_with = compare_with;
+}
+
+static void
+gdata_gcontact_external_id_init (GDataGContactExternalID *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GCONTACT_EXTERNAL_ID, GDataGContactExternalIDPrivate);
+}
+
+static void
+gdata_gcontact_external_id_finalize (GObject *object)
+{
+ GDataGContactExternalIDPrivate *priv = GDATA_GCONTACT_EXTERNAL_ID (object)->priv;
+
+ g_free (priv->value);
+ g_free (priv->relation_type);
+ g_free (priv->label);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_gcontact_external_id_parent_class)->finalize (object);
+}
+
+static void
+gdata_gcontact_external_id_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataGContactExternalIDPrivate *priv = GDATA_GCONTACT_EXTERNAL_ID (object)->priv;
+
+ switch (property_id) {
+ case PROP_VALUE:
+ g_value_set_string (value, priv->value);
+ break;
+ case PROP_RELATION_TYPE:
+ g_value_set_string (value, priv->relation_type);
+ break;
+ case PROP_LABEL:
+ g_value_set_string (value, priv->label);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_gcontact_external_id_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataGContactExternalID *self = GDATA_GCONTACT_EXTERNAL_ID (object);
+
+ switch (property_id) {
+ case PROP_VALUE:
+ gdata_gcontact_external_id_set_value (self, g_value_get_string (value));
+ break;
+ case PROP_RELATION_TYPE:
+ gdata_gcontact_external_id_set_relation_type (self, g_value_get_string (value));
+ break;
+ case PROP_LABEL:
+ gdata_gcontact_external_id_set_label (self, g_value_get_string (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ xmlChar *value, *rel, *label;
+ GDataGContactExternalIDPrivate *priv = GDATA_GCONTACT_EXTERNAL_ID (parsable)->priv;
+
+ value = xmlGetProp (root_node, (xmlChar*) "value");
+ if (value == NULL) {
+ xmlFree (value);
+ return gdata_parser_error_required_property_missing (root_node, "value", error);
+ }
+
+ rel = xmlGetProp (root_node, (xmlChar*) "rel");
+ label = xmlGetProp (root_node, (xmlChar*) "label");
+ if ((rel == NULL || *rel == '\0') && (label == NULL || *label == '\0')) {
+ xmlFree (value);
+ xmlFree (rel);
+ xmlFree (label);
+ return gdata_parser_error_required_property_missing (root_node, "rel", error);
+ } else if (rel != NULL && label != NULL) {
+ /* Can't have both set at once */
+ xmlFree (value);
+ xmlFree (rel);
+ xmlFree (label);
+ return gdata_parser_error_mutexed_properties (root_node, "rel", "label", error);
+ }
+
+ priv->value = (gchar*) value;
+ priv->relation_type = (gchar*) rel;
+ priv->label = (gchar*) label;
+
+ return TRUE;
+}
+
+static void
+pre_get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataGContactExternalIDPrivate *priv = GDATA_GCONTACT_EXTERNAL_ID (parsable)->priv;
+
+ gdata_parser_string_append_escaped (xml_string, " value='", priv->value, "'");
+
+ if (priv->relation_type != NULL)
+ gdata_parser_string_append_escaped (xml_string, " rel='", priv->relation_type, "'");
+ else if (priv->label != NULL)
+ gdata_parser_string_append_escaped (xml_string, " label='", priv->label, "'");
+ else
+ g_assert_not_reached ();
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ g_hash_table_insert (namespaces, (gchar*) "gContact", (gchar*) "http://schemas.google.com/contact/2008");
+}
+
+/**
+ * gdata_gcontact_external_id_new:
+ * @value: the value of the external ID
+ * @relation_type: (allow-none): the type of external ID, or %NULL
+ * @label: (allow-none): a free-form label for the external ID, or %NULL
+ *
+ * Creates a new #GDataGContactExternalID. More information is available in the <ulink type="http"
+ * url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcExternalId">gContact specification</ulink>.
+ *
+ * Exactly one of @relation_type and @label should be provided; the other must be %NULL.
+ *
+ * Return value: a new #GDataGContactExternalID; unref with g_object_unref()
+ *
+ * Since: 0.7.0
+ */
+GDataGContactExternalID *
+gdata_gcontact_external_id_new (const gchar *value, const gchar *relation_type, const gchar *label)
+{
+ g_return_val_if_fail (value != NULL, NULL);
+ g_return_val_if_fail ((relation_type != NULL && *relation_type != '\0' && label == NULL) ||
+ (relation_type == NULL && label != NULL && *label != '\0'), NULL);
+
+ return g_object_new (GDATA_TYPE_GCONTACT_EXTERNAL_ID, "value", value, "relation-type", relation_type, "label", label, NULL);
+}
+
+/**
+ * gdata_gcontact_external_id_get_value:
+ * @self: a #GDataGContactExternalID
+ *
+ * Gets the #GDataGContactExternalID:value property.
+ *
+ * Return value: the external ID's value
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_gcontact_external_id_get_value (GDataGContactExternalID *self)
+{
+ g_return_val_if_fail (GDATA_IS_GCONTACT_EXTERNAL_ID (self), NULL);
+ return self->priv->value;
+}
+
+/**
+ * gdata_gcontact_external_id_set_value:
+ * @self: a #GDataGContactExternalID
+ * @value: the new value for the external ID
+ *
+ * Sets the #GDataGContactExternalID:value property to @value.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_gcontact_external_id_set_value (GDataGContactExternalID *self, const gchar *value)
+{
+ g_return_if_fail (GDATA_IS_GCONTACT_EXTERNAL_ID (self));
+ g_return_if_fail (value != NULL);
+
+ g_free (self->priv->value);
+ self->priv->value = g_strdup (value);
+ g_object_notify (G_OBJECT (self), "value");
+}
+
+/**
+ * gdata_gcontact_external_id_get_relation_type:
+ * @self: a #GDataGContactExternalID
+ *
+ * Gets the #GDataGContactExternalID:relation-type property.
+ *
+ * Return value: the type of the relation, or %NULL
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_gcontact_external_id_get_relation_type (GDataGContactExternalID *self)
+{
+ g_return_val_if_fail (GDATA_IS_GCONTACT_EXTERNAL_ID (self), NULL);
+ return self->priv->relation_type;
+}
+
+/**
+ * gdata_gcontact_external_id_set_relation_type:
+ * @self: a #GDataGContactExternalID
+ * @relation_type: (allow-none): the new type for the external ID, or %NULL
+ *
+ * Sets the #GDataGContactExternalID:relation-type property to @relation_type,
+ * such as %GDATA_GCONTACT_EXTERNAL_ID_NETWORK or %GDATA_GCONTACT_EXTERNAL_ID_ACCOUNT.
+ *
+ * If @relation_type is %NULL, the relation type will be unset. When the #GDataGContactExternalID is used in a query, however,
+ * exactly one of #GDataGContactExternalID:relation-type and #GDataGContactExternalID:label must be %NULL.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_gcontact_external_id_set_relation_type (GDataGContactExternalID *self, const gchar *relation_type)
+{
+ g_return_if_fail (GDATA_IS_GCONTACT_EXTERNAL_ID (self));
+ g_return_if_fail (relation_type == NULL || *relation_type != '\0');
+
+ g_free (self->priv->relation_type);
+ self->priv->relation_type = g_strdup (relation_type);
+ g_object_notify (G_OBJECT (self), "relation-type");
+}
+
+/**
+ * gdata_gcontact_external_id_get_label:
+ * @self: a #GDataGContactExternalID
+ *
+ * Gets the #GDataGContactExternalID:label property.
+ *
+ * Return value: a free-form label for the external ID, or %NULL
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_gcontact_external_id_get_label (GDataGContactExternalID *self)
+{
+ g_return_val_if_fail (GDATA_IS_GCONTACT_EXTERNAL_ID (self), NULL);
+ return self->priv->label;
+}
+
+/**
+ * gdata_gcontact_external_id_set_label:
+ * @self: a #GDataGContactExternalID
+ * @label: (allow-none): the new free-form label for the external ID, or %NULL
+ *
+ * Sets the #GDataGContactExternalID:label property to @label.
+ *
+ * If @label is %NULL, the label will be unset. When the #GDataGContactExternalID is used in a query, however,
+ * exactly one of #GDataGContactExternalID:relation-type and #GDataGContactExternalID:label must be %NULL.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_gcontact_external_id_set_label (GDataGContactExternalID *self, const gchar *label)
+{
+ g_return_if_fail (GDATA_IS_GCONTACT_EXTERNAL_ID (self));
+ g_return_if_fail (label == NULL || *label != '\0');
+
+ g_free (self->priv->label);
+ self->priv->label = g_strdup (label);
+ g_object_notify (G_OBJECT (self), "label");
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_GCONTACT_EXTERNAL_ID_H
+#define GDATA_GCONTACT_EXTERNAL_ID_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_GCONTACT_EXTERNAL_ID_ACCOUNT:
+ *
+ * The relation type URI for an account number identifier.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcExternalId">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_EXTERNAL_ID_ACCOUNT "account"
+
+/**
+ * GDATA_GCONTACT_EXTERNAL_ID_CUSTOMER:
+ *
+ * The relation type URI for a customer identifier.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcExternalId">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_EXTERNAL_ID_CUSTOMER "customer"
+
+/**
+ * GDATA_GCONTACT_EXTERNAL_ID_NETWORK:
+ *
+ * The relation type URI for a network identifier.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcExternalId">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_EXTERNAL_ID_NETWORK "network"
+
+/**
+ * GDATA_GCONTACT_EXTERNAL_ID_ORGANIZATION:
+ *
+ * The relation type URI for an identifier related to an organization the contact is associated with.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcExternalId">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_EXTERNAL_ID_ORGANIZATION "organization"
+
+#define GDATA_TYPE_GCONTACT_EXTERNAL_ID (gdata_gcontact_external_id_get_type ())
+#define GDATA_GCONTACT_EXTERNAL_ID(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_GCONTACT_EXTERNAL_ID, GDataGContactExternalID))
+#define GDATA_GCONTACT_EXTERNAL_ID_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_GCONTACT_EXTERNAL_ID, GDataGContactExternalIDClass))
+#define GDATA_IS_GCONTACT_EXTERNAL_ID(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_GCONTACT_EXTERNAL_ID))
+#define GDATA_IS_GCONTACT_EXTERNAL_ID_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_GCONTACT_EXTERNAL_ID))
+#define GDATA_GCONTACT_EXTERNAL_ID_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_GCONTACT_EXTERNAL_ID, GDataGContactExternalIDClass))
+
+typedef struct _GDataGContactExternalIDPrivate GDataGContactExternalIDPrivate;
+
+/**
+ * GDataGContactExternalID:
+ *
+ * All the fields in the #GDataGContactExternalID structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataGContactExternalIDPrivate *priv;
+} GDataGContactExternalID;
+
+/**
+ * GDataGContactExternalIDClass:
+ *
+ * All the fields in the #GDataGContactExternalIDClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataGContactExternalIDClass;
+
+GType gdata_gcontact_external_id_get_type (void) G_GNUC_CONST;
+
+GDataGContactExternalID *gdata_gcontact_external_id_new (const gchar *value, const gchar *relation_type,
+ const gchar *label) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_gcontact_external_id_get_value (GDataGContactExternalID *self) G_GNUC_PURE;
+void gdata_gcontact_external_id_set_value (GDataGContactExternalID *self, const gchar *value);
+
+const gchar *gdata_gcontact_external_id_get_relation_type (GDataGContactExternalID *self) G_GNUC_PURE;
+void gdata_gcontact_external_id_set_relation_type (GDataGContactExternalID *self, const gchar *relation_type);
+
+const gchar *gdata_gcontact_external_id_get_label (GDataGContactExternalID *self) G_GNUC_PURE;
+void gdata_gcontact_external_id_set_label (GDataGContactExternalID *self, const gchar *label);
+
+G_END_DECLS
+
+#endif /* !GDATA_GCONTACT_EXTERNAL_ID_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-gcontact-jot
+ * @short_description: gContact jot element
+ * @stability: Stable
+ * @include: gdata/gcontact/gdata-gcontact-jot.h
+ *
+ * #GDataGContactJot represents a "jot" element from the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcJot">gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+
+#include "gdata-gcontact-jot.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+
+static void gdata_gcontact_jot_finalize (GObject *object);
+static void gdata_gcontact_jot_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_gcontact_jot_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static void pre_get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataGContactJotPrivate {
+ gchar *content;
+ gchar *relation_type;
+};
+
+enum {
+ PROP_CONTENT = 1,
+ PROP_RELATION_TYPE
+};
+
+G_DEFINE_TYPE (GDataGContactJot, gdata_gcontact_jot, GDATA_TYPE_PARSABLE)
+
+static void
+gdata_gcontact_jot_class_init (GDataGContactJotClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataGContactJotPrivate));
+
+ gobject_class->get_property = gdata_gcontact_jot_get_property;
+ gobject_class->set_property = gdata_gcontact_jot_set_property;
+ gobject_class->finalize = gdata_gcontact_jot_finalize;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ parsable_class->parse_xml = parse_xml;
+ parsable_class->pre_get_xml = pre_get_xml;
+ parsable_class->get_xml = get_xml;
+ parsable_class->get_namespaces = get_namespaces;
+ parsable_class->element_name = "jot";
+ parsable_class->element_namespace = "gContact";
+
+ /**
+ * GDataGContactJot:content:
+ *
+ * The content of the jot.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcJot">gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_CONTENT,
+ g_param_spec_string ("content",
+ "Content", "The content of the jot.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGContactJot:relation-type:
+ *
+ * A programmatic value that identifies the type of jot. Examples are %GDATA_GCONTACT_JOT_HOME or %GDATA_GCONTACT_JOT_OTHER.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcJot">gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_RELATION_TYPE,
+ g_param_spec_string ("relation-type",
+ "Relation type", "A programmatic value that identifies the type of jot.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_gcontact_jot_init (GDataGContactJot *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GCONTACT_JOT, GDataGContactJotPrivate);
+}
+
+static void
+gdata_gcontact_jot_finalize (GObject *object)
+{
+ GDataGContactJotPrivate *priv = GDATA_GCONTACT_JOT (object)->priv;
+
+ g_free (priv->content);
+ g_free (priv->relation_type);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_gcontact_jot_parent_class)->finalize (object);
+}
+
+static void
+gdata_gcontact_jot_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataGContactJotPrivate *priv = GDATA_GCONTACT_JOT (object)->priv;
+
+ switch (property_id) {
+ case PROP_CONTENT:
+ g_value_set_string (value, priv->content);
+ break;
+ case PROP_RELATION_TYPE:
+ g_value_set_string (value, priv->relation_type);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_gcontact_jot_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataGContactJot *self = GDATA_GCONTACT_JOT (object);
+
+ switch (property_id) {
+ case PROP_CONTENT:
+ gdata_gcontact_jot_set_content (self, g_value_get_string (value));
+ break;
+ case PROP_RELATION_TYPE:
+ gdata_gcontact_jot_set_relation_type (self, g_value_get_string (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ xmlChar *rel;
+ GDataGContactJotPrivate *priv = GDATA_GCONTACT_JOT (parsable)->priv;
+
+ rel = xmlGetProp (root_node, (xmlChar*) "rel");
+ if (rel == NULL || *rel == '\0') {
+ xmlFree (rel);
+ return gdata_parser_error_required_property_missing (root_node, "rel", error);
+ }
+
+ priv->content = (gchar*) xmlNodeListGetString (doc, root_node->children, TRUE);
+ priv->relation_type = (gchar*) rel;
+
+ return TRUE;
+}
+
+static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ /* Textual content's handled in pre_parse_xml */
+ if (node->type != XML_ELEMENT_NODE)
+ return TRUE;
+
+ return GDATA_PARSABLE_CLASS (gdata_gcontact_jot_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+}
+
+static void
+pre_get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ gdata_parser_string_append_escaped (xml_string, " rel='", GDATA_GCONTACT_JOT (parsable)->priv->relation_type, "'");
+}
+
+static void
+get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ gdata_parser_string_append_escaped (xml_string, NULL, GDATA_GCONTACT_JOT (parsable)->priv->content, NULL);
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ g_hash_table_insert (namespaces, (gchar*) "gContact", (gchar*) "http://schemas.google.com/contact/2008");
+}
+
+/**
+ * gdata_gcontact_jot_new:
+ * @content: the content of the jot
+ * @relation_type: the relationship between the jot and its owner
+ *
+ * Creates a new #GDataGContactJot. More information is available in the <ulink type="http"
+ * url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcJot">gContact specification</ulink>.
+ *
+ * Return value: a new #GDataGContactJot; unref with g_object_unref()
+ *
+ * Since: 0.7.0
+ */
+GDataGContactJot *
+gdata_gcontact_jot_new (const gchar *content, const gchar *relation_type)
+{
+ g_return_val_if_fail (content != NULL, NULL);
+ g_return_val_if_fail (relation_type != NULL && *relation_type != '\0', NULL);
+ return g_object_new (GDATA_TYPE_GCONTACT_JOT, "content", content, "relation-type", relation_type, NULL);
+}
+
+/**
+ * gdata_gcontact_jot_get_content:
+ * @self: a #GDataGContactJot
+ *
+ * Gets the #GDataGContactJot:content property.
+ *
+ * Return value: the jot's content
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_gcontact_jot_get_content (GDataGContactJot *self)
+{
+ g_return_val_if_fail (GDATA_IS_GCONTACT_JOT (self), NULL);
+ return self->priv->content;
+}
+
+/**
+ * gdata_gcontact_jot_set_content:
+ * @self: a #GDataGContactJot
+ * @content: the new content
+ *
+ * Sets the #GDataGContactJot:content property to @content.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_gcontact_jot_set_content (GDataGContactJot *self, const gchar *content)
+{
+ g_return_if_fail (GDATA_IS_GCONTACT_JOT (self));
+ g_return_if_fail (content != NULL);
+
+ g_free (self->priv->content);
+ self->priv->content = g_strdup (content);
+ g_object_notify (G_OBJECT (self), "content");
+}
+
+/**
+ * gdata_gcontact_jot_get_relation_type:
+ * @self: a #GDataGContactJot
+ *
+ * Gets the #GDataGContactJot:relation-type property.
+ *
+ * Return value: the jot's relation type
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_gcontact_jot_get_relation_type (GDataGContactJot *self)
+{
+ g_return_val_if_fail (GDATA_IS_GCONTACT_JOT (self), NULL);
+ return self->priv->relation_type;
+}
+
+/**
+ * gdata_gcontact_jot_set_relation_type:
+ * @self: a #GDataGContactJot
+ * @relation_type: the new relation type for the jot, or %NULL
+ *
+ * Sets the #GDataGContactJot:relation-type property to @relation_type
+ * such as %GDATA_GCONTACT_JOT_HOME or %GDATA_GCONTACT_JOT_OTHER.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_gcontact_jot_set_relation_type (GDataGContactJot *self, const gchar *relation_type)
+{
+ g_return_if_fail (GDATA_IS_GCONTACT_JOT (self));
+ g_return_if_fail (relation_type != NULL && *relation_type != '\0');
+
+ g_free (self->priv->relation_type);
+ self->priv->relation_type = g_strdup (relation_type);
+ g_object_notify (G_OBJECT (self), "relation-type");
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_GCONTACT_JOT_H
+#define GDATA_GCONTACT_JOT_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_GCONTACT_JOT_HOME:
+ *
+ * The relation type URI for a jot about a contact's home.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcJot">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_JOT_HOME "home"
+
+/**
+ * GDATA_GCONTACT_JOT_WORK:
+ *
+ * The relation type URI for a jot about a contact's work.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcJot">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_JOT_WORK "work"
+
+/**
+ * GDATA_GCONTACT_JOT_OTHER:
+ *
+ * The relation type URI for a jot about an other facet of a contact.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcJot">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_JOT_OTHER "other"
+
+/**
+ * GDATA_GCONTACT_JOT_KEYWORDS:
+ *
+ * The relation type URI for a jot with keywords about a contact.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcJot">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_JOT_KEYWORDS "keywords"
+
+/**
+ * GDATA_GCONTACT_JOT_USER:
+ *
+ * The relation type URI for a jot about the relationship between a contact and the user.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcJot">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_JOT_USER "user"
+
+#define GDATA_TYPE_GCONTACT_JOT (gdata_gcontact_jot_get_type ())
+#define GDATA_GCONTACT_JOT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_GCONTACT_JOT, GDataGContactJot))
+#define GDATA_GCONTACT_JOT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_GCONTACT_JOT, GDataGContactJotClass))
+#define GDATA_IS_GCONTACT_JOT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_GCONTACT_JOT))
+#define GDATA_IS_GCONTACT_JOT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_GCONTACT_JOT))
+#define GDATA_GCONTACT_JOT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_GCONTACT_JOT, GDataGContactJotClass))
+
+typedef struct _GDataGContactJotPrivate GDataGContactJotPrivate;
+
+/**
+ * GDataGContactJot:
+ *
+ * All the fields in the #GDataGContactJot structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataGContactJotPrivate *priv;
+} GDataGContactJot;
+
+/**
+ * GDataGContactJotClass:
+ *
+ * All the fields in the #GDataGContactJotClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataGContactJotClass;
+
+GType gdata_gcontact_jot_get_type (void) G_GNUC_CONST;
+
+GDataGContactJot *gdata_gcontact_jot_new (const gchar *content, const gchar *relation_type) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_gcontact_jot_get_content (GDataGContactJot *self) G_GNUC_PURE;
+void gdata_gcontact_jot_set_content (GDataGContactJot *self, const gchar *content);
+
+const gchar *gdata_gcontact_jot_get_relation_type (GDataGContactJot *self) G_GNUC_PURE;
+void gdata_gcontact_jot_set_relation_type (GDataGContactJot *self, const gchar *relation_type);
+
+G_END_DECLS
+
+#endif /* !GDATA_GCONTACT_JOT_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-gcontact-language
+ * @short_description: gContact language element
+ * @stability: Stable
+ * @include: gdata/gcontact/gdata-gcontact-language.h
+ *
+ * #GDataGContactLanguage represents a "language" element from the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcLanguage">gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+
+#include "gdata-gcontact-language.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-comparable.h"
+
+static void gdata_gcontact_language_comparable_init (GDataComparableIface *iface);
+static void gdata_gcontact_language_finalize (GObject *object);
+static void gdata_gcontact_language_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_gcontact_language_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static void pre_get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataGContactLanguagePrivate {
+ gchar *code;
+ gchar *label;
+};
+
+enum {
+ PROP_CODE = 1,
+ PROP_LABEL
+};
+
+G_DEFINE_TYPE_WITH_CODE (GDataGContactLanguage, gdata_gcontact_language, GDATA_TYPE_PARSABLE,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_gcontact_language_comparable_init))
+
+static void
+gdata_gcontact_language_class_init (GDataGContactLanguageClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataGContactLanguagePrivate));
+
+ gobject_class->get_property = gdata_gcontact_language_get_property;
+ gobject_class->set_property = gdata_gcontact_language_set_property;
+ gobject_class->finalize = gdata_gcontact_language_finalize;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ parsable_class->pre_get_xml = pre_get_xml;
+ parsable_class->get_namespaces = get_namespaces;
+ parsable_class->element_name = "language";
+ parsable_class->element_namespace = "gContact";
+
+ /**
+ * GDataGContactLanguage:code:
+ *
+ * A code identifying the language, conforming to the IETF BCP 47 specification. It is mutually exclusive with #GDataGContactLanguage:label.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcLanguage">gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_CODE,
+ g_param_spec_string ("code",
+ "Code", "A code identifying the language, conforming to the IETF BCP 47 specification.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGContactLanguage:label:
+ *
+ * A free-form string that identifies the language. It is mutually exclusive with #GDataGContactLanguage:code.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcLanguage">gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LABEL,
+ g_param_spec_string ("label",
+ "Label", "A free-form string that identifies the language.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static gint
+compare_with (GDataComparable *self, GDataComparable *other)
+{
+ GDataGContactLanguagePrivate *a = ((GDataGContactLanguage*) self)->priv, *b = ((GDataGContactLanguage*) other)->priv;
+
+ if (g_strcmp0 (a->code, b->code) == 0 && g_strcmp0 (a->label, b->label) == 0)
+ return 0;
+ return 1;
+}
+
+static void
+gdata_gcontact_language_comparable_init (GDataComparableIface *iface)
+{
+ iface->compare_with = compare_with;
+}
+
+static void
+gdata_gcontact_language_init (GDataGContactLanguage *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GCONTACT_LANGUAGE, GDataGContactLanguagePrivate);
+}
+
+static void
+gdata_gcontact_language_finalize (GObject *object)
+{
+ GDataGContactLanguagePrivate *priv = GDATA_GCONTACT_LANGUAGE (object)->priv;
+
+ g_free (priv->code);
+ g_free (priv->label);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_gcontact_language_parent_class)->finalize (object);
+}
+
+static void
+gdata_gcontact_language_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataGContactLanguagePrivate *priv = GDATA_GCONTACT_LANGUAGE (object)->priv;
+
+ switch (property_id) {
+ case PROP_CODE:
+ g_value_set_string (value, priv->code);
+ break;
+ case PROP_LABEL:
+ g_value_set_string (value, priv->label);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_gcontact_language_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataGContactLanguage *self = GDATA_GCONTACT_LANGUAGE (object);
+
+ switch (property_id) {
+ case PROP_CODE:
+ gdata_gcontact_language_set_code (self, g_value_get_string (value));
+ break;
+ case PROP_LABEL:
+ gdata_gcontact_language_set_label (self, g_value_get_string (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ xmlChar *code, *label;
+ GDataGContactLanguagePrivate *priv = GDATA_GCONTACT_LANGUAGE (parsable)->priv;
+
+ code = xmlGetProp (root_node, (xmlChar*) "code");
+ label = xmlGetProp (root_node, (xmlChar*) "label");
+ if ((code == NULL || *code == '\0') && (label == NULL || *label == '\0')) {
+ xmlFree (code);
+ xmlFree (label);
+ return gdata_parser_error_required_property_missing (root_node, "code", error);
+ } else if (code != NULL && label != NULL) {
+ /* Can't have both set at once */
+ xmlFree (code);
+ xmlFree (label);
+ return gdata_parser_error_mutexed_properties (root_node, "code", "label", error);
+ }
+
+ priv->code = (gchar*) code;
+ priv->label = (gchar*) label;
+
+ return TRUE;
+}
+
+static void
+pre_get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataGContactLanguagePrivate *priv = GDATA_GCONTACT_LANGUAGE (parsable)->priv;
+
+ if (priv->code != NULL)
+ gdata_parser_string_append_escaped (xml_string, " code='", priv->code, "'");
+ else if (priv->label != NULL)
+ gdata_parser_string_append_escaped (xml_string, " label='", priv->label, "'");
+ else
+ g_assert_not_reached ();
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ g_hash_table_insert (namespaces, (gchar*) "gContact", (gchar*) "http://schemas.google.com/contact/2008");
+}
+
+/**
+ * gdata_gcontact_language_new:
+ * @code: (allow-none): the language code, or %NULL
+ * @label: (allow-none): a free-form label for the language, or %NULL
+ *
+ * Creates a new #GDataGContactLanguage. More information is available in the <ulink type="http"
+ * url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcLanguage">gContact specification</ulink>.
+ *
+ * Exactly one of @code and @label should be provided; the other must be %NULL.
+ *
+ * Return value: a new #GDataGContactLanguage; unref with g_object_unref()
+ *
+ * Since: 0.7.0
+ */
+GDataGContactLanguage *
+gdata_gcontact_language_new (const gchar *code, const gchar *label)
+{
+ g_return_val_if_fail ((code != NULL && *code != '\0' && label == NULL) || (code == NULL && label != NULL && *label != '\0'), NULL);
+ return g_object_new (GDATA_TYPE_GCONTACT_LANGUAGE, "code", code, "label", label, NULL);
+}
+
+/**
+ * gdata_gcontact_language_get_code:
+ * @self: a #GDataGContactLanguage
+ *
+ * Gets the #GDataGContactLanguage:code property.
+ *
+ * Return value: the language's code, or %NULL
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_gcontact_language_get_code (GDataGContactLanguage *self)
+{
+ g_return_val_if_fail (GDATA_IS_GCONTACT_LANGUAGE (self), NULL);
+ return self->priv->code;
+}
+
+/**
+ * gdata_gcontact_language_set_code:
+ * @self: a #GDataGContactLanguage
+ * @code: (allow-none): the new code for the language, or %NULL
+ *
+ * Sets the #GDataGContactLanguage:code property to @code.
+ *
+ * If @code is %NULL, the code will be unset. When the #GDataGContactLanguage is used in a query, however,
+ * exactly one of #GDataGContactLanguage:code and #GDataGContactLanguage:label must be %NULL.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_gcontact_language_set_code (GDataGContactLanguage *self, const gchar *code)
+{
+ g_return_if_fail (GDATA_IS_GCONTACT_LANGUAGE (self));
+ g_return_if_fail (code == NULL || *code != '\0');
+
+ g_free (self->priv->code);
+ self->priv->code = g_strdup (code);
+ g_object_notify (G_OBJECT (self), "code");
+}
+
+/**
+ * gdata_gcontact_language_get_label:
+ * @self: a #GDataGContactLanguage
+ *
+ * Gets the #GDataGContactLanguage:label property.
+ *
+ * Return value: a free-form label for the language, or %NULL
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_gcontact_language_get_label (GDataGContactLanguage *self)
+{
+ g_return_val_if_fail (GDATA_IS_GCONTACT_LANGUAGE (self), NULL);
+ return self->priv->label;
+}
+
+/**
+ * gdata_gcontact_language_set_label:
+ * @self: a #GDataGContactLanguage
+ * @label: (allow-none): the new free-form label for the language, or %NULL
+ *
+ * Sets the #GDataGContactLanguage:label property to @label.
+ *
+ * If @label is %NULL, the label will be unset. When the #GDataGContactLanguage is used in a query, however,
+ * exactly one of #GDataGContactLanguage:code and #GDataGContactLanguage:label must be %NULL.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_gcontact_language_set_label (GDataGContactLanguage *self, const gchar *label)
+{
+ g_return_if_fail (GDATA_IS_GCONTACT_LANGUAGE (self));
+ g_return_if_fail (label == NULL || *label != '\0');
+
+ g_free (self->priv->label);
+ self->priv->label = g_strdup (label);
+ g_object_notify (G_OBJECT (self), "label");
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_GCONTACT_LANGUAGE_H
+#define GDATA_GCONTACT_LANGUAGE_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_GCONTACT_LANGUAGE (gdata_gcontact_language_get_type ())
+#define GDATA_GCONTACT_LANGUAGE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_GCONTACT_LANGUAGE, GDataGContactLanguage))
+#define GDATA_GCONTACT_LANGUAGE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_GCONTACT_LANGUAGE, GDataGContactLanguageClass))
+#define GDATA_IS_GCONTACT_LANGUAGE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_GCONTACT_LANGUAGE))
+#define GDATA_IS_GCONTACT_LANGUAGE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_GCONTACT_LANGUAGE))
+#define GDATA_GCONTACT_LANGUAGE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_GCONTACT_LANGUAGE, GDataGContactLanguageClass))
+
+typedef struct _GDataGContactLanguagePrivate GDataGContactLanguagePrivate;
+
+/**
+ * GDataGContactLanguage:
+ *
+ * All the fields in the #GDataGContactLanguage structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataGContactLanguagePrivate *priv;
+} GDataGContactLanguage;
+
+/**
+ * GDataGContactLanguageClass:
+ *
+ * All the fields in the #GDataGContactLanguageClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataGContactLanguageClass;
+
+GType gdata_gcontact_language_get_type (void) G_GNUC_CONST;
+
+GDataGContactLanguage *gdata_gcontact_language_new (const gchar *code, const gchar *label) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_gcontact_language_get_code (GDataGContactLanguage *self) G_GNUC_PURE;
+void gdata_gcontact_language_set_code (GDataGContactLanguage *self, const gchar *code);
+
+const gchar *gdata_gcontact_language_get_label (GDataGContactLanguage *self) G_GNUC_PURE;
+void gdata_gcontact_language_set_label (GDataGContactLanguage *self, const gchar *label);
+
+G_END_DECLS
+
+#endif /* !GDATA_GCONTACT_LANGUAGE_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-gcontact-relation
+ * @short_description: gContact relation element
+ * @stability: Stable
+ * @include: gdata/gcontact/gdata-gcontact-relation.h
+ *
+ * #GDataGContactRelation represents a "relation" element from the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcJot">gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+
+#include "gdata-gcontact-relation.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+
+static void gdata_gcontact_relation_finalize (GObject *object);
+static void gdata_gcontact_relation_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_gcontact_relation_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static void pre_get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataGContactRelationPrivate {
+ gchar *name;
+ gchar *relation_type;
+ gchar *label;
+};
+
+enum {
+ PROP_NAME = 1,
+ PROP_RELATION_TYPE,
+ PROP_LABEL
+};
+
+G_DEFINE_TYPE (GDataGContactRelation, gdata_gcontact_relation, GDATA_TYPE_PARSABLE)
+
+static void
+gdata_gcontact_relation_class_init (GDataGContactRelationClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataGContactRelationPrivate));
+
+ gobject_class->get_property = gdata_gcontact_relation_get_property;
+ gobject_class->set_property = gdata_gcontact_relation_set_property;
+ gobject_class->finalize = gdata_gcontact_relation_finalize;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ parsable_class->parse_xml = parse_xml;
+ parsable_class->pre_get_xml = pre_get_xml;
+ parsable_class->get_xml = get_xml;
+ parsable_class->get_namespaces = get_namespaces;
+ parsable_class->element_name = "relation";
+ parsable_class->element_namespace = "gContact";
+
+ /**
+ * GDataGContactRelation:name:
+ *
+ * The name of the relation. It need not be a full name, and there need not be a contact representing the name.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcRelation">gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_NAME,
+ g_param_spec_string ("name",
+ "Name", "The name of the relation.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGContactRelation:relation-type:
+ *
+ * A programmatic value that identifies the type of relation. It is mutually exclusive with #GDataGContactRelation:label.
+ * Examples are %GDATA_GCONTACT_RELATION_MANAGER or %GDATA_GCONTACT_RELATION_CHILD.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcRelation">gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_RELATION_TYPE,
+ g_param_spec_string ("relation-type",
+ "Relation type", "A programmatic value that identifies the type of relation.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGContactRelation:label:
+ *
+ * A free-form string that identifies the type of relation. It is mutually exclusive with #GDataGContactRelation:relation-type.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcRelation">gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LABEL,
+ g_param_spec_string ("label",
+ "Label", "A free-form string that identifies the type of relation.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_gcontact_relation_init (GDataGContactRelation *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GCONTACT_RELATION, GDataGContactRelationPrivate);
+}
+
+static void
+gdata_gcontact_relation_finalize (GObject *object)
+{
+ GDataGContactRelationPrivate *priv = GDATA_GCONTACT_RELATION (object)->priv;
+
+ g_free (priv->name);
+ g_free (priv->relation_type);
+ g_free (priv->label);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_gcontact_relation_parent_class)->finalize (object);
+}
+
+static void
+gdata_gcontact_relation_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataGContactRelationPrivate *priv = GDATA_GCONTACT_RELATION (object)->priv;
+
+ switch (property_id) {
+ case PROP_NAME:
+ g_value_set_string (value, priv->name);
+ break;
+ case PROP_RELATION_TYPE:
+ g_value_set_string (value, priv->relation_type);
+ break;
+ case PROP_LABEL:
+ g_value_set_string (value, priv->label);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_gcontact_relation_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataGContactRelation *self = GDATA_GCONTACT_RELATION (object);
+
+ switch (property_id) {
+ case PROP_NAME:
+ gdata_gcontact_relation_set_name (self, g_value_get_string (value));
+ break;
+ case PROP_RELATION_TYPE:
+ gdata_gcontact_relation_set_relation_type (self, g_value_get_string (value));
+ break;
+ case PROP_LABEL:
+ gdata_gcontact_relation_set_label (self, g_value_get_string (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ xmlChar *rel, *label, *name;
+ GDataGContactRelationPrivate *priv = GDATA_GCONTACT_RELATION (parsable)->priv;
+
+ rel = xmlGetProp (root_node, (xmlChar*) "rel");
+ label = xmlGetProp (root_node, (xmlChar*) "label");
+ if ((rel == NULL || *rel == '\0') && (label == NULL || *label == '\0')) {
+ xmlFree (rel);
+ xmlFree (label);
+ return gdata_parser_error_required_property_missing (root_node, "rel", error);
+ } else if (rel != NULL && label != NULL) {
+ /* Can't have both set at once */
+ xmlFree (rel);
+ xmlFree (label);
+ return gdata_parser_error_mutexed_properties (root_node, "rel", "label", error);
+ }
+
+ /* Get the name */
+ name = xmlNodeListGetString (doc, root_node->children, TRUE);
+ if (name == NULL || *name == '\0') {
+ xmlFree (rel);
+ xmlFree (label);
+ xmlFree (name);
+ return gdata_parser_error_required_content_missing (root_node, error);
+ }
+
+ priv->name = (gchar*) name;
+ priv->relation_type = (gchar*) rel;
+ priv->label = (gchar*) label;
+
+ return TRUE;
+}
+
+static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ /* Textual content's handled in pre_parse_xml */
+ if (node->type != XML_ELEMENT_NODE)
+ return TRUE;
+
+ return GDATA_PARSABLE_CLASS (gdata_gcontact_relation_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+}
+
+static void
+pre_get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataGContactRelationPrivate *priv = GDATA_GCONTACT_RELATION (parsable)->priv;
+
+ if (priv->relation_type != NULL)
+ gdata_parser_string_append_escaped (xml_string, " rel='", priv->relation_type, "'");
+ else if (priv->label != NULL)
+ gdata_parser_string_append_escaped (xml_string, " label='", priv->label, "'");
+ else
+ g_assert_not_reached ();
+}
+
+static void
+get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ gdata_parser_string_append_escaped (xml_string, NULL, GDATA_GCONTACT_RELATION (parsable)->priv->name, NULL);
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ g_hash_table_insert (namespaces, (gchar*) "gContact", (gchar*) "http://schemas.google.com/contact/2008");
+}
+
+/**
+ * gdata_gcontact_relation_new:
+ * @name: the name of the relation
+ * @relation_type: (allow-none): the type of relation, or %NULL
+ * @label: (allow-none): a free-form label for the type of relation, or %NULL
+ *
+ * Creates a new #GDataGContactRelation. More information is available in the <ulink type="http"
+ * url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcRelation">gContact specification</ulink>.
+ *
+ * Exactly one of @relation_type and @label should be provided; the other must be %NULL.
+ *
+ * Return value: a new #GDataGContactRelation; unref with g_object_unref()
+ *
+ * Since: 0.7.0
+ */
+GDataGContactRelation *
+gdata_gcontact_relation_new (const gchar *name, const gchar *relation_type, const gchar *label)
+{
+ g_return_val_if_fail (name != NULL && *name != '\0', NULL);
+ g_return_val_if_fail ((relation_type != NULL && *relation_type != '\0' && label == NULL) ||
+ (relation_type == NULL && label != NULL && *label != '\0'), NULL);
+
+ return g_object_new (GDATA_TYPE_GCONTACT_RELATION, "name", name, "relation-type", relation_type, "label", label, NULL);
+}
+
+/**
+ * gdata_gcontact_relation_get_name:
+ * @self: a #GDataGContactRelation
+ *
+ * Gets the #GDataGContactRelation:name property.
+ *
+ * Return value: the relation's name
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_gcontact_relation_get_name (GDataGContactRelation *self)
+{
+ g_return_val_if_fail (GDATA_IS_GCONTACT_RELATION (self), NULL);
+ return self->priv->name;
+}
+
+/**
+ * gdata_gcontact_relation_set_name:
+ * @self: a #GDataGContactRelation
+ * @name: (allow-none): the new name for the relation
+ *
+ * Sets the #GDataGContactRelation:name property to @name.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_gcontact_relation_set_name (GDataGContactRelation *self, const gchar *name)
+{
+ g_return_if_fail (GDATA_IS_GCONTACT_RELATION (self));
+ g_return_if_fail (name != NULL && *name != '\0');
+
+ g_free (self->priv->name);
+ self->priv->name = g_strdup (name);
+ g_object_notify (G_OBJECT (self), "name");
+}
+
+/**
+ * gdata_gcontact_relation_get_relation_type:
+ * @self: a #GDataGContactRelation
+ *
+ * Gets the #GDataGContactRelation:relation-type property.
+ *
+ * Return value: the type of the relation, or %NULL
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_gcontact_relation_get_relation_type (GDataGContactRelation *self)
+{
+ g_return_val_if_fail (GDATA_IS_GCONTACT_RELATION (self), NULL);
+ return self->priv->relation_type;
+}
+
+/**
+ * gdata_gcontact_relation_set_relation_type:
+ * @self: a #GDataGContactRelation
+ * @relation_type: (allow-none): the new type for the relation, or %NULL
+ *
+ * Sets the #GDataGContactRelation:relation-type property to @relation_type,
+ * such as %GDATA_GCONTACT_RELATION_MANAGER or %GDATA_GCONTACT_RELATION_CHILD.
+ *
+ * If @relation_type is %NULL, the relation type will be unset. When the #GDataGContactRelation is used in a query, however,
+ * exactly one of #GDataGContactRelation:relation-type and #GDataGContactRelation:label must be %NULL.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_gcontact_relation_set_relation_type (GDataGContactRelation *self, const gchar *relation_type)
+{
+ g_return_if_fail (GDATA_IS_GCONTACT_RELATION (self));
+ g_return_if_fail (relation_type == NULL || *relation_type != '\0');
+
+ g_free (self->priv->relation_type);
+ self->priv->relation_type = g_strdup (relation_type);
+ g_object_notify (G_OBJECT (self), "relation-type");
+}
+
+/**
+ * gdata_gcontact_relation_get_label:
+ * @self: a #GDataGContactRelation
+ *
+ * Gets the #GDataGContactRelation:label property.
+ *
+ * Return value: a free-form label for the type of the relation, or %NULL
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_gcontact_relation_get_label (GDataGContactRelation *self)
+{
+ g_return_val_if_fail (GDATA_IS_GCONTACT_RELATION (self), NULL);
+ return self->priv->label;
+}
+
+/**
+ * gdata_gcontact_relation_set_label:
+ * @self: a #GDataGContactRelation
+ * @label: (allow-none): the new free-form type for the relation, or %NULL
+ *
+ * Sets the #GDataGContactRelation:label property to @label.
+ *
+ * If @label is %NULL, the label will be unset. When the #GDataGContactRelation is used in a query, however,
+ * exactly one of #GDataGContactRelation:relation-type and #GDataGContactRelation:label must be %NULL.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_gcontact_relation_set_label (GDataGContactRelation *self, const gchar *label)
+{
+ g_return_if_fail (GDATA_IS_GCONTACT_RELATION (self));
+ g_return_if_fail (label == NULL || *label != '\0');
+
+ g_free (self->priv->label);
+ self->priv->label = g_strdup (label);
+ g_object_notify (G_OBJECT (self), "label");
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_GCONTACT_RELATION_H
+#define GDATA_GCONTACT_RELATION_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_GCONTACT_RELATION_ASSISTANT:
+ *
+ * The relation type URI for a contact's assistant.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcRelation">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_RELATION_ASSISTANT "assistant"
+
+/**
+ * GDATA_GCONTACT_RELATION_BROTHER:
+ *
+ * The relation type URI for a contact's brother.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcRelation">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_RELATION_BROTHER "brother"
+
+/**
+ * GDATA_GCONTACT_RELATION_CHILD:
+ *
+ * The relation type URI for a contact's child.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcRelation">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_RELATION_CHILD "child"
+
+/**
+ * GDATA_GCONTACT_RELATION_DOMESTIC_PARTNER:
+ *
+ * The relation type URI for a contact's domestic partner.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcRelation">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_RELATION_DOMESTIC_PARTNER "domestic-partner"
+
+/**
+ * GDATA_GCONTACT_RELATION_FATHER:
+ *
+ * The relation type URI for a contact's father.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcRelation">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_RELATION_FATHER "father"
+
+/**
+ * GDATA_GCONTACT_RELATION_FRIEND:
+ *
+ * The relation type URI for a contact's friend.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcRelation">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_RELATION_FRIEND "friend"
+
+/**
+ * GDATA_GCONTACT_RELATION_MANAGER:
+ *
+ * The relation type URI for a contact's manager.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcRelation">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_RELATION_MANAGER "manager"
+
+/**
+ * GDATA_GCONTACT_RELATION_MOTHER:
+ *
+ * The relation type URI for a contact's mother.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcRelation">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_RELATION_MOTHER "mother"
+
+/**
+ * GDATA_GCONTACT_RELATION_PARENT:
+ *
+ * The relation type URI for a contact's parent.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcRelation">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_RELATION_PARENT "parent"
+
+/**
+ * GDATA_GCONTACT_RELATION_PARTNER:
+ *
+ * The relation type URI for a contact's business partner.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcRelation">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_RELATION_PARTNER "partner"
+
+/**
+ * GDATA_GCONTACT_RELATION_REFERRER:
+ *
+ * The relation type URI for a contact's referrer.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcRelation">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_RELATION_REFERRER "referred-by"
+
+/**
+ * GDATA_GCONTACT_RELATION_RELATIVE:
+ *
+ * The relation type URI for a contact's (general) family relative.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcRelation">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_RELATION_RELATIVE "relative"
+
+/**
+ * GDATA_GCONTACT_RELATION_SISTER:
+ *
+ * The relation type URI for a contact's sister.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcRelation">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_RELATION_SISTER "sister"
+
+/**
+ * GDATA_GCONTACT_RELATION_SPOUSE:
+ *
+ * The relation type URI for a contact's spouse.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcRelation">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_RELATION_SPOUSE "spouse"
+
+#define GDATA_TYPE_GCONTACT_RELATION (gdata_gcontact_relation_get_type ())
+#define GDATA_GCONTACT_RELATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_GCONTACT_RELATION, GDataGContactRelation))
+#define GDATA_GCONTACT_RELATION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_GCONTACT_RELATION, GDataGContactRelationClass))
+#define GDATA_IS_GCONTACT_RELATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_GCONTACT_RELATION))
+#define GDATA_IS_GCONTACT_RELATION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_GCONTACT_RELATION))
+#define GDATA_GCONTACT_RELATION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_GCONTACT_RELATION, GDataGContactRelationClass))
+
+typedef struct _GDataGContactRelationPrivate GDataGContactRelationPrivate;
+
+/**
+ * GDataGContactRelation:
+ *
+ * All the fields in the #GDataGContactRelation structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataGContactRelationPrivate *priv;
+} GDataGContactRelation;
+
+/**
+ * GDataGContactRelationClass:
+ *
+ * All the fields in the #GDataGContactRelationClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataGContactRelationClass;
+
+GType gdata_gcontact_relation_get_type (void) G_GNUC_CONST;
+
+GDataGContactRelation *gdata_gcontact_relation_new (const gchar *name, const gchar *relation_type,
+ const gchar *label) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_gcontact_relation_get_name (GDataGContactRelation *self) G_GNUC_PURE;
+void gdata_gcontact_relation_set_name (GDataGContactRelation *self, const gchar *name);
+
+const gchar *gdata_gcontact_relation_get_relation_type (GDataGContactRelation *self) G_GNUC_PURE;
+void gdata_gcontact_relation_set_relation_type (GDataGContactRelation *self, const gchar *relation_type);
+
+const gchar *gdata_gcontact_relation_get_label (GDataGContactRelation *self) G_GNUC_PURE;
+void gdata_gcontact_relation_set_label (GDataGContactRelation *self, const gchar *label);
+
+G_END_DECLS
+
+#endif /* !GDATA_GCONTACT_RELATION_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-gcontact-website
+ * @short_description: gContact website element
+ * @stability: Stable
+ * @include: gdata/gcontact/gdata-gcontact-website.h
+ *
+ * #GDataGContactWebsite represents a "website" element from the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcWebsite">gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+
+#include "gdata-gcontact-website.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-comparable.h"
+
+static void gdata_gcontact_website_comparable_init (GDataComparableIface *iface);
+static void gdata_gcontact_website_finalize (GObject *object);
+static void gdata_gcontact_website_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_gcontact_website_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static void pre_get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataGContactWebsitePrivate {
+ gchar *uri;
+ gchar *relation_type;
+ gchar *label;
+ gboolean is_primary;
+};
+
+enum {
+ PROP_URI = 1,
+ PROP_RELATION_TYPE,
+ PROP_LABEL,
+ PROP_IS_PRIMARY
+};
+
+G_DEFINE_TYPE_WITH_CODE (GDataGContactWebsite, gdata_gcontact_website, GDATA_TYPE_PARSABLE,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_gcontact_website_comparable_init))
+
+static void
+gdata_gcontact_website_class_init (GDataGContactWebsiteClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataGContactWebsitePrivate));
+
+ gobject_class->get_property = gdata_gcontact_website_get_property;
+ gobject_class->set_property = gdata_gcontact_website_set_property;
+ gobject_class->finalize = gdata_gcontact_website_finalize;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ parsable_class->pre_get_xml = pre_get_xml;
+ parsable_class->get_namespaces = get_namespaces;
+ parsable_class->element_name = "website";
+ parsable_class->element_namespace = "gContact";
+
+ /**
+ * GDataGContactWebsite:uri:
+ *
+ * The URI of the website.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcWebsite">gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_URI,
+ g_param_spec_string ("uri",
+ "URI", "The URI of the website.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGContactWebsite:relation-type:
+ *
+ * A programmatic value that identifies the type of website. Examples are %GDATA_GCONTACT_WEBSITE_HOME_PAGE or %GDATA_GCONTACT_WEBSITE_FTP.
+ * It is mutually exclusive with #GDataGContactWebsite:label.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcWebsite">gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_RELATION_TYPE,
+ g_param_spec_string ("relation-type",
+ "Relation type", "A programmatic value that identifies the type of website.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGContactWebsite:label:
+ *
+ * A simple string value used to name this website. It allows UIs to display a label such as "Work", "Travel blog", "Personal blog", etc.
+ * It is mutually exclusive with #GDataGContactWebsite:relation-type.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcWebsite">gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LABEL,
+ g_param_spec_string ("label",
+ "Label", "A simple string value used to name this website.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGContactWebsite:is-primary:
+ *
+ * Indicates which website out of a group is primary.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcWebsite">gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_IS_PRIMARY,
+ g_param_spec_boolean ("is-primary",
+ "Primary?", "Indicates which website out of a group is primary.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static gint
+compare_with (GDataComparable *self, GDataComparable *other)
+{
+ GDataGContactWebsitePrivate *a = ((GDataGContactWebsite*) self)->priv, *b = ((GDataGContactWebsite*) other)->priv;
+
+ if (g_strcmp0 (a->uri, b->uri) == 0 && g_strcmp0 (a->relation_type, b->relation_type) == 0 && g_strcmp0 (a->label, b->label) == 0)
+ return 0;
+ return 1;
+}
+
+static void
+gdata_gcontact_website_comparable_init (GDataComparableIface *iface)
+{
+ iface->compare_with = compare_with;
+}
+
+static void
+gdata_gcontact_website_init (GDataGContactWebsite *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GCONTACT_WEBSITE, GDataGContactWebsitePrivate);
+}
+
+static void
+gdata_gcontact_website_finalize (GObject *object)
+{
+ GDataGContactWebsitePrivate *priv = GDATA_GCONTACT_WEBSITE (object)->priv;
+
+ g_free (priv->uri);
+ g_free (priv->relation_type);
+ g_free (priv->label);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_gcontact_website_parent_class)->finalize (object);
+}
+
+static void
+gdata_gcontact_website_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataGContactWebsitePrivate *priv = GDATA_GCONTACT_WEBSITE (object)->priv;
+
+ switch (property_id) {
+ case PROP_URI:
+ g_value_set_string (value, priv->uri);
+ break;
+ case PROP_RELATION_TYPE:
+ g_value_set_string (value, priv->relation_type);
+ break;
+ case PROP_LABEL:
+ g_value_set_string (value, priv->label);
+ break;
+ case PROP_IS_PRIMARY:
+ g_value_set_boolean (value, priv->is_primary);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_gcontact_website_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataGContactWebsite *self = GDATA_GCONTACT_WEBSITE (object);
+
+ switch (property_id) {
+ case PROP_URI:
+ gdata_gcontact_website_set_uri (self, g_value_get_string (value));
+ break;
+ case PROP_RELATION_TYPE:
+ gdata_gcontact_website_set_relation_type (self, g_value_get_string (value));
+ break;
+ case PROP_LABEL:
+ gdata_gcontact_website_set_label (self, g_value_get_string (value));
+ break;
+ case PROP_IS_PRIMARY:
+ gdata_gcontact_website_set_is_primary (self, g_value_get_boolean (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ xmlChar *uri, *rel, *label;
+ gboolean primary_bool;
+ GDataGContactWebsitePrivate *priv = GDATA_GCONTACT_WEBSITE (parsable)->priv;
+
+ /* Is it the primary website? */
+ if (gdata_parser_boolean_from_property (root_node, "primary", &primary_bool, 0, error) == FALSE)
+ return FALSE;
+
+ uri = xmlGetProp (root_node, (xmlChar*) "href");
+ if (uri == NULL || *uri == '\0') {
+ xmlFree (uri);
+ return gdata_parser_error_required_property_missing (root_node, "href", error);
+ }
+
+ /* NOTE: We allow both rel and label to be present when we should probably be asserting that they're mutually exclusive. See the comment in
+ * pre_get_xml() for details. */
+ rel = xmlGetProp (root_node, (xmlChar*) "rel");
+ label = xmlGetProp (root_node, (xmlChar*) "label");
+ if ((rel == NULL || *rel == '\0') && (label == NULL || *label == '\0')) {
+ xmlFree (rel);
+ xmlFree (label);
+ xmlFree (uri);
+ return gdata_parser_error_required_property_missing (root_node, "rel", error);
+ }
+
+ priv->relation_type = (gchar*) rel;
+ priv->label = (gchar*) label;
+ priv->uri = (gchar*) uri;
+ priv->is_primary = primary_bool;
+
+ return TRUE;
+}
+
+static void
+pre_get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataGContactWebsitePrivate *priv = GDATA_GCONTACT_WEBSITE (parsable)->priv;
+
+ gdata_parser_string_append_escaped (xml_string, " href='", priv->uri, "'");
+
+ /* NOTE: We previously allowed both rel and label to be set, making rel mandatory. Since bgo#659016, we treat rel and label as mutually
+ * exclusive attributes when parsing. We should treat them as mutually exclusive here as well, and g_assert_not_reached() if neither or
+ * both are set (as in gdata-gcontact-event.c:pre_get_xml()), but in order to maintain backwards compatibility, we don't.
+ * Sigh, Google. */
+ if (priv->relation_type != NULL) {
+ gdata_parser_string_append_escaped (xml_string, " rel='", priv->relation_type, "'");
+ }
+
+ if (priv->label != NULL) {
+ gdata_parser_string_append_escaped (xml_string, " label='", priv->label, "'");
+ }
+
+ if (priv->is_primary == TRUE)
+ g_string_append (xml_string, " primary='true'");
+ else
+ g_string_append (xml_string, " primary='false'");
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ g_hash_table_insert (namespaces, (gchar*) "gContact", (gchar*) "http://schemas.google.com/contact/2008");
+}
+
+/**
+ * gdata_gcontact_website_new:
+ * @uri: the website URI
+ * @relation_type: the relationship between the website and its owner, or %NULL
+ * @label: (allow-none): a human-readable label for the website, or %NULL
+ * @is_primary: %TRUE if this website is its owner's primary website, %FALSE otherwise
+ *
+ * Creates a new #GDataGContactWebsite. More information is available in the <ulink type="http"
+ * url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcWebsite">gContact specification</ulink>.
+ *
+ * Exactly one of @relation_type and @label should be provided; the other must be %NULL.
+ *
+ * Return value: a new #GDataGContactWebsite; unref with g_object_unref()
+ *
+ * Since: 0.7.0
+ */
+GDataGContactWebsite *
+gdata_gcontact_website_new (const gchar *uri, const gchar *relation_type, const gchar *label, gboolean is_primary)
+{
+ g_return_val_if_fail (uri != NULL && *uri != '\0', NULL);
+ g_return_val_if_fail ((relation_type != NULL && *relation_type != '\0'/* && label == NULL*/) ||
+ (relation_type == NULL && label != NULL && *label != '\0'), NULL);
+ /* NOTE: As in pre_get_xml(), we should treat rel and label as mutually exclusive here, but we can't for backwards compatibility reasons. */
+
+ return g_object_new (GDATA_TYPE_GCONTACT_WEBSITE, "uri", uri, "relation-type", relation_type, "label", label, "is-primary", is_primary, NULL);
+}
+
+/**
+ * gdata_gcontact_website_get_uri:
+ * @self: a #GDataGContactWebsite
+ *
+ * Gets the #GDataGContactWebsite:uri property.
+ *
+ * Return value: the URI of the website
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_gcontact_website_get_uri (GDataGContactWebsite *self)
+{
+ g_return_val_if_fail (GDATA_IS_GCONTACT_WEBSITE (self), NULL);
+ return self->priv->uri;
+}
+
+/**
+ * gdata_gcontact_website_set_uri:
+ * @self: a #GDataGContactWebsite
+ * @uri: the new website URI
+ *
+ * Sets the #GDataGContactWebsite:uri property to @uri.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_gcontact_website_set_uri (GDataGContactWebsite *self, const gchar *uri)
+{
+ g_return_if_fail (GDATA_IS_GCONTACT_WEBSITE (self));
+ g_return_if_fail (uri != NULL && *uri != '\0');
+
+ g_free (self->priv->uri);
+ self->priv->uri = g_strdup (uri);
+ g_object_notify (G_OBJECT (self), "uri");
+}
+
+/**
+ * gdata_gcontact_website_get_relation_type:
+ * @self: a #GDataGContactWebsite
+ *
+ * Gets the #GDataGContactWebsite:relation-type property.
+ *
+ * Return value: the website's relation type
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_gcontact_website_get_relation_type (GDataGContactWebsite *self)
+{
+ g_return_val_if_fail (GDATA_IS_GCONTACT_WEBSITE (self), NULL);
+ return self->priv->relation_type;
+}
+
+/**
+ * gdata_gcontact_website_set_relation_type:
+ * @self: a #GDataGContactWebsite
+ * @relation_type: the new relation type for the website
+ *
+ * Sets the #GDataGContactWebsite:relation-type property to @relation_type
+ * such as %GDATA_GCONTACT_WEBSITE_HOME_PAGE or %GDATA_GCONTACT_WEBSITE_FTP.
+ *
+ * If @relation_type is %NULL, the relation type will be unset. When the #GDataGContactWebsite is used in a query, however,
+ * exactly one of #GDataGContactWebsite:relation-type and #GDataGContactWebsite:label must be %NULL.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_gcontact_website_set_relation_type (GDataGContactWebsite *self, const gchar *relation_type)
+{
+ g_return_if_fail (GDATA_IS_GCONTACT_WEBSITE (self));
+ g_return_if_fail (relation_type == NULL || *relation_type != '\0');
+
+ g_free (self->priv->relation_type);
+ self->priv->relation_type = g_strdup (relation_type);
+ g_object_notify (G_OBJECT (self), "relation-type");
+}
+
+/**
+ * gdata_gcontact_website_get_label:
+ * @self: a #GDataGContactWebsite
+ *
+ * Gets the #GDataGContactWebsite:label property.
+ *
+ * Return value: the website's label, or %NULL
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_gcontact_website_get_label (GDataGContactWebsite *self)
+{
+ g_return_val_if_fail (GDATA_IS_GCONTACT_WEBSITE (self), NULL);
+ return self->priv->label;
+}
+
+/**
+ * gdata_gcontact_website_set_label:
+ * @self: a #GDataGContactWebsite
+ * @label: (allow-none): the new label for the website, or %NULL
+ *
+ * Sets the #GDataGContactWebsite:label property to @label.
+ *
+ * If @label is %NULL, the label will be unset. When the #GDataGContactWebsite is used in a query, however,
+ * exactly one of #GDataGContactWebsite:relation-type and #GDataGContactWebsite:label must be %NULL.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_gcontact_website_set_label (GDataGContactWebsite *self, const gchar *label)
+{
+ g_return_if_fail (GDATA_IS_GCONTACT_WEBSITE (self));
+ /* NOTE: We should be validating using the code below, but we can't. See pre_get_xml() for details. */
+ g_return_if_fail (label == NULL || *label != '\0');
+
+ g_free (self->priv->label);
+ self->priv->label = g_strdup (label);
+ g_object_notify (G_OBJECT (self), "label");
+}
+
+/**
+ * gdata_gcontact_website_is_primary:
+ * @self: a #GDataGContactWebsite
+ *
+ * Gets the #GDataGContactWebsite:is-primary property.
+ *
+ * Return value: %TRUE if this is the primary website, %FALSE otherwise
+ *
+ * Since: 0.7.0
+ */
+gboolean
+gdata_gcontact_website_is_primary (GDataGContactWebsite *self)
+{
+ g_return_val_if_fail (GDATA_IS_GCONTACT_WEBSITE (self), FALSE);
+ return self->priv->is_primary;
+}
+
+/**
+ * gdata_gcontact_website_set_is_primary:
+ * @self: a #GDataGContactWebsite
+ * @is_primary: %TRUE if this is the primary website, %FALSE otherwise
+ *
+ * Sets the #GDataGContactWebsite:is-primary property to @is_primary.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_gcontact_website_set_is_primary (GDataGContactWebsite *self, gboolean is_primary)
+{
+ g_return_if_fail (GDATA_IS_GCONTACT_WEBSITE (self));
+
+ self->priv->is_primary = is_primary;
+ g_object_notify (G_OBJECT (self), "is-primary");
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_GCONTACT_WEBSITE_H
+#define GDATA_GCONTACT_WEBSITE_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_GCONTACT_WEBSITE_HOME_PAGE:
+ *
+ * The relation type URI for a contact's home page.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcWebsite">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_WEBSITE_HOME_PAGE "home-page"
+
+/**
+ * GDATA_GCONTACT_WEBSITE_BLOG:
+ *
+ * The relation type URI for a contact's blog.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcWebsite">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_WEBSITE_BLOG "blog"
+
+/**
+ * GDATA_GCONTACT_WEBSITE_PROFILE:
+ *
+ * The relation type URI for a contact's online profile.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcWebsite">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_WEBSITE_PROFILE "profile"
+
+/**
+ * GDATA_GCONTACT_WEBSITE_HOME:
+ *
+ * The relation type URI for a contact's home website.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcWebsite">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_WEBSITE_HOME "home"
+
+/**
+ * GDATA_GCONTACT_WEBSITE_WORK:
+ *
+ * The relation type URI for a contact's work website.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcWebsite">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_WEBSITE_WORK "work"
+
+/**
+ * GDATA_GCONTACT_WEBSITE_OTHER:
+ *
+ * The relation type URI for a miscellaneous website of the contact.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcWebsite">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_WEBSITE_OTHER "other"
+
+/**
+ * GDATA_GCONTACT_WEBSITE_FTP:
+ *
+ * The relation type URI for a contact's FTP site.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/reference.html#gcWebsite">
+ * gContact specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GCONTACT_WEBSITE_FTP "ftp"
+
+#define GDATA_TYPE_GCONTACT_WEBSITE (gdata_gcontact_website_get_type ())
+#define GDATA_GCONTACT_WEBSITE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_GCONTACT_WEBSITE, GDataGContactWebsite))
+#define GDATA_GCONTACT_WEBSITE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_GCONTACT_WEBSITE, GDataGContactWebsiteClass))
+#define GDATA_IS_GCONTACT_WEBSITE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_GCONTACT_WEBSITE))
+#define GDATA_IS_GCONTACT_WEBSITE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_GCONTACT_WEBSITE))
+#define GDATA_GCONTACT_WEBSITE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_GCONTACT_WEBSITE, GDataGContactWebsiteClass))
+
+typedef struct _GDataGContactWebsitePrivate GDataGContactWebsitePrivate;
+
+/**
+ * GDataGContactWebsite:
+ *
+ * All the fields in the #GDataGContactWebsite structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataGContactWebsitePrivate *priv;
+} GDataGContactWebsite;
+
+/**
+ * GDataGContactWebsiteClass:
+ *
+ * All the fields in the #GDataGContactWebsiteClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataGContactWebsiteClass;
+
+GType gdata_gcontact_website_get_type (void) G_GNUC_CONST;
+
+GDataGContactWebsite *gdata_gcontact_website_new (const gchar *uri, const gchar *relation_type,
+ const gchar *label, gboolean is_primary) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_gcontact_website_get_uri (GDataGContactWebsite *self) G_GNUC_PURE;
+void gdata_gcontact_website_set_uri (GDataGContactWebsite *self, const gchar *uri);
+
+const gchar *gdata_gcontact_website_get_relation_type (GDataGContactWebsite *self) G_GNUC_PURE;
+void gdata_gcontact_website_set_relation_type (GDataGContactWebsite *self, const gchar *relation_type);
+
+const gchar *gdata_gcontact_website_get_label (GDataGContactWebsite *self) G_GNUC_PURE;
+void gdata_gcontact_website_set_label (GDataGContactWebsite *self, const gchar *label);
+
+gboolean gdata_gcontact_website_is_primary (GDataGContactWebsite *self) G_GNUC_PURE;
+void gdata_gcontact_website_set_is_primary (GDataGContactWebsite *self, gboolean is_primary);
+
+G_END_DECLS
+
+#endif /* !GDATA_GCONTACT_WEBSITE_H */
--- /dev/null
+headers = files(
+ 'gdata-gcontact-calendar.h',
+ 'gdata-gcontact-event.h',
+ 'gdata-gcontact-external-id.h',
+ 'gdata-gcontact-jot.h',
+ 'gdata-gcontact-language.h',
+ 'gdata-gcontact-relation.h',
+ 'gdata-gcontact-website.h',
+)
+
+install_headers(
+ headers,
+ subdir: gdata_include_subdir / 'gcontact',
+)
+
+gir_headers += headers
+
+sources += files(
+ 'gdata-gcontact-calendar.c',
+ 'gdata-gcontact-event.c',
+ 'gdata-gcontact-external-id.c',
+ 'gdata-gcontact-jot.c',
+ 'gdata-gcontact-language.c',
+ 'gdata-gcontact-relation.c',
+ 'gdata-gcontact-website.c',
+)
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-gd-email-address
+ * @short_description: GData e-mail address element
+ * @stability: Stable
+ * @include: gdata/gd/gdata-gd-email-address.h
+ *
+ * #GDataGDEmailAddress represents an "email" element from the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdEmail">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+
+#include "gdata-gd-email-address.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-comparable.h"
+
+static void gdata_gd_email_address_comparable_init (GDataComparableIface *iface);
+static void gdata_gd_email_address_finalize (GObject *object);
+static void gdata_gd_email_address_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_gd_email_address_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static void pre_get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataGDEmailAddressPrivate {
+ gchar *address;
+ gchar *relation_type;
+ gchar *label;
+ gboolean is_primary;
+ gchar *display_name;
+};
+
+enum {
+ PROP_ADDRESS = 1,
+ PROP_RELATION_TYPE,
+ PROP_LABEL,
+ PROP_IS_PRIMARY,
+ PROP_DISPLAY_NAME
+};
+
+G_DEFINE_TYPE_WITH_CODE (GDataGDEmailAddress, gdata_gd_email_address, GDATA_TYPE_PARSABLE,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_gd_email_address_comparable_init))
+
+static void
+gdata_gd_email_address_class_init (GDataGDEmailAddressClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataGDEmailAddressPrivate));
+
+ gobject_class->get_property = gdata_gd_email_address_get_property;
+ gobject_class->set_property = gdata_gd_email_address_set_property;
+ gobject_class->finalize = gdata_gd_email_address_finalize;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ parsable_class->pre_get_xml = pre_get_xml;
+ parsable_class->get_namespaces = get_namespaces;
+ parsable_class->element_name = "email";
+ parsable_class->element_namespace = "gd";
+
+ /**
+ * GDataGDEmailAddress:address:
+ *
+ * The e-mail address itself.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdEmail">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_ADDRESS,
+ g_param_spec_string ("address",
+ "Address", "The e-mail address itself.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDEmailAddress:relation-type:
+ *
+ * A programmatic value that identifies the type of e-mail address. For example: %GDATA_GD_EMAIL_ADDRESS_HOME or %GDATA_GD_EMAIL_ADDRESS_WORK.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdEmail">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_RELATION_TYPE,
+ g_param_spec_string ("relation-type",
+ "Relation type", "A programmatic value that identifies the type of e-mail address.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDEmailAddress:label:
+ *
+ * A simple string value used to name this e-mail address. It allows UIs to display a label such as "Work", "Personal", "Preferred", etc.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdEmail">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LABEL,
+ g_param_spec_string ("label",
+ "Label", "A simple string value used to name this e-mail address.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDEmailAddress:is-primary:
+ *
+ * Indicates which e-mail address out of a group is primary.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdEmail">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_IS_PRIMARY,
+ g_param_spec_boolean ("is-primary",
+ "Primary?", "Indicates which e-mail address out of a group is primary.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDEmailAddress:display-name:
+ *
+ * A display name of the entity (e.g. a person) the e-mail address belongs to.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdEmail">GData specification</ulink>.
+ *
+ * Since: 0.6.0
+ */
+ g_object_class_install_property (gobject_class, PROP_DISPLAY_NAME,
+ g_param_spec_string ("display-name",
+ "Display name", "A display name of the entity the e-mail address belongs to.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static gint
+compare_with (GDataComparable *self, GDataComparable *other)
+{
+ return g_strcmp0 (((GDataGDEmailAddress*) self)->priv->address, ((GDataGDEmailAddress*) other)->priv->address);
+}
+
+static void
+gdata_gd_email_address_comparable_init (GDataComparableIface *iface)
+{
+ iface->compare_with = compare_with;
+}
+
+static void
+gdata_gd_email_address_init (GDataGDEmailAddress *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GD_EMAIL_ADDRESS, GDataGDEmailAddressPrivate);
+}
+
+static void
+gdata_gd_email_address_finalize (GObject *object)
+{
+ GDataGDEmailAddressPrivate *priv = GDATA_GD_EMAIL_ADDRESS (object)->priv;
+
+ g_free (priv->address);
+ g_free (priv->relation_type);
+ g_free (priv->label);
+ g_free (priv->display_name);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_gd_email_address_parent_class)->finalize (object);
+}
+
+static void
+gdata_gd_email_address_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataGDEmailAddressPrivate *priv = GDATA_GD_EMAIL_ADDRESS (object)->priv;
+
+ switch (property_id) {
+ case PROP_ADDRESS:
+ g_value_set_string (value, priv->address);
+ break;
+ case PROP_RELATION_TYPE:
+ g_value_set_string (value, priv->relation_type);
+ break;
+ case PROP_LABEL:
+ g_value_set_string (value, priv->label);
+ break;
+ case PROP_IS_PRIMARY:
+ g_value_set_boolean (value, priv->is_primary);
+ break;
+ case PROP_DISPLAY_NAME:
+ g_value_set_string (value, priv->display_name);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_gd_email_address_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataGDEmailAddress *self = GDATA_GD_EMAIL_ADDRESS (object);
+
+ switch (property_id) {
+ case PROP_ADDRESS:
+ gdata_gd_email_address_set_address (self, g_value_get_string (value));
+ break;
+ case PROP_RELATION_TYPE:
+ gdata_gd_email_address_set_relation_type (self, g_value_get_string (value));
+ break;
+ case PROP_LABEL:
+ gdata_gd_email_address_set_label (self, g_value_get_string (value));
+ break;
+ case PROP_IS_PRIMARY:
+ gdata_gd_email_address_set_is_primary (self, g_value_get_boolean (value));
+ break;
+ case PROP_DISPLAY_NAME:
+ gdata_gd_email_address_set_display_name (self, g_value_get_string (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ xmlChar *address, *rel;
+ gboolean primary_bool;
+ GDataGDEmailAddressPrivate *priv = GDATA_GD_EMAIL_ADDRESS (parsable)->priv;
+
+ /* Is it the primary e-mail address? */
+ if (gdata_parser_boolean_from_property (root_node, "primary", &primary_bool, 0, error) == FALSE)
+ return FALSE;
+
+ address = xmlGetProp (root_node, (xmlChar*) "address");
+ if (address == NULL || *address == '\0') {
+ xmlFree (address);
+ return gdata_parser_error_required_property_missing (root_node, "address", error);
+ }
+
+ rel = xmlGetProp (root_node, (xmlChar*) "rel");
+ if (rel != NULL && *rel == '\0') {
+ xmlFree (address);
+ xmlFree (rel);
+ return gdata_parser_error_required_property_missing (root_node, "rel", error);
+ }
+
+ priv->address = (gchar*) address;
+ priv->relation_type = (gchar*) rel;
+ priv->label = (gchar*) xmlGetProp (root_node, (xmlChar*) "label");
+ priv->is_primary = primary_bool;
+ priv->display_name = (gchar*) xmlGetProp (root_node, (xmlChar*) "displayName");
+
+ return TRUE;
+}
+
+static void
+pre_get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataGDEmailAddressPrivate *priv = GDATA_GD_EMAIL_ADDRESS (parsable)->priv;
+
+ gdata_parser_string_append_escaped (xml_string, " address='", priv->address, "'");
+ if (priv->relation_type != NULL)
+ gdata_parser_string_append_escaped (xml_string, " rel='", priv->relation_type, "'");
+ if (priv->label != NULL)
+ gdata_parser_string_append_escaped (xml_string, " label='", priv->label, "'");
+ if (priv->display_name != NULL)
+ gdata_parser_string_append_escaped (xml_string, " displayName='", priv->display_name, "'");
+
+ if (priv->is_primary == TRUE)
+ g_string_append (xml_string, " primary='true'");
+ else
+ g_string_append (xml_string, " primary='false'");
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ g_hash_table_insert (namespaces, (gchar*) "gd", (gchar*) "http://schemas.google.com/g/2005");
+}
+
+/**
+ * gdata_gd_email_address_new:
+ * @address: the e-mail address
+ * @relation_type: (allow-none): the relationship between the e-mail address and its owner, or %NULL
+ * @label: (allow-none): a human-readable label for the e-mail address, or %NULL
+ * @is_primary: %TRUE if this e-mail address is its owner's primary address, %FALSE otherwise
+ *
+ * Creates a new #GDataGDEmailAddress. More information is available in the <ulink type="http"
+ * url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdEmail">GData specification</ulink>.
+ *
+ * Return value: a new #GDataGDEmailAddress, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.2.0
+ */
+GDataGDEmailAddress *
+gdata_gd_email_address_new (const gchar *address, const gchar *relation_type, const gchar *label, gboolean is_primary)
+{
+ g_return_val_if_fail (address != NULL && *address != '\0', NULL);
+ g_return_val_if_fail (relation_type == NULL || *relation_type != '\0', NULL);
+ return g_object_new (GDATA_TYPE_GD_EMAIL_ADDRESS, "address", address, "relation-type", relation_type,
+ "label", label, "is-primary", is_primary, NULL);
+}
+
+/**
+ * gdata_gd_email_address_get_address:
+ * @self: a #GDataGDEmailAddress
+ *
+ * Gets the #GDataGDEmailAddress:address property.
+ *
+ * Return value: the e-mail address itself, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_gd_email_address_get_address (GDataGDEmailAddress *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_EMAIL_ADDRESS (self), NULL);
+ return self->priv->address;
+}
+
+/**
+ * gdata_gd_email_address_set_address:
+ * @self: a #GDataGDEmailAddress
+ * @address: the new e-mail address
+ *
+ * Sets the #GDataGDEmailAddress:address property to @address.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_email_address_set_address (GDataGDEmailAddress *self, const gchar *address)
+{
+ g_return_if_fail (GDATA_IS_GD_EMAIL_ADDRESS (self));
+ g_return_if_fail (address != NULL && *address != '\0');
+
+ g_free (self->priv->address);
+ self->priv->address = g_strdup (address);
+ g_object_notify (G_OBJECT (self), "address");
+}
+
+/**
+ * gdata_gd_email_address_get_relation_type:
+ * @self: a #GDataGDEmailAddress
+ *
+ * Gets the #GDataGDEmailAddress:relation-type property.
+ *
+ * Return value: the e-mail address' relation type, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_gd_email_address_get_relation_type (GDataGDEmailAddress *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_EMAIL_ADDRESS (self), NULL);
+ return self->priv->relation_type;
+}
+
+/**
+ * gdata_gd_email_address_set_relation_type:
+ * @self: a #GDataGDEmailAddress
+ * @relation_type: (allow-none): the new relation type for the email_address, or %NULL
+ *
+ * Sets the #GDataGDEmailAddress:relation-type property to @relation_type.
+ *
+ * Set @relation_type to %NULL to unset the property in the e-mail address.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_email_address_set_relation_type (GDataGDEmailAddress *self, const gchar *relation_type)
+{
+ g_return_if_fail (GDATA_IS_GD_EMAIL_ADDRESS (self));
+ g_return_if_fail (relation_type == NULL || *relation_type != '\0');
+
+ g_free (self->priv->relation_type);
+ self->priv->relation_type = g_strdup (relation_type);
+ g_object_notify (G_OBJECT (self), "relation-type");
+}
+
+/**
+ * gdata_gd_email_address_get_label:
+ * @self: a #GDataGDEmailAddress
+ *
+ * Gets the #GDataGDEmailAddress:label property.
+ *
+ * Return value: the e-mail address' label, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_gd_email_address_get_label (GDataGDEmailAddress *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_EMAIL_ADDRESS (self), NULL);
+ return self->priv->label;
+}
+
+/**
+ * gdata_gd_email_address_set_label:
+ * @self: a #GDataGDEmailAddress
+ * @label: (allow-none): the new label for the e-mail address, or %NULL
+ *
+ * Sets the #GDataGDEmailAddress:label property to @label.
+ *
+ * Set @label to %NULL to unset the property in the e-mail address.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_email_address_set_label (GDataGDEmailAddress *self, const gchar *label)
+{
+ g_return_if_fail (GDATA_IS_GD_EMAIL_ADDRESS (self));
+
+ g_free (self->priv->label);
+ self->priv->label = g_strdup (label);
+ g_object_notify (G_OBJECT (self), "label");
+}
+
+/**
+ * gdata_gd_email_address_is_primary:
+ * @self: a #GDataGDEmailAddress
+ *
+ * Gets the #GDataGDEmailAddress:is-primary property.
+ *
+ * Return value: %TRUE if this is the primary e-mail address, %FALSE otherwise
+ *
+ * Since: 0.4.0
+ */
+gboolean
+gdata_gd_email_address_is_primary (GDataGDEmailAddress *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_EMAIL_ADDRESS (self), FALSE);
+ return self->priv->is_primary;
+}
+
+/**
+ * gdata_gd_email_address_set_is_primary:
+ * @self: a #GDataGDEmailAddress
+ * @is_primary: %TRUE if this is the primary e-mail address, %FALSE otherwise
+ *
+ * Sets the #GDataGDEmailAddress:is-primary property to @is_primary.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_email_address_set_is_primary (GDataGDEmailAddress *self, gboolean is_primary)
+{
+ g_return_if_fail (GDATA_IS_GD_EMAIL_ADDRESS (self));
+
+ self->priv->is_primary = is_primary;
+ g_object_notify (G_OBJECT (self), "is-primary");
+}
+
+/**
+ * gdata_gd_email_address_get_display_name:
+ * @self: a #GDataGDEmailAddress
+ *
+ * Gets the #GDataGDEmailAddress:display-name property.
+ *
+ * Return value: a display name for the e-mail address, or %NULL
+ *
+ * Since: 0.6.0
+ */
+const gchar *
+gdata_gd_email_address_get_display_name (GDataGDEmailAddress *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_EMAIL_ADDRESS (self), NULL);
+ return self->priv->display_name;
+}
+
+/**
+ * gdata_gd_email_address_set_display_name:
+ * @self: a #GDataGDEmailAddress
+ * @display_name: (allow-none): the new display name, or %NULL
+ *
+ * Sets the #GDataGDEmailAddress:display-name property to @display_name.
+ *
+ * Set @display_name to %NULL to unset the property in the e-mail address.
+ *
+ * Since: 0.6.0
+ */
+void
+gdata_gd_email_address_set_display_name (GDataGDEmailAddress *self, const gchar *display_name)
+{
+ g_return_if_fail (GDATA_IS_GD_EMAIL_ADDRESS (self));
+
+ g_free (self->priv->display_name);
+ self->priv->display_name = g_strdup (display_name);
+ g_object_notify (G_OBJECT (self), "display-name");
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_GD_EMAIL_ADDRESS_H
+#define GDATA_GD_EMAIL_ADDRESS_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_GD_EMAIL_ADDRESS_HOME:
+ *
+ * The relation type URI for a home e-mail address.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_EMAIL_ADDRESS_HOME "http://schemas.google.com/g/2005#home"
+
+/**
+ * GDATA_GD_EMAIL_ADDRESS_OTHER:
+ *
+ * The relation type URI for a miscellaneous e-mail address.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_EMAIL_ADDRESS_OTHER "http://schemas.google.com/g/2005#other"
+
+/**
+ * GDATA_GD_EMAIL_ADDRESS_WORK:
+ *
+ * The relation type URI for a work e-mail address.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_EMAIL_ADDRESS_WORK "http://schemas.google.com/g/2005#work"
+
+#define GDATA_TYPE_GD_EMAIL_ADDRESS (gdata_gd_email_address_get_type ())
+#define GDATA_GD_EMAIL_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_GD_EMAIL_ADDRESS, GDataGDEmailAddress))
+#define GDATA_GD_EMAIL_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_GD_EMAIL_ADDRESS, GDataGDEmailAddressClass))
+#define GDATA_IS_GD_EMAIL_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_GD_EMAIL_ADDRESS))
+#define GDATA_IS_GD_EMAIL_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_GD_EMAIL_ADDRESS))
+#define GDATA_GD_EMAIL_ADDRESS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_GD_EMAIL_ADDRESS, GDataGDEmailAddressClass))
+
+typedef struct _GDataGDEmailAddressPrivate GDataGDEmailAddressPrivate;
+
+/**
+ * GDataGDEmailAddress:
+ *
+ * All the fields in the #GDataGDEmailAddress structure are private and should never be accessed directly.
+ *
+ * Since: 0.2.0
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataGDEmailAddressPrivate *priv;
+} GDataGDEmailAddress;
+
+/**
+ * GDataGDEmailAddressClass:
+ *
+ * All the fields in the #GDataGDEmailAddressClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataGDEmailAddressClass;
+
+GType gdata_gd_email_address_get_type (void) G_GNUC_CONST;
+
+GDataGDEmailAddress *gdata_gd_email_address_new (const gchar *address, const gchar *relation_type,
+ const gchar *label, gboolean is_primary) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_gd_email_address_get_address (GDataGDEmailAddress *self) G_GNUC_PURE;
+void gdata_gd_email_address_set_address (GDataGDEmailAddress *self, const gchar *address);
+
+const gchar *gdata_gd_email_address_get_relation_type (GDataGDEmailAddress *self) G_GNUC_PURE;
+void gdata_gd_email_address_set_relation_type (GDataGDEmailAddress *self, const gchar *relation_type);
+
+const gchar *gdata_gd_email_address_get_label (GDataGDEmailAddress *self) G_GNUC_PURE;
+void gdata_gd_email_address_set_label (GDataGDEmailAddress *self, const gchar *label);
+
+const gchar *gdata_gd_email_address_get_display_name (GDataGDEmailAddress *self) G_GNUC_PURE;
+void gdata_gd_email_address_set_display_name (GDataGDEmailAddress *self, const gchar *display_name);
+
+gboolean gdata_gd_email_address_is_primary (GDataGDEmailAddress *self) G_GNUC_PURE;
+void gdata_gd_email_address_set_is_primary (GDataGDEmailAddress *self, gboolean is_primary);
+
+G_END_DECLS
+
+#endif /* !GDATA_GD_EMAIL_ADDRESS_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ * Copyright (C) Richard Schwarting 2010 <aquarichy@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * SECTION:gdata-gd-feed-link
+ * @short_description: GD feed link element
+ * @stability: Stable
+ * @include: gdata/gd/gdata-gd-feed-link.h
+ *
+ * #GDataGDFeedLink represents a "feedLink" element from the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdFeedLink">GData specification</ulink>.
+ *
+ * It is private API, since implementing classes are likely to proxy the properties and functions
+ * of #GDataGDFeedLink as appropriate; most entry types which implement #GDataGDFeedLink have no use
+ * for most of its properties, and it would be unnecessary and confusing to expose #GDataGDFeedLink itself.
+ *
+ * In its current state, #GDataGDFeedLink supports the <code class="literal">href</code> attribute, but doesn't support inline
+ * <code class="literal">feed</code> elements, since they don't seem to appear in the wild.
+ *
+ * Since: 0.10.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+#include <string.h>
+
+#include "gdata-gd-feed-link.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-private.h"
+
+static void gdata_gd_feed_link_finalize (GObject *object);
+static void gdata_gd_feed_link_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_gd_feed_link_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static void pre_get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataGDFeedLinkPrivate {
+ gchar *uri;
+ gchar *relation_type;
+ gint count_hint;
+ gboolean is_read_only;
+};
+
+enum {
+ PROP_RELATION_TYPE = 1,
+ PROP_URI,
+ PROP_COUNT_HINT,
+ PROP_IS_READ_ONLY,
+};
+
+G_DEFINE_TYPE (GDataGDFeedLink, gdata_gd_feed_link, GDATA_TYPE_PARSABLE)
+
+static void
+gdata_gd_feed_link_class_init (GDataGDFeedLinkClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataGDFeedLinkPrivate));
+
+ gobject_class->set_property = gdata_gd_feed_link_set_property;
+ gobject_class->get_property = gdata_gd_feed_link_get_property;
+ gobject_class->finalize = gdata_gd_feed_link_finalize;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ parsable_class->pre_get_xml = pre_get_xml;
+ parsable_class->get_namespaces = get_namespaces;
+ parsable_class->element_name = "feedLink";
+ parsable_class->element_namespace = "gd";
+
+ /**
+ * GDataGDFeedLink:relation-type:
+ *
+ * Describes the relation type of the given feed to its parent feed.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdFeedLink">GData specification</ulink>.
+ *
+ * Since: 0.10.0
+ */
+ g_object_class_install_property (gobject_class, PROP_RELATION_TYPE,
+ g_param_spec_string ("relation-type",
+ "Relation type", "Describes the relation type of the given feed to its parent feed.",
+ GDATA_LINK_ALTERNATE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDFeedLink:uri:
+ *
+ * A URI describing the location of the designated feed.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdFeedLink">GData specification</ulink>.
+ *
+ * Since: 0.10.0
+ */
+ g_object_class_install_property (gobject_class, PROP_URI,
+ g_param_spec_string ("uri",
+ "URI", "A URI describing the location of the designated feed.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDFeedLink:count-hint:
+ *
+ * Hints at the number of entries contained in the designated feed, and may not be reliable.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdFeedLink">GData specification</ulink>.
+ *
+ * Since: 0.10.0
+ */
+ g_object_class_install_property (gobject_class, PROP_COUNT_HINT,
+ g_param_spec_int ("count-hint",
+ "Count hint", "Hints at the number of entries contained in the designated feed.",
+ -1, G_MAXINT, -1,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDFeedLink:is-read-only:
+ *
+ * Indicates whether the feed is read only.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdFeedLink">GData specification</ulink>.
+ *
+ * Since: 0.10.0
+ */
+ g_object_class_install_property (gobject_class, PROP_IS_READ_ONLY,
+ g_param_spec_boolean ("is-read-only",
+ "Read only?", "Indicates whether the feed is read only.",
+ TRUE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_gd_feed_link_init (GDataGDFeedLink *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GD_FEED_LINK, GDataGDFeedLinkPrivate);
+ self->priv->count_hint = -1;
+ self->priv->relation_type = g_strdup (GDATA_LINK_ALTERNATE);
+}
+
+static void
+gdata_gd_feed_link_finalize (GObject *object)
+{
+ GDataGDFeedLinkPrivate *priv = GDATA_GD_FEED_LINK (object)->priv;
+
+ g_free (priv->uri);
+ g_free (priv->relation_type);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_gd_feed_link_parent_class)->finalize (object);
+}
+
+static void
+gdata_gd_feed_link_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataGDFeedLinkPrivate *priv = GDATA_GD_FEED_LINK (object)->priv;
+
+ switch (property_id) {
+ case PROP_RELATION_TYPE:
+ g_value_set_string (value, priv->relation_type);
+ break;
+ case PROP_URI:
+ g_value_set_string (value, priv->uri);
+ break;
+ case PROP_COUNT_HINT:
+ g_value_set_int (value, priv->count_hint);
+ break;
+ case PROP_IS_READ_ONLY:
+ g_value_set_boolean (value, priv->is_read_only);
+ break;
+ default:
+ /* We don't have any other properties... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_gd_feed_link_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataGDFeedLink *self = GDATA_GD_FEED_LINK (object);
+
+ switch (property_id) {
+ case PROP_RELATION_TYPE:
+ gdata_gd_feed_link_set_relation_type (self, g_value_get_string (value));
+ break;
+ case PROP_URI:
+ gdata_gd_feed_link_set_uri (self, g_value_get_string (value));
+ break;
+ case PROP_COUNT_HINT:
+ gdata_gd_feed_link_set_count_hint (self, g_value_get_int (value));
+ break;
+ case PROP_IS_READ_ONLY:
+ gdata_gd_feed_link_set_is_read_only (self, g_value_get_boolean (value));
+ break;
+ default:
+ /* We don't have any other properties... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ xmlChar *rel, *href, *count_hint;
+ GDataGDFeedLink *self = GDATA_GD_FEED_LINK (parsable);
+
+ rel = xmlGetProp (root_node, (xmlChar*) "rel");
+ if (rel != NULL && *rel == '\0') {
+ xmlFree (rel);
+ return gdata_parser_error_required_property_missing (root_node, "rel", error);
+ }
+
+ gdata_gd_feed_link_set_relation_type (self, (const gchar*) rel);
+ xmlFree (rel);
+
+ href = xmlGetProp (root_node, (xmlChar*) "href");
+ if (href == NULL || *href == '\0') {
+ xmlFree (href);
+ return gdata_parser_error_required_property_missing (root_node, "href", error);
+ }
+ self->priv->uri = (gchar*) href;
+
+ count_hint = xmlGetProp (root_node, (xmlChar*) "countHint");
+ self->priv->count_hint = (count_hint != NULL) ? g_ascii_strtoll ((char*) count_hint, NULL, 10) : -1;
+ xmlFree (count_hint);
+
+ return gdata_parser_boolean_from_property (root_node, "readOnly", &(self->priv->is_read_only), 0, error);
+}
+
+static void
+pre_get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataGDFeedLinkPrivate *priv = GDATA_GD_FEED_LINK (parsable)->priv;
+
+ if (priv->relation_type != NULL) {
+ gdata_parser_string_append_escaped (xml_string, " rel='", priv->relation_type, "'");
+ }
+
+ if (priv->uri != NULL) {
+ gdata_parser_string_append_escaped (xml_string, " href='", priv->uri, "'");
+ }
+
+ if (priv->count_hint != -1) {
+ g_string_append_printf (xml_string, " countHint='%i'", priv->count_hint);
+ }
+
+ if (priv->is_read_only == TRUE) {
+ g_string_append_printf (xml_string, " readOnly='true'");
+ } else {
+ g_string_append_printf (xml_string, " readOnly='false'");
+ }
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ g_hash_table_insert (namespaces, (gchar*) "gd", (gchar*) "http://schemas.google.com/g/2005");
+}
+
+/**
+ * gdata_gd_feed_link_get_relation_type:
+ * @self: a #GDataGDFeedLink
+ *
+ * Gets the #GDataGDFeedLink:relation-type property.
+ *
+ * Return value: the feed's relation to its owner, or %NULL
+ *
+ * Since: 0.10.0
+ */
+const gchar *
+gdata_gd_feed_link_get_relation_type (GDataGDFeedLink *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_FEED_LINK (self), NULL);
+
+ return self->priv->relation_type;
+}
+
+/**
+ * gdata_gd_feed_link_get_uri:
+ * @self: a #GDataGDFeedLink
+ *
+ * Gets the #GDataGDFeedLink:uri property.
+ *
+ * Return value: the related feed's URI
+ *
+ * Since: 0.10.0
+ */
+const gchar *
+gdata_gd_feed_link_get_uri (GDataGDFeedLink *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_FEED_LINK (self), NULL);
+
+ return self->priv->uri;
+}
+
+/**
+ * gdata_gd_feed_link_get_count_hint:
+ * @self: a #GDataGDFeedLink
+ *
+ * Gets the #GDataGDFeedLink:count-hint property.
+ *
+ * Return value: the potential number of entries in the related feed, or <code class="literal">-1</code> if not set
+ *
+ * Since: 0.10.0
+ */
+gint
+gdata_gd_feed_link_get_count_hint (GDataGDFeedLink *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_FEED_LINK (self), -1);
+
+ return self->priv->count_hint;
+}
+
+/**
+ * gdata_gd_feed_link_get_read_only:
+ * @self: a #GDataGDFeedLink
+ *
+ * Gets the #GDataGDFeedLink:read-only property.
+ *
+ * Return value: %TRUE if the feed is read only, %FALSE otherwise
+ *
+ * Since: 0.10.0
+ */
+gboolean
+gdata_gd_feed_link_is_read_only (GDataGDFeedLink *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_FEED_LINK (self), FALSE);
+
+ return self->priv->is_read_only;
+}
+
+/**
+ * gdata_gd_feed_link_set_relation_type:
+ * @self: a #GDataGDFeedLink
+ * @relation_type: (allow-none): the new relation type between the feed and its owner, or %NULL
+ *
+ * Sets the relation type of the #GDataGDFeedLink's related feed to @relation_type. If @relation_type is one of the standard Atom relation types,
+ * use one of the defined relation type values, instead of a static string. e.g. %GDATA_LINK_EDIT or %GDATA_LINK_SELF.
+ *
+ * Since: 0.10.0
+ */
+void
+gdata_gd_feed_link_set_relation_type (GDataGDFeedLink *self, const gchar *relation_type)
+{
+ g_return_if_fail (GDATA_IS_GD_FEED_LINK (self));
+ g_return_if_fail (relation_type == NULL || *relation_type != '\0');
+
+ /* If the relation type is unset, use the default "alternate" relation type. If it's set, and isn't an IRI, turn it into an IRI
+ * by appending it to "http://www.iana.org/assignments/relation/". If it's set and is an IRI, just use the IRI.
+ * See: http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rel_attribute
+ */
+ g_free (self->priv->relation_type);
+ if (relation_type == NULL) {
+ self->priv->relation_type = g_strdup (GDATA_LINK_ALTERNATE);
+ } else if (strchr ((char*) relation_type, ':') == NULL) {
+ self->priv->relation_type = g_strconcat ("http://www.iana.org/assignments/relation/", (const gchar*) relation_type, NULL);
+ } else {
+ self->priv->relation_type = g_strdup ((gchar*) relation_type);
+ }
+
+ g_object_notify (G_OBJECT (self), "relation-type");
+}
+
+/**
+ * gdata_gd_feed_link_set_uri:
+ * @self: a #GDataGDFeedLink
+ * @uri: the new URI for the related feed
+ *
+ * Sets the URI of the #GDataGDFeedLink's related feed to @uri.
+ *
+ * Since: 0.10.0
+ */
+void
+gdata_gd_feed_link_set_uri (GDataGDFeedLink *self, const gchar *uri)
+{
+ g_return_if_fail (GDATA_IS_GD_FEED_LINK (self));
+ g_return_if_fail (uri != NULL && *uri != '\0');
+
+ g_free (self->priv->uri);
+ self->priv->uri = g_strdup (uri);
+
+ g_object_notify (G_OBJECT (self), "uri");
+}
+
+/**
+ * gdata_gd_feed_link_set_count_hint:
+ * @self: a #GDataGDFeedLink
+ * @count_hint: the new number of entries in the related feed, or <code class="literal">-1</code> if unknown
+ *
+ * Sets the number of entries in the #GDataGDFeedLink's related feed to @count_hint. This number may be an imprecise estimate.
+ *
+ * Since: 0.10.0
+ */
+void
+gdata_gd_feed_link_set_count_hint (GDataGDFeedLink *self, gint count_hint)
+{
+ g_return_if_fail (GDATA_IS_GD_FEED_LINK (self));
+ g_return_if_fail (count_hint >= -1);
+
+ self->priv->count_hint = count_hint;
+
+ g_object_notify (G_OBJECT (self), "count-hint");
+}
+
+/**
+ * gdata_gd_feed_link_set_is_read_only:
+ * @self: a #GDataGDFeedLink
+ * @is_read_only: %TRUE if the #GDataGDFeedLink's related feed is read only, %FALSE otherwise
+ *
+ * Sets the read only status of the #GDataGDFeedLink's related feed to @is_read_only.
+ *
+ * Since: 0.10.0
+ */
+void
+gdata_gd_feed_link_set_is_read_only (GDataGDFeedLink *self, gboolean is_read_only)
+{
+ g_return_if_fail (GDATA_IS_GD_FEED_LINK (self));
+
+ self->priv->is_read_only = is_read_only;
+
+ g_object_notify (G_OBJECT (self), "is-read-only");
+}
+
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Richard Schwarting 2010 <aquarichy@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_GD_FEED_LINK_H
+#define GDATA_GD_FEED_LINK_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_GD_FEED_LINK (gdata_gd_feed_link_get_type ())
+#define GDATA_GD_FEED_LINK(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_GD_FEED_LINK, GDataGDFeedLink))
+#define GDATA_GD_FEED_LINK_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_GD_FEED_LINK, GDataGDFeedLinkClass))
+#define GDATA_IS_GD_FEED_LINK(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_GD_FEED_LINK))
+#define GDATA_IS_GD_FEED_LINK_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_GD_FEED_LINK))
+#define GDATA_GD_FEED_LINK_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_GD_FEED_LINK, GDataGDFeedLinkClass))
+
+typedef struct _GDataGDFeedLinkPrivate GDataGDFeedLinkPrivate;
+
+/**
+ * GDataGDFeedLink:
+ *
+ * All the fields in the #GDataGDFeedLink structure are private and should never be accessed directly.
+ *
+ * Since: 0.10.0
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataGDFeedLinkPrivate *priv;
+} GDataGDFeedLink;
+
+/**
+ * GDataGDFeedLinkClass:
+ *
+ * All the fields in the #GDataGDFeedLinkClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.10.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataGDFeedLinkClass;
+
+GType gdata_gd_feed_link_get_type (void) G_GNUC_CONST;
+
+const gchar *gdata_gd_feed_link_get_relation_type (GDataGDFeedLink *self) G_GNUC_PURE;
+void gdata_gd_feed_link_set_relation_type (GDataGDFeedLink *self, const gchar *relation_type);
+
+const gchar *gdata_gd_feed_link_get_uri (GDataGDFeedLink *self) G_GNUC_PURE;
+void gdata_gd_feed_link_set_uri (GDataGDFeedLink *self, const gchar *uri);
+
+gint gdata_gd_feed_link_get_count_hint (GDataGDFeedLink *self) G_GNUC_PURE;
+void gdata_gd_feed_link_set_count_hint (GDataGDFeedLink *self, gint count_hint);
+
+gboolean gdata_gd_feed_link_is_read_only (GDataGDFeedLink *self) G_GNUC_PURE;
+void gdata_gd_feed_link_set_is_read_only (GDataGDFeedLink *self, gboolean is_read_only);
+
+G_END_DECLS
+
+#endif /* !GDATA_GD_FEED_LINK_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-gd-im-address
+ * @short_description: GData instant messaging address element
+ * @stability: Stable
+ * @include: gdata/gd/gdata-gd-im-address.h
+ *
+ * #GDataGDIMAddress represents an "im" element from the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdIm">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+
+#include "gdata-gd-im-address.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-comparable.h"
+
+static void gdata_gd_im_address_comparable_init (GDataComparableIface *iface);
+static void gdata_gd_im_address_finalize (GObject *object);
+static void gdata_gd_im_address_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_gd_im_address_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static void pre_get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataGDIMAddressPrivate {
+ gchar *address;
+ gchar *protocol;
+ gchar *relation_type;
+ gchar *label;
+ gboolean is_primary;
+};
+
+enum {
+ PROP_ADDRESS = 1,
+ PROP_PROTOCOL,
+ PROP_RELATION_TYPE,
+ PROP_LABEL,
+ PROP_IS_PRIMARY
+};
+
+G_DEFINE_TYPE_WITH_CODE (GDataGDIMAddress, gdata_gd_im_address, GDATA_TYPE_PARSABLE,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_gd_im_address_comparable_init))
+
+static void
+gdata_gd_im_address_class_init (GDataGDIMAddressClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataGDIMAddressPrivate));
+
+ gobject_class->get_property = gdata_gd_im_address_get_property;
+ gobject_class->set_property = gdata_gd_im_address_set_property;
+ gobject_class->finalize = gdata_gd_im_address_finalize;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ parsable_class->pre_get_xml = pre_get_xml;
+ parsable_class->get_namespaces = get_namespaces;
+ parsable_class->element_name = "im";
+ parsable_class->element_namespace = "gd";
+
+ /**
+ * GDataGDIMAddress:address:
+ *
+ * The IM address itself.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdIm">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_ADDRESS,
+ g_param_spec_string ("address",
+ "Address", "The IM address itself.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDIMAddress:protocol:
+ *
+ * Identifies the IM network. For example: %GDATA_GD_IM_PROTOCOL_JABBER or %GDATA_GD_IM_PROTOCOL_GOOGLE_TALK.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdIm">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_PROTOCOL,
+ g_param_spec_string ("protocol",
+ "Protocol", "Identifies the IM network.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDIMAddress:relation-type:
+ *
+ * A programmatic value that identifies the type of IM address. For example: %GDATA_GD_IM_ADDRESS_HOME or %GDATA_GD_IM_ADDRESS_WORK.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdIm">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_RELATION_TYPE,
+ g_param_spec_string ("relation-type",
+ "Relation type", "A programmatic value that identifies the type of IM address.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDIMAddress:label:
+ *
+ * A simple string value used to name this IM address. It allows UIs to display a label such as "Work", "Personal", "Preferred", etc.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdIm">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LABEL,
+ g_param_spec_string ("label",
+ "Label", "A simple string value used to name this IM address.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDIMAddress:is-primary:
+ *
+ * Indicates which IM address out of a group is primary.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdIm">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_IS_PRIMARY,
+ g_param_spec_boolean ("is-primary",
+ "Primary?", "Indicates which IM address out of a group is primary.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static gint
+compare_with (GDataComparable *self, GDataComparable *other)
+{
+ GDataGDIMAddressPrivate *a = ((GDataGDIMAddress*) self)->priv, *b = ((GDataGDIMAddress*) other)->priv;
+
+ if (g_strcmp0 (a->address, b->address) == 0 && g_strcmp0 (a->protocol, b->protocol) == 0)
+ return 0;
+ return 1;
+}
+
+static void
+gdata_gd_im_address_comparable_init (GDataComparableIface *iface)
+{
+ iface->compare_with = compare_with;
+}
+
+static void
+gdata_gd_im_address_init (GDataGDIMAddress *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GD_IM_ADDRESS, GDataGDIMAddressPrivate);
+}
+
+static void
+gdata_gd_im_address_finalize (GObject *object)
+{
+ GDataGDIMAddressPrivate *priv = GDATA_GD_IM_ADDRESS (object)->priv;
+
+ g_free (priv->address);
+ g_free (priv->protocol);
+ g_free (priv->relation_type);
+ g_free (priv->label);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_gd_im_address_parent_class)->finalize (object);
+}
+
+static void
+gdata_gd_im_address_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataGDIMAddressPrivate *priv = GDATA_GD_IM_ADDRESS (object)->priv;
+
+ switch (property_id) {
+ case PROP_ADDRESS:
+ g_value_set_string (value, priv->address);
+ break;
+ case PROP_PROTOCOL:
+ g_value_set_string (value, priv->protocol);
+ break;
+ case PROP_RELATION_TYPE:
+ g_value_set_string (value, priv->relation_type);
+ break;
+ case PROP_LABEL:
+ g_value_set_string (value, priv->label);
+ break;
+ case PROP_IS_PRIMARY:
+ g_value_set_boolean (value, priv->is_primary);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_gd_im_address_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataGDIMAddress *self = GDATA_GD_IM_ADDRESS (object);
+
+ switch (property_id) {
+ case PROP_ADDRESS:
+ gdata_gd_im_address_set_address (self, g_value_get_string (value));
+ break;
+ case PROP_PROTOCOL:
+ gdata_gd_im_address_set_protocol (self, g_value_get_string (value));
+ break;
+ case PROP_RELATION_TYPE:
+ gdata_gd_im_address_set_relation_type (self, g_value_get_string (value));
+ break;
+ case PROP_LABEL:
+ gdata_gd_im_address_set_label (self, g_value_get_string (value));
+ break;
+ case PROP_IS_PRIMARY:
+ gdata_gd_im_address_set_is_primary (self, g_value_get_boolean (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ xmlChar *address, *rel;
+ gboolean primary_bool;
+ GDataGDIMAddressPrivate *priv = GDATA_GD_IM_ADDRESS (parsable)->priv;
+
+ /* Is it the primary IM address? */
+ if (gdata_parser_boolean_from_property (root_node, "primary", &primary_bool, 0, error) == FALSE)
+ return FALSE;
+
+ address = xmlGetProp (root_node, (xmlChar*) "address");
+ if (address == NULL || *address == '\0') {
+ xmlFree (address);
+ return gdata_parser_error_required_property_missing (root_node, "address", error);
+ }
+
+ rel = xmlGetProp (root_node, (xmlChar*) "rel");
+ if (rel != NULL && *rel == '\0') {
+ xmlFree (address);
+ xmlFree (rel);
+ return gdata_parser_error_required_property_missing (root_node, "rel", error);
+ }
+
+ priv->address = (gchar*) address;
+ priv->protocol = (gchar*) xmlGetProp (root_node, (xmlChar*) "protocol");
+ priv->relation_type = (gchar*) rel;
+ priv->label = (gchar*) xmlGetProp (root_node, (xmlChar*) "label");
+ priv->is_primary = primary_bool;
+
+ return TRUE;
+}
+
+static void
+pre_get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataGDIMAddressPrivate *priv = GDATA_GD_IM_ADDRESS (parsable)->priv;
+
+ gdata_parser_string_append_escaped (xml_string, " address='", priv->address, "'");
+ if (priv->protocol != NULL)
+ gdata_parser_string_append_escaped (xml_string, " protocol='", priv->protocol, "'");
+
+ if (priv->relation_type != NULL)
+ gdata_parser_string_append_escaped (xml_string, " rel='", priv->relation_type, "'");
+ if (priv->label != NULL)
+ gdata_parser_string_append_escaped (xml_string, " label='", priv->label, "'");
+
+ if (priv->is_primary == TRUE)
+ g_string_append (xml_string, " primary='true'");
+ else
+ g_string_append (xml_string, " primary='false'");
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ g_hash_table_insert (namespaces, (gchar*) "gd", (gchar*) "http://schemas.google.com/g/2005");
+}
+
+/**
+ * gdata_gd_im_address_new:
+ * @address: the IM address
+ * @protocol: (allow-none): a URI identifying the IM protocol, or %NULL
+ * @relation_type: (allow-none): the relationship between the IM address and its owner, or %NULL
+ * @label: (allow-none): a human-readable label for the IM address, or %NULL
+ * @is_primary: %TRUE if this IM address is its owner's primary address, %FALSE otherwise
+ *
+ * Creates a new #GDataGDIMAddress. More information is available in the <ulink type="http"
+ * url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdIm">GData specification</ulink>.
+ *
+ * Return value: a new #GDataGDIMAddress, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.2.0
+ */
+GDataGDIMAddress *
+gdata_gd_im_address_new (const gchar *address, const gchar *protocol, const gchar *relation_type, const gchar *label, gboolean is_primary)
+{
+ g_return_val_if_fail (address != NULL && *address != '\0', NULL);
+ g_return_val_if_fail (protocol == NULL || *protocol != '\0', NULL);
+ g_return_val_if_fail (relation_type == NULL || *relation_type != '\0', NULL);
+ return g_object_new (GDATA_TYPE_GD_IM_ADDRESS, "address", address, "protocol", protocol, "relation-type", relation_type,
+ "label", label, "is-primary", is_primary, NULL);
+}
+
+/**
+ * gdata_gd_im_address_get_address:
+ * @self: a #GDataGDIMAddress
+ *
+ * Gets the #GDataGDIMAddress:address property.
+ *
+ * Return value: the IM address itself, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_gd_im_address_get_address (GDataGDIMAddress *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_IM_ADDRESS (self), NULL);
+ return self->priv->address;
+}
+
+/**
+ * gdata_gd_im_address_set_address:
+ * @self: a #GDataGDIMAddress
+ * @address: the new IM address
+ *
+ * Sets the #GDataGDIMAddress:address property to @address.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_im_address_set_address (GDataGDIMAddress *self, const gchar *address)
+{
+ g_return_if_fail (GDATA_IS_GD_IM_ADDRESS (self));
+ g_return_if_fail (address != NULL && *address != '\0');
+
+ g_free (self->priv->address);
+ self->priv->address = g_strdup (address);
+ g_object_notify (G_OBJECT (self), "address");
+}
+
+/**
+ * gdata_gd_im_address_get_protocol:
+ * @self: a #GDataGDIMAddress
+ *
+ * Gets the #GDataGDIMAddress:protocol property.
+ *
+ * Return value: the IM address' protocol, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_gd_im_address_get_protocol (GDataGDIMAddress *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_IM_ADDRESS (self), NULL);
+ return self->priv->protocol;
+}
+
+/**
+ * gdata_gd_im_address_set_protocol:
+ * @self: a #GDataGDIMAddress
+ * @protocol: (allow-none): the new IM protocol, or %NULL
+ *
+ * Sets the #GDataGDIMAddress:protocol property to @protocol.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_im_address_set_protocol (GDataGDIMAddress *self, const gchar *protocol)
+{
+ g_return_if_fail (GDATA_IS_GD_IM_ADDRESS (self));
+ g_return_if_fail (protocol == NULL || *protocol != '\0');
+
+ g_free (self->priv->protocol);
+ self->priv->protocol = g_strdup (protocol);
+ g_object_notify (G_OBJECT (self), "protocol");
+}
+
+/**
+ * gdata_gd_im_address_get_relation_type:
+ * @self: a #GDataGDIMAddress
+ *
+ * Gets the #GDataGDIMAddress:relation-type property.
+ *
+ * Return value: the IM address' relation type, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_gd_im_address_get_relation_type (GDataGDIMAddress *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_IM_ADDRESS (self), NULL);
+ return self->priv->relation_type;
+}
+
+/**
+ * gdata_gd_im_address_set_relation_type:
+ * @self: a #GDataGDIMAddress
+ * @relation_type: (allow-none): the new relation type for the im_address, or %NULL
+ *
+ * Sets the #GDataGDIMAddress:relation-type property to @relation_type.
+ *
+ * Set @relation_type to %NULL to unset the property in the IM address.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_im_address_set_relation_type (GDataGDIMAddress *self, const gchar *relation_type)
+{
+ g_return_if_fail (GDATA_IS_GD_IM_ADDRESS (self));
+ g_return_if_fail (relation_type == NULL || *relation_type != '\0');
+
+ g_free (self->priv->relation_type);
+ self->priv->relation_type = g_strdup (relation_type);
+ g_object_notify (G_OBJECT (self), "relation-type");
+}
+
+/**
+ * gdata_gd_im_address_get_label:
+ * @self: a #GDataGDIMAddress
+ *
+ * Gets the #GDataGDIMAddress:label property.
+ *
+ * Return value: the IM address' label, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_gd_im_address_get_label (GDataGDIMAddress *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_IM_ADDRESS (self), NULL);
+ return self->priv->label;
+}
+
+/**
+ * gdata_gd_im_address_set_label:
+ * @self: a #GDataGDIMAddress
+ * @label: (allow-none): the new label for the IM address, or %NULL
+ *
+ * Sets the #GDataGDIMAddress:label property to @label.
+ *
+ * Set @label to %NULL to unset the property in the IM address.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_im_address_set_label (GDataGDIMAddress *self, const gchar *label)
+{
+ g_return_if_fail (GDATA_IS_GD_IM_ADDRESS (self));
+
+ g_free (self->priv->label);
+ self->priv->label = g_strdup (label);
+ g_object_notify (G_OBJECT (self), "label");
+}
+
+/**
+ * gdata_gd_im_address_is_primary:
+ * @self: a #GDataGDIMAddress
+ *
+ * Gets the #GDataGDIMAddress:is-primary property.
+ *
+ * Return value: %TRUE if this is the primary IM address, %FALSE otherwise
+ *
+ * Since: 0.4.0
+ */
+gboolean
+gdata_gd_im_address_is_primary (GDataGDIMAddress *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_IM_ADDRESS (self), FALSE);
+ return self->priv->is_primary;
+}
+
+/**
+ * gdata_gd_im_address_set_is_primary:
+ * @self: a #GDataGDIMAddress
+ * @is_primary: %TRUE if this is the primary IM address, %FALSE otherwise
+ *
+ * Sets the #GDataGDIMAddress:is-primary property to @is_primary.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_im_address_set_is_primary (GDataGDIMAddress *self, gboolean is_primary)
+{
+ g_return_if_fail (GDATA_IS_GD_IM_ADDRESS (self));
+
+ self->priv->is_primary = is_primary;
+ g_object_notify (G_OBJECT (self), "is-primary");
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_GD_IM_ADDRESS_H
+#define GDATA_GD_IM_ADDRESS_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_GD_IM_ADDRESS_HOME:
+ *
+ * The relation type URI for a home IM address.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_IM_ADDRESS_HOME "http://schemas.google.com/g/2005#home"
+
+/**
+ * GDATA_GD_IM_ADDRESS_NETMEETING:
+ *
+ * The relation type URI for a Microsoft NetMeeting IM address.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_IM_ADDRESS_NETMEETING "http://schemas.google.com/g/2005#netmeeting"
+
+/**
+ * GDATA_GD_IM_ADDRESS_OTHER:
+ *
+ * The relation type URI for a miscellaneous IM address.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_IM_ADDRESS_OTHER "http://schemas.google.com/g/2005#other"
+
+/**
+ * GDATA_GD_IM_ADDRESS_WORK:
+ *
+ * The relation type URI for a work IM address.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_IM_ADDRESS_WORK "http://schemas.google.com/g/2005#work"
+
+/**
+ * GDATA_GD_IM_PROTOCOL_AIM:
+ *
+ * The protocol type URI for an AIM IM address.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_IM_PROTOCOL_AIM "http://schemas.google.com/g/2005#AIM"
+
+/**
+ * GDATA_GD_IM_PROTOCOL_LIVE_MESSENGER:
+ *
+ * The protocol type URI for an Windows Live Messenger IM address.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_IM_PROTOCOL_LIVE_MESSENGER "http://schemas.google.com/g/2005#MSN"
+
+/**
+ * GDATA_GD_IM_PROTOCOL_YAHOO_MESSENGER:
+ *
+ * The protocol type URI for a Yahoo! Messenger IM address.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_IM_PROTOCOL_YAHOO_MESSENGER "http://schemas.google.com/g/2005#YAHOO"
+
+/**
+ * GDATA_GD_IM_PROTOCOL_SKYPE:
+ *
+ * The protocol type URI for a Skype IM address.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_IM_PROTOCOL_SKYPE "http://schemas.google.com/g/2005#SKYPE"
+
+/**
+ * GDATA_GD_IM_PROTOCOL_QQ:
+ *
+ * The protocol type URI for a QQ IM address.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_IM_PROTOCOL_QQ "http://schemas.google.com/g/2005#QQ"
+
+/**
+ * GDATA_GD_IM_PROTOCOL_GOOGLE_TALK:
+ *
+ * The protocol type URI for a Google Talk IM address.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_IM_PROTOCOL_GOOGLE_TALK "http://schemas.google.com/g/2005#GOOGLE_TALK"
+
+/**
+ * GDATA_GD_IM_PROTOCOL_ICQ:
+ *
+ * The protocol type URI for an ICQ IM address.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_IM_PROTOCOL_ICQ "http://schemas.google.com/g/2005#ICQ"
+
+/**
+ * GDATA_GD_IM_PROTOCOL_JABBER:
+ *
+ * The protocol type URI for a Jabber IM address.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_IM_PROTOCOL_JABBER "http://schemas.google.com/g/2005#JABBER"
+
+#define GDATA_TYPE_GD_IM_ADDRESS (gdata_gd_im_address_get_type ())
+#define GDATA_GD_IM_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_GD_IM_ADDRESS, GDataGDIMAddress))
+#define GDATA_GD_IM_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_GD_IM_ADDRESS, GDataGDIMAddressClass))
+#define GDATA_IS_GD_IM_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_GD_IM_ADDRESS))
+#define GDATA_IS_GD_IM_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_GD_IM_ADDRESS))
+#define GDATA_GD_IM_ADDRESS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_GD_IM_ADDRESS, GDataGDIMAddressClass))
+
+typedef struct _GDataGDIMAddressPrivate GDataGDIMAddressPrivate;
+
+/**
+ * GDataGDIMAddress:
+ *
+ * All the fields in the #GDataGDIMAddress structure are private and should never be accessed directly.
+ *
+ * Since: 0.2.0
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataGDIMAddressPrivate *priv;
+} GDataGDIMAddress;
+
+/**
+ * GDataGDIMAddressClass:
+ *
+ * All the fields in the #GDataGDIMAddressClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataGDIMAddressClass;
+
+GType gdata_gd_im_address_get_type (void) G_GNUC_CONST;
+
+GDataGDIMAddress *gdata_gd_im_address_new (const gchar *address, const gchar *protocol, const gchar *relation_type, const gchar *label,
+ gboolean is_primary) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_gd_im_address_get_address (GDataGDIMAddress *self) G_GNUC_PURE;
+void gdata_gd_im_address_set_address (GDataGDIMAddress *self, const gchar *address);
+
+const gchar *gdata_gd_im_address_get_protocol (GDataGDIMAddress *self) G_GNUC_PURE;
+void gdata_gd_im_address_set_protocol (GDataGDIMAddress *self, const gchar *protocol);
+
+const gchar *gdata_gd_im_address_get_relation_type (GDataGDIMAddress *self) G_GNUC_PURE;
+void gdata_gd_im_address_set_relation_type (GDataGDIMAddress *self, const gchar *relation_type);
+
+const gchar *gdata_gd_im_address_get_label (GDataGDIMAddress *self) G_GNUC_PURE;
+void gdata_gd_im_address_set_label (GDataGDIMAddress *self, const gchar *label);
+
+gboolean gdata_gd_im_address_is_primary (GDataGDIMAddress *self) G_GNUC_PURE;
+void gdata_gd_im_address_set_is_primary (GDataGDIMAddress *self, gboolean is_primary);
+
+G_END_DECLS
+
+#endif /* !GDATA_GD_IM_ADDRESS_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-gd-name
+ * @short_description: GData name element
+ * @stability: Stable
+ * @include: gdata/gd/gdata-gd-name.h
+ *
+ * #GDataGDName represents a "name" element from the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdName">GData specification</ulink>.
+ *
+ * Given a name such as <literal>Sir Winston Leonard Spencer-Churchill, KG</literal>, the properties of the #GDataGDName should be
+ * set as follows:
+ * <variablelist>
+ * <varlistentry><term>#GDataGDName:given-name</term><listitem><para>Winston</para></listitem></varlistentry>
+ * <varlistentry><term>#GDataGDName:additional-name</term><listitem><para>Leonard</para></listitem></varlistentry>
+ * <varlistentry><term>#GDataGDName:family-name</term><listitem><para>Spencer-Churchill</para></listitem></varlistentry>
+ * <varlistentry><term>#GDataGDName:prefix</term><listitem><para>Sir</para></listitem></varlistentry>
+ * <varlistentry><term>#GDataGDName:suffix</term><listitem><para>KG</para></listitem></varlistentry>
+ * </variablelist>
+ *
+ * Since: 0.5.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+
+#include "gdata-gd-name.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-comparable.h"
+
+static void gdata_gd_name_comparable_init (GDataComparableIface *iface);
+static void gdata_gd_name_finalize (GObject *object);
+static void gdata_gd_name_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_gd_name_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error);
+static void get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataGDNamePrivate {
+ gchar *given_name;
+ gchar *additional_name;
+ gchar *family_name;
+ gchar *prefix;
+ gchar *suffix;
+ gchar *full_name;
+};
+
+enum {
+ PROP_GIVEN_NAME = 1,
+ PROP_ADDITIONAL_NAME,
+ PROP_FAMILY_NAME,
+ PROP_PREFIX,
+ PROP_SUFFIX,
+ PROP_FULL_NAME
+};
+
+G_DEFINE_TYPE_WITH_CODE (GDataGDName, gdata_gd_name, GDATA_TYPE_PARSABLE,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_gd_name_comparable_init))
+
+static void
+gdata_gd_name_class_init (GDataGDNameClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataGDNamePrivate));
+
+ gobject_class->get_property = gdata_gd_name_get_property;
+ gobject_class->set_property = gdata_gd_name_set_property;
+ gobject_class->finalize = gdata_gd_name_finalize;
+
+ parsable_class->parse_xml = parse_xml;
+ parsable_class->get_xml = get_xml;
+ parsable_class->get_namespaces = get_namespaces;
+ parsable_class->element_name = "name";
+ parsable_class->element_namespace = "gd";
+
+ /**
+ * GDataGDName:given-name:
+ *
+ * The person's given name.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdName">GData specification</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_GIVEN_NAME,
+ g_param_spec_string ("given-name",
+ "Given name", "The person's given name.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDName:additional-name:
+ *
+ * An additional name for the person (e.g. a middle name).
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdName">GData specification</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_ADDITIONAL_NAME,
+ g_param_spec_string ("additional-name",
+ "Additional name", "An additional name for the person (e.g. a middle name).",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDName:family-name:
+ *
+ * The person's family name.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdName">GData specification</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_FAMILY_NAME,
+ g_param_spec_string ("family-name",
+ "Family name", "The person's family name.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDName:prefix:
+ *
+ * An honorific prefix (e.g. <literal>Mr</literal> or <literal>Mrs</literal>).
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdName">GData specification</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_PREFIX,
+ g_param_spec_string ("prefix",
+ "Prefix", "An honorific prefix.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDName:suffix:
+ *
+ * An honorific suffix (e.g. <literal>san</literal> or <literal>III</literal>).
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdName">GData specification</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SUFFIX,
+ g_param_spec_string ("suffix",
+ "Suffix", "An honorific suffix.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDName:full-name:
+ *
+ * An unstructured representation of the person's full name. It's generally advised to use the other individual properties in preference
+ * to this one, which can fall out of synchronisation with the other properties.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdName">GData specification</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_FULL_NAME,
+ g_param_spec_string ("full-name",
+ "Full name", "An unstructured representation of the person's full name.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static gint
+compare_with (GDataComparable *self, GDataComparable *other)
+{
+ GDataGDNamePrivate *a = ((GDataGDName*) self)->priv, *b = ((GDataGDName*) other)->priv;
+
+ if (g_strcmp0 (a->given_name, b->given_name) == 0 && g_strcmp0 (a->additional_name, b->additional_name) == 0 &&
+ g_strcmp0 (a->family_name, b->family_name) == 0 && g_strcmp0 (a->prefix, b->prefix) == 0)
+ return 0;
+ return 1;
+}
+
+static void
+gdata_gd_name_comparable_init (GDataComparableIface *iface)
+{
+ iface->compare_with = compare_with;
+}
+
+static void
+gdata_gd_name_init (GDataGDName *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GD_NAME, GDataGDNamePrivate);
+}
+
+static void
+gdata_gd_name_finalize (GObject *object)
+{
+ GDataGDNamePrivate *priv = GDATA_GD_NAME (object)->priv;
+
+ g_free (priv->given_name);
+ g_free (priv->additional_name);
+ g_free (priv->family_name);
+ g_free (priv->prefix);
+ g_free (priv->suffix);
+ g_free (priv->full_name);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_gd_name_parent_class)->finalize (object);
+}
+
+static void
+gdata_gd_name_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataGDNamePrivate *priv = GDATA_GD_NAME (object)->priv;
+
+ switch (property_id) {
+ case PROP_GIVEN_NAME:
+ g_value_set_string (value, priv->given_name);
+ break;
+ case PROP_ADDITIONAL_NAME:
+ g_value_set_string (value, priv->additional_name);
+ break;
+ case PROP_FAMILY_NAME:
+ g_value_set_string (value, priv->family_name);
+ break;
+ case PROP_PREFIX:
+ g_value_set_string (value, priv->prefix);
+ break;
+ case PROP_SUFFIX:
+ g_value_set_string (value, priv->suffix);
+ break;
+ case PROP_FULL_NAME:
+ g_value_set_string (value, priv->full_name);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_gd_name_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataGDName *self = GDATA_GD_NAME (object);
+
+ switch (property_id) {
+ case PROP_GIVEN_NAME:
+ gdata_gd_name_set_given_name (self, g_value_get_string (value));
+ break;
+ case PROP_ADDITIONAL_NAME:
+ gdata_gd_name_set_additional_name (self, g_value_get_string (value));
+ break;
+ case PROP_FAMILY_NAME:
+ gdata_gd_name_set_family_name (self, g_value_get_string (value));
+ break;
+ case PROP_PREFIX:
+ gdata_gd_name_set_prefix (self, g_value_get_string (value));
+ break;
+ case PROP_SUFFIX:
+ gdata_gd_name_set_suffix (self, g_value_get_string (value));
+ break;
+ case PROP_FULL_NAME:
+ gdata_gd_name_set_full_name (self, g_value_get_string (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ gboolean success;
+ GDataGDNamePrivate *priv = GDATA_GD_NAME (parsable)->priv;
+
+ if (gdata_parser_is_namespace (node, "http://schemas.google.com/g/2005") == TRUE && (
+ gdata_parser_string_from_element (node, "givenName", P_NO_DUPES, &(priv->given_name), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "additionalName", P_NO_DUPES, &(priv->additional_name), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "familyName", P_NO_DUPES, &(priv->family_name), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "namePrefix", P_NO_DUPES, &(priv->prefix), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "nameSuffix", P_NO_DUPES, &(priv->suffix), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "fullName", P_NO_DUPES, &(priv->full_name), &success, error) == TRUE)) {
+ return success;
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_gd_name_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ }
+}
+
+static void
+get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataGDNamePrivate *priv = GDATA_GD_NAME (parsable)->priv;
+
+#define OUTPUT_STRING_ELEMENT(E,F) \
+ if (priv->F != NULL) \
+ gdata_parser_string_append_escaped (xml_string, "<gd:" E ">", priv->F, "</gd:" E ">");
+
+ OUTPUT_STRING_ELEMENT ("givenName", given_name)
+ OUTPUT_STRING_ELEMENT ("additionalName", additional_name)
+ OUTPUT_STRING_ELEMENT ("familyName", family_name)
+ OUTPUT_STRING_ELEMENT ("namePrefix", prefix)
+ OUTPUT_STRING_ELEMENT ("nameSuffix", suffix)
+
+ /* We can't guarantee that priv->full_name is non-empty without breaking API. */
+ if (priv->full_name != NULL && *(priv->full_name) != '\0') {
+ gdata_parser_string_append_escaped (xml_string, "<gd:fullName>", priv->full_name, "</gd:fullName>");
+ }
+
+#undef OUTPUT_STRING_ELEMENT
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ g_hash_table_insert (namespaces, (gchar*) "gd", (gchar*) "http://schemas.google.com/g/2005");
+}
+
+/**
+ * gdata_gd_name_new:
+ * @given_name: (allow-none): the person's given name, or %NULL
+ * @family_name: (allow-none): the person's family name, or %NULL
+ *
+ * Creates a new #GDataGDName. More information is available in the <ulink type="http"
+ * url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdName">GData specification</ulink>.
+ *
+ * Return value: a new #GDataGDName, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.5.0
+ */
+GDataGDName *
+gdata_gd_name_new (const gchar *given_name, const gchar *family_name)
+{
+ g_return_val_if_fail (given_name == NULL || *given_name != '\0', NULL);
+ g_return_val_if_fail (family_name == NULL || *family_name != '\0', NULL);
+ return g_object_new (GDATA_TYPE_GD_NAME, "given-name", given_name, "family-name", family_name, NULL);
+}
+
+/**
+ * gdata_gd_name_get_given_name:
+ * @self: a #GDataGDName
+ *
+ * Gets the #GDataGDName:given-name property.
+ *
+ * Return value: the person's given name, or %NULL
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_gd_name_get_given_name (GDataGDName *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_NAME (self), NULL);
+ return self->priv->given_name;
+}
+
+/**
+ * gdata_gd_name_set_given_name:
+ * @self: a #GDataGDName
+ * @given_name: (allow-none): the new given name, or %NULL
+ *
+ * Sets the #GDataGDName:given-name property to @given_name.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_gd_name_set_given_name (GDataGDName *self, const gchar *given_name)
+{
+ g_return_if_fail (GDATA_IS_GD_NAME (self));
+ g_return_if_fail (given_name == NULL || *given_name != '\0');
+
+ g_free (self->priv->given_name);
+ self->priv->given_name = g_strdup (given_name);
+ g_object_notify (G_OBJECT (self), "given-name");
+}
+
+/**
+ * gdata_gd_name_get_additional_name:
+ * @self: a #GDataGDName
+ *
+ * Gets the #GDataGDName:additional-name property.
+ *
+ * Return value: the person's additional name, or %NULL
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_gd_name_get_additional_name (GDataGDName *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_NAME (self), NULL);
+ return self->priv->additional_name;
+}
+
+/**
+ * gdata_gd_name_set_additional_name:
+ * @self: a #GDataGDName
+ * @additional_name: (allow-none): the new additional name, or %NULL
+ *
+ * Sets the #GDataGDName:additional-name property to @additional_name.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_gd_name_set_additional_name (GDataGDName *self, const gchar *additional_name)
+{
+ g_return_if_fail (GDATA_IS_GD_NAME (self));
+ g_return_if_fail (additional_name == NULL || *additional_name != '\0');
+
+ g_free (self->priv->additional_name);
+ self->priv->additional_name = g_strdup (additional_name);
+ g_object_notify (G_OBJECT (self), "additional-name");
+}
+
+/**
+ * gdata_gd_name_get_family_name:
+ * @self: a #GDataGDName
+ *
+ * Gets the #GDataGDName:family-name property.
+ *
+ * Return value: the person's family name, or %NULL
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_gd_name_get_family_name (GDataGDName *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_NAME (self), NULL);
+ return self->priv->family_name;
+}
+
+/**
+ * gdata_gd_name_set_family_name:
+ * @self: a #GDataGDName
+ * @family_name: (allow-none): the new family name, or %NULL
+ *
+ * Sets the #GDataGDName:family-name property to @family_name.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_gd_name_set_family_name (GDataGDName *self, const gchar *family_name)
+{
+ g_return_if_fail (GDATA_IS_GD_NAME (self));
+ g_return_if_fail (family_name == NULL || *family_name != '\0');
+
+ g_free (self->priv->family_name);
+ self->priv->family_name = g_strdup (family_name);
+ g_object_notify (G_OBJECT (self), "family-name");
+}
+
+/**
+ * gdata_gd_name_get_prefix:
+ * @self: a #GDataGDName
+ *
+ * Gets the #GDataGDName:prefix property.
+ *
+ * Return value: the person's name prefix, or %NULL
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_gd_name_get_prefix (GDataGDName *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_NAME (self), NULL);
+ return self->priv->prefix;
+}
+
+/**
+ * gdata_gd_name_set_prefix:
+ * @self: a #GDataGDName
+ * @prefix: (allow-none): the new prefix, or %NULL
+ *
+ * Sets the #GDataGDName:prefix property to @prefix.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_gd_name_set_prefix (GDataGDName *self, const gchar *prefix)
+{
+ g_return_if_fail (GDATA_IS_GD_NAME (self));
+ g_return_if_fail (prefix == NULL || *prefix != '\0');
+
+ g_free (self->priv->prefix);
+ self->priv->prefix = g_strdup (prefix);
+ g_object_notify (G_OBJECT (self), "prefix");
+}
+
+/**
+ * gdata_gd_name_get_suffix:
+ * @self: a #GDataGDName
+ *
+ * Gets the #GDataGDName:suffix property.
+ *
+ * Return value: the person's name suffix, or %NULL
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_gd_name_get_suffix (GDataGDName *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_NAME (self), NULL);
+ return self->priv->suffix;
+}
+
+/**
+ * gdata_gd_name_set_suffix:
+ * @self: a #GDataGDName
+ * @suffix: (allow-none): the new suffix, or %NULL
+ *
+ * Sets the #GDataGDName:suffix property to @suffix.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_gd_name_set_suffix (GDataGDName *self, const gchar *suffix)
+{
+ g_return_if_fail (GDATA_IS_GD_NAME (self));
+ g_return_if_fail (suffix == NULL || *suffix != '\0');
+
+ g_free (self->priv->suffix);
+ self->priv->suffix = g_strdup (suffix);
+ g_object_notify (G_OBJECT (self), "suffix");
+}
+
+/**
+ * gdata_gd_name_get_full_name:
+ * @self: a #GDataGDName
+ *
+ * Gets the #GDataGDName:full-name property.
+ *
+ * Return value: the person's full name, or %NULL
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_gd_name_get_full_name (GDataGDName *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_NAME (self), NULL);
+ return self->priv->full_name;
+}
+
+/**
+ * gdata_gd_name_set_full_name:
+ * @self: a #GDataGDName
+ * @full_name: (allow-none): the new full name, or %NULL
+ *
+ * Sets the #GDataGDName:full-name property to @full_name.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_gd_name_set_full_name (GDataGDName *self, const gchar *full_name)
+{
+ g_return_if_fail (GDATA_IS_GD_NAME (self));
+
+ /* Coerce empty strings to NULL. Ideally, we should have this as a precondition (as all the other setters in GDataGDName have) but that would
+ * break API. */
+ if (full_name != NULL && *full_name == '\0') {
+ full_name = NULL;
+ }
+
+ g_free (self->priv->full_name);
+ self->priv->full_name = g_strdup (full_name);
+ g_object_notify (G_OBJECT (self), "full-name");
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_GD_NAME_H
+#define GDATA_GD_NAME_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_GD_NAME (gdata_gd_name_get_type ())
+#define GDATA_GD_NAME(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_GD_NAME, GDataGDName))
+#define GDATA_GD_NAME_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_GD_NAME, GDataGDNameClass))
+#define GDATA_IS_GD_NAME(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_GD_NAME))
+#define GDATA_IS_GD_NAME_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_GD_NAME))
+#define GDATA_GD_NAME_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_GD_NAME, GDataGDNameClass))
+
+typedef struct _GDataGDNamePrivate GDataGDNamePrivate;
+
+/**
+ * GDataGDName:
+ *
+ * All the fields in the #GDataGDName structure are private and should never be accessed directly.
+ *
+ * Since: 0.5.0
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataGDNamePrivate *priv;
+} GDataGDName;
+
+/**
+ * GDataGDNameClass:
+ *
+ * All the fields in the #GDataGDNameClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.5.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataGDNameClass;
+
+GType gdata_gd_name_get_type (void) G_GNUC_CONST;
+
+GDataGDName *gdata_gd_name_new (const gchar *given_name, const gchar *family_name) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_gd_name_get_given_name (GDataGDName *self) G_GNUC_PURE;
+void gdata_gd_name_set_given_name (GDataGDName *self, const gchar *given_name);
+
+const gchar *gdata_gd_name_get_additional_name (GDataGDName *self) G_GNUC_PURE;
+void gdata_gd_name_set_additional_name (GDataGDName *self, const gchar *additional_name);
+
+const gchar *gdata_gd_name_get_family_name (GDataGDName *self) G_GNUC_PURE;
+void gdata_gd_name_set_family_name (GDataGDName *self, const gchar *family_name);
+
+const gchar *gdata_gd_name_get_prefix (GDataGDName *self) G_GNUC_PURE;
+void gdata_gd_name_set_prefix (GDataGDName *self, const gchar *prefix);
+
+const gchar *gdata_gd_name_get_suffix (GDataGDName *self) G_GNUC_PURE;
+void gdata_gd_name_set_suffix (GDataGDName *self, const gchar *suffix);
+
+const gchar *gdata_gd_name_get_full_name (GDataGDName *self) G_GNUC_PURE;
+void gdata_gd_name_set_full_name (GDataGDName *self, const gchar *full_name);
+
+G_END_DECLS
+
+#endif /* !GDATA_GD_NAME_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-gd-organization
+ * @short_description: GData organization element
+ * @stability: Stable
+ * @include: gdata/gd/gdata-gd-organization.h
+ *
+ * #GDataGDOrganization represents an "organization" element from the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdOrganization">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+
+#include "gdata-gd-organization.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-gd-where.h"
+#include "gdata-private.h"
+#include "gdata-comparable.h"
+
+static void gdata_gd_organization_comparable_init (GDataComparableIface *iface);
+static void gdata_gd_organization_dispose (GObject *object);
+static void gdata_gd_organization_finalize (GObject *object);
+static void gdata_gd_organization_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_gd_organization_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static void pre_get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataGDOrganizationPrivate {
+ gchar *name;
+ gchar *title;
+ gchar *relation_type;
+ gchar *label;
+ gboolean is_primary;
+ gchar *department;
+ gchar *job_description;
+ gchar *symbol;
+ GDataGDWhere *location;
+};
+
+enum {
+ PROP_NAME = 1,
+ PROP_TITLE,
+ PROP_RELATION_TYPE,
+ PROP_LABEL,
+ PROP_IS_PRIMARY,
+ PROP_DEPARTMENT,
+ PROP_JOB_DESCRIPTION,
+ PROP_SYMBOL,
+ PROP_LOCATION
+};
+
+G_DEFINE_TYPE_WITH_CODE (GDataGDOrganization, gdata_gd_organization, GDATA_TYPE_PARSABLE,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_gd_organization_comparable_init))
+
+static void
+gdata_gd_organization_class_init (GDataGDOrganizationClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataGDOrganizationPrivate));
+
+ gobject_class->get_property = gdata_gd_organization_get_property;
+ gobject_class->set_property = gdata_gd_organization_set_property;
+ gobject_class->dispose = gdata_gd_organization_dispose;
+ gobject_class->finalize = gdata_gd_organization_finalize;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ parsable_class->parse_xml = parse_xml;
+ parsable_class->pre_get_xml = pre_get_xml;
+ parsable_class->get_xml = get_xml;
+ parsable_class->get_namespaces = get_namespaces;
+ parsable_class->element_name = "organization";
+ parsable_class->element_namespace = "gd";
+
+ /**
+ * GDataGDOrganization:name:
+ *
+ * The name of the organization.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdOrganization">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_NAME,
+ g_param_spec_string ("name",
+ "Name", "The name of the organization.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDOrganization:title:
+ *
+ * The title of a person within the organization.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdOrganization">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_TITLE,
+ g_param_spec_string ("title",
+ "Title", "The title of a person within the organization.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDOrganization:relation-type:
+ *
+ * A programmatic value that identifies the type of organization. For example: %GDATA_GD_ORGANIZATION_WORK or %GDATA_GD_ORGANIZATION_OTHER.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdOrganization">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_RELATION_TYPE,
+ g_param_spec_string ("relation-type",
+ "Relation type", "A programmatic value that identifies the type of organization.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDOrganization:label:
+ *
+ * A simple string value used to name this organization. It allows UIs to display a label such as "Work", "Volunteer",
+ * "Professional Society", etc.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdOrganization">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LABEL,
+ g_param_spec_string ("label",
+ "Label", "A simple string value used to name this organization.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDOrganization:is-primary:
+ *
+ * Indicates which organization out of a group is primary.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdOrganization">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_IS_PRIMARY,
+ g_param_spec_boolean ("is-primary",
+ "Primary?", "Indicates which organization out of a group is primary.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDOrganization:department:
+ *
+ * Specifies a department within the organization.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdOrganization">GData specification</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_DEPARTMENT,
+ g_param_spec_string ("department",
+ "Department", "Specifies a department within the organization.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDOrganization:job-description:
+ *
+ * Description of a job within the organization.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdOrganization">GData specification</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_JOB_DESCRIPTION,
+ g_param_spec_string ("job-description",
+ "Job description", "Description of a job within the organization.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDOrganization:symbol:
+ *
+ * Stock symbol of the organization.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdOrganization">GData specification</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SYMBOL,
+ g_param_spec_string ("symbol",
+ "Symbol", "Symbol of the organization.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDOrganization:location:
+ *
+ * A place associated with the organization, e.g. office location.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdOrganization">GData specification</ulink>.
+ *
+ * Since: 0.6.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LOCATION,
+ g_param_spec_object ("location",
+ "Location", "A place associated with the organization, e.g. office location.",
+ GDATA_TYPE_GD_WHERE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static gint
+compare_with (GDataComparable *self, GDataComparable *other)
+{
+ GDataGDOrganizationPrivate *a = ((GDataGDOrganization*) self)->priv, *b = ((GDataGDOrganization*) other)->priv;
+
+ if (g_strcmp0 (a->name, b->name) == 0 && g_strcmp0 (a->title, b->title) == 0 && g_strcmp0 (a->department, b->department) == 0)
+ return 0;
+ return 1;
+}
+
+static void
+gdata_gd_organization_comparable_init (GDataComparableIface *iface)
+{
+ iface->compare_with = compare_with;
+}
+
+static void
+gdata_gd_organization_init (GDataGDOrganization *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GD_ORGANIZATION, GDataGDOrganizationPrivate);
+}
+
+static void
+gdata_gd_organization_dispose (GObject *object)
+{
+ GDataGDOrganizationPrivate *priv = GDATA_GD_ORGANIZATION (object)->priv;
+
+ if (priv->location != NULL)
+ g_object_unref (priv->location);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_gd_organization_parent_class)->dispose (object);
+}
+
+static void
+gdata_gd_organization_finalize (GObject *object)
+{
+ GDataGDOrganizationPrivate *priv = GDATA_GD_ORGANIZATION (object)->priv;
+
+ g_free (priv->name);
+ g_free (priv->title);
+ g_free (priv->relation_type);
+ g_free (priv->label);
+ g_free (priv->department);
+ g_free (priv->job_description);
+ g_free (priv->symbol);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_gd_organization_parent_class)->finalize (object);
+}
+
+static void
+gdata_gd_organization_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataGDOrganizationPrivate *priv = GDATA_GD_ORGANIZATION (object)->priv;
+
+ switch (property_id) {
+ case PROP_NAME:
+ g_value_set_string (value, priv->name);
+ break;
+ case PROP_TITLE:
+ g_value_set_string (value, priv->title);
+ break;
+ case PROP_RELATION_TYPE:
+ g_value_set_string (value, priv->relation_type);
+ break;
+ case PROP_LABEL:
+ g_value_set_string (value, priv->label);
+ break;
+ case PROP_IS_PRIMARY:
+ g_value_set_boolean (value, priv->is_primary);
+ break;
+ case PROP_DEPARTMENT:
+ g_value_set_string (value, priv->department);
+ break;
+ case PROP_JOB_DESCRIPTION:
+ g_value_set_string (value, priv->job_description);
+ break;
+ case PROP_SYMBOL:
+ g_value_set_string (value, priv->symbol);
+ break;
+ case PROP_LOCATION:
+ g_value_set_object (value, priv->location);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_gd_organization_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataGDOrganization *self = GDATA_GD_ORGANIZATION (object);
+
+ switch (property_id) {
+ case PROP_NAME:
+ gdata_gd_organization_set_name (self, g_value_get_string (value));
+ break;
+ case PROP_TITLE:
+ gdata_gd_organization_set_title (self, g_value_get_string (value));
+ break;
+ case PROP_RELATION_TYPE:
+ gdata_gd_organization_set_relation_type (self, g_value_get_string (value));
+ break;
+ case PROP_LABEL:
+ gdata_gd_organization_set_label (self, g_value_get_string (value));
+ break;
+ case PROP_IS_PRIMARY:
+ gdata_gd_organization_set_is_primary (self, g_value_get_boolean (value));
+ break;
+ case PROP_DEPARTMENT:
+ gdata_gd_organization_set_department (self, g_value_get_string (value));
+ break;
+ case PROP_JOB_DESCRIPTION:
+ gdata_gd_organization_set_job_description (self, g_value_get_string (value));
+ break;
+ case PROP_SYMBOL:
+ gdata_gd_organization_set_symbol (self, g_value_get_string (value));
+ break;
+ case PROP_LOCATION:
+ gdata_gd_organization_set_location (self, g_value_get_object (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ xmlChar *rel;
+ gboolean primary_bool;
+ GDataGDOrganizationPrivate *priv = GDATA_GD_ORGANIZATION (parsable)->priv;
+
+ /* Is it the primary organisation? */
+ if (gdata_parser_boolean_from_property (root_node, "primary", &primary_bool, 0, error) == FALSE)
+ return FALSE;
+
+ rel = xmlGetProp (root_node, (xmlChar*) "rel");
+ if (rel != NULL && *rel == '\0') {
+ xmlFree (rel);
+ return gdata_parser_error_required_property_missing (root_node, "rel", error);
+ }
+
+ priv->relation_type = (gchar*) rel;
+ priv->label = (gchar*) xmlGetProp (root_node, (xmlChar*) "label");
+ priv->is_primary = primary_bool;
+
+ return TRUE;
+}
+
+static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ gboolean success;
+ GDataGDOrganizationPrivate *priv = GDATA_GD_ORGANIZATION (parsable)->priv;
+
+ if (gdata_parser_is_namespace (node, "http://schemas.google.com/g/2005") == TRUE && (
+ gdata_parser_string_from_element (node, "orgName", P_NO_DUPES, &(priv->name), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "orgTitle", P_NO_DUPES, &(priv->title), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "orgDepartment", P_NO_DUPES, &(priv->department), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "orgJobDescription", P_NO_DUPES, &(priv->job_description), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "orgSymbol", P_NO_DUPES, &(priv->symbol), &success, error) == TRUE ||
+ gdata_parser_object_from_element (node, "where", P_REQUIRED | P_NO_DUPES, GDATA_TYPE_GD_WHERE,
+ &(priv->location), &success, error) == TRUE)) {
+ return success;
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_gd_organization_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ }
+}
+
+static void
+pre_get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataGDOrganizationPrivate *priv = GDATA_GD_ORGANIZATION (parsable)->priv;
+
+ if (priv->relation_type != NULL)
+ gdata_parser_string_append_escaped (xml_string, " rel='", priv->relation_type, "'");
+ if (priv->label != NULL)
+ gdata_parser_string_append_escaped (xml_string, " label='", priv->label, "'");
+
+ if (priv->is_primary == TRUE)
+ g_string_append (xml_string, " primary='true'");
+ else
+ g_string_append (xml_string, " primary='false'");
+}
+
+static void
+get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataGDOrganizationPrivate *priv = GDATA_GD_ORGANIZATION (parsable)->priv;
+
+ if (priv->name != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<gd:orgName>", priv->name, "</gd:orgName>");
+ if (priv->title != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<gd:orgTitle>", priv->title, "</gd:orgTitle>");
+ if (priv->department != NULL && *(priv->department) != '\0')
+ gdata_parser_string_append_escaped (xml_string, "<gd:orgDepartment>", priv->department, "</gd:orgDepartment>");
+ if (priv->job_description != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<gd:orgJobDescription>", priv->job_description, "</gd:orgJobDescription>");
+ if (priv->symbol != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<gd:orgSymbol>", priv->symbol, "</gd:orgSymbol>");
+ if (priv->location != NULL)
+ _gdata_parsable_get_xml (GDATA_PARSABLE (priv->location), xml_string, FALSE);
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ g_hash_table_insert (namespaces, (gchar*) "gd", (gchar*) "http://schemas.google.com/g/2005");
+}
+
+/**
+ * gdata_gd_organization_new:
+ * @name: (allow-none): the name of the organization, or %NULL
+ * @title: (allow-none): the owner's title within the organization, or %NULL
+ * @relation_type: (allow-none): the relationship between the organization and its owner, or %NULL
+ * @label: (allow-none): a human-readable label for the organization, or %NULL
+ * @is_primary: %TRUE if this organization is its owner's primary organization, %FALSE otherwise
+ *
+ * Creates a new #GDataGDOrganization. More information is available in the <ulink type="http"
+ * url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdOrganization">GData specification</ulink>.
+ *
+ * Return value: a new #GDataGDOrganization, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.2.0
+ */
+GDataGDOrganization *
+gdata_gd_organization_new (const gchar *name, const gchar *title, const gchar *relation_type, const gchar *label, gboolean is_primary)
+{
+ g_return_val_if_fail (relation_type == NULL || *relation_type != '\0', NULL);
+ return g_object_new (GDATA_TYPE_GD_ORGANIZATION, "name", name, "title", title, "relation-type", relation_type,
+ "label", label, "is-primary", is_primary, NULL);
+}
+
+/**
+ * gdata_gd_organization_get_name:
+ * @self: a #GDataGDOrganization
+ *
+ * Gets the #GDataGDOrganization:name property.
+ *
+ * Return value: the organization's name, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_gd_organization_get_name (GDataGDOrganization *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_ORGANIZATION (self), NULL);
+ return self->priv->name;
+}
+
+/**
+ * gdata_gd_organization_set_name:
+ * @self: a #GDataGDOrganization
+ * @name: (allow-none): the new name for the organization, or %NULL
+ *
+ * Sets the #GDataGDOrganization:name property to @name.
+ *
+ * Set @name to %NULL to unset the property in the organization.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_organization_set_name (GDataGDOrganization *self, const gchar *name)
+{
+ g_return_if_fail (GDATA_IS_GD_ORGANIZATION (self));
+
+ g_free (self->priv->name);
+ self->priv->name = g_strdup (name);
+ g_object_notify (G_OBJECT (self), "name");
+}
+
+/**
+ * gdata_gd_organization_get_title:
+ * @self: a #GDataGDOrganization
+ *
+ * Gets the #GDataGDOrganization:title property.
+ *
+ * Return value: the organization's title, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_gd_organization_get_title (GDataGDOrganization *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_ORGANIZATION (self), NULL);
+ return self->priv->title;
+}
+
+/**
+ * gdata_gd_organization_set_title:
+ * @self: a #GDataGDOrganization
+ * @title: (allow-none): the new title for the organization, or %NULL
+ *
+ * Sets the #GDataGDOrganization:title property to @title.
+ *
+ * Set @title to %NULL to unset the property in the organization.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_organization_set_title (GDataGDOrganization *self, const gchar *title)
+{
+ g_return_if_fail (GDATA_IS_GD_ORGANIZATION (self));
+
+ g_free (self->priv->title);
+ self->priv->title = g_strdup (title);
+ g_object_notify (G_OBJECT (self), "title");
+}
+
+/**
+ * gdata_gd_organization_get_relation_type:
+ * @self: a #GDataGDOrganization
+ *
+ * Gets the #GDataGDOrganization:relation-type property.
+ *
+ * Return value: the organization's relation type, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_gd_organization_get_relation_type (GDataGDOrganization *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_ORGANIZATION (self), NULL);
+ return self->priv->relation_type;
+}
+
+/**
+ * gdata_gd_organization_set_relation_type:
+ * @self: a #GDataGDOrganization
+ * @relation_type: (allow-none): the new relation type for the organization, or %NULL
+ *
+ * Sets the #GDataGDOrganization:relation-type property to @relation_type.
+ *
+ * Set @relation_type to %NULL to unset the property in the organization.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_organization_set_relation_type (GDataGDOrganization *self, const gchar *relation_type)
+{
+ g_return_if_fail (GDATA_IS_GD_ORGANIZATION (self));
+ g_return_if_fail (relation_type == NULL || *relation_type != '\0');
+
+ g_free (self->priv->relation_type);
+ self->priv->relation_type = g_strdup (relation_type);
+ g_object_notify (G_OBJECT (self), "relation-type");
+}
+
+/**
+ * gdata_gd_organization_get_label:
+ * @self: a #GDataGDOrganization
+ *
+ * Gets the #GDataGDOrganization:label property.
+ *
+ * Return value: the organization's label, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_gd_organization_get_label (GDataGDOrganization *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_ORGANIZATION (self), NULL);
+ return self->priv->label;
+}
+
+/**
+ * gdata_gd_organization_set_label:
+ * @self: a #GDataGDOrganization
+ * @label: (allow-none): the new label for the organization, or %NULL
+ *
+ * Sets the #GDataGDOrganization:label property to @label.
+ *
+ * Set @label to %NULL to unset the property in the organization.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_organization_set_label (GDataGDOrganization *self, const gchar *label)
+{
+ g_return_if_fail (GDATA_IS_GD_ORGANIZATION (self));
+
+ g_free (self->priv->label);
+ self->priv->label = g_strdup (label);
+ g_object_notify (G_OBJECT (self), "label");
+}
+
+/**
+ * gdata_gd_organization_is_primary:
+ * @self: a #GDataGDOrganization
+ *
+ * Gets the #GDataGDOrganization:is-primary property.
+ *
+ * Return value: %TRUE if this is the primary organization, %FALSE otherwise
+ *
+ * Since: 0.4.0
+ */
+gboolean
+gdata_gd_organization_is_primary (GDataGDOrganization *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_ORGANIZATION (self), FALSE);
+ return self->priv->is_primary;
+}
+
+/**
+ * gdata_gd_organization_set_is_primary:
+ * @self: a #GDataGDOrganization
+ * @is_primary: %TRUE if this is the primary organization, %FALSE otherwise
+ *
+ * Sets the #GDataGDOrganization:is-primary property to @is_primary.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_organization_set_is_primary (GDataGDOrganization *self, gboolean is_primary)
+{
+ g_return_if_fail (GDATA_IS_GD_ORGANIZATION (self));
+
+ self->priv->is_primary = is_primary;
+ g_object_notify (G_OBJECT (self), "is-primary");
+}
+
+/**
+ * gdata_gd_organization_get_department:
+ * @self: a #GDataGDOrganization
+ *
+ * Gets the #GDataGDOrganization:department property.
+ *
+ * Return value: the department in which the person works in this organization, or %NULL
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_gd_organization_get_department (GDataGDOrganization *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_ORGANIZATION (self), NULL);
+ return self->priv->department;
+}
+
+/**
+ * gdata_gd_organization_set_department:
+ * @self: a #GDataGDOrganization
+ * @department: (allow-none): the new department for the person working in the organization, or %NULL
+ *
+ * Sets the #GDataGDOrganization:department property to @department.
+ *
+ * Set @department to %NULL to unset the property in the organization.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_gd_organization_set_department (GDataGDOrganization *self, const gchar *department)
+{
+ g_return_if_fail (GDATA_IS_GD_ORGANIZATION (self));
+
+ g_free (self->priv->department);
+ self->priv->department = g_strdup (department);
+ g_object_notify (G_OBJECT (self), "department");
+}
+
+/**
+ * gdata_gd_organization_get_job_description:
+ * @self: a #GDataGDOrganization
+ *
+ * Gets the #GDataGDOrganization:job-description property.
+ *
+ * Return value: the job description of the person in the organization, or %NULL
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_gd_organization_get_job_description (GDataGDOrganization *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_ORGANIZATION (self), NULL);
+ return self->priv->job_description;
+}
+
+/**
+ * gdata_gd_organization_set_job_description:
+ * @self: a #GDataGDOrganization
+ * @job_description: (allow-none): the new job description for the person in the organization, or %NULL
+ *
+ * Sets the #GDataGDOrganization:job-description property to @job_description.
+ *
+ * Set @job_description to %NULL to unset the property in the organization.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_gd_organization_set_job_description (GDataGDOrganization *self, const gchar *job_description)
+{
+ g_return_if_fail (GDATA_IS_GD_ORGANIZATION (self));
+
+ g_free (self->priv->job_description);
+ self->priv->job_description = g_strdup (job_description);
+ g_object_notify (G_OBJECT (self), "job-description");
+}
+
+/**
+ * gdata_gd_organization_get_symbol:
+ * @self: a #GDataGDOrganization
+ *
+ * Gets the #GDataGDOrganization:symbol property.
+ *
+ * Return value: the organization's stock symbol, or %NULL
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_gd_organization_get_symbol (GDataGDOrganization *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_ORGANIZATION (self), NULL);
+ return self->priv->symbol;
+}
+
+/**
+ * gdata_gd_organization_set_symbol:
+ * @self: a #GDataGDOrganization
+ * @symbol: (allow-none): the new stock symbol for the organization, or %NULL
+ *
+ * Sets the #GDataGDOrganization:symbol property to @symbol.
+ *
+ * Set @symbol to %NULL to unset the property in the organization.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_gd_organization_set_symbol (GDataGDOrganization *self, const gchar *symbol)
+{
+ g_return_if_fail (GDATA_IS_GD_ORGANIZATION (self));
+
+ g_free (self->priv->symbol);
+ self->priv->symbol = g_strdup (symbol);
+ g_object_notify (G_OBJECT (self), "symbol");
+}
+
+/**
+ * gdata_gd_organization_get_location:
+ * @self: a #GDataGDOrganization
+ *
+ * Gets the #GDataGDOrganization:location property.
+ *
+ * Return value: (transfer none): the organization's location, or %NULL
+ *
+ * Since: 0.6.0
+ */
+GDataGDWhere *
+gdata_gd_organization_get_location (GDataGDOrganization *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_ORGANIZATION (self), NULL);
+ return self->priv->location;
+}
+
+/**
+ * gdata_gd_organization_set_location:
+ * @self: a #GDataGDOrganization
+ * @location: (allow-none): the new location for the organization, or %NULL
+ *
+ * Sets the #GDataGDOrganization:location property to @location.
+ *
+ * Set @location to %NULL to unset the property in the organization.
+ *
+ * Since: 0.6.0
+ */
+void
+gdata_gd_organization_set_location (GDataGDOrganization *self, GDataGDWhere *location)
+{
+ g_return_if_fail (GDATA_IS_GD_ORGANIZATION (self));
+ g_return_if_fail (location == NULL || GDATA_IS_GD_WHERE (location));
+
+ if (self->priv->location != NULL)
+ g_object_unref (self->priv->location);
+ self->priv->location = (location != NULL) ? g_object_ref (location) : NULL;
+ g_object_notify (G_OBJECT (self), "location");
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_GD_ORGANIZATION_H
+#define GDATA_GD_ORGANIZATION_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+#include <gdata/gd/gdata-gd-where.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_GD_ORGANIZATION_WORK:
+ *
+ * The relation type URI for a work organization.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_ORGANIZATION_WORK "http://schemas.google.com/g/2005#work"
+
+/**
+ * GDATA_GD_ORGANIZATION_OTHER:
+ *
+ * The relation type URI for a miscellaneous organization.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_ORGANIZATION_OTHER "http://schemas.google.com/g/2005#other"
+
+#define GDATA_TYPE_GD_ORGANIZATION (gdata_gd_organization_get_type ())
+#define GDATA_GD_ORGANIZATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_GD_ORGANIZATION, GDataGDOrganization))
+#define GDATA_GD_ORGANIZATION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_GD_ORGANIZATION, GDataGDOrganizationClass))
+#define GDATA_IS_GD_ORGANIZATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_GD_ORGANIZATION))
+#define GDATA_IS_GD_ORGANIZATION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_GD_ORGANIZATION))
+#define GDATA_GD_ORGANIZATION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_GD_ORGANIZATION, GDataGDOrganizationClass))
+
+typedef struct _GDataGDOrganizationPrivate GDataGDOrganizationPrivate;
+
+/**
+ * GDataGDOrganization:
+ *
+ * All the fields in the #GDataGDOrganization structure are private and should never be accessed directly.
+ *
+ * Since: 0.2.0
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataGDOrganizationPrivate *priv;
+} GDataGDOrganization;
+
+/**
+ * GDataGDOrganizationClass:
+ *
+ * All the fields in the #GDataGDOrganizationClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataGDOrganizationClass;
+
+GType gdata_gd_organization_get_type (void) G_GNUC_CONST;
+
+GDataGDOrganization *gdata_gd_organization_new (const gchar *name, const gchar *title, const gchar *relation_type,
+ const gchar *label, gboolean is_primary) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_gd_organization_get_name (GDataGDOrganization *self) G_GNUC_PURE;
+void gdata_gd_organization_set_name (GDataGDOrganization *self, const gchar *name);
+
+const gchar *gdata_gd_organization_get_title (GDataGDOrganization *self) G_GNUC_PURE;
+void gdata_gd_organization_set_title (GDataGDOrganization *self, const gchar *title);
+
+const gchar *gdata_gd_organization_get_relation_type (GDataGDOrganization *self) G_GNUC_PURE;
+void gdata_gd_organization_set_relation_type (GDataGDOrganization *self, const gchar *relation_type);
+
+const gchar *gdata_gd_organization_get_label (GDataGDOrganization *self) G_GNUC_PURE;
+void gdata_gd_organization_set_label (GDataGDOrganization *self, const gchar *label);
+
+gboolean gdata_gd_organization_is_primary (GDataGDOrganization *self) G_GNUC_PURE;
+void gdata_gd_organization_set_is_primary (GDataGDOrganization *self, gboolean is_primary);
+
+const gchar *gdata_gd_organization_get_department (GDataGDOrganization *self) G_GNUC_PURE;
+void gdata_gd_organization_set_department (GDataGDOrganization *self, const gchar *department);
+
+const gchar *gdata_gd_organization_get_job_description (GDataGDOrganization *self) G_GNUC_PURE;
+void gdata_gd_organization_set_job_description (GDataGDOrganization *self, const gchar *job_description);
+
+const gchar *gdata_gd_organization_get_symbol (GDataGDOrganization *self) G_GNUC_PURE;
+void gdata_gd_organization_set_symbol (GDataGDOrganization *self, const gchar *symbol);
+
+GDataGDWhere *gdata_gd_organization_get_location (GDataGDOrganization *self) G_GNUC_PURE;
+void gdata_gd_organization_set_location (GDataGDOrganization *self, GDataGDWhere *location);
+
+G_END_DECLS
+
+#endif /* !GDATA_GD_ORGANIZATION_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-gd-phone-number
+ * @short_description: GData phone number element
+ * @stability: Stable
+ * @include: gdata/gd/gdata-gd-phone-number.h
+ *
+ * #GDataGDPhoneNumber represents a "phoneNumber" element from the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdPhoneNumber">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+#include <string.h>
+
+#include "gdata-gd-phone-number.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-comparable.h"
+
+static void gdata_gd_phone_number_comparable_init (GDataComparableIface *iface);
+static void gdata_gd_phone_number_finalize (GObject *object);
+static void gdata_gd_phone_number_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_gd_phone_number_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error);
+static void pre_get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataGDPhoneNumberPrivate {
+ gchar *number;
+ gchar *uri;
+ gchar *relation_type;
+ gchar *label;
+ gboolean is_primary;
+};
+
+enum {
+ PROP_NUMBER = 1,
+ PROP_URI,
+ PROP_RELATION_TYPE,
+ PROP_LABEL,
+ PROP_IS_PRIMARY
+};
+
+G_DEFINE_TYPE_WITH_CODE (GDataGDPhoneNumber, gdata_gd_phone_number, GDATA_TYPE_PARSABLE,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_gd_phone_number_comparable_init))
+
+static void
+gdata_gd_phone_number_class_init (GDataGDPhoneNumberClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataGDPhoneNumberPrivate));
+
+ gobject_class->get_property = gdata_gd_phone_number_get_property;
+ gobject_class->set_property = gdata_gd_phone_number_set_property;
+ gobject_class->finalize = gdata_gd_phone_number_finalize;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ parsable_class->parse_xml = parse_xml;
+ parsable_class->pre_get_xml = pre_get_xml;
+ parsable_class->get_xml = get_xml;
+ parsable_class->get_namespaces = get_namespaces;
+ parsable_class->element_name = "phoneNumber";
+ parsable_class->element_namespace = "gd";
+
+ /**
+ * GDataGDPhoneNumber:number:
+ *
+ * Human-readable phone number; may be in any telephone number format.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdPhoneNumber">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_NUMBER,
+ g_param_spec_string ("number",
+ "Number", "Human-readable phone number; may be in any telephone number format.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDPhoneNumber:uri:
+ *
+ * An optional "tel URI" used to represent the number in a formal way. Useful for programmatic access, such as a VoIP/PSTN bridge.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdPhoneNumber">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_URI,
+ g_param_spec_string ("uri",
+ "URI", "An optional \"tel URI\" used to represent the number in a formal way.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDPhoneNumber:relation-type:
+ *
+ * A programmatic value that identifies the type of phone number. For example: %GDATA_GD_PHONE_NUMBER_WORK or %GDATA_GD_PHONE_NUMBER_PAGER.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdPhoneNumber">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_RELATION_TYPE,
+ g_param_spec_string ("relation-type",
+ "Relation type", "A programmatic value that identifies the type of phone number.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDPhoneNumber:label:
+ *
+ * A simple string value used to name this phone number. It allows UIs to display a label such as "Mobile", "Home", "Work", etc.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdPhoneNumber">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LABEL,
+ g_param_spec_string ("label",
+ "Label", "A simple string value used to name this phone number.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDPhoneNumber:is-primary:
+ *
+ * Indicates which phone number out of a group is primary.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdPhoneNumber">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_IS_PRIMARY,
+ g_param_spec_boolean ("is-primary",
+ "Primary?", "Indicates which phone number out of a group is primary.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static gint
+compare_with (GDataComparable *self, GDataComparable *other)
+{
+ GDataGDPhoneNumber *a = (GDataGDPhoneNumber*) self, *b = (GDataGDPhoneNumber*) other;
+ gint number_comparison, uri_comparison;
+
+ number_comparison = g_strcmp0 (a->priv->number, b->priv->number);
+ uri_comparison = g_strcmp0 (a->priv->uri, b->priv->uri);
+
+ /* NULL URIs should not compare equal. */
+ if (a->priv->uri == NULL && b->priv->uri == NULL) {
+ uri_comparison = 1;
+ }
+
+ /* If the numbers or the URIs are equal, the objects are equal. */
+ if (number_comparison == 0 || uri_comparison == 0) {
+ return 0;
+ }
+
+ return number_comparison;
+}
+
+static void
+gdata_gd_phone_number_comparable_init (GDataComparableIface *iface)
+{
+ iface->compare_with = compare_with;
+}
+
+static void
+gdata_gd_phone_number_init (GDataGDPhoneNumber *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GD_PHONE_NUMBER, GDataGDPhoneNumberPrivate);
+}
+
+static void
+gdata_gd_phone_number_finalize (GObject *object)
+{
+ GDataGDPhoneNumberPrivate *priv = GDATA_GD_PHONE_NUMBER (object)->priv;
+
+ g_free (priv->number);
+ g_free (priv->uri);
+ g_free (priv->relation_type);
+ g_free (priv->label);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_gd_phone_number_parent_class)->finalize (object);
+}
+
+static void
+gdata_gd_phone_number_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataGDPhoneNumberPrivate *priv = GDATA_GD_PHONE_NUMBER (object)->priv;
+
+ switch (property_id) {
+ case PROP_NUMBER:
+ g_value_set_string (value, priv->number);
+ break;
+ case PROP_URI:
+ g_value_set_string (value, priv->uri);
+ break;
+ case PROP_RELATION_TYPE:
+ g_value_set_string (value, priv->relation_type);
+ break;
+ case PROP_LABEL:
+ g_value_set_string (value, priv->label);
+ break;
+ case PROP_IS_PRIMARY:
+ g_value_set_boolean (value, priv->is_primary);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_gd_phone_number_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataGDPhoneNumber *self = GDATA_GD_PHONE_NUMBER (object);
+
+ switch (property_id) {
+ case PROP_NUMBER:
+ gdata_gd_phone_number_set_number (self, g_value_get_string (value));
+ break;
+ case PROP_URI:
+ gdata_gd_phone_number_set_uri (self, g_value_get_string (value));
+ break;
+ case PROP_RELATION_TYPE:
+ gdata_gd_phone_number_set_relation_type (self, g_value_get_string (value));
+ break;
+ case PROP_LABEL:
+ gdata_gd_phone_number_set_label (self, g_value_get_string (value));
+ break;
+ case PROP_IS_PRIMARY:
+ gdata_gd_phone_number_set_is_primary (self, g_value_get_boolean (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ xmlChar *number, *rel;
+ gboolean primary_bool;
+ GDataGDPhoneNumberPrivate *priv = GDATA_GD_PHONE_NUMBER (parsable)->priv;
+
+ /* Is it the primary phone number? */
+ if (gdata_parser_boolean_from_property (root_node, "primary", &primary_bool, 0, error) == FALSE)
+ return FALSE;
+
+ number = xmlNodeListGetString (doc, root_node->children, TRUE);
+ if (number == NULL || *number == '\0') {
+ xmlFree (number);
+ return gdata_parser_error_required_content_missing (root_node, error);
+ }
+
+ rel = xmlGetProp (root_node, (xmlChar*) "rel");
+ if (rel != NULL && *rel == '\0') {
+ xmlFree (rel);
+ xmlFree (number);
+ return gdata_parser_error_required_property_missing (root_node, "rel", error);
+ }
+
+ gdata_gd_phone_number_set_number (GDATA_GD_PHONE_NUMBER (parsable), (gchar*) number);
+ priv->uri = (gchar*) xmlGetProp (root_node, (xmlChar*) "uri");
+ priv->relation_type = (gchar*) rel;
+ priv->label = (gchar*) xmlGetProp (root_node, (xmlChar*) "label");
+ priv->is_primary = primary_bool;
+
+ xmlFree (number);
+
+ return TRUE;
+}
+
+static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ /* Textual content's handled in pre_parse_xml */
+ if (node->type != XML_ELEMENT_NODE)
+ return TRUE;
+
+ return GDATA_PARSABLE_CLASS (gdata_gd_phone_number_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+}
+
+static void
+pre_get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataGDPhoneNumberPrivate *priv = GDATA_GD_PHONE_NUMBER (parsable)->priv;
+
+ if (priv->uri != NULL)
+ gdata_parser_string_append_escaped (xml_string, " uri='", priv->uri, "'");
+ if (priv->relation_type != NULL)
+ gdata_parser_string_append_escaped (xml_string, " rel='", priv->relation_type, "'");
+ if (priv->label != NULL)
+ gdata_parser_string_append_escaped (xml_string, " label='", priv->label, "'");
+
+ if (priv->is_primary == TRUE)
+ g_string_append (xml_string, " primary='true'");
+ else
+ g_string_append (xml_string, " primary='false'");
+}
+
+static void
+get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ gdata_parser_string_append_escaped (xml_string, NULL, GDATA_GD_PHONE_NUMBER (parsable)->priv->number, NULL);
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ g_hash_table_insert (namespaces, (gchar*) "gd", (gchar*) "http://schemas.google.com/g/2005");
+}
+
+/**
+ * gdata_gd_phone_number_new:
+ * @number: the phone number, in human-readable format
+ * @relation_type: (allow-none): the relationship between the phone number and its owner, or %NULL
+ * @label: (allow-none): a human-readable label for the phone number, or %NULL
+ * @uri: (allow-none): a "tel URI" to represent the number formally (see
+ * <ulink type="http" url="http://www.ietf.org/rfc/rfc3966.txt">RFC 3966</ulink>), or %NULL
+ * @is_primary: %TRUE if this phone number is its owner's primary number, %FALSE otherwise
+ *
+ * Creates a new #GDataGDPhoneNumber. More information is available in the <ulink type="http"
+ * url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdPhoneNumber">GData specification</ulink>.
+ *
+ * Return value: a new #GDataGDPhoneNumber, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.2.0
+ */
+GDataGDPhoneNumber *
+gdata_gd_phone_number_new (const gchar *number, const gchar *relation_type, const gchar *label, const gchar *uri, gboolean is_primary)
+{
+ g_return_val_if_fail (number != NULL && *number != '\0', NULL);
+ g_return_val_if_fail (relation_type == NULL || *relation_type != '\0', NULL);
+ return g_object_new (GDATA_TYPE_GD_PHONE_NUMBER, "number", number, "uri", uri, "relation-type", relation_type,
+ "label", label, "is-primary", is_primary, NULL);
+}
+
+/**
+ * gdata_gd_phone_number_get_number:
+ * @self: a #GDataGDPhoneNumber
+ *
+ * Gets the #GDataGDPhoneNumber:number property.
+ *
+ * Return value: the phone number itself
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_gd_phone_number_get_number (GDataGDPhoneNumber *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_PHONE_NUMBER (self), NULL);
+ return self->priv->number;
+}
+
+/**
+ * gdata_gd_phone_number_set_number:
+ * @self: a #GDataGDPhoneNumber
+ * @number: the new phone number
+ *
+ * Sets the #GDataGDPhoneNumber:number property to @number.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_phone_number_set_number (GDataGDPhoneNumber *self, const gchar *number)
+{
+ g_return_if_fail (GDATA_IS_GD_PHONE_NUMBER (self));
+ g_return_if_fail (number != NULL && *number != '\0');
+
+ /* Trim leading and trailing whitespace from the number.
+ * See here: http://code.google.com/apis/gdata/docs/1.0/elements.html#gdPhoneNumber */
+ g_free (self->priv->number);
+ self->priv->number = gdata_parser_utf8_trim_whitespace (number);
+ g_object_notify (G_OBJECT (self), "number");
+}
+
+/**
+ * gdata_gd_phone_number_get_uri:
+ * @self: a #GDataGDPhoneNumber
+ *
+ * Gets the #GDataGDPhoneNumber:uri property.
+ *
+ * Return value: the phone number's URI, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_gd_phone_number_get_uri (GDataGDPhoneNumber *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_PHONE_NUMBER (self), NULL);
+ return self->priv->uri;
+}
+
+/**
+ * gdata_gd_phone_number_set_uri:
+ * @self: a #GDataGDPhoneNumber
+ * @uri: (allow-none): the new URI for the phone number, or %NULL
+ *
+ * Sets the #GDataGDPhoneNumber:uri property to @uri.
+ *
+ * Set @uri to %NULL to unset the property in the phone number.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_phone_number_set_uri (GDataGDPhoneNumber *self, const gchar *uri)
+{
+ g_return_if_fail (GDATA_IS_GD_PHONE_NUMBER (self));
+
+ g_free (self->priv->uri);
+ self->priv->uri = g_strdup (uri);
+ g_object_notify (G_OBJECT (self), "uri");
+}
+
+/**
+ * gdata_gd_phone_number_get_relation_type:
+ * @self: a #GDataGDPhoneNumber
+ *
+ * Gets the #GDataGDPhoneNumber:relation-type property.
+ *
+ * Return value: the phone number's relation type, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_gd_phone_number_get_relation_type (GDataGDPhoneNumber *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_PHONE_NUMBER (self), NULL);
+ return self->priv->relation_type;
+}
+
+/**
+ * gdata_gd_phone_number_set_relation_type:
+ * @self: a #GDataGDPhoneNumber
+ * @relation_type: (allow-none): the new relation type for the phone number, or %NULL
+ *
+ * Sets the #GDataGDPhoneNumber:relation-type property to @relation_type.
+ *
+ * Set @relation_type to %NULL to unset the property in the phone number.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_phone_number_set_relation_type (GDataGDPhoneNumber *self, const gchar *relation_type)
+{
+ g_return_if_fail (GDATA_IS_GD_PHONE_NUMBER (self));
+ g_return_if_fail (relation_type == NULL || *relation_type != '\0');
+
+ g_free (self->priv->relation_type);
+ self->priv->relation_type = g_strdup (relation_type);
+ g_object_notify (G_OBJECT (self), "relation-type");
+}
+
+/**
+ * gdata_gd_phone_number_get_label:
+ * @self: a #GDataGDPhoneNumber
+ *
+ * Gets the #GDataGDPhoneNumber:label property.
+ *
+ * Return value: the phone number's label, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_gd_phone_number_get_label (GDataGDPhoneNumber *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_PHONE_NUMBER (self), NULL);
+ return self->priv->label;
+}
+
+/**
+ * gdata_gd_phone_number_set_label:
+ * @self: a #GDataGDPhoneNumber
+ * @label: (allow-none): the new label for the phone number, or %NULL
+ *
+ * Sets the #GDataGDPhoneNumber:label property to @label.
+ *
+ * Set @label to %NULL to unset the property in the phone number.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_phone_number_set_label (GDataGDPhoneNumber *self, const gchar *label)
+{
+ g_return_if_fail (GDATA_IS_GD_PHONE_NUMBER (self));
+
+ g_free (self->priv->label);
+ self->priv->label = g_strdup (label);
+ g_object_notify (G_OBJECT (self), "label");
+}
+
+/**
+ * gdata_gd_phone_number_is_primary:
+ * @self: a #GDataGDPhoneNumber
+ *
+ * Gets the #GDataGDPhoneNumber:is-primary property.
+ *
+ * Return value: %TRUE if this is the primary phone number, %FALSE otherwise
+ *
+ * Since: 0.4.0
+ */
+gboolean
+gdata_gd_phone_number_is_primary (GDataGDPhoneNumber *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_PHONE_NUMBER (self), FALSE);
+ return self->priv->is_primary;
+}
+
+/**
+ * gdata_gd_phone_number_set_is_primary:
+ * @self: a #GDataGDPhoneNumber
+ * @is_primary: %TRUE if this is the primary phone number, %FALSE otherwise
+ *
+ * Sets the #GDataGDPhoneNumber:is-primary property to @is_primary.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_phone_number_set_is_primary (GDataGDPhoneNumber *self, gboolean is_primary)
+{
+ g_return_if_fail (GDATA_IS_GD_PHONE_NUMBER (self));
+
+ self->priv->is_primary = is_primary;
+ g_object_notify (G_OBJECT (self), "is-primary");
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_GD_PHONE_NUMBER_H
+#define GDATA_GD_PHONE_NUMBER_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_GD_PHONE_NUMBER_ASSISTANT:
+ *
+ * The relation type URI for the phone number of an assistant.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_PHONE_NUMBER_ASSISTANT "http://schemas.google.com/g/2005#assistant"
+
+/**
+ * GDATA_GD_PHONE_NUMBER_CALLBACK:
+ *
+ * The relation type URI for the phone number of a callback service.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_PHONE_NUMBER_CALLBACK "http://schemas.google.com/g/2005#callback"
+
+/**
+ * GDATA_GD_PHONE_NUMBER_CAR:
+ *
+ * The relation type URI for the phone number of a car phone.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_PHONE_NUMBER_CAR "http://schemas.google.com/g/2005#car"
+
+/**
+ * GDATA_GD_PHONE_NUMBER_COMPANY_MAIN:
+ *
+ * The relation type URI for the main phone number of a company.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_PHONE_NUMBER_COMPANY_MAIN "http://schemas.google.com/g/2005#company_main"
+
+/**
+ * GDATA_GD_PHONE_NUMBER_FAX:
+ *
+ * The relation type URI for the phone number of a fax machine.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_PHONE_NUMBER_FAX "http://schemas.google.com/g/2005#fax"
+
+/**
+ * GDATA_GD_PHONE_NUMBER_HOME:
+ *
+ * The relation type URI for a home phone number.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_PHONE_NUMBER_HOME "http://schemas.google.com/g/2005#home"
+
+/**
+ * GDATA_GD_PHONE_NUMBER_HOME_FAX:
+ *
+ * The relation type URI for the phone number of a home fax machine.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_PHONE_NUMBER_HOME_FAX "http://schemas.google.com/g/2005#home_fax"
+
+/**
+ * GDATA_GD_PHONE_NUMBER_ISDN:
+ *
+ * The relation type URI for the phone number of an ISDN phone.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_PHONE_NUMBER_ISDN "http://schemas.google.com/g/2005#isdn"
+
+/**
+ * GDATA_GD_PHONE_NUMBER_MAIN:
+ *
+ * The relation type URI for the main phone number of a person.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_PHONE_NUMBER_MAIN "http://schemas.google.com/g/2005#main"
+
+/**
+ * GDATA_GD_PHONE_NUMBER_MOBILE:
+ *
+ * The relation type URI for the phone number of a mobile phone.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_PHONE_NUMBER_MOBILE "http://schemas.google.com/g/2005#mobile"
+
+/**
+ * GDATA_GD_PHONE_NUMBER_OTHER:
+ *
+ * The relation type URI for a miscellaneous phone number.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_PHONE_NUMBER_OTHER "http://schemas.google.com/g/2005#other"
+
+/**
+ * GDATA_GD_PHONE_NUMBER_OTHER_FAX:
+ *
+ * The relation type URI for a miscellaneous fax machine's phone number.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_PHONE_NUMBER_OTHER_FAX "http://schemas.google.com/g/2005#other_fax"
+
+/**
+ * GDATA_GD_PHONE_NUMBER_PAGER:
+ *
+ * The relation type URI for the phone number of a pager.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_PHONE_NUMBER_PAGER "http://schemas.google.com/g/2005#pager"
+
+/**
+ * GDATA_GD_PHONE_NUMBER_RADIO:
+ *
+ * The relation type URI for the phone number of a radio phone.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_PHONE_NUMBER_RADIO "http://schemas.google.com/g/2005#radio"
+
+/**
+ * GDATA_GD_PHONE_NUMBER_TELEX:
+ *
+ * The relation type URI for the phone number of a telex machine.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_PHONE_NUMBER_TELEX "http://schemas.google.com/g/2005#telex"
+
+/**
+ * GDATA_GD_PHONE_NUMBER_TTY_TDD:
+ *
+ * The relation type URI for the phone number of a TTY TTD.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_PHONE_NUMBER_TTY_TDD "http://schemas.google.com/g/2005#tty_tdd"
+
+/**
+ * GDATA_GD_PHONE_NUMBER_WORK:
+ *
+ * The relation type URI for the phone number of a work place.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_PHONE_NUMBER_WORK "http://schemas.google.com/g/2005#work"
+
+/**
+ * GDATA_GD_PHONE_NUMBER_WORK_FAX:
+ *
+ * The relation type URI for the phone number of a work fax machine.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_PHONE_NUMBER_WORK_FAX "http://schemas.google.com/g/2005#work_fax"
+
+/**
+ * GDATA_GD_PHONE_NUMBER_WORK_MOBILE:
+ *
+ * The relation type URI for the phone number of a work mobile phone.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_PHONE_NUMBER_WORK_MOBILE "http://schemas.google.com/g/2005#work_mobile"
+
+/**
+ * GDATA_GD_PHONE_NUMBER_WORK_PAGER:
+ *
+ * The relation type URI for the phone number of a work pager.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_PHONE_NUMBER_WORK_PAGER "http://schemas.google.com/g/2005#work_pager"
+
+#define GDATA_TYPE_GD_PHONE_NUMBER (gdata_gd_phone_number_get_type ())
+#define GDATA_GD_PHONE_NUMBER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_GD_PHONE_NUMBER, GDataGDPhoneNumber))
+#define GDATA_GD_PHONE_NUMBER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_GD_PHONE_NUMBER, GDataGDPhoneNumberClass))
+#define GDATA_IS_GD_PHONE_NUMBER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_GD_PHONE_NUMBER))
+#define GDATA_IS_GD_PHONE_NUMBER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_GD_PHONE_NUMBER))
+#define GDATA_GD_PHONE_NUMBER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_GD_PHONE_NUMBER, GDataGDPhoneNumberClass))
+
+typedef struct _GDataGDPhoneNumberPrivate GDataGDPhoneNumberPrivate;
+
+/**
+ * GDataGDPhoneNumber:
+ *
+ * All the fields in the #GDataGDPhoneNumber structure are private and should never be accessed directly.
+ *
+ * Since: 0.2.0
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataGDPhoneNumberPrivate *priv;
+} GDataGDPhoneNumber;
+
+/**
+ * GDataGDPhoneNumberClass:
+ *
+ * All the fields in the #GDataGDPhoneNumberClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataGDPhoneNumberClass;
+
+GType gdata_gd_phone_number_get_type (void) G_GNUC_CONST;
+
+GDataGDPhoneNumber *gdata_gd_phone_number_new (const gchar *number, const gchar *relation_type, const gchar *label, const gchar *uri,
+ gboolean is_primary) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_gd_phone_number_get_number (GDataGDPhoneNumber *self) G_GNUC_PURE;
+void gdata_gd_phone_number_set_number (GDataGDPhoneNumber *self, const gchar *number);
+
+const gchar *gdata_gd_phone_number_get_uri (GDataGDPhoneNumber *self) G_GNUC_PURE;
+void gdata_gd_phone_number_set_uri (GDataGDPhoneNumber *self, const gchar *uri);
+
+const gchar *gdata_gd_phone_number_get_relation_type (GDataGDPhoneNumber *self) G_GNUC_PURE;
+void gdata_gd_phone_number_set_relation_type (GDataGDPhoneNumber *self, const gchar *relation_type);
+
+const gchar *gdata_gd_phone_number_get_label (GDataGDPhoneNumber *self) G_GNUC_PURE;
+void gdata_gd_phone_number_set_label (GDataGDPhoneNumber *self, const gchar *label);
+
+gboolean gdata_gd_phone_number_is_primary (GDataGDPhoneNumber *self) G_GNUC_PURE;
+void gdata_gd_phone_number_set_is_primary (GDataGDPhoneNumber *self, gboolean is_primary);
+
+G_END_DECLS
+
+#endif /* !GDATA_GD_PHONE_NUMBER_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-gd-postal-address
+ * @short_description: GData postal address element
+ * @stability: Stable
+ * @include: gdata/gd/gdata-gd-postal-address.h
+ *
+ * #GDataGDPostalAddress represents a "structuredPostalAddress" element from the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdStructuredPostalAddress">GData specification</ulink>.
+ * Note that it does not represent a simple "postalAddress" element, as "structuredPostalAddress" is now used wherever possible in the GData API.
+ *
+ * Since: 0.4.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+#include <string.h>
+
+#include "gdata-gd-postal-address.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-comparable.h"
+
+static void gdata_gd_postal_address_comparable_init (GDataComparableIface *iface);
+static void gdata_gd_postal_address_finalize (GObject *object);
+static void gdata_gd_postal_address_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_gd_postal_address_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error);
+static void pre_get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataGDPostalAddressPrivate {
+ gchar *formatted_address;
+ gchar *relation_type;
+ gchar *label;
+ gboolean is_primary;
+ gchar *mail_class;
+ gchar *usage;
+ gchar *agent;
+ gchar *house_name;
+ gchar *street;
+ gchar *po_box;
+ gchar *neighborhood;
+ gchar *city;
+ gchar *subregion;
+ gchar *region;
+ gchar *postcode;
+ gchar *country;
+ gchar *country_code;
+};
+
+enum {
+ PROP_FORMATTED_ADDRESS = 1,
+ PROP_RELATION_TYPE,
+ PROP_LABEL,
+ PROP_IS_PRIMARY,
+ PROP_MAIL_CLASS,
+ PROP_USAGE,
+ PROP_AGENT,
+ PROP_HOUSE_NAME,
+ PROP_STREET,
+ PROP_PO_BOX,
+ PROP_NEIGHBORHOOD,
+ PROP_CITY,
+ PROP_SUBREGION,
+ PROP_REGION,
+ PROP_POSTCODE,
+ PROP_COUNTRY,
+ PROP_COUNTRY_CODE
+};
+
+G_DEFINE_TYPE_WITH_CODE (GDataGDPostalAddress, gdata_gd_postal_address, GDATA_TYPE_PARSABLE,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_gd_postal_address_comparable_init))
+
+static void
+gdata_gd_postal_address_class_init (GDataGDPostalAddressClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataGDPostalAddressPrivate));
+
+ gobject_class->get_property = gdata_gd_postal_address_get_property;
+ gobject_class->set_property = gdata_gd_postal_address_set_property;
+ gobject_class->finalize = gdata_gd_postal_address_finalize;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ parsable_class->parse_xml = parse_xml;
+ parsable_class->pre_get_xml = pre_get_xml;
+ parsable_class->get_xml = get_xml;
+ parsable_class->get_namespaces = get_namespaces;
+ parsable_class->element_name = "structuredPostalAddress";
+ parsable_class->element_namespace = "gd";
+
+ /**
+ * GDataGDPostalAddress:address:
+ *
+ * The postal address itself, formatted and unstructured. It is preferred to use the other, structured properties rather than this one.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdStructuredPostalAddress">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_FORMATTED_ADDRESS,
+ g_param_spec_string ("address",
+ "Address", "The postal address itself.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDPostalAddress:relation-type:
+ *
+ * A programmatic value that identifies the type of postal address. For example: %GDATA_GD_POSTAL_ADDRESS_WORK or
+ * %GDATA_GD_POSTAL_ADDRESS_OTHER.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdStructuredPostalAddress">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_RELATION_TYPE,
+ g_param_spec_string ("relation-type",
+ "Relation type", "A programmatic value that identifies the type of postal address.",
+ GDATA_GD_POSTAL_ADDRESS_WORK,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDPostalAddress:label:
+ *
+ * A simple string value used to name this postal address. It allows UIs to display a label such as "Work", "Personal", "Preferred", etc.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdStructuredPostalAddress">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LABEL,
+ g_param_spec_string ("label",
+ "Label", "A simple string value used to name this postal address.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDPostalAddress:is-primary:
+ *
+ * Indicates which postal address out of a group is primary.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdStructuredPostalAddress">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_IS_PRIMARY,
+ g_param_spec_boolean ("is-primary",
+ "Primary?", "Indicates which postal address out of a group is primary.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDPostalAddress:mail-class:
+ *
+ * Classes of mail accepted at this address. For example: %GDATA_GD_MAIL_CLASS_LETTERS or %GDATA_GD_MAIL_CLASS_BOTH.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdStructuredPostalAddress">GData specification</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_MAIL_CLASS,
+ g_param_spec_string ("mail-class",
+ "Mail class", "Classes of mail accepted at this address.",
+ GDATA_GD_MAIL_CLASS_BOTH,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDPostalAddress:usage:
+ *
+ * The context in which this address can be used. For example: %GDATA_GD_ADDRESS_USAGE_GENERAL or %GDATA_GD_ADDRESS_USAGE_LOCAL.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdStructuredPostalAddress">GData specification</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_USAGE,
+ g_param_spec_string ("usage",
+ "Usage", "The context in which this address can be used.",
+ GDATA_GD_ADDRESS_USAGE_GENERAL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDPostalAddress:agent:
+ *
+ * The agent who actually receives the mail. Used in work addresses. Also for "in care of" or "c/o".
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdStructuredPostalAddress">GData specification</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_AGENT,
+ g_param_spec_string ("agent",
+ "Agent", "The agent who actually receives the mail.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDPostalAddress:house-name:
+ *
+ * Used in places where houses or buildings have names (and not necessarily numbers).
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdStructuredPostalAddress">GData specification</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_HOUSE_NAME,
+ g_param_spec_string ("house-name",
+ "House name", "Used in places where houses or buildings have names (and not numbers).",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDPostalAddress:street:
+ *
+ * Can be street, avenue, road, etc. This element also includes the house number and room/apartment/flat/floor number.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdStructuredPostalAddress">GData specification</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_STREET,
+ g_param_spec_string ("street",
+ "Street", "Can be street, avenue, road, etc.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDPostalAddress:po-box:
+ *
+ * Covers actual P.O. boxes, drawers, locked bags, etc. This is usually but not always mutually exclusive with #GDataGDPostalAddress:street.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdStructuredPostalAddress">GData specification</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_PO_BOX,
+ g_param_spec_string ("po-box",
+ "PO box", "Covers actual P.O. boxes, drawers, locked bags, etc.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDPostalAddress:neighborhood:
+ *
+ * This is used to disambiguate a street address when a city contains more than one street with the same name, or to specify a small place
+ * whose mail is routed through a larger postal town. In China it could be a county or a minor city.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdStructuredPostalAddress">GData specification</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_NEIGHBORHOOD,
+ g_param_spec_string ("neighborhood",
+ "Neighborhood", "This is used to disambiguate a street address.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDPostalAddress:city:
+ *
+ * Can be city, village, town, borough, etc. This is the postal town and not necessarily the place of residence or place of business.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdStructuredPostalAddress">GData specification</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_CITY,
+ g_param_spec_string ("city",
+ "City", "Can be city, village, town, borough, etc.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDPostalAddress:subregion:
+ *
+ * Handles administrative districts such as U.S. or U.K. counties that are not used for mail addressing purposes.
+ * Subregion is not intended for delivery addresses.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdStructuredPostalAddress">GData specification</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SUBREGION,
+ g_param_spec_string ("subregion",
+ "Subregion", "Handles administrative districts such as U.S. or U.K. counties.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDPostalAddress:region:
+ *
+ * A state, province, county (in Ireland), Land (in Germany), departement (in France), etc.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdStructuredPostalAddress">GData specification</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_REGION,
+ g_param_spec_string ("region",
+ "Region", "A state, province, county, Land, departement, etc.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDPostalAddress:postcode:
+ *
+ * Postal code. Usually country-wide, but sometimes specific to the city (e.g. "2" in "Dublin 2, Ireland" addresses).
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdStructuredPostalAddress">GData specification</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_POSTCODE,
+ g_param_spec_string ("postcode",
+ "Postcode", "Postal code.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDPostalAddress:country:
+ *
+ * The name of the country. Since this is paired with #GDataGDPostalAddress:country-code, they must both be set with
+ * gdata_gd_postal_address_set_country().
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdStructuredPostalAddress">GData specification</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_COUNTRY,
+ g_param_spec_string ("country",
+ "Country", "The name of the country.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDPostalAddress:country-code:
+ *
+ * The ISO 3166-1 alpha-2 country code for the country in #GDataGDPostalAddress:country. Since this is paired with
+ * #GDataGDPostalAddress:country, they must both be set with gdata_gd_postal_address_set_country().
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdStructuredPostalAddress">GData specification</ulink>
+ * or <ulink type="http" url="http://www.iso.org/iso/iso-3166-1_decoding_table">ISO 3166-1 alpha-2</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_COUNTRY_CODE,
+ g_param_spec_string ("country-code",
+ "Country code", "The ISO 3166-1 alpha-2 country code for the country.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+}
+
+static gint
+compare_with (GDataComparable *self, GDataComparable *other)
+{
+ GDataGDPostalAddressPrivate *a = ((GDataGDPostalAddress*) self)->priv, *b = ((GDataGDPostalAddress*) other)->priv;
+
+ if (g_strcmp0 (a->street, b->street) == 0 && g_strcmp0 (a->po_box, b->po_box) == 0 &&
+ g_strcmp0 (a->city, b->city) == 0 && g_strcmp0 (a->postcode, b->postcode) == 0)
+ return 0;
+ return 1;
+}
+
+static void
+gdata_gd_postal_address_comparable_init (GDataComparableIface *iface)
+{
+ iface->compare_with = compare_with;
+}
+
+static void
+gdata_gd_postal_address_init (GDataGDPostalAddress *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GD_POSTAL_ADDRESS, GDataGDPostalAddressPrivate);
+}
+
+static void
+gdata_gd_postal_address_finalize (GObject *object)
+{
+ GDataGDPostalAddressPrivate *priv = GDATA_GD_POSTAL_ADDRESS (object)->priv;
+
+ g_free (priv->formatted_address);
+ g_free (priv->relation_type);
+ g_free (priv->label);
+ g_free (priv->mail_class);
+ g_free (priv->usage);
+ g_free (priv->agent);
+ g_free (priv->house_name);
+ g_free (priv->street);
+ g_free (priv->po_box);
+ g_free (priv->neighborhood);
+ g_free (priv->city);
+ g_free (priv->subregion);
+ g_free (priv->region);
+ g_free (priv->postcode);
+ g_free (priv->country);
+ g_free (priv->country_code);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_gd_postal_address_parent_class)->finalize (object);
+}
+
+static void
+gdata_gd_postal_address_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataGDPostalAddressPrivate *priv = GDATA_GD_POSTAL_ADDRESS (object)->priv;
+
+ switch (property_id) {
+ case PROP_FORMATTED_ADDRESS:
+ g_value_set_string (value, priv->formatted_address);
+ break;
+ case PROP_RELATION_TYPE:
+ g_value_set_string (value, priv->relation_type);
+ break;
+ case PROP_LABEL:
+ g_value_set_string (value, priv->label);
+ break;
+ case PROP_IS_PRIMARY:
+ g_value_set_boolean (value, priv->is_primary);
+ break;
+ case PROP_MAIL_CLASS:
+ g_value_set_string (value, priv->mail_class);
+ break;
+ case PROP_USAGE:
+ g_value_set_string (value, priv->usage);
+ break;
+ case PROP_AGENT:
+ g_value_set_string (value, priv->agent);
+ break;
+ case PROP_HOUSE_NAME:
+ g_value_set_string (value, priv->house_name);
+ break;
+ case PROP_STREET:
+ g_value_set_string (value, priv->street);
+ break;
+ case PROP_PO_BOX:
+ g_value_set_string (value, priv->po_box);
+ break;
+ case PROP_NEIGHBORHOOD:
+ g_value_set_string (value, priv->neighborhood);
+ break;
+ case PROP_CITY:
+ g_value_set_string (value, priv->city);
+ break;
+ case PROP_SUBREGION:
+ g_value_set_string (value, priv->subregion);
+ break;
+ case PROP_REGION:
+ g_value_set_string (value, priv->region);
+ break;
+ case PROP_POSTCODE:
+ g_value_set_string (value, priv->postcode);
+ break;
+ case PROP_COUNTRY:
+ g_value_set_string (value, priv->country);
+ break;
+ case PROP_COUNTRY_CODE:
+ g_value_set_string (value, priv->country_code);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_gd_postal_address_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataGDPostalAddress *self = GDATA_GD_POSTAL_ADDRESS (object);
+
+ switch (property_id) {
+ case PROP_FORMATTED_ADDRESS:
+ gdata_gd_postal_address_set_address (self, g_value_get_string (value));
+ break;
+ case PROP_RELATION_TYPE:
+ gdata_gd_postal_address_set_relation_type (self, g_value_get_string (value));
+ break;
+ case PROP_LABEL:
+ gdata_gd_postal_address_set_label (self, g_value_get_string (value));
+ break;
+ case PROP_IS_PRIMARY:
+ gdata_gd_postal_address_set_is_primary (self, g_value_get_boolean (value));
+ break;
+ case PROP_MAIL_CLASS:
+ gdata_gd_postal_address_set_mail_class (self, g_value_get_string (value));
+ break;
+ case PROP_USAGE:
+ gdata_gd_postal_address_set_usage (self, g_value_get_string (value));
+ break;
+ case PROP_AGENT:
+ gdata_gd_postal_address_set_agent (self, g_value_get_string (value));
+ break;
+ case PROP_HOUSE_NAME:
+ gdata_gd_postal_address_set_house_name (self, g_value_get_string (value));
+ break;
+ case PROP_STREET:
+ gdata_gd_postal_address_set_street (self, g_value_get_string (value));
+ break;
+ case PROP_PO_BOX:
+ gdata_gd_postal_address_set_po_box (self, g_value_get_string (value));
+ break;
+ case PROP_NEIGHBORHOOD:
+ gdata_gd_postal_address_set_neighborhood (self, g_value_get_string (value));
+ break;
+ case PROP_CITY:
+ gdata_gd_postal_address_set_city (self, g_value_get_string (value));
+ break;
+ case PROP_SUBREGION:
+ gdata_gd_postal_address_set_subregion (self, g_value_get_string (value));
+ break;
+ case PROP_REGION:
+ gdata_gd_postal_address_set_region (self, g_value_get_string (value));
+ break;
+ case PROP_POSTCODE:
+ gdata_gd_postal_address_set_postcode (self, g_value_get_string (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ xmlChar *rel;
+ gboolean primary_bool;
+ GDataGDPostalAddressPrivate *priv = GDATA_GD_POSTAL_ADDRESS (parsable)->priv;
+
+ /* Is it the primary postal address? */
+ if (gdata_parser_boolean_from_property (root_node, "primary", &primary_bool, 0, error) == FALSE)
+ return FALSE;
+
+ rel = xmlGetProp (root_node, (xmlChar*) "rel");
+ if (rel != NULL && *rel == '\0') {
+ xmlFree (rel);
+ return gdata_parser_error_required_property_missing (root_node, "rel", error);
+ }
+
+ priv->relation_type = (gchar*) rel;
+ priv->label = (gchar*) xmlGetProp (root_node, (xmlChar*) "label");
+ priv->mail_class = (gchar*) xmlGetProp (root_node, (xmlChar*) "mailClass");
+ priv->usage = (gchar*) xmlGetProp (root_node, (xmlChar*) "usage");
+ priv->is_primary = primary_bool;
+
+ return TRUE;
+}
+
+static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ gboolean success;
+ GDataGDPostalAddressPrivate *priv = GDATA_GD_POSTAL_ADDRESS (parsable)->priv;
+
+ if (gdata_parser_is_namespace (node, "http://schemas.google.com/g/2005") == TRUE) {
+ if (gdata_parser_string_from_element (node, "agent", P_NO_DUPES, &(priv->agent), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "housename", P_NO_DUPES, &(priv->house_name), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "pobox", P_NO_DUPES, &(priv->po_box), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "street", P_NO_DUPES, &(priv->street), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "neighborhood", P_NO_DUPES, &(priv->neighborhood), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "city", P_NO_DUPES, &(priv->city), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "subregion", P_NO_DUPES, &(priv->subregion), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "region", P_NO_DUPES, &(priv->region), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "postcode", P_NO_DUPES, &(priv->postcode), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "formattedAddress", P_NO_DUPES, &(priv->formatted_address), &success, error) == TRUE) {
+ return success;
+ } else if (xmlStrcmp (node->name, (xmlChar*) "country") == 0) {
+ /* gd:country */
+ priv->country_code = (gchar*) xmlGetProp (node, (xmlChar*) "code");
+ priv->country = (gchar*) xmlNodeListGetString (doc, node->children, TRUE);
+
+ return TRUE;
+ }
+ }
+
+ return GDATA_PARSABLE_CLASS (gdata_gd_postal_address_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+}
+
+static void
+pre_get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataGDPostalAddressPrivate *priv = GDATA_GD_POSTAL_ADDRESS (parsable)->priv;
+
+ if (priv->relation_type != NULL)
+ gdata_parser_string_append_escaped (xml_string, " rel='", priv->relation_type, "'");
+ if (priv->label != NULL)
+ gdata_parser_string_append_escaped (xml_string, " label='", priv->label, "'");
+ if (priv->mail_class != NULL)
+ gdata_parser_string_append_escaped (xml_string, " mailClass='", priv->mail_class, "'");
+ if (priv->usage != NULL)
+ gdata_parser_string_append_escaped (xml_string, " usage='", priv->usage, "'");
+
+ if (priv->is_primary == TRUE)
+ g_string_append (xml_string, " primary='true'");
+ else
+ g_string_append (xml_string, " primary='false'");
+}
+
+static void
+get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataGDPostalAddressPrivate *priv = GDATA_GD_POSTAL_ADDRESS (parsable)->priv;
+
+#define OUTPUT_STRING_ELEMENT(E,F) \
+ if (priv->F != NULL) \
+ gdata_parser_string_append_escaped (xml_string, "<gd:" E ">", priv->F, "</gd:" E ">");
+
+ OUTPUT_STRING_ELEMENT ("agent", agent)
+ OUTPUT_STRING_ELEMENT ("housename", house_name)
+ OUTPUT_STRING_ELEMENT ("street", street)
+ OUTPUT_STRING_ELEMENT ("pobox", po_box)
+ OUTPUT_STRING_ELEMENT ("neighborhood", neighborhood)
+ OUTPUT_STRING_ELEMENT ("city", city)
+ OUTPUT_STRING_ELEMENT ("subregion", subregion)
+ OUTPUT_STRING_ELEMENT ("region", region)
+ OUTPUT_STRING_ELEMENT ("postcode", postcode)
+
+ if (priv->country != NULL) {
+ if (priv->country_code != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<gd:country code='", priv->country_code, "'>");
+ else
+ g_string_append (xml_string, "<gd:country>");
+ gdata_parser_string_append_escaped (xml_string, NULL, priv->country, "</gd:country>");
+ }
+
+ OUTPUT_STRING_ELEMENT ("formattedAddress", formatted_address)
+
+#undef OUTPUT_STRING_ELEMENT
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ g_hash_table_insert (namespaces, (gchar*) "gd", (gchar*) "http://schemas.google.com/g/2005");
+}
+
+/**
+ * gdata_gd_postal_address_new:
+ * @relation_type: (allow-none): the relationship between the address and its owner, or %NULL
+ * @label: (allow-none): a human-readable label for the address, or %NULL
+ * @is_primary: %TRUE if this phone number is its owner's primary number, %FALSE otherwise
+ *
+ * Creates a new #GDataGDPostalAddress. More information is available in the <ulink type="http"
+ * url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdStructuredPostalAddress">GData specification</ulink>.
+ *
+ * Return value: a new #GDataGDPostalAddress, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.2.0
+ */
+GDataGDPostalAddress *
+gdata_gd_postal_address_new (const gchar *relation_type, const gchar *label, gboolean is_primary)
+{
+ g_return_val_if_fail (relation_type == NULL || *relation_type != '\0', NULL);
+ return g_object_new (GDATA_TYPE_GD_POSTAL_ADDRESS, "relation-type", relation_type, "label", label, "is-primary", is_primary, NULL);
+}
+
+/**
+ * gdata_gd_postal_address_get_address:
+ * @self: a #GDataGDPostalAddress
+ *
+ * Gets the #GDataGDPostalAddress:address property.
+ *
+ * Return value: the postal address itself, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_gd_postal_address_get_address (GDataGDPostalAddress *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self), NULL);
+ return self->priv->formatted_address;
+}
+
+/**
+ * gdata_gd_postal_address_set_address:
+ * @self: a #GDataGDPostalAddress
+ * @address: (allow-none): the new postal address, or %NULL
+ *
+ * Sets the #GDataGDPostalAddress:address property to @address.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_postal_address_set_address (GDataGDPostalAddress *self, const gchar *address)
+{
+ g_return_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self));
+
+ /* Trim leading and trailing whitespace from the address.
+ * See here: http://code.google.com/apis/gdata/docs/1.0/elements.html#gdPostalAddress */
+ g_free (self->priv->formatted_address);
+ self->priv->formatted_address = gdata_parser_utf8_trim_whitespace (address);
+ g_object_notify (G_OBJECT (self), "address");
+}
+
+/**
+ * gdata_gd_postal_address_get_relation_type:
+ * @self: a #GDataGDPostalAddress
+ *
+ * Gets the #GDataGDPostalAddress:relation-type property.
+ *
+ * Return value: the postal address' relation type, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_gd_postal_address_get_relation_type (GDataGDPostalAddress *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self), NULL);
+ return self->priv->relation_type;
+}
+
+/**
+ * gdata_gd_postal_address_set_relation_type:
+ * @self: a #GDataGDPostalAddress
+ * @relation_type: (allow-none): the new relation type for the postal_address, or %NULL
+ *
+ * Sets the #GDataGDPostalAddress:relation-type property to @relation_type.
+ *
+ * Set @relation_type to %NULL to unset the property in the postal address.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_postal_address_set_relation_type (GDataGDPostalAddress *self, const gchar *relation_type)
+{
+ g_return_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self));
+ g_return_if_fail (relation_type == NULL || *relation_type != '\0');
+
+ g_free (self->priv->relation_type);
+ self->priv->relation_type = g_strdup (relation_type);
+ g_object_notify (G_OBJECT (self), "relation-type");
+}
+
+/**
+ * gdata_gd_postal_address_get_label:
+ * @self: a #GDataGDPostalAddress
+ *
+ * Gets the #GDataGDPostalAddress:label property.
+ *
+ * Return value: the postal address' label, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_gd_postal_address_get_label (GDataGDPostalAddress *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self), NULL);
+ return self->priv->label;
+}
+
+/**
+ * gdata_gd_postal_address_set_label:
+ * @self: a #GDataGDPostalAddress
+ * @label: (allow-none): the new label for the postal address, or %NULL
+ *
+ * Sets the #GDataGDPostalAddress:label property to @label.
+ *
+ * Set @label to %NULL to unset the property in the postal address.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_postal_address_set_label (GDataGDPostalAddress *self, const gchar *label)
+{
+ g_return_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self));
+
+ g_free (self->priv->label);
+ self->priv->label = g_strdup (label);
+ g_object_notify (G_OBJECT (self), "label");
+}
+
+/**
+ * gdata_gd_postal_address_is_primary:
+ * @self: a #GDataGDPostalAddress
+ *
+ * Gets the #GDataGDPostalAddress:is-primary property.
+ *
+ * Return value: %TRUE if this is the primary postal address, %FALSE otherwise
+ *
+ * Since: 0.4.0
+ */
+gboolean
+gdata_gd_postal_address_is_primary (GDataGDPostalAddress *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self), FALSE);
+ return self->priv->is_primary;
+}
+
+/**
+ * gdata_gd_postal_address_set_is_primary:
+ * @self: a #GDataGDPostalAddress
+ * @is_primary: %TRUE if this is the primary postal address, %FALSE otherwise
+ *
+ * Sets the #GDataGDPostalAddress:is-primary property to @is_primary.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_postal_address_set_is_primary (GDataGDPostalAddress *self, gboolean is_primary)
+{
+ g_return_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self));
+
+ self->priv->is_primary = is_primary;
+ g_object_notify (G_OBJECT (self), "is-primary");
+}
+
+/**
+ * gdata_gd_postal_address_get_mail_class:
+ * @self: a #GDataGDPostalAddress
+ *
+ * Gets the #GDataGDPostalAddress:mail-class property.
+ *
+ * Return value: the postal address' mail class, or %NULL
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_gd_postal_address_get_mail_class (GDataGDPostalAddress *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self), NULL);
+ return self->priv->mail_class;
+}
+
+/**
+ * gdata_gd_postal_address_set_mail_class:
+ * @self: a #GDataGDPostalAddress
+ * @mail_class: (allow-none): the new mail class for the postal address, or %NULL
+ *
+ * Sets the #GDataGDPostalAddress:mail-class property to @mail_class.
+ *
+ * Set @mail_class to %NULL to unset the property in the postal address.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_gd_postal_address_set_mail_class (GDataGDPostalAddress *self, const gchar *mail_class)
+{
+ g_return_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self));
+ g_return_if_fail (mail_class == NULL || *mail_class != '\0');
+
+ g_free (self->priv->mail_class);
+ self->priv->mail_class = g_strdup (mail_class);
+ g_object_notify (G_OBJECT (self), "mail-class");
+}
+
+/**
+ * gdata_gd_postal_address_get_usage:
+ * @self: a #GDataGDPostalAddress
+ *
+ * Gets the #GDataGDPostalAddress:usage property.
+ *
+ * Return value: the postal address' usage, or %NULL
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_gd_postal_address_get_usage (GDataGDPostalAddress *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self), NULL);
+ return self->priv->usage;
+}
+
+/**
+ * gdata_gd_postal_address_set_usage:
+ * @self: a #GDataGDPostalAddress
+ * @usage: (allow-none): the new usage for the postal address, or %NULL
+ *
+ * Sets the #GDataGDPostalAddress:usage property to @usage.
+ *
+ * Set @usage to %NULL to unset the property in the postal address.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_gd_postal_address_set_usage (GDataGDPostalAddress *self, const gchar *usage)
+{
+ g_return_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self));
+ g_return_if_fail (usage == NULL || *usage != '\0');
+
+ g_free (self->priv->usage);
+ self->priv->usage = g_strdup (usage);
+ g_object_notify (G_OBJECT (self), "usage");
+}
+
+/**
+ * gdata_gd_postal_address_get_agent:
+ * @self: a #GDataGDPostalAddress
+ *
+ * Gets the #GDataGDPostalAddress:agent property.
+ *
+ * Return value: the postal address' agent, or %NULL
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_gd_postal_address_get_agent (GDataGDPostalAddress *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self), NULL);
+ return self->priv->agent;
+}
+
+/**
+ * gdata_gd_postal_address_set_agent:
+ * @self: a #GDataGDPostalAddress
+ * @agent: (allow-none): the new agent for the postal address, or %NULL
+ *
+ * Sets the #GDataGDPostalAddress:agent property to @agent.
+ *
+ * Set @agent to %NULL to unset the property in the postal address.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_gd_postal_address_set_agent (GDataGDPostalAddress *self, const gchar *agent)
+{
+ g_return_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self));
+ g_return_if_fail (agent == NULL || *agent != '\0');
+
+ g_free (self->priv->agent);
+ self->priv->agent = g_strdup (agent);
+ g_object_notify (G_OBJECT (self), "agent");
+}
+
+/**
+ * gdata_gd_postal_address_get_house_name:
+ * @self: a #GDataGDPostalAddress
+ *
+ * Gets the #GDataGDPostalAddress:house-name property.
+ *
+ * Return value: the postal address' house name, or %NULL
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_gd_postal_address_get_house_name (GDataGDPostalAddress *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self), NULL);
+ return self->priv->house_name;
+}
+
+/**
+ * gdata_gd_postal_address_set_house_name:
+ * @self: a #GDataGDPostalAddress
+ * @house_name: (allow-none): the new house name for the postal address, or %NULL
+ *
+ * Sets the #GDataGDPostalAddress:house-name property to @house_name.
+ *
+ * Set @house_name to %NULL to unset the property in the postal address.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_gd_postal_address_set_house_name (GDataGDPostalAddress *self, const gchar *house_name)
+{
+ g_return_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self));
+ g_return_if_fail (house_name == NULL || *house_name != '\0');
+
+ g_free (self->priv->house_name);
+ self->priv->house_name = g_strdup (house_name);
+ g_object_notify (G_OBJECT (self), "house-name");
+}
+
+/**
+ * gdata_gd_postal_address_get_street:
+ * @self: a #GDataGDPostalAddress
+ *
+ * Gets the #GDataGDPostalAddress:street property.
+ *
+ * Return value: the postal address' street, or %NULL
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_gd_postal_address_get_street (GDataGDPostalAddress *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self), NULL);
+ return self->priv->street;
+}
+
+/**
+ * gdata_gd_postal_address_set_street:
+ * @self: a #GDataGDPostalAddress
+ * @street: (allow-none): the new street for the postal address, or %NULL
+ *
+ * Sets the #GDataGDPostalAddress:street property to @street.
+ *
+ * Set @street to %NULL to unset the property in the postal address.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_gd_postal_address_set_street (GDataGDPostalAddress *self, const gchar *street)
+{
+ g_return_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self));
+ g_return_if_fail (street == NULL || *street != '\0');
+
+ g_free (self->priv->street);
+ self->priv->street = g_strdup (street);
+ g_object_notify (G_OBJECT (self), "street");
+}
+
+/**
+ * gdata_gd_postal_address_get_po_box:
+ * @self: a #GDataGDPostalAddress
+ *
+ * Gets the #GDataGDPostalAddress:po-box property.
+ *
+ * Return value: the postal address' P.O. box, or %NULL
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_gd_postal_address_get_po_box (GDataGDPostalAddress *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self), NULL);
+ return self->priv->po_box;
+}
+
+/**
+ * gdata_gd_postal_address_set_po_box:
+ * @self: a #GDataGDPostalAddress
+ * @po_box: (allow-none): the new P.O. box for the postal address, or %NULL
+ *
+ * Sets the #GDataGDPostalAddress:po-box property to @po_box.
+ *
+ * Set @po_box to %NULL to unset the property in the postal address.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_gd_postal_address_set_po_box (GDataGDPostalAddress *self, const gchar *po_box)
+{
+ g_return_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self));
+ g_return_if_fail (po_box == NULL || *po_box != '\0');
+
+ g_free (self->priv->po_box);
+ self->priv->po_box = g_strdup (po_box);
+ g_object_notify (G_OBJECT (self), "po-box");
+}
+
+/**
+ * gdata_gd_postal_address_get_neighborhood:
+ * @self: a #GDataGDPostalAddress
+ *
+ * Gets the #GDataGDPostalAddress:neighborhood property.
+ *
+ * Return value: the postal address' neighborhood, or %NULL
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_gd_postal_address_get_neighborhood (GDataGDPostalAddress *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self), NULL);
+ return self->priv->neighborhood;
+}
+
+/**
+ * gdata_gd_postal_address_set_neighborhood:
+ * @self: a #GDataGDPostalAddress
+ * @neighborhood: (allow-none): the new neighborhood for the postal address, or %NULL
+ *
+ * Sets the #GDataGDPostalAddress:neighborhood property to @neighborhood.
+ *
+ * Set @neighborhood to %NULL to unset the property in the postal address.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_gd_postal_address_set_neighborhood (GDataGDPostalAddress *self, const gchar *neighborhood)
+{
+ g_return_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self));
+ g_return_if_fail (neighborhood == NULL || *neighborhood != '\0');
+
+ g_free (self->priv->neighborhood);
+ self->priv->neighborhood = g_strdup (neighborhood);
+ g_object_notify (G_OBJECT (self), "neighborhood");
+}
+
+/**
+ * gdata_gd_postal_address_get_city:
+ * @self: a #GDataGDPostalAddress
+ *
+ * Gets the #GDataGDPostalAddress:city property.
+ *
+ * Return value: the postal address' city, or %NULL
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_gd_postal_address_get_city (GDataGDPostalAddress *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self), NULL);
+ return self->priv->city;
+}
+
+/**
+ * gdata_gd_postal_address_set_city:
+ * @self: a #GDataGDPostalAddress
+ * @city: (allow-none): the new city for the postal address, or %NULL
+ *
+ * Sets the #GDataGDPostalAddress:city property to @city.
+ *
+ * Set @city to %NULL to unset the property in the postal address.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_gd_postal_address_set_city (GDataGDPostalAddress *self, const gchar *city)
+{
+ g_return_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self));
+ g_return_if_fail (city == NULL || *city != '\0');
+
+ g_free (self->priv->city);
+ self->priv->city = g_strdup (city);
+ g_object_notify (G_OBJECT (self), "city");
+}
+
+/**
+ * gdata_gd_postal_address_get_subregion:
+ * @self: a #GDataGDPostalAddress
+ *
+ * Gets the #GDataGDPostalAddress:subregion property.
+ *
+ * Return value: the postal address' subregion, or %NULL
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_gd_postal_address_get_subregion (GDataGDPostalAddress *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self), NULL);
+ return self->priv->subregion;
+}
+
+/**
+ * gdata_gd_postal_address_set_subregion:
+ * @self: a #GDataGDPostalAddress
+ * @subregion: (allow-none): the new subregion for the postal address, or %NULL
+ *
+ * Sets the #GDataGDPostalAddress:subregion property to @subregion.
+ *
+ * Set @subregion to %NULL to unset the property in the postal address.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_gd_postal_address_set_subregion (GDataGDPostalAddress *self, const gchar *subregion)
+{
+ g_return_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self));
+ g_return_if_fail (subregion == NULL || *subregion != '\0');
+
+ g_free (self->priv->subregion);
+ self->priv->subregion = g_strdup (subregion);
+ g_object_notify (G_OBJECT (self), "subregion");
+}
+
+/**
+ * gdata_gd_postal_address_get_region:
+ * @self: a #GDataGDPostalAddress
+ *
+ * Gets the #GDataGDPostalAddress:region property.
+ *
+ * Return value: the postal address' region, or %NULL
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_gd_postal_address_get_region (GDataGDPostalAddress *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self), NULL);
+ return self->priv->region;
+}
+
+/**
+ * gdata_gd_postal_address_set_region:
+ * @self: a #GDataGDPostalAddress
+ * @region: (allow-none): the new region for the postal address, or %NULL
+ *
+ * Sets the #GDataGDPostalAddress:region property to @region.
+ *
+ * Set @region to %NULL to unset the property in the postal address.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_gd_postal_address_set_region (GDataGDPostalAddress *self, const gchar *region)
+{
+ g_return_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self));
+ g_return_if_fail (region == NULL || *region != '\0');
+
+ g_free (self->priv->region);
+ self->priv->region = g_strdup (region);
+ g_object_notify (G_OBJECT (self), "region");
+}
+
+/**
+ * gdata_gd_postal_address_get_postcode:
+ * @self: a #GDataGDPostalAddress
+ *
+ * Gets the #GDataGDPostalAddress:postcode property.
+ *
+ * Return value: the postal address' postcode, or %NULL
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_gd_postal_address_get_postcode (GDataGDPostalAddress *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self), NULL);
+ return self->priv->postcode;
+}
+
+/**
+ * gdata_gd_postal_address_set_postcode:
+ * @self: a #GDataGDPostalAddress
+ * @postcode: (allow-none): the new postcode for the postal address, or %NULL
+ *
+ * Sets the #GDataGDPostalAddress:postcode property to @postcode.
+ *
+ * Set @postcode to %NULL to unset the property in the postal address.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_gd_postal_address_set_postcode (GDataGDPostalAddress *self, const gchar *postcode)
+{
+ g_return_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self));
+ g_return_if_fail (postcode == NULL || *postcode != '\0');
+
+ g_free (self->priv->postcode);
+ self->priv->postcode = g_strdup (postcode);
+ g_object_notify (G_OBJECT (self), "postcode");
+}
+
+/**
+ * gdata_gd_postal_address_get_country:
+ * @self: a #GDataGDPostalAddress
+ *
+ * Gets the #GDataGDPostalAddress:country property.
+ *
+ * Return value: the postal address' country, or %NULL
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_gd_postal_address_get_country (GDataGDPostalAddress *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self), NULL);
+ return self->priv->country;
+}
+
+/**
+ * gdata_gd_postal_address_get_country_code:
+ * @self: a #GDataGDPostalAddress
+ *
+ * Gets the #GDataGDPostalAddress:country-code property.
+ *
+ * Return value: the postal address' ISO 3166-1 alpha-2 country code, or %NULL
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_gd_postal_address_get_country_code (GDataGDPostalAddress *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self), NULL);
+ return self->priv->country_code;
+}
+
+/**
+ * gdata_gd_postal_address_set_country:
+ * @self: a #GDataGDPostalAddress
+ * @country: (allow-none): the new country for the postal address, or %NULL
+ * @country_code: (allow-none): the new country code for the postal address, or %NULL
+ *
+ * Sets the #GDataGDPostalAddress:country property to @country, and #GDataGDPostalAddress:country-code to @country_code.
+ *
+ * Set @country or @country_code to %NULL to unset the relevant property in the postal address. If a @country_code is provided, a @country must
+ * also be provided.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_gd_postal_address_set_country (GDataGDPostalAddress *self, const gchar *country, const gchar *country_code)
+{
+ g_return_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (self));
+ g_return_if_fail (country != NULL || country_code == NULL);
+ g_return_if_fail (country == NULL || *country != '\0');
+ g_return_if_fail (country_code == NULL || *country_code != '\0');
+
+ g_free (self->priv->country);
+ g_free (self->priv->country_code);
+ self->priv->country = g_strdup (country);
+ self->priv->country_code = g_strdup (country_code);
+
+ g_object_freeze_notify (G_OBJECT (self));
+ g_object_notify (G_OBJECT (self), "country");
+ g_object_notify (G_OBJECT (self), "country-code");
+ g_object_thaw_notify (G_OBJECT (self));
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_GD_POSTAL_ADDRESS_H
+#define GDATA_GD_POSTAL_ADDRESS_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_GD_POSTAL_ADDRESS_WORK:
+ *
+ * The relation type URI for the postal address of a workplace.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_POSTAL_ADDRESS_WORK "http://schemas.google.com/g/2005#work"
+
+/**
+ * GDATA_GD_POSTAL_ADDRESS_HOME:
+ *
+ * The relation type URI for the postal address of a home.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_POSTAL_ADDRESS_HOME "http://schemas.google.com/g/2005#home"
+
+/**
+ * GDATA_GD_POSTAL_ADDRESS_OTHER:
+ *
+ * The relation type URI for a miscellaneous postal address.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_POSTAL_ADDRESS_OTHER "http://schemas.google.com/g/2005#other"
+
+/**
+ * GDATA_GD_MAIL_CLASS_BOTH:
+ *
+ * Parcels and letters can be sent to the address. Value for #GDataGDPostalAddress:mail-class.
+ *
+ * Since: 0.5.0
+ */
+#define GDATA_GD_MAIL_CLASS_BOTH "http://schemas.google.com/g/2005#both"
+
+/**
+ * GDATA_GD_MAIL_CLASS_LETTERS:
+ *
+ * Only letters can be sent to the address. Value for #GDataGDPostalAddress:mail-class.
+ *
+ * Since: 0.5.0
+ */
+#define GDATA_GD_MAIL_CLASS_LETTERS "http://schemas.google.com/g/2005#letters"
+
+/**
+ * GDATA_GD_MAIL_CLASS_PARCELS:
+ *
+ * Only parcels can be sent to the address. Value for #GDataGDPostalAddress:mail-class.
+ *
+ * Since: 0.5.0
+ */
+#define GDATA_GD_MAIL_CLASS_PARCELS "http://schemas.google.com/g/2005#parcels"
+
+/**
+ * GDATA_GD_MAIL_CLASS_NEITHER:
+ *
+ * Address is purely locational and cannot be used for mail. Value for #GDataGDPostalAddress:mail-class.
+ *
+ * Since: 0.5.0
+ */
+#define GDATA_GD_MAIL_CLASS_NEITHER "http://schemas.google.com/g/2005#neither"
+
+/**
+ * GDATA_GD_ADDRESS_USAGE_GENERAL:
+ *
+ * The address is for general usage. Value for #GDataGDPostalAddress:usage.
+ *
+ * Since: 0.5.0
+ */
+#define GDATA_GD_ADDRESS_USAGE_GENERAL "http://schemas.google.com/g/2005#general"
+
+/**
+ * GDATA_GD_ADDRESS_USAGE_LOCAL:
+ *
+ * The address is for local usage. Value for #GDataGDPostalAddress:usage.
+ *
+ * Since: 0.5.0
+ */
+#define GDATA_GD_ADDRESS_USAGE_LOCAL "http://schemas.google.com/g/2005#local"
+
+#define GDATA_TYPE_GD_POSTAL_ADDRESS (gdata_gd_postal_address_get_type ())
+#define GDATA_GD_POSTAL_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_GD_POSTAL_ADDRESS, GDataGDPostalAddress))
+#define GDATA_GD_POSTAL_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_GD_POSTAL_ADDRESS, GDataGDPostalAddressClass))
+#define GDATA_IS_GD_POSTAL_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_GD_POSTAL_ADDRESS))
+#define GDATA_IS_GD_POSTAL_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_GD_POSTAL_ADDRESS))
+#define GDATA_GD_POSTAL_ADDRESS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_GD_POSTAL_ADDRESS, GDataGDPostalAddressClass))
+
+typedef struct _GDataGDPostalAddressPrivate GDataGDPostalAddressPrivate;
+
+/**
+ * GDataGDPostalAddress:
+ *
+ * All the fields in the #GDataGDPostalAddress structure are private and should never be accessed directly.
+ *
+ * Since: 0.2.0
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataGDPostalAddressPrivate *priv;
+} GDataGDPostalAddress;
+
+/**
+ * GDataGDPostalAddressClass:
+ *
+ * All the fields in the #GDataGDPostalAddressClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataGDPostalAddressClass;
+
+GType gdata_gd_postal_address_get_type (void) G_GNUC_CONST;
+
+GDataGDPostalAddress *gdata_gd_postal_address_new (const gchar *relation_type, const gchar *label,
+ gboolean is_primary) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_gd_postal_address_get_address (GDataGDPostalAddress *self) G_GNUC_PURE;
+void gdata_gd_postal_address_set_address (GDataGDPostalAddress *self, const gchar *address);
+
+const gchar *gdata_gd_postal_address_get_relation_type (GDataGDPostalAddress *self) G_GNUC_PURE;
+void gdata_gd_postal_address_set_relation_type (GDataGDPostalAddress *self, const gchar *relation_type);
+
+const gchar *gdata_gd_postal_address_get_label (GDataGDPostalAddress *self) G_GNUC_PURE;
+void gdata_gd_postal_address_set_label (GDataGDPostalAddress *self, const gchar *label);
+
+gboolean gdata_gd_postal_address_is_primary (GDataGDPostalAddress *self) G_GNUC_PURE;
+void gdata_gd_postal_address_set_is_primary (GDataGDPostalAddress *self, gboolean is_primary);
+
+const gchar *gdata_gd_postal_address_get_mail_class (GDataGDPostalAddress *self) G_GNUC_PURE;
+void gdata_gd_postal_address_set_mail_class (GDataGDPostalAddress *self, const gchar *mail_class);
+
+const gchar *gdata_gd_postal_address_get_usage (GDataGDPostalAddress *self) G_GNUC_PURE;
+void gdata_gd_postal_address_set_usage (GDataGDPostalAddress *self, const gchar *usage);
+
+const gchar *gdata_gd_postal_address_get_agent (GDataGDPostalAddress *self) G_GNUC_PURE;
+void gdata_gd_postal_address_set_agent (GDataGDPostalAddress *self, const gchar *agent);
+
+const gchar *gdata_gd_postal_address_get_house_name (GDataGDPostalAddress *self) G_GNUC_PURE;
+void gdata_gd_postal_address_set_house_name (GDataGDPostalAddress *self, const gchar *house_name);
+
+const gchar *gdata_gd_postal_address_get_street (GDataGDPostalAddress *self) G_GNUC_PURE;
+void gdata_gd_postal_address_set_street (GDataGDPostalAddress *self, const gchar *street);
+
+const gchar *gdata_gd_postal_address_get_po_box (GDataGDPostalAddress *self) G_GNUC_PURE;
+void gdata_gd_postal_address_set_po_box (GDataGDPostalAddress *self, const gchar *po_box);
+
+const gchar *gdata_gd_postal_address_get_neighborhood (GDataGDPostalAddress *self) G_GNUC_PURE;
+void gdata_gd_postal_address_set_neighborhood (GDataGDPostalAddress *self, const gchar *neighborhood);
+
+const gchar *gdata_gd_postal_address_get_city (GDataGDPostalAddress *self) G_GNUC_PURE;
+void gdata_gd_postal_address_set_city (GDataGDPostalAddress *self, const gchar *city);
+
+const gchar *gdata_gd_postal_address_get_subregion (GDataGDPostalAddress *self) G_GNUC_PURE;
+void gdata_gd_postal_address_set_subregion (GDataGDPostalAddress *self, const gchar *subregion);
+
+const gchar *gdata_gd_postal_address_get_region (GDataGDPostalAddress *self) G_GNUC_PURE;
+void gdata_gd_postal_address_set_region (GDataGDPostalAddress *self, const gchar *region);
+
+const gchar *gdata_gd_postal_address_get_postcode (GDataGDPostalAddress *self) G_GNUC_PURE;
+void gdata_gd_postal_address_set_postcode (GDataGDPostalAddress *self, const gchar *postcode);
+
+const gchar *gdata_gd_postal_address_get_country (GDataGDPostalAddress *self) G_GNUC_PURE;
+const gchar *gdata_gd_postal_address_get_country_code (GDataGDPostalAddress *self) G_GNUC_PURE;
+void gdata_gd_postal_address_set_country (GDataGDPostalAddress *self, const gchar *country, const gchar *country_code);
+
+G_END_DECLS
+
+#endif /* !GDATA_GD_POSTAL_ADDRESS_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-gd-reminder
+ * @short_description: GData reminder element
+ * @stability: Stable
+ * @include: gdata/gd/gdata-gd-reminder.h
+ *
+ * #GDataGDReminder represents a "reminder" element from the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdReminder">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+
+#include "gdata-gd-reminder.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-types.h"
+#include "gdata-comparable.h"
+
+static void gdata_gd_reminder_comparable_init (GDataComparableIface *iface);
+static void gdata_gd_reminder_finalize (GObject *object);
+static void gdata_gd_reminder_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_gd_reminder_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static void pre_get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataGDReminderPrivate {
+ gchar *method;
+ gint64 absolute_time;
+ gint relative_time;
+};
+
+enum {
+ PROP_METHOD = 1,
+ PROP_ABSOLUTE_TIME,
+ PROP_IS_ABSOLUTE_TIME,
+ PROP_RELATIVE_TIME
+};
+
+G_DEFINE_TYPE_WITH_CODE (GDataGDReminder, gdata_gd_reminder, GDATA_TYPE_PARSABLE,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_gd_reminder_comparable_init))
+
+static void
+gdata_gd_reminder_class_init (GDataGDReminderClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataGDReminderPrivate));
+
+ gobject_class->get_property = gdata_gd_reminder_get_property;
+ gobject_class->set_property = gdata_gd_reminder_set_property;
+ gobject_class->finalize = gdata_gd_reminder_finalize;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ parsable_class->pre_get_xml = pre_get_xml;
+ parsable_class->get_namespaces = get_namespaces;
+ parsable_class->element_name = "reminder";
+ parsable_class->element_namespace = "gd";
+
+ /**
+ * GDataGDReminder:method:
+ *
+ * The notification method the reminder should use. For example: %GDATA_GD_REMINDER_ALERT or %GDATA_GD_REMINDER_EMAIL.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdReminder">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_METHOD,
+ g_param_spec_string ("method",
+ "Method", "The notification method the reminder should use.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDReminder:absolute-time:
+ *
+ * Absolute time at which the reminder should be issued.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdReminder">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_ABSOLUTE_TIME,
+ g_param_spec_int64 ("absolute-time",
+ "Absolute time", "Absolute time at which the reminder should be issued.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDReminder:is-absolute-time:
+ *
+ * Whether the reminder is specified as an absolute or relative time.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdReminder">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_IS_ABSOLUTE_TIME,
+ g_param_spec_boolean ("is-absolute-time",
+ "Absolute time?", "Whether the reminder is specified as an absolute or relative time.",
+ FALSE,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDReminder:relative-time:
+ *
+ * Time at which the reminder should be issued, in minutes relative to the start time of the corresponding event.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdReminder">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_RELATIVE_TIME,
+ g_param_spec_int ("relative-time",
+ "Relative time", "Time at which the reminder should be issued, in minutes.",
+ -1, G_MAXINT, -1,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static gint
+compare_with (GDataComparable *self, GDataComparable *other)
+{
+ gint method_cmp, time_cmp;
+ GDataGDReminder *a = (GDataGDReminder*) self, *b = (GDataGDReminder*) other;
+
+ if (gdata_gd_reminder_is_absolute_time (a) != gdata_gd_reminder_is_absolute_time (b))
+ return 1;
+
+ method_cmp = g_strcmp0 (a->priv->method, b->priv->method);
+ if (gdata_gd_reminder_is_absolute_time (a) == TRUE) {
+ time_cmp = a->priv->absolute_time - b->priv->absolute_time;
+ } else {
+ time_cmp = a->priv->relative_time - b->priv->relative_time;
+ }
+
+ if (method_cmp == 0)
+ return time_cmp;
+ else
+ return method_cmp;
+}
+
+static void
+gdata_gd_reminder_comparable_init (GDataComparableIface *iface)
+{
+ iface->compare_with = compare_with;
+}
+
+static void
+gdata_gd_reminder_init (GDataGDReminder *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GD_REMINDER, GDataGDReminderPrivate);
+ self->priv->absolute_time = -1;
+}
+
+static void
+gdata_gd_reminder_finalize (GObject *object)
+{
+ GDataGDReminderPrivate *priv = GDATA_GD_REMINDER (object)->priv;
+
+ g_free (priv->method);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_gd_reminder_parent_class)->finalize (object);
+}
+
+static void
+gdata_gd_reminder_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataGDReminderPrivate *priv = GDATA_GD_REMINDER (object)->priv;
+
+ switch (property_id) {
+ case PROP_METHOD:
+ g_value_set_string (value, priv->method);
+ break;
+ case PROP_ABSOLUTE_TIME:
+ g_value_set_int64 (value, priv->absolute_time);
+ break;
+ case PROP_IS_ABSOLUTE_TIME:
+ g_value_set_boolean (value, gdata_gd_reminder_is_absolute_time (GDATA_GD_REMINDER (object)));
+ break;
+ case PROP_RELATIVE_TIME:
+ g_value_set_int (value, priv->relative_time);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_gd_reminder_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataGDReminder *self = GDATA_GD_REMINDER (object);
+
+ switch (property_id) {
+ case PROP_METHOD:
+ gdata_gd_reminder_set_method (self, g_value_get_string (value));
+ break;
+ case PROP_ABSOLUTE_TIME:
+ gdata_gd_reminder_set_absolute_time (self, g_value_get_int64 (value));
+ break;
+ case PROP_RELATIVE_TIME:
+ gdata_gd_reminder_set_relative_time (self, g_value_get_int (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ GDataGDReminderPrivate *priv = GDATA_GD_REMINDER (parsable)->priv;
+ xmlChar *absolute_time, *relative_time;
+ gint64 absolute_time_int64;
+ gint relative_time_int = -1;
+ gboolean is_absolute_time = FALSE;
+
+ /* Absolute time */
+ absolute_time = xmlGetProp (root_node, (xmlChar*) "absoluteTime");
+ if (absolute_time != NULL) {
+ is_absolute_time = TRUE;
+ if (gdata_parser_int64_from_iso8601 ((gchar*) absolute_time, &absolute_time_int64) == FALSE) {
+ /* Error */
+ gdata_parser_error_not_iso8601_format (root_node, (gchar*) absolute_time, error);
+ xmlFree (absolute_time);
+ return FALSE;
+ }
+ xmlFree (absolute_time);
+ }
+
+ /* Relative time */
+ relative_time = xmlGetProp (root_node, (xmlChar*) "days");
+ if (relative_time != NULL) {
+ relative_time_int = g_ascii_strtoll ((gchar*) relative_time, NULL, 10) * 60 * 24;
+ } else {
+ relative_time = xmlGetProp (root_node, (xmlChar*) "hours");
+ if (relative_time != NULL) {
+ relative_time_int = g_ascii_strtoll ((gchar*) relative_time, NULL, 10) * 60;
+ } else {
+ relative_time = xmlGetProp (root_node, (xmlChar*) "minutes");
+ if (relative_time != NULL)
+ relative_time_int = g_ascii_strtoll ((gchar*) relative_time, NULL, 10);
+ }
+ }
+ xmlFree (relative_time);
+
+ if (is_absolute_time == TRUE) {
+ priv->absolute_time = absolute_time_int64;
+ priv->relative_time = -1;
+ } else {
+ priv->absolute_time = -1;
+ priv->relative_time = relative_time_int;
+ }
+
+ priv->method = (gchar*) xmlGetProp (root_node, (xmlChar*) "method");
+
+ return TRUE;
+}
+
+static void
+pre_get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataGDReminderPrivate *priv = GDATA_GD_REMINDER (parsable)->priv;
+
+ if (priv->relative_time == -1) {
+ gchar *absolute_time = gdata_parser_int64_to_iso8601 (priv->absolute_time);
+ g_string_append_printf (xml_string, " absoluteTime='%s'", absolute_time);
+ g_free (absolute_time);
+ } else {
+ g_string_append_printf (xml_string, " minutes='%i'", priv->relative_time);
+ }
+
+ if (priv->method != NULL)
+ gdata_parser_string_append_escaped (xml_string, " method='", priv->method, "'");
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ g_hash_table_insert (namespaces, (gchar*) "gd", (gchar*) "http://schemas.google.com/g/2005");
+}
+
+/**
+ * gdata_gd_reminder_new:
+ * @method: (allow-none): the notification method the reminder should use, or %NULL
+ * @absolute_time: the absolute time for the reminder, or <code class="literal">-1</code>
+ * @relative_time: the relative time for the reminder, in minutes, or <code class="literal">-1</code>
+ *
+ * Creates a new #GDataGDReminder. More information is available in the <ulink type="http"
+ * url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdReminder">GData specification</ulink>.
+ *
+ * Return value: a new #GDataGDReminder, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.2.0
+ */
+GDataGDReminder *
+gdata_gd_reminder_new (const gchar *method, gint64 absolute_time, gint relative_time)
+{
+ g_return_val_if_fail (absolute_time == -1 || relative_time == -1, NULL);
+ g_return_val_if_fail (absolute_time >= -1, NULL);
+ g_return_val_if_fail (relative_time >= -1, NULL);
+ return g_object_new (GDATA_TYPE_GD_REMINDER, "absolute-time", absolute_time, "relative-time", relative_time, "method", method, NULL);
+}
+
+/**
+ * gdata_gd_reminder_get_method:
+ * @self: a #GDataGDReminder
+ *
+ * Gets the #GDataGDReminder:method property.
+ *
+ * Return value: the method, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_gd_reminder_get_method (GDataGDReminder *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_REMINDER (self), NULL);
+ return self->priv->method;
+}
+
+/**
+ * gdata_gd_reminder_set_method:
+ * @self: a #GDataGDReminder
+ * @method: (allow-none): the new method, or %NULL
+ *
+ * Sets the #GDataGDReminder:method property to @method.
+ *
+ * Set @method to %NULL to unset the property.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_reminder_set_method (GDataGDReminder *self, const gchar *method)
+{
+ g_return_if_fail (GDATA_IS_GD_REMINDER (self));
+
+ g_free (self->priv->method);
+ self->priv->method = g_strdup (method);
+ g_object_notify (G_OBJECT (self), "method");
+}
+
+/**
+ * gdata_gd_reminder_get_absolute_time:
+ * @self: a #GDataGDReminder
+ *
+ * Gets the #GDataGDReminder:absolute-time property. If the property is unset, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the UNIX timestamp of the absolute time for the reminder, or <code class="literal">-1</code>
+ *
+ * Since: 0.4.0
+ */
+gint64
+gdata_gd_reminder_get_absolute_time (GDataGDReminder *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_REMINDER (self), -1);
+ return self->priv->absolute_time;
+}
+
+/**
+ * gdata_gd_reminder_set_absolute_time:
+ * @self: a #GDataGDReminder
+ * @absolute_time: the new absolute time, or <code class="literal">-1</code>
+ *
+ * Sets the #GDataGDReminder:absolute-time property to @absolute_time.
+ *
+ * Set @absolute_time to <code class="literal">-1</code> to unset the property.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_reminder_set_absolute_time (GDataGDReminder *self, gint64 absolute_time)
+{
+ g_return_if_fail (GDATA_IS_GD_REMINDER (self));
+ g_return_if_fail (absolute_time >= -1);
+
+ self->priv->absolute_time = absolute_time;
+ g_object_notify (G_OBJECT (self), "absolute-time");
+}
+
+/**
+ * gdata_gd_reminder_is_absolute_time:
+ * @self: a #GDataGDReminder
+ *
+ * Returns whether the reminder is specified as an absolute time, or as a number of minutes after
+ * the corresponding event's start time.
+ *
+ * Return value: %TRUE if the reminder is absolute, %FALSE otherwise
+ *
+ * Since: 0.4.0
+ */
+gboolean
+gdata_gd_reminder_is_absolute_time (GDataGDReminder *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_REMINDER (self), FALSE);
+ return (self->priv->relative_time == -1) ? TRUE : FALSE;
+}
+
+/**
+ * gdata_gd_reminder_get_relative_time:
+ * @self: a #GDataGDReminder
+ *
+ * Gets the #GDataGDReminder:relative-time property.
+ *
+ * Return value: the relative time, or <code class="literal">-1</code>
+ *
+ * Since: 0.4.0
+ */
+gint
+gdata_gd_reminder_get_relative_time (GDataGDReminder *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_REMINDER (self), -1);
+ return self->priv->relative_time;
+}
+
+/**
+ * gdata_gd_reminder_set_relative_time:
+ * @self: a #GDataGDReminder
+ * @relative_time: the new relative time, or <code class="literal">-1</code>
+ *
+ * Sets the #GDataGDReminder:relative-time property to @relative_time.
+ *
+ * Set @relative_time to <code class="literal">-1</code> to unset the property.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_reminder_set_relative_time (GDataGDReminder *self, gint relative_time)
+{
+ g_return_if_fail (GDATA_IS_GD_REMINDER (self));
+ g_return_if_fail (relative_time >= -1);
+
+ self->priv->relative_time = relative_time;
+ g_object_notify (G_OBJECT (self), "method");
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_GD_REMINDER_H
+#define GDATA_GD_REMINDER_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_GD_REMINDER_ALERT:
+ *
+ * The #GDataGDReminder:method for an alert to appear in the user's browser.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_REMINDER_ALERT "alert"
+
+/**
+ * GDATA_GD_REMINDER_EMAIL:
+ *
+ * The #GDataGDReminder:method for an alert to be sent to the user by e-mail.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_REMINDER_EMAIL "email"
+
+/**
+ * GDATA_GD_REMINDER_SMS:
+ *
+ * The #GDataGDReminder:method for an alert to be sent to the user by SMS.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_REMINDER_SMS "sms"
+
+#define GDATA_TYPE_GD_REMINDER (gdata_gd_reminder_get_type ())
+#define GDATA_GD_REMINDER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_GD_REMINDER, GDataGDReminder))
+#define GDATA_GD_REMINDER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_GD_REMINDER, GDataGDReminderClass))
+#define GDATA_IS_GD_REMINDER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_GD_REMINDER))
+#define GDATA_IS_GD_REMINDER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_GD_REMINDER))
+#define GDATA_GD_REMINDER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_GD_REMINDER, GDataGDReminderClass))
+
+typedef struct _GDataGDReminderPrivate GDataGDReminderPrivate;
+
+/**
+ * GDataGDReminder:
+ *
+ * All the fields in the #GDataGDReminder structure are private and should never be accessed directly.
+ *
+ * Since: 0.2.0
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataGDReminderPrivate *priv;
+} GDataGDReminder;
+
+/**
+ * GDataGDReminderClass:
+ *
+ * All the fields in the #GDataGDReminderClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataGDReminderClass;
+
+GType gdata_gd_reminder_get_type (void) G_GNUC_CONST;
+
+GDataGDReminder *gdata_gd_reminder_new (const gchar *method, gint64 absolute_time, gint relative_time) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_gd_reminder_get_method (GDataGDReminder *self) G_GNUC_PURE;
+void gdata_gd_reminder_set_method (GDataGDReminder *self, const gchar *method);
+
+gint64 gdata_gd_reminder_get_absolute_time (GDataGDReminder *self);
+void gdata_gd_reminder_set_absolute_time (GDataGDReminder *self, gint64 absolute_time);
+gboolean gdata_gd_reminder_is_absolute_time (GDataGDReminder *self);
+
+gint gdata_gd_reminder_get_relative_time (GDataGDReminder *self) G_GNUC_PURE;
+void gdata_gd_reminder_set_relative_time (GDataGDReminder *self, gint relative_time);
+
+G_END_DECLS
+
+#endif /* !GDATA_GD_REMINDER_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-gd-when
+ * @short_description: GData when element
+ * @stability: Stable
+ * @include: gdata/gd/gdata-gd-when.h
+ *
+ * #GDataGDWhen represents a "when" element from the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdWhen">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+
+#include "gdata-gd-when.h"
+#include "gdata-gd-reminder.h"
+#include "gdata-private.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-types.h"
+#include "gdata-comparable.h"
+
+static void gdata_gd_when_comparable_init (GDataComparableIface *iface);
+static void gdata_gd_when_dispose (GObject *object);
+static void gdata_gd_when_finalize (GObject *object);
+static void gdata_gd_when_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_gd_when_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static gboolean post_parse_xml (GDataParsable *parsable, gpointer user_data, GError **error);
+static void pre_get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataGDWhenPrivate {
+ gint64 start_time;
+ gint64 end_time;
+ gboolean is_date;
+ gchar *value_string;
+ GList *reminders;
+};
+
+enum {
+ PROP_START_TIME = 1,
+ PROP_END_TIME,
+ PROP_IS_DATE,
+ PROP_VALUE_STRING
+};
+
+G_DEFINE_TYPE_WITH_CODE (GDataGDWhen, gdata_gd_when, GDATA_TYPE_PARSABLE,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_gd_when_comparable_init))
+
+static void
+gdata_gd_when_class_init (GDataGDWhenClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataGDWhenPrivate));
+
+ gobject_class->get_property = gdata_gd_when_get_property;
+ gobject_class->set_property = gdata_gd_when_set_property;
+ gobject_class->dispose = gdata_gd_when_dispose;
+ gobject_class->finalize = gdata_gd_when_finalize;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ parsable_class->parse_xml = parse_xml;
+ parsable_class->post_parse_xml = post_parse_xml;
+ parsable_class->pre_get_xml = pre_get_xml;
+ parsable_class->get_xml = get_xml;
+ parsable_class->get_namespaces = get_namespaces;
+ parsable_class->element_name = "when";
+ parsable_class->element_namespace = "gd";
+
+ /**
+ * GDataGDWhen:start-time:
+ *
+ * The name of the when.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdWhen">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_START_TIME,
+ g_param_spec_int64 ("start-time",
+ "Start time", "The name of the when.",
+ 0, G_MAXINT64, 0,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDWhen:end-time:
+ *
+ * The title of a person within the when.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdWhen">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_END_TIME,
+ g_param_spec_int64 ("end-time",
+ "End time", "The title of a person within the when.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDWhen:is-date:
+ *
+ * A programmatic value that identifies the type of when.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdWhen">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_IS_DATE,
+ g_param_spec_boolean ("is-date",
+ "Date?", "A programmatic value that identifies the type of when.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDWhen:value-string:
+ *
+ * A simple string value used to name this when. It allows UIs to display a label such as "Work", "Volunteer",
+ * "Professional Society", etc.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdWhen">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_VALUE_STRING,
+ g_param_spec_string ("value-string",
+ "Value string", "A simple string value used to name this when.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static gint
+compare_with (GDataComparable *self, GDataComparable *other)
+{
+ gint64 start_diff, end_diff;
+ GDataGDWhenPrivate *a = ((GDataGDWhen*) self)->priv, *b = ((GDataGDWhen*) other)->priv;
+
+ if (a->is_date != b->is_date)
+ return CLAMP (b->is_date - a->is_date, -1, 1);
+
+ start_diff = b->start_time - a->start_time;
+ end_diff = b->end_time - a->end_time;
+
+ if (start_diff == 0)
+ return CLAMP (end_diff, -1, 1);
+ return CLAMP (start_diff, -1, 1);
+}
+
+static void
+gdata_gd_when_comparable_init (GDataComparableIface *iface)
+{
+ iface->compare_with = compare_with;
+}
+
+static void
+gdata_gd_when_init (GDataGDWhen *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GD_WHEN, GDataGDWhenPrivate);
+ self->priv->end_time = -1;
+}
+
+static void
+gdata_gd_when_dispose (GObject *object)
+{
+ GDataGDWhenPrivate *priv = GDATA_GD_WHEN (object)->priv;
+
+ g_list_free_full (priv->reminders, g_object_unref);
+ priv->reminders = NULL;
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_gd_when_parent_class)->dispose (object);
+}
+
+static void
+gdata_gd_when_finalize (GObject *object)
+{
+ GDataGDWhenPrivate *priv = GDATA_GD_WHEN (object)->priv;
+
+ g_free (priv->value_string);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_gd_when_parent_class)->finalize (object);
+}
+
+static void
+gdata_gd_when_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataGDWhenPrivate *priv = GDATA_GD_WHEN (object)->priv;
+
+ switch (property_id) {
+ case PROP_START_TIME:
+ g_value_set_int64 (value, priv->start_time);
+ break;
+ case PROP_END_TIME:
+ g_value_set_int64 (value, priv->end_time);
+ break;
+ case PROP_IS_DATE:
+ g_value_set_boolean (value, priv->is_date);
+ break;
+ case PROP_VALUE_STRING:
+ g_value_set_string (value, priv->value_string);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_gd_when_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataGDWhen *self = GDATA_GD_WHEN (object);
+
+ switch (property_id) {
+ case PROP_START_TIME:
+ gdata_gd_when_set_start_time (self, g_value_get_int64 (value));
+ break;
+ case PROP_END_TIME:
+ gdata_gd_when_set_end_time (self, g_value_get_int64 (value));
+ break;
+ case PROP_IS_DATE:
+ gdata_gd_when_set_is_date (self, g_value_get_boolean (value));
+ break;
+ case PROP_VALUE_STRING:
+ gdata_gd_when_set_value_string (self, g_value_get_string (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ GDataGDWhenPrivate *priv = GDATA_GD_WHEN (parsable)->priv;
+ xmlChar *start_time, *end_time;
+ gint64 start_time_int64, end_time_int64;
+ gboolean is_date = FALSE;
+
+ /* Start time */
+ start_time = xmlGetProp (root_node, (xmlChar*) "startTime");
+ if (gdata_parser_int64_from_date ((gchar*) start_time, &start_time_int64) == TRUE) {
+ is_date = TRUE;
+ } else if (gdata_parser_int64_from_iso8601 ((gchar*) start_time, &start_time_int64) == FALSE) {
+ /* Error */
+ gdata_parser_error_not_iso8601_format (root_node, (gchar*) start_time, error);
+ xmlFree (start_time);
+ return FALSE;
+ }
+ xmlFree (start_time);
+
+ /* End time (optional) */
+ end_time = xmlGetProp (root_node, (xmlChar*) "endTime");
+ if (end_time != NULL) {
+ gboolean success;
+
+ if (is_date == TRUE)
+ success = gdata_parser_int64_from_date ((gchar*) end_time, &end_time_int64);
+ else
+ success = gdata_parser_int64_from_iso8601 ((gchar*) end_time, &end_time_int64);
+
+ if (success == FALSE) {
+ /* Error */
+ gdata_parser_error_not_iso8601_format (root_node, (gchar*) end_time, error);
+ xmlFree (end_time);
+ return FALSE;
+ }
+ xmlFree (end_time);
+ } else {
+ /* Give a default */
+ end_time_int64 = -1;
+ }
+
+ priv->start_time = start_time_int64;
+ priv->end_time = end_time_int64;
+ priv->is_date = is_date;
+ priv->value_string = (gchar*) xmlGetProp (root_node, (xmlChar*) "valueString");
+
+ return TRUE;
+}
+
+static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ gboolean success;
+
+ if (gdata_parser_is_namespace (node, "http://schemas.google.com/g/2005") == TRUE &&
+ gdata_parser_object_from_element_setter (node, "reminder", P_REQUIRED, GDATA_TYPE_GD_REMINDER,
+ gdata_gd_when_add_reminder, parsable, &success, error) == TRUE) {
+ return success;
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_gd_when_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ }
+}
+
+static gboolean
+post_parse_xml (GDataParsable *parsable, gpointer user_data, GError **error)
+{
+ GDataGDWhenPrivate *priv = GDATA_GD_WHEN (parsable)->priv;
+
+ /* Reverse our lists of stuff */
+ priv->reminders = g_list_reverse (priv->reminders);
+
+ return TRUE;
+}
+
+static void
+pre_get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataGDWhenPrivate *priv = GDATA_GD_WHEN (parsable)->priv;
+ gchar *start_time;
+
+ if (priv->is_date == TRUE)
+ start_time = gdata_parser_date_from_int64 (priv->start_time);
+ else
+ start_time = gdata_parser_int64_to_iso8601 (priv->start_time);
+
+ g_string_append_printf (xml_string, " startTime='%s'", start_time);
+ g_free (start_time);
+
+ if (priv->end_time != -1) {
+ gchar *end_time;
+
+ if (priv->is_date == TRUE)
+ end_time = gdata_parser_date_from_int64 (priv->end_time);
+ else
+ end_time = gdata_parser_int64_to_iso8601 (priv->end_time);
+
+ g_string_append_printf (xml_string, " endTime='%s'", end_time);
+ g_free (end_time);
+ }
+
+ if (priv->value_string != NULL)
+ gdata_parser_string_append_escaped (xml_string, " valueString='", priv->value_string, "'");
+}
+
+static void
+get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GList *reminders;
+ GDataGDWhenPrivate *priv = GDATA_GD_WHEN (parsable)->priv;
+
+ for (reminders = priv->reminders; reminders != NULL; reminders = reminders->next)
+ _gdata_parsable_get_xml (GDATA_PARSABLE (reminders->data), xml_string, FALSE);
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ g_hash_table_insert (namespaces, (gchar*) "gd", (gchar*) "http://schemas.google.com/g/2005");
+}
+
+/**
+ * gdata_gd_when_new:
+ * @start_time: when the event starts or (for zero-duration events) when it occurs
+ * @end_time: when the event ends, or <code class="literal">-1</code>
+ * @is_date: %TRUE if @start_time and @end_time specify dates rather than times, %FALSE otherwise
+ *
+ * Creates a new #GDataGDWhen. More information is available in the <ulink type="http"
+ * url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdWhen">GData specification</ulink>.
+ *
+ * Return value: a new #GDataGDWhen, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.2.0
+ */
+GDataGDWhen *
+gdata_gd_when_new (gint64 start_time, gint64 end_time, gboolean is_date)
+{
+ g_return_val_if_fail (start_time >= 0, NULL);
+ g_return_val_if_fail (end_time >= -1, NULL);
+
+ return g_object_new (GDATA_TYPE_GD_WHEN, "start-time", start_time, "end-time", end_time, "is-date", is_date, NULL);
+}
+
+/**
+ * gdata_gd_when_get_start_time:
+ * @self: a #GDataGDWhen
+ *
+ * Gets the #GDataGDWhen:start-time property.
+ *
+ * Return value: the UNIX timestamp for the start time of the event
+ *
+ * Since: 0.4.0
+ */
+gint64
+gdata_gd_when_get_start_time (GDataGDWhen *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_WHEN (self), -1);
+ return self->priv->start_time;
+}
+
+/**
+ * gdata_gd_when_set_start_time:
+ * @self: a #GDataGDWhen
+ * @start_time: the new start time
+ *
+ * Sets the #GDataGDWhen:start-time property to @start_time.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_when_set_start_time (GDataGDWhen *self, gint64 start_time)
+{
+ g_return_if_fail (GDATA_IS_GD_WHEN (self));
+ g_return_if_fail (start_time >= 0);
+
+ self->priv->start_time = start_time;
+ g_object_notify (G_OBJECT (self), "start-time");
+}
+
+/**
+ * gdata_gd_when_get_end_time:
+ * @self: a #GDataGDWhen
+ *
+ * Gets the #GDataGDWhen:end-time property.
+ *
+ * If the end time is unset, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the UNIX timestamp for the end time of the event, or
+ * <code class="literal">-1</code>
+ *
+ * Since: 0.4.0
+ */
+gint64
+gdata_gd_when_get_end_time (GDataGDWhen *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_WHEN (self), -1);
+ return self->priv->end_time;
+}
+
+/**
+ * gdata_gd_when_set_end_time:
+ * @self: a #GDataGDWhen
+ * @end_time: the new end time, or <code class="literal">-1</code>
+ *
+ * Sets the #GDataGDWhen:end-time property to @end_time.
+ *
+ * Set @end_time to <code class="literal">-1</code> to unset the property.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_when_set_end_time (GDataGDWhen *self, gint64 end_time)
+{
+ g_return_if_fail (GDATA_IS_GD_WHEN (self));
+ g_return_if_fail (end_time >= -1);
+
+ self->priv->end_time = end_time;
+ g_object_notify (G_OBJECT (self), "end-time");
+}
+
+/**
+ * gdata_gd_when_is_date:
+ * @self: a #GDataGDWhen
+ *
+ * Gets the #GDataGDWhen:is-date property.
+ *
+ * Return value: %TRUE if #GDataGDWhen:start-time and #GDataGDWhen:end-time are dates rather than times, %FALSE otherwise
+ *
+ * Since: 0.4.0
+ */
+gboolean
+gdata_gd_when_is_date (GDataGDWhen *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_WHEN (self), FALSE);
+ return self->priv->is_date;
+}
+
+/**
+ * gdata_gd_when_set_is_date:
+ * @self: a #GDataGDWhen
+ * @is_date: %TRUE if #GDataGDWhen:start-time and #GDataGDWhen:end-time should be dates rather than times, %FALSE otherwise
+ *
+ * Sets the #GDataGDWhen:is-date property to @is_date.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_when_set_is_date (GDataGDWhen *self, gboolean is_date)
+{
+ g_return_if_fail (GDATA_IS_GD_WHEN (self));
+
+ self->priv->is_date = is_date;
+ g_object_notify (G_OBJECT (self), "is-date");
+}
+
+/**
+ * gdata_gd_when_get_value_string:
+ * @self: a #GDataGDWhen
+ *
+ * Gets the #GDataGDWhen:value-string property.
+ *
+ * Return value: the value string, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_gd_when_get_value_string (GDataGDWhen *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_WHEN (self), NULL);
+ return self->priv->value_string;
+}
+
+/**
+ * gdata_gd_when_set_value_string:
+ * @self: a #GDataGDWhen
+ * @value_string: (allow-none): the new value string, or %NULL
+ *
+ * Sets the #GDataGDWhen:value-string property to @value_string.
+ *
+ * Set @value_string to %NULL to unset the property.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_when_set_value_string (GDataGDWhen *self, const gchar *value_string)
+{
+ g_return_if_fail (GDATA_IS_GD_WHEN (self));
+
+ g_free (self->priv->value_string);
+ self->priv->value_string = g_strdup (value_string);
+ g_object_notify (G_OBJECT (self), "value-string");
+}
+
+/**
+ * gdata_gd_when_get_reminders:
+ * @self: a #GDataGDWhen
+ *
+ * Returns a list of the #GDataGDReminders which are associated with this #GDataGDWhen.
+ *
+ * Return value: (element-type GData.GDReminder) (transfer none): a #GList of #GDataGDReminders, or %NULL
+ *
+ * Since: 0.4.0
+ */
+GList *
+gdata_gd_when_get_reminders (GDataGDWhen *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_WHEN (self), NULL);
+ return self->priv->reminders;
+}
+
+/**
+ * gdata_gd_when_add_reminder:
+ * @self: a #GDataGDWhen
+ * @reminder: a #GDataGDReminder to add
+ *
+ * Adds a reminder to the #GDataGDWhen's list of reminders and increments its reference count.
+ *
+ * Duplicate reminders will not be added to the list.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_gd_when_add_reminder (GDataGDWhen *self, GDataGDReminder *reminder)
+{
+ g_return_if_fail (GDATA_IS_GD_WHEN (self));
+ g_return_if_fail (GDATA_IS_GD_REMINDER (reminder));
+
+ if (g_list_find_custom (self->priv->reminders, reminder, (GCompareFunc) gdata_comparable_compare) == NULL)
+ self->priv->reminders = g_list_append (self->priv->reminders, g_object_ref (reminder));
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_GD_WHEN_H
+#define GDATA_GD_WHEN_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+#include <gdata/gd/gdata-gd-reminder.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_GD_EVENT_STATUS_CANCELED:
+ *
+ * The event has been canceled.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_EVENT_STATUS_CANCELED "http://schemas.google.com/g/2005#event.canceled"
+
+/**
+ * GDATA_GD_EVENT_STATUS_CONFIRMED:
+ *
+ * The event has been planned and confirmed.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_EVENT_STATUS_CONFIRMED "http://schemas.google.com/g/2005#event.confirmed"
+
+/**
+ * GDATA_GD_EVENT_STATUS_TENTATIVE:
+ *
+ * The event has been planned, but only tentatively scheduled.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_EVENT_STATUS_TENTATIVE "http://schemas.google.com/g/2005#event.tentative"
+
+/**
+ * GDATA_GD_EVENT_VISIBILITY_CONFIDENTIAL:
+ *
+ * The event is visible to only certain people.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_EVENT_VISIBILITY_CONFIDENTIAL "http://schemas.google.com/g/2005#event.confidential"
+
+/**
+ * GDATA_GD_EVENT_VISIBILITY_DEFAULT:
+ *
+ * The event's visibility is inherited from the preferences of its owner.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_EVENT_VISIBILITY_DEFAULT "http://schemas.google.com/g/2005#event.default"
+
+/**
+ * GDATA_GD_EVENT_VISIBILITY_PRIVATE:
+ *
+ * The event is visible to very few people.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_EVENT_VISIBILITY_PRIVATE "http://schemas.google.com/g/2005#event.private"
+
+/**
+ * GDATA_GD_EVENT_VISIBILITY_PUBLIC:
+ *
+ * The event is visible to most people.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_EVENT_VISIBILITY_PUBLIC "http://schemas.google.com/g/2005#event.public"
+
+/**
+ * GDATA_GD_EVENT_TRANSPARENCY_OPAQUE:
+ *
+ * The event consumes time in calendars; its time will be marked as busy in a free/busy search.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_EVENT_TRANSPARENCY_OPAQUE "http://schemas.google.com/g/2005#event.opaque"
+
+/**
+ * GDATA_GD_EVENT_TRANSPARENCY_TRANSPARENT:
+ *
+ * The event does not consume time in calendars; its time will be not marked as busy in a free/busy search.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_EVENT_TRANSPARENCY_TRANSPARENT "http://schemas.google.com/g/2005#event.transparent"
+
+#define GDATA_TYPE_GD_WHEN (gdata_gd_when_get_type ())
+#define GDATA_GD_WHEN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_GD_WHEN, GDataGDWhen))
+#define GDATA_GD_WHEN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_GD_WHEN, GDataGDWhenClass))
+#define GDATA_IS_GD_WHEN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_GD_WHEN))
+#define GDATA_IS_GD_WHEN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_GD_WHEN))
+#define GDATA_GD_WHEN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_GD_WHEN, GDataGDWhenClass))
+
+typedef struct _GDataGDWhenPrivate GDataGDWhenPrivate;
+
+/**
+ * GDataGDWhen:
+ *
+ * All the fields in the #GDataGDWhen structure are private and should never be accessed directly.
+ *
+ * Since: 0.2.0
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataGDWhenPrivate *priv;
+} GDataGDWhen;
+
+/**
+ * GDataGDWhenClass:
+ *
+ * All the fields in the #GDataGDWhenClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataGDWhenClass;
+
+GType gdata_gd_when_get_type (void) G_GNUC_CONST;
+
+GDataGDWhen *gdata_gd_when_new (gint64 start_time, gint64 end_time, gboolean is_date) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+gint64 gdata_gd_when_get_start_time (GDataGDWhen *self);
+void gdata_gd_when_set_start_time (GDataGDWhen *self, gint64 start_time);
+
+gint64 gdata_gd_when_get_end_time (GDataGDWhen *self);
+void gdata_gd_when_set_end_time (GDataGDWhen *self, gint64 end_time);
+
+gboolean gdata_gd_when_is_date (GDataGDWhen *self) G_GNUC_PURE;
+void gdata_gd_when_set_is_date (GDataGDWhen *self, gboolean is_date);
+
+const gchar *gdata_gd_when_get_value_string (GDataGDWhen *self) G_GNUC_PURE;
+void gdata_gd_when_set_value_string (GDataGDWhen *self, const gchar *value_string);
+
+GList *gdata_gd_when_get_reminders (GDataGDWhen *self) G_GNUC_PURE;
+void gdata_gd_when_add_reminder (GDataGDWhen *self, GDataGDReminder *reminder);
+/* TODO: More reminder API */
+
+G_END_DECLS
+
+#endif /* !GDATA_GD_WHEN_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-gd-where
+ * @short_description: GData where element
+ * @stability: Stable
+ * @include: gdata/gd/gdata-gd-where.h
+ *
+ * #GDataGDWhere represents a "where" element from the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdWhere">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+
+#include "gdata-gd-where.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-comparable.h"
+
+static void gdata_gd_where_comparable_init (GDataComparableIface *iface);
+static void gdata_gd_where_finalize (GObject *object);
+static void gdata_gd_where_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_gd_where_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+/*static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);*/
+static void pre_get_xml (GDataParsable *parsable, GString *xml_string);
+/*static void get_xml (GDataParsable *parsable, GString *xml_string);*/
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataGDWherePrivate {
+ gchar *relation_type;
+ gchar *value_string;
+ gchar *label;
+};
+
+enum {
+ PROP_RELATION_TYPE = 1,
+ PROP_VALUE_STRING,
+ PROP_LABEL
+};
+
+G_DEFINE_TYPE_WITH_CODE (GDataGDWhere, gdata_gd_where, GDATA_TYPE_PARSABLE,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_gd_where_comparable_init))
+
+static void
+gdata_gd_where_class_init (GDataGDWhereClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataGDWherePrivate));
+
+ gobject_class->get_property = gdata_gd_where_get_property;
+ gobject_class->set_property = gdata_gd_where_set_property;
+ gobject_class->finalize = gdata_gd_where_finalize;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ /*parsable_class->parse_xml = parse_xml;*/
+ parsable_class->pre_get_xml = pre_get_xml;
+ /*parsable_class->get_xml = get_xml;*/
+ parsable_class->get_namespaces = get_namespaces;
+ parsable_class->element_name = "where";
+ parsable_class->element_namespace = "gd";
+
+ /**
+ * GDataGDWhere:relation-type:
+ *
+ * Specifies the relationship between the containing entity and the contained location. For example: %GDATA_GD_WHERE_EVENT or
+ * %GDATA_GD_WHERE_EVENT_PARKING.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdWhere">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_RELATION_TYPE,
+ g_param_spec_string ("relation-type",
+ "Relation type", "Specifies the relationship between the container and the containee.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDWhere:value-string:
+ *
+ * A simple string representation of this location.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdWhere">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_VALUE_STRING,
+ g_param_spec_string ("value-string",
+ "Value string", "A simple string representation of this location.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDWhere:label:
+ *
+ * Specifies a user-readable label to distinguish this location from others.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdWhere">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LABEL,
+ g_param_spec_string ("label",
+ "Label", "Specifies a user-readable label to distinguish this location from others.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static gint
+compare_with (GDataComparable *self, GDataComparable *other)
+{
+ GDataGDWherePrivate *a = ((GDataGDWhere*) self)->priv, *b = ((GDataGDWhere*) other)->priv;
+
+ if (g_strcmp0 (a->value_string, b->value_string) == 0 && g_strcmp0 (a->label, b->label) == 0)
+ return 0;
+ return 1;
+}
+
+static void
+gdata_gd_where_comparable_init (GDataComparableIface *iface)
+{
+ iface->compare_with = compare_with;
+}
+
+static void
+gdata_gd_where_init (GDataGDWhere *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GD_WHERE, GDataGDWherePrivate);
+}
+
+static void
+gdata_gd_where_finalize (GObject *object)
+{
+ GDataGDWherePrivate *priv = GDATA_GD_WHERE (object)->priv;
+
+ g_free (priv->relation_type);
+ g_free (priv->value_string);
+ g_free (priv->label);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_gd_where_parent_class)->finalize (object);
+}
+
+static void
+gdata_gd_where_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataGDWherePrivate *priv = GDATA_GD_WHERE (object)->priv;
+
+ switch (property_id) {
+ case PROP_RELATION_TYPE:
+ g_value_set_string (value, priv->relation_type);
+ break;
+ case PROP_VALUE_STRING:
+ g_value_set_string (value, priv->value_string);
+ break;
+ case PROP_LABEL:
+ g_value_set_string (value, priv->label);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_gd_where_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataGDWhere *self = GDATA_GD_WHERE (object);
+
+ switch (property_id) {
+ case PROP_RELATION_TYPE:
+ gdata_gd_where_set_relation_type (self, g_value_get_string (value));
+ break;
+ case PROP_VALUE_STRING:
+ gdata_gd_where_set_value_string (self, g_value_get_string (value));
+ break;
+ case PROP_LABEL:
+ gdata_gd_where_set_label (self, g_value_get_string (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ xmlChar *rel;
+ GDataGDWherePrivate *priv = GDATA_GD_WHERE (parsable)->priv;
+
+ rel = xmlGetProp (root_node, (xmlChar*) "rel");
+ if (rel != NULL && *rel == '\0') {
+ xmlFree (rel);
+ return gdata_parser_error_required_property_missing (root_node, "rel", error);
+ }
+
+ priv->relation_type = (gchar*) rel;
+ priv->value_string = (gchar*) xmlGetProp (root_node, (xmlChar*) "valueString");
+ priv->label = (gchar*) xmlGetProp (root_node, (xmlChar*) "label");
+
+ return TRUE;
+}
+
+/*static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ GDataGDWherePrivate *priv = GDATA_GD_WHERE (parsable)->priv;
+
+ TODO: deal with the entryLink
+
+ return TRUE;
+}*/
+
+static void
+pre_get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataGDWherePrivate *priv = GDATA_GD_WHERE (parsable)->priv;
+
+ if (priv->label != NULL)
+ gdata_parser_string_append_escaped (xml_string, " label='", priv->label, "'");
+
+ if (priv->relation_type != NULL)
+ gdata_parser_string_append_escaped (xml_string, " rel='", priv->relation_type, "'");
+
+ if (priv->value_string != NULL)
+ gdata_parser_string_append_escaped (xml_string, " valueString='", priv->value_string, "'");
+}
+
+/*static void
+get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataGDWherePrivate *priv = GDATA_GD_WHERE (parsable)->priv;
+
+ TODO: deal with the entryLink
+}*/
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ g_hash_table_insert (namespaces, (gchar*) "gd", (gchar*) "http://schemas.google.com/g/2005");
+}
+
+/**
+ * gdata_gd_where_new:
+ * @relation_type: (allow-none): the relationship between the item and this place, or %NULL
+ * @value_string: (allow-none): a string to represent the place, or %NULL
+ * @label: (allow-none): a human-readable label for the place, or %NULL
+ *
+ * Creates a new #GDataGDWhere. More information is available in the <ulink type="http"
+ * url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdWhere">GData specification</ulink>.
+ *
+ * Currently, entryLink functionality is not implemented in #GDataGDWhere.
+ *
+ * Return value: a new #GDataGDWhere; unref with g_object_unref()
+ *
+ * Since: 0.2.0
+ */
+GDataGDWhere *
+gdata_gd_where_new (const gchar *relation_type, const gchar *value_string, const gchar *label)
+{
+ g_return_val_if_fail (relation_type == NULL || *relation_type != '\0', NULL);
+ return g_object_new (GDATA_TYPE_GD_WHERE, "relation-type", relation_type, "value-string", value_string, "label", label, NULL);
+}
+
+/**
+ * gdata_gd_where_get_relation_type:
+ * @self: a #GDataGDWhere
+ *
+ * Gets the #GDataGDWhere:relation-type property.
+ *
+ * Return value: the relation type, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_gd_where_get_relation_type (GDataGDWhere *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_WHERE (self), NULL);
+ return self->priv->relation_type;
+}
+
+/**
+ * gdata_gd_where_set_relation_type:
+ * @self: a #GDataGDWhere
+ * @relation_type: (allow-none): the new relation type, or %NULL
+ *
+ * Sets the #GDataGDWhere:relation-type property to @relation_type.
+ *
+ * Set @relation_type to %NULL to unset the property.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_where_set_relation_type (GDataGDWhere *self, const gchar *relation_type)
+{
+ g_return_if_fail (GDATA_IS_GD_WHERE (self));
+ g_return_if_fail (relation_type == NULL || *relation_type != '\0');
+
+ g_free (self->priv->relation_type);
+ self->priv->relation_type = g_strdup (relation_type);
+ g_object_notify (G_OBJECT (self), "relation-type");
+}
+
+/**
+ * gdata_gd_where_get_value_string:
+ * @self: a #GDataGDWhere
+ *
+ * Gets the #GDataGDWhere:value-string property.
+ *
+ * Return value: the value string, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_gd_where_get_value_string (GDataGDWhere *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_WHERE (self), NULL);
+ return self->priv->value_string;
+}
+
+/**
+ * gdata_gd_where_set_value_string:
+ * @self: a #GDataGDWhere
+ * @value_string: (allow-none): the new value string, or %NULL
+ *
+ * Sets the #GDataGDWhere:value-string property to @value_string.
+ *
+ * Set @value_string to %NULL to unset the property.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_where_set_value_string (GDataGDWhere *self, const gchar *value_string)
+{
+ g_return_if_fail (GDATA_IS_GD_WHERE (self));
+
+ g_free (self->priv->value_string);
+ self->priv->value_string = g_strdup (value_string);
+ g_object_notify (G_OBJECT (self), "value-string");
+}
+
+/**
+ * gdata_gd_where_get_label:
+ * @self: a #GDataGDWhere
+ *
+ * Gets the #GDataGDWhere:label property.
+ *
+ * Return value: the label, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_gd_where_get_label (GDataGDWhere *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_WHERE (self), NULL);
+ return self->priv->label;
+}
+
+/**
+ * gdata_gd_where_set_label:
+ * @self: a #GDataGDWhere
+ * @label: (allow-none): the new label, or %NULL
+ *
+ * Sets the #GDataGDWhere:label property to @label.
+ *
+ * Set @label to %NULL to unset the property.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_where_set_label (GDataGDWhere *self, const gchar *label)
+{
+ g_return_if_fail (GDATA_IS_GD_WHERE (self));
+
+ g_free (self->priv->label);
+ self->priv->label = g_strdup (label);
+ g_object_notify (G_OBJECT (self), "label");
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_GD_WHERE_H
+#define GDATA_GD_WHERE_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_GD_WHERE_EVENT:
+ *
+ * The relation type URI for an event location.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_WHERE_EVENT "http://schemas.google.com/g/2005#event"
+
+/**
+ * GDATA_GD_WHERE_EVENT_ALTERNATE:
+ *
+ * The relation type URI for an alternate event location, such as a video conference site.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_WHERE_EVENT_ALTERNATE "http://schemas.google.com/g/2005#event.alternate"
+
+/**
+ * GDATA_GD_WHERE_EVENT_PARKING:
+ *
+ * The relation type URI for an event's parking lot.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_WHERE_EVENT_PARKING "http://schemas.google.com/g/2005#event.parking"
+
+#define GDATA_TYPE_GD_WHERE (gdata_gd_where_get_type ())
+#define GDATA_GD_WHERE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_GD_WHERE, GDataGDWhere))
+#define GDATA_GD_WHERE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_GD_WHERE, GDataGDWhereClass))
+#define GDATA_IS_GD_WHERE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_GD_WHERE))
+#define GDATA_IS_GD_WHERE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_GD_WHERE))
+#define GDATA_GD_WHERE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_GD_WHERE, GDataGDWhereClass))
+
+typedef struct _GDataGDWherePrivate GDataGDWherePrivate;
+
+/**
+ * GDataGDWhere:
+ *
+ * All the fields in the #GDataGDWhere structure are private and should never be accessed directly.
+ *
+ * Since: 0.2.0
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataGDWherePrivate *priv;
+} GDataGDWhere;
+
+/**
+ * GDataGDWhereClass:
+ *
+ * All the fields in the #GDataGDWhereClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataGDWhereClass;
+
+GType gdata_gd_where_get_type (void) G_GNUC_CONST;
+
+GDataGDWhere *gdata_gd_where_new (const gchar *relation_type, const gchar *value_string, const gchar *label) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_gd_where_get_relation_type (GDataGDWhere *self) G_GNUC_PURE;
+void gdata_gd_where_set_relation_type (GDataGDWhere *self, const gchar *relation_type);
+
+const gchar *gdata_gd_where_get_value_string (GDataGDWhere *self) G_GNUC_PURE;
+void gdata_gd_where_set_value_string (GDataGDWhere *self, const gchar *value_string);
+
+const gchar *gdata_gd_where_get_label (GDataGDWhere *self) G_GNUC_PURE;
+void gdata_gd_where_set_label (GDataGDWhere *self, const gchar *label);
+
+G_END_DECLS
+
+#endif /* !GDATA_GD_WHERE_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-gd-who
+ * @short_description: GData who element
+ * @stability: Stable
+ * @include: gdata/gd/gdata-gd-who.h
+ *
+ * #GDataGDWho represents an "who" element from the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdWho">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+
+#include "gdata-gd-who.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-comparable.h"
+
+static void gdata_gd_who_comparable_init (GDataComparableIface *iface);
+static void gdata_gd_who_finalize (GObject *object);
+static void gdata_gd_who_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_gd_who_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+/*static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);*/
+static void pre_get_xml (GDataParsable *parsable, GString *xml_string);
+/*static void get_xml (GDataParsable *parsable, GString *xml_string);*/
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataGDWhoPrivate {
+ gchar *relation_type;
+ gchar *value_string;
+ gchar *email_address;
+};
+
+enum {
+ PROP_RELATION_TYPE = 1,
+ PROP_VALUE_STRING,
+ PROP_EMAIL_ADDRESS
+};
+
+G_DEFINE_TYPE_WITH_CODE (GDataGDWho, gdata_gd_who, GDATA_TYPE_PARSABLE,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_gd_who_comparable_init))
+
+static void
+gdata_gd_who_class_init (GDataGDWhoClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataGDWhoPrivate));
+
+ gobject_class->get_property = gdata_gd_who_get_property;
+ gobject_class->set_property = gdata_gd_who_set_property;
+ gobject_class->finalize = gdata_gd_who_finalize;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ /*parsable_class->parse_xml = parse_xml;*/
+ parsable_class->pre_get_xml = pre_get_xml;
+ /*parsable_class->get_xml = get_xml;*/
+ parsable_class->get_namespaces = get_namespaces;
+ parsable_class->element_name = "who";
+ parsable_class->element_namespace = "gd";
+
+ /**
+ * GDataGDWho:relation-type:
+ *
+ * Specifies the relationship between the containing entity and the contained person. For example: %GDATA_GD_WHO_EVENT_PERFORMER or
+ * %GDATA_GD_WHO_EVENT_ATTENDEE.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdWho">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_RELATION_TYPE,
+ g_param_spec_string ("relation-type",
+ "Relation type", "Specifies the relationship between the container and the containee.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDWho:value-string:
+ *
+ * A simple string representation of this person.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdWho">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_VALUE_STRING,
+ g_param_spec_string ("value-string",
+ "Value string", "A simple string representation of this person.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataGDWho:email-address:
+ *
+ * The e-mail address of the person represented by the #GDataGDWho.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdWho">GData specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_EMAIL_ADDRESS,
+ g_param_spec_string ("email-address",
+ "E-mail address", "The e-mail address of the person represented by the #GDataGDWho.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static gint
+compare_with (GDataComparable *self, GDataComparable *other)
+{
+ GDataGDWhoPrivate *a = ((GDataGDWho*) self)->priv, *b = ((GDataGDWho*) other)->priv;
+
+ if (g_strcmp0 (a->value_string, b->value_string) == 0 && g_strcmp0 (a->email_address, b->email_address) == 0)
+ return 0;
+ return 1;
+}
+
+static void
+gdata_gd_who_comparable_init (GDataComparableIface *iface)
+{
+ iface->compare_with = compare_with;
+}
+
+static void
+gdata_gd_who_init (GDataGDWho *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GD_WHO, GDataGDWhoPrivate);
+}
+
+static void
+gdata_gd_who_finalize (GObject *object)
+{
+ GDataGDWhoPrivate *priv = GDATA_GD_WHO (object)->priv;
+
+ g_free (priv->relation_type);
+ g_free (priv->value_string);
+ g_free (priv->email_address);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_gd_who_parent_class)->finalize (object);
+}
+
+static void
+gdata_gd_who_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataGDWhoPrivate *priv = GDATA_GD_WHO (object)->priv;
+
+ switch (property_id) {
+ case PROP_RELATION_TYPE:
+ g_value_set_string (value, priv->relation_type);
+ break;
+ case PROP_VALUE_STRING:
+ g_value_set_string (value, priv->value_string);
+ break;
+ case PROP_EMAIL_ADDRESS:
+ g_value_set_string (value, priv->email_address);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_gd_who_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataGDWho *self = GDATA_GD_WHO (object);
+
+ switch (property_id) {
+ case PROP_RELATION_TYPE:
+ gdata_gd_who_set_relation_type (self, g_value_get_string (value));
+ break;
+ case PROP_VALUE_STRING:
+ gdata_gd_who_set_value_string (self, g_value_get_string (value));
+ break;
+ case PROP_EMAIL_ADDRESS:
+ gdata_gd_who_set_email_address (self, g_value_get_string (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ xmlChar *rel, *email;
+ GDataGDWhoPrivate *priv = GDATA_GD_WHO (parsable)->priv;
+
+ rel = xmlGetProp (root_node, (xmlChar*) "rel");
+ if (rel != NULL && *rel == '\0') {
+ xmlFree (rel);
+ return gdata_parser_error_required_property_missing (root_node, "rel", error);
+ }
+
+ email = xmlGetProp (root_node, (xmlChar*) "email");
+ if (email != NULL && *email == '\0') {
+ xmlFree (rel);
+ xmlFree (email);
+ return gdata_parser_error_required_property_missing (root_node, "email", error);
+ }
+
+ priv->relation_type = (gchar*) rel;
+ priv->value_string = (gchar*) xmlGetProp (root_node, (xmlChar*) "valueString");
+ priv->email_address = (gchar*) email;
+
+ return TRUE;
+}
+
+/*static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ GDataGDWhoPrivate *priv = GDATA_GD_WHO (parsable)->priv;
+
+ TODO: deal with the attendeeType, attendeeStatus and entryLink
+
+ return TRUE;
+}*/
+
+static void
+pre_get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataGDWhoPrivate *priv = GDATA_GD_WHO (parsable)->priv;
+
+ if (priv->email_address != NULL)
+ gdata_parser_string_append_escaped (xml_string, " email='", priv->email_address, "'");
+ if (priv->relation_type != NULL)
+ gdata_parser_string_append_escaped (xml_string, " rel='", priv->relation_type, "'");
+ if (priv->value_string != NULL)
+ gdata_parser_string_append_escaped (xml_string, " valueString='", priv->value_string, "'");
+}
+
+/*static void
+get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataGDWhoPrivate *priv = GDATA_GD_WHO (parsable)->priv;
+
+ TODO: deal with the attendeeType, attendeeStatus and entryLink
+}*/
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ g_hash_table_insert (namespaces, (gchar*) "gd", (gchar*) "http://schemas.google.com/g/2005");
+}
+
+/**
+ * gdata_gd_who_new:
+ * @relation_type: (allow-none): the relationship between the item and this person, or %NULL
+ * @value_string: (allow-none): a string to represent the person, or %NULL
+ * @email_address: (allow-none): the person's e-mail address, or %NULL
+ *
+ * Creates a new #GDataGDWho. More information is available in the <ulink type="http"
+ * url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdWho">GData specification</ulink>.
+ *
+ * Currently, entryLink functionality is not implemented in #GDataGDWho.
+ *
+ * Return value: a new #GDataGDWho; unref with g_object_unref()
+ *
+ * Since: 0.2.0
+ */
+GDataGDWho *
+gdata_gd_who_new (const gchar *relation_type, const gchar *value_string, const gchar *email_address)
+{
+ g_return_val_if_fail (relation_type == NULL || *relation_type != '\0', NULL);
+ g_return_val_if_fail (email_address == NULL || *email_address != '\0', NULL);
+ return g_object_new (GDATA_TYPE_GD_WHO, "relation-type", relation_type, "value-string", value_string, "email-address", email_address, NULL);
+}
+
+/**
+ * gdata_gd_who_get_relation_type:
+ * @self: a #GDataGDWho
+ *
+ * Gets the #GDataGDWho:relation-type property.
+ *
+ * Return value: the relation type, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_gd_who_get_relation_type (GDataGDWho *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_WHO (self), NULL);
+ return self->priv->relation_type;
+}
+
+/**
+ * gdata_gd_who_set_relation_type:
+ * @self: a #GDataGDWho
+ * @relation_type: (allow-none): the new relation type, or %NULL
+ *
+ * Sets the #GDataGDWho:relation-type property to @relation_type.
+ *
+ * Set @relation_type to %NULL to unset the property.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_who_set_relation_type (GDataGDWho *self, const gchar *relation_type)
+{
+ g_return_if_fail (GDATA_IS_GD_WHO (self));
+ g_return_if_fail (relation_type == NULL || *relation_type != '\0');
+
+ g_free (self->priv->relation_type);
+ self->priv->relation_type = g_strdup (relation_type);
+ g_object_notify (G_OBJECT (self), "relation-type");
+}
+
+/**
+ * gdata_gd_who_get_value_string:
+ * @self: a #GDataGDWho
+ *
+ * Gets the #GDataGDWho:value-string property.
+ *
+ * Return value: the value string, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_gd_who_get_value_string (GDataGDWho *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_WHO (self), NULL);
+ return self->priv->value_string;
+}
+
+/**
+ * gdata_gd_who_set_value_string:
+ * @self: a #GDataGDWho
+ * @value_string: (allow-none): the new value string, or %NULL
+ *
+ * Sets the #GDataGDWho:value-string property to @value_string.
+ *
+ * Set @value_string to %NULL to unset the property.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_who_set_value_string (GDataGDWho *self, const gchar *value_string)
+{
+ g_return_if_fail (GDATA_IS_GD_WHO (self));
+
+ g_free (self->priv->value_string);
+ self->priv->value_string = g_strdup (value_string);
+ g_object_notify (G_OBJECT (self), "value-string");
+}
+
+/**
+ * gdata_gd_who_get_email_address:
+ * @self: a #GDataGDWho
+ *
+ * Gets the #GDataGDWho:email-address property.
+ *
+ * Return value: the e-mail address, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_gd_who_get_email_address (GDataGDWho *self)
+{
+ g_return_val_if_fail (GDATA_IS_GD_WHO (self), NULL);
+ return self->priv->email_address;
+}
+
+/**
+ * gdata_gd_who_set_email_address:
+ * @self: a #GDataGDWho
+ * @email_address: (allow-none): the new e-mail address, or %NULL
+ *
+ * Sets the #GDataGDWho:email-address property to @email_address.
+ *
+ * Set @email_address to %NULL to unset the property.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_gd_who_set_email_address (GDataGDWho *self, const gchar *email_address)
+{
+ g_return_if_fail (GDATA_IS_GD_WHO (self));
+ g_return_if_fail (email_address == NULL || *email_address != '\0');
+
+ g_free (self->priv->email_address);
+ self->priv->email_address = g_strdup (email_address);
+ g_object_notify (G_OBJECT (self), "email-address");
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_GD_WHO_H
+#define GDATA_GD_WHO_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_GD_WHO_EVENT_ATTENDEE:
+ *
+ * The relation type URI for a general meeting or event attendee.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_WHO_EVENT_ATTENDEE "http://schemas.google.com/g/2005#event.attendee"
+
+/**
+ * GDATA_GD_WHO_EVENT_ORGANIZER:
+ *
+ * The relation type URI for an event organizer (not necessarily an attendee).
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_WHO_EVENT_ORGANIZER "http://schemas.google.com/g/2005#event.organizer"
+
+/**
+ * GDATA_GD_WHO_EVENT_PERFORMER:
+ *
+ * The relation type URI for an event performer, which is similar to %GDATA_GD_WHO_EVENT_SPEAKER, but with more emphasis on art rather than speaking.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_WHO_EVENT_PERFORMER "http://schemas.google.com/g/2005#event.performer"
+
+/**
+ * GDATA_GD_WHO_EVENT_SPEAKER:
+ *
+ * The relation type URI for a speaker at an event.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_GD_WHO_EVENT_SPEAKER "http://schemas.google.com/g/2005#event.speaker"
+
+/* TODO: Message kind relation types (http://code.google.com/apis/gdata/docs/2.0/elements.html#gdWho) */
+
+#define GDATA_TYPE_GD_WHO (gdata_gd_who_get_type ())
+#define GDATA_GD_WHO(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_GD_WHO, GDataGDWho))
+#define GDATA_GD_WHO_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_GD_WHO, GDataGDWhoClass))
+#define GDATA_IS_GD_WHO(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_GD_WHO))
+#define GDATA_IS_GD_WHO_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_GD_WHO))
+#define GDATA_GD_WHO_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_GD_WHO, GDataGDWhoClass))
+
+typedef struct _GDataGDWhoPrivate GDataGDWhoPrivate;
+
+/**
+ * GDataGDWho:
+ *
+ * All the fields in the #GDataGDWho structure are private and should never be accessed directly.
+ *
+ * Since: 0.2.0
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataGDWhoPrivate *priv;
+} GDataGDWho;
+
+/**
+ * GDataGDWhoClass:
+ *
+ * All the fields in the #GDataGDWhoClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataGDWhoClass;
+
+GType gdata_gd_who_get_type (void) G_GNUC_CONST;
+
+GDataGDWho *gdata_gd_who_new (const gchar *relation_type, const gchar *value_string,
+ const gchar *email_address) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_gd_who_get_relation_type (GDataGDWho *self) G_GNUC_PURE;
+void gdata_gd_who_set_relation_type (GDataGDWho *self, const gchar *relation_type);
+
+const gchar *gdata_gd_who_get_value_string (GDataGDWho *self) G_GNUC_PURE;
+void gdata_gd_who_set_value_string (GDataGDWho *self, const gchar *value_string);
+
+const gchar *gdata_gd_who_get_email_address (GDataGDWho *self) G_GNUC_PURE;
+void gdata_gd_who_set_email_address (GDataGDWho *self, const gchar *email_address);
+
+G_END_DECLS
+
+#endif /* !GDATA_GD_WHO_H */
--- /dev/null
+headers = files(
+ 'gdata-gd-email-address.h',
+ 'gdata-gd-im-address.h',
+ 'gdata-gd-name.h',
+ 'gdata-gd-organization.h',
+ 'gdata-gd-phone-number.h',
+ 'gdata-gd-postal-address.h',
+ 'gdata-gd-reminder.h',
+ 'gdata-gd-when.h',
+ 'gdata-gd-where.h',
+ 'gdata-gd-who.h',
+)
+
+install_headers(
+ headers,
+ subdir: gdata_include_subdir / 'gd',
+)
+
+gir_headers += headers
+
+sources += files(
+ 'gdata-gd-email-address.c',
+ 'gdata-gd-feed-link.c',
+ 'gdata-gd-im-address.c',
+ 'gdata-gd-name.c',
+ 'gdata-gd-organization.c',
+ 'gdata-gd-phone-number.c',
+ 'gdata-gd-postal-address.c',
+ 'gdata-gd-reminder.c',
+ 'gdata-gd-when.c',
+ 'gdata-gd-where.c',
+ 'gdata-gd-who.c',
+)
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010, 2015 <philip@tecnocode.co.uk>
+ * Copyright (C) Red Hat, Inc. 2015
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-access-handler
+ * @short_description: GData access handler interface
+ * @stability: Stable
+ * @include: gdata/gdata-access-handler.h
+ *
+ * #GDataAccessHandler is an interface which can be implemented by #GDataEntrys which can have their permissions controlled by an
+ * access control list (ACL). It has a set of methods which allow the #GDataAccessRules for the access handler/entry to be retrieved,
+ * added, modified and deleted, with immediate effect.
+ *
+ * For an example of inserting an access rule into an ACL, see the documentation for #GDataAccessRule.
+ *
+ * When implementing the interface, classes must implement an <function>is_owner_rule</function> function. It's optional to implement a
+ * <function>get_authorization_domain</function> function, but if it's not implemented, any operations on the access handler's
+ * #GDataAccessRules will be performed unauthorized (i.e. as if by a non-logged-in user). This will not usually work.
+ *
+ * Since: 0.3.0
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+
+#include "gdata-access-handler.h"
+#include "gdata-private.h"
+#include "gdata-access-rule.h"
+
+static GDataFeed *
+gdata_access_handler_real_get_rules (GDataAccessHandler *self,
+ GDataService *service,
+ GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback,
+ gpointer progress_user_data,
+ GError **error);
+
+typedef GDataAccessHandlerIface GDataAccessHandlerInterface;
+G_DEFINE_INTERFACE (GDataAccessHandler, gdata_access_handler,
+ GDATA_TYPE_ENTRY);
+
+static void
+gdata_access_handler_default_init (GDataAccessHandlerInterface *iface)
+{
+ iface->get_rules = gdata_access_handler_real_get_rules;
+}
+
+typedef struct {
+ GDataService *service;
+ GDataQueryProgressCallback progress_callback;
+ gpointer progress_user_data;
+ GDestroyNotify destroy_progress_user_data;
+} GetRulesAsyncData;
+
+static void
+get_rules_async_data_free (GetRulesAsyncData *self)
+{
+ if (self->service != NULL)
+ g_object_unref (self->service);
+
+ g_slice_free (GetRulesAsyncData, self);
+}
+
+static GDataFeed *
+gdata_access_handler_real_get_rules (GDataAccessHandler *self,
+ GDataService *service,
+ GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback,
+ gpointer progress_user_data,
+ GError **error)
+{
+ GDataAccessHandlerIface *iface;
+ GDataAuthorizationDomain *domain = NULL;
+ GDataFeed *feed;
+ GDataLink *_link;
+ SoupMessage *message;
+ SoupMessageHeaders *headers;
+ const gchar *content_type;
+
+ _link = gdata_entry_look_up_link (GDATA_ENTRY (self), GDATA_LINK_ACCESS_CONTROL_LIST);
+ g_assert (_link != NULL);
+
+ iface = GDATA_ACCESS_HANDLER_GET_IFACE (self);
+ if (iface->get_authorization_domain != NULL) {
+ domain = iface->get_authorization_domain (self);
+ }
+
+ message = _gdata_service_query (service, domain, gdata_link_get_uri (_link), NULL, cancellable, error);
+ if (message == NULL) {
+ return NULL;
+ }
+
+ g_assert (message->response_body->data != NULL);
+
+ headers = message->response_headers;
+ content_type = soup_message_headers_get_content_type (headers, NULL);
+
+ if (g_strcmp0 (content_type, "application/json") == 0) {
+ /* Definitely JSON. */
+ g_debug("JSON content type detected.");
+ feed = _gdata_feed_new_from_json (GDATA_TYPE_FEED, message->response_body->data, message->response_body->length, GDATA_TYPE_ACCESS_RULE,
+ progress_callback, progress_user_data, error);
+ } else {
+ /* Potentially XML. Don't bother checking the Content-Type, since the parser
+ * will fail gracefully if the response body is not valid XML. */
+ g_debug("XML content type detected.");
+ feed = _gdata_feed_new_from_xml (GDATA_TYPE_FEED, message->response_body->data, message->response_body->length, GDATA_TYPE_ACCESS_RULE,
+ progress_callback, progress_user_data, error);
+ }
+
+ g_object_unref (message);
+
+ return feed;
+}
+
+static void
+get_rules_thread (GTask *task, gpointer source_object, gpointer task_data, GCancellable *cancellable)
+{
+ GDataAccessHandler *access_handler = GDATA_ACCESS_HANDLER (source_object);
+ GDataAccessHandlerIface *iface;
+ g_autoptr(GError) error = NULL;
+ g_autoptr(GDataFeed) feed = NULL;
+ GetRulesAsyncData *data = task_data;
+
+ /* Execute the query and return */
+ iface = GDATA_ACCESS_HANDLER_GET_IFACE (access_handler);
+ g_assert (iface->get_rules != NULL);
+
+ feed = iface->get_rules (access_handler, data->service,
+ cancellable, data->progress_callback,
+ data->progress_user_data, &error);
+
+ if (feed == NULL && error != NULL)
+ g_task_return_error (task, g_steal_pointer (&error));
+ else
+ g_task_return_pointer (task, g_steal_pointer (&feed), g_object_unref);
+
+ if (data->destroy_progress_user_data != NULL) {
+ data->destroy_progress_user_data (data->progress_user_data);
+ }
+}
+
+/**
+ * gdata_access_handler_get_rules_async:
+ * @self: a #GDataAccessHandler
+ * @service: a #GDataService
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (closure progress_user_data): a #GDataQueryProgressCallback to call when a rule is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @destroy_progress_user_data: (allow-none): the function to call when @progress_callback will not be called any more, or %NULL. This function will be
+ * called with @progress_user_data as a parameter and can be used to free any memory allocated for it.
+ * @callback: a #GAsyncReadyCallback to call when the query is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Retrieves a #GDataFeed containing all the access rules which apply to the given #GDataAccessHandler. Only the owner of a #GDataAccessHandler may
+ * view its rule feed. @self and @service are both reffed when this function is called, so can safely be unreffed after this function returns.
+ *
+ * For more details, see gdata_access_handler_get_rules(), which is the synchronous version of this function, and gdata_service_query_async(), which
+ * is the base asynchronous query function.
+ *
+ * When the operation is finished, @callback will be called. You can then call gdata_service_query_finish()
+ * to get the results of the operation.
+ *
+ * Since: 0.9.1
+ */
+void
+gdata_access_handler_get_rules_async (GDataAccessHandler *self, GDataService *service, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_autoptr(GTask) task = NULL;
+ GetRulesAsyncData *data;
+
+ g_return_if_fail (GDATA_IS_ACCESS_HANDLER (self));
+ g_return_if_fail (GDATA_IS_SERVICE (service));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+ g_return_if_fail (callback != NULL);
+
+ data = g_slice_new (GetRulesAsyncData);
+ data->service = g_object_ref (service);
+ data->progress_callback = progress_callback;
+ data->progress_user_data = progress_user_data;
+ data->destroy_progress_user_data = destroy_progress_user_data;
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_service_query_async);
+ g_task_set_task_data (task, g_steal_pointer (&data), (GDestroyNotify) get_rules_async_data_free);
+ g_task_run_in_thread (task, get_rules_thread);
+}
+
+/**
+ * gdata_access_handler_get_rules:
+ * @self: a #GDataAccessHandler
+ * @service: a #GDataService
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (scope call) (closure progress_user_data): a #GDataQueryProgressCallback to call when a rule is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @error: a #GError, or %NULL
+ *
+ * Retrieves a #GDataFeed containing all the access rules which apply to the given #GDataAccessHandler. Only the owner of a #GDataAccessHandler may
+ * view its rule feed.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by triggering the @cancellable object from another thread.
+ * If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * A %GDATA_SERVICE_ERROR_PROTOCOL_ERROR will be returned if the server indicates there is a problem with the query.
+ *
+ * For each rule in the response feed, @progress_callback will be called in the main thread. If there was an error parsing the XML response,
+ * a #GDataParserError will be returned.
+ *
+ * Return value: (transfer full): a #GDataFeed of access control rules, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.3.0
+ */
+GDataFeed *
+gdata_access_handler_get_rules (GDataAccessHandler *self, GDataService *service, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error)
+{
+ GDataAccessHandlerIface *iface;
+
+ g_return_val_if_fail (GDATA_IS_ACCESS_HANDLER (self), NULL);
+ g_return_val_if_fail (GDATA_IS_SERVICE (service), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ iface = GDATA_ACCESS_HANDLER_GET_IFACE (self);
+ g_assert (iface->get_rules != NULL);
+
+ return iface->get_rules (self, service, cancellable, progress_callback,
+ progress_user_data, error);
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009, 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_ACCESS_HANDLER_H
+#define GDATA_ACCESS_HANDLER_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-feed.h>
+#include <gdata/gdata-service.h>
+#include <gdata/gdata-access-rule.h>
+#include <gdata/gdata-authorization-domain.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_LINK_ACCESS_CONTROL_LIST:
+ *
+ * The relation type URI of the access control list location for this resource.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/calendar/data/2.0/developers_guide_protocol.html#SharingACalendar">ACL specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_LINK_ACCESS_CONTROL_LIST "http://schemas.google.com/acl/2007#accessControlList"
+
+#define GDATA_TYPE_ACCESS_HANDLER (gdata_access_handler_get_type ())
+#define GDATA_ACCESS_HANDLER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_ACCESS_HANDLER, GDataAccessHandler))
+#define GDATA_ACCESS_HANDLER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_ACCESS_HANDLER, GDataAccessHandlerIface))
+#define GDATA_IS_ACCESS_HANDLER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_ACCESS_HANDLER))
+#define GDATA_ACCESS_HANDLER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), GDATA_TYPE_ACCESS_HANDLER, GDataAccessHandlerIface))
+
+/**
+ * GDataAccessHandler:
+ *
+ * All the fields in the #GDataAccessHandler structure are private and should never be accessed directly.
+ *
+ * Since: 0.3.0
+ */
+typedef struct _GDataAccessHandler GDataAccessHandler; /* dummy typedef */
+
+/**
+ * GDataAccessHandlerIface:
+ * @parent: the parent type
+ * @is_owner_rule: a function to return whether the given #GDataAccessRule has the role of an owner (of a #GDataAccessHandler).
+ * @get_authorization_domain: (allow-none): a function to return the #GDataAuthorizationDomain to be used for all operations on the access rules
+ * belonging to this access handler; not implementing this function is equivalent to returning %NULL from it, which signifies that operations on the
+ * access rules don't require authorization; new in version 0.9.0
+ * @get_rules: (nullable): a function to query, parse and return a #GDataFeed of
+ * #GDataAccessRules for a given entry — the virtual function for
+ * gdata_access_handler_get_rules(); new in version 0.17.2
+ *
+ * The class structure for the #GDataAccessHandler interface.
+ *
+ * Since: 0.9.0
+ */
+typedef struct {
+ GTypeInterface parent;
+
+ gboolean (*is_owner_rule) (GDataAccessRule *rule);
+ GDataAuthorizationDomain *(*get_authorization_domain) (GDataAccessHandler *self);
+
+ GDataFeed *(*get_rules) (GDataAccessHandler *self,
+ GDataService *service,
+ GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback,
+ gpointer progress_user_data,
+ GError **error);
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved1) (void);
+ void (*_g_reserved2) (void);
+ void (*_g_reserved3) (void);
+ void (*_g_reserved4) (void);
+ void (*_g_reserved5) (void);
+} GDataAccessHandlerIface;
+
+GType gdata_access_handler_get_type (void) G_GNUC_CONST;
+
+GDataFeed *gdata_access_handler_get_rules (GDataAccessHandler *self, GDataService *service, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_access_handler_get_rules_async (GDataAccessHandler *self, GDataService *service, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
+ GAsyncReadyCallback callback, gpointer user_data);
+
+G_END_DECLS
+
+#endif /* !GDATA_ACCESS_HANDLER_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Thibault Saunier 2009 <saunierthibault@gmail.com>
+ * Copyright (C) Philip Withnall 2009–2010, 2014 <philip@tecnocode.co.uk>
+ * Copyright (C) Red Hat, Inc. 2015
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-access-rule
+ * @short_description: GData access rule object
+ * @stability: Stable
+ * @include: gdata/gdata-access-rule.h
+ *
+ * #GDataAccessRule is a subclass of #GDataEntry to represent a generic access rule from an access control list (ACL).
+ * It is returned by the ACL methods implemented in the #GDataAccessHandler interface.
+ *
+ * Access rules should be inserted to the %GDATA_LINK_ACCESS_CONTROL_LIST URI of the feed or entry they should be applied to. This will return a
+ * %GDATA_SERVICE_ERROR_CONFLICT error if a rule already exists on that feed or entry for that scope type and value.
+ *
+ * <example>
+ * <title>Adding a Rule to the Access Control List for an Entry</title>
+ * <programlisting>
+ * GDataAuthorizationDomain *domain;
+ * GDataService *service;
+ * GDataEntry *entry;
+ * GDataFeed *acl_feed;
+ * GDataAccessRule *rule, *new_rule;
+ * GError *error = NULL;
+ *
+ * domain = gdata_documents_service_get_primary_authorization_domain ();
+ *
+ * /<!-- -->* Retrieve a GDataEntry which will have a new rule inserted into its ACL. *<!-- -->/
+ * service = build_my_service ();
+ * entry = get_the_entry (service);
+ *
+ * /<!-- -->* Create and insert a new access rule for example@gmail.com which grants them _no_ permissions on the entry.
+ * * In a real application, the GDataEntry subclass would define its own access roles which are more useful. For example,
+ * * GDataDocumentsEntry defines access roles for users who can read (but not write) a Google Document, and users who
+ * * can also write to the document. *<!-- -->/
+ * rule = gdata_access_rule_new (NULL);
+ * gdata_access_rule_set_role (rule, GDATA_ACCESS_ROLE_NONE); /<!-- -->* or, for example, GDATA_DOCUMENTS_ACCESS_ROLE_READER *<!-- -->/
+ * gdata_access_rule_set_scope (rule, GDATA_ACCESS_SCOPE_USER, "example@gmail.com"); /<!-- -->* e-mail address of the user the ACL applies to *<!-- -->/
+ *
+ * acl_link = gdata_entry_look_up_link (entry, GDATA_LINK_ACCESS_CONTROL_LIST);
+ * new_rule = GDATA_ACCESS_RULE (gdata_service_insert_entry (GDATA_SERVICE (service), domain, gdata_link_get_uri (acl_link),
+ * GDATA_ENTRY (rule), NULL, &error));
+ *
+ * g_object_unref (rule);
+ * g_object_unref (entry);
+ * g_object_unref (service);
+ *
+ * if (error != NULL) {
+ * g_error ("Error inserting access rule: %s", error->message);
+ * g_error_free (error);
+ * return;
+ * }
+ *
+ * /<!-- -->* Potentially do something with the new_rule here, such as store its ID for later use. *<!-- -->/
+ *
+ * g_object_unref (new_rule);
+ * </programlisting>
+ * </example>
+ *
+ * Since: 0.3.0
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <libxml/parser.h>
+#include <string.h>
+
+#include "gdata-access-rule.h"
+#include "gdata-parser.h"
+#include "gdata-types.h"
+#include "gdata-private.h"
+
+static GObject *gdata_access_rule_constructor (GType type, guint n_construct_params, GObjectConstructParam *construct_params);
+static void gdata_access_rule_finalize (GObject *object);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+static void get_xml (GDataParsable *parsable, GString *xml_string);
+static void gdata_access_rule_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void gdata_access_rule_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error);
+static gboolean post_parse_xml (GDataParsable *parsable, gpointer user_data, GError **error);
+
+struct _GDataAccessRulePrivate {
+ gchar *role;
+ gchar *scope_type;
+ gchar *scope_value;
+ gint64 edited;
+ gchar *key;
+};
+
+enum {
+ PROP_ROLE = 1,
+ PROP_SCOPE_TYPE,
+ PROP_SCOPE_VALUE,
+ PROP_EDITED,
+ PROP_ETAG,
+ PROP_KEY,
+};
+
+G_DEFINE_TYPE (GDataAccessRule, gdata_access_rule, GDATA_TYPE_ENTRY)
+
+static void
+gdata_access_rule_class_init (GDataAccessRuleClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+ GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataAccessRulePrivate));
+
+ gobject_class->constructor = gdata_access_rule_constructor;
+ gobject_class->finalize = gdata_access_rule_finalize;
+ gobject_class->get_property = gdata_access_rule_get_property;
+ gobject_class->set_property = gdata_access_rule_set_property;
+
+ parsable_class->parse_xml = parse_xml;
+ parsable_class->post_parse_xml = post_parse_xml;
+ parsable_class->get_xml = get_xml;
+ parsable_class->get_namespaces = get_namespaces;
+
+ entry_class->kind_term = "http://schemas.google.com/acl/2007#accessRule";
+
+ /**
+ * GDataAccessRule:role:
+ *
+ * The role of the person concerned by this ACL. By default, this can only be %GDATA_ACCESS_ROLE_NONE. Services may extend it with
+ * their own namespaced roles.
+ *
+ * Since: 0.3.0
+ */
+ g_object_class_install_property (gobject_class, PROP_ROLE,
+ g_param_spec_string ("role",
+ "Role", "The role of the person concerned by this ACL.",
+ GDATA_ACCESS_ROLE_NONE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataAccessRule:scope-type:
+ *
+ * Specifies to whom this access rule applies. For example, %GDATA_ACCESS_SCOPE_USER or %GDATA_ACCESS_SCOPE_DEFAULT.
+ *
+ * Since: 0.3.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SCOPE_TYPE,
+ g_param_spec_string ("scope-type",
+ "Scope type", "Specifies to whom this access rule applies.",
+ GDATA_ACCESS_SCOPE_DEFAULT,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataAccessRule:scope-value:
+ *
+ * A value representing the user who is represented by the access rule, such as an
+ * e-mail address for users, or a domain name for domains.
+ *
+ * This must be %NULL if and only if #GDataAccessRule:scope-type is %GDATA_ACCESS_SCOPE_DEFAULT.
+ *
+ * Since: 0.3.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SCOPE_VALUE,
+ g_param_spec_string ("scope-value",
+ "Scope value", "The scope value for this access rule.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataAccessRule:edited:
+ *
+ * The last time the access rule was edited. If the rule has not been edited yet, the content indicates the time it was created.
+ *
+ * For more information, see the <ulink type="http" url="http://www.atomenabled.org/developers/protocol/#appEdited">
+ * Atom Publishing Protocol specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_EDITED,
+ g_param_spec_int64 ("edited",
+ "Edited", "The last time the access rule was edited.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataAccessRule:key:
+ *
+ * An optional authorisation key required to access this item with the given scope. If set, this restricts
+ * access to those principals who have a copy of the key. The key is generated server-side and cannot be
+ * modified by the client. If no authorisation key is set (and hence none is needed for access to the item),
+ * this will be %NULL.
+ *
+ * Since: 0.16.0
+ */
+ g_object_class_install_property (gobject_class, PROP_KEY,
+ g_param_spec_string ("key",
+ "Key", "An optional authorisation key required to access this item.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /* Override the ETag property since ETags don't seem to be supported for ACL entries. TODO: Investigate this further (might only be
+ * unsupported for Google Calendar). */
+ g_object_class_override_property (gobject_class, PROP_ETAG, "etag");
+}
+
+static void notify_role_cb (GDataAccessRule *self, GParamSpec *pspec, gpointer user_data);
+
+static void
+notify_title_cb (GDataAccessRule *self, GParamSpec *pspec, gpointer user_data)
+{
+ /* Update GDataAccessRule:role */
+ g_signal_handlers_block_by_func (self, notify_role_cb, self);
+ gdata_access_rule_set_role (self, gdata_entry_get_title (GDATA_ENTRY (self)));
+ g_signal_handlers_unblock_by_func (self, notify_role_cb, self);
+}
+
+static void
+notify_role_cb (GDataAccessRule *self, GParamSpec *pspec, gpointer user_data)
+{
+ /* Update GDataEntry:title */
+ g_signal_handlers_block_by_func (self, notify_title_cb, self);
+ gdata_entry_set_title (GDATA_ENTRY (self), gdata_access_rule_get_role (self));
+ g_signal_handlers_unblock_by_func (self, notify_title_cb, self);
+}
+
+static void
+gdata_access_rule_init (GDataAccessRule *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_ACCESS_RULE, GDataAccessRulePrivate);
+ self->priv->edited = -1;
+
+ /* Listen to change notifications for the entry's title, since it's linked to GDataAccessRule:role */
+ g_signal_connect (self, "notify::title", (GCallback) notify_title_cb, self);
+ g_signal_connect (self, "notify::role", (GCallback) notify_role_cb, self);
+}
+
+static GObject *
+gdata_access_rule_constructor (GType type, guint n_construct_params, GObjectConstructParam *construct_params)
+{
+ GObject *object;
+
+ /* Chain up to the parent class */
+ object = G_OBJECT_CLASS (gdata_access_rule_parent_class)->constructor (type, n_construct_params, construct_params);
+
+ /* We can't create these in init, or they would collide with the group and control created when parsing the XML */
+ if (_gdata_parsable_is_constructed_from_xml (GDATA_PARSABLE (object)) == FALSE) {
+ GDataAccessRulePrivate *priv = GDATA_ACCESS_RULE (object)->priv;
+ GTimeVal time_val;
+
+ /* Set the edited property to the current time (creation time). We don't do this in *_init() since that would cause
+ * setting it from parse_xml() to fail (duplicate element). */
+ g_get_current_time (&time_val);
+ priv->edited = time_val.tv_sec;
+
+ /* Set up the role and scope type */
+ priv->role = g_strdup (GDATA_ACCESS_ROLE_NONE);
+ priv->scope_type = g_strdup (GDATA_ACCESS_SCOPE_DEFAULT);
+ }
+
+ return object;
+}
+
+static void
+gdata_access_rule_finalize (GObject *object)
+{
+ GDataAccessRulePrivate *priv = GDATA_ACCESS_RULE (object)->priv;
+
+ g_free (priv->role);
+ g_free (priv->scope_type);
+ g_free (priv->scope_value);
+ g_free (priv->key);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_access_rule_parent_class)->finalize (object);
+}
+
+static void
+gdata_access_rule_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataAccessRulePrivate *priv = GDATA_ACCESS_RULE (object)->priv;
+
+ switch (property_id) {
+ case PROP_ROLE:
+ g_value_set_string (value, priv->role);
+ break;
+ case PROP_SCOPE_TYPE:
+ g_value_set_string (value, priv->scope_type);
+ break;
+ case PROP_SCOPE_VALUE:
+ g_value_set_string (value, priv->scope_value);
+ break;
+ case PROP_EDITED:
+ g_value_set_int64 (value, priv->edited);
+ break;
+ case PROP_ETAG:
+ /* Never return an ETag */
+ g_value_set_string (value, NULL);
+ break;
+ case PROP_KEY:
+ g_value_set_string (value, priv->key);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_access_rule_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataAccessRule *self = GDATA_ACCESS_RULE (object);
+
+ switch (property_id) {
+ case PROP_ROLE:
+ gdata_access_rule_set_role (self, g_value_get_string (value));
+ break;
+ case PROP_SCOPE_TYPE:
+ g_free (self->priv->scope_type);
+ self->priv->scope_type = g_value_dup_string (value);
+ g_object_notify (object, "scope-type");
+ break;
+ case PROP_SCOPE_VALUE:
+ g_free (self->priv->scope_value);
+ self->priv->scope_value = g_value_dup_string (value);
+ g_object_notify (object, "scope-value");
+ break;
+ case PROP_ETAG:
+ /* Never set an ETag (note that this doesn't stop it being set in GDataEntry due to XML parsing) */
+ break;
+ case PROP_KEY:
+ /* Read only; fall through */
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ gboolean success;
+ GDataAccessRule *self = GDATA_ACCESS_RULE (parsable);
+
+ if (gdata_parser_is_namespace (node, "http://www.w3.org/2007/app") == TRUE &&
+ gdata_parser_int64_time_from_element (node, "edited", P_REQUIRED | P_NO_DUPES, &(self->priv->edited), &success, error) == TRUE) {
+ return success;
+ } else if (gdata_parser_is_namespace (node, "http://schemas.google.com/acl/2007") == TRUE) {
+ if (xmlStrcmp (node->name, (xmlChar*) "role") == 0) {
+ /* gAcl:role */
+ xmlChar *role = xmlGetProp (node, (xmlChar*) "value");
+ if (role == NULL || *role == '\0') {
+ xmlFree (role);
+ return gdata_parser_error_required_property_missing (node, "value", error);
+ }
+ self->priv->role = (gchar*) role;
+ } else if (xmlStrcmp (node->name, (xmlChar*) "scope") == 0) {
+ /* gAcl:scope */
+ xmlChar *scope_type, *scope_value;
+
+ scope_type = xmlGetProp (node, (xmlChar*) "type");
+ if (scope_type == NULL || *scope_type == '\0') {
+ xmlFree (scope_type);
+ return gdata_parser_error_required_property_missing (node, "type", error);
+ }
+
+ scope_value = xmlGetProp (node, (xmlChar*) "value");
+
+ /* The @value property is required for all scope types except "default".
+ * See: https://developers.google.com/google-apps/calendar/v2/reference#gacl_reference */
+ if (xmlStrcmp (scope_type, (xmlChar*) GDATA_ACCESS_SCOPE_DEFAULT) != 0 && scope_value == NULL) {
+ xmlFree (scope_type);
+ return gdata_parser_error_required_property_missing (node, "value", error);
+ }
+
+ self->priv->scope_type = (gchar*) scope_type;
+ self->priv->scope_value = (gchar*) scope_value;
+ } else if (xmlStrcmp (node->name, (xmlChar*) "withKey") == 0) {
+ /* gAcl:withKey */
+ gboolean found_role = FALSE;
+ xmlNode *child;
+ xmlChar *key;
+
+ /* Extract the key. */
+ key = xmlGetProp (node, (xmlChar *) "key");
+ if (key == NULL) {
+ return gdata_parser_error_required_property_missing (node, "key", error);
+ }
+
+ self->priv->key = (gchar *) key;
+
+ /* Look for a gAcl:role child element. */
+ for (child = node->children; child != NULL; child = child->next) {
+ if (xmlStrcmp (child->name, (xmlChar*) "role") == 0) {
+ xmlChar *role = xmlGetProp (child, (xmlChar *) "value");
+ if (role == NULL) {
+ return gdata_parser_error_required_property_missing (child, "value", error);
+ }
+
+ self->priv->role = (gchar *) role;
+ found_role = TRUE;
+ } else {
+ /* TODO: this logic copied from gdata-parsable.c. Re-evaluate this at some point in the future.
+ * If GeoRSS and GML support were to be used more widely, it might due to implement GML objects. */
+ xmlBuffer *buffer;
+
+ /* Unhandled XML */
+ buffer = xmlBufferCreate ();
+ xmlNodeDump (buffer, doc, child, 0, 0);
+ g_debug ("Unhandled XML in <gAcl:withKey>: %s", (gchar *) xmlBufferContent (buffer));
+ xmlBufferFree (buffer);
+ }
+ }
+
+ if (!found_role) {
+ return gdata_parser_error_required_element_missing ("role", "gAcl:withKey", error);
+ }
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_access_rule_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ }
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_access_rule_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ }
+
+ return TRUE;
+}
+
+static gboolean
+post_parse_xml (GDataParsable *parsable, gpointer user_data, GError **error)
+{
+ GDataAccessRulePrivate *priv = GDATA_ACCESS_RULE (parsable)->priv;
+
+ /* Check for missing required elements */
+ if (gdata_entry_get_title (GDATA_ENTRY (parsable)) == NULL || *gdata_entry_get_title (GDATA_ENTRY (parsable)) == '\0')
+ return gdata_parser_error_required_element_missing ("role", "entry", error);
+ if (priv->scope_type == NULL)
+ return gdata_parser_error_required_element_missing ("scope", "entry", error);
+
+ return TRUE;
+}
+
+static void
+get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataAccessRulePrivate *priv = GDATA_ACCESS_RULE (parsable)->priv;
+
+ /* Chain up to the parent class */
+ GDATA_PARSABLE_CLASS (gdata_access_rule_parent_class)->get_xml (parsable, xml_string);
+
+ if (priv->key != NULL) {
+ /* gAcl:withKey; has to wrap gAcl:role */
+ gdata_parser_string_append_escaped (xml_string, "<gAcl:withKey key='", priv->key, "'>");
+ }
+
+ if (priv->role != NULL) {
+ /* gAcl:role */
+ gdata_parser_string_append_escaped (xml_string, "<gAcl:role value='", priv->role, "'/>");
+ }
+
+ if (priv->key != NULL) {
+ g_string_append (xml_string, "</gAcl:withKey>");
+ }
+
+ if (priv->scope_value != NULL) {
+ /* gAcl:scope */
+ if (priv->scope_type != NULL) {
+ gdata_parser_string_append_escaped (xml_string, "<gAcl:scope type='", priv->scope_type, "'");
+ gdata_parser_string_append_escaped (xml_string, " value='", priv->scope_value, "'/>");
+ } else {
+ gdata_parser_string_append_escaped (xml_string, "<gAcl:scope value='", priv->scope_value, "'/>");
+ }
+ } else {
+ /* gAcl:scope of type GDATA_ACCESS_SCOPE_DEFAULT. */
+ g_assert (priv->scope_type != NULL && strcmp (priv->scope_type, GDATA_ACCESS_SCOPE_DEFAULT) == 0);
+ g_string_append (xml_string, "<gAcl:scope type='default'/>");
+ }
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ /* Chain up to the parent class */
+ GDATA_PARSABLE_CLASS (gdata_access_rule_parent_class)->get_namespaces (parsable, namespaces);
+
+ g_hash_table_insert (namespaces, (gchar*) "gAcl", (gchar*) "http://schemas.google.com/acl/2007");
+}
+
+/**
+ * gdata_access_rule_new:
+ * @id: the access rule's ID, or %NULL
+ *
+ * Creates a new #GDataAccessRule with the given ID and default properties.
+ *
+ * Return value: a new #GDataAccessRule; unref with g_object_unref()
+ *
+ * Since: 0.3.0
+ */
+GDataAccessRule *
+gdata_access_rule_new (const gchar *id)
+{
+ return GDATA_ACCESS_RULE (g_object_new (GDATA_TYPE_ACCESS_RULE, "id", id, NULL));
+}
+
+/**
+ * gdata_access_rule_set_role:
+ * @self: a #GDataAccessRule
+ * @role: a new role, or %NULL
+ *
+ * Sets the #GDataAccessRule:role property to @role. @role must be a non-empty string, such as %GDATA_ACCESS_ROLE_NONE.
+ *
+ * Set @role to %NULL to unset the property in the access rule.
+ *
+ * Since: 0.3.0
+ */
+void
+gdata_access_rule_set_role (GDataAccessRule *self, const gchar *role)
+{
+ g_return_if_fail (GDATA_IS_ACCESS_RULE (self));
+ g_return_if_fail (role == NULL || *role != '\0');
+
+ g_free (self->priv->role);
+ self->priv->role = g_strdup (role);
+ g_object_notify (G_OBJECT (self), "role");
+}
+
+/**
+ * gdata_access_rule_get_role:
+ * @self: a #GDataAccessRule
+ *
+ * Gets the #GDataAccessRule:role property.
+ *
+ * Return value: the access rule's role, or %NULL
+ *
+ * Since: 0.3.0
+ */
+const gchar *
+gdata_access_rule_get_role (GDataAccessRule *self)
+{
+ g_return_val_if_fail (GDATA_IS_ACCESS_RULE (self), NULL);
+ return self->priv->role;
+}
+
+
+/**
+ * gdata_access_rule_set_scope:
+ * @self: a #GDataAccessRule
+ * @type: a new scope type
+ * @value: (allow-none): a new scope value, or %NULL
+ *
+ * Sets the #GDataAccessRule:scope-type property to @type and the #GDataAccessRule:scope-value property to @value.
+ *
+ * Set @scope_value to %NULL to unset the #GDataAccessRule:scope-value property in the access rule. @type cannot
+ * be %NULL. @scope_value must be %NULL if @type is <literal>default</literal>, and non-%NULL otherwise.
+ *
+ * See the
+ * <ulink type="http" url="https://developers.google.com/google-apps/calendar/v3/reference/acl">online
+ * documentation</ulink> for more information.
+ *
+ * Since: 0.3.0
+ */
+void
+gdata_access_rule_set_scope (GDataAccessRule *self, const gchar *type, const gchar *value)
+{
+ g_return_if_fail (GDATA_IS_ACCESS_RULE (self));
+ g_return_if_fail (type != NULL && *type != '\0');
+ g_return_if_fail ((strcmp (type, GDATA_ACCESS_SCOPE_DEFAULT) == 0 && value == NULL) || value != NULL);
+
+ g_free (self->priv->scope_type);
+ self->priv->scope_type = g_strdup (type);
+
+ g_free (self->priv->scope_value);
+ self->priv->scope_value = g_strdup (value);
+
+ g_object_freeze_notify (G_OBJECT (self));
+ g_object_notify (G_OBJECT (self), "scope-type");
+ g_object_notify (G_OBJECT (self), "scope-value");
+ g_object_thaw_notify (G_OBJECT (self));
+}
+
+/**
+ * gdata_access_rule_get_scope:
+ * @self: a #GDataAccessRule
+ * @type: (out callee-allocates) (transfer none) (allow-none): return location for the scope type, or %NULL
+ * @value: (out callee-allocates) (transfer none) (allow-none): return location for the scope value, or %NULL
+ *
+ * Gets the #GDataAccessRule:scope-type and #GDataAccessRule:scope-value properties.
+ *
+ * Since: 0.3.0
+ */
+void
+gdata_access_rule_get_scope (GDataAccessRule *self, const gchar **type, const gchar **value)
+{
+ g_return_if_fail (GDATA_IS_ACCESS_RULE (self));
+ if (type != NULL)
+ *type = self->priv->scope_type;
+ if (value != NULL)
+ *value = self->priv->scope_value;
+}
+
+/**
+ * gdata_access_rule_get_edited:
+ * @self: a #GDataAccessRule
+ *
+ * Gets the #GDataAccessRule:edited property. If the property is unset, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the UNIX timestamp for the time the access rule was last edited, or <code class="literal">-1</code>
+ *
+ * Since: 0.7.0
+ */
+gint64
+gdata_access_rule_get_edited (GDataAccessRule *self)
+{
+ g_return_val_if_fail (GDATA_IS_ACCESS_RULE (self), -1);
+ return self->priv->edited;
+}
+
+void
+_gdata_access_rule_set_key (GDataAccessRule *self, const gchar *key)
+{
+ g_return_if_fail (GDATA_IS_ACCESS_RULE (self));
+
+ if (g_strcmp0 (key, self->priv->key) == 0)
+ return;
+
+ g_free (self->priv->key);
+ self->priv->key = g_strdup (key);
+
+ g_object_notify (G_OBJECT (self), "key");
+}
+
+/**
+ * gdata_access_rule_get_key:
+ * @self: a #GDataAccessRule
+ *
+ * Gets the #GDataAccessRule:key property.
+ *
+ * Return value: the access rule's authorisation key, or %NULL
+ *
+ * Since: 0.16.0
+ */
+const gchar *
+gdata_access_rule_get_key (GDataAccessRule *self)
+{
+ g_return_val_if_fail (GDATA_IS_ACCESS_RULE (self), NULL);
+ return self->priv->key;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Thibault Saunier 2009 <saunierthibault@gmail.com>
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_ACCESS_RULE_H
+#define GDATA_ACCESS_RULE_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-entry.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_ACCESS_SCOPE_USER:
+ *
+ * The #GDataAccessRule applies to a single individual, whose e-mail address is given in #GDataAccessRule:scope-value.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_ACCESS_SCOPE_USER "user"
+
+/**
+ * GDATA_ACCESS_SCOPE_DOMAIN:
+ *
+ * The #GDataAccessRule applies to all users in a Google Apps For Your Domain domain, given in #GDataAccessRule:scope-value.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_ACCESS_SCOPE_DOMAIN "domain"
+
+/**
+ * GDATA_ACCESS_SCOPE_DEFAULT:
+ *
+ * The #GDataAccessRule applies to all users.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_ACCESS_SCOPE_DEFAULT "default"
+
+/**
+ * GDATA_ACCESS_ROLE_NONE:
+ *
+ * The users specified by the #GDataAccessRule have no rights.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_ACCESS_ROLE_NONE "none"
+
+#define GDATA_TYPE_ACCESS_RULE (gdata_access_rule_get_type ())
+#define GDATA_ACCESS_RULE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_ACCESS_RULE, GDataAccessRule))
+#define GDATA_ACCESS_RULE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_ACCESS_RULE, GDataAccessRuleClass))
+#define GDATA_IS_ACCESS_RULE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_ACCESS_RULE))
+#define GDATA_IS_ACCESS_RULE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_ACCESS_RULE))
+#define GDATA_ACCESS_RULE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_ACCESS_RULE, GDataAccessRuleClass))
+
+typedef struct _GDataAccessRulePrivate GDataAccessRulePrivate;
+
+/**
+ * GDataAccessRule:
+ *
+ * All the fields in the #GDataAccessRule structure are private and should never be accessed directly.
+ *
+ * Since: 0.3.0
+ */
+typedef struct {
+ GDataEntry parent;
+ GDataAccessRulePrivate *priv;
+} GDataAccessRule;
+
+/**
+ * GDataAccessRuleClass:
+ *
+ * All the fields in the #GDataAccessRuleClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.3.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataEntryClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataAccessRuleClass;
+
+GType gdata_access_rule_get_type (void) G_GNUC_CONST;
+
+GDataAccessRule *gdata_access_rule_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_access_rule_get_role (GDataAccessRule *self) G_GNUC_PURE;
+void gdata_access_rule_set_role (GDataAccessRule *self, const gchar *role);
+void gdata_access_rule_get_scope (GDataAccessRule *self, const gchar **type, const gchar **value);
+void gdata_access_rule_set_scope (GDataAccessRule *self, const gchar *type, const gchar *value);
+gint64 gdata_access_rule_get_edited (GDataAccessRule *self);
+const gchar *gdata_access_rule_get_key (GDataAccessRule *self) G_GNUC_PURE;
+
+G_END_DECLS
+
+#endif /* !GDATA_ACCESS_RULE_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2011 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-authorization-domain
+ * @short_description: GData authorization domain
+ * @stability: Stable
+ * @include: gdata/gdata-authorization-domain.h
+ *
+ * A #GDataAuthorizationDomain represents a single data domain which a user can authorize libgdata to access. This might be a domain covering the
+ * whole of the user's Google Contacts account, for example. Typically, #GDataServices map to #GDataAuthorizationDomains in a one-to-one
+ * fashion, though some services (such as #GDataDocumentsService) use multiple authorization domains.
+ *
+ * The #GDataAuthorizationDomainss used by a service can be retrieved using gdata_service_get_authorization_domains(). The set of domains
+ * used by a given service is static and will never change at runtime.
+ *
+ * #GDataAuthorizationDomains are used by a #GDataAuthorizer instance to request authorization to interact with data in those domains when
+ * first authenticating and authorizing with the online service. Typically, a given #GDataAuthorizer will be passed a set of domains (or a service
+ * type, from which it can retrieve the service's set of domains) at construction time, and will use those domains when initially asking the user for
+ * authorization and whenever the authorization is refreshed afterwards. It's not expected that the set of domains used by a #GDataAuthorizer will
+ * change after construction time.
+ *
+ * Note that it's not expected that #GDataAuthorizationDomains will have to be constructed manually. All #GDataServices should provide
+ * accessor functions to return instances of all the authorization domains they support.
+ *
+ * Since: 0.9.0
+ */
+
+#include <glib.h>
+
+#include "gdata-authorization-domain.h"
+
+static void finalize (GObject *object);
+static void get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+
+struct _GDataAuthorizationDomainPrivate {
+ gchar *service_name;
+ gchar *scope;
+};
+
+enum {
+ PROP_SERVICE_NAME = 1,
+ PROP_SCOPE,
+};
+
+G_DEFINE_TYPE (GDataAuthorizationDomain, gdata_authorization_domain, G_TYPE_OBJECT)
+
+static void
+gdata_authorization_domain_class_init (GDataAuthorizationDomainClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataAuthorizationDomainPrivate));
+
+ gobject_class->get_property = get_property;
+ gobject_class->set_property = set_property;
+ gobject_class->finalize = finalize;
+
+ /**
+ * GDataAuthorizationDomain:service-name:
+ *
+ * The name of the service which contains the authorization domain, as enumerated in the
+ * <ulink type="http" url="http://code.google.com/apis/documents/faq_gdata.html#clientlogin">online documentation</ulink>.
+ *
+ * Since: 0.9.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SERVICE_NAME,
+ g_param_spec_string ("service-name",
+ "Service name", "The name of the service which contains the authorization domain.",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataAuthorizationDomain:scope:
+ *
+ * A URI detailing the scope of the authorization domain, as enumerated in the
+ * <ulink type="http" url="http://code.google.com/apis/documents/faq_gdata.html#AuthScopes">online documentation</ulink>.
+ *
+ * Since: 0.9.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SCOPE,
+ g_param_spec_string ("scope",
+ "Scope", "A URI detailing the scope of the authorization domain.",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_authorization_domain_init (GDataAuthorizationDomain *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_AUTHORIZATION_DOMAIN, GDataAuthorizationDomainPrivate);
+}
+
+static void
+finalize (GObject *object)
+{
+ GDataAuthorizationDomainPrivate *priv = GDATA_AUTHORIZATION_DOMAIN (object)->priv;
+
+ g_free (priv->service_name);
+ g_free (priv->scope);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_authorization_domain_parent_class)->finalize (object);
+}
+
+static void
+get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataAuthorizationDomainPrivate *priv = GDATA_AUTHORIZATION_DOMAIN (object)->priv;
+
+ switch (property_id) {
+ case PROP_SERVICE_NAME:
+ g_value_set_string (value, priv->service_name);
+ break;
+ case PROP_SCOPE:
+ g_value_set_string (value, priv->scope);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataAuthorizationDomainPrivate *priv = GDATA_AUTHORIZATION_DOMAIN (object)->priv;
+
+ switch (property_id) {
+ /* Construct only */
+ case PROP_SERVICE_NAME:
+ priv->service_name = g_value_dup_string (value);
+ break;
+ /* Construct only */
+ case PROP_SCOPE:
+ priv->scope = g_value_dup_string (value);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+/**
+ * gdata_authorization_domain_get_service_name:
+ * @self: a #GDataAuthorizationDomain
+ *
+ * Returns the name of the service containing the authorization domain. See #GDataAuthorizationDomain:service-name for more details.
+ *
+ * Return value: name of the service containing the authorization domain
+ *
+ * Since: 0.9.0
+ */
+const gchar *
+gdata_authorization_domain_get_service_name (GDataAuthorizationDomain *self)
+{
+ g_return_val_if_fail (GDATA_IS_AUTHORIZATION_DOMAIN (self), NULL);
+
+ return self->priv->service_name;
+}
+
+/**
+ * gdata_authorization_domain_get_scope:
+ * @self: a #GDataAuthorizationDomain
+ *
+ * Returns a URI detailing the scope of the authorization domain. See #GDataAuthorizationDomain:scope for more details.
+ *
+ * Return value: URI detailing the scope of the authorization domain
+ *
+ * Since: 0.9.0
+ */
+const gchar *
+gdata_authorization_domain_get_scope (GDataAuthorizationDomain *self)
+{
+ g_return_val_if_fail (GDATA_IS_AUTHORIZATION_DOMAIN (self), NULL);
+
+ return self->priv->scope;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2011 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_AUTHORIZATION_DOMAIN_H
+#define GDATA_AUTHORIZATION_DOMAIN_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_AUTHORIZATION_DOMAIN (gdata_authorization_domain_get_type ())
+#define GDATA_AUTHORIZATION_DOMAIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_AUTHORIZATION_DOMAIN, GDataAuthorizationDomain))
+#define GDATA_AUTHORIZATION_DOMAIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_AUTHORIZATION_DOMAIN, GDataAuthorizationDomainClass))
+#define GDATA_IS_AUTHORIZATION_DOMAIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_AUTHORIZATION_DOMAIN))
+#define GDATA_IS_AUTHORIZATION_DOMAIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_AUTHORIZATION_DOMAIN))
+#define GDATA_AUTHORIZATION_DOMAIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_AUTHORIZATION_DOMAIN, GDataAuthorizationDomainClass))
+
+typedef struct _GDataAuthorizationDomainPrivate GDataAuthorizationDomainPrivate;
+
+/**
+ * GDataAuthorizationDomain:
+ *
+ * All the fields in the #GDataAuthorizationDomain structure are private and should never be accessed directly.
+ *
+ * Since: 0.9.0
+ */
+typedef struct {
+ /*< private >*/
+ GObject parent;
+ GDataAuthorizationDomainPrivate *priv;
+} GDataAuthorizationDomain;
+
+/**
+ * GDataAuthorizationDomainClass:
+ *
+ * All the fields in the #GDataAuthorizationDomainClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.9.0
+ */
+typedef struct {
+ /*< private >*/
+ GObjectClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+ void (*_g_reserved2) (void);
+ void (*_g_reserved3) (void);
+ void (*_g_reserved4) (void);
+ void (*_g_reserved5) (void);
+} GDataAuthorizationDomainClass;
+
+GType gdata_authorization_domain_get_type (void) G_GNUC_CONST;
+
+const gchar *gdata_authorization_domain_get_service_name (GDataAuthorizationDomain *self) G_GNUC_PURE;
+const gchar *gdata_authorization_domain_get_scope (GDataAuthorizationDomain *self) G_GNUC_PURE;
+
+G_END_DECLS
+
+#endif /* !GDATA_AUTHORIZATION_DOMAIN_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2011, 2014 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-authorizer
+ * @short_description: GData authorization interface
+ * @stability: Stable
+ * @include: gdata/gdata-authorizer.h
+ *
+ * The #GDataAuthorizer interface provides a uniform way to implement authentication and authorization processes for use by #GDataServices.
+ * Client code will construct a new #GDataAuthorizer instance of their choosing, such as #GDataClientLoginAuthorizer or #GDataOAuth2Authorizer, for
+ * the #GDataServices which will be used by the client, then authenticates and authorizes with the #GDataAuthorizer instead of the
+ * #GDataService. The #GDataService then uses the #GDataAuthorizer to authorize individual network requests using whatever authorization token was
+ * returned to the #GDataAuthorizer by the Google Accounts service.
+ *
+ * All #GDataAuthorizer implementations are expected to operate against a set of #GDataAuthorizationDomains which are provided to the
+ * authorizer at construction time. These domains specify which data domains the client expects to access using the #GDataServices they
+ * have using the #GDataAuthorizer instance. Following the principle of least privilege, the set of domains should be the minimum such set of domains
+ * which still allows the client to operate normally. Note that implementations of #GDataAuthorizationDomain may display the list of requested
+ * authorization domains to the user for verification before authorization is granted.
+ *
+ * #GDataAuthorizer implementations are provided for some of the standard authorization processes supported by Google for installed applications, as
+ * listed in their <ulink type="http" url="http://code.google.com/apis/accounts/docs/GettingStarted.html">online documentation</ulink>:
+ * <itemizedlist>
+ * <listitem>#GDataClientLoginAuthorizer for
+ * <ulink type="http" url="http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html">ClientLogin</ulink> (deprecated)</listitem>
+ * <listitem>#GDataOAuth1Authorizer for
+ * <ulink type="http" url="http://code.google.com/apis/accounts/docs/OAuthForInstalledApps.html">OAuth 1.0</ulink> (deprecated)</listitem>
+ * <listitem>#GDataOAuth2Authorizer for
+ * <ulink type="http" url="https://developers.google.com/accounts/docs/OAuth2InstalledApp">OAuth 2.0</ulink> (preferred)</listitem>
+ * </itemizedlist>
+ *
+ * It is quite possible for clients to write their own #GDataAuthorizer implementation. For example, if a client already uses OAuth 2.0 and handles
+ * authentication itself, it may want to use its own #GDataAuthorizer implementation which simply exposes the client's existing access token to
+ * libgdata and does nothing more.
+ *
+ * It must be noted that all #GDataAuthorizer implementations must be thread safe, as methods such as gdata_authorizer_refresh_authorization() may be
+ * called from any thread (such as the thread performing an asynchronous query operation) at any time.
+ *
+ * Examples of code using #GDataAuthorizer can be found in the documentation for the various implementations of the #GDataAuthorizer interface.
+ *
+ * Since: 0.9.0
+ */
+
+#include <glib.h>
+
+#include "gdata-authorizer.h"
+
+G_DEFINE_INTERFACE (GDataAuthorizer, gdata_authorizer, G_TYPE_OBJECT)
+
+static void
+gdata_authorizer_default_init (GDataAuthorizerInterface *iface)
+{
+ /* Nothing to see here */
+}
+
+/**
+ * gdata_authorizer_process_request:
+ * @self: a #GDataAuthorizer
+ * @domain: (allow-none): the #GDataAuthorizationDomain the query falls under, or %NULL
+ * @message: the query to process
+ *
+ * Processes @message, adding all the necessary extra headers and parameters to ensure that it's correctly authenticated and authorized under the
+ * given @domain for the online service. Basically, if a query is not processed by calling this method on it, it will be sent to the online service as
+ * if it's a query from a non-logged-in user. Similarly, if the #GDataAuthorizer isn't authenticated or authorized (for @domain), no changes will
+ * be made to the @message.
+ *
+ * @domain may be %NULL if the request doesn't require authorization.
+ *
+ * This modifies @message in place.
+ *
+ * This method is thread safe.
+ *
+ * Since: 0.9.0
+ */
+void
+gdata_authorizer_process_request (GDataAuthorizer *self, GDataAuthorizationDomain *domain, SoupMessage *message)
+{
+ GDataAuthorizerInterface *iface;
+
+ g_return_if_fail (GDATA_IS_AUTHORIZER (self));
+ g_return_if_fail (domain == NULL || GDATA_IS_AUTHORIZATION_DOMAIN (domain));
+ g_return_if_fail (SOUP_IS_MESSAGE (message));
+
+ iface = GDATA_AUTHORIZER_GET_IFACE (self);
+ g_assert (iface->process_request != NULL);
+
+ iface->process_request (self, domain, message);
+}
+
+/**
+ * gdata_authorizer_is_authorized_for_domain:
+ * @self: (allow-none): a #GDataAuthorizer, or %NULL
+ * @domain: the #GDataAuthorizationDomain to check against
+ *
+ * Returns whether the #GDataAuthorizer instance believes it's currently authorized to access the given @domain. Note that this will not perform any
+ * network requests, and will just look up the result in the #GDataAuthorizer's local cache of authorizations. This means that the result may be out
+ * of date, as the server may have since invalidated the authorization. If the #GDataAuthorizer class supports timeouts and TTLs on authorizations,
+ * they will not be taken into account; this method effectively returns whether the last successful authorization operation performed on the
+ * #GDataAuthorizer included @domain in the list of requested authorization domains.
+ *
+ * Note that %NULL may be passed as the #GDataAuthorizer, in which case %FALSE will always be returned, regardless of the @domain. This is for
+ * convenience of checking whether a domain is authorized by the #GDataAuthorizer returned by gdata_service_get_authorizer(), which may be %NULL.
+ * For example:
+ * |[
+ * if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (my_service), my_domain) == TRUE) {
+ * /<!-- -->* Code to execute only if we're authorized for the given domain *<!-- -->/
+ * }
+ * ]|
+ *
+ * This method is thread safe.
+ *
+ * Return value: %TRUE if the #GDataAuthorizer has been authorized to access @domain, %FALSE otherwise
+ *
+ * Since: 0.9.0
+ */
+gboolean
+gdata_authorizer_is_authorized_for_domain (GDataAuthorizer *self, GDataAuthorizationDomain *domain)
+{
+ GDataAuthorizerInterface *iface;
+
+ g_return_val_if_fail (self == NULL || GDATA_IS_AUTHORIZER (self), FALSE);
+ g_return_val_if_fail (GDATA_IS_AUTHORIZATION_DOMAIN (domain), FALSE);
+
+ if (self == NULL) {
+ return FALSE;
+ }
+
+ iface = GDATA_AUTHORIZER_GET_IFACE (self);
+ g_assert (iface->is_authorized_for_domain != NULL);
+
+ return iface->is_authorized_for_domain (self, domain);
+}
+
+/**
+ * gdata_authorizer_refresh_authorization:
+ * @self: a #GDataAuthorizer
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Forces the #GDataAuthorizer to refresh any authorization tokens it holds with the online service. This should typically be called when a
+ * #GDataService query returns %GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED, and is already called transparently by methods such as
+ * gdata_service_query() and gdata_service_insert_entry() (see their documentation for more details).
+ *
+ * If re-authorization is successful, it's guaranteed that by the time this method returns, the properties containing the relevant authorization
+ * tokens on the #GDataAuthorizer instance will have been updated.
+ *
+ * If %FALSE is returned, @error will be set if (and only if) it's due to a refresh being attempted and failing. If a refresh is not attempted, %FALSE
+ * will be returned but @error will not be set.
+ *
+ * If the #GDataAuthorizer has not been previously authenticated or authorized (using the class' specific methods), no authorization will be
+ * attempted, %FALSE will be returned immediately and @error will not be set.
+ *
+ * Some #GDataAuthorizer implementations may not support refreshing authorization tokens at all; for example if doing so requires user interaction.
+ * %FALSE will be returned immediately in that case and @error will not be set.
+ *
+ * This method is thread safe.
+ *
+ * Return value: %TRUE if an authorization refresh was attempted and was successful, %FALSE if a refresh wasn't attempted or was unsuccessful
+ *
+ * Since: 0.9.0
+ */
+gboolean
+gdata_authorizer_refresh_authorization (GDataAuthorizer *self, GCancellable *cancellable, GError **error)
+{
+ GDataAuthorizerInterface *iface;
+
+ g_return_val_if_fail (GDATA_IS_AUTHORIZER (self), FALSE);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
+ iface = GDATA_AUTHORIZER_GET_IFACE (self);
+
+ /* Return FALSE with no error if the method isn't implemented */
+ if (iface->refresh_authorization == NULL) {
+ return FALSE;
+ }
+
+ return iface->refresh_authorization (self, cancellable, error);
+}
+
+static void
+refresh_authorization_thread (GTask *task, gpointer source_object, gpointer task_data, GCancellable *cancellable)
+{
+ GDataAuthorizer *authorizer = GDATA_AUTHORIZER (source_object);
+ g_autoptr(GError) error = NULL;
+
+ /* Refresh the authorisation and return */
+ gdata_authorizer_refresh_authorization (authorizer, cancellable, &error);
+
+ if (error != NULL)
+ g_task_return_error (task, g_steal_pointer (&error));
+ else
+ g_task_return_boolean (task, TRUE);
+}
+
+/**
+ * gdata_authorizer_refresh_authorization_async:
+ * @self: a #GDataAuthorizer
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: (allow-none) (scope async): a #GAsyncReadyCallback to call when the authorization refresh operation is finished, or %NULL
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Forces the #GDataAuthorizer to refresh any authorization tokens it holds with the online service. @self and @cancellable are reffed when this
+ * method is called, so can safely be freed after this method returns.
+ *
+ * For more details, see gdata_authorizer_refresh_authorization(), which is the synchronous version of this method. If the #GDataAuthorizer class
+ * doesn't implement #GDataAuthorizerInterface.refresh_authorization_async but does implement #GDataAuthorizerInterface.refresh_authorization, the
+ * latter will be called from a new thread to make it asynchronous.
+ *
+ * When the authorization refresh operation is finished, @callback will be called. You can then call gdata_authorizer_refresh_authorization_finish()
+ * to get the results of the operation.
+ *
+ * This method is thread safe.
+ *
+ * Since: 0.9.0
+ */
+void
+gdata_authorizer_refresh_authorization_async (GDataAuthorizer *self, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+{
+ GDataAuthorizerInterface *iface;
+
+ g_return_if_fail (GDATA_IS_AUTHORIZER (self));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+
+ iface = GDATA_AUTHORIZER_GET_IFACE (self);
+
+ /* Either both _async() and _finish() must be defined, or they must both be undefined. */
+ g_assert ((iface->refresh_authorization_async == NULL && iface->refresh_authorization_finish == NULL) ||
+ (iface->refresh_authorization_async != NULL && iface->refresh_authorization_finish != NULL));
+
+ if (iface->refresh_authorization_async != NULL) {
+ /* Call the method */
+ iface->refresh_authorization_async (self, cancellable, callback, user_data);
+ } else {
+ g_autoptr(GTask) task = NULL;
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_authorizer_refresh_authorization_async);
+
+
+ if (iface->refresh_authorization != NULL) {
+ /* If the _async() method isn't implemented, fall back to running the sync method in a thread */
+ g_task_run_in_thread (task, refresh_authorization_thread);
+ } else {
+ /* If neither are implemented, immediately return FALSE with no error in a callback */
+ g_task_return_boolean (task, FALSE);
+ }
+
+ return;
+ }
+}
+
+/**
+ * gdata_authorizer_refresh_authorization_finish:
+ * @self: a #GDataAuthorizer
+ * @async_result: a #GAsyncResult
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous authorization refresh operation for the #GDataAuthorizer, as started with gdata_authorizer_refresh_authorization_async().
+ *
+ * This method is thread safe.
+ *
+ * Return value: %TRUE if an authorization refresh was attempted and was successful, %FALSE if a refresh wasn't attempted or was unsuccessful
+ *
+ * Since: 0.9.0
+ */
+gboolean
+gdata_authorizer_refresh_authorization_finish (GDataAuthorizer *self, GAsyncResult *async_result, GError **error)
+{
+ GDataAuthorizerInterface *iface;
+
+ g_return_val_if_fail (GDATA_IS_AUTHORIZER (self), FALSE);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (async_result), FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
+ iface = GDATA_AUTHORIZER_GET_IFACE (self);
+
+ /* Either both _async() and _finish() must be defined, or they must both be undefined. */
+ g_assert ((iface->refresh_authorization_async == NULL && iface->refresh_authorization_finish == NULL) ||
+ (iface->refresh_authorization_async != NULL && iface->refresh_authorization_finish != NULL));
+
+ if (iface->refresh_authorization_finish != NULL) {
+ /* Call the method */
+ return iface->refresh_authorization_finish (self, async_result, error);
+ } else if (iface->refresh_authorization != NULL) {
+ /* If the _async() method isn't implemented, fall back to finishing off running the sync method in a thread */
+ g_return_val_if_fail (g_task_is_valid (async_result, self), FALSE);
+ g_return_val_if_fail (g_async_result_is_tagged (async_result, gdata_authorizer_refresh_authorization_async), FALSE);
+
+ return g_task_propagate_boolean (G_TASK (async_result), error);
+ }
+
+ /* Fall back to just returning FALSE if none of the methods are implemented */
+ return FALSE;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2011 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_AUTHORIZER_H
+#define GDATA_AUTHORIZER_H
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gio/gio.h>
+#include <libsoup/soup.h>
+
+#include <gdata/gdata-authorization-domain.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_AUTHORIZER (gdata_authorizer_get_type ())
+#define GDATA_AUTHORIZER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_AUTHORIZER, GDataAuthorizer))
+#define GDATA_AUTHORIZER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_AUTHORIZER, GDataAuthorizerInterface))
+#define GDATA_IS_AUTHORIZER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_AUTHORIZER))
+#define GDATA_AUTHORIZER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), GDATA_TYPE_AUTHORIZER, GDataAuthorizerInterface))
+
+/**
+ * GDataAuthorizer:
+ *
+ * All the fields in the #GDataAuthorizer structure are private and should never be accessed directly.
+ *
+ * Since: 0.9.0
+ */
+typedef struct _GDataAuthorizer GDataAuthorizer; /* dummy typedef */
+
+/**
+ * GDataAuthorizerInterface:
+ * @parent: the parent type
+ * @process_request: a function to append authorization headers to queries before they are submitted to the online service under the given
+ * authorization domain (which may be %NULL); this must be implemented and must be thread safe, and must also handle being called multiple times on
+ * the same #SoupMessage instance (so must be careful to replace headers rather than append them, for example)
+ * @is_authorized_for_domain: a function to check whether the authorizer is authorized against the given domain; this must be implemented and must
+ * be thread safe
+ * @refresh_authorization: (allow-none): a function to force a refresh of any authorization tokens the authorizer holds, returning %TRUE if a refresh
+ * was attempted and was successful, or %FALSE if a refresh wasn't attempted or was unsuccessful; if this isn't implemented it's assumed %FALSE
+ * would've been returned, if it is implemented it must be thread safe
+ * @refresh_authorization_async: (allow-none): an asynchronous version of @refresh_authorization; if this isn't implemented and @refresh_authorization
+ * is, @refresh_authorization will be called in a thread to simulate this function, whereas if this is implemented @refresh_authorization_finish must
+ * also be implemented and both functions must be thread safe
+ * @refresh_authorization_finish: (allow-none): a finish function for the asynchronous version of @refresh_authorization; this must be implemented
+ * exactly if @refresh_authorization_async is implemented, and must be thread safe if it is implemented
+ *
+ * The class structure for the #GDataAuthorizer interface.
+ *
+ * Since: 0.9.0
+ */
+typedef struct {
+ GTypeInterface parent;
+
+ void (*process_request) (GDataAuthorizer *self, GDataAuthorizationDomain *domain, SoupMessage *message);
+ gboolean (*is_authorized_for_domain) (GDataAuthorizer *self, GDataAuthorizationDomain *domain);
+ gboolean (*refresh_authorization) (GDataAuthorizer *self, GCancellable *cancellable, GError **error);
+ void (*refresh_authorization_async) (GDataAuthorizer *self, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data);
+ gboolean (*refresh_authorization_finish) (GDataAuthorizer *self, GAsyncResult *async_result, GError **error);
+} GDataAuthorizerInterface;
+
+GType gdata_authorizer_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataAuthorizer, g_object_unref)
+
+void gdata_authorizer_process_request (GDataAuthorizer *self, GDataAuthorizationDomain *domain, SoupMessage *message);
+gboolean gdata_authorizer_is_authorized_for_domain (GDataAuthorizer *self, GDataAuthorizationDomain *domain);
+
+gboolean gdata_authorizer_refresh_authorization (GDataAuthorizer *self, GCancellable *cancellable, GError **error);
+void gdata_authorizer_refresh_authorization_async (GDataAuthorizer *self, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data);
+gboolean gdata_authorizer_refresh_authorization_finish (GDataAuthorizer *self, GAsyncResult *async_result, GError **error);
+
+G_END_DECLS
+
+#endif /* !GDATA_AUTHORIZER_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * SECTION:gdata-batch-feed
+ * @short_description: GData batch feed helper object
+ * @stability: Stable
+ * @include: gdata/gdata-batch-feed.h
+ *
+ * Helper class to parse the feed returned from a batch operation and instantiate different types of #GDataEntry according to the batch operation
+ * associated with each one. It's tightly coupled with #GDataBatchOperation, and isn't exposed publicly.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/gdata/docs/batch.html">online documentation</ulink>.
+ *
+ * Since: 0.7.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+
+#include "gdata-batch-feed.h"
+#include "gdata-private.h"
+#include "gdata-batch-private.h"
+
+static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+
+G_DEFINE_TYPE (GDataBatchFeed, gdata_batch_feed, GDATA_TYPE_FEED)
+
+static void
+gdata_batch_feed_class_init (GDataBatchFeedClass *klass)
+{
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+ parsable_class->parse_xml = parse_xml;
+}
+
+static void
+gdata_batch_feed_init (GDataBatchFeed *self)
+{
+ /* Nothing to see here */
+}
+
+static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ GDataBatchOperation *operation = GDATA_BATCH_OPERATION (user_data);
+
+ if (xmlStrcmp (node->name, (xmlChar*) "entry") == 0) {
+ GDataEntry *entry = NULL;
+ xmlBuffer *status_response = NULL;
+ gchar *status_reason = NULL;
+ guint id = 0, status_code = 0;
+ xmlNode *entry_node;
+ BatchOperation *op;
+
+ status_response = xmlBufferCreate ();
+
+ /* Parse the child nodes of the <entry> to get the batch namespace elements containing information about this operation */
+ for (entry_node = node->children; entry_node != NULL; entry_node = entry_node->next) {
+ /* We have to be careful about namespaces here, and we can skip text nodes (since none of the nodes we're looking for
+ * are text nodes) */
+ if (entry_node->type == XML_TEXT_NODE ||
+ gdata_parser_is_namespace (entry_node, "http://schemas.google.com/gdata/batch") == FALSE)
+ continue;
+
+ if (xmlStrcmp (entry_node->name, (xmlChar*) "id") == 0) {
+ /* batch:id */
+ xmlChar *id_string = xmlNodeListGetString (doc, entry_node->children, TRUE);
+ id = g_ascii_strtoull ((char*) id_string, NULL, 10);
+ xmlFree (id_string);
+ } else if (xmlStrcmp (entry_node->name, (xmlChar*) "status") == 0) {
+ /* batch:status */
+ xmlChar *status_code_string;
+ xmlNode *child_node;
+
+ status_code_string = xmlGetProp (entry_node, (xmlChar*) "code");
+ status_code = g_ascii_strtoull ((char*) status_code_string, NULL, 10);
+ xmlFree (status_code_string);
+
+ status_reason = (gchar*) xmlGetProp (entry_node, (xmlChar*) "reason");
+
+ /* Dump the content of the status node, since it's service-specific, and could be anything from plain text to XML */
+ for (child_node = entry_node->children; child_node != NULL; child_node = child_node->next)
+ xmlNodeDump (status_response, doc, child_node, 0, 0);
+ }
+
+ if (id != 0 && status_code != 0)
+ break;
+ }
+
+ /* Check we've got all the required data */
+ if (id == 0) {
+ gdata_parser_error_required_element_missing ("batch:id", "entry", error);
+ goto error;
+ } else if (status_code == 0) {
+ gdata_parser_error_required_element_missing ("batch:status", "entry", error);
+ goto error;
+ }
+
+ op = _gdata_batch_operation_get_operation (operation, id);
+
+ /* Check for errors */
+ if (SOUP_STATUS_IS_SUCCESSFUL (status_code) == FALSE) {
+ /* Handle the error */
+ GDataService *service = gdata_batch_operation_get_service (operation);
+ GDataServiceClass *klass = GDATA_SERVICE_GET_CLASS (service);
+ GError *child_error = NULL;
+
+ /* Parse the error (it's returned in a service-specific format */
+ g_assert (klass->parse_error_response != NULL);
+ klass->parse_error_response (service, (GDataOperationType) op->type, status_code,
+ status_reason, (gchar*) xmlBufferContent (status_response),
+ xmlBufferLength (status_response), &child_error);
+
+ /* Run the operation's callback. This takes ownership of @child_error. */
+ _gdata_batch_operation_run_callback (operation, op, NULL, child_error);
+
+ g_free (status_reason);
+ xmlBufferFree (status_response);
+
+ /* We return TRUE because we parsed the XML successfully; despite it being an error that we parsed */
+ return TRUE;
+ }
+
+ /* If there wasn't an error, parse the resulting GDataEntry and run the operation's callback */
+ if (op->type == GDATA_BATCH_OPERATION_QUERY)
+ entry = GDATA_ENTRY (_gdata_parsable_new_from_xml_node (op->entry_type, doc, node, NULL, error));
+ else if (op->type != GDATA_BATCH_OPERATION_DELETION)
+ entry = GDATA_ENTRY (_gdata_parsable_new_from_xml_node (G_OBJECT_TYPE (op->entry), doc, node, NULL, error));
+
+ if (op->type != GDATA_BATCH_OPERATION_DELETION && entry == NULL)
+ goto error;
+
+ _gdata_batch_operation_run_callback (operation, op, entry, NULL);
+
+ if (entry != NULL)
+ g_object_unref (entry);
+
+ g_free (status_reason);
+ xmlBufferFree (status_response);
+
+ return TRUE;
+
+error:
+ g_free (status_reason);
+ xmlBufferFree (status_response);
+
+ return FALSE;
+ } else if (GDATA_PARSABLE_CLASS (gdata_batch_feed_parent_class)->parse_xml (parsable, doc, node, user_data, error) == FALSE) {
+ /* Error! */
+ return FALSE;
+ }
+
+ return TRUE;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_BATCH_FEED_H
+#define GDATA_BATCH_FEED_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-feed.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_BATCH_FEED (gdata_batch_feed_get_type ())
+#define GDATA_BATCH_FEED(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_BATCH_FEED, GDataBatchFeed))
+#define GDATA_BATCH_FEED_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_BATCH_FEED, GDataBatchFeedClass))
+#define GDATA_IS_BATCH_FEED(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_BATCH_FEED))
+#define GDATA_IS_BATCH_FEED_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_BATCH_FEED))
+#define GDATA_BATCH_FEED_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_BATCH_FEED, GDataBatchFeedClass))
+
+typedef struct _GDataBatchFeedPrivate GDataBatchFeedPrivate;
+
+/**
+ * GDataBatchFeed:
+ *
+ * All the fields in the #GDataBatchFeed structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataFeed parent;
+ GDataBatchFeedPrivate *priv;
+} GDataBatchFeed;
+
+/**
+ * GDataBatchFeedClass:
+ *
+ * All the fields in the #GDataBatchFeedClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataFeedClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataBatchFeedClass;
+
+GType gdata_batch_feed_get_type (void) G_GNUC_CONST;
+
+G_END_DECLS
+
+#endif /* !GDATA_BATCH_FEED_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-batch-operation
+ * @short_description: GData batch operation object
+ * @stability: Stable
+ * @include: gdata/gdata-batch-operation.h
+ *
+ * #GDataBatchOperation is a transient standalone class which represents and handles a single batch operation request to a service. To make a batch
+ * operation request: create a new #GDataBatchOperation; add the required queries, insertions, updates and deletions to the operation using
+ * gdata_batch_operation_add_query(), gdata_batch_operation_add_insertion(), gdata_batch_operation_add_update() and
+ * gdata_batch_operation_add_deletion(), respectively; run the request with gdata_batch_operation_run() or gdata_batch_operation_run_async(); and
+ * handle the results in the callback functions which are invoked by the operation as the results are received and parsed.
+ *
+ * If authorization is required for any of the requests in the batch operation, the #GDataService set in #GDataBatchOperation:service must have
+ * a #GDataAuthorizer set as its #GDataService:authorizer property, and that authorizer must be authorized for the #GDataAuthorizationDomain set
+ * in #GDataBatchOperation:authorization-domain. It's not possible for requests in a single batch operation to be authorized under multiple domains;
+ * in that case, the requests must be split up across several batch operations using different authorization domains.
+ *
+ * If all of the requests in the batch operation don't require authorization (i.e. they all operate on public data; see the documentation for the
+ * #GDataService subclass in question's operations for details of which require authorization), #GDataBatchOperation:authorization-domain can be set
+ * to %NULL to save the overhead of sending authorization data to the online service.
+ *
+ * <example>
+ * <title>Running a Synchronous Operation</title>
+ * <programlisting>
+ * guint op_id, op_id2;
+ * GDataBatchOperation *operation;
+ * GDataContactsContact *contact;
+ * GDataService *service;
+ * GDataAuthorizationDomain *domain;
+ *
+ * service = create_contacts_service ();
+ * domain = get_authorization_domain_from_service (service);
+ * contact = create_new_contact ();
+ * batch_link = gdata_feed_look_up_link (contacts_feed, GDATA_LINK_BATCH);
+ *
+ * operation = gdata_batchable_create_operation (GDATA_BATCHABLE (service), domain, gdata_link_get_uri (batch_link));
+ *
+ * /<!-- -->* Add to the operation to insert a new contact and query for another one *<!-- -->/
+ * op_id = gdata_batch_operation_add_insertion (operation, GDATA_ENTRY (contact), insertion_cb, user_data);
+ * op_id2 = gdata_batch_operation_add_query (operation, gdata_entry_get_id (other_contact), GDATA_TYPE_CONTACTS_CONTACT, query_cb, user_data);
+ *
+ * g_object_unref (contact);
+ * g_object_unref (domain);
+ * g_object_unref (service);
+ *
+ * /<!-- -->* Run the operations in a blocking fashion. Ideally, check and free the error as appropriate after running the operation. *<!-- -->/
+ * gdata_batch_operation_run (operation, NULL, &error);
+ *
+ * g_object_unref (operation);
+ *
+ * static void
+ * insertion_cb (guint operation_id, GDataBatchOperationType operation_type, GDataEntry *entry, GError *error, gpointer user_data)
+ * {
+ * /<!-- -->* operation_id == op_id, operation_type == GDATA_BATCH_OPERATION_INSERTION *<!-- -->/
+ *
+ * /<!-- -->* Process the new inserted entry, ideally after checking for errors. Note that the entry should be reffed if it needs to stay
+ * * alive after execution of the callback finishes. *<!-- -->/
+ * process_inserted_entry (entry, user_data);
+ * }
+ *
+ * static void
+ * query_cb (guint operation_id, GDataBatchOperationType operation_type, GDataEntry *entry, GError *error, gpointer user_data)
+ * {
+ * /<!-- -->* operation_id == op_id2, operation_type == GDATA_BATCH_OPERATION_QUERY *<!-- -->/
+ *
+ * /<!-- -->* Process the results of the query, ideally after checking for errors. Note that the entry should be reffed if it needs to
+ * * stay alive after execution of the callback finishes. *<!-- -->/
+ * process_queried_entry (entry, user_data);
+ * }
+ * </programlisting>
+ * </example>
+ *
+ * Since: 0.7.0
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+
+#include "gdata-batch-operation.h"
+#include "gdata-batch-feed.h"
+#include "gdata-batchable.h"
+#include "gdata-private.h"
+#include "gdata-batch-private.h"
+
+static void operation_free (BatchOperation *op);
+
+static void gdata_batch_operation_dispose (GObject *object);
+static void gdata_batch_operation_finalize (GObject *object);
+static void gdata_batch_operation_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_batch_operation_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+
+struct _GDataBatchOperationPrivate {
+ GDataService *service;
+ GDataAuthorizationDomain *authorization_domain;
+ gchar *feed_uri;
+ GHashTable *operations;
+ guint next_id; /* next available operation ID */
+ gboolean has_run; /* TRUE if the operation has been run already (though it does not necessarily have to have finished running) */
+ gboolean is_async; /* TRUE if the operation was run with *_run_async(); FALSE if run with *_run() */
+};
+
+enum {
+ PROP_SERVICE = 1,
+ PROP_FEED_URI,
+ PROP_AUTHORIZATION_DOMAIN,
+};
+
+G_DEFINE_TYPE (GDataBatchOperation, gdata_batch_operation, G_TYPE_OBJECT)
+#define GDATA_BATCH_OPERATION_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GDATA_TYPE_BATCH_OPERATION, GDataBatchOperationPrivate))
+
+static void
+gdata_batch_operation_class_init (GDataBatchOperationClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataBatchOperationPrivate));
+
+ gobject_class->dispose = gdata_batch_operation_dispose;
+ gobject_class->finalize = gdata_batch_operation_finalize;
+ gobject_class->get_property = gdata_batch_operation_get_property;
+ gobject_class->set_property = gdata_batch_operation_set_property;
+
+ /**
+ * GDataBatchOperation:service:
+ *
+ * The service this batch operation is attached to.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SERVICE,
+ g_param_spec_object ("service",
+ "Service", "The service this batch operation is attached to.",
+ GDATA_TYPE_SERVICE,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataBatchOperation:authorization-domain:
+ *
+ * The authorization domain for the batch operation, against which the #GDataService:authorizer for the #GDataBatchOperation:service should be
+ * authorized. This may be %NULL if authorization is not needed for any of the requests in the batch operation.
+ *
+ * All requests in the batch operation must be authorizable under this single authorization domain. If requests need different authorization
+ * domains, they must be performed in different batch operations.
+ *
+ * Since: 0.9.0
+ */
+ g_object_class_install_property (gobject_class, PROP_AUTHORIZATION_DOMAIN,
+ g_param_spec_object ("authorization-domain",
+ "Authorization domain", "The authorization domain for the batch operation.",
+ GDATA_TYPE_AUTHORIZATION_DOMAIN,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataBatchOperation:feed-uri:
+ *
+ * The feed URI that this batch operation will be sent to.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_FEED_URI,
+ g_param_spec_string ("feed-uri",
+ "Feed URI", "The feed URI that this batch operation will be sent to.",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_batch_operation_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataBatchOperationPrivate *priv = GDATA_BATCH_OPERATION_GET_PRIVATE (object);
+
+ switch (property_id) {
+ case PROP_SERVICE:
+ g_value_set_object (value, priv->service);
+ break;
+ case PROP_AUTHORIZATION_DOMAIN:
+ g_value_set_object (value, priv->authorization_domain);
+ break;
+ case PROP_FEED_URI:
+ g_value_set_string (value, priv->feed_uri);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_batch_operation_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataBatchOperationPrivate *priv = GDATA_BATCH_OPERATION_GET_PRIVATE (object);
+
+ switch (property_id) {
+ case PROP_SERVICE:
+ priv->service = g_value_dup_object (value);
+ break;
+ /* Construct only */
+ case PROP_AUTHORIZATION_DOMAIN:
+ priv->authorization_domain = g_value_dup_object (value);
+ break;
+ case PROP_FEED_URI:
+ priv->feed_uri = g_value_dup_string (value);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_batch_operation_init (GDataBatchOperation *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_BATCH_OPERATION, GDataBatchOperationPrivate);
+ self->priv->next_id = 1; /* reserve ID 0 for error conditions */
+ self->priv->operations = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, (GDestroyNotify) operation_free);
+}
+
+static void
+gdata_batch_operation_dispose (GObject *object)
+{
+ GDataBatchOperationPrivate *priv = GDATA_BATCH_OPERATION_GET_PRIVATE (object);
+
+ if (priv->authorization_domain != NULL)
+ g_object_unref (priv->authorization_domain);
+ priv->authorization_domain = NULL;
+
+ if (priv->service != NULL)
+ g_object_unref (priv->service);
+ priv->service = NULL;
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_batch_operation_parent_class)->dispose (object);
+}
+
+static void
+gdata_batch_operation_finalize (GObject *object)
+{
+ GDataBatchOperationPrivate *priv = GDATA_BATCH_OPERATION_GET_PRIVATE (object);
+
+ g_free (priv->feed_uri);
+ g_hash_table_destroy (priv->operations);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_batch_operation_parent_class)->finalize (object);
+}
+
+/**
+ * gdata_batch_operation_get_service:
+ * @self: a #GDataBatchOperation
+ *
+ * Gets the #GDataBatchOperation:service property.
+ *
+ * Return value: (transfer none): the batch operation's attached service
+ *
+ * Since: 0.7.0
+ */
+GDataService *
+gdata_batch_operation_get_service (GDataBatchOperation *self)
+{
+ g_return_val_if_fail (GDATA_IS_BATCH_OPERATION (self), NULL);
+ return self->priv->service;
+}
+
+/**
+ * gdata_batch_operation_get_authorization_domain:
+ * @self: a #GDataBatchOperation
+ *
+ * Gets the #GDataBatchOperation:authorization-domain property.
+ *
+ * Return value: (transfer none) (allow-none): the #GDataAuthorizationDomain used to authorize the batch operation, or %NULL
+ *
+ * Since: 0.9.0
+ */
+GDataAuthorizationDomain *
+gdata_batch_operation_get_authorization_domain (GDataBatchOperation *self)
+{
+ g_return_val_if_fail (GDATA_IS_BATCH_OPERATION (self), NULL);
+
+ return self->priv->authorization_domain;
+}
+
+/**
+ * gdata_batch_operation_get_feed_uri:
+ * @self: a #GDataBatchOperation
+ *
+ * Gets the #GDataBatchOperation:feed-uri property.
+ *
+ * Return value: the batch operation's feed URI
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_batch_operation_get_feed_uri (GDataBatchOperation *self)
+{
+ g_return_val_if_fail (GDATA_IS_BATCH_OPERATION (self), NULL);
+ return self->priv->feed_uri;
+}
+
+/* Add an operation to the list of operations to be executed when the #GDataBatchOperation is run, and return its operation ID */
+static guint
+add_operation (GDataBatchOperation *self, GDataBatchOperationType type, GDataEntry *entry, GDataBatchOperationCallback callback, gpointer user_data)
+{
+ BatchOperation *op;
+
+ /* Create the operation */
+ op = g_slice_new0 (BatchOperation);
+ op->id = (self->priv->next_id++);
+ op->type = type;
+ op->callback = callback;
+ op->user_data = user_data;
+ op->entry = g_object_ref (entry);
+
+ /* Add the operation to the table */
+ g_hash_table_insert (self->priv->operations, GUINT_TO_POINTER (op->id), op);
+
+ return op->id;
+}
+
+/**
+ * _gdata_batch_operation_get_operation:
+ * @self: a #GDataBatchOperation
+ * @id: the operation ID
+ *
+ * Return the #BatchOperation for the given operation ID.
+ *
+ * Return value: the relevant #BatchOperation, or %NULL
+ *
+ * Since: 0.7.0
+ */
+BatchOperation *
+_gdata_batch_operation_get_operation (GDataBatchOperation *self, guint id)
+{
+ g_return_val_if_fail (GDATA_IS_BATCH_OPERATION (self), NULL);
+ g_return_val_if_fail (id > 0, NULL);
+
+ return g_hash_table_lookup (self->priv->operations, GUINT_TO_POINTER (id));
+}
+
+/* Run a user-supplied callback for a #BatchOperation whose return value we've just processed. This is designed to be used in an idle handler, so
+ * that the callback is run in the main thread. It can be called if the user-supplied callback is %NULL (e.g. in the case that the callback's been
+ * called before). */
+static gboolean
+run_callback_cb (BatchOperation *op)
+{
+ if (op->callback != NULL)
+ op->callback (op->id, op->type, op->entry, op->error, op->user_data);
+
+ /* Unset the callback so that it can't be called again */
+ op->callback = NULL;
+
+ return FALSE;
+}
+
+/**
+ * _gdata_batch_operation_run_callback:
+ * @self: a #GDataBatchOperation
+ * @op: the #BatchOperation which has been finished
+ * @entry: (allow-none): the entry representing the operation's result, or %NULL
+ * @error: the error from the operation, or %NULL
+ *
+ * Run the callback for @op to notify the user code that the operation's result has been received and processed. Either @entry or @error should be
+ * set (and the other should be %NULL), signifying a successful operation or a failed operation, respectively.
+ *
+ * The function will call @op's user-supplied callback, if available, in either the current or the main thread, depending on whether the
+ * #GDataBatchOperation was run with gdata_batch_operation_run() or gdata_batch_operation_run_async().
+ *
+ * Since: 0.7.0
+ */
+void
+_gdata_batch_operation_run_callback (GDataBatchOperation *self, BatchOperation *op, GDataEntry *entry, GError *error)
+{
+ g_return_if_fail (GDATA_IS_BATCH_OPERATION (self));
+ g_return_if_fail (op != NULL);
+ g_return_if_fail (entry == NULL || GDATA_IS_ENTRY (entry));
+ g_return_if_fail (entry == NULL || error == NULL);
+
+ /* We can free the request data, and replace it with the response data */
+ g_free (op->query_id);
+ op->query_id = NULL;
+ if (op->entry != NULL)
+ g_object_unref (op->entry);
+ if (entry != NULL)
+ g_object_ref (entry);
+ op->entry = entry;
+ op->error = error;
+
+ /* Don't bother scheduling run_callback_cb() if there is no callback to run */
+ if (op->callback == NULL)
+ return;
+
+ /* Only dispatch it in the main thread if the request was run with *_run_async(). This allows applications to run batch operations entirely in
+ * application-owned threads if desired. */
+ if (self->priv->is_async == TRUE) {
+ /* Send the callback; use G_PRIORITY_DEFAULT rather than G_PRIORITY_DEFAULT_IDLE
+ * to contend with the priorities used by the callback functions in GAsyncResult */
+ g_idle_add_full (G_PRIORITY_DEFAULT, (GSourceFunc) run_callback_cb, op, NULL);
+ } else {
+ run_callback_cb (op);
+ }
+}
+
+/* Free a #BatchOperation */
+static void
+operation_free (BatchOperation *op)
+{
+ g_free (op->query_id);
+ if (op->entry != NULL)
+ g_object_unref (op->entry);
+ if (op->error != NULL)
+ g_error_free (op->error);
+
+ g_slice_free (BatchOperation, op);
+}
+
+/**
+ * gdata_batch_operation_add_query:
+ * @self: a #GDataBatchOperation
+ * @id: the ID of the entry being queried for
+ * @entry_type: the type of the entry which will be returned
+ * @callback: (scope async): a #GDataBatchOperationCallback to call when the query is finished, or %NULL
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Add a query to the #GDataBatchOperation, to be executed when the operation is run. The query will return a #GDataEntry (of subclass type
+ * @entry_type) representing the given entry @id. The ID is of the same format as that returned by gdata_entry_get_id().
+ *
+ * Note that a single batch operation should not operate on a given #GDataEntry more than once, as there's no guarantee about the order in which the
+ * batch operation's operations will be performed.
+ *
+ * @callback will be called when the #GDataBatchOperation is run with gdata_batch_operation_run() (in which case it will be called in the thread which
+ * ran the batch operation), or with gdata_batch_operation_run_async() (in which case it will be called in an idle handler in the main thread). The
+ * @operation_id passed to the callback will match the return value of gdata_batch_operation_add_query(), and the @operation_type will be
+ * %GDATA_BATCH_OPERATION_QUERY. If the query was successful, the resulting entry will be passed to the callback function as @entry, and @error will
+ * be %NULL. If, however, the query was unsuccessful, @entry will be %NULL and @error will contain a #GError detailing what went wrong.
+ *
+ * Return value: operation ID for the added query, or <code class="literal">0</code>
+ *
+ * Since: 0.7.0
+ */
+guint
+gdata_batch_operation_add_query (GDataBatchOperation *self, const gchar *id, GType entry_type,
+ GDataBatchOperationCallback callback, gpointer user_data)
+{
+ BatchOperation *op;
+
+ g_return_val_if_fail (GDATA_IS_BATCH_OPERATION (self), 0);
+ g_return_val_if_fail (id != NULL, 0);
+ g_return_val_if_fail (g_type_is_a (entry_type, GDATA_TYPE_ENTRY), 0);
+ g_return_val_if_fail (self->priv->has_run == FALSE, 0);
+
+ /* Create the operation manually, since it would be messy to special-case add_operation() to do this */
+ op = g_slice_new0 (BatchOperation);
+ op->id = (self->priv->next_id++);
+ op->type = GDATA_BATCH_OPERATION_QUERY;
+ op->callback = callback;
+ op->user_data = user_data;
+ op->query_id = g_strdup (id);
+ op->entry_type = entry_type;
+
+ /* Add the operation to the table */
+ g_hash_table_insert (self->priv->operations, GUINT_TO_POINTER (op->id), op);
+
+ return op->id;
+}
+
+/**
+ * gdata_batch_operation_add_insertion:
+ * @self: a #GDataBatchOperation
+ * @entry: the #GDataEntry to insert
+ * @callback: (scope async): a #GDataBatchOperationCallback to call when the insertion is finished, or %NULL
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Add an entry to the #GDataBatchOperation, to be inserted on the server when the operation is run. The insertion will return the inserted version
+ * of @entry. @entry is reffed by the function, so may be freed after it returns.
+ *
+ * @callback will be called as specified in the documentation for gdata_batch_operation_add_query(), with an @operation_type of
+ * %GDATA_BATCH_OPERATION_INSERTION.
+ *
+ * Return value: operation ID for the added insertion, or <code class="literal">0</code>
+ *
+ * Since: 0.7.0
+ */
+guint
+gdata_batch_operation_add_insertion (GDataBatchOperation *self, GDataEntry *entry, GDataBatchOperationCallback callback, gpointer user_data)
+{
+ g_return_val_if_fail (GDATA_IS_BATCH_OPERATION (self), 0);
+ g_return_val_if_fail (GDATA_IS_ENTRY (entry), 0);
+ g_return_val_if_fail (self->priv->has_run == FALSE, 0);
+
+ return add_operation (self, GDATA_BATCH_OPERATION_INSERTION, entry, callback, user_data);
+}
+
+/**
+ * gdata_batch_operation_add_update:
+ * @self: a #GDataBatchOperation
+ * @entry: the #GDataEntry to update
+ * @callback: (scope async): a #GDataBatchOperationCallback to call when the update is finished, or %NULL
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Add an entry to the #GDataBatchOperation, to be updated on the server when the operation is run. The update will return the updated version of
+ * @entry. @entry is reffed by the function, so may be freed after it returns.
+ *
+ * Note that a single batch operation should not operate on a given #GDataEntry more than once, as there's no guarantee about the order in which the
+ * batch operation's operations will be performed.
+ *
+ * @callback will be called as specified in the documentation for gdata_batch_operation_add_query(), with an @operation_type of
+ * %GDATA_BATCH_OPERATION_UPDATE.
+ *
+ * Return value: operation ID for the added update, or <code class="literal">0</code>
+ *
+ * Since: 0.7.0
+ */
+guint
+gdata_batch_operation_add_update (GDataBatchOperation *self, GDataEntry *entry, GDataBatchOperationCallback callback, gpointer user_data)
+{
+ g_return_val_if_fail (GDATA_IS_BATCH_OPERATION (self), 0);
+ g_return_val_if_fail (GDATA_IS_ENTRY (entry), 0);
+ g_return_val_if_fail (self->priv->has_run == FALSE, 0);
+
+ return add_operation (self, GDATA_BATCH_OPERATION_UPDATE, entry, callback, user_data);
+}
+
+/**
+ * gdata_batch_operation_add_deletion:
+ * @self: a #GDataBatchOperation
+ * @entry: the #GDataEntry to delete
+ * @callback: (scope async): a #GDataBatchOperationCallback to call when the deletion is finished, or %NULL
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Add an entry to the #GDataBatchOperation, to be deleted on the server when the operation is run. @entry is reffed by the function, so may be freed
+ * after it returns.
+ *
+ * Note that a single batch operation should not operate on a given #GDataEntry more than once, as there's no guarantee about the order in which the
+ * batch operation's operations will be performed.
+ *
+ * @callback will be called as specified in the documentation for gdata_batch_operation_add_query(), with an @operation_type of
+ * %GDATA_BATCH_OPERATION_DELETION.
+ *
+ * Return value: operation ID for the added deletion, or <code class="literal">0</code>
+ *
+ * Since: 0.7.0
+ */
+guint
+gdata_batch_operation_add_deletion (GDataBatchOperation *self, GDataEntry *entry, GDataBatchOperationCallback callback, gpointer user_data)
+{
+ g_return_val_if_fail (GDATA_IS_BATCH_OPERATION (self), 0);
+ g_return_val_if_fail (GDATA_IS_ENTRY (entry), 0);
+ g_return_val_if_fail (self->priv->has_run == FALSE, 0);
+
+ return add_operation (self, GDATA_BATCH_OPERATION_DELETION, entry, callback, user_data);
+}
+
+/**
+ * gdata_batch_operation_run:
+ * @self: a #GDataBatchOperation
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Run the #GDataBatchOperation synchronously. This will send all the operations in the batch operation to the server, and call their respective
+ * callbacks synchronously (i.e. before gdata_batch_operation_run() returns, and in the same thread that called gdata_batch_operation_run()) as the
+ * server returns results for each operation.
+ *
+ * The callbacks for all of the operations in the batch operation are always guaranteed to be called, even if the batch operation as a whole fails.
+ * Each callback will be called exactly once for each time gdata_batch_operation_run() is called.
+ *
+ * The return value of the function indicates whether the overall batch operation was successful, and doesn't indicate the status of any of the
+ * operations it comprises. gdata_batch_operation_run() could return %TRUE even if all of its operations failed.
+ *
+ * @cancellable can be used to cancel the entire batch operation any time before or during the network activity. If @cancellable is cancelled
+ * after network activity has finished, gdata_batch_operation_run() will continue and finish as normal.
+ *
+ * Return value: %TRUE on success, %FALSE otherwise
+ *
+ * Since: 0.7.0
+ */
+gboolean
+gdata_batch_operation_run (GDataBatchOperation *self, GCancellable *cancellable, GError **error)
+{
+ GDataBatchOperationPrivate *priv = self->priv;
+ SoupMessage *message;
+ GDataFeed *feed;
+ GTimeVal updated;
+ gchar *upload_data;
+ guint status;
+ GHashTableIter iter;
+ gpointer op_id;
+ BatchOperation *op;
+ GError *child_error = NULL;
+
+ g_return_val_if_fail (GDATA_IS_BATCH_OPERATION (self), FALSE);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (priv->has_run == FALSE, FALSE);
+
+ /* Check for early cancellation. */
+ if (g_cancellable_set_error_if_cancelled (cancellable, error)) {
+ return FALSE;
+ }
+
+ /* Check whether the service actually supports these kinds of
+ * operations. */
+ g_hash_table_iter_init (&iter, priv->operations);
+ while (g_hash_table_iter_next (&iter, &op_id, (gpointer*) &op) == TRUE) {
+ GDataBatchable *batchable = GDATA_BATCHABLE (priv->service);
+ GDataBatchableIface *batchable_iface;
+
+ batchable_iface = GDATA_BATCHABLE_GET_IFACE (batchable);
+
+ if (batchable_iface->is_supported != NULL &&
+ !batchable_iface->is_supported (op->type)) {
+ g_set_error (error, GDATA_SERVICE_ERROR,
+ GDATA_SERVICE_ERROR_WITH_BATCH_OPERATION,
+ _("Batch operations are unsupported by "
+ "this service."));
+ return FALSE;
+ }
+ }
+
+ message = _gdata_service_build_message (priv->service, priv->authorization_domain, SOUP_METHOD_POST, priv->feed_uri, NULL, TRUE);
+
+ /* Build the request */
+ g_get_current_time (&updated);
+ feed = _gdata_feed_new (GDATA_TYPE_FEED, "Batch operation feed",
+ "batch1", updated.tv_sec);
+
+ g_hash_table_iter_init (&iter, priv->operations);
+ while (g_hash_table_iter_next (&iter, &op_id, (gpointer*) &op) == TRUE) {
+ if (op->type == GDATA_BATCH_OPERATION_QUERY) {
+ /* Queries are weird; build a new throwaway entry, and add it to the feed */
+ GDataEntry *entry;
+ GDataEntryClass *klass;
+ gchar *entry_uri;
+
+ klass = g_type_class_ref (op->entry_type);
+ g_assert (klass->get_entry_uri != NULL);
+
+ entry_uri = klass->get_entry_uri (op->query_id);
+ entry = gdata_entry_new (entry_uri);
+ g_free (entry_uri);
+
+ gdata_entry_set_title (entry, "Batch operation query");
+ _gdata_entry_set_updated (entry, updated.tv_sec);
+
+ _gdata_entry_set_batch_data (entry, op->id, op->type);
+ _gdata_feed_add_entry (feed, entry);
+
+ g_type_class_unref (klass);
+ g_object_unref (entry);
+ } else {
+ /* Everything else just dumps the entry's XML in the request */
+ _gdata_entry_set_batch_data (op->entry, op->id, op->type);
+ _gdata_feed_add_entry (feed, op->entry);
+ }
+ }
+
+ upload_data = gdata_parsable_get_xml (GDATA_PARSABLE (feed));
+ soup_message_set_request (message, "application/atom+xml", SOUP_MEMORY_TAKE, upload_data, strlen (upload_data));
+
+ g_object_unref (feed);
+
+ /* Ensure that this GDataBatchOperation can't be run again */
+ priv->has_run = TRUE;
+
+ /* Send the message */
+ status = _gdata_service_send_message (priv->service, message, cancellable, &child_error);
+
+ if (status != SOUP_STATUS_OK) {
+ /* Iff status is SOUP_STATUS_NONE or SOUP_STATUS_CANCELLED, child_error has already been set */
+ if (status != SOUP_STATUS_NONE && status != SOUP_STATUS_CANCELLED) {
+ /* Error */
+ GDataServiceClass *klass = GDATA_SERVICE_GET_CLASS (priv->service);
+ g_assert (klass->parse_error_response != NULL);
+ klass->parse_error_response (priv->service, GDATA_OPERATION_BATCH, status, message->reason_phrase, message->response_body->data,
+ message->response_body->length, &child_error);
+ }
+ g_object_unref (message);
+
+ goto error;
+ }
+
+ /* Parse the XML; GDataBatchFeed will fire off the relevant callbacks */
+ g_assert (message->response_body->data != NULL);
+ feed = GDATA_FEED (_gdata_parsable_new_from_xml (GDATA_TYPE_BATCH_FEED, message->response_body->data, message->response_body->length,
+ self, &child_error));
+ g_object_unref (message);
+
+ if (feed == NULL)
+ goto error;
+ g_object_unref (feed);
+
+ return TRUE;
+
+error:
+ /* Call the callbacks for each of our operations to notify them of the error */
+ g_hash_table_iter_init (&iter, priv->operations);
+ while (g_hash_table_iter_next (&iter, &op_id, (gpointer*) &op) == TRUE)
+ _gdata_batch_operation_run_callback (self, op, NULL, g_error_copy (child_error));
+
+ g_propagate_error (error, child_error);
+
+ return FALSE;
+}
+
+static void
+run_thread (GTask *task, gpointer source_object, gpointer task_data, GCancellable *cancellable)
+{
+ GDataBatchOperation *operation = GDATA_BATCH_OPERATION (source_object);
+ g_autoptr(GError) error = NULL;
+
+ /* Run the batch operation and return */
+ if (!gdata_batch_operation_run (operation, cancellable, &error))
+ g_task_return_error (task, g_steal_pointer (&error));
+ else
+ g_task_return_boolean (task, TRUE);
+}
+
+/**
+ * gdata_batch_operation_run_async:
+ * @self: a #GDataBatchOperation
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when the batch operation is finished, or %NULL
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Run the #GDataBatchOperation asynchronously. This will send all the operations in the batch operation to the server, and call their respective
+ * callbacks asynchronously (i.e. in idle functions in the main thread, usually after gdata_batch_operation_run_async() has returned) as the
+ * server returns results for each operation. @self is reffed when this function is called, so can safely be unreffed after this function returns.
+ *
+ * For more details, see gdata_batch_operation_run(), which is the synchronous version of this function.
+ *
+ * When the entire batch operation is finished, @callback will be called. You can then call gdata_batch_operation_run_finish() to get the results of
+ * the batch operation.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_batch_operation_run_async (GDataBatchOperation *self, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_autoptr(GTask) task = NULL;
+
+ g_return_if_fail (GDATA_IS_BATCH_OPERATION (self));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+ g_return_if_fail (self->priv->has_run == FALSE);
+
+ /* Mark the operation as async for the purposes of deciding where to call the callbacks */
+ self->priv->is_async = TRUE;
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_batch_operation_run_async);
+ g_task_run_in_thread (task, run_thread);
+}
+
+/**
+ * gdata_batch_operation_run_finish:
+ * @self: a #GDataBatchOperation
+ * @async_result: a #GAsyncResult
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous batch operation run with gdata_batch_operation_run_async().
+ *
+ * Return values are as for gdata_batch_operation_run().
+ *
+ * Return value: %TRUE on success, %FALSE otherwise
+ *
+ * Since: 0.7.0
+ */
+gboolean
+gdata_batch_operation_run_finish (GDataBatchOperation *self, GAsyncResult *async_result, GError **error)
+{
+ GDataBatchOperationPrivate *priv = self->priv;
+ g_autoptr(GError) child_error = NULL;
+
+ g_return_val_if_fail (GDATA_IS_BATCH_OPERATION (self), FALSE);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (async_result), FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (g_task_is_valid (async_result, self), FALSE);
+ g_return_val_if_fail (g_async_result_is_tagged (async_result, gdata_batch_operation_run_async), FALSE);
+
+ if (!g_task_propagate_boolean (G_TASK (async_result), &child_error)) {
+ if (priv->has_run == FALSE) {
+ GHashTableIter iter;
+ gpointer op_id;
+ BatchOperation *op;
+
+ /* Temporarily mark the operation as synchronous so that the callbacks get dispatched in this thread */
+ priv->is_async = FALSE;
+
+ /* If has_run hasn't been set, the call to gdata_batch_operation_run() was never made in the thread, and so none of the
+ * operations' callbacks have been called. Call the callbacks for each of our operations to notify them of the error.
+ * If has_run has been set, gdata_batch_operation_run() has already done this for us. */
+ g_hash_table_iter_init (&iter, priv->operations);
+ while (g_hash_table_iter_next (&iter, &op_id, (gpointer*) &op) == TRUE)
+ _gdata_batch_operation_run_callback (self, op, NULL, g_error_copy (child_error));
+
+ priv->is_async = TRUE;
+ }
+
+ g_propagate_error (error, g_steal_pointer (&child_error));
+
+ return FALSE;
+ }
+
+ return TRUE;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_BATCH_OPERATION_H
+#define GDATA_BATCH_OPERATION_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-service.h>
+#include <gdata/gdata-entry.h>
+#include <gdata/gdata-authorization-domain.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_LINK_BATCH:
+ *
+ * The relation type URI for the batch operation URI for a given #GDataFeed.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/gdata/docs/batch.html#Submit_HTTP">GData specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_LINK_BATCH "http://schemas.google.com/g/2005#batch"
+
+/**
+ * GDataBatchOperationType:
+ * @GDATA_BATCH_OPERATION_QUERY: a query operation
+ * @GDATA_BATCH_OPERATION_INSERTION: an insertion operation
+ * @GDATA_BATCH_OPERATION_UPDATE: an update operation
+ * @GDATA_BATCH_OPERATION_DELETION: a deletion operation
+ *
+ * Indicates which type of batch operation caused the current #GDataBatchOperationCallback to be called.
+ *
+ * Since: 0.7.0
+ */
+typedef enum {
+ GDATA_BATCH_OPERATION_QUERY = 0,
+ GDATA_BATCH_OPERATION_INSERTION,
+ GDATA_BATCH_OPERATION_UPDATE,
+ GDATA_BATCH_OPERATION_DELETION
+} GDataBatchOperationType;
+
+/**
+ * GDataBatchOperationCallback:
+ * @operation_id: the operation ID returned from gdata_batch_operation_add_*()
+ * @operation_type: the type of operation which was requested
+ * @entry: the result of the operation, or %NULL
+ * @error: a #GError describing any error which occurred, or %NULL
+ * @user_data: user data passed to the callback
+ *
+ * Callback function called once for each operation in a batch operation run. The operation is identified by @operation_id and @operation_type (where
+ * @operation_id is the ID returned by the relevant call to gdata_batch_operation_add_query(), gdata_batch_operation_add_insertion(),
+ * gdata_batch_operation_add_update() or gdata_batch_operation_add_deletion(), and @operation_type shows which one of the above was called).
+ *
+ * If the operation was successful, the resulting #GDataEntry will be passed in as @entry, and @error will be %NULL. Otherwise, @entry will be %NULL
+ * and a descriptive error will be in @error. If @operation_type is %GDATA_BATCH_OPERATION_DELETION, @entry will always be %NULL, and @error will be
+ * %NULL or non-%NULL as appropriate.
+ *
+ * If the callback code needs to retain a copy of @entry, it must be referenced (with g_object_ref()). Similarly, @error is owned by the calling code,
+ * and must not be freed.
+ *
+ * The callback is called in the main thread, and there is no guarantee on the order in which the callbacks for the operations in a run are executed,
+ * or whether they will be called in a timely manner. It is, however, guaranteed that they will all be called before the #GAsyncReadyCallback which
+ * signals the completion of the run (if initiated with gdata_batch_operation_run_async()) is called; or gdata_batch_operation_run() returns (if
+ * initiated synchronously).
+ *
+ * Since: 0.7.0
+ */
+typedef void (*GDataBatchOperationCallback) (guint operation_id, GDataBatchOperationType operation_type, GDataEntry *entry,
+ GError *error, gpointer user_data);
+
+#define GDATA_TYPE_BATCH_OPERATION (gdata_batch_operation_get_type ())
+#define GDATA_BATCH_OPERATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_BATCH_OPERATION, GDataBatchOperation))
+#define GDATA_BATCH_OPERATION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_BATCH_OPERATION, GDataBatchOperationClass))
+#define GDATA_IS_BATCH_OPERATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_BATCH_OPERATION))
+#define GDATA_IS_BATCH_OPERATION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_BATCH_OPERATION))
+#define GDATA_BATCH_OPERATION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_BATCH_OPERATION, GDataBatchOperationClass))
+
+typedef struct _GDataBatchOperationPrivate GDataBatchOperationPrivate;
+
+/**
+ * GDataBatchOperation:
+ *
+ * All the fields in the #GDataBatchOperation structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ GObject parent;
+ GDataBatchOperationPrivate *priv;
+} GDataBatchOperation;
+
+/**
+ * GDataBatchOperationClass:
+ *
+ * All the fields in the #GDataBatchOperationClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ /*< private >*/
+ GObjectClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+ void (*_g_reserved2) (void);
+ void (*_g_reserved3) (void);
+ void (*_g_reserved4) (void);
+ void (*_g_reserved5) (void);
+} GDataBatchOperationClass;
+
+GType gdata_batch_operation_get_type (void) G_GNUC_CONST;
+
+GDataService *gdata_batch_operation_get_service (GDataBatchOperation *self) G_GNUC_PURE;
+GDataAuthorizationDomain *gdata_batch_operation_get_authorization_domain (GDataBatchOperation *self) G_GNUC_PURE;
+const gchar *gdata_batch_operation_get_feed_uri (GDataBatchOperation *self) G_GNUC_PURE;
+
+guint gdata_batch_operation_add_query (GDataBatchOperation *self, const gchar *id, GType entry_type,
+ GDataBatchOperationCallback callback, gpointer user_data);
+guint gdata_batch_operation_add_insertion (GDataBatchOperation *self, GDataEntry *entry, GDataBatchOperationCallback callback, gpointer user_data);
+guint gdata_batch_operation_add_update (GDataBatchOperation *self, GDataEntry *entry, GDataBatchOperationCallback callback, gpointer user_data);
+guint gdata_batch_operation_add_deletion (GDataBatchOperation *self, GDataEntry *entry, GDataBatchOperationCallback callback, gpointer user_data);
+
+gboolean gdata_batch_operation_run (GDataBatchOperation *self, GCancellable *cancellable, GError **error);
+void gdata_batch_operation_run_async (GDataBatchOperation *self, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
+gboolean gdata_batch_operation_run_finish (GDataBatchOperation *self, GAsyncResult *async_result, GError **error);
+
+G_END_DECLS
+
+#endif /* !GDATA_BATCH_OPERATION_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_BATCH_PRIVATE_H
+#define GDATA_BATCH_PRIVATE_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+typedef struct {
+ guint id;
+ GDataBatchOperationType type;
+ GDataBatchOperationCallback callback;
+ gpointer user_data;
+ gchar *query_id; /* only used for queries */
+ GType entry_type; /* only used for queries */
+ GError *error;
+ GDataEntry *entry; /* used for anything except queries, and to store the results of all operations */
+} BatchOperation;
+
+G_GNUC_INTERNAL BatchOperation *_gdata_batch_operation_get_operation (GDataBatchOperation *self, guint id) G_GNUC_PURE;
+G_GNUC_INTERNAL void _gdata_batch_operation_run_callback (GDataBatchOperation *self, BatchOperation *op, GDataEntry *entry, GError *error);
+
+G_END_DECLS
+
+#endif /* !GDATA_BATCH_PRIVATE_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-batchable
+ * @short_description: GData batch service interface
+ * @stability: Stable
+ * @include: gdata/gdata-batchable.h
+ *
+ * #GDataBatchable is an interface which can be implemented by #GDataServices which support batch operations on their entries. It allows the
+ * creation of a #GDataBatchOperation for the service, which allows a set of batch operations to be run.
+ *
+ * Since: 0.7.0
+ */
+
+#include <config.h>
+#include <glib.h>
+
+#include "gdata-batchable.h"
+#include "gdata-service.h"
+#include "gdata-batch-operation.h"
+
+GType
+gdata_batchable_get_type (void)
+{
+ static GType batchable_type = 0;
+
+ if (!batchable_type) {
+ batchable_type = g_type_register_static_simple (G_TYPE_INTERFACE, "GDataBatchable",
+ sizeof (GDataBatchableIface),
+ NULL, 0, NULL, 0);
+ g_type_interface_add_prerequisite (batchable_type, GDATA_TYPE_SERVICE);
+ }
+
+ return batchable_type;
+}
+
+/**
+ * gdata_batchable_create_operation:
+ * @self: a #GDataBatchable
+ * @domain: (allow-none): the #GDataAuthorizationDomain to authorize the operation, or %NULL
+ * @feed_uri: the URI to send the batch operation request to
+ *
+ * Creates a new #GDataBatchOperation for the given #GDataBatchable service, and with the given @feed_uri. @feed_uri is normally the %GDATA_LINK_BATCH
+ * link URI in the appropriate #GDataFeed from the service. If authorization will be required to perform any of the requests in the batch operation,
+ * @domain must be non-%NULL, and must be an authorization domain which covers all of the requests. Otherwise, @domain may be %NULL if authorization
+ * is not required.
+ *
+ * Return value: (transfer full): a new #GDataBatchOperation; unref with g_object_unref()
+ *
+ * Since: 0.9.0
+ */
+GDataBatchOperation *
+gdata_batchable_create_operation (GDataBatchable *self, GDataAuthorizationDomain *domain, const gchar *feed_uri)
+{
+ g_return_val_if_fail (GDATA_IS_BATCHABLE (self), NULL);
+ g_return_val_if_fail (domain == NULL || GDATA_IS_AUTHORIZATION_DOMAIN (domain), NULL);
+ g_return_val_if_fail (feed_uri != NULL, NULL);
+
+ return g_object_new (GDATA_TYPE_BATCH_OPERATION,
+ "service", self,
+ "authorization-domain", domain,
+ "feed-uri", feed_uri,
+ NULL);
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_BATCHABLE_H
+#define GDATA_BATCHABLE_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-service.h>
+#include <gdata/gdata-batch-operation.h>
+#include <gdata/gdata-authorization-domain.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_BATCHABLE (gdata_batchable_get_type ())
+#define GDATA_BATCHABLE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_BATCHABLE, GDataBatchable))
+#define GDATA_BATCHABLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_BATCHABLE, GDataBatchableIface))
+#define GDATA_IS_BATCHABLE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_BATCHABLE))
+#define GDATA_BATCHABLE_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), GDATA_TYPE_BATCHABLE, GDataBatchableIface))
+
+/**
+ * GDataBatchable:
+ *
+ * All the fields in the #GDataBatchable structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct _GDataBatchable GDataBatchable; /* dummy typedef */
+
+/**
+ * GDataBatchableIface:
+ * @is_supported: Determines whether the given #GDataBatchOperationType is
+ * supported by this #GDataBatchable; if not, operations using it will return
+ * %GDATA_SERVICE_ERROR_WITH_BATCH_OPERATION. It is valid for a
+ * #GDataBatchable to return %FALSE for all #GDataBatchOperationTypes if the
+ * server no longer supports batch operations. If this method is not
+ * implemented, it is assumed that all #GDataBatchOperationTypes are
+ * supported. Since: 0.17.2.
+ *
+ * All the fields in the #GDataBatchableIface structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ /*< private >*/
+ GTypeInterface parent;
+
+ /*< public >*/
+ gboolean (*is_supported) (GDataBatchOperationType operation_type);
+} GDataBatchableIface;
+
+GType gdata_batchable_get_type (void) G_GNUC_CONST;
+
+GDataBatchOperation *gdata_batchable_create_operation (GDataBatchable *self, GDataAuthorizationDomain *domain,
+ const gchar *feed_uri) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+G_END_DECLS
+
+#endif /* !GDATA_BATCHABLE_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * SECTION:gdata-buffer
+ * @short_description: GData buffer to allow threadsafe buffering
+ * @stability: Stable
+ * @include: gdata/gdata-buffer.h
+ *
+ * #GDataBuffer is a simple object which allows threadsafe buffering of data meaning, for example, data can be received from
+ * the network in a "push" fashion, buffered, then sent out to an output stream in a "pull" fashion.
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <string.h>
+
+#include "gdata-buffer.h"
+
+struct _GDataBufferChunk {
+ /*< private >*/
+ guint8 *data;
+ gsize length;
+ GDataBufferChunk *next;
+ /* Note: the data is actually allocated in the same memory block, so it's inside this comment right now.
+ * We simply set chunk->data to point to chunk + sizeof (GDataBufferChunk). */
+};
+
+/**
+ * gdata_buffer_new:
+ *
+ * Creates a new empty #GDataBuffer.
+ *
+ * Return value: a new #GDataBuffer; free with gdata_buffer_free()
+ *
+ * Since: 0.5.0
+ */
+GDataBuffer *
+gdata_buffer_new (void)
+{
+ GDataBuffer *buffer = g_slice_new0 (GDataBuffer);
+
+ g_mutex_init (&(buffer->mutex));
+ g_cond_init (&(buffer->cond));
+
+ return buffer;
+}
+
+/**
+ * gdata_buffer_free:
+ *
+ * Frees a #GDataBuffer. The function isn't threadsafe, so should only be called once
+ * use of the buffer has been reduced to only one thread (the reading thread, after
+ * the EOF has been reached).
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_buffer_free (GDataBuffer *self)
+{
+ GDataBufferChunk *chunk, *next_chunk;
+
+ g_return_if_fail (self != NULL);
+
+ for (chunk = self->head; chunk != NULL; chunk = next_chunk) {
+ next_chunk = chunk->next;
+ g_free (chunk);
+ }
+
+ g_cond_clear (&(self->cond));
+ g_mutex_clear (&(self->mutex));
+
+ g_slice_free (GDataBuffer, self);
+}
+
+/**
+ * gdata_buffer_push_data:
+ * @self: a #GDataBuffer
+ * @data: the data to push onto the buffer
+ * @length: the length of @data
+ *
+ * Pushes @length bytes of @data onto the buffer, taking a copy of the data. If @data is %NULL and @length is <code class="literal">0</code>,
+ * the buffer will be marked as having reached the EOF, and subsequent calls to gdata_buffer_push_data()
+ * will fail and return %FALSE.
+ *
+ * Assuming the buffer hasn't reached EOF, this operation is guaranteed to succeed (unless memory allocation fails).
+ *
+ * This function holds the lock on the #GDataBuffer, and signals any waiting calls to gdata_buffer_pop_data() once
+ * the new data has been pushed onto the buffer. This function is threadsafe.
+ *
+ * Return value: %TRUE on success, %FALSE otherwise
+ *
+ * Since: 0.5.0
+ */
+gboolean
+gdata_buffer_push_data (GDataBuffer *self, const guint8 *data, gsize length)
+{
+ GDataBufferChunk *chunk;
+
+ g_return_val_if_fail (self != NULL, 0);
+
+ g_mutex_lock (&(self->mutex));
+
+ if (G_UNLIKELY (self->reached_eof == TRUE)) {
+ /* If we're marked as having reached EOF, don't accept any more data */
+ g_mutex_unlock (&(self->mutex));
+ return FALSE;
+ } else if (G_UNLIKELY (data == NULL && length == 0)) {
+ /* If @data is NULL and @length is 0, mark the buffer as having reached EOF,
+ * and signal any waiting threads. */
+ self->reached_eof = TRUE;
+ g_cond_signal (&(self->cond));
+ g_mutex_unlock (&(self->mutex));
+ return FALSE;
+ }
+
+ /* Create the chunk */
+ chunk = g_malloc (sizeof (GDataBufferChunk) + length);
+ chunk->data = (guint8*) ((guint8*) chunk + sizeof (GDataBufferChunk)); /* pointer arithmetic in terms of bytes here */
+ chunk->length = length;
+ chunk->next = NULL;
+
+ /* Copy the data to the chunk */
+ if (G_LIKELY (data != NULL))
+ memcpy (chunk->data, data, length);
+
+ /* Add it to the buffer's tail */
+ if (self->tail != NULL)
+ *(self->tail) = chunk;
+ else
+ self->head = chunk;
+ self->tail = &(chunk->next);
+ self->total_length += length;
+
+ /* Signal any threads waiting to pop that data is available */
+ g_cond_signal (&(self->cond));
+
+ g_mutex_unlock (&(self->mutex));
+
+ return TRUE;
+}
+
+typedef struct {
+ GDataBuffer *buffer;
+ gboolean *cancelled;
+} CancelledData;
+
+static void
+pop_cancelled_cb (GCancellable *cancellable, CancelledData *data)
+{
+ /* Signal the pop_data function that it should stop blocking and cancel */
+ g_mutex_lock (&(data->buffer->mutex));
+ *(data->cancelled) = TRUE;
+ g_cond_signal (&(data->buffer->cond));
+ g_mutex_unlock (&(data->buffer->mutex));
+}
+
+/**
+ * gdata_buffer_pop_data:
+ * @self: a #GDataBuffer
+ * @data: (allow-none): return location for the popped data, or %NULL to just drop the data
+ * @length_requested: the number of bytes of data requested
+ * @reached_eof: return location for a value which is %TRUE when we've reached EOF, %FALSE otherwise, or %NULL
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ *
+ * Pops up to @length_requested bytes off the head of the buffer and copies them to @data, which must be allocated by
+ * the caller and have enough space to store at most @length_requested bytes of output.
+ *
+ * If the buffer contains enough data to satisfy @length_requested, this function returns immediately.
+ * Otherwise, this function blocks until data is pushed onto the head of the buffer with gdata_buffer_pop_data(). If
+ * the buffer is marked as having reached the EOF, this function will not block, and will instead return the
+ * remaining data in the buffer.
+ *
+ * This function holds the lock on the #GDataBuffer, and will automatically be signalled of new data pushed onto the
+ * buffer if it's blocking.
+ *
+ * If @cancellable is provided, calling g_cancellable_cancel() on it from another thread will cause the call to
+ * gdata_buffer_pop_data() to return immediately with whatever data it can find.
+ *
+ * Return value: the number of bytes returned in @data
+ *
+ * Since: 0.5.0
+ */
+gsize
+gdata_buffer_pop_data (GDataBuffer *self, guint8 *data, gsize length_requested, gboolean *reached_eof, GCancellable *cancellable)
+{
+ GDataBufferChunk *chunk;
+ gsize return_length = 0, length_remaining;
+ gulong cancelled_signal = 0;
+ gboolean cancelled = FALSE;
+
+ g_return_val_if_fail (self != NULL, 0);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), 0);
+
+ /* In the case:
+ * - length_requested < amount available: return length_requested
+ * - length_requested > amount available: block until more is available, return length_requested
+ * - length_requested > amount available and we've reached EOF: don't block, return all remaining data
+ * - length_requested is a whole number of chunks: remove those chunks, return length_requested
+ * - length_requested is less than one chunk: remove no chunks, return length_requested, set head_read_offset
+ * - length_requested is a fraction of multiple chunks: remove whole chunks, return length_requested, set head_read_offset
+ * for remaining fraction */
+
+ /* Set up a handler so we can stop if we're cancelled. This must be done before we lock @self->mutex, or deadlock could occur if the
+ * cancellable has already been cancelled — g_cancellable_connect() would call pop_cancelled_cb() directly, and it would attempt to lock
+ * @self->mutex again. */
+ if (cancellable != NULL) {
+ CancelledData cancelled_data;
+
+ cancelled_data.buffer = self;
+ cancelled_data.cancelled = &cancelled;
+
+ cancelled_signal = g_cancellable_connect (cancellable, (GCallback) pop_cancelled_cb, &cancelled_data, NULL);
+ }
+
+ g_mutex_lock (&(self->mutex));
+
+ if (self->reached_eof == TRUE && length_requested > self->total_length) {
+ /* Return data up to the EOF */
+ return_length = self->total_length;
+ } else if (length_requested > self->total_length) {
+ /* Block until more data is available */
+ while (length_requested > self->total_length) {
+ /* If we've already been cancelled, don't wait on @self->cond, since it'll never be signalled again. */
+ if (cancelled == FALSE) {
+ g_cond_wait (&(self->cond), &(self->mutex));
+ }
+
+ /* If the g_cond_wait() returned because it was signalled from the GCancellable callback (rather than from
+ * data being pushed into the buffer), stop blocking for data and make do with what we have so far. */
+ if (cancelled == TRUE || self->reached_eof == TRUE) {
+ return_length = MIN (length_requested, self->total_length);
+ break;
+ } else {
+ return_length = length_requested;
+ }
+ }
+ } else {
+ return_length = length_requested;
+ }
+
+ /* Set reached_eof */
+ if (reached_eof != NULL)
+ *reached_eof = self->reached_eof && length_requested >= self->total_length;
+
+ /* Return if we haven't got any data to pop (i.e. if we were cancelled before even one chunk arrived) */
+ if (return_length == 0)
+ goto done;
+
+ /* Otherwise, get on with things */
+ length_remaining = return_length;
+
+ /* We can't assume we'll have enough data, since we may have reached EOF */
+ chunk = self->head;
+ while (chunk != NULL && self->head_read_offset + length_remaining >= chunk->length) {
+ GDataBufferChunk *next_chunk;
+ gsize chunk_length = chunk->length - self->head_read_offset;
+
+ /* Copy the data to the output */
+ length_remaining -= chunk_length;
+ if (data != NULL) {
+ memcpy (data, chunk->data + self->head_read_offset, chunk_length);
+ data += chunk_length;
+ }
+
+ /* Free the chunk and move on */
+ next_chunk = chunk->next;
+ g_free (chunk);
+ chunk = next_chunk;
+
+ /* Reset the head read offset, since we've processed at least the first chunk now */
+ self->head_read_offset = 0;
+ }
+
+ /* If the requested length is still > 0, it must be < chunk->length, and chunk must != NULL (if it does, the cached total_length has
+ * been corrupted somewhere). */
+ if (G_LIKELY (length_remaining > 0)) {
+ g_assert (chunk != NULL);
+ g_assert_cmpuint (length_remaining, <=, chunk->length);
+
+ /* Copy the requested data to the output */
+ if (data != NULL) {
+ memcpy (data, chunk->data + self->head_read_offset, length_remaining);
+ }
+ self->head_read_offset += length_remaining;
+ }
+
+ self->head = chunk;
+ if (self->head == NULL)
+ self->tail = NULL;
+ self->total_length -= return_length;
+
+done:
+ g_mutex_unlock (&(self->mutex));
+
+ /* Disconnect from the cancelled signal. Note that this has to be done without @self->mutex held, or deadlock can occur.
+ * (g_cancellable_disconnect() waits for any in-progress signal handler call to finish, which can't happen until the mutex is released.) */
+ if (cancelled_signal != 0)
+ g_cancellable_disconnect (cancellable, cancelled_signal);
+
+ return return_length;
+}
+
+/**
+ * gdata_buffer_pop_all_data:
+ * @self: a #GDataBuffer
+ * @data: return location for the popped data
+ * @maximum_length: the maximum number of bytes to return
+ * @reached_eof: return location for a value which is %TRUE when we've reached EOF, %FALSE otherwise, or %NULL
+ *
+ * Pops as much data as possible off the #GDataBuffer, up to a limit of @maximum_length bytes. If fewer bytes exist
+ * in the buffer, fewer bytes will be returned. If more bytes exist in the buffer, @maximum_length bytes will be returned.
+ *
+ * If <code class="literal">0</code> bytes exist in the buffer, this function will block until data is available. Otherwise, it will never block.
+ *
+ * Return value: the number of bytes returned in @data (guaranteed to be more than <code class="literal">0</code> and at most @maximum_length)
+ *
+ * Since: 0.5.0
+ */
+gsize
+gdata_buffer_pop_data_limited (GDataBuffer *self, guint8 *data, gsize maximum_length, gboolean *reached_eof)
+{
+ g_return_val_if_fail (self != NULL, 0);
+ g_return_val_if_fail (data != NULL, 0);
+ g_return_val_if_fail (maximum_length > 0, 0);
+
+ /* If there's no data in the buffer, block until some is available */
+ g_mutex_lock (&(self->mutex));
+ if (self->total_length == 0 && self->reached_eof == FALSE) {
+ g_cond_wait (&(self->cond), &(self->mutex));
+ }
+ g_mutex_unlock (&(self->mutex));
+
+ return gdata_buffer_pop_data (self, data, MIN (maximum_length, self->total_length), reached_eof, NULL);
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_BUFFER_H
+#define GDATA_BUFFER_H
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gio/gio.h>
+
+G_BEGIN_DECLS
+
+typedef struct _GDataBufferChunk GDataBufferChunk;
+
+/**
+ * GDataBuffer:
+ *
+ * All the fields in the #GDataBuffer structure are private and should never be accessed directly.
+ *
+ * Since: 0.5.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataBufferChunk *head;
+ gsize head_read_offset; /* number of bytes which have already been popped from the head chunk */
+ gsize total_length; /* total length of all the chunks available to read (i.e. head_read_offset is already subtracted) */
+ gboolean reached_eof; /* set to TRUE only once we've reached EOF */
+ GDataBufferChunk **tail; /* pointer to the GDataBufferChunk->next field of the current tail chunk */
+
+ GMutex mutex; /* mutex protecting the entire structure on push and pop */
+ GCond cond; /* a GCond to allow a popping thread to block on data being pushed into the buffer */
+} GDataBuffer;
+
+GDataBuffer *gdata_buffer_new (void) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_buffer_free (GDataBuffer *self);
+
+gboolean gdata_buffer_push_data (GDataBuffer *self, const guint8 *data, gsize length);
+gsize gdata_buffer_pop_data (GDataBuffer *self, guint8 *data, gsize length_requested, gboolean *reached_eof, GCancellable *cancellable);
+gsize gdata_buffer_pop_data_limited (GDataBuffer *self, guint8 *data, gsize maximum_length, gboolean *reached_eof);
+
+G_END_DECLS
+
+#endif /* !GDATA_BUFFER_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2011 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-client-login-authorizer
+ * @short_description: GData ClientLogin authorization interface
+ * @stability: Stable
+ * @include: gdata/gdata-client-login-authorizer.h
+ *
+ * #GDataClientLoginAuthorizer provides an implementation of the #GDataAuthorizer interface for authentication and authorization using the deprecated
+ * <ulink type="http" url="http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html">ClientLogin</ulink> process.
+ *
+ * As noted, the ClientLogin process is being deprecated in favour of OAuth 2.0. This API is not (yet) deprecated, however. One of the main reasons
+ * for ClientLogin being deprecated is that it cannot support two-factor authentication as now available to Google Accounts. Any account which has
+ * two-factor authentication enabled has to use a service-specific one-time password instead if a client is authenticating with
+ * #GDataClientLoginAuthorizer. More documentation about this is
+ * <ulink type="http" url="http://www.google.com/support/accounts/bin/static.py?page=guide.cs&guide=1056283&topic=1056286">available online</ulink>.
+ * Note that newer services cannot be authenticated against using ClientLogin,
+ * and a #GDataOAuth2Authorizer must be used instead.
+ *
+ * The ClientLogin process is a simple one whereby the user's Google Account username and password are sent over an HTTPS connection to the Google
+ * Account servers (when gdata_client_login_authorizer_authenticate() is called), which return an authorization token. This token is then attached to
+ * all future requests to the online service. A slight complication is that the Google Accounts service may return a CAPTCHA challenge instead of
+ * immediately returning an authorization token. In this case, the #GDataClientLoginAuthorizer::captcha-challenge signal will be emitted, and the
+ * user's response to the CAPTCHA should be returned by the handler.
+ *
+ * ClientLogin does not natively support authorization against multiple authorization domains concurrently with a single authorization token, so it
+ * has to be simulated by maintaining multiple authorization tokens if multiple authorization domains are used. This means that proportionally more
+ * network requests are made when gdata_client_login_authorizer_authenticate() is called, which will be proportionally slower. Handling of the
+ * multiple authorization tokens is otherwise transparent to the client.
+ *
+ * Each authorization token is long lived, so reauthorization is rarely necessary with #GDataClientLoginAuthorizer. Consequently, refreshing
+ * authorization using gdata_authorizer_refresh_authorization() is not supported by #GDataClientLoginAuthorizer, and will immediately return %FALSE
+ * with no error set.
+ *
+ * <example>
+ * <title>Authenticating Asynchronously Using ClientLogin</title>
+ * <programlisting>
+ * GDataSomeService *service;
+ * GDataClientLoginAuthorizer *authorizer;
+ *
+ * /<!-- -->* Create an authorizer and authenticate and authorize the service we're using, asynchronously. *<!-- -->/
+ * authorizer = gdata_client_login_authorizer_new ("companyName-applicationName-versionID", GDATA_TYPE_SOME_SERVICE);
+ * gdata_client_login_authorizer_authenticate_async (authorizer, username, password, cancellable,
+ * (GAsyncReadyCallback) authenticate_cb, user_data);
+ *
+ * /<!-- -->* Create a service object and link it with the authorizer *<!-- -->/
+ * service = gdata_some_service_new (GDATA_AUTHORIZER (authorizer));
+ *
+ * static void
+ * authenticate_cb (GDataClientLoginAuthorizer *authorizer, GAsyncResult *async_result, gpointer user_data)
+ * {
+ * GError *error = NULL;
+ *
+ * if (gdata_client_login_authorizer_authenticate_finish (authorizer, async_result, &error) == FALSE) {
+ * /<!-- -->* Notify the user of all errors except cancellation errors *<!-- -->/
+ * if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
+ * g_error ("Authentication failed: %s", error->message);
+ * }
+ * g_error_free (error);
+ * return;
+ * }
+ *
+ * /<!-- -->* (The client is now authenticated and authorized against the service.
+ * * It can now proceed to execute queries on the service object which require the user to be authenticated.) *<!-- -->/
+ * }
+ *
+ * g_object_unref (service);
+ * g_object_unref (authorizer);
+ * </programlisting>
+ * </example>
+ *
+ * Since: 0.9.0
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+
+#include "gdata-service.h"
+#include "gdata-private.h"
+#include "gdata-marshal.h"
+#include "gdata-client-login-authorizer.h"
+
+/* The default e-mail domain to use for usernames */
+#define EMAIL_DOMAIN "gmail.com"
+
+GQuark
+gdata_client_login_authorizer_error_quark (void)
+{
+ return g_quark_from_static_string ("gdata-client-login-authorizer-error-quark");
+}
+
+static void authorizer_init (GDataAuthorizerInterface *iface);
+static void dispose (GObject *object);
+static void finalize (GObject *object);
+static void get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+
+static void process_request (GDataAuthorizer *self, GDataAuthorizationDomain *domain, SoupMessage *message);
+static gboolean is_authorized_for_domain (GDataAuthorizer *self, GDataAuthorizationDomain *domain);
+
+static void notify_proxy_uri_cb (GObject *gobject, GParamSpec *pspec, GDataClientLoginAuthorizer *self);
+static void notify_timeout_cb (GObject *gobject, GParamSpec *pspec, GObject *self);
+
+static SoupURI *_get_proxy_uri (GDataClientLoginAuthorizer *self);
+static void _set_proxy_uri (GDataClientLoginAuthorizer *self, SoupURI *proxy_uri);
+
+struct _GDataClientLoginAuthorizerPrivate {
+ SoupSession *session;
+ SoupURI *proxy_uri; /* cached version only set if gdata_client_login_authorizer_get_proxy_uri() is called */
+ GProxyResolver *proxy_resolver;
+
+ gchar *client_id;
+
+ /* Mutex for username, password and auth_tokens. It has to be recursive as the top-level authentication functions need to hold a lock on
+ * auth_tokens while looping over it, but lower-level functions also need to modify auth_tokens to add the auth_tokens themselves once they're
+ * returned by the online service. */
+ GRecMutex mutex;
+
+ gchar *username;
+ GDataSecureString password; /* must be allocated by _gdata_service_secure_strdup() */
+
+ /* Mapping from GDataAuthorizationDomain to string? auth_token; auth_token is NULL for domains which aren't authorised at the moment */
+ GHashTable *auth_tokens;
+};
+
+enum {
+ PROP_CLIENT_ID = 1,
+ PROP_USERNAME,
+ PROP_PASSWORD,
+ PROP_PROXY_URI,
+ PROP_TIMEOUT,
+ PROP_PROXY_RESOLVER,
+};
+
+enum {
+ SIGNAL_CAPTCHA_CHALLENGE,
+ LAST_SIGNAL
+};
+
+static guint authorizer_signals[LAST_SIGNAL] = { 0, };
+
+G_DEFINE_TYPE_WITH_CODE (GDataClientLoginAuthorizer, gdata_client_login_authorizer, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_AUTHORIZER, authorizer_init))
+
+static void
+gdata_client_login_authorizer_class_init (GDataClientLoginAuthorizerClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataClientLoginAuthorizerPrivate));
+
+ gobject_class->get_property = get_property;
+ gobject_class->set_property = set_property;
+ gobject_class->dispose = dispose;
+ gobject_class->finalize = finalize;
+
+ /**
+ * GDataClientLoginAuthorizer:client-id:
+ *
+ * A client ID for your application (see the
+ * <ulink url="http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html#Request" type="http">reference documentation</ulink>).
+ *
+ * It is recommended that the ID is of the form <literal><replaceable>company name</replaceable>-<replaceable>application name</replaceable>-
+ * <replaceable>version ID</replaceable></literal>.
+ *
+ * Since: 0.9.0
+ */
+ g_object_class_install_property (gobject_class, PROP_CLIENT_ID,
+ g_param_spec_string ("client-id",
+ "Client ID", "A client ID for your application.",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataClientLoginAuthorizer:username:
+ *
+ * The user's Google username for authentication. This will always be a full e-mail address.
+ *
+ * This will only be set after authentication using gdata_client_login_authorizer_authenticate() is completed successfully. It will
+ * then be set to the username passed to gdata_client_login_authorizer_authenticate(), and a #GObject::notify signal will be emitted. If
+ * authentication fails, it will be set to %NULL.
+ *
+ * Since: 0.9.0
+ */
+ g_object_class_install_property (gobject_class, PROP_USERNAME,
+ g_param_spec_string ("username",
+ "Username", "The user's Google username for authentication.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataClientLoginAuthorizer:password:
+ *
+ * The user's account password for authentication.
+ *
+ * This will only be set after authentication using gdata_client_login_authorizer_authenticate() is completed successfully. It will
+ * then be set to the password passed to gdata_client_login_authorizer_authenticate(), and a #GObject::notify signal will be emitted. If
+ * authentication fails, it will be set to %NULL.
+ *
+ * If libgdata is compiled with libgcr support, the password will be stored in non-pageable memory. However, if it is retrieved
+ * using g_object_get() (or related functions) it will be copied to non-pageable memory and could end up being written to disk. Accessing
+ * the password using gdata_client_login_authorizer_get_password() will not perform any copies, and so maintains privacy.
+ *
+ * Since: 0.9.0
+ */
+ g_object_class_install_property (gobject_class, PROP_PASSWORD,
+ g_param_spec_string ("password",
+ "Password", "The user's account password for authentication.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataClientLoginAuthorizer:proxy-uri:
+ *
+ * The proxy URI used internally for all network requests.
+ *
+ * Since: 0.9.0
+ * Deprecated: 0.15.0: Use #GDataClientLoginAuthorizer:proxy-resolver instead, which gives more flexibility over the proxy used.
+ */
+ g_object_class_install_property (gobject_class, PROP_PROXY_URI,
+ g_param_spec_boxed ("proxy-uri",
+ "Proxy URI", "The proxy URI used internally for all network requests.",
+ SOUP_TYPE_URI,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataClientLoginAuthorizer:timeout:
+ *
+ * A timeout, in seconds, for network operations. If the timeout is exceeded, the operation will be cancelled and
+ * %GDATA_SERVICE_ERROR_NETWORK_ERROR will be returned.
+ *
+ * If the timeout is <code class="literal">0</code>, operations will never time out.
+ *
+ * Since: 0.9.0
+ */
+ g_object_class_install_property (gobject_class, PROP_TIMEOUT,
+ g_param_spec_uint ("timeout",
+ "Timeout", "A timeout, in seconds, for network operations.",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataClientLoginAuthorizer:proxy-resolver:
+ *
+ * The #GProxyResolver used to determine a proxy URI. Setting this will clear the #GDataClientLoginAuthorizer:proxy-uri property.
+ *
+ * Since: 0.15.0
+ */
+ g_object_class_install_property (gobject_class, PROP_PROXY_RESOLVER,
+ g_param_spec_object ("proxy-resolver",
+ "Proxy Resolver", "A GProxyResolver used to determine a proxy URI.",
+ G_TYPE_PROXY_RESOLVER,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataClientLoginAuthorizer::captcha-challenge:
+ * @authorizer: the #GDataClientLoginAuthorizer which received the challenge
+ * @uri: the URI of the CAPTCHA image to be used
+ *
+ * The #GDataClientLoginAuthorizer::captcha-challenge signal is emitted during the authentication process if the authorizer requires a CAPTCHA
+ * to be completed. The URI of a CAPTCHA image is given, and the program should display this to the user, and return their response (the text
+ * displayed in the image). There is no timeout imposed by the library for the response.
+ *
+ * Return value: a newly allocated string containing the text in the CAPTCHA image
+ *
+ * Since: 0.9.0
+ */
+ authorizer_signals[SIGNAL_CAPTCHA_CHALLENGE] = g_signal_new ("captcha-challenge",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL,
+ gdata_marshal_STRING__OBJECT_STRING,
+ G_TYPE_STRING, 1, G_TYPE_STRING);
+}
+
+static void
+authorizer_init (GDataAuthorizerInterface *iface)
+{
+ iface->process_request = process_request;
+ iface->is_authorized_for_domain = is_authorized_for_domain;
+}
+
+static void
+gdata_client_login_authorizer_init (GDataClientLoginAuthorizer *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_CLIENT_LOGIN_AUTHORIZER, GDataClientLoginAuthorizerPrivate);
+
+ /* Set up the authentication mutex */
+ g_rec_mutex_init (&(self->priv->mutex));
+ self->priv->auth_tokens = g_hash_table_new_full (g_direct_hash, g_direct_equal, g_object_unref, (GDestroyNotify) _gdata_service_secure_strfree);
+
+ /* Set up the session */
+ self->priv->session = _gdata_service_build_session ();
+
+ /* Proxy the SoupSession's proxy-uri and timeout properties */
+ g_signal_connect (self->priv->session, "notify::proxy-uri", (GCallback) notify_proxy_uri_cb, self);
+ g_signal_connect (self->priv->session, "notify::timeout", (GCallback) notify_timeout_cb, self);
+
+ /* Keep our GProxyResolver synchronized with SoupSession's. */
+ g_object_bind_property (self->priv->session, "proxy-resolver", self, "proxy-resolver", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
+}
+
+static void
+dispose (GObject *object)
+{
+ GDataClientLoginAuthorizerPrivate *priv = GDATA_CLIENT_LOGIN_AUTHORIZER (object)->priv;
+
+ if (priv->session != NULL) {
+ g_object_unref (priv->session);
+ }
+ priv->session = NULL;
+
+ g_clear_object (&priv->proxy_resolver);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_client_login_authorizer_parent_class)->dispose (object);
+}
+
+static void
+finalize (GObject *object)
+{
+ GDataClientLoginAuthorizerPrivate *priv = GDATA_CLIENT_LOGIN_AUTHORIZER (object)->priv;
+
+ g_free (priv->username);
+ _gdata_service_secure_strfree (priv->password);
+ g_free (priv->client_id);
+ g_hash_table_destroy (priv->auth_tokens);
+ g_rec_mutex_clear (&(priv->mutex));
+
+ if (priv->proxy_uri != NULL) {
+ soup_uri_free (priv->proxy_uri);
+ }
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_client_login_authorizer_parent_class)->finalize (object);
+}
+
+static void
+get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataClientLoginAuthorizerPrivate *priv = GDATA_CLIENT_LOGIN_AUTHORIZER (object)->priv;
+
+ switch (property_id) {
+ case PROP_CLIENT_ID:
+ g_value_set_string (value, priv->client_id);
+ break;
+ case PROP_USERNAME:
+ g_rec_mutex_lock (&(priv->mutex));
+ g_value_set_string (value, priv->username);
+ g_rec_mutex_unlock (&(priv->mutex));
+ break;
+ case PROP_PASSWORD:
+ /* NOTE: This takes a pageable copy of non-pageable memory and thus could result in the password hitting disk. */
+ g_rec_mutex_lock (&(priv->mutex));
+ g_value_set_string (value, priv->password);
+ g_rec_mutex_unlock (&(priv->mutex));
+ break;
+ case PROP_PROXY_URI:
+ g_value_set_boxed (value, _get_proxy_uri (GDATA_CLIENT_LOGIN_AUTHORIZER (object)));
+ break;
+ case PROP_TIMEOUT:
+ g_value_set_uint (value, gdata_client_login_authorizer_get_timeout (GDATA_CLIENT_LOGIN_AUTHORIZER (object)));
+ break;
+ case PROP_PROXY_RESOLVER:
+ g_value_set_object (value, gdata_client_login_authorizer_get_proxy_resolver (GDATA_CLIENT_LOGIN_AUTHORIZER (object)));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataClientLoginAuthorizerPrivate *priv = GDATA_CLIENT_LOGIN_AUTHORIZER (object)->priv;
+
+ switch (property_id) {
+ case PROP_CLIENT_ID:
+ priv->client_id = g_value_dup_string (value);
+ break;
+ case PROP_PROXY_URI:
+ _set_proxy_uri (GDATA_CLIENT_LOGIN_AUTHORIZER (object), g_value_get_boxed (value));
+ break;
+ case PROP_TIMEOUT:
+ gdata_client_login_authorizer_set_timeout (GDATA_CLIENT_LOGIN_AUTHORIZER (object), g_value_get_uint (value));
+ break;
+ case PROP_PROXY_RESOLVER:
+ gdata_client_login_authorizer_set_proxy_resolver (GDATA_CLIENT_LOGIN_AUTHORIZER (object), g_value_get_object (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+process_request (GDataAuthorizer *self, GDataAuthorizationDomain *domain, SoupMessage *message)
+{
+ GDataConstSecureString auth_token; /* privacy sensitive */
+ GDataClientLoginAuthorizerPrivate *priv = GDATA_CLIENT_LOGIN_AUTHORIZER (self)->priv;
+
+ /* If the domain's NULL, return immediately */
+ if (domain == NULL) {
+ return;
+ }
+
+ /* Set the authorisation header */
+ g_rec_mutex_lock (&(priv->mutex));
+
+ auth_token = (GDataConstSecureString) g_hash_table_lookup (priv->auth_tokens, domain);
+
+ if (auth_token != NULL) {
+ /* Ensure that we're using HTTPS: if not, we shouldn't set the Authorization header or we could be revealing the auth token to
+ * anyone snooping the connection, which would give them the same rights as us on the user's data. Generally a bad thing to happen. */
+ if (soup_message_get_uri (message)->scheme != SOUP_URI_SCHEME_HTTPS) {
+ g_warning ("Not authorizing a non-HTTPS message with the user's ClientLogin auth token as the connection isn't secure.");
+ } else {
+ /* Ideally, authorisation_header would be allocated in non-pageable memory. However, it's copied by
+ * soup_message_headers_replace() immediately anyway, so there's not much point. However, we do ensure we zero it out before
+ * freeing. */
+ gchar *authorisation_header = g_strdup_printf ("GoogleLogin auth=%s", auth_token);
+ soup_message_headers_replace (message->request_headers, "Authorization", authorisation_header);
+ memset (authorisation_header, 0, strlen (authorisation_header));
+ g_free (authorisation_header);
+ }
+ }
+
+ g_rec_mutex_unlock (&(priv->mutex));
+}
+
+static gboolean
+is_authorized_for_domain (GDataAuthorizer *self, GDataAuthorizationDomain *domain)
+{
+ GDataClientLoginAuthorizerPrivate *priv = GDATA_CLIENT_LOGIN_AUTHORIZER (self)->priv;
+ gpointer result;
+
+ g_rec_mutex_lock (&(priv->mutex));
+ result = g_hash_table_lookup (priv->auth_tokens, domain);
+ g_rec_mutex_unlock (&(priv->mutex));
+
+ return (result != NULL) ? TRUE : FALSE;
+}
+
+/**
+ * gdata_client_login_authorizer_new:
+ * @client_id: your application's client ID
+ * @service_type: the #GType of a #GDataService subclass which the #GDataClientLoginAuthorizer will be used with
+ *
+ * Creates a new #GDataClientLoginAuthorizer. The @client_id must be unique for your application, and as registered with Google.
+ *
+ * The #GDataAuthorizationDomains for the given @service_type (i.e. as returned by gdata_service_get_authorization_domains()) are the ones the
+ * user will be logged in to using the provided username and password when gdata_client_login_authorizer_authenticate() is called. Note that the same
+ * username and password will be used for all domains.
+ *
+ * Return value: (transfer full): a new #GDataClientLoginAuthorizer, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.9.0
+ */
+GDataClientLoginAuthorizer *
+gdata_client_login_authorizer_new (const gchar *client_id, GType service_type)
+{
+ g_return_val_if_fail (client_id != NULL && *client_id != '\0', NULL);
+ g_return_val_if_fail (g_type_is_a (service_type, GDATA_TYPE_SERVICE), NULL);
+
+ return gdata_client_login_authorizer_new_for_authorization_domains (client_id,
+ gdata_service_get_authorization_domains (service_type));
+}
+
+/**
+ * gdata_client_login_authorizer_new_for_authorization_domains:
+ * @client_id: your application's client ID
+ * @authorization_domains: (element-type GDataAuthorizationDomain) (transfer none): a non-empty list of #GDataAuthorizationDomains to be
+ * authorized against by the #GDataClientLoginAuthorizer
+ *
+ * Creates a new #GDataClientLoginAuthorizer. The @client_id must be unique for your application, and as registered with Google. This function is
+ * intended to be used only when the default authorization domain list for a single #GDataService, as used by gdata_client_login_authorizer_new(),
+ * isn't suitable. For example, this could be because the #GDataClientLoginAuthorizer will be used with multiple #GDataService subclasses, or because
+ * the client requires a specific set of authorization domains.
+ *
+ * The specified #GDataAuthorizationDomains are the ones the user will be logged in to using the provided username and password when
+ * gdata_client_login_authorizer_authenticate() is called. Note that the same username and password will be used for all domains.
+ *
+ * Return value: (transfer full): a new #GDataClientLoginAuthorizer, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.9.0
+ */
+GDataClientLoginAuthorizer *
+gdata_client_login_authorizer_new_for_authorization_domains (const gchar *client_id, GList *authorization_domains)
+{
+ GList *i;
+ GDataClientLoginAuthorizer *authorizer;
+
+ g_return_val_if_fail (client_id != NULL && *client_id != '\0', NULL);
+ g_return_val_if_fail (authorization_domains != NULL, NULL);
+
+ authorizer = GDATA_CLIENT_LOGIN_AUTHORIZER (g_object_new (GDATA_TYPE_CLIENT_LOGIN_AUTHORIZER,
+ "client-id", client_id,
+ NULL));
+
+ /* Register all the domains with the authorizer */
+ for (i = authorization_domains; i != NULL; i = i->next) {
+ g_return_val_if_fail (GDATA_IS_AUTHORIZATION_DOMAIN (i->data), NULL);
+
+ /* We don't have to lock the authoriser's mutex here as no other code has seen the authoriser yet */
+ g_hash_table_insert (authorizer->priv->auth_tokens, g_object_ref (GDATA_AUTHORIZATION_DOMAIN (i->data)), NULL);
+ }
+
+ return authorizer;
+}
+
+/* Called in the main thread to notify of changes to the username and password properties from the authentication thread. It swallows a reference
+ * the authoriser. */
+static gboolean
+notify_authentication_details_cb (GDataClientLoginAuthorizer *self)
+{
+ GObject *authorizer = G_OBJECT (self);
+
+ g_object_freeze_notify (authorizer);
+ g_object_notify (authorizer, "username");
+ g_object_notify (authorizer, "password");
+ g_object_thaw_notify (authorizer);
+
+ g_object_unref (self);
+
+ /* Only execute once */
+ return FALSE;
+}
+
+static void
+set_authentication_details (GDataClientLoginAuthorizer *self, const gchar *username, const gchar *password, GHashTable *new_auth_tokens,
+ gboolean is_async)
+{
+ GDataClientLoginAuthorizerPrivate *priv = self->priv;
+ GHashTableIter iter;
+
+ g_rec_mutex_lock (&(priv->mutex));
+
+ /* Ensure the username is always a full e-mail address */
+ g_free (priv->username);
+ if (username != NULL && strchr (username, '@') == NULL) {
+ priv->username = g_strdup_printf ("%s@" EMAIL_DOMAIN, username);
+ } else {
+ priv->username = g_strdup (username);
+ }
+
+ _gdata_service_secure_strfree (priv->password);
+ priv->password = _gdata_service_secure_strdup (password);
+
+ /* Transfer all successful auth. tokens to the object-wide auth. token store. */
+ if (new_auth_tokens == NULL) {
+ /* Reset ->auth_tokens to contain no auth. tokens, just the domains. */
+ g_hash_table_iter_init (&iter, priv->auth_tokens);
+
+ while (g_hash_table_iter_next (&iter, NULL, NULL) == TRUE) {
+ g_hash_table_iter_replace (&iter, NULL);
+ }
+ } else {
+ /* Replace the existing ->auth_tokens with the new one, which contains all the shiny new auth. tokens. */
+ g_hash_table_ref (new_auth_tokens);
+ g_hash_table_unref (priv->auth_tokens);
+ priv->auth_tokens = new_auth_tokens;
+ }
+
+ g_rec_mutex_unlock (&(priv->mutex));
+
+ /* Notify of the property changes in the main thread; i.e. if we're running an async operation, schedule the notification in an idle
+ * callback; but if we're running a sync operation, emit them immediately.
+ * This guarantees that:
+ * • notifications will always be emitted before gdata_client_login_authorizer_authenticate() returns; and
+ * • notifications will always be emitted in the main thread for calls to gdata_client_login_authorizer_authenticate_async(). */
+ if (is_async == TRUE) {
+ g_idle_add ((GSourceFunc) notify_authentication_details_cb, g_object_ref (self));
+ } else {
+ notify_authentication_details_cb (g_object_ref (self));
+ }
+}
+
+static GDataSecureString
+parse_authentication_response (GDataClientLoginAuthorizer *self, GDataAuthorizationDomain *domain, guint status,
+ const gchar *response_body, gint length, GError **error)
+{
+ gchar *auth_start, *auth_end;
+ GDataSecureString auth_token; /* NOTE: auth_token must be allocated using _gdata_service_secure_strdup() and friends */
+
+ /* Parse the response */
+ auth_start = strstr (response_body, "Auth=");
+ if (auth_start == NULL) {
+ goto protocol_error;
+ }
+ auth_start += strlen ("Auth=");
+
+ auth_end = strstr (auth_start, "\n");
+ if (auth_end == NULL) {
+ goto protocol_error;
+ }
+
+ auth_token = _gdata_service_secure_strndup (auth_start, auth_end - auth_start);
+ if (auth_token == NULL || strlen (auth_token) == 0) {
+ _gdata_service_secure_strfree (auth_token);
+ goto protocol_error;
+ }
+
+ return auth_token;
+
+protocol_error:
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ _("The server returned a malformed response."));
+ return NULL;
+}
+
+static void
+parse_error_response (GDataClientLoginAuthorizer *self, guint status, const gchar *reason_phrase, const gchar *response_body, gint length,
+ GError **error)
+{
+ /* We prefer to include the @response_body in the error message, but if it's empty, fall back to the @reason_phrase */
+ if (response_body == NULL || *response_body == '\0') {
+ response_body = reason_phrase;
+ }
+
+ /* See: http://code.google.com/apis/gdata/docs/2.0/reference.html#HTTPStatusCodes */
+ switch (status) {
+ case SOUP_STATUS_CANT_RESOLVE:
+ case SOUP_STATUS_CANT_CONNECT:
+ case SOUP_STATUS_SSL_FAILED:
+ case SOUP_STATUS_IO_ERROR:
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_NETWORK_ERROR,
+ _("Cannot connect to the service’s server."));
+ return;
+ case SOUP_STATUS_CANT_RESOLVE_PROXY:
+ case SOUP_STATUS_CANT_CONNECT_PROXY:
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROXY_ERROR,
+ _("Cannot connect to the proxy server."));
+ return;
+ case SOUP_STATUS_MALFORMED:
+ case SOUP_STATUS_BAD_REQUEST: /* 400 */
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the parameter is an error message returned by the server. */
+ _("Invalid request URI or header, or unsupported nonstandard parameter: %s"), response_body);
+ return;
+ case SOUP_STATUS_UNAUTHORIZED: /* 401 */
+ case SOUP_STATUS_FORBIDDEN: /* 403 */
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED,
+ /* Translators: the parameter is an error message returned by the server. */
+ _("Authentication required: %s"), response_body);
+ return;
+ case SOUP_STATUS_NOT_FOUND: /* 404 */
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_NOT_FOUND,
+ /* Translators: the parameter is an error message returned by the server. */
+ _("The requested resource was not found: %s"), response_body);
+ return;
+ case SOUP_STATUS_CONFLICT: /* 409 */
+ case SOUP_STATUS_PRECONDITION_FAILED: /* 412 */
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_CONFLICT,
+ /* Translators: the parameter is an error message returned by the server. */
+ _("The entry has been modified since it was downloaded: %s"), response_body);
+ return;
+ case SOUP_STATUS_INTERNAL_SERVER_ERROR: /* 500 */
+ default:
+ /* We'll fall back to a generic error, below */
+ break;
+ }
+
+ /* If the error hasn't been handled already, throw a generic error */
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the first parameter is an HTTP status,
+ * and the second is an error message returned by the server. */
+ _("Error code %u when authenticating: %s"), status, response_body);
+}
+
+static GDataSecureString
+authenticate (GDataClientLoginAuthorizer *self, GDataAuthorizationDomain *domain, const gchar *username, const gchar *password,
+ gchar *captcha_token, gchar *captcha_answer, GCancellable *cancellable, GError **error)
+{
+ GDataClientLoginAuthorizerPrivate *priv = self->priv;
+ SoupMessage *message;
+ gchar *request_body;
+ const gchar *service_name;
+ guint status;
+ GDataSecureString auth_token;
+ SoupURI *_uri;
+
+ /* Prepare the request.
+ * NOTE: At this point, our non-pageable password is copied into a pageable HTTP request structure. We can't do much about this
+ * except note that the request is transient and so the chance of it getting paged out is low (but still positive). */
+ service_name = gdata_authorization_domain_get_service_name (domain);
+ request_body = soup_form_encode ("accountType", "HOSTED_OR_GOOGLE",
+ "Email", username,
+ "Passwd", password,
+ "service", service_name,
+ "source", priv->client_id,
+ (captcha_token == NULL) ? NULL : "logintoken", captcha_token,
+ "loginanswer", captcha_answer,
+ NULL);
+
+ /* Free the CAPTCHA token and answer if necessary */
+ g_free (captcha_token);
+ g_free (captcha_answer);
+
+ /* Build the message */
+ _uri = soup_uri_new ("https://www.google.com/accounts/ClientLogin");
+ soup_uri_set_port (_uri, _gdata_service_get_https_port ());
+ message = soup_message_new_from_uri (SOUP_METHOD_POST, _uri);
+ soup_uri_free (_uri);
+ soup_message_set_request (message, "application/x-www-form-urlencoded", SOUP_MEMORY_TAKE, request_body, strlen (request_body));
+
+ /* Send the message */
+ _gdata_service_actually_send_message (priv->session, message, cancellable, error);
+ status = message->status_code;
+
+ if (status == SOUP_STATUS_CANCELLED) {
+ /* Cancelled (the error has already been set) */
+ g_object_unref (message);
+ return NULL;
+ } else if (status != SOUP_STATUS_OK) {
+ const gchar *response_body = message->response_body->data;
+ gchar *error_start, *error_end, *uri_start, *uri_end, *uri = NULL;
+
+ /* Parse the error response; see: http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html#Errors */
+ if (response_body == NULL) {
+ goto protocol_error;
+ }
+
+ /* Error */
+ error_start = strstr (response_body, "Error=");
+ if (error_start == NULL) {
+ goto protocol_error;
+ }
+ error_start += strlen ("Error=");
+
+ error_end = strstr (error_start, "\n");
+ if (error_end == NULL) {
+ goto protocol_error;
+ }
+
+ if (strncmp (error_start, "CaptchaRequired", error_end - error_start) == 0) {
+ const gchar *captcha_base_uri = "http://www.google.com/accounts/";
+ gchar *captcha_start, *captcha_end, *captcha_uri, *new_captcha_answer;
+ guint captcha_base_uri_length;
+
+ /* CAPTCHA required to log in */
+ captcha_start = strstr (response_body, "CaptchaUrl=");
+ if (captcha_start == NULL) {
+ goto protocol_error;
+ }
+ captcha_start += strlen ("CaptchaUrl=");
+
+ captcha_end = strstr (captcha_start, "\n");
+ if (captcha_end == NULL) {
+ goto protocol_error;
+ }
+
+ /* Do some fancy memory stuff to save ourselves another alloc */
+ captcha_base_uri_length = strlen (captcha_base_uri);
+ captcha_uri = g_malloc (captcha_base_uri_length + (captcha_end - captcha_start) + 1);
+ memcpy (captcha_uri, captcha_base_uri, captcha_base_uri_length);
+ memcpy (captcha_uri + captcha_base_uri_length, captcha_start, (captcha_end - captcha_start));
+ captcha_uri[captcha_base_uri_length + (captcha_end - captcha_start)] = '\0';
+
+ /* Request a CAPTCHA answer from the application */
+ g_signal_emit (self, authorizer_signals[SIGNAL_CAPTCHA_CHALLENGE], 0, captcha_uri, &new_captcha_answer);
+ g_free (captcha_uri);
+
+ if (new_captcha_answer == NULL || *new_captcha_answer == '\0') {
+ g_set_error_literal (error, GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR, GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_CAPTCHA_REQUIRED,
+ /* Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs */
+ _("A CAPTCHA must be filled out to log in."));
+ goto login_error;
+ }
+
+ /* Get the CAPTCHA token */
+ captcha_start = strstr (response_body, "CaptchaToken=");
+ if (captcha_start == NULL) {
+ goto protocol_error;
+ }
+ captcha_start += strlen ("CaptchaToken=");
+
+ captcha_end = strstr (captcha_start, "\n");
+ if (captcha_end == NULL) {
+ goto protocol_error;
+ }
+
+ /* Save the CAPTCHA token and answer, and attempt to log in with them */
+ g_object_unref (message);
+
+ return authenticate (self, domain, username, password,
+ g_strndup (captcha_start, captcha_end - captcha_start), new_captcha_answer,
+ cancellable, error);
+ } else if (strncmp (error_start, "Unknown", error_end - error_start) == 0) {
+ goto protocol_error;
+ } else if (strncmp (error_start, "BadAuthentication", error_end - error_start) == 0) {
+ /* Looks like Error=BadAuthentication errors don't return a URI */
+ gchar *info_start, *info_end;
+
+ info_start = strstr (response_body, "Info=");
+ if (info_start != NULL) {
+ info_start += strlen ("Info=");
+ info_end = strstr (info_start, "\n");
+ }
+
+ /* If Info=InvalidSecondFactor, the user needs to generate an application-specific password and use that instead */
+ if (info_start != NULL && info_end != NULL && strncmp (info_start, "InvalidSecondFactor", info_end - info_start) == 0) {
+ g_set_error (error, GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR, GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_INVALID_SECOND_FACTOR,
+ /* Translators: the parameter is a URI for further information. */
+ _("This account requires an application-specific password. (%s)"),
+ "http://www.google.com/support/accounts/bin/static.py?page=guide.cs&guide=1056283&topic=1056286");
+ goto login_error;
+ }
+
+ /* Fall back to a generic "bad authentication details" message */
+ g_set_error_literal (error, GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR, GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_BAD_AUTHENTICATION,
+ _("Your username or password were incorrect."));
+ goto login_error;
+ }
+
+ /* Get the information URI */
+ uri_start = strstr (response_body, "Url=");
+ if (uri_start == NULL) {
+ goto protocol_error;
+ }
+ uri_start += strlen ("Url=");
+
+ uri_end = strstr (uri_start, "\n");
+ if (uri_end == NULL) {
+ goto protocol_error;
+ }
+
+ uri = g_strndup (uri_start, uri_end - uri_start);
+
+ if (strncmp (error_start, "NotVerified", error_end - error_start) == 0) {
+ g_set_error (error, GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR, GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_NOT_VERIFIED,
+ /* Translators: the parameter is a URI for further information. */
+ _("Your account’s e-mail address has not been verified. (%s)"), uri);
+ goto login_error;
+ } else if (strncmp (error_start, "TermsNotAgreed", error_end - error_start) == 0) {
+ g_set_error (error, GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR, GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_TERMS_NOT_AGREED,
+ /* Translators: the parameter is a URI for further information. */
+ _("You have not agreed to the service’s terms and conditions. (%s)"), uri);
+ goto login_error;
+ } else if (strncmp (error_start, "AccountMigrated", error_end - error_start) == 0) {
+ /* This is non-standard, and used by YouTube since it's got messed-up accounts */
+ g_set_error (error, GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR, GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_ACCOUNT_MIGRATED,
+ /* Translators: the parameter is a URI for further information. */
+ _("This account has been migrated. Please log in online to receive your new username and password. (%s)"), uri);
+ goto login_error;
+ } else if (strncmp (error_start, "AccountDeleted", error_end - error_start) == 0) {
+ g_set_error (error, GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR, GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_ACCOUNT_DELETED,
+ /* Translators: the parameter is a URI for further information. */
+ _("This account has been deleted. (%s)"), uri);
+ goto login_error;
+ } else if (strncmp (error_start, "AccountDisabled", error_end - error_start) == 0) {
+ g_set_error (error, GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR, GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_ACCOUNT_DISABLED,
+ /* Translators: the parameter is a URI for further information. */
+ _("This account has been disabled. (%s)"), uri);
+ goto login_error;
+ } else if (strncmp (error_start, "ServiceDisabled", error_end - error_start) == 0) {
+ g_set_error (error, GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR, GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_SERVICE_DISABLED,
+ /* Translators: the parameter is a URI for further information. */
+ _("This account’s access to this service has been disabled. (%s)"), uri);
+ goto login_error;
+ } else if (strncmp (error_start, "ServiceUnavailable", error_end - error_start) == 0) {
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_UNAVAILABLE,
+ /* Translators: the parameter is a URI for further information. */
+ _("This service is not available at the moment. (%s)"), uri);
+ goto login_error;
+ }
+
+ /* Unknown error type! */
+ goto protocol_error;
+
+login_error:
+ g_free (uri);
+ g_object_unref (message);
+
+ return NULL;
+ }
+
+ g_assert (message->response_body->data != NULL);
+
+ auth_token = parse_authentication_response (self, domain, status, message->response_body->data, message->response_body->length, error);
+
+ /* Zero out the response body to lower the chance of it (with all the juicy passwords and auth. tokens it contains) hitting disk or getting
+ * leaked in free memory. */
+ memset ((void*) message->response_body->data, 0, message->response_body->length);
+
+ g_object_unref (message);
+
+ return auth_token;
+
+protocol_error:
+ parse_error_response (self, status, message->reason_phrase, message->response_body->data, message->response_body->length, error);
+
+ g_object_unref (message);
+
+ return NULL;
+}
+
+static gboolean
+authenticate_loop (GDataClientLoginAuthorizer *authorizer, gboolean is_async, const gchar *username, const gchar *password, GCancellable *cancellable,
+ GError **error)
+{
+ GDataClientLoginAuthorizerPrivate *priv = authorizer->priv;
+ gboolean cumulative_success = TRUE;
+ GHashTable *new_auth_tokens;
+ GHashTableIter iter;
+ GDataAuthorizationDomain *domain;
+ GDataSecureString auth_token;
+
+ g_rec_mutex_lock (&(priv->mutex));
+
+ /* Authenticate and authorize against each of the services registered with the authorizer */
+ new_auth_tokens = g_hash_table_new_full (g_direct_hash, g_direct_equal, g_object_unref, (GDestroyNotify) _gdata_service_secure_strfree);
+ g_hash_table_iter_init (&iter, priv->auth_tokens);
+
+ while (g_hash_table_iter_next (&iter, (gpointer*) &domain, NULL) == TRUE) {
+ GError *authenticate_error = NULL;
+
+ auth_token = authenticate (authorizer, domain, username, password, NULL, NULL, cancellable, &authenticate_error);
+
+ if (auth_token == NULL && cumulative_success == TRUE) {
+ /* Only propagate the first error which occurs. */
+ g_propagate_error (error, authenticate_error);
+ authenticate_error = NULL;
+ }
+
+ cumulative_success = (auth_token != NULL) && cumulative_success;
+
+ /* Store the auth. token (or lack thereof if authentication failed). */
+ g_hash_table_insert (new_auth_tokens, g_object_ref (domain), auth_token);
+
+ g_clear_error (&authenticate_error);
+ }
+
+ g_rec_mutex_unlock (&(priv->mutex));
+
+ /* Set or clear the authentication details and return now that we're done */
+ if (cumulative_success == TRUE) {
+ set_authentication_details (authorizer, username, password, new_auth_tokens, is_async);
+ } else {
+ set_authentication_details (authorizer, NULL, NULL, NULL, is_async);
+ }
+
+ g_hash_table_unref (new_auth_tokens);
+
+ return cumulative_success;
+}
+
+typedef struct {
+ gchar *username;
+ GDataSecureString password; /* NOTE: This must be allocated in non-pageable memory using _gdata_service_secure_strdup(). */
+} AuthenticateAsyncData;
+
+static void
+authenticate_async_data_free (AuthenticateAsyncData *self)
+{
+ g_free (self->username);
+ _gdata_service_secure_strfree (self->password);
+
+ g_slice_free (AuthenticateAsyncData, self);
+}
+
+static void
+authenticate_thread (GTask *task, gpointer source_object, gpointer task_data, GCancellable *cancellable)
+{
+ GDataClientLoginAuthorizer *authorizer = GDATA_CLIENT_LOGIN_AUTHORIZER (source_object);
+ g_autoptr(GError) error = NULL;
+ AuthenticateAsyncData *data = task_data;
+
+ if (!authenticate_loop (authorizer, TRUE, data->username, data->password, cancellable, &error))
+ g_task_return_error (task, g_steal_pointer (&error));
+ else
+ g_task_return_boolean (task, TRUE);
+}
+
+/**
+ * gdata_client_login_authorizer_authenticate_async:
+ * @self: a #GDataClientLoginAuthorizer
+ * @username: the user's username
+ * @password: the user's password
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when authentication is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Authenticates the #GDataClientLoginAuthorizer with the Google accounts service using the given @username and @password. @self, @username and
+ * @password are all reffed/copied when this function is called, so can safely be freed after this function returns.
+ *
+ * For more details, see gdata_client_login_authorizer_authenticate(), which is the synchronous version of this function.
+ *
+ * When the operation is finished, @callback will be called. You can then call gdata_client_login_authorizer_authenticate_finish()
+ * to get the results of the operation.
+ *
+ * Since: 0.9.0
+ */
+void
+gdata_client_login_authorizer_authenticate_async (GDataClientLoginAuthorizer *self, const gchar *username, const gchar *password,
+ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_autoptr(GTask) task = NULL;
+ AuthenticateAsyncData *data;
+
+ g_return_if_fail (GDATA_IS_CLIENT_LOGIN_AUTHORIZER (self));
+ g_return_if_fail (username != NULL);
+ g_return_if_fail (password != NULL);
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+
+ data = g_slice_new (AuthenticateAsyncData);
+ data->username = g_strdup (username);
+ data->password = _gdata_service_secure_strdup (password);
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_client_login_authorizer_authenticate_async);
+ g_task_set_task_data (task, g_steal_pointer (&data), (GDestroyNotify) authenticate_async_data_free);
+ g_task_run_in_thread (task, authenticate_thread);
+}
+
+/**
+ * gdata_client_login_authorizer_authenticate_finish:
+ * @self: a #GDataClientLoginAuthorizer
+ * @async_result: a #GAsyncResult
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous authentication operation started with gdata_client_login_authorizer_authenticate_async().
+ *
+ * Return value: %TRUE if authentication was successful, %FALSE otherwise
+ *
+ * Since: 0.9.0
+ */
+gboolean
+gdata_client_login_authorizer_authenticate_finish (GDataClientLoginAuthorizer *self, GAsyncResult *async_result, GError **error)
+{
+ g_return_val_if_fail (GDATA_IS_CLIENT_LOGIN_AUTHORIZER (self), FALSE);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (async_result), FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (g_task_is_valid (async_result, self), FALSE);
+ g_return_val_if_fail (g_async_result_is_tagged (async_result, gdata_client_login_authorizer_authenticate_async), FALSE);
+
+ return g_task_propagate_boolean (G_TASK (async_result), error);
+}
+
+/**
+ * gdata_client_login_authorizer_authenticate:
+ * @self: a #GDataClientLoginAuthorizer
+ * @username: the user's username
+ * @password: the user's password
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Authenticates the #GDataClientLoginAuthorizer with the Google Accounts service using @username and @password and authorizes it against all the
+ * service types passed to gdata_client_login_authorizer_new(); i.e. logs into the service with the given user account. @username should be a full
+ * e-mail address (e.g. <literal>john.smith\@gmail.com</literal>). If a full e-mail address is not given, @username will have
+ * <literal>\@gmail.com</literal> appended to create an e-mail address
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by triggering the @cancellable object from another thread.
+ * If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * If the operation errors or is cancelled part-way through, gdata_authorizer_is_authorized_for_domain() is guaranteed to return %FALSE
+ * for all #GDataAuthorizationDomains, even if authentication has succeeded for some of them already.
+ *
+ * A %GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_BAD_AUTHENTICATION will be returned if authentication failed due to an incorrect username or password.
+ * Other #GDataClientLoginAuthorizerError errors can be returned for other conditions.
+ *
+ * If the service requires a CAPTCHA to be completed, the #GDataClientLoginAuthorizer::captcha-challenge signal will be emitted.
+ * The return value from a signal handler for the signal should be a newly allocated string containing the text from the image. If the text is %NULL
+ * or empty, authentication will fail with a %GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_CAPTCHA_REQUIRED error. Otherwise, authentication will be
+ * automatically and transparently restarted with the new CAPTCHA details.
+ *
+ * A %GDATA_SERVICE_ERROR_PROTOCOL_ERROR will be returned if the server's responses were invalid.
+ *
+ * Return value: %TRUE if authentication and authorization was successful against all the services, %FALSE otherwise
+ *
+ * Since: 0.9.0
+ */
+gboolean
+gdata_client_login_authorizer_authenticate (GDataClientLoginAuthorizer *self, const gchar *username, const gchar *password,
+ GCancellable *cancellable, GError **error)
+{
+ g_return_val_if_fail (GDATA_IS_CLIENT_LOGIN_AUTHORIZER (self), FALSE);
+ g_return_val_if_fail (username != NULL, FALSE);
+ g_return_val_if_fail (password != NULL, FALSE);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
+ return authenticate_loop (self, FALSE, username, password, cancellable, error);
+}
+
+static void
+notify_proxy_uri_cb (GObject *object, GParamSpec *pspec, GDataClientLoginAuthorizer *self)
+{
+ /* Flush our cached version */
+ if (self->priv->proxy_uri != NULL) {
+ soup_uri_free (self->priv->proxy_uri);
+ self->priv->proxy_uri = NULL;
+ }
+
+ g_object_notify (G_OBJECT (self), "proxy-uri");
+}
+
+/* Static function which isn't deprecated so we can continue using it internally. */
+static SoupURI *
+_get_proxy_uri (GDataClientLoginAuthorizer *self)
+{
+ SoupURI *proxy_uri;
+
+ g_return_val_if_fail (GDATA_IS_CLIENT_LOGIN_AUTHORIZER (self), NULL);
+
+ /* If we have a cached version, return that */
+ if (self->priv->proxy_uri != NULL) {
+ return self->priv->proxy_uri;
+ }
+
+ g_object_get (self->priv->session, SOUP_SESSION_PROXY_URI, &proxy_uri, NULL);
+
+ /* Update the cache; it takes ownership of the URI */
+ self->priv->proxy_uri = proxy_uri;
+
+ return proxy_uri;
+}
+
+/**
+ * gdata_client_login_authorizer_get_proxy_uri:
+ * @self: a #GDataClientLoginAuthorizer
+ *
+ * Gets the proxy URI on the #GDataClientLoginAuthorizer's #SoupSession.
+ *
+ * Return value: (transfer full): the proxy URI, or %NULL; free with soup_uri_free()
+ *
+ * Since: 0.9.0
+ * Deprecated: 0.15.0: Use gdata_client_login_authorizer_get_proxy_resolver() instead, which gives more flexibility over the proxy used.
+ */
+SoupURI *
+gdata_client_login_authorizer_get_proxy_uri (GDataClientLoginAuthorizer *self)
+{
+ return _get_proxy_uri (self);
+}
+
+/* Static function which isn't deprecated so we can continue using it internally. */
+static void
+_set_proxy_uri (GDataClientLoginAuthorizer *self, SoupURI *proxy_uri)
+{
+ g_return_if_fail (GDATA_IS_CLIENT_LOGIN_AUTHORIZER (self));
+
+ g_object_set (self->priv->session, SOUP_SESSION_PROXY_URI, proxy_uri, NULL);
+
+ /* Notification is handled in notify_proxy_uri_cb() which is called as a result of setting the property on the session */
+}
+
+/**
+ * gdata_client_login_authorizer_set_proxy_uri:
+ * @self: a #GDataClientLoginAuthorizer
+ * @proxy_uri: (allow-none): the proxy URI, or %NULL
+ *
+ * Sets the proxy URI on the #SoupSession used internally by the #GDataClientLoginAuthorizer. This forces all requests through the given proxy.
+ *
+ * If @proxy_uri is %NULL, no proxy will be used.
+ *
+ * Since: 0.9.0
+ * Deprecated: 0.15.0: Use gdata_client_login_authorizer_set_proxy_resolver() instead, which gives more flexibility over the proxy used.
+ */
+void
+gdata_client_login_authorizer_set_proxy_uri (GDataClientLoginAuthorizer *self, SoupURI *proxy_uri)
+{
+ _set_proxy_uri (self, proxy_uri);
+}
+
+/**
+ * gdata_client_login_authorizer_get_proxy_resolver:
+ * @self: a #GDataClientLoginAuthorizer
+ *
+ * Gets the #GProxyResolver on the #GDataClientLoginAuthorizer's #SoupSession.
+ *
+ * Return value: (transfer none) (allow-none): a #GProxyResolver, or %NULL
+ *
+ * Since: 0.15.0
+ */
+GProxyResolver *
+gdata_client_login_authorizer_get_proxy_resolver (GDataClientLoginAuthorizer *self)
+{
+ g_return_val_if_fail (GDATA_IS_CLIENT_LOGIN_AUTHORIZER (self), NULL);
+
+ return self->priv->proxy_resolver;
+}
+
+/**
+ * gdata_client_login_authorizer_set_proxy_resolver:
+ * @self: a #GDataClientLoginAuthorizer
+ * @proxy_resolver: (allow-none): a #GProxyResolver, or %NULL
+ *
+ * Sets the #GProxyResolver on the #SoupSession used internally by the given #GDataClientLoginAuthorizer.
+ *
+ * Setting this will clear the #GDataClientLoginAuthorizer:proxy-uri property.
+ *
+ * Since: 0.15.0
+ */
+void
+gdata_client_login_authorizer_set_proxy_resolver (GDataClientLoginAuthorizer *self, GProxyResolver *proxy_resolver)
+{
+ g_return_if_fail (GDATA_IS_CLIENT_LOGIN_AUTHORIZER (self));
+ g_return_if_fail (proxy_resolver == NULL || G_IS_PROXY_RESOLVER (proxy_resolver));
+
+ if (proxy_resolver != NULL) {
+ g_object_ref (proxy_resolver);
+ }
+
+ g_clear_object (&self->priv->proxy_resolver);
+ self->priv->proxy_resolver = proxy_resolver;
+
+ g_object_notify (G_OBJECT (self), "proxy-resolver");
+}
+
+static void
+notify_timeout_cb (GObject *gobject, GParamSpec *pspec, GObject *self)
+{
+ g_object_notify (self, "timeout");
+}
+
+/**
+ * gdata_client_login_authorizer_get_timeout:
+ * @self: a #GDataClientLoginAuthorizer
+ *
+ * Gets the #GDataClientLoginAuthorizer:timeout property; the network timeout, in seconds.
+ *
+ * Return value: the timeout, or <code class="literal">0</code>
+ *
+ * Since: 0.9.0
+ */
+guint
+gdata_client_login_authorizer_get_timeout (GDataClientLoginAuthorizer *self)
+{
+ guint timeout;
+
+ g_return_val_if_fail (GDATA_IS_CLIENT_LOGIN_AUTHORIZER (self), 0);
+
+ g_object_get (self->priv->session, SOUP_SESSION_TIMEOUT, &timeout, NULL);
+
+ return timeout;
+}
+
+/**
+ * gdata_client_login_authorizer_set_timeout:
+ * @self: a #GDataClientLoginAuthorizer
+ * @timeout: the timeout, or <code class="literal">0</code>
+ *
+ * Sets the #GDataClientLoginAuthorizer:timeout property; the network timeout, in seconds.
+ *
+ * If @timeout is <code class="literal">0</code>, network operations will never time out.
+ *
+ * Since: 0.9.0
+ */
+void
+gdata_client_login_authorizer_set_timeout (GDataClientLoginAuthorizer *self, guint timeout)
+{
+ g_return_if_fail (GDATA_IS_CLIENT_LOGIN_AUTHORIZER (self));
+
+ g_object_set (self->priv->session, SOUP_SESSION_TIMEOUT, timeout, NULL);
+
+ /* Notification is handled in notify_proxy_uri_cb() which is called as a result of setting the property on the session */
+}
+
+/**
+ * gdata_client_login_authorizer_get_client_id:
+ * @self: a #GDataClientLoginAuthorizer
+ *
+ * Returns the authorizer's client ID, as specified on constructing the #GDataClientLoginAuthorizer.
+ *
+ * Return value: the authorizer's client ID
+ *
+ * Since: 0.9.0
+ */
+const gchar *
+gdata_client_login_authorizer_get_client_id (GDataClientLoginAuthorizer *self)
+{
+ g_return_val_if_fail (GDATA_IS_CLIENT_LOGIN_AUTHORIZER (self), NULL);
+
+ return self->priv->client_id;
+}
+
+/**
+ * gdata_client_login_authorizer_get_username:
+ * @self: a #GDataClientLoginAuthorizer
+ *
+ * Returns the username of the currently authenticated user, or %NULL if nobody is authenticated.
+ *
+ * It is not safe to call this while an authentication operation is ongoing.
+ *
+ * Return value: the username of the currently authenticated user, or %NULL
+ *
+ * Since: 0.9.0
+ */
+const gchar *
+gdata_client_login_authorizer_get_username (GDataClientLoginAuthorizer *self)
+{
+ g_return_val_if_fail (GDATA_IS_CLIENT_LOGIN_AUTHORIZER (self), NULL);
+
+ /* There's little point protecting this with ->mutex, as the data's meaningless if accessed during an authentication operation,
+ * and not being accessed concurrently otherwise. */
+ return self->priv->username;
+}
+
+/**
+ * gdata_client_login_authorizer_get_password:
+ * @self: a #GDataClientLoginAuthorizer
+ *
+ * Returns the password of the currently authenticated user, or %NULL if nobody is authenticated.
+ *
+ * It is not safe to call this while an authentication operation is ongoing.
+ *
+ * If libgdata is compiled with libgcr support, the password will be stored in non-pageable memory. Since this function doesn't return
+ * a copy of the password, the returned value is guaranteed to not hit disk. It's advised that any copies of the password made in client programs
+ * also use non-pageable memory.
+ *
+ * Return value: the password of the currently authenticated user, or %NULL
+ *
+ * Since: 0.9.0
+ */
+const gchar *
+gdata_client_login_authorizer_get_password (GDataClientLoginAuthorizer *self)
+{
+ g_return_val_if_fail (GDATA_IS_CLIENT_LOGIN_AUTHORIZER (self), NULL);
+
+ /* There's little point protecting this with ->mutex, as the data's meaningless if accessed during an authentication operation,
+ * and not being accessed concurrently otherwise. */
+ return self->priv->password;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2011 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_CLIENT_LOGIN_AUTHORIZER_H
+#define GDATA_CLIENT_LOGIN_AUTHORIZER_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include "gdata-authorizer.h"
+
+G_BEGIN_DECLS
+
+/**
+ * GDataClientLoginAuthorizerError:
+ * @GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_BAD_AUTHENTICATION: The login request used a username or password that is not recognized.
+ * @GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_NOT_VERIFIED: The account email address has not been verified. The user will need to access their Google
+ * account directly to resolve the issue before logging in using a non-Google application.
+ * @GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_TERMS_NOT_AGREED: The user has not agreed to terms. The user will need to access their Google account directly
+ * to resolve the issue before logging in using a non-Google application.
+ * @GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_CAPTCHA_REQUIRED: A CAPTCHA is required. (A response with this error code will also contain an image URI and a
+ * CAPTCHA token.)
+ * @GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_ACCOUNT_DELETED: The user account has been deleted.
+ * @GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_ACCOUNT_DISABLED: The user account has been disabled.
+ * @GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_SERVICE_DISABLED: The user's access to the specified service has been disabled. (The user account may still be
+ * valid.)
+ * @GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_ACCOUNT_MIGRATED: The user's account login details have been migrated to a new system. (This is used for the
+ * transition from the old YouTube login details to the new ones.)
+ * @GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_INVALID_SECOND_FACTOR: The user's account requires an application-specific password to be used.
+ *
+ * Error codes for authentication and authorization operations on #GDataClientLoginAuthorizer. See the
+ * <ulink type="http" url="http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html#Errors">online ClientLogin documentation</ulink> for
+ * more information.
+ *
+ * Since: 0.9.0
+ */
+typedef enum {
+ GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_BAD_AUTHENTICATION = 1,
+ GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_NOT_VERIFIED,
+ GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_TERMS_NOT_AGREED,
+ GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_CAPTCHA_REQUIRED,
+ GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_ACCOUNT_DELETED,
+ GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_ACCOUNT_DISABLED,
+ GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_SERVICE_DISABLED,
+ GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_ACCOUNT_MIGRATED,
+ GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR_INVALID_SECOND_FACTOR
+} GDataClientLoginAuthorizerError;
+
+GQuark gdata_client_login_authorizer_error_quark (void) G_GNUC_CONST;
+
+#define GDATA_CLIENT_LOGIN_AUTHORIZER_ERROR gdata_client_login_authorizer_error_quark ()
+
+#define GDATA_TYPE_CLIENT_LOGIN_AUTHORIZER (gdata_client_login_authorizer_get_type ())
+#define GDATA_CLIENT_LOGIN_AUTHORIZER(o) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_CLIENT_LOGIN_AUTHORIZER, GDataClientLoginAuthorizer))
+#define GDATA_CLIENT_LOGIN_AUTHORIZER_CLASS(k) \
+ (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_CLIENT_LOGIN_AUTHORIZER, GDataClientLoginAuthorizerClass))
+#define GDATA_IS_CLIENT_LOGIN_AUTHORIZER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_CLIENT_LOGIN_AUTHORIZER))
+#define GDATA_IS_CLIENT_LOGIN_AUTHORIZER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_CLIENT_LOGIN_AUTHORIZER))
+#define GDATA_CLIENT_LOGIN_AUTHORIZER_GET_CLASS(o) \
+ (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_CLIENT_LOGIN_AUTHORIZER, GDataClientLoginAuthorizerClass))
+
+typedef struct _GDataClientLoginAuthorizerPrivate GDataClientLoginAuthorizerPrivate;
+
+/**
+ * GDataClientLoginAuthorizer:
+ *
+ * All the fields in the #GDataClientLoginAuthorizer structure are private and should never be accessed directly.
+ *
+ * Since: 0.9.0
+ */
+typedef struct {
+ /*< private >*/
+ GObject parent;
+ GDataClientLoginAuthorizerPrivate *priv;
+} GDataClientLoginAuthorizer;
+
+/**
+ * GDataClientLoginAuthorizerClass:
+ *
+ * All the fields in the #GDataClientLoginAuthorizerClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.9.0
+ */
+typedef struct {
+ /*< private >*/
+ GObjectClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataClientLoginAuthorizerClass;
+
+GType gdata_client_login_authorizer_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataClientLoginAuthorizer, g_object_unref)
+
+GDataClientLoginAuthorizer *gdata_client_login_authorizer_new (const gchar *client_id, GType service_type) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+GDataClientLoginAuthorizer *gdata_client_login_authorizer_new_for_authorization_domains (const gchar *client_id, GList *authorization_domains)
+ G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+gboolean gdata_client_login_authorizer_authenticate (GDataClientLoginAuthorizer *self, const gchar *username, const gchar *password,
+ GCancellable *cancellable, GError **error);
+void gdata_client_login_authorizer_authenticate_async (GDataClientLoginAuthorizer *self, const gchar *username, const gchar *password,
+ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
+gboolean gdata_client_login_authorizer_authenticate_finish (GDataClientLoginAuthorizer *self, GAsyncResult *async_result, GError **error);
+
+const gchar *gdata_client_login_authorizer_get_client_id (GDataClientLoginAuthorizer *self) G_GNUC_PURE;
+const gchar *gdata_client_login_authorizer_get_username (GDataClientLoginAuthorizer *self) G_GNUC_PURE;
+const gchar *gdata_client_login_authorizer_get_password (GDataClientLoginAuthorizer *self) G_GNUC_PURE;
+
+#ifndef LIBGDATA_DISABLE_DEPRECATED
+SoupURI *gdata_client_login_authorizer_get_proxy_uri (GDataClientLoginAuthorizer *self) G_GNUC_PURE G_GNUC_DEPRECATED_FOR (gdata_client_login_authorizer_get_proxy_resolver);
+void gdata_client_login_authorizer_set_proxy_uri (GDataClientLoginAuthorizer *self, SoupURI *proxy_uri) G_GNUC_DEPRECATED_FOR (gdata_client_login_authorizer_set_proxy_resolver);
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
+
+GProxyResolver *gdata_client_login_authorizer_get_proxy_resolver (GDataClientLoginAuthorizer *self) G_GNUC_PURE;
+void gdata_client_login_authorizer_set_proxy_resolver (GDataClientLoginAuthorizer *self, GProxyResolver *proxy_resolver);
+
+guint gdata_client_login_authorizer_get_timeout (GDataClientLoginAuthorizer *self) G_GNUC_PURE;
+void gdata_client_login_authorizer_set_timeout (GDataClientLoginAuthorizer *self, guint timeout);
+
+G_END_DECLS
+
+#endif /* !GDATA_CLIENT_LOGIN_AUTHORIZER_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2011 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-comment
+ * @short_description: GData comment object
+ * @stability: Stable
+ * @include: gdata/gdata-comment.h
+ *
+ * #GDataComment is a subclass of #GDataEntry to represent a generic comment on an entry. It is returned by the methods implemented in the
+ * #GDataCommentable interface.
+ *
+ * Any class which implements #GDataCommentable should have its own concrete subclass of #GDataComment which provides service-specific functionality.
+ *
+ * All subclasses of #GDataComment should ensure that the body of a comment is accessible using gdata_entry_get_content(), and that each comment has
+ * at least one #GDataAuthor object representing the person who wrote the comment, accessible using gdata_entry_get_authors().
+ *
+ * Since: 0.10.0
+ */
+
+#include <config.h>
+#include <glib.h>
+
+#include "gdata-comment.h"
+
+G_DEFINE_ABSTRACT_TYPE (GDataComment, gdata_comment, GDATA_TYPE_ENTRY)
+
+static void
+gdata_comment_class_init (GDataCommentClass *klass)
+{
+ /* Nothing to see here */
+}
+
+static void
+gdata_comment_init (GDataComment *self)
+{
+ /* Nothing to see here */
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2011 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_COMMENT_H
+#define GDATA_COMMENT_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-entry.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_COMMENT (gdata_comment_get_type ())
+#define GDATA_COMMENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_COMMENT, GDataComment))
+#define GDATA_COMMENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_COMMENT, GDataCommentClass))
+#define GDATA_IS_COMMENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_COMMENT))
+#define GDATA_IS_COMMENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_COMMENT))
+#define GDATA_COMMENT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_COMMENT, GDataCommentClass))
+
+typedef struct _GDataCommentPrivate GDataCommentPrivate;
+
+/**
+ * GDataComment:
+ *
+ * All the fields in the #GDataComment structure are private and should never be accessed directly.
+ *
+ * Since: 0.10.0
+ */
+typedef struct {
+ GDataEntry parent;
+ GDataCommentPrivate *priv;
+} GDataComment;
+
+/**
+ * GDataCommentClass:
+ *
+ * All the fields in the #GDataCommentClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.10.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataEntryClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataCommentClass;
+
+GType gdata_comment_get_type (void) G_GNUC_CONST;
+
+G_END_DECLS
+
+#endif /* !GDATA_COMMENT_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2008–2010 <philip@tecnocode.co.uk>
+ * Copyright (C) Richard Schwarting 2010 <aquarichy@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-commentable
+ * @short_description: GData commentable interface
+ * @stability: Stable
+ * @include: gdata/gdata-commentable.h
+ *
+ * #GDataCommentable is an interface which can be implemented by commentable objects: objects which support having comments added to them by users,
+ * such as videos and photos.
+ *
+ * Comments may be queried, added and deleted. Note that they may not be edited.
+ *
+ * #GDataCommentable objects may not support all operations on comments, on an instance-by-instance basis (i.e. it's an invalid assumption that if,
+ * for example, one #GDataYouTubeVideo doesn't support adding comments all other #GDataYouTubeVideos don't support adding comments either).
+ * Specific documentation for a particular type of #GDataCommentable may state otherwise, though.
+ *
+ * <example>
+ * <title>Querying for Comments</title>
+ * <programlisting>
+ * GDataService *service;
+ * GDataCommentable *commentable;
+ *
+ * /<!-- -->* Create a service *<!-- -->/
+ * service = create_service ();
+ *
+ * /<!-- -->* Retrieve the GDataCommentable which is going to be queried. This may be, for example, a GDataYouTubeVideo. *<!-- -->/
+ * commentable = get_commentable ();
+ *
+ * /<!-- -->* Start the async. query for the comments. *<!-- -->/
+ * gdata_commentable_query_comments_async (commentable, service, NULL, NULL, NULL, NULL, NULL, (GAsyncReadyCallback) query_comments_cb, NULL);
+ *
+ * g_object_unref (service);
+ * g_object_unref (commentable);
+ *
+ * static void
+ * query_comments_cb (GDataCommentable *commentable, GAsyncResult *result, gpointer user_data)
+ * {
+ * GDataFeed *comment_feed;
+ * GList *comments, *i;
+ * GError *error = NULL;
+ *
+ * comment_feed = gdata_commentable_query_comments_finish (commentable, result, &error);
+ *
+ * if (error != NULL) {
+ * /<!-- -->* Error! *<!-- -->/
+ * g_error ("Error querying comments: %s", error->message);
+ * g_error_free (error);
+ * return;
+ * }
+ *
+ * /<!-- -->* Examine the comments. *<!-- -->/
+ * comments = gdata_feed_get_entries (comment_feed);
+ * for (i = comments; i != NULL; i = i->next) {
+ * /<!-- -->* Note that this will actually be a subclass of GDataComment,
+ * * such as GDataYouTubeComment or GDataPicasaWebComment. *<!-- -->/
+ * GDataComment *comment = GDATA_COMMENT (i->data);
+ * GDataAuthor *author;
+ *
+ * /<!-- -->* Note that in practice it might not always be safe to assume that a comment always has an author. *<!-- -->/
+ * author = GDATA_AUTHOR (gdata_entry_get_authors (GDATA_ENTRY (comment))->data);
+ *
+ * g_message ("Comment by %s (%s): %s",
+ * gdata_author_get_name (author),
+ * gdata_author_get_uri (author),
+ * gdata_entry_get_content (GDATA_ENTRY (comment)));
+ * }
+ *
+ * g_object_unref (comment_feed);
+ * }
+ * </programlisting>
+ * </example>
+ *
+ * Since: 0.10.0
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+
+#include "gdata-commentable.h"
+#include "gdata-service.h"
+
+G_DEFINE_INTERFACE (GDataCommentable, gdata_commentable, GDATA_TYPE_ENTRY)
+
+static void
+gdata_commentable_default_init (GDataCommentableInterface *iface)
+{
+ iface->comment_type = G_TYPE_INVALID;
+ iface->get_authorization_domain = NULL;
+ iface->get_query_comments_uri = NULL;
+ iface->get_insert_comment_uri = NULL;
+ iface->is_comment_deletable = NULL;
+}
+
+static GType
+get_comment_type (GDataCommentableInterface *iface)
+{
+ GType comment_type;
+
+ comment_type = iface->comment_type;
+ g_assert (g_type_is_a (comment_type, GDATA_TYPE_COMMENT) == TRUE);
+
+ return comment_type;
+}
+
+/**
+ * gdata_commentable_query_comments:
+ * @self: a #GDataCommentable
+ * @service: a #GDataService representing the service with which the object's comments will be manipulated
+ * @query: (allow-none): a #GDataQuery with query parameters, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (scope call) (closure progress_user_data): a #GDataQueryProgressCallback to call when a comment is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @error: a #GError, or %NULL
+ *
+ * Retrieves a #GDataFeed containing the #GDataComments representing the comments on the #GDataCommentable which match the given @query.
+ *
+ * If the #GDataCommentable doesn't support commenting, %NULL will be returned and @error will be set to %GDATA_SERVICE_ERROR_FORBIDDEN. This is in
+ * contrast to if it does support commenting but hasn't had any comments added yet, in which case an empty #GDataFeed will be returned and no error
+ * will be set.
+ *
+ * Return value: (transfer full) (allow-none): a #GDataFeed of #GDataComments, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.10.0
+ */
+GDataFeed *
+gdata_commentable_query_comments (GDataCommentable *self, GDataService *service, GDataQuery *query,
+ GCancellable *cancellable, GDataQueryProgressCallback progress_callback,
+ gpointer progress_user_data, GError **error)
+{
+ GDataCommentableInterface *iface;
+ gchar *uri;
+ GDataFeed *feed;
+ GDataAuthorizationDomain *domain = NULL;
+
+ g_return_val_if_fail (GDATA_IS_COMMENTABLE (self), NULL);
+ g_return_val_if_fail (GDATA_IS_SERVICE (service), NULL);
+ g_return_val_if_fail (query == NULL || GDATA_IS_QUERY (query), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ iface = GDATA_COMMENTABLE_GET_IFACE (self);
+
+ /* Get the comment feed URI. */
+ g_assert (iface->get_query_comments_uri != NULL);
+ uri = iface->get_query_comments_uri (self);
+
+ /* The URI can be NULL when no comments and thus no feedLink is present in a GDataCommentable */
+ if (uri == NULL) {
+ /* Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+ * support comments. */
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_FORBIDDEN, _("This entry does not support comments."));
+ return NULL;
+ }
+
+ /* Get the authorisation domain. */
+ if (iface->get_authorization_domain != NULL) {
+ domain = iface->get_authorization_domain (self);
+ }
+
+ /* Get the comment feed. */
+ feed = gdata_service_query (service, domain, uri, query, get_comment_type (iface), cancellable, progress_callback, progress_user_data, error);
+ g_free (uri);
+
+ return feed;
+}
+
+static void
+query_comments_async_cb (GDataService *service, GAsyncResult *service_result, gpointer user_data)
+{
+ g_autoptr(GTask) commentable_task = G_TASK (user_data);
+ g_autoptr(GDataFeed) feed = NULL;
+ g_autoptr(GError) error = NULL;
+
+ feed = gdata_service_query_finish (service, service_result, &error);
+
+ if (error != NULL)
+ g_task_return_error (commentable_task, g_steal_pointer (&error));
+ else
+ g_task_return_pointer (commentable_task, g_steal_pointer (&feed), g_object_unref);
+}
+
+/**
+ * gdata_commentable_query_comments_async:
+ * @self: a #GDataCommentable
+ * @service: a #GDataService representing the service with which the object's comments will be manipulated
+ * @query: (allow-none): a #GDataQuery with query parameters, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (scope notified) (closure progress_user_data): a #GDataQueryProgressCallback to call when a comment is loaded,
+ * or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @destroy_progress_user_data: (allow-none): a function to call when @progress_callback will not be called any more, or %NULL; this function will be
+ * called with @progress_user_data as a parameter and can be used to free any memory allocated for it
+ * @callback: a #GAsyncReadyCallback to call when the query is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Retrieves a #GDataFeed containing the #GDataComments representing the comments on the #GDataCommentable which match the given @query.
+ * @self, @service and @query are all reffed when this method is called, so can safely be freed after this method returns.
+ *
+ * For more details, see gdata_commentable_query_comments(), which is the synchronous version of this method.
+ *
+ * When the operation is finished, @callback will be called. You can then call gdata_commentable_query_comments_finish() to get the results of the
+ * operation.
+ *
+ * Since: 0.10.0
+ */
+void
+gdata_commentable_query_comments_async (GDataCommentable *self, GDataService *service, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data, GAsyncReadyCallback callback, gpointer user_data)
+{
+ GDataCommentableInterface *iface;
+ gchar *uri;
+ g_autoptr(GTask) task = NULL;
+ GDataAuthorizationDomain *domain = NULL;
+
+ g_return_if_fail (GDATA_IS_COMMENTABLE (self));
+ g_return_if_fail (GDATA_IS_SERVICE (service));
+ g_return_if_fail (query == NULL || GDATA_IS_QUERY (query));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+ g_return_if_fail (callback != NULL);
+
+ iface = GDATA_COMMENTABLE_GET_IFACE (self);
+
+ /* Get the comment feed URI. */
+ g_assert (iface->get_query_comments_uri != NULL);
+ uri = iface->get_query_comments_uri (self);
+
+ /* Build the async result. */
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_commentable_query_comments_async);
+
+ /* The URI can be NULL when no comments and thus no feedLink is present in a GDataCommentable */
+ if (uri == NULL) {
+ g_task_return_new_error (task, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_FORBIDDEN,
+ /* Translators: This is an error message for if a user attempts to retrieve comments from an entry
+ * (such as a video) which doesn't support comments. */
+ _("This entry does not support comments."));
+ return;
+ }
+
+ /* Get the authorisation domain. */
+ if (iface->get_authorization_domain != NULL) {
+ domain = iface->get_authorization_domain (self);
+ }
+
+ /* Get the comment feed. */
+ gdata_service_query_async (service, domain, uri, query, get_comment_type (iface), cancellable, progress_callback, progress_user_data,
+ destroy_progress_user_data, (GAsyncReadyCallback) query_comments_async_cb, g_object_ref (task));
+ g_free (uri);
+}
+
+/**
+ * gdata_commentable_query_comments_finish:
+ * @self: a #GDataCommentable
+ * @result: a #GAsyncResult
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous comment query operation started with gdata_commentable_query_comments_async().
+ *
+ * Return value: (transfer full) (allow-none): a #GDataFeed of #GDataComments, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.10.0
+ */
+GDataFeed *
+gdata_commentable_query_comments_finish (GDataCommentable *self, GAsyncResult *result, GError **error)
+{
+ g_return_val_if_fail (GDATA_IS_COMMENTABLE (self), NULL);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (result), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+ g_return_val_if_fail (g_task_is_valid (result, self), NULL);
+ g_return_val_if_fail (g_async_result_is_tagged (result, gdata_commentable_query_comments_async), NULL);
+
+ return g_task_propagate_pointer (G_TASK (result), error);
+}
+
+/**
+ * gdata_commentable_insert_comment:
+ * @self: a #GDataCommentable
+ * @service: a #GDataService with which the comment will be added
+ * @comment_: a new comment to be added to the #GDataCommentable
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Adds @comment to the #GDataCommentable.
+ *
+ * If the #GDataCommentable doesn't support commenting, %NULL will be returned and @error will be set to %GDATA_SERVICE_ERROR_FORBIDDEN.
+ *
+ * Return value: (transfer full) (allow-none): the added #GDataComment, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.10.0
+ */
+GDataComment *
+gdata_commentable_insert_comment (GDataCommentable *self, GDataService *service, GDataComment *comment_, GCancellable *cancellable, GError **error)
+{
+ GDataCommentableInterface *iface;
+ gchar *uri;
+ GDataComment *new_comment;
+ GDataAuthorizationDomain *domain = NULL;
+
+ g_return_val_if_fail (GDATA_IS_COMMENTABLE (self), NULL);
+ g_return_val_if_fail (GDATA_IS_SERVICE (service), NULL);
+ g_return_val_if_fail (GDATA_IS_COMMENT (comment_), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ iface = GDATA_COMMENTABLE_GET_IFACE (self);
+
+ g_return_val_if_fail (g_type_is_a (G_OBJECT_TYPE (comment_), get_comment_type (iface)) == TRUE, NULL);
+
+ /* Get the upload URI. */
+ g_assert (iface->get_insert_comment_uri != NULL);
+ uri = iface->get_insert_comment_uri (self, comment_);
+
+ if (uri == NULL) {
+ /* Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+ * comments. */
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_FORBIDDEN, _("Comments may not be added to this entry."));
+ return NULL;
+ }
+
+ /* Get the authorisation domain. */
+ if (iface->get_authorization_domain != NULL) {
+ domain = iface->get_authorization_domain (self);
+ }
+
+ /* Add the comment. */
+ new_comment = GDATA_COMMENT (gdata_service_insert_entry (service, domain, uri, GDATA_ENTRY (comment_), cancellable, error));
+
+ g_free (uri);
+
+ return new_comment;
+}
+
+static void
+insert_comment_async_cb (GDataService *service, GAsyncResult *service_result, gpointer user_data)
+{
+ g_autoptr(GTask) commentable_task = G_TASK (user_data);
+ g_autoptr(GDataEntry) new_comment = NULL;
+ g_autoptr(GError) error = NULL;
+
+ new_comment = gdata_service_insert_entry_finish (service, service_result, &error);
+
+ if (error != NULL)
+ g_task_return_error (commentable_task, g_steal_pointer (&error));
+ else
+ g_task_return_pointer (commentable_task, g_steal_pointer (&new_comment), g_object_unref);
+}
+
+/**
+ * gdata_commentable_insert_comment_async:
+ * @self: a #GDataCommentable
+ * @service: a #GDataService with which the comment will be added
+ * @comment_: a new comment to be added to the #GDataCommentable
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when the operation is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Adds @comment to the #GDataCommentable. @self, @service and @comment_ are all reffed when this method is called, so can safely be freed after this
+ * method returns.
+ *
+ * For more details, see gdata_commentable_insert_comment(), which is the synchronous version of this method.
+ *
+ * When the operation is finished, @callback will be called. You can then call gdata_commentable_insert_comment_finish() to get the results of the
+ * operation.
+ *
+ * Since: 0.10.0
+ */
+void
+gdata_commentable_insert_comment_async (GDataCommentable *self, GDataService *service, GDataComment *comment_, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ GDataCommentableInterface *iface;
+ g_autofree gchar *uri = NULL;
+ g_autoptr(GTask) task = NULL;
+ GDataAuthorizationDomain *domain = NULL;
+
+ g_return_if_fail (GDATA_IS_COMMENTABLE (self));
+ g_return_if_fail (GDATA_IS_SERVICE (service));
+ g_return_if_fail (GDATA_IS_COMMENT (comment_));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+
+ iface = GDATA_COMMENTABLE_GET_IFACE (self);
+
+ g_return_if_fail (g_type_is_a (G_OBJECT_TYPE (comment_), get_comment_type (iface)) == TRUE);
+
+ /* Get the upload URI. */
+ g_assert (iface->get_insert_comment_uri != NULL);
+ uri = iface->get_insert_comment_uri (self, comment_);
+
+ /* Build the async result. */
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_commentable_insert_comment_async);
+
+ /* The URI can be NULL when no comments and thus no feedLink is present in a GDataCommentable */
+ if (uri == NULL) {
+ g_task_return_new_error (task, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_FORBIDDEN,
+ /* Translators: This is an error message for if a user attempts to add a comment to an entry
+ * (such as a video) which doesn't support comments. */
+ _("Comments may not be added to this entry."));
+ return;
+ }
+
+ /* Get the authorisation domain. */
+ if (iface->get_authorization_domain != NULL) {
+ domain = iface->get_authorization_domain (self);
+ }
+
+ /* Add the comment. */
+ gdata_service_insert_entry_async (service, domain, uri, GDATA_ENTRY (comment_), cancellable, (GAsyncReadyCallback) insert_comment_async_cb,
+ g_object_ref (task));
+}
+
+/**
+ * gdata_commentable_insert_comment_finish:
+ * @self: a #GDataCommentable
+ * @result: a #GAsyncResult
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous comment insertion operation started with gdata_commentable_insert_comment_async().
+ *
+ * Return value: (transfer full) (allow-none): the added #GDataComment, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.10.0
+ */
+GDataComment *
+gdata_commentable_insert_comment_finish (GDataCommentable *self, GAsyncResult *result, GError **error)
+{
+ g_return_val_if_fail (GDATA_IS_COMMENTABLE (self), NULL);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (result), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+ g_return_val_if_fail (g_task_is_valid (result, self), NULL);
+ g_return_val_if_fail (g_async_result_is_tagged (result, gdata_commentable_insert_comment_async), NULL);
+
+ return g_task_propagate_pointer (G_TASK (result), error);
+}
+
+/**
+ * gdata_commentable_delete_comment:
+ * @self: a #GDataCommentable
+ * @service: a #GDataService with which the comment will be deleted
+ * @comment_: a comment to be deleted
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Deletes @comment from the #GDataCommentable.
+ *
+ * If the given @comment isn't deletable (either because the service doesn't support deleting comments at all, or because this particular comment
+ * is not deletable due to having insufficient permissions), %GDATA_SERVICE_ERROR_FORBIDDEN will be set in @error and %FALSE will be returned.
+ *
+ * Return value: %TRUE if the comment was successfully deleted, %FALSE otherwise
+ *
+ * Since: 0.10.0
+ */
+gboolean
+gdata_commentable_delete_comment (GDataCommentable *self, GDataService *service, GDataComment *comment_, GCancellable *cancellable, GError **error)
+{
+ GDataCommentableInterface *iface;
+ GDataAuthorizationDomain *domain = NULL;
+
+ g_return_val_if_fail (GDATA_IS_COMMENTABLE (self), FALSE);
+ g_return_val_if_fail (GDATA_IS_SERVICE (service), FALSE);
+ g_return_val_if_fail (GDATA_IS_COMMENT (comment_), FALSE);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
+ iface = GDATA_COMMENTABLE_GET_IFACE (self);
+
+ g_return_val_if_fail (g_type_is_a (G_OBJECT_TYPE (comment_), get_comment_type (iface)) == TRUE, FALSE);
+
+ g_assert (iface->is_comment_deletable != NULL);
+ if (iface->is_comment_deletable (self, comment_) == FALSE) {
+ /* Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete. */
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_FORBIDDEN, _("This comment may not be deleted."));
+ return FALSE;
+ }
+
+ /* Get the authorisation domain. */
+ if (iface->get_authorization_domain != NULL) {
+ domain = iface->get_authorization_domain (self);
+ }
+
+ /* Delete the comment. */
+ return gdata_service_delete_entry (service, domain, GDATA_ENTRY (comment_), cancellable, error);
+}
+
+static void
+delete_comment_async_cb (GDataService *service, GAsyncResult *service_result, gpointer user_data)
+{
+ g_autoptr(GTask) commentable_task = G_TASK (user_data);
+ g_autoptr(GError) error = NULL;
+
+ if (!gdata_service_delete_entry_finish (service, service_result, &error))
+ g_task_return_error (commentable_task, g_steal_pointer (&error));
+ else
+ g_task_return_boolean (commentable_task, TRUE);
+}
+
+/**
+ * gdata_commentable_delete_comment_async:
+ * @self: a #GDataCommentable
+ * @service: a #GDataService with which the comment will be deleted
+ * @comment_: a comment to be deleted
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when the operation is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Deletes @comment from the #GDataCommentable. @self, @service and @comment_ are all reffed when this method is called, so can safely be freed after
+ * this method returns.
+ *
+ * For more details, see gdata_commentable_delete_comment(), which is the synchronous version of this method.
+ *
+ * When the operation is finished, @callback will be called. You can then call gdata_commentable_delete_comment_finish() to get the results of the
+ * operation.
+ *
+ * Since: 0.10.0
+ */
+void
+gdata_commentable_delete_comment_async (GDataCommentable *self, GDataService *service, GDataComment *comment_, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ GDataCommentableInterface *iface;
+ g_autoptr(GTask) task = NULL;
+ GDataAuthorizationDomain *domain = NULL;
+
+ g_return_if_fail (GDATA_IS_COMMENTABLE (self));
+ g_return_if_fail (GDATA_IS_SERVICE (service));
+ g_return_if_fail (GDATA_IS_COMMENT (comment_));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+
+ iface = GDATA_COMMENTABLE_GET_IFACE (self);
+
+ g_return_if_fail (g_type_is_a (G_OBJECT_TYPE (comment_), get_comment_type (iface)) == TRUE);
+
+ /* Build the async result. */
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_commentable_delete_comment_async);
+
+ g_assert (iface->is_comment_deletable != NULL);
+ if (iface->is_comment_deletable (self, comment_) == FALSE) {
+ g_task_return_new_error (task, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_FORBIDDEN,
+ /* Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete. */
+ _("This comment may not be deleted."));
+ return;
+ }
+
+ /* Get the authorisation domain. */
+ if (iface->get_authorization_domain != NULL) {
+ domain = iface->get_authorization_domain (self);
+ }
+
+ /* Delete the comment. */
+ gdata_service_delete_entry_async (service, domain, GDATA_ENTRY (comment_), cancellable, (GAsyncReadyCallback) delete_comment_async_cb, g_object_ref (task));
+}
+
+/**
+ * gdata_commentable_delete_comment_finish:
+ * @self: a #GDataCommentable
+ * @result: a #GAsyncResult
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous comment deletion operation started with gdata_commentable_delete_comment_async().
+ *
+ * Return value: %TRUE if the comment was successfully deleted, %FALSE otherwise
+ *
+ * Since: 0.10.0
+ */
+gboolean
+gdata_commentable_delete_comment_finish (GDataCommentable *self, GAsyncResult *result, GError **error)
+{
+ g_return_val_if_fail (GDATA_IS_COMMENTABLE (self), FALSE);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (result), FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (g_task_is_valid (result, self), FALSE);
+ g_return_val_if_fail (g_async_result_is_tagged (result, gdata_commentable_delete_comment_async), FALSE);
+
+ return g_task_propagate_boolean (G_TASK (result), error);
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ * Copyright (C) Richard Schwarting 2010 <aquarichy@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_COMMENTABLE_H
+#define GDATA_COMMENTABLE_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-feed.h>
+#include <gdata/gdata-service.h>
+#include <gdata/gdata-comment.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_COMMENTABLE (gdata_commentable_get_type ())
+#define GDATA_COMMENTABLE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_COMMENTABLE, GDataCommentable))
+#define GDATA_COMMENTABLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_COMMENTABLE, GDataCommentableInterface))
+#define GDATA_IS_COMMENTABLE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_COMMENTABLE))
+#define GDATA_COMMENTABLE_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), GDATA_TYPE_COMMENTABLE, GDataCommentableInterface))
+
+/**
+ * GDataCommentable:
+ *
+ * All the fields in the #GDataCommentable structure are private and should never be accessed directly
+ *
+ * Since: 0.10.0
+ */
+typedef struct _GDataCommentable GDataCommentable; /* dummy typedef */
+
+/**
+ * GDataCommentableInterface:
+ * @parent: the parent type
+ * @comment_type: the #GType of the comment class (subclass of #GDataComment) to use for query results from this commentable object
+ * @get_authorization_domain: (allow-none): a function to return the #GDataAuthorizationDomain to be used for all operations on the comments
+ * belonging to this commentable object; not implementing this function is equivalent to returning %NULL from it, which signifies that operations on the
+ * comments don't require authorization
+ * @get_query_comments_uri: a function that returns the URI of a #GDataFeed of comments from a commentable object, or %NULL if the given commentable
+ * object doesn't support commenting; free with g_free()
+ * @get_insert_comment_uri: a function that returns the URI to add new comments to the commentable object, or %NULL if the given commentable object
+ * doesn't support adding comments; free with g_free()
+ * @is_comment_deletable: a function that returns %TRUE if the given comment may be deleted, %FALSE otherwise
+ *
+ * The interface structure for the #GDataCommentable interface.
+ *
+ * Since: 0.10.0
+ */
+typedef struct {
+ GTypeInterface parent;
+
+ GType comment_type;
+
+ GDataAuthorizationDomain *(*get_authorization_domain) (GDataCommentable *self);
+
+ gchar *(*get_query_comments_uri) (GDataCommentable *self);
+ gchar *(*get_insert_comment_uri) (GDataCommentable *self, GDataComment *comment);
+ gboolean (*is_comment_deletable) (GDataCommentable *self, GDataComment *comment);
+} GDataCommentableInterface;
+
+GType gdata_commentable_get_type (void) G_GNUC_CONST;
+
+GDataFeed *gdata_commentable_query_comments (GDataCommentable *self, GDataService *service, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_commentable_query_comments_async (GDataCommentable *self, GDataService *service, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data, GAsyncReadyCallback callback, gpointer user_data);
+GDataFeed *gdata_commentable_query_comments_finish (GDataCommentable *self, GAsyncResult *result,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+GDataComment *gdata_commentable_insert_comment (GDataCommentable *self, GDataService *service, GDataComment *comment_, GCancellable *cancellable,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_commentable_insert_comment_async (GDataCommentable *self, GDataService *service, GDataComment *comment_, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data);
+GDataComment *gdata_commentable_insert_comment_finish (GDataCommentable *self, GAsyncResult *result,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+gboolean gdata_commentable_delete_comment (GDataCommentable *self, GDataService *service, GDataComment *comment_, GCancellable *cancellable,
+ GError **error);
+void gdata_commentable_delete_comment_async (GDataCommentable *self, GDataService *service, GDataComment *comment_, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data);
+gboolean gdata_commentable_delete_comment_finish (GDataCommentable *self, GAsyncResult *result, GError **error);
+
+G_END_DECLS
+
+#endif /* !GDATA_COMMENTABLE_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-comparable
+ * @short_description: GData comparable interface
+ * @stability: Stable
+ * @include: gdata/gdata-comparable.h
+ *
+ * #GDataComparable is an interface which can be implemented by any object which needs to be compared to another object of the same type or of a
+ * derived type.
+ *
+ * When implementing the interface, classes must implement the <function>compare_with</function> function, and the implementation must be
+ * <ulink type="http" url="http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#index-g_t_0040code_007bpure_007d-function-attribute-2413">pure
+ * </ulink>.
+ *
+ * Since: 0.7.0
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include "gdata-comparable.h"
+
+GType
+gdata_comparable_get_type (void)
+{
+ static GType comparable_type = 0;
+
+ if (!comparable_type) {
+ comparable_type = g_type_register_static_simple (G_TYPE_INTERFACE, "GDataComparable",
+ sizeof (GDataComparableIface),
+ NULL, 0, NULL, 0);
+ }
+
+ return comparable_type;
+}
+
+/**
+ * gdata_comparable_compare:
+ * @self: (allow-none): a #GDataComparable, or %NULL
+ * @other: (allow-none): another #GDataComparable of the same type, or %NULL
+ *
+ * Compares the two objects, returning <code class="literal">-1</code> if @self is "less than" @other by some metric, <code class="literal">0</code>
+ * if they're equal, or <code class="literal">1</code> if @self is "greater than" @other.
+ *
+ * %NULL values are handled gracefully, with <code class="literal">0</code> returned if both @self and @other are %NULL,
+ * <code class="literal">-1</code> if @self is %NULL and <code class="literal">1</code> if @other is %NULL.
+ *
+ * The @other object must be of the same type as @self, or of a type derived from @self's type.
+ *
+ * Return value: %TRUE on success, %FALSE otherwise
+ *
+ * Since: 0.7.0
+ */
+gint
+gdata_comparable_compare (GDataComparable *self, GDataComparable *other)
+{
+ GDataComparableIface *iface;
+
+ g_return_val_if_fail (self == NULL || GDATA_IS_COMPARABLE (self), 0);
+ g_return_val_if_fail (other == NULL || GDATA_IS_COMPARABLE (other), 0);
+ g_return_val_if_fail (self == NULL || other == NULL || g_type_is_a (G_OBJECT_TYPE (other), G_OBJECT_TYPE (self)), 0);
+
+ /* Deal with NULL values */
+ if (self == NULL && other != NULL)
+ return -1;
+ else if (self != NULL && other == NULL)
+ return 1;
+
+ if (self == other)
+ return 0;
+
+ /* Use the comparator method for non-NULL values */
+ iface = GDATA_COMPARABLE_GET_IFACE (self);
+ g_assert (iface->compare_with != NULL);
+
+ return iface->compare_with (self, other);
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_COMPARABLE_H
+#define GDATA_COMPARABLE_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_COMPARABLE (gdata_comparable_get_type ())
+#define GDATA_COMPARABLE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_COMPARABLE, GDataComparable))
+#define GDATA_COMPARABLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_COMPARABLE, GDataComparableIface))
+#define GDATA_IS_COMPARABLE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_COMPARABLE))
+#define GDATA_COMPARABLE_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), GDATA_TYPE_COMPARABLE, GDataComparableIface))
+
+/**
+ * GDataComparable:
+ *
+ * All the fields in the #GDataComparable structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct _GDataComparable GDataComparable; /* dummy typedef */
+
+/**
+ * GDataComparableIface:
+ * @parent: the parent type
+ * @compare_with: compares the object with an @other object of the same type, returning <code class="literal">-1</code> if the object is "less than"
+ * the other object, <code class="literal">0</code> if they're equal, or <code class="literal">1</code> if the object is "greater than" the other. The
+ * function can assume that neither @self or @other will be %NULL, and that both have correct types. The function must be pure.
+ *
+ * The class structure for the #GDataComparable interface.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ GTypeInterface parent;
+
+ gint (*compare_with) (GDataComparable *self, GDataComparable *other);
+} GDataComparableIface;
+
+GType gdata_comparable_get_type (void) G_GNUC_CONST;
+
+gint gdata_comparable_compare (GDataComparable *self, GDataComparable *other) G_GNUC_PURE;
+
+G_END_DECLS
+
+#endif /* !GDATA_COMPARABLE_H */
--- /dev/null
+gdata_color_get_type
+gdata_color_from_hexadecimal
+gdata_color_to_hexadecimal
+gdata_entry_get_type
+gdata_entry_new
+gdata_entry_get_title
+gdata_entry_set_title
+gdata_entry_get_summary
+gdata_entry_set_summary
+gdata_entry_get_id
+gdata_entry_get_etag
+gdata_entry_get_updated
+gdata_entry_get_published
+gdata_entry_add_category
+gdata_entry_get_categories
+gdata_entry_get_content
+gdata_entry_set_content
+gdata_entry_get_content_uri
+gdata_entry_set_content_uri
+gdata_entry_add_link
+gdata_entry_remove_link
+gdata_entry_look_up_link
+gdata_entry_look_up_links
+gdata_entry_add_author
+gdata_entry_get_authors
+gdata_entry_is_inserted
+gdata_entry_get_rights
+gdata_entry_set_rights
+gdata_feed_get_type
+gdata_feed_get_entries
+gdata_feed_look_up_entry
+gdata_feed_get_categories
+gdata_feed_get_links
+gdata_feed_look_up_link
+gdata_feed_get_authors
+gdata_feed_get_title
+gdata_feed_get_subtitle
+gdata_feed_get_id
+gdata_feed_get_etag
+gdata_feed_get_updated
+gdata_feed_get_logo
+gdata_feed_get_icon
+gdata_feed_get_generator
+gdata_feed_get_rights
+gdata_feed_get_items_per_page
+gdata_feed_get_start_index
+gdata_feed_get_total_results
+gdata_feed_get_next_page_token
+gdata_service_get_type
+gdata_service_error_quark
+gdata_service_query
+gdata_service_query_async
+gdata_service_query_finish
+gdata_service_query_single_entry
+gdata_service_query_single_entry_async
+gdata_service_query_single_entry_finish
+gdata_service_insert_entry
+gdata_service_insert_entry_async
+gdata_service_insert_entry_finish
+gdata_service_update_entry
+gdata_service_update_entry_async
+gdata_service_update_entry_finish
+gdata_service_delete_entry
+gdata_service_delete_entry_async
+gdata_service_delete_entry_finish
+gdata_service_get_proxy_uri
+gdata_service_set_proxy_uri
+gdata_service_get_proxy_resolver
+gdata_service_set_proxy_resolver
+gdata_query_get_type
+gdata_query_new
+gdata_query_new_with_limits
+gdata_query_get_query_uri
+gdata_query_next_page
+gdata_query_previous_page
+gdata_query_get_q
+gdata_query_set_q
+gdata_query_get_categories
+gdata_query_set_categories
+gdata_query_get_author
+gdata_query_set_author
+gdata_query_get_updated_min
+gdata_query_set_updated_min
+gdata_query_get_updated_max
+gdata_query_set_updated_max
+gdata_query_get_published_min
+gdata_query_set_published_min
+gdata_query_get_published_max
+gdata_query_set_published_max
+gdata_query_get_start_index
+gdata_query_set_start_index
+gdata_query_is_strict
+gdata_query_set_is_strict
+gdata_query_get_max_results
+gdata_query_set_max_results
+gdata_query_get_etag
+gdata_query_set_etag
+gdata_youtube_standard_feed_type_get_type
+gdata_youtube_feed_get_type
+gdata_youtube_service_error_get_type
+gdata_youtube_service_error_quark
+gdata_youtube_service_get_type
+gdata_youtube_service_new
+gdata_youtube_service_query_standard_feed
+gdata_youtube_service_query_standard_feed_async
+gdata_youtube_service_query_videos
+gdata_youtube_service_query_videos_async
+gdata_youtube_service_query_related
+gdata_youtube_service_query_related_async
+gdata_youtube_service_get_developer_key
+gdata_youtube_video_get_type
+gdata_youtube_video_new
+gdata_youtube_video_get_view_count
+gdata_youtube_video_get_favorite_count
+gdata_youtube_video_get_location
+gdata_youtube_video_set_location
+gdata_youtube_video_get_access_control
+gdata_youtube_video_set_access_control
+gdata_youtube_video_get_rating
+gdata_youtube_video_get_keywords
+gdata_youtube_video_set_keywords
+gdata_youtube_video_get_player_uri
+gdata_youtube_video_is_restricted_in_country
+gdata_youtube_video_get_category
+gdata_youtube_video_set_category
+gdata_youtube_video_get_credit
+gdata_youtube_video_get_description
+gdata_youtube_video_set_description
+gdata_youtube_video_look_up_content
+gdata_youtube_video_get_thumbnails
+gdata_youtube_video_get_duration
+gdata_youtube_video_is_private
+gdata_youtube_video_set_is_private
+gdata_youtube_video_get_uploaded
+gdata_youtube_video_get_video_id
+gdata_youtube_video_is_draft
+gdata_youtube_video_set_is_draft
+gdata_youtube_video_get_state
+gdata_youtube_video_get_recorded
+gdata_youtube_video_set_recorded
+gdata_youtube_video_get_video_id_from_uri
+gdata_youtube_video_get_aspect_ratio
+gdata_youtube_video_set_aspect_ratio
+gdata_youtube_format_get_type
+gdata_youtube_safe_search_get_type
+gdata_youtube_sort_order_get_type
+gdata_youtube_age_get_type
+gdata_youtube_uploader_get_type
+gdata_youtube_query_get_type
+gdata_youtube_query_new
+gdata_youtube_query_get_format
+gdata_youtube_query_set_format
+gdata_youtube_query_get_location
+gdata_youtube_query_set_location
+gdata_youtube_query_get_language
+gdata_youtube_query_set_language
+gdata_youtube_query_get_order_by
+gdata_youtube_query_set_order_by
+gdata_youtube_query_get_restriction
+gdata_youtube_query_set_restriction
+gdata_youtube_query_get_safe_search
+gdata_youtube_query_set_safe_search
+gdata_youtube_query_get_sort_order
+gdata_youtube_query_set_sort_order
+gdata_youtube_query_get_age
+gdata_youtube_query_set_age
+gdata_youtube_query_get_uploader
+gdata_youtube_query_set_uploader
+gdata_calendar_calendar_get_type
+gdata_calendar_calendar_new
+gdata_calendar_calendar_get_timezone
+gdata_calendar_calendar_set_timezone
+gdata_calendar_calendar_get_times_cleaned
+gdata_calendar_calendar_is_hidden
+gdata_calendar_calendar_set_is_hidden
+gdata_calendar_calendar_get_color
+gdata_calendar_calendar_set_color
+gdata_calendar_calendar_is_selected
+gdata_calendar_calendar_set_is_selected
+gdata_calendar_calendar_get_access_level
+gdata_calendar_calendar_get_edited
+gdata_calendar_event_get_type
+gdata_calendar_event_new
+gdata_calendar_event_get_edited
+gdata_calendar_event_get_status
+gdata_calendar_event_set_status
+gdata_calendar_event_get_visibility
+gdata_calendar_event_set_visibility
+gdata_calendar_event_get_transparency
+gdata_calendar_event_set_transparency
+gdata_calendar_event_get_uid
+gdata_calendar_event_set_uid
+gdata_calendar_event_get_sequence
+gdata_calendar_event_set_sequence
+gdata_calendar_event_get_guests_can_modify
+gdata_calendar_event_set_guests_can_modify
+gdata_calendar_event_get_guests_can_invite_others
+gdata_calendar_event_set_guests_can_invite_others
+gdata_calendar_event_get_guests_can_see_guests
+gdata_calendar_event_set_guests_can_see_guests
+gdata_calendar_event_get_anyone_can_add_self
+gdata_calendar_event_set_anyone_can_add_self
+gdata_calendar_event_add_person
+gdata_calendar_event_get_people
+gdata_calendar_event_add_place
+gdata_calendar_event_get_places
+gdata_calendar_event_add_time
+gdata_calendar_event_get_times
+gdata_calendar_event_get_primary_time
+gdata_calendar_event_get_recurrence
+gdata_calendar_event_set_recurrence
+gdata_calendar_event_get_original_event_details
+gdata_calendar_event_is_exception
+gdata_calendar_query_get_type
+gdata_calendar_query_new
+gdata_calendar_query_new_with_limits
+gdata_calendar_query_get_future_events
+gdata_calendar_query_set_future_events
+gdata_calendar_query_get_order_by
+gdata_calendar_query_set_order_by
+gdata_calendar_query_get_recurrence_expansion_start
+gdata_calendar_query_set_recurrence_expansion_start
+gdata_calendar_query_get_recurrence_expansion_end
+gdata_calendar_query_set_recurrence_expansion_end
+gdata_calendar_query_get_single_events
+gdata_calendar_query_set_single_events
+gdata_calendar_query_get_sort_order
+gdata_calendar_query_set_sort_order
+gdata_calendar_query_get_start_min
+gdata_calendar_query_set_start_min
+gdata_calendar_query_get_start_max
+gdata_calendar_query_set_start_max
+gdata_calendar_query_get_timezone
+gdata_calendar_query_set_timezone
+gdata_calendar_service_get_type
+gdata_calendar_service_new
+gdata_calendar_service_query_all_calendars
+gdata_calendar_service_query_all_calendars_async
+gdata_calendar_service_query_own_calendars
+gdata_calendar_service_query_own_calendars_async
+gdata_calendar_service_query_events
+gdata_calendar_service_insert_event
+gdata_calendar_service_insert_calendar_event
+gdata_operation_type_get_type
+gdata_service_error_get_type
+gdata_media_expression_get_type
+gdata_media_medium_get_type
+gdata_parser_error_get_type
+gdata_parser_error_quark
+gdata_contacts_service_get_type
+gdata_contacts_service_new
+gdata_contacts_service_query_contacts
+gdata_contacts_service_query_contacts_async
+gdata_contacts_service_insert_contact
+gdata_contacts_service_insert_contact_async
+gdata_contacts_query_get_type
+gdata_contacts_query_new
+gdata_contacts_query_new_with_limits
+gdata_contacts_query_get_order_by
+gdata_contacts_query_set_order_by
+gdata_contacts_query_show_deleted
+gdata_contacts_query_set_show_deleted
+gdata_contacts_query_get_sort_order
+gdata_contacts_query_set_sort_order
+gdata_contacts_query_get_group
+gdata_contacts_query_set_group
+gdata_contacts_contact_get_type
+gdata_contacts_contact_new
+gdata_contacts_contact_get_edited
+gdata_contacts_contact_get_name
+gdata_contacts_contact_set_name
+gdata_contacts_contact_add_email_address
+gdata_contacts_contact_get_email_addresses
+gdata_contacts_contact_get_primary_email_address
+gdata_contacts_contact_remove_all_email_addresses
+gdata_contacts_contact_add_im_address
+gdata_contacts_contact_get_im_addresses
+gdata_contacts_contact_get_primary_im_address
+gdata_contacts_contact_remove_all_im_addresses
+gdata_contacts_contact_add_phone_number
+gdata_contacts_contact_get_phone_numbers
+gdata_contacts_contact_get_primary_phone_number
+gdata_contacts_contact_remove_all_phone_numbers
+gdata_contacts_contact_add_postal_address
+gdata_contacts_contact_get_postal_addresses
+gdata_contacts_contact_get_primary_postal_address
+gdata_contacts_contact_remove_all_postal_addresses
+gdata_contacts_contact_add_organization
+gdata_contacts_contact_get_organizations
+gdata_contacts_contact_get_primary_organization
+gdata_contacts_contact_remove_all_organizations
+gdata_contacts_contact_get_extended_property
+gdata_contacts_contact_get_extended_properties
+gdata_contacts_contact_set_extended_property
+gdata_contacts_contact_add_group
+gdata_contacts_contact_remove_group
+gdata_contacts_contact_is_group_deleted
+gdata_contacts_contact_get_groups
+gdata_contacts_contact_is_deleted
+gdata_contacts_contact_get_photo_etag
+gdata_contacts_contact_get_photo
+gdata_contacts_contact_set_photo
+gdata_access_handler_get_type
+gdata_access_handler_get_rules
+gdata_access_handler_get_rules_async
+gdata_access_rule_get_type
+gdata_access_rule_new
+gdata_access_rule_get_role
+gdata_access_rule_set_role
+gdata_access_rule_get_scope
+gdata_access_rule_set_scope
+gdata_access_rule_get_edited
+gdata_access_rule_get_key
+gdata_parsable_get_type
+gdata_parsable_get_content_type
+gdata_parsable_new_from_xml
+gdata_parsable_get_xml
+gdata_parsable_new_from_json
+gdata_parsable_get_json
+gdata_calendar_feed_get_type
+gdata_calendar_feed_get_timezone
+gdata_calendar_feed_get_times_cleaned
+gdata_category_get_type
+gdata_category_new
+gdata_category_get_term
+gdata_category_set_term
+gdata_category_get_scheme
+gdata_category_set_scheme
+gdata_category_get_label
+gdata_category_set_label
+gdata_link_get_type
+gdata_link_new
+gdata_link_get_uri
+gdata_link_set_uri
+gdata_link_get_relation_type
+gdata_link_set_relation_type
+gdata_link_get_content_type
+gdata_link_set_content_type
+gdata_link_get_language
+gdata_link_set_language
+gdata_link_get_title
+gdata_link_set_title
+gdata_link_get_length
+gdata_link_set_length
+gdata_author_get_type
+gdata_author_new
+gdata_author_get_name
+gdata_author_set_name
+gdata_author_get_uri
+gdata_author_set_uri
+gdata_author_get_email_address
+gdata_author_set_email_address
+gdata_generator_get_type
+gdata_generator_get_name
+gdata_generator_get_uri
+gdata_generator_get_version
+gdata_gd_organization_get_type
+gdata_gd_organization_new
+gdata_gd_organization_get_name
+gdata_gd_organization_set_name
+gdata_gd_organization_get_title
+gdata_gd_organization_set_title
+gdata_gd_organization_get_relation_type
+gdata_gd_organization_set_relation_type
+gdata_gd_organization_get_label
+gdata_gd_organization_set_label
+gdata_gd_organization_is_primary
+gdata_gd_organization_set_is_primary
+gdata_gd_organization_get_department
+gdata_gd_organization_set_department
+gdata_gd_organization_get_job_description
+gdata_gd_organization_set_job_description
+gdata_gd_organization_get_symbol
+gdata_gd_organization_set_symbol
+gdata_gd_organization_get_location
+gdata_gd_organization_set_location
+gdata_gd_when_get_type
+gdata_gd_when_new
+gdata_gd_when_get_start_time
+gdata_gd_when_set_start_time
+gdata_gd_when_get_end_time
+gdata_gd_when_set_end_time
+gdata_gd_when_is_date
+gdata_gd_when_set_is_date
+gdata_gd_when_get_value_string
+gdata_gd_when_set_value_string
+gdata_gd_when_get_reminders
+gdata_gd_when_add_reminder
+gdata_gd_who_get_type
+gdata_gd_who_new
+gdata_gd_who_get_relation_type
+gdata_gd_who_set_relation_type
+gdata_gd_who_get_value_string
+gdata_gd_who_set_value_string
+gdata_gd_who_get_email_address
+gdata_gd_who_set_email_address
+gdata_gd_where_get_type
+gdata_gd_where_new
+gdata_gd_where_get_relation_type
+gdata_gd_where_set_relation_type
+gdata_gd_where_get_value_string
+gdata_gd_where_set_value_string
+gdata_gd_where_get_label
+gdata_gd_where_set_label
+gdata_gd_email_address_get_type
+gdata_gd_email_address_new
+gdata_gd_email_address_get_address
+gdata_gd_email_address_set_address
+gdata_gd_email_address_get_relation_type
+gdata_gd_email_address_set_relation_type
+gdata_gd_email_address_get_label
+gdata_gd_email_address_set_label
+gdata_gd_email_address_is_primary
+gdata_gd_email_address_set_is_primary
+gdata_gd_email_address_get_display_name
+gdata_gd_email_address_set_display_name
+gdata_gd_im_address_get_type
+gdata_gd_im_address_new
+gdata_gd_im_address_get_address
+gdata_gd_im_address_set_address
+gdata_gd_im_address_get_protocol
+gdata_gd_im_address_set_protocol
+gdata_gd_im_address_get_relation_type
+gdata_gd_im_address_set_relation_type
+gdata_gd_im_address_get_label
+gdata_gd_im_address_set_label
+gdata_gd_im_address_is_primary
+gdata_gd_im_address_set_is_primary
+gdata_gd_postal_address_get_type
+gdata_gd_postal_address_new
+gdata_gd_postal_address_get_address
+gdata_gd_postal_address_set_address
+gdata_gd_postal_address_get_relation_type
+gdata_gd_postal_address_set_relation_type
+gdata_gd_postal_address_get_label
+gdata_gd_postal_address_set_label
+gdata_gd_postal_address_is_primary
+gdata_gd_postal_address_set_is_primary
+gdata_gd_postal_address_get_mail_class
+gdata_gd_postal_address_set_mail_class
+gdata_gd_postal_address_get_usage
+gdata_gd_postal_address_set_usage
+gdata_gd_postal_address_get_agent
+gdata_gd_postal_address_set_agent
+gdata_gd_postal_address_get_house_name
+gdata_gd_postal_address_set_house_name
+gdata_gd_postal_address_get_street
+gdata_gd_postal_address_set_street
+gdata_gd_postal_address_get_po_box
+gdata_gd_postal_address_set_po_box
+gdata_gd_postal_address_get_neighborhood
+gdata_gd_postal_address_set_neighborhood
+gdata_gd_postal_address_get_city
+gdata_gd_postal_address_set_city
+gdata_gd_postal_address_get_subregion
+gdata_gd_postal_address_set_subregion
+gdata_gd_postal_address_get_region
+gdata_gd_postal_address_set_region
+gdata_gd_postal_address_get_postcode
+gdata_gd_postal_address_set_postcode
+gdata_gd_postal_address_get_country
+gdata_gd_postal_address_get_country_code
+gdata_gd_postal_address_set_country
+gdata_gd_phone_number_get_type
+gdata_gd_phone_number_new
+gdata_gd_phone_number_get_number
+gdata_gd_phone_number_set_number
+gdata_gd_phone_number_get_uri
+gdata_gd_phone_number_set_uri
+gdata_gd_phone_number_get_relation_type
+gdata_gd_phone_number_set_relation_type
+gdata_gd_phone_number_get_label
+gdata_gd_phone_number_set_label
+gdata_gd_phone_number_is_primary
+gdata_gd_phone_number_set_is_primary
+gdata_gd_reminder_get_type
+gdata_gd_reminder_new
+gdata_gd_reminder_get_method
+gdata_gd_reminder_set_method
+gdata_gd_reminder_get_absolute_time
+gdata_gd_reminder_set_absolute_time
+gdata_gd_reminder_is_absolute_time
+gdata_gd_reminder_get_relative_time
+gdata_gd_reminder_set_relative_time
+gdata_media_category_get_type
+gdata_media_category_new
+gdata_media_category_get_category
+gdata_media_category_set_category
+gdata_media_category_get_scheme
+gdata_media_category_set_scheme
+gdata_media_category_get_label
+gdata_media_category_set_label
+gdata_media_credit_get_type
+gdata_media_credit_get_credit
+gdata_media_credit_get_scheme
+gdata_media_credit_get_role
+gdata_youtube_credit_get_type
+gdata_youtube_credit_get_entity_type
+gdata_media_content_get_type
+gdata_media_content_get_uri
+gdata_media_content_get_filesize
+gdata_media_content_get_content_type
+gdata_media_content_get_medium
+gdata_media_content_is_default
+gdata_media_content_get_expression
+gdata_media_content_get_duration
+gdata_media_content_get_height
+gdata_media_content_get_width
+gdata_media_content_download
+gdata_youtube_content_get_type
+gdata_youtube_content_get_format
+gdata_media_thumbnail_get_type
+gdata_media_thumbnail_get_uri
+gdata_media_thumbnail_get_height
+gdata_media_thumbnail_get_width
+gdata_media_thumbnail_get_time
+gdata_media_thumbnail_download
+gdata_youtube_state_get_type
+gdata_youtube_state_get_name
+gdata_youtube_state_get_reason_code
+gdata_youtube_state_get_help_uri
+gdata_youtube_state_get_message
+gdata_picasaweb_album_get_type
+gdata_picasaweb_album_new
+gdata_picasaweb_album_get_id
+gdata_picasaweb_album_get_user
+gdata_picasaweb_album_get_nickname
+gdata_picasaweb_album_get_edited
+gdata_picasaweb_album_get_location
+gdata_picasaweb_album_set_location
+gdata_picasaweb_album_get_visibility
+gdata_picasaweb_album_set_visibility
+gdata_picasaweb_album_get_timestamp
+gdata_picasaweb_album_set_timestamp
+gdata_picasaweb_album_get_num_photos
+gdata_picasaweb_album_get_num_photos_remaining
+gdata_picasaweb_album_get_bytes_used
+gdata_picasaweb_album_is_commenting_enabled
+gdata_picasaweb_album_set_is_commenting_enabled
+gdata_picasaweb_album_get_comment_count
+gdata_picasaweb_album_get_tags
+gdata_picasaweb_album_set_tags
+gdata_picasaweb_album_get_contents
+gdata_picasaweb_album_get_thumbnails
+gdata_picasaweb_album_get_coordinates
+gdata_picasaweb_album_set_coordinates
+gdata_picasaweb_file_get_type
+gdata_picasaweb_file_new
+gdata_picasaweb_file_get_id
+gdata_picasaweb_file_get_edited
+gdata_picasaweb_file_get_version
+gdata_picasaweb_file_get_album_id
+gdata_picasaweb_file_set_album_id
+gdata_picasaweb_file_get_width
+gdata_picasaweb_file_get_height
+gdata_picasaweb_file_get_size
+gdata_picasaweb_file_get_checksum
+gdata_picasaweb_file_set_checksum
+gdata_picasaweb_file_get_timestamp
+gdata_picasaweb_file_set_timestamp
+gdata_picasaweb_file_is_commenting_enabled
+gdata_picasaweb_file_set_is_commenting_enabled
+gdata_picasaweb_file_get_comment_count
+gdata_picasaweb_file_get_rotation
+gdata_picasaweb_file_set_rotation
+gdata_picasaweb_file_get_video_status
+gdata_picasaweb_file_get_tags
+gdata_picasaweb_file_set_tags
+gdata_picasaweb_file_get_credit
+gdata_picasaweb_file_get_caption
+gdata_picasaweb_file_set_caption
+gdata_picasaweb_file_get_contents
+gdata_picasaweb_file_get_thumbnails
+gdata_picasaweb_file_get_distance
+gdata_picasaweb_file_get_exposure
+gdata_picasaweb_file_get_flash
+gdata_picasaweb_file_get_focal_length
+gdata_picasaweb_file_get_fstop
+gdata_picasaweb_file_get_image_unique_id
+gdata_picasaweb_file_get_iso
+gdata_picasaweb_file_get_make
+gdata_picasaweb_file_get_model
+gdata_picasaweb_file_get_coordinates
+gdata_picasaweb_file_set_coordinates
+gdata_picasaweb_service_get_type
+gdata_picasaweb_service_new
+gdata_picasaweb_service_get_user
+gdata_picasaweb_service_query_all_albums
+gdata_picasaweb_service_query_all_albums_async
+gdata_picasaweb_service_query_files
+gdata_picasaweb_service_insert_album
+gdata_picasaweb_feed_get_type
+gdata_picasaweb_user_get_type
+gdata_picasaweb_user_get_user
+gdata_picasaweb_user_get_nickname
+gdata_picasaweb_user_get_quota_limit
+gdata_picasaweb_user_get_quota_current
+gdata_picasaweb_user_get_max_photos_per_album
+gdata_picasaweb_user_get_thumbnail_uri
+gdata_picasaweb_query_get_type
+gdata_picasaweb_query_new
+gdata_picasaweb_query_new_with_limits
+gdata_picasaweb_query_get_visibility
+gdata_picasaweb_query_set_visibility
+gdata_picasaweb_query_get_thumbnail_size
+gdata_picasaweb_query_set_thumbnail_size
+gdata_picasaweb_query_get_image_size
+gdata_picasaweb_query_set_image_size
+gdata_picasaweb_query_get_tag
+gdata_picasaweb_query_set_tag
+gdata_picasaweb_query_get_bounding_box
+gdata_picasaweb_query_set_bounding_box
+gdata_picasaweb_query_get_location
+gdata_picasaweb_query_set_location
+gdata_picasaweb_visibility_get_type
+gdata_documents_presentation_get_type
+gdata_documents_presentation_new
+gdata_documents_drawing_get_type
+gdata_documents_drawing_new
+gdata_documents_pdf_get_type
+gdata_documents_pdf_new
+gdata_documents_text_get_type
+gdata_documents_text_new
+gdata_documents_spreadsheet_get_type
+gdata_documents_spreadsheet_new
+gdata_documents_spreadsheet_get_download_uri
+gdata_documents_folder_get_type
+gdata_documents_folder_new
+gdata_documents_service_get_type
+gdata_documents_service_new
+gdata_documents_service_get_metadata
+gdata_documents_service_get_metadata_async
+gdata_documents_service_get_metadata_finish
+gdata_documents_service_query_documents
+gdata_documents_service_query_documents_async
+gdata_documents_service_upload_document
+gdata_documents_service_update_document
+gdata_documents_service_get_upload_uri
+gdata_documents_metadata_get_type
+gdata_documents_metadata_get_quota_total
+gdata_documents_metadata_get_quota_used
+gdata_documents_feed_get_type
+gdata_documents_entry_get_type
+gdata_documents_entry_get_path
+gdata_documents_entry_get_document_id
+gdata_documents_entry_get_edited
+gdata_documents_entry_get_last_viewed
+gdata_documents_entry_set_writers_can_invite
+gdata_documents_entry_writers_can_invite
+gdata_documents_entry_get_last_modified_by
+gdata_documents_entry_is_deleted
+gdata_documents_query_get_type
+gdata_documents_query_new
+gdata_documents_query_new_with_limits
+gdata_documents_query_show_deleted
+gdata_documents_query_set_show_deleted
+gdata_documents_query_show_folders
+gdata_documents_query_set_show_folders
+gdata_documents_query_get_folder_id
+gdata_documents_query_set_folder_id
+gdata_documents_query_get_title
+gdata_documents_query_get_exact_title
+gdata_documents_query_set_title
+gdata_documents_query_get_collaborator_addresses
+gdata_documents_query_get_reader_addresses
+gdata_documents_query_add_reader
+gdata_documents_query_add_collaborator
+gdata_documents_service_error_get_type
+gdata_documents_service_error_quark
+gdata_documents_access_rule_get_type
+gdata_documents_access_rule_new
+gdata_download_stream_get_type
+gdata_download_stream_new
+gdata_download_stream_get_service
+gdata_download_stream_get_download_uri
+gdata_download_stream_get_content_type
+gdata_download_stream_get_content_length
+gdata_upload_stream_get_type
+gdata_upload_stream_new
+gdata_upload_stream_get_service
+gdata_upload_stream_get_upload_uri
+gdata_upload_stream_get_entry
+gdata_upload_stream_get_slug
+gdata_upload_stream_get_content_type
+gdata_gd_name_get_type
+gdata_gd_name_new
+gdata_gd_name_get_given_name
+gdata_gd_name_set_given_name
+gdata_gd_name_get_additional_name
+gdata_gd_name_set_additional_name
+gdata_gd_name_get_family_name
+gdata_gd_name_set_family_name
+gdata_gd_name_get_prefix
+gdata_gd_name_set_prefix
+gdata_gd_name_get_suffix
+gdata_gd_name_set_suffix
+gdata_gd_name_get_full_name
+gdata_gd_name_set_full_name
+gdata_youtube_permission_get_type
+gdata_gcontact_jot_get_type
+gdata_gcontact_jot_new
+gdata_gcontact_jot_get_content
+gdata_gcontact_jot_set_content
+gdata_gcontact_jot_get_relation_type
+gdata_gcontact_jot_set_relation_type
+gdata_contacts_contact_add_jot
+gdata_contacts_contact_get_jots
+gdata_contacts_contact_remove_all_jots
+gdata_contacts_contact_get_nickname
+gdata_contacts_contact_set_nickname
+gdata_contacts_contact_get_birthday
+gdata_contacts_contact_set_birthday
+gdata_gcontact_relation_get_type
+gdata_gcontact_relation_new
+gdata_gcontact_relation_get_name
+gdata_gcontact_relation_set_name
+gdata_gcontact_relation_get_relation_type
+gdata_gcontact_relation_set_relation_type
+gdata_gcontact_relation_get_label
+gdata_gcontact_relation_set_label
+gdata_contacts_contact_add_relation
+gdata_contacts_contact_get_relations
+gdata_contacts_contact_remove_all_relations
+gdata_gcontact_website_get_type
+gdata_gcontact_website_new
+gdata_gcontact_website_get_uri
+gdata_gcontact_website_set_uri
+gdata_gcontact_website_get_relation_type
+gdata_gcontact_website_set_relation_type
+gdata_gcontact_website_get_label
+gdata_gcontact_website_set_label
+gdata_gcontact_website_is_primary
+gdata_gcontact_website_set_is_primary
+gdata_contacts_contact_add_website
+gdata_contacts_contact_get_websites
+gdata_contacts_contact_get_primary_website
+gdata_contacts_contact_remove_all_websites
+gdata_gcontact_event_get_type
+gdata_gcontact_event_new
+gdata_gcontact_event_get_date
+gdata_gcontact_event_set_date
+gdata_gcontact_event_get_relation_type
+gdata_gcontact_event_set_relation_type
+gdata_gcontact_event_get_label
+gdata_gcontact_event_set_label
+gdata_contacts_contact_add_event
+gdata_contacts_contact_get_events
+gdata_contacts_contact_remove_all_events
+gdata_gcontact_calendar_get_type
+gdata_gcontact_calendar_new
+gdata_gcontact_calendar_get_uri
+gdata_gcontact_calendar_set_uri
+gdata_gcontact_calendar_get_relation_type
+gdata_gcontact_calendar_set_relation_type
+gdata_gcontact_calendar_get_label
+gdata_gcontact_calendar_set_label
+gdata_gcontact_calendar_is_primary
+gdata_gcontact_calendar_set_is_primary
+gdata_contacts_contact_add_calendar
+gdata_contacts_contact_get_calendars
+gdata_contacts_contact_get_primary_calendar
+gdata_contacts_contact_remove_all_calendars
+gdata_contacts_contact_get_directory_server
+gdata_contacts_contact_set_directory_server
+gdata_contacts_contact_get_gender
+gdata_contacts_contact_set_gender
+gdata_contacts_contact_get_initials
+gdata_contacts_contact_set_initials
+gdata_contacts_contact_get_maiden_name
+gdata_contacts_contact_set_maiden_name
+gdata_contacts_contact_get_mileage
+gdata_contacts_contact_set_mileage
+gdata_contacts_contact_get_occupation
+gdata_contacts_contact_set_occupation
+gdata_contacts_contact_get_priority
+gdata_contacts_contact_set_priority
+gdata_contacts_contact_get_sensitivity
+gdata_contacts_contact_set_sensitivity
+gdata_contacts_contact_get_short_name
+gdata_contacts_contact_set_short_name
+gdata_contacts_contact_get_subject
+gdata_contacts_contact_set_subject
+gdata_contacts_contact_get_billing_information
+gdata_contacts_contact_set_billing_information
+gdata_contacts_contact_get_user_defined_field
+gdata_contacts_contact_get_user_defined_fields
+gdata_contacts_contact_set_user_defined_field
+gdata_gcontact_external_id_get_type
+gdata_gcontact_external_id_new
+gdata_gcontact_external_id_get_value
+gdata_gcontact_external_id_set_value
+gdata_gcontact_external_id_get_relation_type
+gdata_gcontact_external_id_set_relation_type
+gdata_gcontact_external_id_get_label
+gdata_gcontact_external_id_set_label
+gdata_contacts_contact_add_external_id
+gdata_contacts_contact_get_external_ids
+gdata_contacts_contact_remove_all_external_ids
+gdata_contacts_contact_add_hobby
+gdata_contacts_contact_get_hobbies
+gdata_contacts_contact_remove_all_hobbies
+gdata_gcontact_language_get_type
+gdata_gcontact_language_new
+gdata_gcontact_language_get_code
+gdata_gcontact_language_set_code
+gdata_gcontact_language_get_label
+gdata_gcontact_language_set_label
+gdata_contacts_contact_add_language
+gdata_contacts_contact_get_languages
+gdata_contacts_contact_remove_all_languages
+gdata_service_get_timeout
+gdata_service_set_timeout
+gdata_service_get_locale
+gdata_service_set_locale
+gdata_youtube_service_get_categories
+gdata_youtube_service_get_categories_async
+gdata_youtube_service_get_categories_finish
+gdata_youtube_category_get_type
+gdata_youtube_category_is_assignable
+gdata_youtube_category_is_browsable
+gdata_youtube_category_is_deprecated
+gdata_app_categories_get_type
+gdata_app_categories_get_categories
+gdata_app_categories_is_fixed
+gdata_comparable_get_type
+gdata_comparable_compare
+gdata_batch_operation_get_type
+gdata_batch_operation_get_service
+gdata_batch_operation_get_feed_uri
+gdata_batch_operation_add_query
+gdata_batch_operation_add_insertion
+gdata_batch_operation_add_update
+gdata_batch_operation_add_deletion
+gdata_batch_operation_run
+gdata_batch_operation_run_async
+gdata_batch_operation_run_finish
+gdata_batch_operation_type_get_type
+gdata_batchable_get_type
+gdata_batchable_create_operation
+gdata_upload_stream_get_method
+gdata_documents_document_get_type
+gdata_documents_document_download
+gdata_documents_document_get_download_uri
+gdata_contacts_group_get_type
+gdata_contacts_group_new
+gdata_contacts_group_get_edited
+gdata_contacts_group_is_deleted
+gdata_contacts_group_get_system_group_id
+gdata_contacts_group_get_extended_property
+gdata_contacts_group_get_extended_properties
+gdata_contacts_group_set_extended_property
+gdata_contacts_service_query_groups
+gdata_contacts_service_query_groups_async
+gdata_contacts_service_insert_group
+gdata_contacts_service_insert_group_async
+gdata_picasaweb_service_insert_album_async
+gdata_picasaweb_service_query_files_async
+gdata_documents_service_finish_upload
+gdata_documents_service_add_entry_to_folder
+gdata_documents_service_remove_entry_from_folder
+gdata_documents_service_add_entry_to_folder_async
+gdata_documents_service_add_entry_to_folder_finish
+gdata_documents_service_remove_entry_from_folder_async
+gdata_documents_service_remove_entry_from_folder_finish
+gdata_picasaweb_service_upload_file
+gdata_picasaweb_service_finish_file_upload
+gdata_youtube_service_upload_video
+gdata_youtube_service_finish_video_upload
+gdata_calendar_service_query_events_async
+gdata_calendar_service_insert_event_async
+gdata_calendar_service_insert_calendar_event_async
+gdata_contacts_contact_get_photo_async
+gdata_contacts_contact_get_photo_finish
+gdata_contacts_contact_set_photo_async
+gdata_contacts_contact_set_photo_finish
+gdata_youtube_video_get_coordinates
+gdata_youtube_video_set_coordinates
+gdata_upload_stream_get_cancellable
+gdata_download_stream_get_cancellable
+gdata_service_is_authorized
+gdata_service_get_authorizer
+gdata_service_set_authorizer
+gdata_authorizer_get_type
+gdata_authorizer_process_request
+gdata_authorizer_is_authorized_for_domain
+gdata_authorizer_refresh_authorization
+gdata_authorizer_refresh_authorization_async
+gdata_authorizer_refresh_authorization_finish
+gdata_authorization_domain_get_type
+gdata_authorization_domain_get_service_name
+gdata_authorization_domain_get_scope
+gdata_client_login_authorizer_get_type
+gdata_client_login_authorizer_new
+gdata_client_login_authorizer_new_for_authorization_domains
+gdata_client_login_authorizer_authenticate
+gdata_client_login_authorizer_authenticate_async
+gdata_client_login_authorizer_authenticate_finish
+gdata_client_login_authorizer_get_client_id
+gdata_client_login_authorizer_get_username
+gdata_client_login_authorizer_get_password
+gdata_client_login_authorizer_get_proxy_uri
+gdata_client_login_authorizer_set_proxy_uri
+gdata_client_login_authorizer_get_proxy_resolver
+gdata_client_login_authorizer_set_proxy_resolver
+gdata_client_login_authorizer_get_timeout
+gdata_client_login_authorizer_set_timeout
+gdata_client_login_authorizer_error_quark
+gdata_client_login_authorizer_error_get_type
+gdata_download_stream_get_authorization_domain
+gdata_upload_stream_get_authorization_domain
+gdata_batch_operation_get_authorization_domain
+gdata_contacts_service_get_primary_authorization_domain
+gdata_calendar_service_get_primary_authorization_domain
+gdata_documents_service_get_primary_authorization_domain
+gdata_documents_service_get_spreadsheet_authorization_domain
+gdata_picasaweb_service_get_primary_authorization_domain
+gdata_youtube_service_get_primary_authorization_domain
+gdata_service_get_authorization_domains
+gdata_oauth1_authorizer_get_type
+gdata_oauth1_authorizer_new
+gdata_oauth1_authorizer_new_for_authorization_domains
+gdata_oauth1_authorizer_request_authentication_uri
+gdata_oauth1_authorizer_request_authentication_uri_async
+gdata_oauth1_authorizer_request_authentication_uri_finish
+gdata_oauth1_authorizer_request_authorization
+gdata_oauth1_authorizer_request_authorization_async
+gdata_oauth1_authorizer_request_authorization_finish
+gdata_oauth1_authorizer_get_application_name
+gdata_oauth1_authorizer_get_locale
+gdata_oauth1_authorizer_set_locale
+gdata_oauth1_authorizer_get_proxy_uri
+gdata_oauth1_authorizer_set_proxy_uri
+gdata_oauth1_authorizer_get_proxy_resolver
+gdata_oauth1_authorizer_set_proxy_resolver
+gdata_oauth1_authorizer_get_timeout
+gdata_oauth1_authorizer_set_timeout
+gdata_calendar_query_get_max_attendees
+gdata_calendar_query_set_max_attendees
+gdata_calendar_query_show_deleted
+gdata_calendar_query_set_show_deleted
+gdata_picasaweb_service_get_user_async
+gdata_picasaweb_service_get_user_finish
+gdata_commentable_get_type
+gdata_commentable_query_comments
+gdata_commentable_query_comments_async
+gdata_commentable_query_comments_finish
+gdata_commentable_insert_comment
+gdata_commentable_insert_comment_async
+gdata_commentable_insert_comment_finish
+gdata_commentable_delete_comment
+gdata_commentable_delete_comment_async
+gdata_commentable_delete_comment_finish
+gdata_comment_get_type
+gdata_youtube_comment_get_type
+gdata_youtube_comment_new
+gdata_youtube_comment_get_parent_comment_uri
+gdata_youtube_comment_set_parent_comment_uri
+gdata_picasaweb_comment_get_type
+gdata_picasaweb_comment_new
+gdata_youtube_video_get_media_rating
+gdata_documents_entry_get_resource_id
+gdata_youtube_query_get_license
+gdata_youtube_query_set_license
+gdata_contacts_contact_get_file_as
+gdata_contacts_contact_set_file_as
+gdata_upload_stream_new_resumable
+gdata_upload_stream_get_content_length
+gdata_documents_service_upload_document_resumable
+gdata_documents_service_update_document_resumable
+gdata_documents_upload_query_get_type
+gdata_documents_upload_query_new
+gdata_documents_upload_query_build_uri
+gdata_documents_upload_query_get_folder
+gdata_documents_upload_query_set_folder
+gdata_documents_document_new
+gdata_documents_upload_query_get_convert
+gdata_documents_upload_query_set_convert
+gdata_documents_entry_get_quota_used
+gdata_documents_entry_get_file_size
+gdata_documents_service_copy_document
+gdata_documents_service_copy_document_async
+gdata_documents_service_copy_document_finish
+gdata_documents_document_get_thumbnail_uri
+gdata_tasks_task_get_type
+gdata_tasks_task_new
+gdata_tasks_task_get_parent
+gdata_tasks_task_set_parent
+gdata_tasks_task_get_position
+gdata_tasks_task_set_position
+gdata_tasks_task_get_notes
+gdata_tasks_task_set_notes
+gdata_tasks_task_get_status
+gdata_tasks_task_set_status
+gdata_tasks_task_get_due
+gdata_tasks_task_set_due
+gdata_tasks_task_get_completed
+gdata_tasks_task_set_completed
+gdata_tasks_task_is_deleted
+gdata_tasks_task_set_is_deleted
+gdata_tasks_task_is_hidden
+gdata_tasks_tasklist_get_type
+gdata_tasks_tasklist_new
+gdata_tasks_query_get_type
+gdata_tasks_query_new
+gdata_tasks_query_get_completed_max
+gdata_tasks_query_set_completed_max
+gdata_tasks_query_get_completed_min
+gdata_tasks_query_set_completed_min
+gdata_tasks_query_get_due_max
+gdata_tasks_query_set_due_max
+gdata_tasks_query_get_due_min
+gdata_tasks_query_set_due_min
+gdata_tasks_query_get_show_completed
+gdata_tasks_query_set_show_completed
+gdata_tasks_query_get_show_deleted
+gdata_tasks_query_set_show_deleted
+gdata_tasks_query_get_show_hidden
+gdata_tasks_query_set_show_hidden
+gdata_tasks_service_get_type
+gdata_tasks_service_new
+gdata_tasks_service_get_primary_authorization_domain
+gdata_tasks_service_query_all_tasklists
+gdata_tasks_service_query_all_tasklists_async
+gdata_tasks_service_query_tasks
+gdata_tasks_service_query_tasks_async
+gdata_tasks_service_insert_task
+gdata_tasks_service_insert_task_async
+gdata_tasks_service_insert_tasklist
+gdata_tasks_service_insert_tasklist_async
+gdata_tasks_service_delete_task
+gdata_tasks_service_delete_task_async
+gdata_tasks_service_delete_tasklist
+gdata_tasks_service_delete_tasklist_async
+gdata_tasks_service_update_task
+gdata_tasks_service_update_task_async
+gdata_tasks_service_update_tasklist
+gdata_tasks_service_update_tasklist_async
+gdata_freebase_service_get_type
+gdata_freebase_service_new
+gdata_freebase_service_query
+gdata_freebase_service_query_async
+gdata_freebase_service_get_topic
+gdata_freebase_service_get_topic_async
+gdata_freebase_service_search
+gdata_freebase_service_search_async
+gdata_freebase_service_get_image
+gdata_freebase_query_get_type
+gdata_freebase_query_new
+gdata_freebase_query_new_from_variant
+gdata_freebase_search_filter_type_get_type
+gdata_freebase_search_query_get_type
+gdata_freebase_search_query_new
+gdata_freebase_search_query_open_filter
+gdata_freebase_search_query_close_filter
+gdata_freebase_search_query_add_filter
+gdata_freebase_search_query_add_location
+gdata_freebase_search_query_set_language
+gdata_freebase_search_query_get_language
+gdata_freebase_search_query_set_stemmed
+gdata_freebase_search_query_get_stemmed
+gdata_freebase_search_result_get_type
+gdata_freebase_search_result_new
+gdata_freebase_search_result_get_num_items
+gdata_freebase_search_result_get_total_hits
+gdata_freebase_search_result_get_item
+gdata_freebase_search_result_item_get_type
+gdata_freebase_search_result_item_get_mid
+gdata_freebase_search_result_item_get_id
+gdata_freebase_search_result_item_get_name
+gdata_freebase_search_result_item_get_language
+gdata_freebase_search_result_item_get_notable_name
+gdata_freebase_search_result_item_get_notable_id
+gdata_freebase_search_result_item_get_score
+gdata_freebase_topic_query_get_type
+gdata_freebase_topic_query_new
+gdata_freebase_topic_query_set_filter
+gdata_freebase_topic_query_get_filter
+gdata_freebase_topic_query_set_language
+gdata_freebase_topic_query_get_language
+gdata_freebase_topic_object_get_type
+gdata_freebase_topic_object_ref
+gdata_freebase_topic_object_unref
+gdata_freebase_topic_object_list_properties
+gdata_freebase_topic_object_get_id
+gdata_freebase_topic_object_get_property_count
+gdata_freebase_topic_object_get_property_hits
+gdata_freebase_topic_object_get_property_value
+gdata_freebase_topic_value_get_type
+gdata_freebase_topic_value_ref
+gdata_freebase_topic_value_unref
+gdata_freebase_topic_value_get_property
+gdata_freebase_topic_value_get_text
+gdata_freebase_topic_value_get_language
+gdata_freebase_topic_value_get_creator
+gdata_freebase_topic_value_get_timestamp
+gdata_freebase_topic_value_get_value_type
+gdata_freebase_topic_value_copy_value
+gdata_freebase_topic_value_get_int
+gdata_freebase_topic_value_get_double
+gdata_freebase_topic_value_get_string
+gdata_freebase_topic_value_get_object
+gdata_freebase_topic_value_is_image
+gdata_freebase_topic_result_get_type
+gdata_freebase_topic_result_new
+gdata_freebase_topic_result_dup_object
+gdata_freebase_result_get_type
+gdata_freebase_result_new
+gdata_freebase_result_dup_variant
+gdata_oauth2_authorizer_get_type
+gdata_oauth2_authorizer_new
+gdata_oauth2_authorizer_new_for_authorization_domains
+gdata_oauth2_authorizer_build_authentication_uri
+gdata_oauth2_authorizer_request_authorization
+gdata_oauth2_authorizer_request_authorization_async
+gdata_oauth2_authorizer_request_authorization_finish
+gdata_oauth2_authorizer_get_client_id
+gdata_oauth2_authorizer_get_redirect_uri
+gdata_oauth2_authorizer_get_client_secret
+gdata_oauth2_authorizer_dup_refresh_token
+gdata_oauth2_authorizer_set_refresh_token
+gdata_oauth2_authorizer_get_locale
+gdata_oauth2_authorizer_set_locale
+gdata_oauth2_authorizer_get_timeout
+gdata_oauth2_authorizer_set_timeout
+gdata_oauth2_authorizer_get_proxy_resolver
+gdata_oauth2_authorizer_set_proxy_resolver
+gdata_calendar_access_rule_get_type
+gdata_calendar_access_rule_new
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-download-stream
+ * @short_description: GData download stream object
+ * @stability: Stable
+ * @include: gdata/gdata-download-stream.h
+ *
+ * #GDataDownloadStream is a #GInputStream subclass to allow downloading of files from GData services with authorization from a #GDataService under
+ * the given #GDataAuthorizationDomain. If authorization is not required to perform the download, a #GDataAuthorizationDomain doesn't have to be
+ * specified.
+ *
+ * Once a #GDataDownloadStream is instantiated with gdata_download_stream_new(), the standard #GInputStream API can be used on the stream to download
+ * the file. Network communication may not actually begin until the first call to g_input_stream_read(), so having a #GDataDownloadStream around is no
+ * guarantee that the file is being downloaded.
+ *
+ * The content type and length of the file being downloaded are made available through #GDataDownloadStream:content-type and
+ * #GDataDownloadStream:content-length as soon as the appropriate data is received from the server. Connect to the
+ * #GObject::notify <code type="literal">content-type</code> and <code type="literal">content-length</code> details to be notified as
+ * soon as the data is available.
+ *
+ * The entire download operation can be cancelled using the #GCancellable instance provided to gdata_download_stream_new(), or returned by
+ * gdata_download_stream_get_cancellable(). Cancelling this at any time will cause all future #GInputStream method calls to return
+ * %G_IO_ERROR_CANCELLED. If any #GInputStream methods are in the process of being called, they will be cancelled and return %G_IO_ERROR_CANCELLED as
+ * soon as possible.
+ *
+ * Note that cancelling an individual method call (such as a call to g_input_stream_read()) using the #GCancellable parameter of the method will not
+ * cancel the download as a whole — just that particular method call. In the case of g_input_stream_read(), this will cause it to successfully return
+ * any data that it has in memory at the moment (up to the requested number of bytes), or return a %G_IO_ERROR_CANCELLED if it was blocking on receiving
+ * data from the network. This is also the behaviour of g_input_stream_read() when the download operation as a whole is cancelled.
+ *
+ * In the case of g_input_stream_close(), the call will return immediately if network activity hasn't yet started. If it has, the network activity will
+ * be cancelled, regardless of whether the call to g_input_stream_close() is cancelled. Cancelling a pending call to g_input_stream_close() (either
+ * using the method's #GCancellable, or by cancelling the download stream as a whole) will cause it to stop waiting for the network activity to finish,
+ * and return %G_IO_ERROR_CANCELLED immediately. Network activity will continue to be shut down in the background.
+ *
+ * If the server returns an error message (for example, if the user is not correctly authenticated/authorized or doesn't have suitable permissions to
+ * download from the given URI), it will be returned as a #GDataServiceError by the first call to g_input_stream_read().
+ *
+ * <example>
+ * <title>Downloading to a File</title>
+ * <programlisting>
+ * GDataService *service;
+ * GDataAuthorizationDomain *domain;
+ * GCancellable *cancellable;
+ * GInputStream *download_stream;
+ * GOutputStream *output_stream;
+ *
+ * /<!-- -->* Create the download stream *<!-- -->/
+ * service = create_my_service ();
+ * domain = get_my_authorization_domain_from_service (service);
+ * cancellable = g_cancellable_new (); /<!-- -->* cancel this to cancel the entire download operation *<!-- -->/
+ * download_stream = gdata_download_stream_new (service, domain, download_uri, cancellable);
+ * output_stream = create_file_and_return_output_stream ();
+ *
+ * /<!-- -->* Perform the download asynchronously *<!-- -->/
+ * g_output_stream_splice_async (output_stream, download_stream, G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET,
+ * G_PRIORITY_DEFAULT, NULL, (GAsyncReadyCallback) download_splice_cb, NULL);
+ *
+ * g_object_unref (output_stream);
+ * g_object_unref (download_stream);
+ * g_object_unref (cancellable);
+ * g_object_unref (domain);
+ * g_object_unref (service);
+ *
+ * static void
+ * download_splice_cb (GOutputStream *output_stream, GAsyncResult *result, gpointer user_data)
+ * {
+ * GError *error = NULL;
+ *
+ * g_output_stream_splice_finish (output_stream, result, &error);
+ *
+ * if (error != NULL && g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED) == FALSE)) {
+ * /<!-- -->* Error downloading the file; potentially an I/O error (GIOError), or an error response from the server
+ * * (GDataServiceError). You might want to delete the newly created file because of the error. *<!-- -->/
+ * g_error ("Error downloading file: %s", error->message);
+ * g_error_free (error);
+ * }
+ * }
+ * </programlisting>
+ * </example>
+ *
+ * Since: 0.5.0
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+
+#include "gdata-download-stream.h"
+#include "gdata-buffer.h"
+#include "gdata-private.h"
+
+static void gdata_download_stream_seekable_iface_init (GSeekableIface *seekable_iface);
+static GObject *gdata_download_stream_constructor (GType type, guint n_construct_params, GObjectConstructParam *construct_params);
+static void gdata_download_stream_dispose (GObject *object);
+static void gdata_download_stream_finalize (GObject *object);
+static void gdata_download_stream_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_download_stream_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+
+static gssize gdata_download_stream_read (GInputStream *stream, void *buffer, gsize count, GCancellable *cancellable, GError **error);
+static gboolean gdata_download_stream_close (GInputStream *stream, GCancellable *cancellable, GError **error);
+
+static goffset gdata_download_stream_tell (GSeekable *seekable);
+static gboolean gdata_download_stream_can_seek (GSeekable *seekable);
+static gboolean gdata_download_stream_seek (GSeekable *seekable, goffset offset, GSeekType type, GCancellable *cancellable, GError **error);
+static gboolean gdata_download_stream_can_truncate (GSeekable *seekable);
+static gboolean gdata_download_stream_truncate (GSeekable *seekable, goffset offset, GCancellable *cancellable, GError **error);
+
+static void create_network_thread (GDataDownloadStream *self, GError **error);
+static void reset_network_thread (GDataDownloadStream *self);
+
+/*
+ * The GDataDownloadStream can be in one of several states:
+ * 1. Pre-network activity. This is the state that the stream is created in. @network_thread and @cancellable are both %NULL, and @finished is %FALSE.
+ * The stream will remain in this state until gdata_download_stream_read() or gdata_download_stream_seek() are called for the first time.
+ * @content_type and @content_length are at their default values (NULL and -1, respectively).
+ * 2. Network activity. This state is entered when gdata_download_stream_read() is called for the first time.
+ * @network_thread, @buffer and @cancellable are created, while @finished remains %FALSE.
+ * As soon as the headers are downloaded, which is guaranteed to be before the first call to gdata_download_stream_read() returns, @content_type
+ * and @content_length are set from the headers. From this point onwards, they are immutable.
+ * 3. Reset network activity. This state is entered only if case 3 is encountered in a call to gdata_download_stream_seek(): a seek to an offset which
+ * has already been read out of the buffer. In this state, @buffer is freed and set to %NULL, @network_thread is cancelled (then set to %NULL),
+ * and @offset is set to the seeked-to offset. @finished remains at %FALSE.
+ * When the next call to gdata_download_stream_read() is made, the download stream will go back to state 2 as if this was the first call to
+ * gdata_download_stream_read().
+ * 4. Post-network activity. This state is reached once the download thread finishes downloading, due to having downloaded everything.
+ * @buffer is non-%NULL, @network_thread is non-%NULL, but meaningless; @cancellable is still a valid #GCancellable instance; and @finished is set
+ * to %TRUE. At the same time, @finished_cond is signalled.
+ * This state can be exited either by making a call to gdata_download_stream_seek(), in which case the stream will go back to state 3; or by
+ * calling gdata_download_stream_close(), in which case the stream will return errors for all operations, as the underlying %GInputStream will be
+ * marked as closed.
+ */
+struct _GDataDownloadStreamPrivate {
+ gchar *download_uri;
+ GDataService *service;
+ GDataAuthorizationDomain *authorization_domain;
+ SoupSession *session;
+ SoupMessage *message;
+ GDataBuffer *buffer;
+ goffset offset; /* current position in the stream */
+
+ GThread *network_thread;
+ GCancellable *cancellable;
+ GCancellable *network_cancellable; /* see the comment in gdata_download_stream_constructor() about the relationship between these two */
+ gulong network_cancellable_id;
+
+ gboolean finished;
+ GCond finished_cond;
+ GMutex finished_mutex; /* mutex for ->finished, protected by ->finished_cond */
+
+ /* Cached data from the SoupMessage */
+ gchar *content_type;
+ gssize content_length;
+ GMutex content_mutex; /* mutex to protect them */
+};
+
+enum {
+ PROP_SERVICE = 1,
+ PROP_DOWNLOAD_URI,
+ PROP_CONTENT_TYPE,
+ PROP_CONTENT_LENGTH,
+ PROP_CANCELLABLE,
+ PROP_AUTHORIZATION_DOMAIN,
+};
+
+G_DEFINE_TYPE_WITH_CODE (GDataDownloadStream, gdata_download_stream, G_TYPE_INPUT_STREAM,
+ G_IMPLEMENT_INTERFACE (G_TYPE_SEEKABLE, gdata_download_stream_seekable_iface_init))
+
+static void
+gdata_download_stream_class_init (GDataDownloadStreamClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GInputStreamClass *stream_class = G_INPUT_STREAM_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataDownloadStreamPrivate));
+
+ gobject_class->constructor = gdata_download_stream_constructor;
+ gobject_class->dispose = gdata_download_stream_dispose;
+ gobject_class->finalize = gdata_download_stream_finalize;
+ gobject_class->get_property = gdata_download_stream_get_property;
+ gobject_class->set_property = gdata_download_stream_set_property;
+
+ /* We use the default implementations of the async functions, which just run
+ * our implementation of the sync function in a thread. */
+ stream_class->read_fn = gdata_download_stream_read;
+ stream_class->close_fn = gdata_download_stream_close;
+
+ /**
+ * GDataDownloadStream:service:
+ *
+ * The service which is used to authorize the download, and to which the download relates.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SERVICE,
+ g_param_spec_object ("service",
+ "Service", "The service which is used to authorize the download.",
+ GDATA_TYPE_SERVICE,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataDownloadStream:authorization-domain:
+ *
+ * The authorization domain for the download, against which the #GDataService:authorizer for the #GDataDownloadStream:service should be
+ * authorized. This may be %NULL if authorization is not needed for the download.
+ *
+ * Since: 0.9.0
+ */
+ g_object_class_install_property (gobject_class, PROP_AUTHORIZATION_DOMAIN,
+ g_param_spec_object ("authorization-domain",
+ "Authorization domain", "The authorization domain for the download.",
+ GDATA_TYPE_AUTHORIZATION_DOMAIN,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataDownloadStream:download-uri:
+ *
+ * The URI of the file to download. This must be HTTPS.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_DOWNLOAD_URI,
+ g_param_spec_string ("download-uri",
+ "Download URI", "The URI of the file to download.",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataDownloadStream:content-type:
+ *
+ * The content type of the file being downloaded. This will initially be %NULL, and will be populated as soon as the appropriate header is
+ * received from the server. Its value will never change after this.
+ *
+ * Note that change notifications for this property (#GObject::notify emissions) may be emitted in threads other than the one which created
+ * the #GDataDownloadStream. It is the client's responsibility to ensure that any notification signal handlers are either multi-thread safe
+ * or marshal the notification to the thread which owns the #GDataDownloadStream as appropriate.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_CONTENT_TYPE,
+ g_param_spec_string ("content-type",
+ "Content type", "The content type of the file being downloaded.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataDownloadStream:content-length:
+ *
+ * The length (in bytes) of the file being downloaded. This will initially be <code class="literal">-1</code>, and will be populated as soon as
+ * the appropriate header is received from the server. Its value will never change after this.
+ *
+ * Note that change notifications for this property (#GObject::notify emissions) may be emitted in threads other than the one which created
+ * the #GDataDownloadStream. It is the client's responsibility to ensure that any notification signal handlers are either multi-thread safe
+ * or marshal the notification to the thread which owns the #GDataDownloadStream as appropriate.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_CONTENT_LENGTH,
+ g_param_spec_long ("content-length",
+ "Content length", "The length (in bytes) of the file being downloaded.",
+ -1, G_MAXSSIZE, -1,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataDownloadStream:cancellable:
+ *
+ * An optional cancellable used to cancel the entire download operation. If a #GCancellable instance isn't provided for this property at
+ * construction time (i.e. to gdata_download_stream_new()), one will be created internally and can be retrieved using
+ * gdata_download_stream_get_cancellable() and used to cancel the download operation with g_cancellable_cancel() just as if it was passed to
+ * gdata_download_stream_new().
+ *
+ * If the download operation is cancelled using this #GCancellable, any ongoing network activity will be stopped, and any pending or future
+ * calls to #GInputStream API on the #GDataDownloadStream will return %G_IO_ERROR_CANCELLED. Note that the #GCancellable objects which can be
+ * passed to individual #GInputStream operations will not cancel the download operation proper if cancelled — they will merely cancel that API
+ * call. The only way to cancel the download operation completely is using #GDataDownloadStream:cancellable.
+ *
+ * Since: 0.8.0
+ */
+ g_object_class_install_property (gobject_class, PROP_CANCELLABLE,
+ g_param_spec_object ("cancellable",
+ "Cancellable", "An optional cancellable used to cancel the entire download operation.",
+ G_TYPE_CANCELLABLE,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_download_stream_seekable_iface_init (GSeekableIface *seekable_iface)
+{
+ seekable_iface->tell = gdata_download_stream_tell;
+ seekable_iface->can_seek = gdata_download_stream_can_seek;
+ seekable_iface->seek = gdata_download_stream_seek;
+ seekable_iface->can_truncate = gdata_download_stream_can_truncate;
+ seekable_iface->truncate_fn = gdata_download_stream_truncate;
+}
+
+static void
+gdata_download_stream_init (GDataDownloadStream *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_DOWNLOAD_STREAM, GDataDownloadStreamPrivate);
+ self->priv->buffer = NULL; /* created when the network thread is started and destroyed when the stream is closed */
+
+ self->priv->finished = FALSE;
+ g_cond_init (&(self->priv->finished_cond));
+ g_mutex_init (&(self->priv->finished_mutex));
+
+ self->priv->content_type = NULL;
+ self->priv->content_length = -1;
+ g_mutex_init (&(self->priv->content_mutex));
+}
+
+static void
+cancellable_cancel_cb (GCancellable *cancellable, GCancellable *network_cancellable)
+{
+ g_cancellable_cancel (network_cancellable);
+}
+
+static GObject *
+gdata_download_stream_constructor (GType type, guint n_construct_params, GObjectConstructParam *construct_params)
+{
+ GDataDownloadStreamPrivate *priv;
+ GDataServiceClass *klass;
+ GObject *object;
+ SoupURI *_uri;
+
+ /* Chain up to the parent class */
+ object = G_OBJECT_CLASS (gdata_download_stream_parent_class)->constructor (type, n_construct_params, construct_params);
+ priv = GDATA_DOWNLOAD_STREAM (object)->priv;
+
+ /* Create a #GCancellable for the network. Cancellation of ->cancellable is chained to this one, so that if ->cancellable is cancelled,
+ * ->network_cancellable is also cancelled. However, if ->network_cancellable is cancelled, the cancellation doesn't propagate back upwards
+ * to ->cancellable. This allows closing the stream part-way through a download to be implemented by cancelling ->network_cancellable, without
+ * causing ->cancellable to be unnecessarily cancelled (which would be a nasty side-effect of closing the stream early otherwise). */
+ priv->network_cancellable = g_cancellable_new ();
+
+ /* Create a #GCancellable for the entire download operation if one wasn't specified for #GDataDownloadStream:cancellable during construction */
+ if (priv->cancellable == NULL)
+ priv->cancellable = g_cancellable_new ();
+ priv->network_cancellable_id = g_cancellable_connect (priv->cancellable, (GCallback) cancellable_cancel_cb, priv->network_cancellable, NULL);
+
+ /* Build the message. The URI must be HTTPS. */
+ _uri = soup_uri_new (priv->download_uri);
+ soup_uri_set_port (_uri, _gdata_service_get_https_port ());
+ g_assert_cmpstr (soup_uri_get_scheme (_uri), ==, SOUP_URI_SCHEME_HTTPS);
+ priv->message = soup_message_new_from_uri (SOUP_METHOD_GET, _uri);
+ soup_uri_free (_uri);
+
+ /* Make sure the headers are set */
+ klass = GDATA_SERVICE_GET_CLASS (priv->service);
+ if (klass->append_query_headers != NULL) {
+ klass->append_query_headers (priv->service, priv->authorization_domain, priv->message);
+ }
+
+ /* We don't want to accumulate chunks */
+ soup_message_body_set_accumulate (priv->message->request_body, FALSE);
+
+ /* Downloading doesn't actually start until the first call to read() */
+
+ return object;
+}
+
+static void
+gdata_download_stream_dispose (GObject *object)
+{
+ GDataDownloadStreamPrivate *priv = GDATA_DOWNLOAD_STREAM (object)->priv;
+
+ /* Block on closing the stream */
+ g_input_stream_close (G_INPUT_STREAM (object), NULL, NULL);
+
+ if (priv->cancellable != NULL) {
+ if (priv->network_cancellable_id != 0) {
+ g_cancellable_disconnect (priv->cancellable, priv->network_cancellable_id);
+ }
+
+ g_object_unref (priv->cancellable);
+ }
+
+ priv->network_cancellable_id = 0;
+ priv->cancellable = NULL;
+
+ if (priv->network_cancellable != NULL)
+ g_object_unref (priv->network_cancellable);
+ priv->network_cancellable = NULL;
+
+ if (priv->authorization_domain != NULL)
+ g_object_unref (priv->authorization_domain);
+ priv->authorization_domain = NULL;
+
+ if (priv->service != NULL)
+ g_object_unref (priv->service);
+ priv->service = NULL;
+
+ if (priv->message != NULL)
+ g_object_unref (priv->message);
+ priv->message = NULL;
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_download_stream_parent_class)->dispose (object);
+}
+
+static void
+gdata_download_stream_finalize (GObject *object)
+{
+ GDataDownloadStreamPrivate *priv = GDATA_DOWNLOAD_STREAM (object)->priv;
+
+ reset_network_thread (GDATA_DOWNLOAD_STREAM (object));
+
+ g_cond_clear (&(priv->finished_cond));
+ g_mutex_clear (&(priv->finished_mutex));
+
+ g_mutex_clear (&(priv->content_mutex));
+
+ g_free (priv->download_uri);
+ g_free (priv->content_type);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_download_stream_parent_class)->finalize (object);
+}
+
+static void
+gdata_download_stream_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataDownloadStreamPrivate *priv = GDATA_DOWNLOAD_STREAM (object)->priv;
+
+ switch (property_id) {
+ case PROP_SERVICE:
+ g_value_set_object (value, priv->service);
+ break;
+ case PROP_AUTHORIZATION_DOMAIN:
+ g_value_set_object (value, priv->authorization_domain);
+ break;
+ case PROP_DOWNLOAD_URI:
+ g_value_set_string (value, priv->download_uri);
+ break;
+ case PROP_CONTENT_TYPE:
+ g_mutex_lock (&(priv->content_mutex));
+ g_value_set_string (value, priv->content_type);
+ g_mutex_unlock (&(priv->content_mutex));
+ break;
+ case PROP_CONTENT_LENGTH:
+ g_mutex_lock (&(priv->content_mutex));
+ g_value_set_long (value, priv->content_length);
+ g_mutex_unlock (&(priv->content_mutex));
+ break;
+ case PROP_CANCELLABLE:
+ g_value_set_object (value, priv->cancellable);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_download_stream_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataDownloadStreamPrivate *priv = GDATA_DOWNLOAD_STREAM (object)->priv;
+
+ switch (property_id) {
+ case PROP_SERVICE:
+ priv->service = g_value_dup_object (value);
+ priv->session = _gdata_service_get_session (priv->service);
+ break;
+ case PROP_AUTHORIZATION_DOMAIN:
+ priv->authorization_domain = g_value_dup_object (value);
+ break;
+ case PROP_DOWNLOAD_URI:
+ priv->download_uri = g_value_dup_string (value);
+ break;
+ case PROP_CANCELLABLE:
+ /* Construction only */
+ priv->cancellable = g_value_dup_object (value);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+read_cancelled_cb (GCancellable *cancellable, GCancellable *child_cancellable)
+{
+ g_cancellable_cancel (child_cancellable);
+}
+
+static gssize
+gdata_download_stream_read (GInputStream *stream, void *buffer, gsize count, GCancellable *cancellable, GError **error)
+{
+ GDataDownloadStreamPrivate *priv = GDATA_DOWNLOAD_STREAM (stream)->priv;
+ gssize length_read = -1;
+ gboolean reached_eof = FALSE;
+ gulong cancelled_signal = 0, global_cancelled_signal = 0;
+ GCancellable *child_cancellable;
+ GError *child_error = NULL;
+
+ /* Listen for cancellation from either @cancellable or @priv->cancellable. We have to multiplex cancellation signals from the two sources
+ * into a single #GCancellabel, @child_cancellable. */
+ child_cancellable = g_cancellable_new ();
+
+ global_cancelled_signal = g_cancellable_connect (priv->cancellable, (GCallback) read_cancelled_cb, child_cancellable, NULL);
+
+ if (cancellable != NULL)
+ cancelled_signal = g_cancellable_connect (cancellable, (GCallback) read_cancelled_cb, child_cancellable, NULL);
+
+ /* We're lazy about starting the network operation so we don't end up with a massive buffer */
+ if (priv->network_thread == NULL) {
+ /* Handle early cancellation so that we don't create the network thread unnecessarily */
+ if (g_cancellable_set_error_if_cancelled (child_cancellable, &child_error) == TRUE) {
+ length_read = -1;
+ goto done;
+ }
+
+ /* Create the network thread */
+ create_network_thread (GDATA_DOWNLOAD_STREAM (stream), &child_error);
+ if (priv->network_thread == NULL) {
+ length_read = -1;
+ goto done;
+ }
+ }
+
+ /* Read the data off the buffer. If the operation is cancelled, it'll probably still return a positive number of bytes read — if it does, we
+ * can return without error. Iff it returns a non-positive number of bytes should we return an error. */
+ g_assert (priv->buffer != NULL);
+ length_read = (gssize) gdata_buffer_pop_data (priv->buffer, buffer, count, &reached_eof, child_cancellable);
+
+ if (length_read < 1 && g_cancellable_set_error_if_cancelled (child_cancellable, &child_error) == TRUE) {
+ /* Handle cancellation */
+ length_read = -1;
+
+ goto done;
+ } else if (SOUP_STATUS_IS_SUCCESSFUL (priv->message->status_code) == FALSE) {
+ GDataServiceClass *klass = GDATA_SERVICE_GET_CLASS (priv->service);
+
+ /* Set an appropriate error */
+ g_assert (klass->parse_error_response != NULL);
+ klass->parse_error_response (priv->service, GDATA_OPERATION_DOWNLOAD, priv->message->status_code, priv->message->reason_phrase,
+ NULL, 0, &child_error);
+ length_read = -1;
+
+ goto done;
+ }
+
+done:
+ /* Disconnect from the cancelled signals. */
+ if (cancelled_signal != 0)
+ g_cancellable_disconnect (cancellable, cancelled_signal);
+ if (global_cancelled_signal != 0)
+ g_cancellable_disconnect (priv->cancellable, global_cancelled_signal);
+
+ g_object_unref (child_cancellable);
+
+ g_assert ((reached_eof == FALSE && length_read > 0 && length_read <= (gssize) count && child_error == NULL) ||
+ (reached_eof == TRUE && length_read >= 0 && length_read <= (gssize) count && child_error == NULL) ||
+ (length_read == -1 && child_error != NULL));
+
+ if (child_error != NULL)
+ g_propagate_error (error, child_error);
+
+ /* Update our internal offset */
+ if (length_read > 0) {
+ priv->offset += length_read;
+ }
+
+ return length_read;
+}
+
+typedef struct {
+ GDataDownloadStream *download_stream;
+ gboolean *cancelled;
+} CancelledData;
+
+static void
+close_cancelled_cb (GCancellable *cancellable, CancelledData *data)
+{
+ GDataDownloadStreamPrivate *priv = data->download_stream->priv;
+
+ g_mutex_lock (&(priv->finished_mutex));
+ *(data->cancelled) = TRUE;
+ g_cond_signal (&(priv->finished_cond));
+ g_mutex_unlock (&(priv->finished_mutex));
+}
+
+/* Even though calling g_input_stream_close() multiple times on this stream is guaranteed to call gdata_download_stream_close() at most once, other
+ * GIO methods (notably g_output_stream_splice()) can call gdata_download_stream_close() directly. Consequently, we need to be careful to be idempotent
+ * after the first call.
+ *
+ * If the network thread hasn't yet been started (i.e. gdata_download_stream_read() hasn't been called at all yet), %TRUE will be returned immediately.
+ *
+ * If the global cancellable, ->cancellable, or @cancellable are cancelled before the call to gdata_download_stream_close(),
+ * gdata_download_stream_close() should return immediately with %G_IO_ERROR_CANCELLED. If they're cancelled during the call,
+ * gdata_download_stream_close() should stop waiting for any outstanding network activity to finish and return %G_IO_ERROR_CANCELLED (though the
+ * operation to finish off network activity and close the stream will still continue).
+ *
+ * If the call to gdata_download_stream_close() is not cancelled by any #GCancellable, it will cancel the ongoing network activity, and wait until
+ * the operation has been cleaned up before returning success. */
+static gboolean
+gdata_download_stream_close (GInputStream *stream, GCancellable *cancellable, GError **error)
+{
+ GDataDownloadStreamPrivate *priv = GDATA_DOWNLOAD_STREAM (stream)->priv;
+ gulong cancelled_signal = 0, global_cancelled_signal = 0;
+ gboolean cancelled = FALSE; /* must only be touched with ->finished_mutex held */
+ gboolean success = TRUE;
+ CancelledData data;
+ GError *child_error = NULL;
+
+ /* If the operation was never started, return successfully immediately */
+ if (priv->network_thread == NULL) {
+ goto done;
+ }
+
+ /* Allow cancellation */
+ data.download_stream = GDATA_DOWNLOAD_STREAM (stream);
+ data.cancelled = &cancelled;
+
+ global_cancelled_signal = g_cancellable_connect (priv->cancellable, (GCallback) close_cancelled_cb, &data, NULL);
+
+ if (cancellable != NULL)
+ cancelled_signal = g_cancellable_connect (cancellable, (GCallback) close_cancelled_cb, &data, NULL);
+
+ g_mutex_lock (&(priv->finished_mutex));
+
+ /* If the operation has started but hasn't already finished, cancel the network thread and wait for it to finish before returning */
+ if (priv->finished == FALSE) {
+ g_cancellable_cancel (priv->network_cancellable);
+
+ /* Allow the close() call to be cancelled by cancelling either @cancellable or ->cancellable. Note that this won't prevent the stream
+ * from continuing to be closed in the background — it'll just stop waiting on the operation to finish being cancelled. */
+ if (cancelled == FALSE) {
+ g_cond_wait (&(priv->finished_cond), &(priv->finished_mutex));
+ }
+ }
+
+ /* Error handling */
+ if (priv->finished == FALSE && cancelled == TRUE) {
+ /* Cancelled? If ->finished is TRUE, the network activity finished before the gdata_download_stream_close() operation was cancelled,
+ * so we don't need to return an error. */
+ g_assert (g_cancellable_set_error_if_cancelled (cancellable, &child_error) == TRUE ||
+ g_cancellable_set_error_if_cancelled (priv->cancellable, &child_error) == TRUE);
+ success = FALSE;
+ }
+
+ g_mutex_unlock (&(priv->finished_mutex));
+
+ /* Disconnect from the signal handlers. Note that we have to do this without @finished_mutex held, as g_cancellable_disconnect() blocks
+ * until any outstanding cancellation callbacks return, and they will block on @finished_mutex. */
+ if (cancelled_signal != 0)
+ g_cancellable_disconnect (cancellable, cancelled_signal);
+ if (global_cancelled_signal != 0)
+ g_cancellable_disconnect (priv->cancellable, global_cancelled_signal);
+
+done:
+ /* If we were successful, tidy up various bits of state */
+ g_mutex_lock (&(priv->finished_mutex));
+
+ if (success == TRUE && priv->finished == TRUE) {
+ reset_network_thread (GDATA_DOWNLOAD_STREAM (stream));
+ }
+
+ g_mutex_unlock (&(priv->finished_mutex));
+
+ g_assert ((success == TRUE && child_error == NULL) || (success == FALSE && child_error != NULL));
+
+ if (child_error != NULL)
+ g_propagate_error (error, child_error);
+
+ return success;
+}
+
+static goffset
+gdata_download_stream_tell (GSeekable *seekable)
+{
+ return GDATA_DOWNLOAD_STREAM (seekable)->priv->offset;
+}
+
+static gboolean
+gdata_download_stream_can_seek (GSeekable *seekable)
+{
+ return TRUE;
+}
+
+static gboolean
+gdata_download_stream_seek (GSeekable *seekable, goffset offset, GSeekType type, GCancellable *cancellable, GError **error)
+{
+ GDataDownloadStreamPrivate *priv = GDATA_DOWNLOAD_STREAM (seekable)->priv;
+ GError *child_error = NULL;
+
+ if (type == G_SEEK_END && priv->content_length == -1) {
+ /* If we don't have the Content-Length, we can't calculate the offset from the start of the stream properly, so just give up.
+ * We could technically use a HEAD request to get the Content-Length, but this hasn't been tried yet (FIXME). */
+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, "G_SEEK_END not currently supported");
+ return FALSE;
+ }
+
+ if (g_input_stream_set_pending (G_INPUT_STREAM (seekable), error) == FALSE) {
+ return FALSE;
+ }
+
+ /* Ensure that offset is relative to the start of the stream. */
+ switch (type) {
+ case G_SEEK_CUR:
+ offset += priv->offset;
+ break;
+ case G_SEEK_SET:
+ /* Nothing needs doing */
+ break;
+ case G_SEEK_END:
+ offset += priv->content_length;
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ /* There are three cases to consider:
+ * 1. The network thread hasn't been started. In this case, we need to set the offset and do nothing. When the network thread is started
+ * (in the next read() call), a Range header will be set on it which will give the correct seek.
+ * 2. The network thread has been started and the seek is to a position greater than our current position (i.e. one which already does, or
+ * will soon, exist in the buffer). In this case, we need to pop the intervening bytes off the buffer (which may block) and update the
+ * offset.
+ * 3. The network thread has been started and the seek is to a position which has already been popped off the buffer. In this case, we need
+ * to set the offset and cancel the network thread. When the network thread is restarted (in the next read() call), a Range header will
+ * be set on it which will give the correct seek.
+ */
+
+ if (priv->network_thread == NULL) {
+ /* Case 1. Set the offset and we're done. */
+ priv->offset = offset;
+
+ goto done;
+ }
+
+ /* Cases 2 and 3. The network thread has already been started. */
+ if (offset >= priv->offset) {
+ goffset num_intervening_bytes;
+ gssize length_read;
+
+ /* Case 2. Pop off the intervening bytes and update the offset. If we can't pop enough bytes off, we throw an error. */
+ num_intervening_bytes = offset - priv->offset;
+ g_assert (priv->buffer != NULL);
+ length_read = (gssize) gdata_buffer_pop_data (priv->buffer, NULL, num_intervening_bytes, NULL, cancellable);
+
+ if (length_read != num_intervening_bytes) {
+ if (g_cancellable_set_error_if_cancelled (cancellable, &child_error) == FALSE) {
+ /* Tried to seek too far */
+ g_set_error_literal (&child_error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT, _("Invalid seek request"));
+ }
+
+ goto done;
+ }
+
+ /* Update the offset */
+ priv->offset = offset;
+
+ goto done;
+ } else {
+ /* Case 3. Cancel the current network thread. Note that we don't allow cancellation of this call, as we depend on it waiting for
+ * the network thread to join. */
+ if (gdata_download_stream_close (G_INPUT_STREAM (seekable), NULL, &child_error) == FALSE) {
+ goto done;
+ }
+
+ /* Update the offset */
+ priv->offset = offset;
+
+ /* Mark the thread as unfinished */
+ g_mutex_lock (&(priv->finished_mutex));
+ priv->finished = FALSE;
+ g_mutex_unlock (&(priv->finished_mutex));
+
+ goto done;
+ }
+
+done:
+ g_input_stream_clear_pending (G_INPUT_STREAM (seekable));
+
+ if (child_error != NULL) {
+ g_propagate_error (error, child_error);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static gboolean
+gdata_download_stream_can_truncate (GSeekable *seekable)
+{
+ return FALSE;
+}
+
+static gboolean
+gdata_download_stream_truncate (GSeekable *seekable, goffset offset, GCancellable *cancellable, GError **error)
+{
+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, "Truncate not allowed on input stream");
+ return FALSE;
+}
+
+static void
+got_headers_cb (SoupMessage *message, GDataDownloadStream *self)
+{
+ goffset end;
+ goffset start;
+ goffset total_length;
+
+ /* Don't get the client's hopes up by setting the Content-Type or -Length if the response
+ * is actually unsuccessful. */
+ if (SOUP_STATUS_IS_SUCCESSFUL (message->status_code) == FALSE)
+ return;
+
+ g_mutex_lock (&(self->priv->content_mutex));
+ self->priv->content_type = g_strdup (soup_message_headers_get_content_type (message->response_headers, NULL));
+ self->priv->content_length = soup_message_headers_get_content_length (message->response_headers);
+ if (soup_message_headers_get_content_range (message->response_headers, &start, &end, &total_length)) {
+ self->priv->content_length = (gssize) total_length;
+ }
+ g_mutex_unlock (&(self->priv->content_mutex));
+
+ /* Emit the notifications for the Content-Length and -Type properties */
+ g_object_freeze_notify (G_OBJECT (self));
+ g_object_notify (G_OBJECT (self), "content-length");
+ g_object_notify (G_OBJECT (self), "content-type");
+ g_object_thaw_notify (G_OBJECT (self));
+}
+
+static void
+got_chunk_cb (SoupMessage *message, SoupBuffer *buffer, GDataDownloadStream *self)
+{
+ /* Ignore the chunk if the response is unsuccessful or it has zero length */
+ if (SOUP_STATUS_IS_SUCCESSFUL (message->status_code) == FALSE || buffer->length == 0)
+ return;
+
+ /* Push the data onto the buffer immediately */
+ g_assert (self->priv->buffer != NULL);
+ gdata_buffer_push_data (self->priv->buffer, (const guint8*) buffer->data, buffer->length);
+}
+
+static gpointer
+download_thread (GDataDownloadStream *self)
+{
+ GDataDownloadStreamPrivate *priv = self->priv;
+ GDataAuthorizer *authorizer;
+
+ g_object_ref (self);
+
+ g_assert (priv->network_cancellable != NULL);
+
+ /* FIXME: Refresh authorization before sending message in order to prevent authorization errors during transfer.
+ * See: https://gitlab.gnome.org/GNOME/libgdata/issues/23 */
+ authorizer = gdata_service_get_authorizer (priv->service);
+ if (authorizer) {
+ g_autoptr(GError) error = NULL;
+
+ gdata_authorizer_refresh_authorization (authorizer, priv->cancellable, &error);
+ if (error != NULL)
+ g_debug ("Error returned when refreshing authorization: %s", error->message);
+ else
+ gdata_authorizer_process_request (authorizer, priv->authorization_domain, priv->message);
+ }
+ /* Connect to the got-headers signal so we can notify clients of the values of content-type and content-length */
+ g_signal_connect (priv->message, "got-headers", (GCallback) got_headers_cb, self);
+ g_signal_connect (priv->message, "got-chunk", (GCallback) got_chunk_cb, self);
+
+ /* Set a Range header if our starting offset is non-zero */
+ if (priv->offset > 0) {
+ soup_message_headers_set_range (priv->message->request_headers, priv->offset, -1);
+ } else {
+ soup_message_headers_remove (priv->message->request_headers, "Range");
+ }
+
+ _gdata_service_actually_send_message (priv->session, priv->message, priv->network_cancellable, NULL);
+
+ /* Mark the buffer as having reached EOF */
+ g_assert (priv->buffer != NULL);
+ gdata_buffer_push_data (priv->buffer, NULL, 0);
+
+ /* Mark the download as finished */
+ g_mutex_lock (&(priv->finished_mutex));
+ priv->finished = TRUE;
+ g_cond_signal (&(priv->finished_cond));
+ g_mutex_unlock (&(priv->finished_mutex));
+
+ g_object_unref (self);
+
+ return NULL;
+}
+
+static void
+create_network_thread (GDataDownloadStream *self, GError **error)
+{
+ GDataDownloadStreamPrivate *priv = self->priv;
+
+ g_assert (priv->buffer == NULL);
+ priv->buffer = gdata_buffer_new ();
+
+ g_assert (priv->network_thread == NULL);
+ priv->network_thread = g_thread_try_new ("download-thread", (GThreadFunc) download_thread, self, error);
+}
+
+static void
+reset_network_thread (GDataDownloadStream *self)
+{
+ GDataDownloadStreamPrivate *priv = self->priv;
+
+ priv->network_thread = NULL;
+
+ if (priv->buffer != NULL) {
+ gdata_buffer_free (priv->buffer);
+ priv->buffer = NULL;
+ }
+
+ if (priv->message != NULL) {
+ soup_session_cancel_message (priv->session, priv->message, SOUP_STATUS_CANCELLED);
+ g_signal_handlers_disconnect_by_func (priv->message, got_headers_cb, self);
+ g_signal_handlers_disconnect_by_func (priv->message, got_chunk_cb, self);
+ }
+
+ priv->offset = 0;
+
+ if (priv->network_cancellable != NULL) {
+ g_cancellable_reset (priv->network_cancellable);
+ }
+}
+
+/**
+ * gdata_download_stream_new:
+ * @service: a #GDataService
+ * @domain: (allow-none): the #GDataAuthorizationDomain to authorize the download, or %NULL
+ * @download_uri: the URI to download; this must be HTTPS
+ * @cancellable: (allow-none): a #GCancellable for the entire download stream, or %NULL
+ *
+ * Creates a new #GDataDownloadStream, allowing a file to be downloaded from a GData service using standard #GInputStream API.
+ *
+ * As well as the standard GIO errors, calls to the #GInputStream API on a #GDataDownloadStream can also return any relevant specific error from
+ * #GDataServiceError, or %GDATA_SERVICE_ERROR_PROTOCOL_ERROR in the general case.
+ *
+ * If a #GCancellable is provided in @cancellable, the download operation may be cancelled at any time from another thread using g_cancellable_cancel().
+ * In this case, any ongoing network activity will be stopped, and any pending or future calls to #GInputStream API on the #GDataDownloadStream will
+ * return %G_IO_ERROR_CANCELLED. Note that the #GCancellable objects which can be passed to individual #GInputStream operations will not cancel the
+ * download operation proper if cancelled — they will merely cancel that API call. The only way to cancel the download operation completely is using
+ * this @cancellable.
+ *
+ * Return value: a new #GInputStream, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.9.0
+ */
+GInputStream *
+gdata_download_stream_new (GDataService *service, GDataAuthorizationDomain *domain, const gchar *download_uri, GCancellable *cancellable)
+{
+ g_return_val_if_fail (GDATA_IS_SERVICE (service), NULL);
+ g_return_val_if_fail (domain == NULL || GDATA_IS_AUTHORIZATION_DOMAIN (domain), NULL);
+ g_return_val_if_fail (download_uri != NULL, NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+
+ return G_INPUT_STREAM (g_object_new (GDATA_TYPE_DOWNLOAD_STREAM,
+ "download-uri", download_uri,
+ "service", service,
+ "authorization-domain", domain,
+ "cancellable", cancellable,
+ NULL));
+}
+
+/**
+ * gdata_download_stream_get_service:
+ * @self: a #GDataDownloadStream
+ *
+ * Gets the service used to authorize the download, as passed to gdata_download_stream_new().
+ *
+ * Return value: (transfer none): the #GDataService used to authorize the download
+ *
+ * Since: 0.5.0
+ */
+GDataService *
+gdata_download_stream_get_service (GDataDownloadStream *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOWNLOAD_STREAM (self), NULL);
+ return self->priv->service;
+}
+
+/**
+ * gdata_download_stream_get_authorization_domain:
+ * @self: a #GDataDownloadStream
+ *
+ * Gets the authorization domain used to authorize the download, as passed to gdata_download_stream_new(). It may be %NULL if authorization is not
+ * needed for the download.
+ *
+ * Return value: (transfer none) (allow-none): the #GDataAuthorizationDomain used to authorize the download, or %NULL
+ *
+ * Since: 0.9.0
+ */
+GDataAuthorizationDomain *
+gdata_download_stream_get_authorization_domain (GDataDownloadStream *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOWNLOAD_STREAM (self), NULL);
+ return self->priv->authorization_domain;
+}
+
+/**
+ * gdata_download_stream_get_download_uri:
+ * @self: a #GDataDownloadStream
+ *
+ * Gets the URI of the file being downloaded, as passed to gdata_download_stream_new().
+ *
+ * Return value: the URI of the file being downloaded
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_download_stream_get_download_uri (GDataDownloadStream *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOWNLOAD_STREAM (self), NULL);
+ return self->priv->download_uri;
+}
+
+/**
+ * gdata_download_stream_get_content_type:
+ * @self: a #GDataDownloadStream
+ *
+ * Gets the content type of the file being downloaded. If the <literal>Content-Type</literal> header has not yet
+ * been received, %NULL will be returned.
+ *
+ * Return value: the content type of the file being downloaded, or %NULL
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_download_stream_get_content_type (GDataDownloadStream *self)
+{
+ const gchar *content_type;
+
+ g_return_val_if_fail (GDATA_IS_DOWNLOAD_STREAM (self), NULL);
+
+ g_mutex_lock (&(self->priv->content_mutex));
+ content_type = self->priv->content_type;
+ g_mutex_unlock (&(self->priv->content_mutex));
+
+ /* It's safe to return this, even though we're not taking a copy of it, as it's immutable once set. */
+ return content_type;
+}
+
+/**
+ * gdata_download_stream_get_content_length:
+ * @self: a #GDataDownloadStream
+ *
+ * Gets the length (in bytes) of the file being downloaded. If the <literal>Content-Length</literal> header has not yet
+ * been received from the server, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the content length of the file being downloaded, or <code class="literal">-1</code>
+ *
+ * Since: 0.5.0
+ */
+gssize
+gdata_download_stream_get_content_length (GDataDownloadStream *self)
+{
+ gssize content_length;
+
+ g_return_val_if_fail (GDATA_IS_DOWNLOAD_STREAM (self), -1);
+
+ g_mutex_lock (&(self->priv->content_mutex));
+ content_length = self->priv->content_length;
+ g_mutex_unlock (&(self->priv->content_mutex));
+
+ g_assert (content_length >= -1);
+
+ return content_length;
+}
+
+/**
+ * gdata_download_stream_get_cancellable:
+ * @self: a #GDataDownloadStream
+ *
+ * Gets the #GCancellable for the entire download operation, #GDataDownloadStream:cancellable.
+ *
+ * Return value: (transfer none): the #GCancellable for the entire download operation
+ *
+ * Since: 0.8.0
+ */
+GCancellable *
+gdata_download_stream_get_cancellable (GDataDownloadStream *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOWNLOAD_STREAM (self), NULL);
+ g_assert (self->priv->cancellable != NULL);
+ return self->priv->cancellable;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_DOWNLOAD_STREAM_H
+#define GDATA_DOWNLOAD_STREAM_H
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gio/gio.h>
+
+#include <gdata/gdata-service.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_DOWNLOAD_STREAM (gdata_download_stream_get_type ())
+#define GDATA_DOWNLOAD_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_DOWNLOAD_STREAM, GDataDownloadStream))
+#define GDATA_DOWNLOAD_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_DOWNLOAD_STREAM, GDataDownloadStreamClass))
+#define GDATA_IS_DOWNLOAD_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_DOWNLOAD_STREAM))
+#define GDATA_IS_DOWNLOAD_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_DOWNLOAD_STREAM))
+#define GDATA_DOWNLOAD_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_DOWNLOAD_STREAM, GDataDownloadStreamClass))
+
+typedef struct _GDataDownloadStreamPrivate GDataDownloadStreamPrivate;
+
+/**
+ * GDataDownloadStream:
+ *
+ * All the fields in the #GDataDownloadStream structure are private and should never be accessed directly.
+ *
+ * Since: 0.5.0
+ */
+typedef struct {
+ GInputStream parent;
+ GDataDownloadStreamPrivate *priv;
+} GDataDownloadStream;
+
+/**
+ * GDataDownloadStreamClass:
+ *
+ * All the fields in the #GDataDownloadStreamClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.5.0
+ */
+typedef struct {
+ /*< private >*/
+ GInputStreamClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+ void (*_g_reserved2) (void);
+ void (*_g_reserved3) (void);
+ void (*_g_reserved4) (void);
+ void (*_g_reserved5) (void);
+} GDataDownloadStreamClass;
+
+GType gdata_download_stream_get_type (void) G_GNUC_CONST;
+
+GInputStream *gdata_download_stream_new (GDataService *service, GDataAuthorizationDomain *domain, const gchar *download_uri,
+ GCancellable *cancellable) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+GDataService *gdata_download_stream_get_service (GDataDownloadStream *self) G_GNUC_PURE;
+GDataAuthorizationDomain *gdata_download_stream_get_authorization_domain (GDataDownloadStream *self) G_GNUC_PURE;
+const gchar *gdata_download_stream_get_download_uri (GDataDownloadStream *self) G_GNUC_PURE;
+const gchar *gdata_download_stream_get_content_type (GDataDownloadStream *self) G_GNUC_PURE;
+gssize gdata_download_stream_get_content_length (GDataDownloadStream *self) G_GNUC_PURE;
+GCancellable *gdata_download_stream_get_cancellable (GDataDownloadStream *self) G_GNUC_PURE;
+
+G_END_DECLS
+
+#endif /* !GDATA_DOWNLOAD_STREAM_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2008–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-entry
+ * @short_description: GData entry object
+ * @stability: Stable
+ * @include: gdata/gdata-entry.h
+ *
+ * #GDataEntry represents a single object on the online service, such as a playlist, video or calendar event. It is a snapshot of the
+ * state of that object at the time of querying the service, so modifications made to a #GDataEntry will not be automatically or
+ * magically propagated to the server.
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <libxml/parser.h>
+#include <string.h>
+#include <json-glib/json-glib.h>
+
+#include "gdata-entry.h"
+#include "gdata-types.h"
+#include "gdata-service.h"
+#include "gdata-private.h"
+#include "gdata-comparable.h"
+#include "atom/gdata-category.h"
+#include "atom/gdata-link.h"
+#include "atom/gdata-author.h"
+
+static void gdata_entry_constructed (GObject *object);
+static void gdata_entry_dispose (GObject *object);
+static void gdata_entry_finalize (GObject *object);
+static void gdata_entry_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_entry_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error);
+static gboolean post_parse_xml (GDataParsable *parsable, gpointer user_data, GError **error);
+static void pre_get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+static gchar *get_entry_uri (const gchar *id) G_GNUC_WARN_UNUSED_RESULT;
+static gboolean parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error);
+static void get_json (GDataParsable *parsable, JsonBuilder *builder);
+
+struct _GDataEntryPrivate {
+ gchar *title;
+ gchar *summary;
+ gchar *id;
+ gchar *etag;
+ gint64 updated;
+ gint64 published;
+ GList *categories; /* GDataCategory */
+ gchar *content;
+ gboolean content_is_uri;
+ GList *links; /* GDataLink */
+ GList *authors; /* GDataAuthor */
+ gchar *rights;
+
+ /* Batch processing data */
+ GDataBatchOperationType batch_operation_type;
+ guint batch_id;
+};
+
+enum {
+ PROP_TITLE = 1,
+ PROP_SUMMARY,
+ PROP_ETAG,
+ PROP_ID,
+ PROP_UPDATED,
+ PROP_PUBLISHED,
+ PROP_CONTENT,
+ PROP_IS_INSERTED,
+ PROP_RIGHTS,
+ PROP_CONTENT_URI
+};
+
+G_DEFINE_TYPE (GDataEntry, gdata_entry, GDATA_TYPE_PARSABLE)
+
+static void
+gdata_entry_class_init (GDataEntryClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataEntryPrivate));
+
+ gobject_class->constructed = gdata_entry_constructed;
+ gobject_class->get_property = gdata_entry_get_property;
+ gobject_class->set_property = gdata_entry_set_property;
+ gobject_class->dispose = gdata_entry_dispose;
+ gobject_class->finalize = gdata_entry_finalize;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ parsable_class->parse_xml = parse_xml;
+ parsable_class->post_parse_xml = post_parse_xml;
+ parsable_class->pre_get_xml = pre_get_xml;
+ parsable_class->get_xml = get_xml;
+ parsable_class->get_namespaces = get_namespaces;
+ parsable_class->element_name = "entry";
+
+ parsable_class->parse_json = parse_json;
+ parsable_class->get_json = get_json;
+
+ klass->get_entry_uri = get_entry_uri;
+
+ /**
+ * GDataEntry:title:
+ *
+ * A human-readable title for the entry.
+ *
+ * For more information, see the <ulink type="http"
+ * url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.title">Atom specification</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_TITLE,
+ g_param_spec_string ("title",
+ "Title", "A human-readable title for the entry.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataEntry:summary:
+ *
+ * A short summary, abstract, or excerpt of the entry.
+ *
+ * For more information, see the <ulink type="http"
+ * url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.summary">Atom specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SUMMARY,
+ g_param_spec_string ("summary",
+ "Summary", "A short summary, abstract, or excerpt of the entry.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataEntry:id:
+ *
+ * A permanent, universally unique identifier for the entry, in IRI form. This is %NULL for new entries (i.e. ones which haven't yet been
+ * inserted on the server, created with gdata_entry_new()), and a non-empty IRI string for all other entries.
+ *
+ * For more information, see the <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.id">
+ * Atom specification</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_ID,
+ g_param_spec_string ("id",
+ "ID", "A permanent, universally unique identifier for the entry, in IRI form.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataEntry:etag:
+ *
+ * An identifier for a particular version of the entry. This changes every time the entry on the server changes, and can be used
+ * for conditional retrieval and locking.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/reference.html#ResourceVersioning">
+ * GData specification</ulink>.
+ *
+ * Since: 0.2.0
+ */
+ g_object_class_install_property (gobject_class, PROP_ETAG,
+ g_param_spec_string ("etag",
+ "ETag", "An identifier for a particular version of the entry.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataEntry:updated:
+ *
+ * The date and time when the entry was most recently updated significantly.
+ *
+ * For more information, see the <ulink type="http"
+ * url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.updated">Atom specification</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_UPDATED,
+ g_param_spec_int64 ("updated",
+ "Updated", "The date and time when the entry was most recently updated significantly.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataEntry:published:
+ *
+ * The date and time the entry was first published or made available.
+ *
+ * For more information, see the <ulink type="http"
+ * url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.published">Atom specification</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_PUBLISHED,
+ g_param_spec_int64 ("published",
+ "Published", "The date and time the entry was first published or made available.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataEntry:content:
+ *
+ * The content of the entry. This is mutually exclusive with #GDataEntry:content.
+ *
+ * For more information, see the <ulink type="http"
+ * url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.content">Atom specification</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_CONTENT,
+ g_param_spec_string ("content",
+ "Content", "The content of the entry.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataEntry:content-uri:
+ *
+ * A URI pointing to the location of the content of the entry. This is mutually exclusive with #GDataEntry:content.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.content">Atom specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_CONTENT_URI,
+ g_param_spec_string ("content-uri",
+ "Content URI", "A URI pointing to the location of the content of the entry.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataEntry:is-inserted:
+ *
+ * Whether the entry has been inserted on the server. This is %FALSE for entries which have just been created using gdata_entry_new() and
+ * %TRUE for entries returned from the server by queries. It is set to %TRUE when an entry is inserted using gdata_service_insert_entry().
+ */
+ g_object_class_install_property (gobject_class, PROP_IS_INSERTED,
+ g_param_spec_boolean ("is-inserted",
+ "Inserted?", "Whether the entry has been inserted on the server.",
+ FALSE,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataEntry:rights:
+ *
+ * The ownership rights pertaining to the entry.
+ *
+ * For more information, see the <ulink type="http"
+ * url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.rights">Atom specification</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_RIGHTS,
+ g_param_spec_string ("rights",
+ "Rights", "The ownership rights pertaining to the entry.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_entry_init (GDataEntry *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_ENTRY, GDataEntryPrivate);
+ self->priv->updated = -1;
+ self->priv->published = -1;
+}
+
+static void
+gdata_entry_constructed (GObject *object)
+{
+ GDataEntryClass *klass = GDATA_ENTRY_GET_CLASS (object);
+ GObjectClass *parent_class = G_OBJECT_CLASS (gdata_entry_parent_class);
+
+ /* This can't be done in *_init() because the class properties haven't been properly set then */
+ if (klass->kind_term != NULL) {
+ /* Ensure we have the correct category/kind */
+ GDataCategory *category = gdata_category_new (klass->kind_term, "http://schemas.google.com/g/2005#kind", NULL);
+ gdata_entry_add_category (GDATA_ENTRY (object), category);
+ g_object_unref (category);
+ }
+
+ /* Chain up to the parent class */
+ if (parent_class->constructed != NULL)
+ parent_class->constructed (object);
+}
+
+static void
+gdata_entry_dispose (GObject *object)
+{
+ GDataEntryPrivate *priv = GDATA_ENTRY (object)->priv;
+
+ g_list_free_full (priv->categories, g_object_unref);
+ priv->categories = NULL;
+
+ g_list_free_full (priv->links, g_object_unref);
+ priv->links = NULL;
+
+ g_list_free_full (priv->authors, g_object_unref);
+ priv->authors = NULL;
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_entry_parent_class)->dispose (object);
+}
+
+static void
+gdata_entry_finalize (GObject *object)
+{
+ GDataEntryPrivate *priv = GDATA_ENTRY (object)->priv;
+
+ g_free (priv->title);
+ g_free (priv->summary);
+ g_free (priv->id);
+ g_free (priv->etag);
+ g_free (priv->rights);
+ g_free (priv->content);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_entry_parent_class)->finalize (object);
+}
+
+static void
+gdata_entry_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataEntryPrivate *priv = GDATA_ENTRY (object)->priv;
+
+ switch (property_id) {
+ case PROP_TITLE:
+ g_value_set_string (value, priv->title);
+ break;
+ case PROP_SUMMARY:
+ g_value_set_string (value, priv->summary);
+ break;
+ case PROP_ID:
+ g_value_set_string (value, priv->id);
+ break;
+ case PROP_ETAG:
+ g_value_set_string (value, priv->etag);
+ break;
+ case PROP_UPDATED:
+ g_value_set_int64 (value, priv->updated);
+ break;
+ case PROP_PUBLISHED:
+ g_value_set_int64 (value, priv->published);
+ break;
+ case PROP_CONTENT:
+ g_value_set_string (value, (priv->content_is_uri == FALSE) ? priv->content : NULL);
+ break;
+ case PROP_CONTENT_URI:
+ g_value_set_string (value, (priv->content_is_uri == TRUE) ? priv->content : NULL);
+ break;
+ case PROP_IS_INSERTED:
+ g_value_set_boolean (value, gdata_entry_is_inserted (GDATA_ENTRY (object)));
+ break;
+ case PROP_RIGHTS:
+ g_value_set_string (value, priv->rights);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_entry_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataEntry *self = GDATA_ENTRY (object);
+
+ switch (property_id) {
+ case PROP_ID:
+ /* Construct only */
+ self->priv->id = g_value_dup_string (value);
+ break;
+ case PROP_ETAG:
+ /* Construct only */
+ self->priv->etag = g_value_dup_string (value);
+ break;
+ case PROP_TITLE:
+ gdata_entry_set_title (self, g_value_get_string (value));
+ break;
+ case PROP_SUMMARY:
+ gdata_entry_set_summary (self, g_value_get_string (value));
+ break;
+ case PROP_CONTENT:
+ gdata_entry_set_content (self, g_value_get_string (value));
+ break;
+ case PROP_CONTENT_URI:
+ gdata_entry_set_content_uri (self, g_value_get_string (value));
+ break;
+ case PROP_RIGHTS:
+ gdata_entry_set_rights (self, g_value_get_string (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ /* Extract the ETag */
+ GDATA_ENTRY (parsable)->priv->etag = (gchar*) xmlGetProp (root_node, (xmlChar*) "etag");
+
+ return TRUE;
+}
+
+static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ gboolean success;
+ GDataEntryPrivate *priv = GDATA_ENTRY (parsable)->priv;
+
+ if (gdata_parser_is_namespace (node, "http://www.w3.org/2005/Atom") == TRUE) {
+ if (gdata_parser_string_from_element (node, "title", P_DEFAULT | P_NO_DUPES, &(priv->title), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "id", P_REQUIRED | P_NON_EMPTY | P_NO_DUPES, &(priv->id), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "summary", P_NONE, &(priv->summary), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "rights", P_NONE, &(priv->rights), &success, error) == TRUE ||
+ gdata_parser_int64_time_from_element (node, "updated", P_REQUIRED | P_NO_DUPES, &(priv->updated), &success, error) == TRUE ||
+ gdata_parser_int64_time_from_element (node, "published", P_REQUIRED | P_NO_DUPES, &(priv->published), &success, error) == TRUE ||
+ gdata_parser_object_from_element_setter (node, "category", P_REQUIRED, GDATA_TYPE_CATEGORY,
+ gdata_entry_add_category, parsable, &success, error) == TRUE ||
+ gdata_parser_object_from_element_setter (node, "link", P_REQUIRED, GDATA_TYPE_LINK,
+ gdata_entry_add_link, parsable, &success, error) == TRUE ||
+ gdata_parser_object_from_element_setter (node, "author", P_REQUIRED, GDATA_TYPE_AUTHOR,
+ gdata_entry_add_author, parsable, &success, error) == TRUE) {
+ return success;
+ } else if (xmlStrcmp (node->name, (xmlChar*) "content") == 0) {
+ /* atom:content */
+ priv->content = (gchar*) xmlGetProp (node, (xmlChar*) "src");
+ priv->content_is_uri = TRUE;
+
+ if (priv->content == NULL) {
+ priv->content = (gchar*) xmlNodeListGetString (doc, node->children, TRUE);
+ priv->content_is_uri = FALSE;
+ }
+
+ return TRUE;
+ }
+ } else if (gdata_parser_is_namespace (node, "http://schemas.google.com/gdata/batch") == TRUE) {
+ if (xmlStrcmp (node->name, (xmlChar*) "id") == 0 ||
+ xmlStrcmp (node->name, (xmlChar*) "status") == 0 ||
+ xmlStrcmp (node->name, (xmlChar*) "operation") == 0) {
+ /* Ignore batch operation elements; they're handled in GDataBatchFeed */
+ return TRUE;
+ }
+ }
+
+ return GDATA_PARSABLE_CLASS (gdata_entry_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+}
+
+static gboolean
+post_parse_xml (GDataParsable *parsable, gpointer user_data, GError **error)
+{
+ GDataEntryPrivate *priv = GDATA_ENTRY (parsable)->priv;
+
+ /* Check for missing required elements */
+ /* Can't uncomment it, as things like access rules break the Atom standard */
+ /*if (priv->title == NULL)
+ return gdata_parser_error_required_element_missing ("title", "entry", error);
+ if (priv->id == NULL)
+ return gdata_parser_error_required_element_missing ("id", "entry", error);
+ if (priv->updated.tv_sec == 0 && priv->updated.tv_usec == 0)
+ return gdata_parser_error_required_element_missing ("updated", "entry", error);*/
+
+ /* Reverse our lists of stuff */
+ priv->categories = g_list_reverse (priv->categories);
+ priv->links = g_list_reverse (priv->links);
+ priv->authors = g_list_reverse (priv->authors);
+
+ return TRUE;
+}
+
+static void
+pre_get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataEntryPrivate *priv = GDATA_ENTRY (parsable)->priv;
+
+ /* Add the entry's ETag, if available */
+ if (gdata_entry_get_etag (GDATA_ENTRY (parsable)) != NULL)
+ gdata_parser_string_append_escaped (xml_string, " gd:etag='", priv->etag, "'");
+}
+
+static void
+get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataEntryPrivate *priv = GDATA_ENTRY (parsable)->priv;
+ GList *categories, *links, *authors;
+
+ gdata_parser_string_append_escaped (xml_string, "<title type='text'>", priv->title, "</title>");
+
+ if (priv->id != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<id>", priv->id, "</id>");
+
+ if (priv->updated != -1) {
+ gchar *updated = gdata_parser_int64_to_iso8601 (priv->updated);
+ g_string_append_printf (xml_string, "<updated>%s</updated>", updated);
+ g_free (updated);
+ }
+
+ if (priv->published != -1) {
+ gchar *published = gdata_parser_int64_to_iso8601 (priv->published);
+ g_string_append_printf (xml_string, "<published>%s</published>", published);
+ g_free (published);
+ }
+
+ if (priv->summary != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<summary type='text'>", priv->summary, "</summary>");
+
+ if (priv->rights != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<rights>", priv->rights, "</rights>");
+
+ if (priv->content != NULL) {
+ if (priv->content_is_uri == TRUE)
+ gdata_parser_string_append_escaped (xml_string, "<content type='text/plain' src='", priv->content, "'/>");
+ else
+ gdata_parser_string_append_escaped (xml_string, "<content type='text'>", priv->content, "</content>");
+ }
+
+ for (categories = priv->categories; categories != NULL; categories = categories->next)
+ _gdata_parsable_get_xml (GDATA_PARSABLE (categories->data), xml_string, FALSE);
+
+ for (links = priv->links; links != NULL; links = links->next)
+ _gdata_parsable_get_xml (GDATA_PARSABLE (links->data), xml_string, FALSE);
+
+ for (authors = priv->authors; authors != NULL; authors = authors->next)
+ _gdata_parsable_get_xml (GDATA_PARSABLE (authors->data), xml_string, FALSE);
+
+ /* Batch operation data */
+ if (priv->batch_id != 0) {
+ const gchar *batch_op;
+
+ switch (priv->batch_operation_type) {
+ case GDATA_BATCH_OPERATION_QUERY:
+ batch_op = "query";
+ break;
+ case GDATA_BATCH_OPERATION_INSERTION:
+ batch_op = "insert";
+ break;
+ case GDATA_BATCH_OPERATION_UPDATE:
+ batch_op = "update";
+ break;
+ case GDATA_BATCH_OPERATION_DELETION:
+ batch_op = "delete";
+ break;
+ default:
+ g_assert_not_reached ();
+ break;
+ }
+
+ g_string_append_printf (xml_string, "<batch:id>%u</batch:id><batch:operation type='%s'/>", priv->batch_id, batch_op);
+ }
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ g_hash_table_insert (namespaces, (gchar*) "gd", (gchar*) "http://schemas.google.com/g/2005");
+
+ if (GDATA_ENTRY (parsable)->priv->batch_id != 0)
+ g_hash_table_insert (namespaces, (gchar*) "batch", (gchar*) "http://schemas.google.com/gdata/batch");
+}
+
+static gchar *
+get_entry_uri (const gchar *id)
+{
+ /* We assume the entry ID is also its entry URI; subclasses can override this
+ * if the service they implement has a convoluted API */
+ return g_strdup (id);
+}
+
+static gboolean
+parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error)
+{
+ gboolean success;
+ GDataEntryPrivate *priv = GDATA_ENTRY (parsable)->priv;
+
+ if (gdata_parser_string_from_json_member (reader, "title", P_DEFAULT | P_NO_DUPES, &(priv->title), &success, error) == TRUE ||
+ gdata_parser_string_from_json_member (reader, "id", P_NON_EMPTY | P_NO_DUPES, &(priv->id), &success, error) == TRUE ||
+ gdata_parser_string_from_json_member (reader, "description", P_NONE, &(priv->summary), &success, error) == TRUE ||
+ gdata_parser_int64_time_from_json_member (reader, "updated", P_REQUIRED | P_NO_DUPES, &(priv->updated), &success, error) == TRUE ||
+ gdata_parser_string_from_json_member (reader, "etag", P_NON_EMPTY | P_NO_DUPES, &(priv->etag), &success, error) == TRUE) {
+ return success;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "selfLink") == 0) {
+ GDataLink *_link;
+ const gchar *uri;
+
+ /* Empty URI? */
+ uri = json_reader_get_string_value (reader);
+ if (uri == NULL || *uri == '\0') {
+ return gdata_parser_error_required_json_content_missing (reader, error);
+ }
+
+ _link = gdata_link_new (uri, GDATA_LINK_SELF);
+ gdata_entry_add_link (GDATA_ENTRY (parsable), _link);
+ g_object_unref (_link);
+
+ return TRUE;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "kind") == 0) {
+ GDataCategory *category;
+ const gchar *kind;
+
+ /* Empty kind? */
+ kind = json_reader_get_string_value (reader);
+ if (kind == NULL || *kind == '\0') {
+ return gdata_parser_error_required_json_content_missing (reader, error);
+ }
+
+ category = gdata_category_new (kind, "http://schemas.google.com/g/2005#kind", NULL);
+ gdata_entry_add_category (GDATA_ENTRY (parsable), category);
+ g_object_unref (category);
+
+ return TRUE;
+ }
+
+ return GDATA_PARSABLE_CLASS (gdata_entry_parent_class)->parse_json (parsable, reader, user_data, error);
+}
+
+static void
+get_json (GDataParsable *parsable, JsonBuilder *builder)
+{
+ GDataEntryPrivate *priv = GDATA_ENTRY (parsable)->priv;
+ GList *i;
+ GDataLink *_link;
+
+ json_builder_set_member_name (builder, "title");
+ json_builder_add_string_value (builder, priv->title);
+
+ if (priv->id != NULL) {
+ json_builder_set_member_name (builder, "id");
+ json_builder_add_string_value (builder, priv->id);
+ }
+
+ if (priv->summary != NULL) {
+ json_builder_set_member_name (builder, "description");
+ json_builder_add_string_value (builder, priv->summary);
+ }
+
+ if (priv->updated != -1) {
+ gchar *updated = gdata_parser_int64_to_iso8601 (priv->updated);
+ json_builder_set_member_name (builder, "updated");
+ json_builder_add_string_value (builder, updated);
+ g_free (updated);
+ }
+
+ /* If we have a "kind" category, add that. */
+ for (i = priv->categories; i != NULL; i = i->next) {
+ GDataCategory *category = GDATA_CATEGORY (i->data);
+
+ if (g_strcmp0 (gdata_category_get_scheme (category), "http://schemas.google.com/g/2005#kind") == 0) {
+ json_builder_set_member_name (builder, "kind");
+ json_builder_add_string_value (builder, gdata_category_get_term (category));
+ }
+ }
+
+ /* Add the ETag, if available. */
+ if (gdata_entry_get_etag (GDATA_ENTRY (parsable)) != NULL) {
+ json_builder_set_member_name (builder, "etag");
+ json_builder_add_string_value (builder, priv->etag);
+ }
+
+ /* Add the self-link. */
+ _link = gdata_entry_look_up_link (GDATA_ENTRY (parsable), GDATA_LINK_SELF);
+ if (_link != NULL) {
+ json_builder_set_member_name (builder, "selfLink");
+ json_builder_add_string_value (builder, gdata_link_get_uri (_link));
+ }
+}
+
+/**
+ * gdata_entry_new:
+ * @id: (allow-none): the entry's ID, or %NULL
+ *
+ * Creates a new #GDataEntry with the given ID and default properties.
+ *
+ * Return value: a new #GDataEntry; unref with g_object_unref()
+ */
+GDataEntry *
+gdata_entry_new (const gchar *id)
+{
+ GDataEntry *entry = GDATA_ENTRY (g_object_new (GDATA_TYPE_ENTRY, "id", id, NULL));
+
+ /* Set this here, as it interferes with P_NO_DUPES when parsing */
+ entry->priv->title = g_strdup (""); /* title can't be NULL */
+
+ return entry;
+}
+
+/**
+ * gdata_entry_get_title:
+ * @self: a #GDataEntry
+ *
+ * Returns the title of the entry. This will never be %NULL, but may be an empty string.
+ *
+ * Return value: the entry's title
+ */
+const gchar *
+gdata_entry_get_title (GDataEntry *self)
+{
+ g_return_val_if_fail (GDATA_IS_ENTRY (self), NULL);
+ return self->priv->title;
+}
+
+/**
+ * gdata_entry_set_title:
+ * @self: a #GDataEntry
+ * @title: (allow-none): the new entry title, or %NULL
+ *
+ * Sets the title of the entry.
+ */
+void
+gdata_entry_set_title (GDataEntry *self, const gchar *title)
+{
+ g_return_if_fail (GDATA_IS_ENTRY (self));
+
+ g_free (self->priv->title);
+ self->priv->title = g_strdup (title);
+ g_object_notify (G_OBJECT (self), "title");
+}
+
+/**
+ * gdata_entry_get_summary:
+ * @self: a #GDataEntry
+ *
+ * Returns the summary of the entry.
+ *
+ * Return value: the entry's summary, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_entry_get_summary (GDataEntry *self)
+{
+ g_return_val_if_fail (GDATA_IS_ENTRY (self), NULL);
+ return self->priv->summary;
+}
+
+/**
+ * gdata_entry_set_summary:
+ * @self: a #GDataEntry
+ * @summary: (allow-none): the new entry summary, or %NULL
+ *
+ * Sets the summary of the entry.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_entry_set_summary (GDataEntry *self, const gchar *summary)
+{
+ g_return_if_fail (GDATA_IS_ENTRY (self));
+
+ g_free (self->priv->summary);
+ self->priv->summary = g_strdup (summary);
+ g_object_notify (G_OBJECT (self), "summary");
+}
+
+/**
+ * gdata_entry_get_id:
+ * @self: a #GDataEntry
+ *
+ * Returns the URN ID of the entry; a unique and permanent identifier for the object the entry represents.
+ *
+ * The ID may be %NULL if and only if the #GDataEntry has been newly created, and hasn't yet been inserted on the server.
+ *
+ * Return value: (nullable): the entry's ID, or %NULL
+ */
+const gchar *
+gdata_entry_get_id (GDataEntry *self)
+{
+ gchar *id;
+
+ g_return_val_if_fail (GDATA_IS_ENTRY (self), NULL);
+
+ /* We have to get the actual property since GDataDocumentsEntry overrides it. We then store it in our own ID field so that we can
+ * free it later on. */
+ g_object_get (G_OBJECT (self), "id", &id, NULL);
+ if (g_strcmp0 (id, self->priv->id) != 0) {
+ g_free (self->priv->id);
+ self->priv->id = id;
+ } else {
+ g_free (id);
+ }
+
+ return self->priv->id;
+}
+
+/**
+ * gdata_entry_get_etag:
+ * @self: a #GDataEntry
+ *
+ * Returns the ETag of the entry; a unique identifier for each version of the entry. For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/reference.html#ResourceVersioning">online documentation</ulink>.
+ *
+ * The ETag will never be empty; it's either %NULL or a valid ETag.
+ *
+ * Return value: (nullable): the entry's ETag, or %NULL
+ *
+ * Since: 0.2.0
+ */
+const gchar *
+gdata_entry_get_etag (GDataEntry *self)
+{
+ gchar *etag;
+
+ g_return_val_if_fail (GDATA_IS_ENTRY (self), NULL);
+
+ /* We have to check if the property's set since GDataAccessRule overrides it and sets it to always be NULL (since ACL entries don't support
+ * ETags, for some reason). */
+ g_object_get (G_OBJECT (self), "etag", &etag, NULL);
+ if (etag != NULL) {
+ g_free (etag);
+ return self->priv->etag;
+ }
+
+ return NULL;
+}
+
+/*
+ * _gdata_entry_set_etag:
+ * @self: a #GDataEntry
+ * @etag: the new ETag value
+ *
+ * Sets the value of the #GDataEntry:etag property to @etag.
+ *
+ * Since: 0.17.2
+ */
+void
+_gdata_entry_set_etag (GDataEntry *self, const gchar *etag)
+{
+ g_return_if_fail (GDATA_IS_ENTRY (self));
+
+ g_free (self->priv->etag);
+ self->priv->etag = g_strdup (etag);
+}
+
+/**
+ * gdata_entry_get_updated:
+ * @self: a #GDataEntry
+ *
+ * Gets the time the entry was last updated.
+ *
+ * Return value: the UNIX timestamp for the last update of the entry
+ */
+gint64
+gdata_entry_get_updated (GDataEntry *self)
+{
+ g_return_val_if_fail (GDATA_IS_ENTRY (self), -1);
+ return self->priv->updated;
+}
+
+/*
+ * _gdata_entry_set_updated:
+ * @self: a #GDataEntry
+ * @updated: the new updated value
+ *
+ * Sets the value of the #GDataEntry:updated property to @updated.
+ *
+ * Since: 0.6.0
+ */
+void
+_gdata_entry_set_updated (GDataEntry *self, gint64 updated)
+{
+ g_return_if_fail (GDATA_IS_ENTRY (self));
+ self->priv->updated = updated;
+}
+
+/*
+ * _gdata_entry_set_published:
+ * @self: a #GDataEntry
+ * @updated: the new published value
+ *
+ * Sets the value of the #GDataEntry:published property to @published.
+ *
+ * Since: 0.17.0
+ */
+void
+_gdata_entry_set_published (GDataEntry *self, gint64 published)
+{
+ g_return_if_fail (GDATA_IS_ENTRY (self));
+ self->priv->published = published;
+}
+
+/*
+ * _gdata_entry_set_id:
+ * @self: a #GDataEntry
+ * @id: (nullable): the new ID
+ *
+ * Sets the value of the #GDataEntry:id property to @id.
+ *
+ * Since: 0.17.0
+ */
+void
+_gdata_entry_set_id (GDataEntry *self, const gchar *id)
+{
+ g_return_if_fail (GDATA_IS_ENTRY (self));
+
+ g_free (self->priv->id);
+ self->priv->id = g_strdup (id);
+}
+
+/**
+ * gdata_entry_get_published:
+ * @self: a #GDataEntry
+ *
+ * Gets the time the entry was originally published.
+ *
+ * Return value: the UNIX timestamp for the original publish time of the entry
+ */
+gint64
+gdata_entry_get_published (GDataEntry *self)
+{
+ g_return_val_if_fail (GDATA_IS_ENTRY (self), -1);
+ return self->priv->published;
+}
+
+/**
+ * gdata_entry_add_category:
+ * @self: a #GDataEntry
+ * @category: a #GDataCategory to add
+ *
+ * Adds @category to the list of categories in the given #GDataEntry, and increments its reference count.
+ *
+ * Duplicate categories will not be added to the list.
+ */
+void
+gdata_entry_add_category (GDataEntry *self, GDataCategory *category)
+{
+ g_return_if_fail (GDATA_IS_ENTRY (self));
+ g_return_if_fail (GDATA_IS_CATEGORY (category));
+
+ /* Check to see if it's a kind category and if it matches the entry's predetermined kind */
+ if (g_strcmp0 (gdata_category_get_scheme (category), "http://schemas.google.com/g/2005#kind") == 0) {
+ GDataEntryClass *klass = GDATA_ENTRY_GET_CLASS (self);
+ GList *element;
+
+ if (klass->kind_term != NULL && g_strcmp0 (gdata_category_get_term (category), klass->kind_term) != 0) {
+ /* This used to make sense as a warning, but the new
+ * JSON APIs use a lot of different kinds for very
+ * highly related JSON schemas, which libgdata uses a
+ * single class for…so it makes less sense now. */
+ g_debug ("Adding a kind category term, '%s', to an entry of kind '%s'.",
+ gdata_category_get_term (category), klass->kind_term);
+ }
+
+ /* If it is a kind category, remove the entry’s existing kind category to allow the new one
+ * to be added. This is necessary because the existing category was set in
+ * gdata_entry_constructed() and might not contain all the attributes of the actual XML
+ * category.
+ *
+ * See: https://bugzilla.gnome.org/show_bug.cgi?id=707477 */
+ element = g_list_find_custom (self->priv->categories, category, (GCompareFunc) gdata_comparable_compare);
+ if (element != NULL) {
+ g_assert (GDATA_IS_CATEGORY (element->data));
+ g_object_unref (element->data);
+ self->priv->categories = g_list_delete_link (self->priv->categories, element);
+ }
+ }
+
+ /* Add the category if we don't already have it */
+ if (g_list_find_custom (self->priv->categories, category, (GCompareFunc) gdata_comparable_compare) == NULL)
+ self->priv->categories = g_list_prepend (self->priv->categories, g_object_ref (category));
+}
+
+/**
+ * gdata_entry_get_categories:
+ * @self: a #GDataEntry
+ *
+ * Gets a list of the #GDataCategorys containing this entry.
+ *
+ * Return value: (element-type GData.Category) (transfer none): a #GList of #GDataCategorys
+ *
+ * Since: 0.2.0
+ */
+GList *
+gdata_entry_get_categories (GDataEntry *self)
+{
+ g_return_val_if_fail (GDATA_IS_ENTRY (self), NULL);
+ return self->priv->categories;
+}
+
+/**
+ * gdata_entry_get_authors:
+ * @self: a #GDataEntry
+ *
+ * Gets a list of the #GDataAuthors for this entry.
+ *
+ * Return value: (element-type GData.Author) (transfer none): a #GList of #GDataAuthors
+ *
+ * Since: 0.7.0
+ */
+GList *
+gdata_entry_get_authors (GDataEntry *self)
+{
+ g_return_val_if_fail (GDATA_IS_ENTRY (self), NULL);
+ return self->priv->authors;
+}
+
+/**
+ * gdata_entry_get_content:
+ * @self: a #GDataEntry
+ *
+ * Returns the textual content in this entry. If the content in this entry is pointed to by a URI, %NULL will be returned; the content URI will be
+ * returned by gdata_entry_get_content_uri().
+ *
+ * Return value: the entry's content, or %NULL
+ */
+const gchar *
+gdata_entry_get_content (GDataEntry *self)
+{
+ g_return_val_if_fail (GDATA_IS_ENTRY (self), NULL);
+ return (self->priv->content_is_uri == FALSE) ? self->priv->content : NULL;
+}
+
+/**
+ * gdata_entry_set_content:
+ * @self: a #GDataEntry
+ * @content: (allow-none): the new content for the entry, or %NULL
+ *
+ * Sets the entry's content to @content. This unsets #GDataEntry:content-uri.
+ */
+void
+gdata_entry_set_content (GDataEntry *self, const gchar *content)
+{
+ g_return_if_fail (GDATA_IS_ENTRY (self));
+
+ g_free (self->priv->content);
+ self->priv->content = g_strdup (content);
+ self->priv->content_is_uri = FALSE;
+
+ g_object_freeze_notify (G_OBJECT (self));
+ g_object_notify (G_OBJECT (self), "content");
+ g_object_notify (G_OBJECT (self), "content-uri");
+ g_object_thaw_notify (G_OBJECT (self));
+}
+
+/**
+ * gdata_entry_get_content_uri:
+ * @self: a #GDataEntry
+ *
+ * Returns a URI pointing to the content of this entry. If the content in this entry is stored directly, %NULL will be returned; the content will be
+ * returned by gdata_entry_get_content().
+ *
+ * Return value: a URI pointing to the entry's content, or %NULL
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_entry_get_content_uri (GDataEntry *self)
+{
+ g_return_val_if_fail (GDATA_IS_ENTRY (self), NULL);
+ return (self->priv->content_is_uri == TRUE) ? self->priv->content : NULL;
+}
+
+/**
+ * gdata_entry_set_content_uri:
+ * @self: a #GDataEntry
+ * @content_uri: (allow-none): the new URI pointing to the content for the entry, or %NULL
+ *
+ * Sets the URI pointing to the entry's content to @content. This unsets #GDataEntry:content.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_entry_set_content_uri (GDataEntry *self, const gchar *content_uri)
+{
+ g_return_if_fail (GDATA_IS_ENTRY (self));
+
+ g_free (self->priv->content);
+ self->priv->content = g_strdup (content_uri);
+ self->priv->content_is_uri = TRUE;
+
+ g_object_freeze_notify (G_OBJECT (self));
+ g_object_notify (G_OBJECT (self), "content");
+ g_object_notify (G_OBJECT (self), "content-uri");
+ g_object_thaw_notify (G_OBJECT (self));
+}
+
+/**
+ * gdata_entry_add_link:
+ * @self: a #GDataEntry
+ * @_link: a #GDataLink to add
+ *
+ * Adds @_link to the list of links in the given #GDataEntry and increments its reference count.
+ *
+ * Duplicate links will not be added to the list.
+ */
+void
+gdata_entry_add_link (GDataEntry *self, GDataLink *_link)
+{
+ /* TODO: More link API */
+ g_return_if_fail (GDATA_IS_ENTRY (self));
+ g_return_if_fail (GDATA_IS_LINK (_link));
+
+ if (g_list_find_custom (self->priv->links, _link, (GCompareFunc) gdata_comparable_compare) == NULL)
+ self->priv->links = g_list_prepend (self->priv->links, g_object_ref (_link));
+}
+
+/**
+ * gdata_entry_remove_link:
+ * @self: a #GDataEntry
+ * @_link: a #GDataLink to remove
+ *
+ * Removes @_link from the list of links in the given #GDataEntry and decrements its reference count (since the #GDataEntry held a reference to it
+ * while it was in the list).
+ *
+ * Return value: %TRUE if @_link was found in the #GDataEntry and removed, %FALSE if it was not found
+ *
+ * Since: 0.10.0
+ */
+gboolean
+gdata_entry_remove_link (GDataEntry *self, GDataLink *_link)
+{
+ GList *i;
+
+ g_return_val_if_fail (GDATA_IS_ENTRY (self), FALSE);
+ g_return_val_if_fail (GDATA_IS_LINK (_link), FALSE);
+
+ i = g_list_find_custom (self->priv->links, _link, (GCompareFunc) gdata_comparable_compare);
+
+ if (i == NULL) {
+ return FALSE;
+ }
+
+ self->priv->links = g_list_delete_link (self->priv->links, i);
+ g_object_unref (_link);
+
+ return TRUE;
+}
+
+static gint
+link_compare_cb (const GDataLink *_link, const gchar *rel)
+{
+ return strcmp (gdata_link_get_relation_type ((GDataLink*) _link), rel);
+}
+
+/**
+ * gdata_entry_look_up_link:
+ * @self: a #GDataEntry
+ * @rel: the value of the <structfield>rel</structfield> attribute of the desired link
+ *
+ * Looks up a link by relation type from the list of links in the entry. If the link has one of the standard Atom relation types,
+ * use one of the defined @rel values, instead of a static string. e.g. %GDATA_LINK_EDIT or %GDATA_LINK_SELF.
+ *
+ * In the rare event of requiring a list of links with the same @rel value, use gdata_entry_look_up_links().
+ *
+ * Return value: (transfer none): a #GDataLink, or %NULL if one was not found
+ *
+ * Since: 0.1.1
+ */
+GDataLink *
+gdata_entry_look_up_link (GDataEntry *self, const gchar *rel)
+{
+ GList *element;
+
+ g_return_val_if_fail (GDATA_IS_ENTRY (self), NULL);
+ g_return_val_if_fail (rel != NULL, NULL);
+
+ element = g_list_find_custom (self->priv->links, rel, (GCompareFunc) link_compare_cb);
+ if (element == NULL)
+ return NULL;
+ return GDATA_LINK (element->data);
+}
+
+/**
+ * gdata_entry_look_up_links:
+ * @self: a #GDataEntry
+ * @rel: the value of the <structfield>rel</structfield> attribute of the desired links
+ *
+ * Looks up a list of links by relation type from the list of links in the entry. If the links have one of the standard Atom
+ * relation types, use one of the defined @rel values, instead of a static string. e.g. %GDATA_LINK_EDIT or %GDATA_LINK_SELF.
+ *
+ * If you will only use the first link found, consider calling gdata_entry_look_up_link() instead.
+ *
+ * Return value: (element-type GData.Link) (transfer container): a #GList of #GDataLinks, or %NULL if none were found; free the list with
+ * g_list_free()
+ *
+ * Since: 0.4.0
+ */
+GList *
+gdata_entry_look_up_links (GDataEntry *self, const gchar *rel)
+{
+ GList *i, *results = NULL;
+
+ g_return_val_if_fail (GDATA_IS_ENTRY (self), NULL);
+ g_return_val_if_fail (rel != NULL, NULL);
+
+ for (i = self->priv->links; i != NULL; i = i->next) {
+ const gchar *relation_type = gdata_link_get_relation_type (((GDataLink*) i->data));
+ if (strcmp (relation_type, rel) == 0)
+ results = g_list_prepend (results, i->data);
+ }
+
+ return g_list_reverse (results);
+}
+
+/**
+ * gdata_entry_add_author:
+ * @self: a #GDataEntry
+ * @author: a #GDataAuthor to add
+ *
+ * Adds @author to the list of authors in the given #GDataEntry and increments its reference count.
+ *
+ * Duplicate authors will not be added to the list.
+ */
+void
+gdata_entry_add_author (GDataEntry *self, GDataAuthor *author)
+{
+ /* TODO: More author API */
+ g_return_if_fail (GDATA_IS_ENTRY (self));
+ g_return_if_fail (GDATA_IS_AUTHOR (author));
+
+ if (g_list_find_custom (self->priv->authors, author, (GCompareFunc) gdata_comparable_compare) == NULL)
+ self->priv->authors = g_list_prepend (self->priv->authors, g_object_ref (author));
+}
+
+/**
+ * gdata_entry_is_inserted:
+ * @self: a #GDataEntry
+ *
+ * Returns whether the entry is marked as having been inserted on (uploaded to) the server already.
+ *
+ * Return value: %TRUE if the entry has been inserted already, %FALSE otherwise
+ */
+gboolean
+gdata_entry_is_inserted (GDataEntry *self)
+{
+ g_return_val_if_fail (GDATA_IS_ENTRY (self), FALSE);
+
+ if (self->priv->id != NULL || self->priv->updated != -1)
+ return TRUE;
+ return FALSE;
+}
+
+/**
+ * gdata_entry_get_rights:
+ * @self: a #GDataEntry
+ *
+ * Returns the rights pertaining to the entry, or %NULL if not set.
+ *
+ * Return value: the entry's rights information
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_entry_get_rights (GDataEntry *self)
+{
+ g_return_val_if_fail (GDATA_IS_ENTRY (self), NULL);
+ return self->priv->rights;
+}
+
+/**
+ * gdata_entry_set_rights:
+ * @self: a #GDataEntry
+ * @rights: (allow-none): the new rights, or %NULL
+ *
+ * Sets the rights for this entry.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_entry_set_rights (GDataEntry *self, const gchar *rights)
+{
+ g_return_if_fail (GDATA_IS_ENTRY (self));
+
+ g_free (self->priv->rights);
+ self->priv->rights = g_strdup (rights);
+ g_object_notify (G_OBJECT (self), "rights");
+}
+
+/*
+ * _gdata_entry_set_batch_data:
+ * @self: a #GDataEntry
+ * @id: the batch operation ID
+ * @type: the type of batch operation being performed on the #GDataEntry
+ *
+ * Sets the batch operation data needed when outputting the XML for a #GDataEntry to be put into a batch operation feed.
+ *
+ * Since: 0.6.0
+ */
+void
+_gdata_entry_set_batch_data (GDataEntry *self, guint id, GDataBatchOperationType type)
+{
+ g_return_if_fail (GDATA_IS_ENTRY (self));
+
+ self->priv->batch_id = id;
+ self->priv->batch_operation_type = type;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2008–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_ENTRY_H
+#define GDATA_ENTRY_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+#include <gdata/atom/gdata-category.h>
+#include <gdata/atom/gdata-link.h>
+#include <gdata/atom/gdata-author.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_ENTRY (gdata_entry_get_type ())
+#define GDATA_ENTRY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_ENTRY, GDataEntry))
+#define GDATA_ENTRY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_ENTRY, GDataEntryClass))
+#define GDATA_IS_ENTRY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_ENTRY))
+#define GDATA_IS_ENTRY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_ENTRY))
+#define GDATA_ENTRY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_ENTRY, GDataEntryClass))
+
+typedef struct _GDataEntryPrivate GDataEntryPrivate;
+
+/**
+ * GDataEntry:
+ *
+ * All the fields in the #GDataEntry structure are private and should never be accessed directly.
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataEntryPrivate *priv;
+} GDataEntry;
+
+/**
+ * GDataEntryClass:
+ * @parent: the parent class
+ * @get_entry_uri: a function to build the entry URI for the entry, given its entry ID; free the URI with g_free()
+ * @kind_term: the term for this entry's kind category (see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#Introduction">documentation on kinds</ulink>)
+ *
+ * The class structure for the #GDataEntry type.
+ */
+typedef struct {
+ GDataParsableClass parent;
+
+ gchar *(*get_entry_uri) (const gchar *id); /* G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC */
+ const gchar *kind_term;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+ void (*_g_reserved2) (void);
+ void (*_g_reserved3) (void);
+ void (*_g_reserved4) (void);
+ void (*_g_reserved5) (void);
+ void (*_g_reserved6) (void);
+ void (*_g_reserved7) (void);
+} GDataEntryClass;
+
+GType gdata_entry_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataEntry, g_object_unref)
+
+GDataEntry *gdata_entry_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_entry_get_title (GDataEntry *self) G_GNUC_PURE;
+void gdata_entry_set_title (GDataEntry *self, const gchar *title);
+const gchar *gdata_entry_get_summary (GDataEntry *self) G_GNUC_PURE;
+void gdata_entry_set_summary (GDataEntry *self, const gchar *summary);
+const gchar *gdata_entry_get_id (GDataEntry *self) G_GNUC_PURE;
+const gchar *gdata_entry_get_etag (GDataEntry *self) G_GNUC_PURE;
+gint64 gdata_entry_get_updated (GDataEntry *self);
+gint64 gdata_entry_get_published (GDataEntry *self);
+void gdata_entry_add_category (GDataEntry *self, GDataCategory *category);
+GList *gdata_entry_get_categories (GDataEntry *self) G_GNUC_PURE;
+const gchar *gdata_entry_get_content (GDataEntry *self) G_GNUC_PURE;
+void gdata_entry_set_content (GDataEntry *self, const gchar *content);
+const gchar *gdata_entry_get_content_uri (GDataEntry *self) G_GNUC_PURE;
+void gdata_entry_set_content_uri (GDataEntry *self, const gchar *content_uri);
+void gdata_entry_add_link (GDataEntry *self, GDataLink *_link);
+gboolean gdata_entry_remove_link (GDataEntry *self, GDataLink *_link);
+GDataLink *gdata_entry_look_up_link (GDataEntry *self, const gchar *rel) G_GNUC_PURE;
+GList *gdata_entry_look_up_links (GDataEntry *self, const gchar *rel) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_entry_add_author (GDataEntry *self, GDataAuthor *author);
+GList *gdata_entry_get_authors (GDataEntry *self) G_GNUC_PURE;
+const gchar *gdata_entry_get_rights (GDataEntry *self) G_GNUC_PURE;
+void gdata_entry_set_rights (GDataEntry *self, const gchar *rights);
+
+gboolean gdata_entry_is_inserted (GDataEntry *self) G_GNUC_PURE;
+
+G_END_DECLS
+
+#endif /* !GDATA_ENTRY_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2008–2010 <philip@tecnocode.co.uk>
+ * Copyright (C) Red Hat, Inc. 2015
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-feed
+ * @short_description: GData feed object
+ * @stability: Stable
+ * @include: gdata/gdata-feed.h
+ *
+ * #GDataFeed is a list of entries (#GDataEntry) returned as the result of a query to a #GDataService, or given as the input to another
+ * operation on the online service. It also has pieces of data associated with the query on the #GDataService, such as the query title
+ * or timestamp when it was last updated.
+ *
+ * Each #GDataEntry represents a single object on the online service, such as a playlist, video or calendar entry, and the #GDataFeed
+ * represents a collection of similar objects.
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <libxml/parser.h>
+#include <string.h>
+#include <json-glib/json-glib.h>
+
+#include "gdata-feed.h"
+#include "gdata-entry.h"
+#include "gdata-types.h"
+#include "gdata-private.h"
+#include "gdata-service.h"
+#include "gdata-parsable.h"
+
+static void gdata_feed_dispose (GObject *object);
+static void gdata_feed_finalize (GObject *object);
+static void gdata_feed_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error);
+static gboolean post_parse_xml (GDataParsable *parsable, gpointer user_data, GError **error);
+static void get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+static void _gdata_feed_add_category (GDataFeed *self, GDataCategory *category);
+static void _gdata_feed_add_author (GDataFeed *self, GDataAuthor *author);
+
+static gboolean parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error);
+static gboolean post_parse_json (GDataParsable *parsable, gpointer user_data, GError **error);
+
+struct _GDataFeedPrivate {
+ GList *entries;
+ gchar *title;
+ gchar *subtitle;
+ gchar *id;
+ gchar *etag;
+ gint64 updated;
+ GList *categories; /* GDataCategory */
+ gchar *logo;
+ gchar *icon;
+ GList *links; /* GDataLink */
+ GList *authors; /* GDataAuthor */
+ GDataGenerator *generator;
+ guint items_per_page;
+ guint start_index;
+ guint total_results;
+ gchar *rights;
+ gchar *next_page_token;
+};
+
+enum {
+ PROP_ID = 1,
+ PROP_ETAG,
+ PROP_UPDATED,
+ PROP_TITLE,
+ PROP_SUBTITLE,
+ PROP_LOGO,
+ PROP_ICON,
+ PROP_GENERATOR,
+ PROP_ITEMS_PER_PAGE,
+ PROP_START_INDEX,
+ PROP_TOTAL_RESULTS,
+ PROP_RIGHTS,
+ PROP_NEXT_PAGE_TOKEN,
+};
+
+G_DEFINE_TYPE (GDataFeed, gdata_feed, GDATA_TYPE_PARSABLE)
+
+static void
+gdata_feed_class_init (GDataFeedClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataFeedPrivate));
+
+ gobject_class->get_property = gdata_feed_get_property;
+ gobject_class->dispose = gdata_feed_dispose;
+ gobject_class->finalize = gdata_feed_finalize;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ parsable_class->parse_xml = parse_xml;
+ parsable_class->post_parse_xml = post_parse_xml;
+ parsable_class->get_xml = get_xml;
+ parsable_class->get_namespaces = get_namespaces;
+ parsable_class->element_name = "feed";
+
+ parsable_class->parse_json = parse_json;
+ parsable_class->post_parse_json = post_parse_json;
+
+ /**
+ * GDataFeed:title:
+ *
+ * The title of the feed.
+ *
+ * API reference:
+ * <ulink type="http" url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_title">atom:title</ulink>
+ */
+ g_object_class_install_property (gobject_class, PROP_TITLE,
+ g_param_spec_string ("title",
+ "Title", "The title of the feed.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataFeed:subtitle:
+ *
+ * The subtitle of the feed.
+ *
+ * API reference: <ulink type="http" url="http://atomenabled.org/developers/syndication/">atom:subtitle</ulink>
+ */
+ g_object_class_install_property (gobject_class, PROP_SUBTITLE,
+ g_param_spec_string ("subtitle",
+ "Subtitle", "The subtitle of the feed.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataFeed:id:
+ *
+ * The unique and permanent URN ID for the feed.
+ *
+ * API reference: <ulink type="http" url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_id">atom:id</ulink>
+ */
+ g_object_class_install_property (gobject_class, PROP_ID,
+ g_param_spec_string ("id",
+ "ID", "The unique and permanent URN ID for the feed.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataFeed:etag:
+ *
+ * The unique ETag for this version of the feed. See the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/reference.html#ResourceVersioning">online documentation</ulink> for
+ * more information.
+ *
+ * Since: 0.2.0
+ */
+ g_object_class_install_property (gobject_class, PROP_ETAG,
+ g_param_spec_string ("etag",
+ "ETag", "The unique ETag for this version of the feed.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataFeed:updated:
+ *
+ * The time the feed was last updated.
+ *
+ * API reference: <ulink type="http" url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_updated">
+ * atom:updated</ulink>
+ */
+ g_object_class_install_property (gobject_class, PROP_UPDATED,
+ g_param_spec_int64 ("updated",
+ "Updated", "The time the feed was last updated.",
+ 0, G_MAXINT64, 0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataFeed:logo:
+ *
+ * The URI of a logo for the feed.
+ *
+ * API reference: <ulink type="http" url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_logo">atom:logo</ulink>
+ */
+ g_object_class_install_property (gobject_class, PROP_LOGO,
+ g_param_spec_string ("logo",
+ "Logo", "The URI of a logo for the feed.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataFeed:icon:
+ *
+ * The URI of an icon for the feed.
+ *
+ * API reference:
+ * <ulink type="http" url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.icon">atom:icon</ulink>
+ *
+ * Since: 0.6.0
+ */
+ g_object_class_install_property (gobject_class, PROP_ICON,
+ g_param_spec_string ("icon",
+ "Icon", "The URI of an icon for the feed.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataFeed:generator:
+ *
+ * Details of the software used to generate the feed.
+ *
+ * API reference: <ulink type="http" url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_generator">
+ * atom:generator</ulink>
+ */
+ g_object_class_install_property (gobject_class, PROP_GENERATOR,
+ g_param_spec_object ("generator",
+ "Generator", "Details of the software used to generate the feed.",
+ GDATA_TYPE_GENERATOR,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataFeed:rights:
+ *
+ * The ownership rights pertaining to the entire feed.
+ *
+ * For more information, see the <ulink type="http"
+ * url="http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.rights">Atom specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_RIGHTS,
+ g_param_spec_string ("rights",
+ "Rights", "The ownership rights pertaining to the entire feed.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataFeed:items-per-page:
+ *
+ * The number of items per results page feed.
+ *
+ * API reference:
+ * <ulink type="http" url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_openSearch:itemsPerPage">
+ * openSearch:itemsPerPage</ulink>
+ */
+ g_object_class_install_property (gobject_class, PROP_ITEMS_PER_PAGE,
+ g_param_spec_uint ("items-per-page",
+ "Items per page", "The number of items per results page feed.",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataFeed:start-index:
+ *
+ * The one-based index of the first item in the results feed.
+ *
+ * This should <emphasis>not</emphasis> be used manually for pagination. Instead, use a #GDataQuery and call its gdata_query_next_page()
+ * or gdata_query_previous_page() functions before making the query to the service.
+ *
+ * API reference: <ulink type="http" url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_openSearch:startIndex">
+ * openSearch:startIndex</ulink>
+ */
+ g_object_class_install_property (gobject_class, PROP_START_INDEX,
+ g_param_spec_uint ("start-index",
+ "Start index", "The one-based index of the first item in the results feed.",
+ 1, G_MAXUINT, 1,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataFeed:total-results:
+ *
+ * The number of items in the result set for the feed, including those on other pages. If this is zero, the total number is unknown.
+ *
+ * This should <emphasis>not</emphasis> be used manually for pagination. Instead, use a #GDataQuery and call its gdata_query_next_page()
+ * or gdata_query_previous_page() functions before making the query to the service.
+ *
+ * API reference:
+ * <ulink type="http" url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_openSearch:totalResults">
+ * openSearch:totalResults</ulink>
+ */
+ g_object_class_install_property (gobject_class, PROP_TOTAL_RESULTS,
+ g_param_spec_uint ("total-results",
+ "Total results", "The total number of results in the feed.",
+ 0, 1000000, 0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataFeed:next-page-token:
+ *
+ * The next page token for feeds. Pass this to
+ * gdata_query_set_page_token() to advance to the next page when
+ * querying APIs which use page tokens rather than page numbers or
+ * offsets.
+ *
+ * Since: 0.17.7
+ */
+ g_object_class_install_property (gobject_class, PROP_NEXT_PAGE_TOKEN,
+ g_param_spec_string ("next-page-token",
+ "Next page token", "The next page token for feeds.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_feed_init (GDataFeed *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_FEED, GDataFeedPrivate);
+ self->priv->updated = -1;
+}
+
+static void
+gdata_feed_dispose (GObject *object)
+{
+ GDataFeedPrivate *priv = GDATA_FEED (object)->priv;
+
+ g_list_free_full (priv->entries, g_object_unref);
+ priv->entries = NULL;
+
+ g_list_free_full (priv->categories, g_object_unref);
+ priv->categories = NULL;
+
+ g_list_free_full (priv->links, g_object_unref);
+ priv->links = NULL;
+
+ g_list_free_full (priv->authors, g_object_unref);
+ priv->authors = NULL;
+
+ if (priv->generator != NULL)
+ g_object_unref (priv->generator);
+ priv->generator = NULL;
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_feed_parent_class)->dispose (object);
+}
+
+static void
+gdata_feed_finalize (GObject *object)
+{
+ GDataFeedPrivate *priv = GDATA_FEED (object)->priv;
+
+ g_free (priv->title);
+ g_free (priv->subtitle);
+ g_free (priv->id);
+ g_free (priv->etag);
+ g_free (priv->logo);
+ g_free (priv->icon);
+ g_free (priv->rights);
+ g_free (priv->next_page_token);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_feed_parent_class)->finalize (object);
+}
+
+static void
+gdata_feed_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataFeedPrivate *priv = GDATA_FEED (object)->priv;
+
+ switch (property_id) {
+ case PROP_TITLE:
+ g_value_set_string (value, priv->title);
+ break;
+ case PROP_SUBTITLE:
+ g_value_set_string (value, priv->subtitle);
+ break;
+ case PROP_ID:
+ g_value_set_string (value, priv->id);
+ break;
+ case PROP_ETAG:
+ g_value_set_string (value, priv->etag);
+ break;
+ case PROP_UPDATED:
+ g_value_set_int64 (value, priv->updated);
+ break;
+ case PROP_LOGO:
+ g_value_set_string (value, priv->logo);
+ break;
+ case PROP_ICON:
+ g_value_set_string (value, priv->icon);
+ break;
+ case PROP_GENERATOR:
+ g_value_set_object (value, priv->generator);
+ break;
+ case PROP_RIGHTS:
+ g_value_set_string (value, priv->rights);
+ break;
+ case PROP_ITEMS_PER_PAGE:
+ g_value_set_uint (value, priv->items_per_page);
+ break;
+ case PROP_START_INDEX:
+ g_value_set_uint (value, priv->start_index);
+ break;
+ case PROP_TOTAL_RESULTS:
+ g_value_set_uint (value, priv->total_results);
+ break;
+ case PROP_NEXT_PAGE_TOKEN:
+ g_value_set_string (value, priv->next_page_token);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+typedef struct {
+ GType entry_type;
+ GDataQueryProgressCallback progress_callback;
+ gpointer progress_user_data;
+ guint entry_i;
+} ParseData;
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ /* Extract the ETag */
+ GDATA_FEED (parsable)->priv->etag = (gchar*) xmlGetProp (root_node, (xmlChar*) "etag");
+ return TRUE;
+}
+
+typedef struct {
+ GDataQueryProgressCallback progress_callback;
+ gpointer progress_user_data;
+ GDataEntry *entry;
+ guint entry_i;
+ guint total_results;
+} ProgressCallbackData;
+
+static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ gboolean success;
+ GDataFeed *self = GDATA_FEED (parsable);
+ ParseData *data = user_data;
+
+ if (gdata_parser_is_namespace (node, "http://www.w3.org/2005/Atom") == TRUE) {
+ if (xmlStrcmp (node->name, (xmlChar*) "entry") == 0) {
+ /* atom:entry */
+ GDataEntry *entry;
+ GType entry_type;
+
+ /* Allow @data to be %NULL, and assume we're parsing a vanilla feed, so that we can test #GDataFeed in tests/general.c.
+ * A little hacky, but not too much so, and valuable for testing. */
+ entry_type = (data != NULL) ? data->entry_type : GDATA_TYPE_ENTRY;
+ entry = GDATA_ENTRY (_gdata_parsable_new_from_xml_node (entry_type, doc, node, NULL, error));
+ if (entry == NULL)
+ return FALSE;
+
+ /* Calls the callbacks in the main thread */
+ if (data != NULL)
+ _gdata_feed_call_progress_callback (self, data, entry);
+ _gdata_feed_add_entry (self, entry);
+ g_object_unref (entry);
+ } else if (gdata_parser_string_from_element (node, "title", P_DEFAULT | P_NO_DUPES, &(self->priv->title), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "subtitle", P_NO_DUPES, &(self->priv->subtitle), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "id", P_REQUIRED | P_NON_EMPTY | P_NO_DUPES,
+ &(self->priv->id), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "logo", P_NO_DUPES, &(self->priv->logo), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "icon", P_NO_DUPES, &(self->priv->icon), &success, error) == TRUE ||
+ gdata_parser_object_from_element_setter (node, "category", P_REQUIRED, GDATA_TYPE_CATEGORY,
+ _gdata_feed_add_category, self, &success, error) == TRUE ||
+ gdata_parser_object_from_element_setter (node, "link", P_REQUIRED, GDATA_TYPE_LINK,
+ _gdata_feed_add_link, self, &success, error) == TRUE ||
+ gdata_parser_object_from_element_setter (node, "author", P_REQUIRED, GDATA_TYPE_AUTHOR,
+ _gdata_feed_add_author, self, &success, error) == TRUE ||
+ gdata_parser_object_from_element (node, "generator", P_REQUIRED | P_NO_DUPES, GDATA_TYPE_GENERATOR,
+ &(self->priv->generator), &success, error) == TRUE ||
+ gdata_parser_int64_time_from_element (node, "updated", P_REQUIRED | P_NO_DUPES,
+ &(self->priv->updated), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "rights", P_NONE, &(self->priv->rights), &success, error) == TRUE) {
+ return success;
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_feed_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ }
+ } else if (gdata_parser_is_namespace (node, "http://a9.com/-/spec/opensearch/1.1/") == TRUE) {
+ if (xmlStrcmp (node->name, (xmlChar*) "totalResults") == 0) {
+ /* openSearch:totalResults */
+ xmlChar *total_results_string;
+
+ /* Duplicate checking */
+ if (self->priv->total_results != 0)
+ return gdata_parser_error_duplicate_element (node, error);
+
+ /* Parse the number */
+ total_results_string = xmlNodeListGetString (doc, node->children, TRUE);
+ if (total_results_string == NULL)
+ return gdata_parser_error_required_content_missing (node, error);
+
+ self->priv->total_results = g_ascii_strtoull ((gchar*) total_results_string, NULL, 10);
+ xmlFree (total_results_string);
+ } else if (xmlStrcmp (node->name, (xmlChar*) "startIndex") == 0) {
+ /* openSearch:startIndex */
+ xmlChar *start_index_string;
+
+ /* Duplicate checking */
+ if (self->priv->start_index != 0)
+ return gdata_parser_error_duplicate_element (node, error);
+
+ /* Parse the number */
+ start_index_string = xmlNodeListGetString (doc, node->children, TRUE);
+ if (start_index_string == NULL)
+ return gdata_parser_error_required_content_missing (node, error);
+
+ self->priv->start_index = g_ascii_strtoull ((gchar*) start_index_string, NULL, 10);
+ xmlFree (start_index_string);
+ } else if (xmlStrcmp (node->name, (xmlChar*) "itemsPerPage") == 0) {
+ /* openSearch:itemsPerPage */
+ xmlChar *items_per_page_string;
+
+ /* Duplicate checking */
+ if (self->priv->items_per_page != 0)
+ return gdata_parser_error_duplicate_element (node, error);
+
+ /* Parse the number */
+ items_per_page_string = xmlNodeListGetString (doc, node->children, TRUE);
+ if (items_per_page_string == NULL)
+ return gdata_parser_error_required_content_missing (node, error);
+
+ self->priv->items_per_page = g_ascii_strtoull ((gchar*) items_per_page_string, NULL, 10);
+ xmlFree (items_per_page_string);
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_feed_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ }
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_feed_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ }
+
+ return TRUE;
+}
+
+static gboolean
+post_parse_xml (GDataParsable *parsable, gpointer user_data, GError **error)
+{
+ GDataFeedPrivate *priv = GDATA_FEED (parsable)->priv;
+
+ /* Check for missing required elements */
+ /* FIXME: The YouTube comments feed seems to have lost its <feed/title> element, making it an invalid Atom feed and meaning
+ * the check below has to be commented out.
+ * Filed as: https://code.google.com/p/gdata-issues/issues/detail?id=2908.
+ * Discovered in: https://bugzilla.gnome.org/show_bug.cgi?id=679072#c12. */
+ /*if (priv->title == NULL)
+ return gdata_parser_error_required_element_missing ("title", "feed", error);*/
+ if (priv->id == NULL)
+ return gdata_parser_error_required_element_missing ("id", "feed", error);
+ if (priv->updated == -1)
+ return gdata_parser_error_required_element_missing ("updated", "feed", error);
+
+ /* Reverse our lists of stuff */
+ priv->entries = g_list_reverse (priv->entries);
+ priv->categories = g_list_reverse (priv->categories);
+ priv->links = g_list_reverse (priv->links);
+ priv->authors = g_list_reverse (priv->authors);
+
+ return TRUE;
+}
+
+static void
+get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataFeedPrivate *priv = GDATA_FEED (parsable)->priv;
+ GList *entries;
+ gchar *updated;
+
+ /* NOTE: Only the required elements are implemented at the moment */
+ gdata_parser_string_append_escaped (xml_string, "<title type='text'>", priv->title, "</title>");
+ gdata_parser_string_append_escaped (xml_string, "<id>", priv->id, "</id>");
+
+ updated = gdata_parser_int64_to_iso8601 (priv->updated);
+ g_string_append_printf (xml_string, "<updated>%s</updated>", updated);
+ g_free (updated);
+
+ /* Entries */
+ for (entries = priv->entries; entries != NULL; entries = entries->next)
+ _gdata_parsable_get_xml (GDATA_PARSABLE (entries->data), xml_string, FALSE);
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ GDataFeedPrivate *priv = GDATA_FEED (parsable)->priv;
+ GList *i;
+
+ /* We can't assume that all the entries in the feed have identical namespaces, so we have to call get_namespaces() for all of them.
+ * GDataBatchFeeds, for example, can easily contain entries with differing sets of namespaces. */
+ for (i = priv->entries; i != NULL; i = i->next)
+ GDATA_PARSABLE_GET_CLASS (i->data)->get_namespaces (GDATA_PARSABLE (i->data), namespaces);
+}
+
+static gboolean
+parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error)
+{
+ GDataFeed *self = GDATA_FEED (parsable);
+ ParseData *data = user_data;
+
+ if (g_strcmp0 (json_reader_get_member_name (reader), "items") == 0) {
+ gint i, elements;
+
+ /* Loop through the elements array. */
+ for (i = 0, elements = json_reader_count_elements (reader); i < elements; i++) {
+ GDataEntry *entry;
+ GType entry_type;
+
+ json_reader_read_element (reader, i);
+
+ /* Allow @data to be %NULL, and assume we're parsing a vanilla feed, so that we can test #GDataFeed in tests/general.c.
+ * A little hacky, but not too much so, and valuable for testing. */
+ entry_type = (data != NULL) ? data->entry_type : GDATA_TYPE_ENTRY;
+
+ /* Parse the node, passing it the reader cursor. */
+ entry = GDATA_ENTRY (_gdata_parsable_new_from_json_node (entry_type, reader, NULL, error));
+ if (entry == NULL) {
+ json_reader_end_element (reader);
+ return FALSE;
+ }
+
+ /* Calls the callbacks in the main thread */
+ if (data != NULL)
+ _gdata_feed_call_progress_callback (self, data, entry);
+ _gdata_feed_add_entry (self, entry);
+ g_object_unref (entry);
+
+ json_reader_end_element (reader);
+ }
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "selfLink") == 0) {
+ GDataLink *_link;
+ const gchar *uri;
+
+ /* Empty URI? */
+ uri = json_reader_get_string_value (reader);
+ if (uri == NULL || *uri == '\0') {
+ return gdata_parser_error_required_json_content_missing (reader, error);
+ }
+
+ _link = gdata_link_new (uri, GDATA_LINK_SELF);
+ _gdata_feed_add_link (self, _link);
+ g_object_unref (_link);
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "kind") == 0) {
+ /* Ignore. */
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "etag") == 0) {
+ GDATA_FEED (parsable)->priv->etag = g_strdup (json_reader_get_string_value (reader));
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "nextPageToken") == 0) {
+ GDATA_FEED (parsable)->priv->next_page_token = g_strdup (json_reader_get_string_value (reader));
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_feed_parent_class)->parse_json (parsable, reader, user_data, error);
+ }
+
+ return TRUE;
+}
+
+static gboolean
+post_parse_json (GDataParsable *parsable, gpointer user_data, GError **error)
+{
+ GDataFeedPrivate *priv = GDATA_FEED (parsable)->priv;
+
+ /* Reverse our lists of stuff. */
+ priv->entries = g_list_reverse (priv->entries);
+
+ return TRUE;
+}
+
+/* Internal helper method to set these properties. */
+void
+_gdata_feed_set_page_info (GDataFeed *self, guint total_results,
+ guint items_per_page)
+{
+ g_return_if_fail (GDATA_IS_FEED (self));
+
+ self->priv->total_results = total_results;
+ self->priv->items_per_page = items_per_page;
+}
+
+/*
+ * _gdata_feed_new:
+ * @feed_type: the type of #GDataFeed subclass
+ * @title: the feed's title
+ * @id: the feed's ID
+ * @updated: when the feed was last updated
+ *
+ * Creates a new #GDataFeed or subclass with the bare minimum of data to be
+ * valid.
+ *
+ * Return value: a new #GDataFeed
+ *
+ * Since: 0.17.0
+ */
+GDataFeed *
+_gdata_feed_new (GType feed_type,
+ const gchar *title,
+ const gchar *id,
+ gint64 updated)
+{
+ GDataFeed *feed;
+
+ g_return_val_if_fail (g_type_is_a (feed_type, GDATA_TYPE_FEED), NULL);
+ g_return_val_if_fail (title != NULL, NULL);
+ g_return_val_if_fail (id != NULL, NULL);
+ g_return_val_if_fail (updated >= 0, NULL);
+
+ feed = g_object_new (feed_type, NULL);
+ feed->priv->title = g_strdup (title);
+ feed->priv->id = g_strdup (id);
+ feed->priv->updated = updated;
+
+ return feed;
+}
+
+GDataFeed *
+_gdata_feed_new_from_xml (GType feed_type, const gchar *xml, gint length, GType entry_type,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error)
+{
+ ParseData *data;
+ GDataFeed *feed;
+
+ g_return_val_if_fail (g_type_is_a (feed_type, GDATA_TYPE_FEED), NULL);
+ g_return_val_if_fail (xml != NULL, NULL);
+ g_return_val_if_fail (g_type_is_a (entry_type, GDATA_TYPE_ENTRY), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ data = _gdata_feed_parse_data_new (entry_type, progress_callback, progress_user_data);
+ feed = GDATA_FEED (_gdata_parsable_new_from_xml (feed_type, xml, length, data, error));
+ _gdata_feed_parse_data_free (data);
+
+ return feed;
+}
+
+GDataFeed *
+_gdata_feed_new_from_json (GType feed_type, const gchar *json, gint length, GType entry_type,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error)
+{
+ ParseData *data;
+ GDataFeed *feed;
+
+ g_return_val_if_fail (g_type_is_a (feed_type, GDATA_TYPE_FEED), NULL);
+ g_return_val_if_fail (json != NULL, NULL);
+ g_return_val_if_fail (g_type_is_a (entry_type, GDATA_TYPE_ENTRY), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ data = _gdata_feed_parse_data_new (entry_type, progress_callback, progress_user_data);
+ feed = GDATA_FEED (_gdata_parsable_new_from_json (feed_type, json, length, data, error));
+ _gdata_feed_parse_data_free (data);
+
+ return feed;
+}
+
+/**
+ * gdata_feed_get_entries:
+ * @self: a #GDataFeed
+ *
+ * Returns a list of the entries contained in this feed.
+ *
+ * Return value: (element-type GData.Entry) (transfer none): a #GList of #GDataEntrys
+ */
+GList *
+gdata_feed_get_entries (GDataFeed *self)
+{
+ g_return_val_if_fail (GDATA_IS_FEED (self), NULL);
+ return self->priv->entries;
+}
+
+static gint
+entry_compare_cb (const GDataEntry *entry, const gchar *id)
+{
+ return strcmp (gdata_entry_get_id (GDATA_ENTRY (entry)), id);
+}
+
+/**
+ * gdata_feed_look_up_entry:
+ * @self: a #GDataFeed
+ * @id: the entry's ID
+ *
+ * Returns the entry in the feed with the given @id, if found.
+ *
+ * Return value: (transfer none): the #GDataEntry, or %NULL
+ *
+ * Since: 0.2.0
+ */
+GDataEntry *
+gdata_feed_look_up_entry (GDataFeed *self, const gchar *id)
+{
+ GList *element;
+
+ g_return_val_if_fail (GDATA_IS_FEED (self), NULL);
+ g_return_val_if_fail (id != NULL, NULL);
+
+ element = g_list_find_custom (self->priv->entries, id, (GCompareFunc) entry_compare_cb);
+ if (element == NULL)
+ return NULL;
+ return GDATA_ENTRY (element->data);
+}
+
+/**
+ * gdata_feed_get_categories:
+ * @self: a #GDataFeed
+ *
+ * Returns a list of the categories listed in this feed.
+ *
+ * Return value: (element-type GData.Category) (transfer none): a #GList of #GDataCategorys
+ */
+GList *
+gdata_feed_get_categories (GDataFeed *self)
+{
+ g_return_val_if_fail (GDATA_IS_FEED (self), NULL);
+ return self->priv->categories;
+}
+
+static void
+_gdata_feed_add_category (GDataFeed *self, GDataCategory *category)
+{
+ self->priv->categories = g_list_prepend (self->priv->categories, g_object_ref (category));
+}
+
+/**
+ * gdata_feed_get_links:
+ * @self: a #GDataFeed
+ *
+ * Returns a list of the links listed in this feed.
+ *
+ * Return value: (element-type GData.Link) (transfer none): a #GList of #GDataLinks
+ */
+GList *
+gdata_feed_get_links (GDataFeed *self)
+{
+ g_return_val_if_fail (GDATA_IS_FEED (self), NULL);
+ return self->priv->links;
+}
+
+static gint
+link_compare_cb (const GDataLink *_link, const gchar *rel)
+{
+ return strcmp (gdata_link_get_relation_type ((GDataLink*) _link), rel);
+}
+
+/**
+ * gdata_feed_look_up_link:
+ * @self: a #GDataFeed
+ * @rel: the value of the #GDataLink:relation-type property of the desired link
+ *
+ * Looks up a link by #GDataLink:relation-type value from the list of links in the feed.
+ *
+ * Return value: (transfer none): a #GDataLink, or %NULL if one was not found
+ *
+ * Since: 0.1.1
+ */
+GDataLink *
+gdata_feed_look_up_link (GDataFeed *self, const gchar *rel)
+{
+ GList *element;
+
+ g_return_val_if_fail (GDATA_IS_FEED (self), NULL);
+ g_return_val_if_fail (rel != NULL, NULL);
+
+ element = g_list_find_custom (self->priv->links, rel, (GCompareFunc) link_compare_cb);
+ if (element == NULL)
+ return NULL;
+ return GDATA_LINK (element->data);
+}
+
+void
+_gdata_feed_add_link (GDataFeed *self, GDataLink *_link)
+{
+ self->priv->links = g_list_prepend (self->priv->links, g_object_ref (_link));
+}
+
+/**
+ * gdata_feed_get_authors:
+ * @self: a #GDataFeed
+ *
+ * Returns a list of the authors listed in this feed.
+ *
+ * Return value: (element-type GData.Author) (transfer none): a #GList of #GDataAuthors
+ */
+GList *
+gdata_feed_get_authors (GDataFeed *self)
+{
+ g_return_val_if_fail (GDATA_IS_FEED (self), NULL);
+ return self->priv->authors;
+}
+
+static void
+_gdata_feed_add_author (GDataFeed *self, GDataAuthor *author)
+{
+ self->priv->authors = g_list_prepend (self->priv->authors, g_object_ref (author));
+}
+
+/**
+ * gdata_feed_get_title:
+ * @self: a #GDataFeed
+ *
+ * Returns the title of the feed.
+ *
+ * Return value: the feed's title
+ */
+const gchar *
+gdata_feed_get_title (GDataFeed *self)
+{
+ g_return_val_if_fail (GDATA_IS_FEED (self), NULL);
+ return self->priv->title;
+}
+
+/**
+ * gdata_feed_get_subtitle:
+ * @self: a #GDataFeed
+ *
+ * Returns the subtitle of the feed.
+ *
+ * Return value: the feed's subtitle, or %NULL
+ */
+const gchar *
+gdata_feed_get_subtitle (GDataFeed *self)
+{
+ g_return_val_if_fail (GDATA_IS_FEED (self), NULL);
+ return self->priv->subtitle;
+}
+
+/**
+ * gdata_feed_get_id:
+ * @self: a #GDataFeed
+ *
+ * Returns the feed's unique and permanent URN ID.
+ *
+ * Return value: the feed's ID
+ */
+const gchar *
+gdata_feed_get_id (GDataFeed *self)
+{
+ g_return_val_if_fail (GDATA_IS_FEED (self), NULL);
+ return self->priv->id;
+}
+
+/**
+ * gdata_feed_get_etag:
+ * @self: a #GDataFeed
+ *
+ * Returns the feed's unique ETag for this version.
+ *
+ * Return value: the feed's ETag
+ *
+ * Since: 0.2.0
+ */
+const gchar *
+gdata_feed_get_etag (GDataFeed *self)
+{
+ g_return_val_if_fail (GDATA_IS_FEED (self), NULL);
+ return self->priv->etag;
+}
+
+/**
+ * gdata_feed_get_updated:
+ * @self: a #GDataFeed
+ *
+ * Gets the time the feed was last updated.
+ *
+ * Return value: the UNIX timestamp for the time the feed was last updated
+ */
+gint64
+gdata_feed_get_updated (GDataFeed *self)
+{
+ g_return_val_if_fail (GDATA_IS_FEED (self), -1);
+ return self->priv->updated;
+}
+
+/**
+ * gdata_feed_get_logo:
+ * @self: a #GDataFeed
+ *
+ * Returns the logo URI of the feed.
+ *
+ * Return value: the feed's logo URI, or %NULL
+ */
+const gchar *
+gdata_feed_get_logo (GDataFeed *self)
+{
+ g_return_val_if_fail (GDATA_IS_FEED (self), NULL);
+ return self->priv->logo;
+}
+
+/**
+ * gdata_feed_get_icon:
+ * @self: a #GDataFeed
+ *
+ * Returns the icon URI of the feed.
+ *
+ * Return value: the feed's icon URI, or %NULL
+ *
+ * Since: 0.6.0
+ */
+const gchar *
+gdata_feed_get_icon (GDataFeed *self)
+{
+ g_return_val_if_fail (GDATA_IS_FEED (self), NULL);
+ return self->priv->icon;
+}
+
+/**
+ * gdata_feed_get_generator:
+ * @self: a #GDataFeed
+ *
+ * Returns details about the software which generated the feed.
+ *
+ * Return value: (transfer none): a #GDataGenerator, or %NULL
+ */
+GDataGenerator *
+gdata_feed_get_generator (GDataFeed *self)
+{
+ g_return_val_if_fail (GDATA_IS_FEED (self), NULL);
+ return self->priv->generator;
+}
+
+/**
+ * gdata_feed_get_rights:
+ * @self: a #GDataFeed
+ *
+ * Returns the rights pertaining to the entire feed, or %NULL if not set.
+ *
+ * Return value: the feed's rights information
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_feed_get_rights (GDataFeed *self)
+{
+ g_return_val_if_fail (GDATA_IS_FEED (self), NULL);
+ return self->priv->rights;
+}
+
+/**
+ * gdata_feed_get_items_per_page:
+ * @self: a #GDataFeed
+ *
+ * Returns the number of items per results page feed.
+ *
+ * Return value: the number of items per results page feed, or <code class="literal">0</code>
+ */
+guint
+gdata_feed_get_items_per_page (GDataFeed *self)
+{
+ g_return_val_if_fail (GDATA_IS_FEED (self), 0);
+ return self->priv->items_per_page;
+}
+
+/**
+ * gdata_feed_get_start_index:
+ * @self: a #GDataFeed
+ *
+ * Returns the one-based start index of the results feed in the result set.
+ *
+ * Return value: the one-based start index, or <code class="literal">0</code>
+ */
+guint
+gdata_feed_get_start_index (GDataFeed *self)
+{
+ g_return_val_if_fail (GDATA_IS_FEED (self), 0);
+ return self->priv->start_index;
+}
+
+/**
+ * gdata_feed_get_total_results:
+ * @self: a #GDataFeed
+ *
+ * Returns the total number of results in the result set, including results on other
+ * pages. If this is zero, the total number is unknown.
+ *
+ * Return value: the total number of results, or <code class="literal">0</code>
+ */
+guint
+gdata_feed_get_total_results (GDataFeed *self)
+{
+ g_return_val_if_fail (GDATA_IS_FEED (self), 0);
+ return self->priv->total_results;
+}
+
+/**
+ * gdata_feed_get_next_page_token:
+ * @self: a #GDataFeed
+ *
+ * Returns the next page token for a query result, or %NULL if not set.
+ * This is #GDataFeed:next-page-token. The page token might not be set if there
+ * is no next page, or if this service does not use token based paging (for
+ * example, if it uses page number or offset based paging instead). Most more
+ * recent services use token based paging.
+ *
+ * Return value: (nullable): the next page token
+ *
+ * Since: 0.17.7
+ */
+const gchar *
+gdata_feed_get_next_page_token (GDataFeed *self)
+{
+ g_return_val_if_fail (GDATA_IS_FEED (self), NULL);
+ return self->priv->next_page_token;
+}
+
+void
+_gdata_feed_add_entry (GDataFeed *self, GDataEntry *entry)
+{
+ g_return_if_fail (GDATA_IS_FEED (self));
+ g_return_if_fail (GDATA_IS_ENTRY (entry));
+ self->priv->entries = g_list_prepend (self->priv->entries, g_object_ref (entry));
+}
+
+gpointer
+_gdata_feed_parse_data_new (GType entry_type, GDataQueryProgressCallback progress_callback, gpointer progress_user_data)
+{
+ ParseData *data;
+ data = g_slice_new (ParseData);
+ data->entry_type = entry_type;
+ data->progress_callback = progress_callback;
+ data->progress_user_data = progress_user_data;
+ data->entry_i = 0;
+
+ return data;
+}
+
+void
+_gdata_feed_parse_data_free (gpointer data)
+{
+ g_slice_free (ParseData, data);
+}
+
+static gboolean
+progress_callback_idle (ProgressCallbackData *data)
+{
+ data->progress_callback (data->entry, data->entry_i, data->total_results, data->progress_user_data);
+
+ return G_SOURCE_REMOVE;
+}
+
+static void
+progress_callback_data_free (ProgressCallbackData *data)
+{
+ g_object_unref (data->entry);
+ g_slice_free (ProgressCallbackData, data);
+}
+
+void
+_gdata_feed_call_progress_callback (GDataFeed *self, gpointer user_data, GDataEntry *entry)
+{
+ ParseData *data = user_data;
+
+ if (data->progress_callback != NULL) {
+ ProgressCallbackData *progress_data;
+
+ /* Build the data for the callback */
+ progress_data = g_slice_new (ProgressCallbackData);
+ progress_data->progress_callback = data->progress_callback;
+ progress_data->progress_user_data = data->progress_user_data;
+ progress_data->entry = g_object_ref (entry);
+ progress_data->entry_i = data->entry_i;
+ progress_data->total_results = MIN (self->priv->items_per_page, self->priv->total_results);
+
+ /* Send the callback; use G_PRIORITY_DEFAULT rather than G_PRIORITY_DEFAULT_IDLE
+ * to contend with the priorities used by the callback functions in GAsyncResult */
+ g_main_context_invoke_full (NULL, G_PRIORITY_DEFAULT,
+ (GSourceFunc) progress_callback_idle,
+ progress_data,
+ (GDestroyNotify) progress_callback_data_free);
+ }
+ data->entry_i++;
+}
+
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2008-2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_FEED_H
+#define GDATA_FEED_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+#include <gdata/gdata-entry.h>
+#include <gdata/atom/gdata-link.h>
+#include <gdata/atom/gdata-generator.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_FEED (gdata_feed_get_type ())
+#define GDATA_FEED(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_FEED, GDataFeed))
+#define GDATA_FEED_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_FEED, GDataFeedClass))
+#define GDATA_IS_FEED(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_FEED))
+#define GDATA_IS_FEED_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_FEED))
+#define GDATA_FEED_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_FEED, GDataFeedClass))
+
+typedef struct _GDataFeedPrivate GDataFeedPrivate;
+
+/**
+ * GDataFeed:
+ *
+ * All the fields in the #GDataFeed structure are private and should never be accessed directly.
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsable parent;
+ GDataFeedPrivate *priv;
+} GDataFeed;
+
+/**
+ * GDataFeedClass:
+ *
+ * All the fields in the #GDataFeedClass structure are private and should never be accessed directly.
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+ void (*_g_reserved2) (void);
+ void (*_g_reserved3) (void);
+ void (*_g_reserved4) (void);
+ void (*_g_reserved5) (void);
+} GDataFeedClass;
+
+GType gdata_feed_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataFeed, g_object_unref)
+
+GList *gdata_feed_get_entries (GDataFeed *self) G_GNUC_PURE;
+GDataEntry *gdata_feed_look_up_entry (GDataFeed *self, const gchar *id) G_GNUC_PURE;
+GList *gdata_feed_get_categories (GDataFeed *self) G_GNUC_PURE;
+GList *gdata_feed_get_links (GDataFeed *self) G_GNUC_PURE;
+GDataLink *gdata_feed_look_up_link (GDataFeed *self, const gchar *rel) G_GNUC_PURE;
+GList *gdata_feed_get_authors (GDataFeed *self) G_GNUC_PURE;
+
+const gchar *gdata_feed_get_title (GDataFeed *self) G_GNUC_PURE;
+const gchar *gdata_feed_get_subtitle (GDataFeed *self) G_GNUC_PURE;
+const gchar *gdata_feed_get_id (GDataFeed *self) G_GNUC_PURE;
+const gchar *gdata_feed_get_etag (GDataFeed *self) G_GNUC_PURE;
+gint64 gdata_feed_get_updated (GDataFeed *self);
+const gchar *gdata_feed_get_logo (GDataFeed *self) G_GNUC_PURE;
+GDataGenerator *gdata_feed_get_generator (GDataFeed *self) G_GNUC_PURE;
+const gchar *gdata_feed_get_rights (GDataFeed *self) G_GNUC_PURE;
+guint gdata_feed_get_items_per_page (GDataFeed *self) G_GNUC_PURE;
+guint gdata_feed_get_start_index (GDataFeed *self) G_GNUC_PURE;
+guint gdata_feed_get_total_results (GDataFeed *self) G_GNUC_PURE;
+const gchar *gdata_feed_get_icon (GDataFeed *self) G_GNUC_PURE;
+const gchar *gdata_feed_get_next_page_token (GDataFeed *self) G_GNUC_PURE;
+
+G_END_DECLS
+
+#endif /* !GDATA_FEED_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Matthew Barnes 2011 <mbarnes@redhat.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-goa-authorizer
+ * @short_description: GData GOA authorization interface
+ * @stability: Stable
+ * @include: gdata/gdata-goa-authorizer.h
+ *
+ * #GDataGoaAuthorizer provides an implementation of the #GDataAuthorizer interface for authentication and authorization using GNOME Online Accounts
+ * (GOA) over D-Bus. This allows a single login session (managed by the GOA daemon) to be used by multiple applications simultaneously, without each
+ * of those applications having to go through the authentication process themselves. Applications making use of #GDataGoaAuthorizer don't get access
+ * to the user's password (it's handled solely by the GOA daemon).
+ *
+ * Internally, GOA authenticates with the Google servers using the
+ * <ulink type="http" url="http://code.google.com/apis/accounts/docs/OAuthForInstalledApps.html">OAuth 1.0</ulink> or
+ * <ulink type="http" url="https://developers.google.com/identity/protocols/OAuth2">OAuth 2.0</ulink> processes.
+ *
+ * #GDataGoaAuthorizer natively supports authorization against multiple services (unlike #GDataClientLoginAuthorizer), depending entirely on which
+ * services the user has enabled for their Google account in GOA. #GDataGoaAuthorizer cannot authenticate for more services than are enabled in GOA.
+ *
+ * <example>
+ * <title>Authenticating Using GOA</title>
+ * <programlisting>
+ * GDataSomeService *service;
+ * GoaObject *goa_object;
+ * GDataGoaAuthorizer *authorizer;
+ *
+ * /<!-- -->* Create an authorizer and pass it an existing #GoaObject. *<!-- -->/
+ * goa_object = get_goa_object ();
+ * authorizer = gdata_goa_authorizer_new (goa_object);
+ *
+ * /<!-- -->* Create a service object and link it with the authorizer *<!-- -->/
+ * service = gdata_some_service_new (GDATA_AUTHORIZER (authorizer));
+ *
+ * /<!-- -->* Use the service! *<!-- -->/
+ *
+ * g_object_unref (service);
+ * g_object_unref (authorizer);
+ * g_object_unref (goa_object);
+ * </programlisting>
+ * </example>
+ *
+ * Since: 0.13.1
+ */
+
+#include <config.h>
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
+
+#include "gdata-goa-authorizer.h"
+#include "gdata-authorizer.h"
+#include "gdata-service.h"
+
+#include "services/calendar/gdata-calendar-service.h"
+#include "services/contacts/gdata-contacts-service.h"
+#include "services/documents/gdata-documents-service.h"
+#include "services/picasaweb/gdata-picasaweb-service.h"
+
+#define HMAC_SHA1_LEN 20 /* bytes, raw */
+
+static void gdata_goa_authorizer_interface_init (GDataAuthorizerInterface *interface);
+
+/* GDataAuthorizer methods must be thread-safe. */
+static GMutex mutex;
+
+struct _GDataGoaAuthorizerPrivate {
+ /* GoaObject is already thread-safe. */
+ GoaObject *goa_object;
+
+ /* These members are protected by the global mutex (above). */
+ gchar *access_token;
+ gchar *access_token_secret;
+ GHashTable *authorization_domains;
+};
+
+enum {
+ PROP_GOA_OBJECT = 1,
+};
+
+G_DEFINE_TYPE_WITH_CODE (GDataGoaAuthorizer, gdata_goa_authorizer, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_AUTHORIZER, gdata_goa_authorizer_interface_init))
+
+static void
+gdata_goa_authorizer_add_oauth2_authorization (GDataAuthorizer *authorizer, SoupMessage *message)
+{
+ GDataGoaAuthorizerPrivate *priv;
+ GString *authorization;
+
+ /* This MUST be called with the mutex already locked. */
+
+ priv = GDATA_GOA_AUTHORIZER (authorizer)->priv;
+
+ /* We can't add an Authorization header without an access token. Let the request fail. GData should refresh us if it gets back a
+ * "401 Authorization required" response from Google, and then automatically retry the request. */
+ if (priv->access_token == NULL) {
+ return;
+ }
+
+ authorization = g_string_new ("Bearer ");
+ g_string_append (authorization, priv->access_token);
+
+ /* Use replace here, not append, to make sure there's only one "Authorization" header. */
+ soup_message_headers_replace (message->request_headers, "Authorization", authorization->str);
+
+ g_string_free (authorization, TRUE);
+}
+
+static void
+gdata_goa_authorizer_add_authorization (GDataAuthorizer *authorizer, SoupMessage *message)
+{
+ GDataGoaAuthorizerPrivate *priv;
+
+ /* This MUST be called with the mutex already locked. */
+
+ priv = GDATA_GOA_AUTHORIZER (authorizer)->priv;
+
+ /* Only support OAuth 2.0. OAuth 1.0 was deprecated in 2012. */
+ if (goa_object_peek_oauth2_based (priv->goa_object) != NULL) {
+ gdata_goa_authorizer_add_oauth2_authorization (authorizer, message);
+ } else {
+ g_warn_if_reached ();
+ }
+}
+
+static gboolean
+gdata_goa_authorizer_is_authorized (GDataAuthorizer *authorizer, GDataAuthorizationDomain *domain)
+{
+ /* This MUST be called with the mutex already locked. */
+
+ if (domain == NULL) {
+ return TRUE;
+ }
+
+ domain = g_hash_table_lookup (GDATA_GOA_AUTHORIZER (authorizer)->priv->authorization_domains, domain);
+
+ return (domain != NULL);
+}
+
+static void
+add_authorization_domains (GDataGoaAuthorizer *self, GType service_type)
+{
+ GList/*<GDataAuthorizationDomain>*/ *domains;
+
+ domains = gdata_service_get_authorization_domains (service_type);
+
+ while (domains != NULL) {
+ g_hash_table_insert (self->priv->authorization_domains, g_object_ref (domains->data), domains->data);
+ domains = g_list_delete_link (domains, domains);
+ }
+}
+
+static void
+gdata_goa_authorizer_set_goa_object (GDataGoaAuthorizer *self, GoaObject *goa_object)
+{
+ g_return_if_fail (GOA_IS_OBJECT (goa_object));
+ g_return_if_fail (self->priv->goa_object == NULL);
+
+ self->priv->goa_object = g_object_ref (goa_object);
+
+ /* Add authorisation domains for all the services supported by our GoaObject. */
+ if (goa_object_peek_calendar (goa_object) != NULL) {
+ add_authorization_domains (self, GDATA_TYPE_CALENDAR_SERVICE);
+ }
+
+ if (goa_object_peek_contacts (goa_object) != NULL) {
+ add_authorization_domains (self, GDATA_TYPE_CONTACTS_SERVICE);
+ }
+
+ if (goa_object_peek_documents (goa_object) != NULL || goa_object_peek_files (goa_object) != NULL) {
+ add_authorization_domains (self, GDATA_TYPE_DOCUMENTS_SERVICE);
+ }
+
+ if (goa_object_peek_photos (goa_object) != NULL) {
+ add_authorization_domains (self, GDATA_TYPE_PICASAWEB_SERVICE);
+ }
+}
+
+static void
+gdata_goa_authorizer_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ switch (property_id) {
+ case PROP_GOA_OBJECT:
+ gdata_goa_authorizer_set_goa_object (GDATA_GOA_AUTHORIZER (object), g_value_get_object (value));
+ return;
+ default:
+ g_assert_not_reached ();
+ }
+
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+}
+
+static void
+gdata_goa_authorizer_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ switch (property_id) {
+ case PROP_GOA_OBJECT:
+ g_value_set_object (value, gdata_goa_authorizer_get_goa_object (GDATA_GOA_AUTHORIZER (object)));
+ return;
+ default:
+ g_assert_not_reached ();
+ }
+
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+}
+
+static void
+gdata_goa_authorizer_dispose (GObject *object)
+{
+ GDataGoaAuthorizerPrivate *priv;
+
+ priv = GDATA_GOA_AUTHORIZER (object)->priv;
+
+ g_clear_object (&priv->goa_object);
+ g_hash_table_remove_all (priv->authorization_domains);
+
+ /* Chain up to parent's dispose() method. */
+ G_OBJECT_CLASS (gdata_goa_authorizer_parent_class)->dispose (object);
+}
+
+static void
+gdata_goa_authorizer_finalize (GObject *object)
+{
+ GDataGoaAuthorizerPrivate *priv;
+
+ priv = GDATA_GOA_AUTHORIZER (object)->priv;
+
+ g_free (priv->access_token);
+ g_free (priv->access_token_secret);
+ g_hash_table_destroy (priv->authorization_domains);
+
+ /* Chain up to parent's finalize() method. */
+ G_OBJECT_CLASS (gdata_goa_authorizer_parent_class)->finalize (object);
+}
+
+static void
+gdata_goa_authorizer_process_request (GDataAuthorizer *authorizer, GDataAuthorizationDomain *domain, SoupMessage *message)
+{
+ g_mutex_lock (&mutex);
+
+ if (gdata_goa_authorizer_is_authorized (authorizer, domain)) {
+ gdata_goa_authorizer_add_authorization (authorizer, message);
+ }
+
+ g_mutex_unlock (&mutex);
+}
+
+static gboolean
+gdata_goa_authorizer_is_authorized_for_domain (GDataAuthorizer *authorizer, GDataAuthorizationDomain *domain)
+{
+ gboolean authorized;
+
+ g_mutex_lock (&mutex);
+
+ authorized = gdata_goa_authorizer_is_authorized (authorizer, domain);
+
+ g_mutex_unlock (&mutex);
+
+ return authorized;
+}
+
+static gboolean
+gdata_goa_authorizer_refresh_authorization (GDataAuthorizer *authorizer, GCancellable *cancellable, GError **error)
+{
+ GDataGoaAuthorizerPrivate *priv;
+ GoaOAuth2Based *goa_oauth2_based;
+ GoaAccount *goa_account;
+ gboolean success = FALSE;
+
+ priv = GDATA_GOA_AUTHORIZER (authorizer)->priv;
+
+ g_mutex_lock (&mutex);
+
+ g_free (priv->access_token);
+ priv->access_token = NULL;
+
+ g_free (priv->access_token_secret);
+ priv->access_token_secret = NULL;
+
+ goa_account = goa_object_get_account (priv->goa_object);
+ goa_oauth2_based = goa_object_get_oauth2_based (priv->goa_object);
+
+ success = goa_account_call_ensure_credentials_sync (goa_account, NULL, cancellable, error);
+
+ if (success == FALSE) {
+ goto exit;
+ }
+
+ /* Only support OAuth 2.0. */
+ if (goa_oauth2_based != NULL) {
+ success = goa_oauth2_based_call_get_access_token_sync (goa_oauth2_based, &priv->access_token, NULL, cancellable, error);
+ } else {
+ g_warn_if_reached (); /* should never happen */
+ }
+
+exit:
+ g_clear_object (&goa_account);
+ g_clear_object (&goa_oauth2_based);
+
+ g_mutex_unlock (&mutex);
+
+ return success;
+}
+
+static void
+gdata_goa_authorizer_class_init (GDataGoaAuthorizerClass *class)
+{
+ GObjectClass *object_class;
+
+ g_type_class_add_private (class, sizeof (GDataGoaAuthorizerPrivate));
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->set_property = gdata_goa_authorizer_set_property;
+ object_class->get_property = gdata_goa_authorizer_get_property;
+ object_class->dispose = gdata_goa_authorizer_dispose;
+ object_class->finalize = gdata_goa_authorizer_finalize;
+
+ /**
+ * GDataGoaAuthorizer:goa-object:
+ *
+ * The GOA account providing authentication. This should have all the necessary services enabled on it.
+ *
+ * Since: 0.13.1
+ */
+ g_object_class_install_property (object_class, PROP_GOA_OBJECT,
+ g_param_spec_object ("goa-object", "GOA object", "The GOA account providing authentication.",
+ GOA_TYPE_OBJECT, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_goa_authorizer_interface_init (GDataAuthorizerInterface *interface)
+{
+ interface->process_request = gdata_goa_authorizer_process_request;
+ interface->is_authorized_for_domain = gdata_goa_authorizer_is_authorized_for_domain;
+ interface->refresh_authorization = gdata_goa_authorizer_refresh_authorization;
+}
+
+static void
+gdata_goa_authorizer_init (GDataGoaAuthorizer *authorizer)
+{
+ GHashTable *authorization_domains;
+
+ authorization_domains = g_hash_table_new_full ((GHashFunc) g_direct_hash, (GEqualFunc) g_direct_equal,
+ (GDestroyNotify) g_object_unref, (GDestroyNotify) NULL);
+
+ authorizer->priv = G_TYPE_INSTANCE_GET_PRIVATE (authorizer, GDATA_TYPE_GOA_AUTHORIZER, GDataGoaAuthorizerPrivate);
+ authorizer->priv->authorization_domains = authorization_domains;
+}
+
+/**
+ * gdata_goa_authorizer_new:
+ * @goa_object: (transfer none): the GOA account providing authentication
+ *
+ * Create a new #GDataGoaAuthorizer using the authentication token from the given @goa_object.
+ *
+ * Return value: (transfer full): a new #GDataGoaAuthorizer; unref with g_object_unref()
+ *
+ * Since: 0.13.1
+ */
+GDataGoaAuthorizer *
+gdata_goa_authorizer_new (GoaObject *goa_object)
+{
+ g_return_val_if_fail (GOA_IS_OBJECT (goa_object), NULL);
+
+ return g_object_new (GDATA_TYPE_GOA_AUTHORIZER, "goa-object", goa_object, NULL);
+}
+
+/**
+ * gdata_goa_authorizer_get_goa_object:
+ * @self: a #GDataGoaAuthorizer
+ *
+ * The GOA account providing authentication. This is the same as #GDataGoaAuthorizer:goa-object.
+ *
+ * Return value: (transfer none): the GOA account providing authentication
+ *
+ * Since: 0.13.1
+ */
+GoaObject *
+gdata_goa_authorizer_get_goa_object (GDataGoaAuthorizer *self)
+{
+ g_return_val_if_fail (GDATA_IS_GOA_AUTHORIZER (self), NULL);
+
+ return self->priv->goa_object;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Matthew Barnes 2011 <mbarnes@redhat.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_GOA_AUTHORIZER_H
+#define GDATA_GOA_AUTHORIZER_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#define GOA_API_IS_SUBJECT_TO_CHANGE
+#include <goa/goa.h>
+
+/* Standard GObject macros */
+#define GDATA_TYPE_GOA_AUTHORIZER (gdata_goa_authorizer_get_type ())
+#define GDATA_GOA_AUTHORIZER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDATA_TYPE_GOA_AUTHORIZER, GDataGoaAuthorizer))
+#define GDATA_GOA_AUTHORIZER_CLASS(cls) (G_TYPE_CHECK_CLASS_CAST ((cls), GDATA_TYPE_GOA_AUTHORIZER, GDataGoaAuthorizerClass))
+#define GDATA_IS_GOA_AUTHORIZER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDATA_TYPE_GOA_AUTHORIZER))
+#define GDATA_IS_GOA_AUTHORIZER_CLASS(cls) (G_TYPE_CHECK_CLASS_TYPE ((cls), GDATA_TYPE_GOA_AUTHORIZER))
+#define GDATA_GOA_AUTHORIZER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDATA_TYPE_GOA_AUTHORIZER, GDataGoaAuthorizerClass))
+
+G_BEGIN_DECLS
+
+typedef struct _GDataGoaAuthorizerPrivate GDataGoaAuthorizerPrivate;
+
+/**
+ * GDataGoaAuthorizer:
+ *
+ * All the fields in the #GDataGoaAuthorizer structure are private and should never be accessed directly.
+ *
+ * Since: 0.13.1
+ */
+typedef struct {
+ /*< private >*/
+ GObject parent;
+ GDataGoaAuthorizerPrivate *priv;
+} GDataGoaAuthorizer;
+
+/**
+ * GDataGoaAuthorizerClass:
+ *
+ * All the fields in the #GDataGoaAuthorizerClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.13.1
+ */
+typedef struct {
+ /*< private >*/
+ GObjectClass parent_class;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataGoaAuthorizerClass;
+
+GType gdata_goa_authorizer_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataGoaAuthorizer, g_object_unref)
+
+GDataGoaAuthorizer *gdata_goa_authorizer_new (GoaObject *goa_object) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+GoaObject *gdata_goa_authorizer_get_goa_object (GDataGoaAuthorizer *self) G_GNUC_PURE;
+
+G_END_DECLS
+
+#endif /* GDATA_GOA_AUTHORIZER_H */
--- /dev/null
+gdata_goa_authorizer_get_type
+gdata_goa_authorizer_new
+gdata_goa_authorizer_get_goa_object
--- /dev/null
+VOID:OBJECT,OBJECT,POINTER
+STRING:OBJECT,STRING
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2011 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-oauth1-authorizer
+ * @short_description: GData OAuth 1.0 authorization interface
+ * @stability: Stable
+ * @include: gdata/gdata-oauth1-authorizer.h
+ *
+ * OAuth 1.0 has been deprecated since 2012, and OAuth 2.0 (#GDataOAuth2Authorizer) should be used instead.
+ *
+ * #GDataOAuth1Authorizer provides an implementation of the #GDataAuthorizer interface for authentication and authorization using the
+ * <ulink type="http" url="http://code.google.com/apis/accounts/docs/OAuthForInstalledApps.html">OAuth 1.0</ulink> process,
+ * which was preferred by Google until OAuth 2.0 was released — it is now
+ * preferred to use #GDataOAuth2Authorizer.
+ *
+ * OAuth 1.0 replaces the deprecated ClientLogin process. One of the main reasons for this is to allow two-factor authentication to be supported, by
+ * moving the authentication interface to a web page under Google's control.
+ *
+ * The OAuth 1.0 process as implemented by Google follows the <ulink type="http" url="http://tools.ietf.org/html/rfc5849">OAuth 1.0 protocol as
+ * specified by IETF in RFC 5849</ulink>, with a few additions to support scopes (implemented in libgdata by #GDataAuthorizationDomains),
+ * locales and custom domains. Briefly, the process is initiated by requesting an authenticated request token from the Google accounts service
+ * (using gdata_oauth1_authorizer_request_authentication_uri()), going to the authentication URI for the request token, authenticating and authorizing
+ * access to the desired scopes, then providing the verifier returned by Google to the Google accounts service again (using
+ * gdata_oauth1_authorizer_request_authorization()) to authorize the token. This results in an access token which is attached to all future requests
+ * to the online service.
+ *
+ * While Google supports unregistered and registered modes for OAuth 1.0 authorization, it only supports unregistered mode for installed applications.
+ * Consequently, libgdata also only supports unregistered mode. For this purpose, the application name to be presented to the user on the
+ * authentication page at the URI returned by gdata_oauth1_authorizer_request_authentication_uri() can be specified when constructing the
+ * #GDataOAuth1Authorizer.
+ *
+ * As described, each authentication/authorization operation is in two parts: gdata_oauth1_authorizer_request_authentication_uri() and
+ * gdata_oauth1_authorizer_request_authorization(). #GDataOAuth1Authorizer stores no state about ongoing authentication operations (i.e. ones which
+ * have successfully called gdata_oauth1_authorizer_request_authentication_uri(), but are yet to successfully call
+ * gdata_oauth1_authorizer_request_authorization()). Consequently, operations can be abandoned before calling
+ * gdata_oauth1_authorizer_request_authorization() without problems. The only state necessary between the calls is the request token and request token
+ * secret, as returned by gdata_oauth1_authorizer_request_authentication_uri() and taken as parameters to
+ * gdata_oauth1_authorizer_request_authorization().
+ *
+ * #GDataOAuth1Authorizer natively supports authorization against multiple services in a single authorization request (unlike
+ * #GDataClientLoginAuthorizer).
+ *
+ * Each access token is long lived, so reauthorization is rarely necessary with #GDataOAuth1Authorizer. Consequently, refreshing authorization using
+ * gdata_authorizer_refresh_authorization() is not supported by #GDataOAuth1Authorizer, and will immediately return %FALSE with no error set.
+ *
+ * <example>
+ * <title>Authenticating Asynchronously Using OAuth 1.0</title>
+ * <programlisting>
+ * GDataSomeService *service;
+ * GDataOAuth1Authorizer *authorizer;
+ *
+ * /<!-- -->* Create an authorizer and authenticate and authorize the service we're using, asynchronously. *<!-- -->/
+ * authorizer = gdata_oauth1_authorizer_new (_("My libgdata application"), GDATA_TYPE_SOME_SERVICE);
+ * gdata_oauth1_authorizer_request_authentication_uri_async (authorizer, cancellable,
+ * (GAsyncReadyCallback) request_authentication_uri_cb, user_data);
+ *
+ * /<!-- -->* Create a service object and link it with the authorizer *<!-- -->/
+ * service = gdata_some_service_new (GDATA_AUTHORIZER (authorizer));
+ *
+ * static void
+ * request_authentication_uri_cb (GDataOAuth1Authorizer *authorizer, GAsyncResult *async_result, gpointer user_data)
+ * {
+ * gchar *authentication_uri, *token, *token_secret, *verifier;
+ * GError *error = NULL;
+ *
+ * authentication_uri = gdata_oauth1_authorizer_request_authentication_uri_finish (authorizer, async_result, &token, &token_secret,
+ * &error);
+ *
+ * if (error != NULL) {
+ * /<!-- -->* Notify the user of all errors except cancellation errors *<!-- -->/
+ * if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
+ * g_error ("Requesting a token failed: %s", error->message);
+ * }
+ *
+ * g_error_free (error);
+ * goto finish;
+ * }
+ *
+ * /<!-- -->* (Present the page at the authentication URI to the user, either in an embedded or stand-alone web browser, and
+ * * ask them to grant access to the application and return the verifier Google gives them.) *<!-- -->/
+ * verifier = ask_user_for_verifier (authentication_uri);
+ *
+ * gdata_oauth1_authorizer_request_authorization_async (authorizer, token, token_secret, verifier, cancellable,
+ * (GAsyncReadyCallback) request_authorization_cb, user_data);
+ *
+ * finish:
+ * g_free (verifier);
+ * g_free (authentication_uri);
+ * g_free (token);
+ *
+ * /<!-- -->* Zero out the secret before freeing. *<!-- -->/
+ * if (token_secret != NULL) {
+ * memset (token_secret, 0, strlen (token_secret));
+ * }
+ *
+ * g_free (token_secret);
+ * }
+ *
+ * static void
+ * request_authorization_cb (GDataOAuth1Authorizer *authorizer, GAsyncResult *async_result, gpointer user_data)
+ * {
+ * GError *error = NULL;
+ *
+ * if (gdata_oauth1_authorizer_request_authorization_finish (authorizer, async_result, &error) == FALSE) {
+ * /<!-- -->* Notify the user of all errors except cancellation errors *<!-- -->/
+ * if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
+ * g_error ("Authorization failed: %s", error->message);
+ * }
+ *
+ * g_error_free (error);
+ * return;
+ * }
+ *
+ * /<!-- -->* (The client is now authenticated and authorized against the service.
+ * * It can now proceed to execute queries on the service object which require the user to be authenticated.) *<!-- -->/
+ * }
+ *
+ * g_object_unref (service);
+ * g_object_unref (authorizer);
+ * </programlisting>
+ * </example>
+ *
+ * Since: 0.9.0
+ */
+
+#include <config.h>
+#include <string.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+
+#ifdef ENABLE_OAUTH1
+#include <oauth.h>
+#endif
+
+#include "gdata-oauth1-authorizer.h"
+#include "gdata-private.h"
+
+#define HMAC_SHA1_LEN 20 /* bytes, raw */
+
+static void authorizer_init (GDataAuthorizerInterface *iface);
+static void dispose (GObject *object);
+static void finalize (GObject *object);
+static void get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+
+static void process_request (GDataAuthorizer *self, GDataAuthorizationDomain *domain, SoupMessage *message);
+static gboolean is_authorized_for_domain (GDataAuthorizer *self, GDataAuthorizationDomain *domain);
+
+static void sign_message (GDataOAuth1Authorizer *self, SoupMessage *message, const gchar *token, const gchar *token_secret, GHashTable *parameters);
+
+static void notify_proxy_uri_cb (GObject *object, GParamSpec *pspec, GDataOAuth1Authorizer *self);
+static void notify_timeout_cb (GObject *gobject, GParamSpec *pspec, GObject *self);
+
+static SoupURI *_get_proxy_uri (GDataOAuth1Authorizer *self);
+static void _set_proxy_uri (GDataOAuth1Authorizer *self, SoupURI *proxy_uri);
+
+struct _GDataOAuth1AuthorizerPrivate {
+ SoupSession *session;
+ SoupURI *proxy_uri; /* cached version only set if gdata_oauth1_authorizer_get_proxy_uri() is called */
+ GProxyResolver *proxy_resolver;
+
+ gchar *application_name;
+ gchar *locale;
+
+ GMutex mutex; /* mutex for token, token_secret and authorization_domains */
+
+ /* Note: This is the access token, not the request token returned by gdata_oauth1_authorizer_request_authentication_uri().
+ * It's NULL iff the authorizer isn't authenticated. token_secret must be NULL iff token is NULL. */
+ gchar *token;
+ GDataSecureString token_secret; /* must be allocated by _gdata_service_secure_strdup() */
+
+ /* Mapping from GDataAuthorizationDomain to itself; a set of domains for which ->access_token is valid. */
+ GHashTable *authorization_domains;
+};
+
+enum {
+ PROP_APPLICATION_NAME = 1,
+ PROP_LOCALE,
+ PROP_PROXY_URI,
+ PROP_TIMEOUT,
+ PROP_PROXY_RESOLVER,
+};
+
+G_DEFINE_TYPE_WITH_CODE (GDataOAuth1Authorizer, gdata_oauth1_authorizer, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_AUTHORIZER, authorizer_init))
+
+static void
+gdata_oauth1_authorizer_class_init (GDataOAuth1AuthorizerClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataOAuth1AuthorizerPrivate));
+
+ gobject_class->get_property = get_property;
+ gobject_class->set_property = set_property;
+ gobject_class->dispose = dispose;
+ gobject_class->finalize = finalize;
+
+ /**
+ * GDataOAuth1Authorizer:application-name:
+ *
+ * The human-readable, translated application name for the client, to be presented to the user on the authentication page at the URI
+ * returned by gdata_oauth1_authorizer_request_authentication_uri().
+ *
+ * If %NULL is provided in the constructor to #GDataOAuth1Authorizer, the value returned by g_get_application_name() will be used as a
+ * fallback. Note that this may also be %NULL: in this case, the authentication page will use the application name “anonymous”.
+ *
+ * Since: 0.9.0
+ */
+ g_object_class_install_property (gobject_class, PROP_APPLICATION_NAME,
+ g_param_spec_string ("application-name",
+ "Application name", "The human-readable, translated application name for the client.",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataOAuth1Authorizer:locale:
+ *
+ * The locale to use for network requests, in Unix locale format. (e.g. "en_GB", "cs", "de_DE".) Use %NULL for the default "C" locale
+ * (typically "en_US").
+ *
+ * This locale will be used by the server-side software to localise the authentication and authorization pages at the URI returned by
+ * gdata_oauth1_authorizer_request_authentication_uri().
+ *
+ * The server-side behaviour is undefined if it doesn't support a given locale.
+ *
+ * Since: 0.9.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LOCALE,
+ g_param_spec_string ("locale",
+ "Locale", "The locale to use for network requests, in Unix locale format.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataOAuth1Authorizer:proxy-uri:
+ *
+ * The proxy URI used internally for all network requests.
+ *
+ * Since: 0.9.0
+ * Deprecated: 0.15.0: Use #GDataClientLoginAuthorizer:proxy-resolver instead, which gives more flexibility over the proxy used.
+ */
+ g_object_class_install_property (gobject_class, PROP_PROXY_URI,
+ g_param_spec_boxed ("proxy-uri",
+ "Proxy URI", "The proxy URI used internally for all network requests.",
+ SOUP_TYPE_URI,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataOAuth1Authorizer:timeout:
+ *
+ * A timeout, in seconds, for network operations. If the timeout is exceeded, the operation will be cancelled and
+ * %GDATA_SERVICE_ERROR_NETWORK_ERROR will be returned.
+ *
+ * If the timeout is <code class="literal">0</code>, operations will never time out.
+ *
+ * Since: 0.9.0
+ */
+ g_object_class_install_property (gobject_class, PROP_TIMEOUT,
+ g_param_spec_uint ("timeout",
+ "Timeout", "A timeout, in seconds, for network operations.",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataOAuth1Authorizer:proxy-resolver:
+ *
+ * The #GProxyResolver used to determine a proxy URI. Setting this will clear the #GDataOAuth1Authorizer:proxy-uri property.
+ *
+ * Since: 0.15.0
+ */
+ g_object_class_install_property (gobject_class, PROP_PROXY_RESOLVER,
+ g_param_spec_object ("proxy-resolver",
+ "Proxy Resolver", "A GProxyResolver used to determine a proxy URI.",
+ G_TYPE_PROXY_RESOLVER,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+authorizer_init (GDataAuthorizerInterface *iface)
+{
+ iface->process_request = process_request;
+ iface->is_authorized_for_domain = is_authorized_for_domain;
+}
+
+static void
+gdata_oauth1_authorizer_init (GDataOAuth1Authorizer *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_OAUTH1_AUTHORIZER, GDataOAuth1AuthorizerPrivate);
+
+ /* Set up the authorizer's mutex */
+ g_mutex_init (&(self->priv->mutex));
+ self->priv->authorization_domains = g_hash_table_new_full (g_direct_hash, g_direct_equal, g_object_unref, NULL);
+
+ /* Set up the session */
+ self->priv->session = _gdata_service_build_session ();
+
+ /* Proxy the SoupSession's proxy-uri and timeout properties */
+ g_signal_connect (self->priv->session, "notify::proxy-uri", (GCallback) notify_proxy_uri_cb, self);
+ g_signal_connect (self->priv->session, "notify::timeout", (GCallback) notify_timeout_cb, self);
+
+ /* Keep our GProxyResolver synchronized with SoupSession's. */
+ g_object_bind_property (self->priv->session, "proxy-resolver", self, "proxy-resolver", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
+}
+
+static void
+dispose (GObject *object)
+{
+ GDataOAuth1AuthorizerPrivate *priv = GDATA_OAUTH1_AUTHORIZER (object)->priv;
+
+ if (priv->session != NULL)
+ g_object_unref (priv->session);
+ priv->session = NULL;
+
+ g_clear_object (&priv->proxy_resolver);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_oauth1_authorizer_parent_class)->dispose (object);
+}
+
+static void
+finalize (GObject *object)
+{
+ GDataOAuth1AuthorizerPrivate *priv = GDATA_OAUTH1_AUTHORIZER (object)->priv;
+
+ g_free (priv->application_name);
+ g_free (priv->locale);
+
+ g_hash_table_destroy (priv->authorization_domains);
+ g_mutex_clear (&(priv->mutex));
+
+ if (priv->proxy_uri != NULL) {
+ soup_uri_free (priv->proxy_uri);
+ }
+
+ g_free (priv->token);
+ _gdata_service_secure_strfree (priv->token_secret);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_oauth1_authorizer_parent_class)->finalize (object);
+}
+
+static void
+get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataOAuth1AuthorizerPrivate *priv = GDATA_OAUTH1_AUTHORIZER (object)->priv;
+
+ switch (property_id) {
+ case PROP_APPLICATION_NAME:
+ g_value_set_string (value, priv->application_name);
+ break;
+ case PROP_LOCALE:
+ g_value_set_string (value, priv->locale);
+ break;
+ case PROP_PROXY_URI:
+ g_value_set_boxed (value, _get_proxy_uri (GDATA_OAUTH1_AUTHORIZER (object)));
+ break;
+ case PROP_TIMEOUT:
+ g_value_set_uint (value, gdata_oauth1_authorizer_get_timeout (GDATA_OAUTH1_AUTHORIZER (object)));
+ break;
+ case PROP_PROXY_RESOLVER:
+ g_value_set_object (value, gdata_oauth1_authorizer_get_proxy_resolver (GDATA_OAUTH1_AUTHORIZER (object)));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataOAuth1AuthorizerPrivate *priv = GDATA_OAUTH1_AUTHORIZER (object)->priv;
+
+ switch (property_id) {
+ /* Construct only */
+ case PROP_APPLICATION_NAME:
+ priv->application_name = g_value_dup_string (value);
+
+ /* Default to the value of g_get_application_name() */
+ if (priv->application_name == NULL || *(priv->application_name) == '\0') {
+ g_free (priv->application_name);
+ priv->application_name = g_strdup (g_get_application_name ());
+ }
+
+ break;
+ case PROP_LOCALE:
+ gdata_oauth1_authorizer_set_locale (GDATA_OAUTH1_AUTHORIZER (object), g_value_get_string (value));
+ break;
+ case PROP_PROXY_URI:
+ _set_proxy_uri (GDATA_OAUTH1_AUTHORIZER (object), g_value_get_boxed (value));
+ break;
+ case PROP_TIMEOUT:
+ gdata_oauth1_authorizer_set_timeout (GDATA_OAUTH1_AUTHORIZER (object), g_value_get_uint (value));
+ break;
+ case PROP_PROXY_RESOLVER:
+ gdata_oauth1_authorizer_set_proxy_resolver (GDATA_OAUTH1_AUTHORIZER (object), g_value_get_object (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+process_request (GDataAuthorizer *self, GDataAuthorizationDomain *domain, SoupMessage *message)
+{
+ GDataOAuth1AuthorizerPrivate *priv = GDATA_OAUTH1_AUTHORIZER (self)->priv;
+
+ /* Set the authorisation header */
+ g_mutex_lock (&(priv->mutex));
+
+ /* Sanity check */
+ g_assert ((priv->token == NULL) == (priv->token_secret == NULL));
+
+ if (priv->token != NULL && g_hash_table_lookup (priv->authorization_domains, domain) != NULL) {
+ sign_message (GDATA_OAUTH1_AUTHORIZER (self), message, priv->token, priv->token_secret, NULL);
+ }
+
+ g_mutex_unlock (&(priv->mutex));
+}
+
+static gboolean
+is_authorized_for_domain (GDataAuthorizer *self, GDataAuthorizationDomain *domain)
+{
+ GDataOAuth1AuthorizerPrivate *priv = GDATA_OAUTH1_AUTHORIZER (self)->priv;
+ gpointer result;
+ const gchar *token;
+
+ g_mutex_lock (&(priv->mutex));
+ token = priv->token;
+ result = g_hash_table_lookup (priv->authorization_domains, domain);
+ g_mutex_unlock (&(priv->mutex));
+
+ /* Sanity check */
+ g_assert (result == NULL || result == domain);
+
+ return (token != NULL && result != NULL) ? TRUE : FALSE;
+}
+
+/* Sign the message and add the Authorization header to it containing the signature.
+ * NOTE: This must not lock priv->mutex, as it's called from within a critical section in process_request() and priv->mutex isn't recursive. */
+static void
+sign_message (GDataOAuth1Authorizer *self, SoupMessage *message, const gchar *token, const gchar *token_secret, GHashTable *parameters)
+{
+#ifdef ENABLE_OAUTH1
+ GHashTableIter iter;
+ const gchar *key, *value, *consumer_key, *consumer_secret, *signature_method;
+ gsize params_length = 0;
+ GList *sorted_params = NULL, *i;
+ GString *query_string, *signature_base_string, *secret_string, *authorization_header;
+ SoupURI *normalised_uri;
+ gchar *uri, *signature, *timestamp;
+ char *nonce;
+ gboolean is_first = TRUE;
+ GTimeVal time_val;
+ guchar signature_buf[HMAC_SHA1_LEN];
+ gsize signature_buf_len;
+ GHmac *signature_hmac;
+
+ g_return_if_fail (GDATA_IS_OAUTH1_AUTHORIZER (self));
+ g_return_if_fail (SOUP_IS_MESSAGE (message));
+ g_return_if_fail (token == NULL || *token != '\0');
+ g_return_if_fail (token_secret == NULL || *token_secret != '\0');
+ g_return_if_fail ((token == NULL) == (token_secret == NULL));
+
+ /* Build and return a HMAC-SHA1 signature for the given SoupMessage. We always use HMAC-SHA1, since installed applications have to be
+ * unregistered (see: http://code.google.com/apis/accounts/docs/OAuth_ref.html#SigningOAuth).
+ * Reference: http://tools.ietf.org/html/rfc5849#section-3.4 */
+ signature_method = "HMAC-SHA1";
+
+ /* As described here, we use an anonymous consumer key and secret, since we're designed for installed applications:
+ * http://code.google.com/apis/accounts/docs/OAuth_ref.html#SigningOAuth */
+ consumer_key = "anonymous";
+ consumer_secret = "anonymous";
+
+ /* Add various standard parameters to the list (note: this modifies the hash table belonging to the caller) */
+ nonce = oauth_gen_nonce ();
+ g_get_current_time (&time_val);
+ timestamp = g_strdup_printf ("%li", time_val.tv_sec);
+
+ if (parameters == NULL) {
+ parameters = g_hash_table_new (g_str_hash, g_str_equal);
+ } else {
+ g_hash_table_ref (parameters);
+ }
+
+ g_hash_table_insert (parameters, (gpointer) "oauth_signature_method", (gpointer) signature_method);
+ g_hash_table_insert (parameters, (gpointer) "oauth_consumer_key", (gpointer) consumer_key);
+ g_hash_table_insert (parameters, (gpointer) "oauth_nonce", nonce);
+ g_hash_table_insert (parameters, (gpointer) "oauth_timestamp", timestamp);
+ g_hash_table_insert (parameters, (gpointer) "oauth_version", (gpointer) "1.0");
+
+ /* Only add the token if it's been provided */
+ if (token != NULL) {
+ g_hash_table_insert (parameters, (gpointer) "oauth_token", (gpointer) token);
+ }
+
+ /* Sort the parameters and build a query string, as defined here: http://tools.ietf.org/html/rfc5849#section-3.4.1.3 */
+ g_hash_table_iter_init (&iter, parameters);
+
+ while (g_hash_table_iter_next (&iter, (gpointer*) &key, (gpointer*) &value) == TRUE) {
+ GString *pair = g_string_new (NULL);
+
+ g_string_append_uri_escaped (pair, key, NULL, FALSE);
+ g_string_append_c (pair, '=');
+ g_string_append_uri_escaped (pair, value, NULL, FALSE);
+
+ /* Append the pair to the list for sorting, and keep track of the total length of the strings in the list so far */
+ params_length += pair->len + 1 /* sep */;
+ sorted_params = g_list_prepend (sorted_params, g_string_free (pair, FALSE));
+ }
+
+ g_hash_table_unref (parameters);
+
+ sorted_params = g_list_sort (sorted_params, (GCompareFunc) g_strcmp0);
+
+ /* Concatenate the parameters to give the query string */
+ query_string = g_string_sized_new (params_length);
+
+ for (i = sorted_params; i != NULL; i = i->next) {
+ if (is_first == FALSE) {
+ g_string_append_c (query_string, '&');
+ }
+
+ g_string_append (query_string, i->data);
+
+ g_free (i->data);
+ is_first = FALSE;
+ }
+
+ g_list_free (sorted_params);
+
+ /* Normalise the URI as described here: http://tools.ietf.org/html/rfc5849#section-3.4.1.2 */
+ normalised_uri = soup_uri_copy (soup_message_get_uri (message));
+ soup_uri_set_query (normalised_uri, NULL);
+ soup_uri_set_fragment (normalised_uri, NULL);
+
+ /* Append it to the signature base string */
+ uri = soup_uri_to_string (normalised_uri, FALSE);
+
+ /* Start building the signature base string as described here: http://tools.ietf.org/html/rfc5849#section-3.4.1.1 */
+ signature_base_string = g_string_sized_new (4 /* method */ + 1 /* sep */ + strlen (uri) + 1 /* sep */ + params_length /* query string */);
+ g_string_append_uri_escaped (signature_base_string, message->method, NULL, FALSE);
+ g_string_append_c (signature_base_string, '&');
+ g_string_append_uri_escaped (signature_base_string, uri, NULL, FALSE);
+ g_string_append_c (signature_base_string, '&');
+ g_string_append_uri_escaped (signature_base_string, query_string->str, NULL, FALSE);
+
+ g_free (uri);
+ soup_uri_free (normalised_uri);
+ g_string_free (query_string, TRUE);
+
+ /* Build the secret key to use in the HMAC */
+ secret_string = g_string_new (NULL);
+ g_string_append_uri_escaped (secret_string, consumer_secret, NULL, FALSE);
+ g_string_append_c (secret_string, '&');
+
+ /* Only add token_secret if it was provided */
+ if (token_secret != NULL) {
+ g_string_append_uri_escaped (secret_string, token_secret, NULL, FALSE);
+ }
+
+ /* Create the signature as described here: http://tools.ietf.org/html/rfc5849#section-3.4.2 */
+ signature_hmac = g_hmac_new (G_CHECKSUM_SHA1, (const guchar*) secret_string->str, secret_string->len);
+ g_hmac_update (signature_hmac, (const guchar*) signature_base_string->str, signature_base_string->len);
+
+ signature_buf_len = G_N_ELEMENTS (signature_buf);
+ g_hmac_get_digest (signature_hmac, signature_buf, &signature_buf_len);
+
+ g_hmac_unref (signature_hmac);
+
+ signature = g_base64_encode (signature_buf, signature_buf_len);
+
+ /*g_debug ("Signing message using Signature Base String: “%s” and key “%s” using method “%s” to give signature: “%s”.",
+ signature_base_string->str, secret_string->str, signature_method, signature);*/
+
+ /* Zero out the secret_string before freeing it, to reduce the chance of secrets hitting disk. */
+ memset (secret_string->str, 0, secret_string->allocated_len);
+
+ g_string_free (secret_string, TRUE);
+ g_string_free (signature_base_string, TRUE);
+
+ /* Build the Authorization header and append it to the message */
+ authorization_header = g_string_new ("OAuth oauth_consumer_key=\"");
+ g_string_append_uri_escaped (authorization_header, consumer_key, NULL, FALSE);
+
+ /* Only add the token if it's been provided */
+ if (token != NULL) {
+ g_string_append (authorization_header, "\",oauth_token=\"");
+ g_string_append_uri_escaped (authorization_header, token, NULL, FALSE);
+ }
+
+ g_string_append (authorization_header, "\",oauth_signature_method=\"");
+ g_string_append_uri_escaped (authorization_header, signature_method, NULL, FALSE);
+ g_string_append (authorization_header, "\",oauth_signature=\"");
+ g_string_append_uri_escaped (authorization_header, signature, NULL, FALSE);
+ g_string_append (authorization_header, "\",oauth_timestamp=\"");
+ g_string_append_uri_escaped (authorization_header, timestamp, NULL, FALSE);
+ g_string_append (authorization_header, "\",oauth_nonce=\"");
+ g_string_append_uri_escaped (authorization_header, nonce, NULL, FALSE);
+ g_string_append (authorization_header, "\",oauth_version=\"1.0\"");
+
+ soup_message_headers_replace (message->request_headers, "Authorization", authorization_header->str);
+
+ g_string_free (authorization_header, TRUE);
+ free (signature);
+ g_free (timestamp);
+ free (nonce);
+#endif /* ENABLE_OAUTH1 */
+}
+
+/**
+ * gdata_oauth1_authorizer_new:
+ * @application_name: (allow-none): a human-readable, translated application name to use on authentication pages, or %NULL
+ * @service_type: the #GType of a #GDataService subclass which the #GDataOAuth1Authorizer will be used with
+ *
+ * Creates a new #GDataOAuth1Authorizer.
+ *
+ * The #GDataAuthorizationDomains for the given @service_type (i.e. as returned by gdata_service_get_authorization_domains()) are the ones the
+ * user will be requested to authorize access to on the page at the URI returned by gdata_oauth1_authorizer_request_authentication_uri().
+ *
+ * The given @application_name will set the value of #GDataOAuth1Authorizer:application-name and will be displayed to the user on authentication pages
+ * returned by Google. If %NULL is provided, the value of g_get_application_name() will be used as a fallback.
+ *
+ * Return value: (transfer full): a new #GDataOAuth1Authorizer; unref with g_object_unref()
+ *
+ * Since: 0.9.0
+ */
+GDataOAuth1Authorizer *
+gdata_oauth1_authorizer_new (const gchar *application_name, GType service_type)
+{
+ g_return_val_if_fail (g_type_is_a (service_type, GDATA_TYPE_SERVICE), NULL);
+
+ return gdata_oauth1_authorizer_new_for_authorization_domains (application_name, gdata_service_get_authorization_domains (service_type));
+}
+
+/**
+ * gdata_oauth1_authorizer_new_for_authorization_domains:
+ * @application_name: (allow-none): a human-readable, translated application name to use on authentication pages, or %NULL
+ * @authorization_domains: (element-type GDataAuthorizationDomain) (transfer none): a non-empty list of #GDataAuthorizationDomains to be
+ * authorized against by the #GDataOAuth1Authorizer
+ *
+ * Creates a new #GDataOAuth1Authorizer. This function is intended to be used only when the default authorization domain list for a single
+ * #GDataService, as used by gdata_oauth1_authorizer_new(), isn't suitable. For example, this could be because the #GDataOAuth1Authorizer will be used
+ * with multiple #GDataService subclasses, or because the client requires a specific set of authorization domains.
+ *
+ * The specified #GDataAuthorizationDomains are the ones the user will be requested to authorize access to on the page at the URI returned by
+ * gdata_oauth1_authorizer_request_authentication_uri().
+ *
+ * The given @application_name will set the value of #GDataOAuth1Authorizer:application-name and will be displayed to the user on authentication pages
+ * returned by Google. If %NULL is provided, the value of g_get_application_name() will be used as a fallback.
+ *
+ * Return value: (transfer full): a new #GDataOAuth1Authorizer; unref with g_object_unref()
+ *
+ * Since: 0.9.0
+ */
+GDataOAuth1Authorizer *
+gdata_oauth1_authorizer_new_for_authorization_domains (const gchar *application_name, GList *authorization_domains)
+{
+ GList *i;
+ GDataOAuth1Authorizer *authorizer;
+
+ g_return_val_if_fail (authorization_domains != NULL, NULL);
+
+ authorizer = GDATA_OAUTH1_AUTHORIZER (g_object_new (GDATA_TYPE_OAUTH1_AUTHORIZER,
+ "application-name", application_name,
+ NULL));
+
+ /* Register all the domains with the authorizer */
+ for (i = authorization_domains; i != NULL; i = i->next) {
+ g_return_val_if_fail (GDATA_IS_AUTHORIZATION_DOMAIN (i->data), NULL);
+
+ /* We don't have to lock the authoriser's mutex here as no other code has seen the authoriser yet */
+ g_hash_table_insert (authorizer->priv->authorization_domains, g_object_ref (GDATA_AUTHORIZATION_DOMAIN (i->data)), i->data);
+ }
+
+ return authorizer;
+}
+
+/**
+ * gdata_oauth1_authorizer_request_authentication_uri:
+ * @self: a #GDataOAuth1Authorizer
+ * @token: (out callee-allocates): return location for the temporary credentials token returned by the authentication service; free with g_free()
+ * @token_secret: (out callee-allocates): return location for the temporary credentials token secret returned by the authentication service; free with
+ * g_free()
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Requests a fresh unauthenticated token from the Google accounts service and builds and returns the URI of an authentication page for that token.
+ * This should then be presented to the user (e.g. in an embedded or stand alone web browser). The authentication page will ask the user to log in
+ * using their Google account, then ask them to grant access to the #GDataAuthorizationDomains passed to the constructor of the
+ * #GDataOAuth1Authorizer. If the user grants access, they will be given a verifier, which can then be passed to
+ * gdata_oauth1_authorizer_request_authorization() (along with the @token and @token_secret values returned by this method) to authorize the token.
+ *
+ * This method can fail if the server returns an error, but this is unlikely. If it does happen, a %GDATA_SERVICE_ERROR_PROTOCOL_ERROR will be
+ * raised, @token and @token_secret will be set to %NULL and %NULL will be returned.
+ *
+ * This method implements <ulink type="http" url="http://tools.ietf.org/html/rfc5849#section-2.1">Section 2.1</ulink> and
+ * <ulink type="http" url="http://tools.ietf.org/html/rfc5849#section-2.2">Section 2.2</ulink> of the
+ * <ulink type="http" url="http://tools.ietf.org/html/rfc5849">OAuth 1.0 protocol</ulink>.
+ *
+ * When freeing @token_secret, it's advisable to set it to all zeros first, to reduce the chance of the sensitive token being recoverable from the
+ * free memory pool and (accidentally) leaked by a different part of the process. This can be achieved with the following code:
+ * |[
+ * if (token_secret != NULL) {
+ * memset (token_secret, 0, strlen (token_secret));
+ * g_free (token_secret);
+ * }
+ * ]|
+ *
+ * Return value: (transfer full): the URI of an authentication page for the user to use; free with g_free()
+ *
+ * Since: 0.9.0
+ */
+gchar *
+gdata_oauth1_authorizer_request_authentication_uri (GDataOAuth1Authorizer *self, gchar **token, gchar **token_secret,
+ GCancellable *cancellable, GError **error)
+{
+#ifdef ENABLE_OAUTH1
+ GDataOAuth1AuthorizerPrivate *priv;
+ SoupMessage *message;
+ guint status;
+ gchar *request_body;
+ GString *scope_string, *authentication_uri;
+ GHashTable *parameters;
+ GHashTableIter iter;
+ gboolean is_first = TRUE;
+ GDataAuthorizationDomain *domain;
+ GHashTable *response_details;
+ const gchar *callback_uri, *_token, *_token_secret, *callback_confirmed;
+ SoupURI *_uri;
+#endif
+
+ g_return_val_if_fail (GDATA_IS_OAUTH1_AUTHORIZER (self), NULL);
+ g_return_val_if_fail (token != NULL, NULL);
+ g_return_val_if_fail (token_secret != NULL, NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+#ifdef ENABLE_OAUTH1
+ priv = self->priv;
+
+ /* This implements OAuthGetRequestToken and returns the URI for OAuthAuthorizeToken, which the client must then use themselves (e.g. in an
+ * embedded web browser) to authorise the temporary credentials token. They then pass the request token and verification code they get back
+ * from that to gdata_oauth1_authorizer_request_authorization(). */
+
+ /* We default to out-of-band callbacks */
+ callback_uri = "oob";
+
+ /* Set the output parameters to NULL in case of failure */
+ *token = NULL;
+ *token_secret = NULL;
+
+ /* Build up the space-separated list of scopes we're requesting authorisation for */
+ g_mutex_lock (&(priv->mutex));
+
+ scope_string = g_string_new (NULL);
+ g_hash_table_iter_init (&iter, priv->authorization_domains);
+
+ while (g_hash_table_iter_next (&iter, (gpointer*) &domain, NULL) == TRUE) {
+ if (is_first == FALSE) {
+ /* Delimiter */
+ g_string_append_c (scope_string, ' ');
+ }
+
+ g_string_append (scope_string, gdata_authorization_domain_get_scope (domain));
+
+ is_first = FALSE;
+ }
+
+ g_mutex_unlock (&(priv->mutex));
+
+ /* Build the request body and the set of parameters to be signed */
+ parameters = g_hash_table_new (g_str_hash, g_str_equal);
+ g_hash_table_insert (parameters, (gpointer) "scope", scope_string->str);
+ g_hash_table_insert (parameters, (gpointer) "xoauth_displayname", priv->application_name);
+ g_hash_table_insert (parameters, (gpointer) "oauth_callback", (gpointer) callback_uri);
+ request_body = soup_form_encode_hash (parameters);
+
+ /* Build the message */
+ _uri = soup_uri_new ("https://www.google.com/accounts/OAuthGetRequestToken");
+ soup_uri_set_port (_uri, _gdata_service_get_https_port ());
+ message = soup_message_new_from_uri (SOUP_METHOD_POST, _uri);
+ soup_uri_free (_uri);
+
+ soup_message_set_request (message, "application/x-www-form-urlencoded", SOUP_MEMORY_TAKE, request_body, strlen (request_body));
+
+ sign_message (self, message, NULL, NULL, parameters);
+
+ g_hash_table_destroy (parameters);
+ g_string_free (scope_string, TRUE);
+
+ /* Send the message */
+ _gdata_service_actually_send_message (priv->session, message, cancellable, error);
+ status = message->status_code;
+
+ if (status == SOUP_STATUS_CANCELLED) {
+ /* Cancelled (the error has already been set) */
+ g_object_unref (message);
+ return NULL;
+ } else if (status != SOUP_STATUS_OK) {
+ /* Server returned an error. Not much we can do, since the error codes aren't documented and it shouldn't normally ever happen
+ * anyway. */
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ _("The server rejected the temporary credentials request."));
+ g_object_unref (message);
+
+ return NULL;
+ }
+
+ g_assert (message->response_body->data != NULL);
+
+ /* Parse the response. We expect something like:
+ * oauth_token=ab3cd9j4ks73hf7g&oauth_token_secret=ZXhhbXBsZS5jb20&oauth_callback_confirmed=true
+ * See: http://code.google.com/apis/accounts/docs/OAuth_ref.html#RequestToken and
+ * http://tools.ietf.org/html/rfc5849#section-2.1 for details. */
+ response_details = soup_form_decode (message->response_body->data);
+
+ g_object_unref (message);
+
+ _token = g_hash_table_lookup (response_details, "oauth_token");
+ _token_secret = g_hash_table_lookup (response_details, "oauth_token_secret");
+ callback_confirmed = g_hash_table_lookup (response_details, "oauth_callback_confirmed");
+
+ /* Validate the returned values */
+ if (_token == NULL || _token_secret == NULL || callback_confirmed == NULL ||
+ *_token == '\0' || *_token_secret == '\0' ||
+ strcmp (callback_confirmed, "true") != 0) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ _("The server returned a malformed response."));
+ g_hash_table_destroy (response_details);
+
+ return NULL;
+ }
+
+ /* Build the authentication URI which the user will then open in a web browser and use to authenticate and authorise our application.
+ * We expect to build something like this:
+ * https://www.google.com/accounts/OAuthAuthorizeToken?oauth_token=ab3cd9j4ks73hf7g&hd=mycollege.edu&hl=en&btmpl=mobile
+ * See: http://code.google.com/apis/accounts/docs/OAuth_ref.html#GetAuth for more details. */
+ authentication_uri = g_string_new ("https://www.google.com/accounts/OAuthAuthorizeToken?oauth_token=");
+ g_string_append_uri_escaped (authentication_uri, g_hash_table_lookup (response_details, "oauth_token"), NULL, TRUE);
+
+ if (priv->locale != NULL) {
+ g_string_append (authentication_uri, "&hl=");
+ g_string_append_uri_escaped (authentication_uri, priv->locale, NULL, TRUE);
+ }
+
+ /* Return the token and token secret */
+ *token = g_strdup (_token);
+ *token_secret = g_strdup (_token_secret); /* NOTE: Ideally this would be allocated in non-pageable memory, but changing that would break API */
+
+ g_hash_table_destroy (response_details);
+
+ return g_string_free (authentication_uri, FALSE);
+#else /* if !ENABLE_OAUTH1 */
+ *token = NULL;
+ *token_secret = NULL;
+
+ if (!g_cancellable_set_error_if_cancelled (cancellable, error))
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_UNAVAILABLE,
+ _("OAuth 1.0 support is disabled."));
+
+ return NULL;
+#endif
+}
+
+typedef struct {
+ /* All return values */
+ gchar *token;
+ gchar *token_secret; /* NOTE: Ideally this would be allocated in non-pageable memory, but changing that would break API */
+ gchar *authentication_uri;
+} RequestAuthenticationUriAsyncData;
+
+static void
+request_authentication_uri_async_data_free (RequestAuthenticationUriAsyncData *data)
+{
+ g_free (data->token);
+ g_free (data->token_secret);
+ g_free (data->authentication_uri);
+
+ g_slice_free (RequestAuthenticationUriAsyncData, data);
+}
+
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (RequestAuthenticationUriAsyncData, request_authentication_uri_async_data_free)
+
+static void
+request_authentication_uri_thread (GTask *task, gpointer source_object, gpointer task_data, GCancellable *cancellable)
+{
+ GDataOAuth1Authorizer *authorizer = GDATA_OAUTH1_AUTHORIZER (source_object);
+ g_autoptr(RequestAuthenticationUriAsyncData) data = NULL;
+ g_autoptr(GError) error = NULL;
+
+ data = g_slice_new0 (RequestAuthenticationUriAsyncData);
+ data->authentication_uri = gdata_oauth1_authorizer_request_authentication_uri (authorizer, &(data->token), &(data->token_secret),
+ cancellable, &error);
+
+ if (error != NULL)
+ g_task_return_error (task, g_steal_pointer (&error));
+ else
+ g_task_return_pointer (task, g_steal_pointer (&data), (GDestroyNotify) request_authentication_uri_async_data_free);
+}
+
+/**
+ * gdata_oauth1_authorizer_request_authentication_uri_async:
+ * @self: a #GDataOAuth1Authorizer
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when building the URI is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Requests a fresh unauthenticated token from the Google accounts service and builds and returns the URI of an authentication page for that token.
+ * @self is reffed when this method is called, so can safely be unreffed after this method returns.
+ *
+ * For more details, see gdata_oauth1_authorizer_request_authentication_uri(), which is the synchronous version of this method.
+ *
+ * When the operation is finished, @callback will be called. You can then call gdata_oauth1_authorizer_request_authentication_uri_finish() to get the
+ * results of the operation.
+ *
+ * Since: 0.9.0
+ */
+void
+gdata_oauth1_authorizer_request_authentication_uri_async (GDataOAuth1Authorizer *self, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_autoptr(GTask) task = NULL;
+
+ g_return_if_fail (GDATA_IS_OAUTH1_AUTHORIZER (self));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+ g_return_if_fail (callback != NULL);
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_oauth1_authorizer_request_authentication_uri_async);
+ g_task_run_in_thread (task, request_authentication_uri_thread);
+}
+
+/**
+ * gdata_oauth1_authorizer_request_authentication_uri_finish:
+ * @self: a #GDataOAuth1Authorizer
+ * @async_result: a #GAsyncResult
+ * @token: (out callee-allocates): return location for the temporary credentials token returned by the authentication service; free with g_free()
+ * @token_secret: (out callee-allocates): return location for the temporary credentials token secret returned by the authentication service; free with
+ * g_free()
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous authentication URI building operation started with gdata_oauth1_authorizer_request_authentication_uri_async().
+ *
+ * This method can fail if the server has returned an error, but this is unlikely. If it does happen, a %GDATA_SERVICE_ERROR_PROTOCOL_ERROR will be
+ * raised, @token and @token_secret will be set to %NULL and %NULL will be returned.
+ *
+ * When freeing @token_secret, it's advisable to set it to all zeros first, to reduce the chance of the sensitive token being recoverable from the
+ * free memory pool and (accidentally) leaked by a different part of the process. This can be achieved with the following code:
+ * |[
+ * if (token_secret != NULL) {
+ * memset (token_secret, 0, strlen (token_secret));
+ * g_free (token_secret);
+ * }
+ * ]|
+ *
+ * Return value: (transfer full): the URI of an authentication page for the user to use; free with g_free()
+ *
+ * Since: 0.9.0
+ */
+gchar *
+gdata_oauth1_authorizer_request_authentication_uri_finish (GDataOAuth1Authorizer *self, GAsyncResult *async_result, gchar **token,
+ gchar **token_secret, GError **error)
+{
+ g_autoptr(RequestAuthenticationUriAsyncData) data = NULL;
+
+ g_return_val_if_fail (GDATA_IS_OAUTH1_AUTHORIZER (self), NULL);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (async_result), NULL);
+ g_return_val_if_fail (token != NULL, NULL);
+ g_return_val_if_fail (token_secret != NULL, NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+ g_return_val_if_fail (g_task_is_valid (async_result, self), NULL);
+ g_return_val_if_fail (g_async_result_is_tagged (async_result, gdata_oauth1_authorizer_request_authentication_uri_async), NULL);
+
+ data = g_task_propagate_pointer (G_TASK (async_result), error);
+
+ if (data == NULL) {
+ /* Return the error and set all of the output parameters to NULL */
+ *token = NULL;
+ *token_secret = NULL;
+
+ return NULL;
+ }
+
+ /* Success! Transfer the output to the appropriate parameters and nullify it so it doesn't get freed when the async result gets finalised */
+ *token = g_steal_pointer (&data->token);
+ *token_secret = g_steal_pointer (&data->token_secret);
+
+ return g_steal_pointer (&data->authentication_uri);
+}
+
+/**
+ * gdata_oauth1_authorizer_request_authorization:
+ * @self: a #GDataOAuth1Authorizer
+ * @token: the request token returned by gdata_oauth1_authorizer_request_authentication_uri()
+ * @token_secret: the request token secret returned by gdata_oauth1_authorizer_request_authentication_uri()
+ * @verifier: the verifier entered by the user from the authentication page
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Requests authorization of the given request @token from the Google accounts service using the given @verifier as entered by the user from the
+ * authentication page at the URI returned by gdata_oauth1_authorizer_request_authentication_uri(). @token and @token_secret must be the same values
+ * as were returned by gdata_oauth1_authorizer_request_authentication_uri() if it was successful.
+ *
+ * If the verifier is valid (i.e. the user granted access to the application and the Google accounts service has no reason to distrust the client),
+ * %TRUE will be returned and any operations performed from that point onwards on #GDataServices using this #GDataAuthorizer will be
+ * authorized.
+ *
+ * If the user denies access to the application or the Google accounts service distrusts it, a bogus verifier could be returned. In this case, %FALSE
+ * will be returned and a %GDATA_SERVICE_ERROR_FORBIDDEN error will be raised.
+ *
+ * Note that if the user denies access to the application, it may be the case that they have no verifier to enter. In this case, the client can simply
+ * not call this method. The #GDataOAuth1Authorizer stores no state for authentication operations which have succeeded in calling
+ * gdata_oauth1_authorizer_request_authentication_uri() but not yet successfully called gdata_oauth1_authorizer_request_authorization().
+ *
+ * This method implements <ulink type="http" url="http://tools.ietf.org/html/rfc5849#section-2.3">Section 2.3</ulink> of the
+ * <ulink type="http" url="http://tools.ietf.org/html/rfc5849">OAuth 1.0 protocol</ulink>.
+ *
+ * Return value: %TRUE if authorization was successful, %FALSE otherwise
+ *
+ * Since: 0.9.0
+ */
+gboolean
+gdata_oauth1_authorizer_request_authorization (GDataOAuth1Authorizer *self, const gchar *token, const gchar *token_secret, const gchar *verifier,
+ GCancellable *cancellable, GError **error)
+{
+#ifdef ENABLE_OAUTH1
+ GDataOAuth1AuthorizerPrivate *priv;
+ SoupMessage *message;
+ guint status;
+ gchar *request_body;
+ GHashTable *parameters;
+ GHashTable *response_details;
+ const gchar *_token, *_token_secret;
+ SoupURI *_uri;
+#endif
+
+ g_return_val_if_fail (GDATA_IS_OAUTH1_AUTHORIZER (self), FALSE);
+ g_return_val_if_fail (token != NULL && *token != '\0', FALSE);
+ g_return_val_if_fail (token_secret != NULL && *token_secret != '\0', FALSE);
+ g_return_val_if_fail (verifier != NULL && *verifier != '\0', FALSE);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
+#ifdef ENABLE_OAUTH1
+ /* This implements OAuthGetAccessToken using the request token returned by OAuthGetRequestToken and the verification code returned by
+ * OAuthAuthorizeToken. See:
+ * • http://code.google.com/apis/accounts/docs/OAuth_ref.html#AccessToken
+ * • http://tools.ietf.org/html/rfc5849#section-2.3
+ */
+
+ priv = self->priv;
+
+ /* Build the request body and the set of parameters to be signed */
+ parameters = g_hash_table_new (g_str_hash, g_str_equal);
+ g_hash_table_insert (parameters, (gpointer) "oauth_verifier", (gpointer) verifier);
+ request_body = soup_form_encode_hash (parameters);
+
+ /* Build the message */
+ _uri = soup_uri_new ("https://www.google.com/accounts/OAuthGetAccessToken");
+ soup_uri_set_port (_uri, _gdata_service_get_https_port ());
+ message = soup_message_new_from_uri (SOUP_METHOD_POST, _uri);
+ soup_uri_free (_uri);
+ soup_message_set_request (message, "application/x-www-form-urlencoded", SOUP_MEMORY_TAKE, request_body, strlen (request_body));
+
+ sign_message (self, message, token, token_secret, parameters);
+
+ g_hash_table_destroy (parameters);
+
+ /* Send the message */
+ _gdata_service_actually_send_message (priv->session, message, cancellable, error);
+ status = message->status_code;
+
+ if (status == SOUP_STATUS_CANCELLED) {
+ /* Cancelled (the error has already been set) */
+ g_object_unref (message);
+ return FALSE;
+ } else if (status != SOUP_STATUS_OK) {
+ /* Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+ * or the user denied authorization to the token on the authorization web page. */
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_FORBIDDEN, _("Access was denied by the user or server."));
+ g_object_unref (message);
+
+ return FALSE;
+ }
+
+ g_assert (message->response_body->data != NULL);
+
+ /* Parse the response. We expect something like:
+ * oauth_token=ab3cd9j4ks73hf7g&oauth_token_secret=ZXhhbXBsZS5jb20&oauth_callback_confirmed=true
+ * See: http://code.google.com/apis/accounts/docs/OAuth_ref.html#AccessToken and
+ * http://tools.ietf.org/html/rfc5849#section-2.3 for details. */
+ response_details = soup_form_decode (message->response_body->data);
+
+ /* Zero out the response body to lower the chance of it (with all the auth. tokens it contains) hitting disk or getting leaked in
+ * free memory. */
+ memset ((void*) message->response_body->data, 0, message->response_body->length);
+
+ g_object_unref (message);
+
+ _token = g_hash_table_lookup (response_details, "oauth_token");
+ _token_secret = g_hash_table_lookup (response_details, "oauth_token_secret");
+
+ /* Validate the returned values */
+ if (_token == NULL || _token_secret == NULL ||
+ *_token == '\0' || *_token_secret == '\0') {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR, _("The server returned a malformed response."));
+ g_hash_table_destroy (response_details);
+
+ return FALSE;
+ }
+
+ /* Store the token and token secret in the authoriser */
+ g_mutex_lock (&(priv->mutex));
+
+ g_free (priv->token);
+ priv->token = g_strdup (_token);
+
+ _gdata_service_secure_strfree (priv->token_secret);
+ priv->token_secret = _gdata_service_secure_strdup (_token_secret);
+
+ g_mutex_unlock (&(priv->mutex));
+
+ /* Zero out the secret token before freeing the hash table, to reduce the chance of it hitting disk later. */
+ memset ((void*) _token_secret, 0, strlen (_token_secret));
+
+ g_hash_table_destroy (response_details);
+
+ return TRUE;
+#else /* if !ENABLE_OAUTH1 */
+ if (!g_cancellable_set_error_if_cancelled (cancellable, error))
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_UNAVAILABLE,
+ _("OAuth 1.0 support is disabled."));
+
+ return FALSE;
+#endif
+}
+
+typedef struct {
+ /* Input */
+ gchar *token;
+ GDataSecureString token_secret; /* must be allocated by _gdata_service_secure_strdup() */
+ gchar *verifier;
+} RequestAuthorizationAsyncData;
+
+static void
+request_authorization_async_data_free (RequestAuthorizationAsyncData *data)
+{
+ g_free (data->token);
+ _gdata_service_secure_strfree (data->token_secret);
+ g_free (data->verifier);
+
+ g_slice_free (RequestAuthorizationAsyncData, data);
+}
+
+static void
+request_authorization_thread (GTask *task, gpointer source_object, gpointer task_data, GCancellable *cancellable)
+{
+ GDataOAuth1Authorizer *authorizer = GDATA_OAUTH1_AUTHORIZER (source_object);
+ RequestAuthorizationAsyncData *data = task_data;
+ g_autoptr(GError) error = NULL;
+
+ if (!gdata_oauth1_authorizer_request_authorization (authorizer, data->token, data->token_secret, data->verifier, cancellable, &error))
+ g_task_return_error (task, g_steal_pointer (&error));
+ else
+ g_task_return_boolean (task, TRUE);
+}
+
+/**
+ * gdata_oauth1_authorizer_request_authorization_async:
+ * @self: a #GDataOAuth1Authorizer
+ * @token: the request token returned by gdata_oauth1_authorizer_request_authentication_uri()
+ * @token_secret: the request token secret returned by gdata_oauth1_authorizer_request_authentication_uri()
+ * @verifier: the verifier entered by the user from the authentication page
+ * @cancellable: (allow-none): an optional #GCancellable, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when authorization is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Requests authorization of the given request @token from the Google accounts service using the given @verifier as entered by the user.
+ * @self, @token, @token_secret and @verifier are reffed/copied when this method is called, so can safely be freed after this method returns.
+ *
+ * For more details, see gdata_oauth1_authorizer_request_authorization(), which is the synchronous version of this method.
+ *
+ * When the operation is finished, @callback will be called. You can then call gdata_oauth1_authorizer_request_authorization_finish() to get the
+ * results of the operation.
+ *
+ * Since: 0.9.0
+ */
+void
+gdata_oauth1_authorizer_request_authorization_async (GDataOAuth1Authorizer *self, const gchar *token, const gchar *token_secret,
+ const gchar *verifier,
+ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_autoptr(GTask) task = NULL;
+ RequestAuthorizationAsyncData *data;
+
+ g_return_if_fail (GDATA_IS_OAUTH1_AUTHORIZER (self));
+ g_return_if_fail (token != NULL && *token != '\0');
+ g_return_if_fail (token_secret != NULL && *token_secret != '\0');
+ g_return_if_fail (verifier != NULL && *verifier != '\0');
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+
+ data = g_slice_new (RequestAuthorizationAsyncData);
+ data->token = g_strdup (token);
+ data->token_secret = _gdata_service_secure_strdup (token_secret);
+ data->verifier = g_strdup (verifier);
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_oauth1_authorizer_request_authorization_async);
+ g_task_set_task_data (task, g_steal_pointer (&data), (GDestroyNotify) request_authorization_async_data_free);
+ g_task_run_in_thread (task, request_authorization_thread);
+}
+
+/**
+ * gdata_oauth1_authorizer_request_authorization_finish:
+ * @self: a #GDataOAuth1Authorizer
+ * @async_result: a #GAsyncResult
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous authorization operation started with gdata_oauth1_authorizer_request_authorization_async().
+ *
+ * Return value: %TRUE if authorization was successful, %FALSE otherwise
+ *
+ * Since: 0.9.0
+ */
+gboolean
+gdata_oauth1_authorizer_request_authorization_finish (GDataOAuth1Authorizer *self, GAsyncResult *async_result, GError **error)
+{
+ g_return_val_if_fail (GDATA_IS_OAUTH1_AUTHORIZER (self), FALSE);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (async_result), FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (g_task_is_valid (async_result, self), FALSE);
+ g_return_val_if_fail (g_async_result_is_tagged (async_result, gdata_oauth1_authorizer_request_authorization_async), FALSE);
+
+ return g_task_propagate_boolean (G_TASK (async_result), error);
+}
+
+/**
+ * gdata_oauth1_authorizer_get_application_name:
+ * @self: a #GDataOAuth1Authorizer
+ *
+ * Returns the application name being used on the authentication page at the URI returned by gdata_oauth1_authorizer_request_authentication_uri();
+ * i.e. the value of #GDataOAuth1Authorizer:application-name.
+ *
+ * Return value: (allow-none): the application name, or %NULL if one isn't set
+ *
+ * Since: 0.9.0
+ */
+const gchar *
+gdata_oauth1_authorizer_get_application_name (GDataOAuth1Authorizer *self)
+{
+ g_return_val_if_fail (GDATA_IS_OAUTH1_AUTHORIZER (self), NULL);
+ return self->priv->application_name;
+}
+
+/**
+ * gdata_oauth1_authorizer_get_locale:
+ * @self: a #GDataOAuth1Authorizer
+ *
+ * Returns the locale currently being used for network requests, or %NULL if the locale is the default.
+ *
+ * Return value: (allow-none): the current locale
+ *
+ * Since: 0.9.0
+ */
+const gchar *
+gdata_oauth1_authorizer_get_locale (GDataOAuth1Authorizer *self)
+{
+ g_return_val_if_fail (GDATA_IS_OAUTH1_AUTHORIZER (self), NULL);
+ return self->priv->locale;
+}
+
+/**
+ * gdata_oauth1_authorizer_set_locale:
+ * @self: a #GDataOAuth1Authorizer
+ * @locale: (allow-none): the new locale in Unix locale format, or %NULL for the default locale
+ *
+ * Set the locale used for network requests to @locale, given in standard Unix locale format. See #GDataOAuth1Authorizer:locale for more details.
+ *
+ * Note that while it's possible to change the locale after sending network requests (i.e. calling
+ * gdata_oauth1_authorizer_request_authentication_uri() for the first time), it is unsupported, as the server-side software may behave unexpectedly.
+ * The only supported use of this method is after creation of the authorizer, but before any network requests are made.
+ *
+ * Since: 0.9.0
+ */
+void
+gdata_oauth1_authorizer_set_locale (GDataOAuth1Authorizer *self, const gchar *locale)
+{
+ g_return_if_fail (GDATA_IS_OAUTH1_AUTHORIZER (self));
+
+ if (g_strcmp0 (locale, self->priv->locale) == 0) {
+ /* Already has this value */
+ return;
+ }
+
+ g_free (self->priv->locale);
+ self->priv->locale = g_strdup (locale);
+ g_object_notify (G_OBJECT (self), "locale");
+}
+
+static void
+notify_proxy_uri_cb (GObject *gobject, GParamSpec *pspec, GDataOAuth1Authorizer *self)
+{
+ /* Flush our cached version */
+ if (self->priv->proxy_uri != NULL) {
+ soup_uri_free (self->priv->proxy_uri);
+ self->priv->proxy_uri = NULL;
+ }
+
+ g_object_notify (G_OBJECT (self), "proxy-uri");
+}
+
+/* Static function which isn't deprecated so we can continue using it internally. */
+static SoupURI *
+_get_proxy_uri (GDataOAuth1Authorizer *self)
+{
+ SoupURI *proxy_uri;
+
+ g_return_val_if_fail (GDATA_IS_OAUTH1_AUTHORIZER (self), NULL);
+
+ /* If we have a cached version, return that */
+ if (self->priv->proxy_uri != NULL) {
+ return self->priv->proxy_uri;
+ }
+
+ g_object_get (self->priv->session, SOUP_SESSION_PROXY_URI, &proxy_uri, NULL);
+
+ /* Update the cache; it takes ownership of the URI */
+ self->priv->proxy_uri = proxy_uri;
+
+ return proxy_uri;
+}
+
+/**
+ * gdata_oauth1_authorizer_get_proxy_uri:
+ * @self: a #GDataOAuth1Authorizer
+ *
+ * Gets the proxy URI on the #GDataOAuth1Authorizer's #SoupSession.
+ *
+ * Return value: (transfer full) (allow-none): the proxy URI, or %NULL; free with soup_uri_free()
+ *
+ * Since: 0.9.0
+ * Deprecated: 0.15.0: Use gdata_oauth1_authorizer_get_proxy_resolver() instead, which gives more flexibility over the proxy used.
+ */
+SoupURI *
+gdata_oauth1_authorizer_get_proxy_uri (GDataOAuth1Authorizer *self)
+{
+ return _get_proxy_uri (self);
+}
+
+/* Static function which isn't deprecated so we can continue using it internally. */
+static void
+_set_proxy_uri (GDataOAuth1Authorizer *self, SoupURI *proxy_uri)
+{
+ g_return_if_fail (GDATA_IS_OAUTH1_AUTHORIZER (self));
+
+ g_object_set (self->priv->session, SOUP_SESSION_PROXY_URI, proxy_uri, NULL);
+
+ /* Notification is handled in notify_proxy_uri_cb() which is called as a result of setting the property on the session */
+}
+
+/**
+ * gdata_oauth1_authorizer_set_proxy_uri:
+ * @self: a #GDataOAuth1Authorizer
+ * @proxy_uri: (allow-none): the proxy URI, or %NULL
+ *
+ * Sets the proxy URI on the #SoupSession used internally by the #GDataOAuth1Authorizer. This forces all requests through the given proxy.
+ *
+ * If @proxy_uri is %NULL, no proxy will be used.
+ *
+ * Since: 0.9.0
+ * Deprecated: 0.15.0: Use gdata_oauth1_authorizer_set_proxy_resolver() instead, which gives more flexibility over the proxy used.
+ */
+void
+gdata_oauth1_authorizer_set_proxy_uri (GDataOAuth1Authorizer *self, SoupURI *proxy_uri)
+{
+ _set_proxy_uri (self, proxy_uri);
+}
+
+/**
+ * gdata_oauth1_authorizer_get_proxy_resolver:
+ * @self: a #GDataOAuth1Authorizer
+ *
+ * Gets the #GProxyResolver on the #GDataOAuth1Authorizer's #SoupSession.
+ *
+ * Return value: (transfer none) (allow-none): a #GProxyResolver, or %NULL
+ *
+ * Since: 0.15.0
+ */
+GProxyResolver *
+gdata_oauth1_authorizer_get_proxy_resolver (GDataOAuth1Authorizer *self)
+{
+ g_return_val_if_fail (GDATA_IS_OAUTH1_AUTHORIZER (self), NULL);
+
+ return self->priv->proxy_resolver;
+}
+
+/**
+ * gdata_oauth1_authorizer_set_proxy_resolver:
+ * @self: a #GDataOAuth1Authorizer
+ * @proxy_resolver: (allow-none): a #GProxyResolver, or %NULL
+ *
+ * Sets the #GProxyResolver on the #SoupSession used internally by the given #GDataOAuth1Authorizer.
+ *
+ * Setting this will clear the #GDataOAuth1Authorizer:proxy-uri property.
+ *
+ * Since: 0.15.0
+ */
+void
+gdata_oauth1_authorizer_set_proxy_resolver (GDataOAuth1Authorizer *self, GProxyResolver *proxy_resolver)
+{
+ g_return_if_fail (GDATA_IS_OAUTH1_AUTHORIZER (self));
+ g_return_if_fail (proxy_resolver == NULL || G_IS_PROXY_RESOLVER (proxy_resolver));
+
+ if (proxy_resolver != NULL) {
+ g_object_ref (proxy_resolver);
+ }
+
+ g_clear_object (&self->priv->proxy_resolver);
+ self->priv->proxy_resolver = proxy_resolver;
+
+ g_object_notify (G_OBJECT (self), "proxy-resolver");
+}
+
+static void
+notify_timeout_cb (GObject *gobject, GParamSpec *pspec, GObject *self)
+{
+ g_object_notify (self, "timeout");
+}
+
+/**
+ * gdata_oauth1_authorizer_get_timeout:
+ * @self: a #GDataOAuth1Authorizer
+ *
+ * Gets the #GDataOAuth1Authorizer:timeout property; the network timeout, in seconds.
+ *
+ * Return value: the timeout, or <code class="literal">0</code>
+ *
+ * Since: 0.9.0
+ */
+guint
+gdata_oauth1_authorizer_get_timeout (GDataOAuth1Authorizer *self)
+{
+ guint timeout;
+
+ g_return_val_if_fail (GDATA_IS_OAUTH1_AUTHORIZER (self), 0);
+
+ g_object_get (self->priv->session, SOUP_SESSION_TIMEOUT, &timeout, NULL);
+
+ return timeout;
+}
+
+/**
+ * gdata_oauth1_authorizer_set_timeout:
+ * @self: a #GDataOAuth1Authorizer
+ * @timeout: the timeout, or <code class="literal">0</code>
+ *
+ * Sets the #GDataOAuth1Authorizer:timeout property; the network timeout, in seconds.
+ *
+ * If @timeout is <code class="literal">0</code>, network operations will never time out.
+ *
+ * Since: 0.9.0
+ */
+void
+gdata_oauth1_authorizer_set_timeout (GDataOAuth1Authorizer *self, guint timeout)
+{
+ g_return_if_fail (GDATA_IS_OAUTH1_AUTHORIZER (self));
+
+ if (gdata_oauth1_authorizer_get_timeout (self) == timeout) {
+ /* Already has this value */
+ return;
+ }
+
+ g_object_set (self->priv->session, SOUP_SESSION_TIMEOUT, timeout, NULL);
+
+ /* Notification is handled in notify_timeout_cb() which is called as a result of setting the property on the session */
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2011 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_OAUTH1_AUTHORIZER_H
+#define GDATA_OAUTH1_AUTHORIZER_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include "gdata-authorizer.h"
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_OAUTH1_AUTHORIZER (gdata_oauth1_authorizer_get_type ())
+#define GDATA_OAUTH1_AUTHORIZER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_OAUTH1_AUTHORIZER, GDataOAuth1Authorizer))
+#define GDATA_OAUTH1_AUTHORIZER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_OAUTH1_AUTHORIZER, GDataOAuth1AuthorizerClass))
+#define GDATA_IS_OAUTH1_AUTHORIZER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_OAUTH1_AUTHORIZER))
+#define GDATA_IS_OAUTH1_AUTHORIZER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_OAUTH1_AUTHORIZER))
+#define GDATA_OAUTH1_AUTHORIZER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_OAUTH1_AUTHORIZER, GDataOAuth1AuthorizerClass))
+
+typedef struct _GDataOAuth1AuthorizerPrivate GDataOAuth1AuthorizerPrivate;
+
+/**
+ * GDataOAuth1Authorizer:
+ *
+ * All the fields in the #GDataOAuth1Authorizer structure are private and should never be accessed directly.
+ *
+ * Since: 0.9.0
+ */
+typedef struct {
+ /*< private >*/
+ GObject parent;
+ GDataOAuth1AuthorizerPrivate *priv;
+} GDataOAuth1Authorizer;
+
+/**
+ * GDataOAuth1AuthorizerClass:
+ *
+ * All the fields in the #GDataOAuth1AuthorizerClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.9.0
+ */
+typedef struct {
+ /*< private >*/
+ GObjectClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataOAuth1AuthorizerClass;
+
+GType gdata_oauth1_authorizer_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataOAuth1Authorizer, g_object_unref)
+
+GDataOAuth1Authorizer *gdata_oauth1_authorizer_new (const gchar *application_name, GType service_type) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+GDataOAuth1Authorizer *gdata_oauth1_authorizer_new_for_authorization_domains (const gchar *application_name,
+ GList *authorization_domains) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+gchar *gdata_oauth1_authorizer_request_authentication_uri (GDataOAuth1Authorizer *self, gchar **token, gchar **token_secret,
+ GCancellable *cancellable, GError **error);
+void gdata_oauth1_authorizer_request_authentication_uri_async (GDataOAuth1Authorizer *self, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data);
+gchar *gdata_oauth1_authorizer_request_authentication_uri_finish (GDataOAuth1Authorizer *self, GAsyncResult *async_result, gchar **token,
+ gchar **token_secret, GError **error);
+
+gboolean gdata_oauth1_authorizer_request_authorization (GDataOAuth1Authorizer *self, const gchar *token, const gchar *token_secret,
+ const gchar *verifier, GCancellable *cancellable, GError **error);
+void gdata_oauth1_authorizer_request_authorization_async (GDataOAuth1Authorizer *self, const gchar *token, const gchar *token_secret,
+ const gchar *verifier, GCancellable *cancellable, GAsyncReadyCallback callback,
+ gpointer user_data);
+gboolean gdata_oauth1_authorizer_request_authorization_finish (GDataOAuth1Authorizer *self, GAsyncResult *async_result, GError **error);
+
+const gchar *gdata_oauth1_authorizer_get_application_name (GDataOAuth1Authorizer *self) G_GNUC_PURE;
+
+const gchar *gdata_oauth1_authorizer_get_locale (GDataOAuth1Authorizer *self) G_GNUC_PURE;
+void gdata_oauth1_authorizer_set_locale (GDataOAuth1Authorizer *self, const gchar *locale);
+
+#ifndef LIBGDATA_DISABLE_DEPRECATED
+SoupURI *gdata_oauth1_authorizer_get_proxy_uri (GDataOAuth1Authorizer *self) G_GNUC_PURE G_GNUC_DEPRECATED_FOR (gdata_oauth1_authorizer_get_proxy_resolver);
+void gdata_oauth1_authorizer_set_proxy_uri (GDataOAuth1Authorizer *self, SoupURI *proxy_uri) G_GNUC_DEPRECATED_FOR (gdata_oauth1_authorizer_set_proxy_resolver);
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
+
+GProxyResolver *gdata_oauth1_authorizer_get_proxy_resolver (GDataOAuth1Authorizer *self) G_GNUC_PURE;
+void gdata_oauth1_authorizer_set_proxy_resolver (GDataOAuth1Authorizer *self, GProxyResolver *proxy_resolver);
+
+guint gdata_oauth1_authorizer_get_timeout (GDataOAuth1Authorizer *self) G_GNUC_PURE;
+void gdata_oauth1_authorizer_set_timeout (GDataOAuth1Authorizer *self, guint timeout);
+
+G_END_DECLS
+
+#endif /* !GDATA_OAUTH1_AUTHORIZER_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2011, 2014, 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-oauth2-authorizer
+ * @short_description: GData OAuth 2.0 authorization interface
+ * @stability: Stable
+ * @include: gdata/gdata-oauth2-authorizer.h
+ *
+ * #GDataOAuth2Authorizer provides an implementation of the #GDataAuthorizer
+ * interface for authentication and authorization using the
+ * <ulink type="http" url="https://developers.google.com/accounts/docs/OAuth2InstalledApp">OAuth 2.0</ulink>
+ * process, which is Google’s currently preferred authentication and
+ * authorization process.
+ *
+ * OAuth 2.0 replaces the deprecated OAuth 1.0 and ClientLogin processes. One of
+ * the main reasons for this is to allow two-factor authentication to be
+ * supported, by moving the authentication interface to a web page under
+ * Google’s control.
+ *
+ * The OAuth 2.0 process as implemented by Google follows the
+ * <ulink type="http" url="http://tools.ietf.org/html/rfc6749">OAuth 2.0
+ * protocol as specified by IETF in RFC 6749</ulink>, with a few additions to
+ * support scopes (implemented in libgdata by #GDataAuthorizationDomains),
+ * locales and custom domains. Briefly, the process is initiated by building an
+ * authentication URI (using gdata_oauth2_authorizer_build_authentication_uri())
+ * and opening it in the user’s web browser. The user authenticates and
+ * authorizes the requested scopes on Google’s website, then an authorization
+ * code is returned (via #GDataOAuth2Authorizer:redirect-uri) to the
+ * application, which then converts the code into an access and refresh token
+ * (using gdata_oauth2_authorizer_request_authorization()). The access token is
+ * then attached to all future requests to the online service, and the refresh
+ * token can be used in future (with gdata_authorizer_refresh_authorization())
+ * to refresh authorization after the access token expires.
+ *
+ * The refresh token may also be accessed as
+ * #GDataOAuth2Authorizer:refresh-token and saved by the application. It may
+ * later be set on a new instance of #GDataOAuth2Authorizer, and
+ * gdata_authorizer_refresh_authorization_async() called to establish a new
+ * access token without requiring the user to re-authenticate unless they have
+ * explicitly revoked the refresh token.
+ *
+ * For an overview of the standard OAuth 2.0 flow, see
+ * <ulink type="http" url="http://tools.ietf.org/html/rfc6749#section-1.2">RFC 6749</ulink>.
+ *
+ * Before an application can be authorized using OAuth 2.0, it must be
+ * registered with
+ * <ulink type="http" url="https://console.developers.google.com/project">Google’s
+ * Developer Console</ulink>, and a client ID, client secret and redirect URI
+ * retrieved. These must be built into your application, and knowledge of them
+ * will allow any application to impersonate yours, so it is recommended that
+ * they are kept secret (e.g. as a configure-time option).
+ *
+ * libgdata supports
+ * <ulink type="http" url="https://developers.google.com/accounts/docs/OAuth2InstalledApp#incrementalAuth">incremental
+ * authorization</ulink>, where multiple #GDataOAuth2Authorizers can be used to
+ * incrementally build up authorizations against multiple scopes. Typically,
+ * you should use one #GDataOAuth2Authorizer per #GDataService your application
+ * uses, limit the scope of each authorizer, and enable incremental
+ * authorization when calling
+ * gdata_oauth2_authorizer_build_authentication_uri().
+ *
+ * Each access token is long lived, so reauthorization is rarely necessary with
+ * #GDataOAuth2Authorizer. It is supported using
+ * gdata_authorizer_refresh_authorization().
+ *
+ * <example>
+ * <title>Authenticating Asynchronously Using OAuth 2.0</title>
+ * <programlisting>
+ * GDataSomeService *service;
+ * GDataOAuth2Authorizer *authorizer;
+ * gchar *authentication_uri, *authorization_code;
+ *
+ * /<!-- -->* Create an authorizer and authenticate and authorize the service we're using, asynchronously. *<!-- -->/
+ * authorizer = gdata_oauth2_authorizer_new ("some-client-id", "some-client-secret",
+ * GDATA_OAUTH2_REDIRECT_URI_OOB, GDATA_TYPE_SOME_SERVICE);
+ * authentication_uri = gdata_oauth2_authorizer_build_authentication_uri (authorizer, NULL, FALSE);
+ *
+ * /<!-- -->* (Present the page at the authentication URI to the user, either in an embedded or stand-alone web browser, and
+ * * ask them to grant access to the application and return the code Google gives them.) *<!-- -->/
+ * authorization_code = ask_user_for_code (authentication_uri);
+ *
+ * gdata_oauth2_authorizer_request_authorization_async (authorizer, authorization_code, cancellable,
+ * (GAsyncReadyCallback) request_authorization_cb, user_data);
+ *
+ * g_free (authentication_uri);
+ *
+ * /<!-- -->* Zero out the code before freeing. *<!-- -->/
+ * if (token_secret != NULL) {
+ * memset (authorization_code, 0, strlen (authorization_code));
+ * }
+ *
+ * g_free (authorization_code);
+ *
+ * /<!-- -->* Create a service object and link it with the authorizer *<!-- -->/
+ * service = gdata_some_service_new (GDATA_AUTHORIZER (authorizer));
+ *
+ * static void
+ * request_authorization_cb (GDataOAuth2Authorizer *authorizer, GAsyncResult *async_result, gpointer user_data)
+ * {
+ * GError *error = NULL;
+ *
+ * if (gdata_oauth2_authorizer_request_authorization_finish (authorizer, async_result, &error) == FALSE) {
+ * /<!-- -->* Notify the user of all errors except cancellation errors *<!-- -->/
+ * if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
+ * g_error ("Authorization failed: %s", error->message);
+ * }
+ *
+ * g_error_free (error);
+ * return;
+ * }
+ *
+ * /<!-- -->* (The client is now authenticated and authorized against the service.
+ * * It can now proceed to execute queries on the service object which require the user to be authenticated.) *<!-- -->/
+ * }
+ *
+ * g_object_unref (service);
+ * g_object_unref (authorizer);
+ * </programlisting>
+ * </example>
+ *
+ * Since: 0.17.0
+ */
+
+#include <config.h>
+#include <string.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+
+#include "gdata-oauth2-authorizer.h"
+#include "gdata-private.h"
+
+static void authorizer_init (GDataAuthorizerInterface *iface);
+static void dispose (GObject *object);
+static void finalize (GObject *object);
+static void get_property (GObject *object, guint property_id, GValue *value,
+ GParamSpec *pspec);
+static void set_property (GObject *object, guint property_id,
+ const GValue *value, GParamSpec *pspec);
+
+static void process_request (GDataAuthorizer *self,
+ GDataAuthorizationDomain *domain,
+ SoupMessage *message);
+static void sign_message_locked (GDataOAuth2Authorizer *self,
+ SoupMessage *message,
+ const gchar *access_token);
+static gboolean is_authorized_for_domain (GDataAuthorizer *self,
+ GDataAuthorizationDomain *domain);
+static gboolean refresh_authorization (GDataAuthorizer *self,
+ GCancellable *cancellable,
+ GError **error);
+
+static void parse_grant_response (GDataOAuth2Authorizer *self, guint status,
+ const gchar *reason_phrase,
+ const gchar *response_body, gssize length,
+ GError **error);
+static void parse_grant_error (GDataOAuth2Authorizer *self, guint status,
+ const gchar *reason_phrase,
+ const gchar *response_body, gssize length,
+ GError **error);
+
+static void notify_timeout_cb (GObject *gobject, GParamSpec *pspec,
+ GObject *self);
+
+struct _GDataOAuth2AuthorizerPrivate {
+ SoupSession *session; /* owned */
+ GProxyResolver *proxy_resolver; /* owned */
+
+ gchar *client_id; /* owned */
+ gchar *redirect_uri; /* owned */
+ gchar *client_secret; /* owned */
+ gchar *locale; /* owned */
+
+ /* Mutex for access_token, refresh_token and authentication_domains. */
+ GMutex mutex;
+
+ /* These are both non-NULL when authorised. refresh_token may be
+ * non-NULL if access_token is NULL and refresh_authorization() has not
+ * yet been called on this authorizer. They may be both NULL. */
+ gchar *access_token; /* owned */
+ gchar *refresh_token; /* owned */
+
+ /* Mapping from GDataAuthorizationDomain to itself; a set of domains for
+ * which ->access_token is valid. */
+ GHashTable *authentication_domains; /* owned */
+};
+
+enum {
+ PROP_CLIENT_ID = 1,
+ PROP_REDIRECT_URI,
+ PROP_CLIENT_SECRET,
+ PROP_LOCALE,
+ PROP_TIMEOUT,
+ PROP_PROXY_RESOLVER,
+ PROP_REFRESH_TOKEN,
+};
+
+G_DEFINE_TYPE_WITH_CODE (GDataOAuth2Authorizer, gdata_oauth2_authorizer,
+ G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_AUTHORIZER,
+ authorizer_init))
+
+static void
+gdata_oauth2_authorizer_class_init (GDataOAuth2AuthorizerClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataOAuth2AuthorizerPrivate));
+
+ gobject_class->get_property = get_property;
+ gobject_class->set_property = set_property;
+ gobject_class->dispose = dispose;
+ gobject_class->finalize = finalize;
+
+ /**
+ * GDataOAuth2Authorizer:client-id:
+ *
+ * A client ID for your application (see the
+ * <ulink url="https://developers.google.com/accounts/docs/OAuth2InstalledApp#handlingtheresponse" type="http">reference documentation</ulink>).
+ *
+ * It is recommended that the ID is of the form
+ * <literal><replaceable>company name</replaceable>-
+ * <replaceable>application name</replaceable>-
+ * <replaceable>version ID</replaceable></literal>.
+ *
+ * Since: 0.17.0
+ */
+ g_object_class_install_property (gobject_class, PROP_CLIENT_ID,
+ g_param_spec_string ("client-id",
+ "Client ID",
+ "A client ID for your application.",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataOAuth2Authorizer:redirect-uri:
+ *
+ * Redirect URI to send the response from the authorisation request to.
+ * This must either be %GDATA_OAUTH2_REDIRECT_URI_OOB,
+ * %GDATA_OAUTH2_REDIRECT_URI_OOB_AUTO, or a
+ * <code>http://localhost</code> URI with any port number (optionally)
+ * specified.
+ *
+ * This URI is where the authorisation server will redirect the user
+ * after they have completed interacting with the authentication page
+ * (gdata_oauth2_authorizer_build_authentication_uri()). If it is
+ * %GDATA_OAUTH2_REDIRECT_URI_OOB, a page will be returned in the user’s
+ * browser with the authorisation code in its title and also embedded in
+ * the page for the user to copy if it is not possible to automatically
+ * extract the code from the page title. If it is
+ * %GDATA_OAUTH2_REDIRECT_URI_OOB_AUTO, a similar page will be returned
+ * with the authorisation code in its title, but without displaying the
+ * code to the user — the user will simply be asked to close the page.
+ * If it is a localhost URI, the authentication page will redirect to
+ * that URI with the authorisation code appended as a <code>code</code>
+ * query parameter. If the user denies the authentication request, the
+ * authentication page will redirect to that URI with
+ * <code>error=access_denied</code> appended as a query parameter.
+ *
+ * Note that the redirect URI used must match that registered in
+ * Google’s Developer Console for your application.
+ *
+ * See the <ulink type="http" url="https://developers.google.com/accounts/docs/OAuth2InstalledApp#choosingredirecturi">reference
+ * documentation</ulink> for details about choosing a redirect URI.
+ *
+ * Since: 0.17.0
+ */
+ g_object_class_install_property (gobject_class, PROP_REDIRECT_URI,
+ g_param_spec_string ("redirect-uri",
+ "Redirect URI",
+ "Redirect URI to send the response from the authorisation request to.",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataOAuth2Authorizer:client-secret:
+ *
+ * Client secret provided by Google. This is unique for each application
+ * and is accessible from Google’s Developer Console when registering
+ * an application. It must be paired with the
+ * #GDataOAuth2Authorizer:client-id.
+ *
+ * See the
+ * <ulink url="https://developers.google.com/accounts/docs/OAuth2InstalledApp#handlingtheresponse" type="http">reference
+ * documentation</ulink> for details.
+ *
+ * Since: 0.17.0
+ */
+ g_object_class_install_property (gobject_class, PROP_CLIENT_SECRET,
+ g_param_spec_string ("client-secret",
+ "Client secret",
+ "Client secret provided by Google.",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataOAuth2Authorizer:locale:
+ *
+ * The locale to use for network requests, in UNIX locale format.
+ * (e.g. "en_GB", "cs", "de_DE".) Use %NULL for the default "C" locale
+ * (typically "en_US").
+ *
+ * This locale will be used by the server-side software to localise the
+ * authentication and authorization pages at the URI returned by
+ * gdata_oauth2_authorizer_build_authentication_uri().
+ *
+ * The server-side behaviour is undefined if it doesn't support a given
+ * locale.
+ *
+ * Since: 0.17.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LOCALE,
+ g_param_spec_string ("locale",
+ "Locale",
+ "The locale to use for network requests, in UNIX locale format.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataOAuth2Authorizer:timeout:
+ *
+ * A timeout, in seconds, for network operations. If the timeout is
+ * exceeded, the operation will be cancelled and
+ * %GDATA_SERVICE_ERROR_NETWORK_ERROR will be returned.
+ *
+ * If the timeout is <code class="literal">0</code>, operations will
+ * never time out.
+ *
+ * Since: 0.17.0
+ */
+ g_object_class_install_property (gobject_class, PROP_TIMEOUT,
+ g_param_spec_uint ("timeout",
+ "Timeout",
+ "A timeout, in seconds, for network operations.",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataOAuth2Authorizer:proxy-resolver:
+ *
+ * The #GProxyResolver used to determine a proxy URI.
+ *
+ * Since: 0.17.0
+ */
+ g_object_class_install_property (gobject_class, PROP_PROXY_RESOLVER,
+ g_param_spec_object ("proxy-resolver",
+ "Proxy Resolver",
+ "A GProxyResolver used to determine a proxy URI.",
+ G_TYPE_PROXY_RESOLVER,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataOAuth2Authorizer:refresh-token:
+ *
+ * The server provided refresh token, which can be stored and passed in
+ * to new #GDataOAuth2Authorizer instances before calling
+ * gdata_authorizer_refresh_authorization_async() to create a new
+ * short-lived access token.
+ *
+ * The refresh token is opaque data and must not be parsed.
+ *
+ * Since: 0.17.2
+ */
+ g_object_class_install_property (gobject_class, PROP_REFRESH_TOKEN,
+ g_param_spec_string ("refresh-token",
+ "Refresh Token",
+ "The server provided refresh token.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+authorizer_init (GDataAuthorizerInterface *iface)
+{
+ iface->process_request = process_request;
+ iface->is_authorized_for_domain = is_authorized_for_domain;
+
+ /* We only implement the synchronous version, as GDataAuthorizer will
+ * automatically wrap it in a thread for the asynchronous versions if
+ * they’re not specifically implemented, which is fine for our needs. We
+ * couldn’t do any better by implementing the asynchronous versions
+ * ourselves. */
+ iface->refresh_authorization = refresh_authorization;
+}
+
+static void
+gdata_oauth2_authorizer_init (GDataOAuth2Authorizer *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
+ GDATA_TYPE_OAUTH2_AUTHORIZER,
+ GDataOAuth2AuthorizerPrivate);
+
+ /* Set up the authorizer's mutex */
+ g_mutex_init (&self->priv->mutex);
+ self->priv->authentication_domains = g_hash_table_new_full (g_direct_hash,
+ g_direct_equal,
+ g_object_unref,
+ NULL);
+
+ /* Set up the session */
+ self->priv->session = _gdata_service_build_session ();
+
+ /* Proxy the SoupSession’s timeout property. */
+ g_signal_connect (self->priv->session, "notify::timeout",
+ (GCallback) notify_timeout_cb, self);
+
+ /* Keep our GProxyResolver synchronized with SoupSession’s. */
+ g_object_bind_property (self->priv->session, "proxy-resolver",
+ self, "proxy-resolver",
+ G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
+}
+
+static void
+dispose (GObject *object)
+{
+ GDataOAuth2AuthorizerPrivate *priv;
+
+ priv = GDATA_OAUTH2_AUTHORIZER (object)->priv;
+
+ g_clear_object (&priv->session);
+ g_clear_object (&priv->proxy_resolver);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_oauth2_authorizer_parent_class)->dispose (object);
+}
+
+static void
+finalize (GObject *object)
+{
+ GDataOAuth2AuthorizerPrivate *priv;
+
+ priv = GDATA_OAUTH2_AUTHORIZER (object)->priv;
+
+ g_free (priv->client_id);
+ g_free (priv->client_secret);
+ g_free (priv->redirect_uri);
+ g_free (priv->locale);
+
+ g_free (priv->access_token);
+ g_free (priv->refresh_token);
+
+ g_hash_table_unref (priv->authentication_domains);
+ g_mutex_clear (&priv->mutex);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_oauth2_authorizer_parent_class)->finalize (object);
+}
+
+static void
+get_property (GObject *object, guint property_id, GValue *value,
+ GParamSpec *pspec)
+{
+ GDataOAuth2Authorizer *self;
+ GDataOAuth2AuthorizerPrivate *priv;
+
+ self = GDATA_OAUTH2_AUTHORIZER (object);
+ priv = self->priv;
+
+ switch (property_id) {
+ case PROP_CLIENT_ID:
+ g_value_set_string (value, priv->client_id);
+ break;
+ case PROP_REDIRECT_URI:
+ g_value_set_string (value, priv->redirect_uri);
+ break;
+ case PROP_CLIENT_SECRET:
+ g_value_set_string (value, priv->client_secret);
+ break;
+ case PROP_LOCALE:
+ g_value_set_string (value, priv->locale);
+ break;
+ case PROP_TIMEOUT:
+ g_value_set_uint (value,
+ gdata_oauth2_authorizer_get_timeout (self));
+ break;
+ case PROP_PROXY_RESOLVER:
+ g_value_set_object (value,
+ gdata_oauth2_authorizer_get_proxy_resolver (self));
+ break;
+ case PROP_REFRESH_TOKEN:
+ g_mutex_lock (&priv->mutex);
+ g_value_set_string (value, priv->refresh_token);
+ g_mutex_unlock (&priv->mutex);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataOAuth2Authorizer *self;
+ GDataOAuth2AuthorizerPrivate *priv;
+
+ self = GDATA_OAUTH2_AUTHORIZER (object);
+ priv = self->priv;
+
+ switch (property_id) {
+ /* Construct only. */
+ case PROP_CLIENT_ID:
+ priv->client_id = g_value_dup_string (value);
+ break;
+ /* Construct only. */
+ case PROP_REDIRECT_URI:
+ priv->redirect_uri = g_value_dup_string (value);
+ break;
+ /* Construct only. */
+ case PROP_CLIENT_SECRET:
+ priv->client_secret = g_value_dup_string (value);
+ break;
+ case PROP_LOCALE:
+ gdata_oauth2_authorizer_set_locale (self,
+ g_value_get_string (value));
+ break;
+ case PROP_TIMEOUT:
+ gdata_oauth2_authorizer_set_timeout (self,
+ g_value_get_uint (value));
+ break;
+ case PROP_PROXY_RESOLVER:
+ gdata_oauth2_authorizer_set_proxy_resolver (self,
+ g_value_get_object (value));
+ break;
+ case PROP_REFRESH_TOKEN:
+ gdata_oauth2_authorizer_set_refresh_token (self,
+ g_value_get_string (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+process_request (GDataAuthorizer *self, GDataAuthorizationDomain *domain,
+ SoupMessage *message)
+{
+ GDataOAuth2AuthorizerPrivate *priv;
+
+ priv = GDATA_OAUTH2_AUTHORIZER (self)->priv;
+
+ /* Set the authorisation header */
+ g_mutex_lock (&priv->mutex);
+
+ /* Sanity check */
+ g_assert ((priv->access_token == NULL) ||
+ (priv->refresh_token != NULL));
+
+ if (priv->access_token != NULL &&
+ g_hash_table_lookup (priv->authentication_domains,
+ domain) != NULL) {
+ sign_message_locked (GDATA_OAUTH2_AUTHORIZER (self), message,
+ priv->access_token);
+ }
+
+ g_mutex_unlock (&priv->mutex);
+}
+
+static gboolean
+is_authorized_for_domain (GDataAuthorizer *self,
+ GDataAuthorizationDomain *domain)
+{
+ GDataOAuth2AuthorizerPrivate *priv;
+ gpointer result;
+ const gchar *access_token;
+
+ priv = GDATA_OAUTH2_AUTHORIZER (self)->priv;
+
+ g_mutex_lock (&priv->mutex);
+ access_token = priv->access_token;
+ result = g_hash_table_lookup (priv->authentication_domains, domain);
+ g_mutex_unlock (&priv->mutex);
+
+ /* Sanity check */
+ g_assert (result == NULL || result == domain);
+
+ return (access_token != NULL && result != NULL);
+}
+
+/* Sign the message and add the Authorization header to it containing the
+ * signature.
+ *
+ * Reference: https://developers.google.com/accounts/docs/OAuth2InstalledApp#callinganapi
+ *
+ * NOTE: This must be called with the mutex locked. */
+static void
+sign_message_locked (GDataOAuth2Authorizer *self, SoupMessage *message,
+ const gchar *access_token)
+{
+ SoupURI *message_uri; /* unowned */
+ gchar *auth_header = NULL; /* owned */
+
+ g_return_if_fail (GDATA_IS_OAUTH2_AUTHORIZER (self));
+ g_return_if_fail (SOUP_IS_MESSAGE (message));
+ g_return_if_fail (access_token != NULL && *access_token != '\0');
+
+ /* Ensure that we’re using HTTPS: if not, we shouldn’t set the
+ * Authorization header or we could be revealing the access
+ * token to anyone snooping the connection, which would give
+ * them the same rights as us on the user’s data. Generally a
+ * bad thing to happen. */
+ message_uri = soup_message_get_uri (message);
+
+ if (message_uri->scheme != SOUP_URI_SCHEME_HTTPS) {
+ g_warning ("Not authorizing a non-HTTPS message with the "
+ "user’s OAuth 2.0 access token as the connection "
+ "isn’t secure.");
+ return;
+ }
+
+ /* Add the authorisation header. */
+ auth_header = g_strdup_printf ("Bearer %s", access_token);
+ soup_message_headers_append (message->request_headers,
+ "Authorization", auth_header);
+ g_free (auth_header);
+}
+
+static gboolean
+refresh_authorization (GDataAuthorizer *self, GCancellable *cancellable,
+ GError **error)
+{
+ /* See http://code.google.com/apis/accounts/docs/OAuth2.html#IAMoreToken */
+ GDataOAuth2AuthorizerPrivate *priv;
+ SoupMessage *message = NULL; /* owned */
+ SoupURI *_uri = NULL; /* owned */
+ gchar *request_body;
+ guint status;
+ GError *child_error = NULL;
+
+ g_return_val_if_fail (GDATA_IS_OAUTH2_AUTHORIZER (self), FALSE);
+
+ priv = GDATA_OAUTH2_AUTHORIZER (self)->priv;
+
+ g_mutex_lock (&priv->mutex);
+
+ /* If we don’t have a refresh token, we can’t refresh the
+ * authorisation. Do not set @error, as we haven’t been successfully
+ * authorised previously. */
+ if (priv->refresh_token == NULL) {
+ g_mutex_unlock (&priv->mutex);
+ return FALSE;
+ }
+
+ /* Prepare the request */
+ request_body = soup_form_encode ("client_id", priv->client_id,
+ "client_secret", priv->client_secret,
+ "refresh_token", priv->refresh_token,
+ "grant_type", "refresh_token",
+ NULL);
+
+ g_mutex_unlock (&priv->mutex);
+
+ /* Build the message */
+ _uri = soup_uri_new ("https://accounts.google.com/o/oauth2/token");
+ soup_uri_set_port (_uri, _gdata_service_get_https_port ());
+ message = soup_message_new_from_uri (SOUP_METHOD_POST, _uri);
+ soup_uri_free (_uri);
+
+ soup_message_set_request (message, "application/x-www-form-urlencoded",
+ SOUP_MEMORY_TAKE, request_body,
+ strlen (request_body));
+
+ /* Send the message */
+ _gdata_service_actually_send_message (priv->session, message,
+ cancellable, error);
+ status = message->status_code;
+
+ if (status == SOUP_STATUS_CANCELLED) {
+ /* Cancelled (the error has already been set) */
+ g_object_unref (message);
+ return FALSE;
+ } else if (status != SOUP_STATUS_OK) {
+ parse_grant_error (GDATA_OAUTH2_AUTHORIZER (self),
+ status, message->reason_phrase,
+ message->response_body->data,
+ message->response_body->length,
+ error);
+ g_object_unref (message);
+
+ return FALSE;
+ }
+
+ g_assert (message->response_body->data != NULL);
+
+ /* Parse and handle the response */
+ parse_grant_response (GDATA_OAUTH2_AUTHORIZER (self),
+ status, message->reason_phrase,
+ message->response_body->data,
+ message->response_body->length, &child_error);
+
+ g_object_unref (message);
+
+ if (child_error != NULL) {
+ g_propagate_error (error, child_error);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/**
+ * gdata_oauth2_authorizer_new:
+ * @client_id: your application’s client ID
+ * @client_secret: your application’s client secret
+ * @redirect_uri: authorisation redirect URI
+ * @service_type: the #GType of a #GDataService subclass which the
+ * #GDataOAuth2Authorizer will be used with
+ *
+ * Creates a new #GDataOAuth2Authorizer. The @client_id must be unique for your
+ * application, and as registered with Google, and the @client_secret must be
+ * paired with it.
+ *
+ * Return value: (transfer full): a new #GDataOAuth2Authorizer; unref with
+ * g_object_unref()
+ *
+ * Since: 0.17.0
+ */
+GDataOAuth2Authorizer *
+gdata_oauth2_authorizer_new (const gchar *client_id, const gchar *client_secret,
+ const gchar *redirect_uri, GType service_type)
+{
+ GList/*<unowned GDataAuthorizationDomain>*/ *domains; /* owned */
+ GDataOAuth2Authorizer *retval = NULL; /* owned */
+
+ g_return_val_if_fail (client_id != NULL && *client_id != '\0', NULL);
+ g_return_val_if_fail (client_secret != NULL && *client_secret != '\0',
+ NULL);
+ g_return_val_if_fail (redirect_uri != NULL && *redirect_uri != '\0',
+ NULL);
+ g_return_val_if_fail (g_type_is_a (service_type, GDATA_TYPE_SERVICE),
+ NULL);
+
+ domains = gdata_service_get_authorization_domains (service_type);
+
+ retval = gdata_oauth2_authorizer_new_for_authorization_domains (client_id,
+ client_secret,
+ redirect_uri,
+ domains);
+ g_list_free (domains);
+
+ return retval;
+}
+
+/**
+ * gdata_oauth2_authorizer_new_for_authorization_domains:
+ * @client_id: your application’s client ID
+ * @client_secret: your application’s client secret
+ * @redirect_uri: authorisation redirect URI
+ * @authorization_domains: (element-type GDataAuthorizationDomain) (transfer none):
+ * a non-empty list of #GDataAuthorizationDomains to be authorized against by
+ * the #GDataOAuth2Authorizer
+ *
+ * Creates a new #GDataOAuth2Authorizer. The @client_id must be unique for your
+ * application, and as registered with Google, and the @client_secret must be
+ * paired with it.
+ *
+ * Return value: (transfer full): a new #GDataOAuth2Authorizer; unref with
+ * g_object_unref()
+ *
+ * Since: 0.17.0
+ */
+GDataOAuth2Authorizer *
+gdata_oauth2_authorizer_new_for_authorization_domains (const gchar *client_id,
+ const gchar *client_secret,
+ const gchar *redirect_uri,
+ GList *authorization_domains)
+{
+ GList *i;
+ GDataOAuth2Authorizer *authorizer;
+
+ g_return_val_if_fail (client_id != NULL && *client_id != '\0', NULL);
+ g_return_val_if_fail (client_secret != NULL && *client_secret != '\0',
+ NULL);
+ g_return_val_if_fail (redirect_uri != NULL && *redirect_uri != '\0',
+ NULL);
+ g_return_val_if_fail (authorization_domains != NULL, NULL);
+
+ authorizer = GDATA_OAUTH2_AUTHORIZER (g_object_new (GDATA_TYPE_OAUTH2_AUTHORIZER,
+ "client-id", client_id,
+ "client-secret", client_secret,
+ "redirect-uri", redirect_uri,
+ NULL));
+
+ /* Register all the domains with the authorizer */
+ for (i = authorization_domains; i != NULL; i = i->next) {
+ GDataAuthorizationDomain *domain; /* unowned */
+
+ g_return_val_if_fail (GDATA_IS_AUTHORIZATION_DOMAIN (i->data),
+ NULL);
+
+ /* We don’t have to lock the authoriser’s mutex here as no other
+ * code has seen the authoriser yet */
+ domain = GDATA_AUTHORIZATION_DOMAIN (i->data);
+ g_hash_table_insert (authorizer->priv->authentication_domains,
+ g_object_ref (domain), domain);
+ }
+
+ return authorizer;
+}
+
+/**
+ * gdata_oauth2_authorizer_build_authentication_uri:
+ * @self: a #GDataOAuth2Authorizer
+ * @login_hint: (nullable): optional e-mail address or sub identifier for the
+ * user
+ * @include_granted_scopes: %TRUE to enable incremental authorisation
+ *
+ * Build an authentication URI to open in the user’s web browser (or an embedded
+ * browser widget). This will display an authentication page from Google,
+ * including an authentication form and confirmation of the authorisation
+ * domains being requested by this #GDataAuthorizer. The user will authenticate
+ * in the browser, then an authorisation code will be returned via the
+ * #GDataOAuth2Authorizer:redirect-uri, ready to be passed to
+ * gdata_oauth2_authorizer_request_authorization().
+ *
+ * If @login_hint is non-%NULL, it will be passed to the server as a hint of
+ * which user is attempting to authenticate, which can be used to pre-fill the
+ * e-mail address box in the authentication form.
+ *
+ * If @include_granted_scopes is %TRUE, the authentication request will
+ * automatically include all authorisation domains previously granted to this
+ * user/application pair, allowing for incremental authentication — asking for
+ * permissions as needed, rather than all in one large bundle at the first
+ * opportunity. If @include_granted_scopes is %FALSE, incremental authentication
+ * will not be enabled, and only the domains passed to the
+ * #GDataOAuth2Authorizer constructor will eventually be authenticated.
+ * See the
+ * <ulink type="http" url="https://developers.google.com/accounts/docs/OAuth2WebServer#incrementalAuth">reference
+ * documentation</ulink> for more details.
+ *
+ * Return value: (transfer full): the authentication URI to open in a web
+ * browser; free with g_free()
+ *
+ * Since: 0.17.0
+ */
+gchar *
+gdata_oauth2_authorizer_build_authentication_uri (GDataOAuth2Authorizer *self,
+ const gchar *login_hint,
+ gboolean include_granted_scopes)
+{
+ GDataOAuth2AuthorizerPrivate *priv;
+ GString *uri = NULL; /* owned */
+ GDataAuthorizationDomain *domain; /* unowned */
+ GHashTableIter iter;
+ gboolean is_first = TRUE;
+
+ g_return_val_if_fail (GDATA_IS_OAUTH2_AUTHORIZER (self), NULL);
+
+ priv = self->priv;
+
+ g_mutex_lock (&priv->mutex);
+
+ /* Build and memoise the URI.
+ *
+ * Reference: https://developers.google.com/accounts/docs/OAuth2InstalledApp#formingtheurl
+ */
+ g_assert (g_hash_table_size (priv->authentication_domains) > 0);
+
+ uri = g_string_new ("https://accounts.google.com/o/oauth2/auth"
+ "?response_type=code"
+ "&client_id=");
+ g_string_append_uri_escaped (uri, priv->client_id, NULL, TRUE);
+ g_string_append (uri, "&redirect_uri=");
+ g_string_append_uri_escaped (uri, priv->redirect_uri, NULL, TRUE);
+ g_string_append (uri, "&scope=");
+
+ /* Add the scopes of all our domains */
+ g_hash_table_iter_init (&iter, priv->authentication_domains);
+
+ while (g_hash_table_iter_next (&iter, (gpointer *) &domain, NULL)) {
+ const gchar *scope;
+
+ if (!is_first) {
+ /* Delimiter */
+ g_string_append (uri, "%20");
+ }
+
+ scope = gdata_authorization_domain_get_scope (domain);
+ g_string_append_uri_escaped (uri, scope, NULL, TRUE);
+
+ is_first = FALSE;
+ }
+
+ if (login_hint != NULL && *login_hint != '\0') {
+ g_string_append (uri, "&login_hint=");
+ g_string_append_uri_escaped (uri, login_hint, NULL, TRUE);
+ }
+
+ if (priv->locale != NULL) {
+ g_string_append (uri, "&hl=");
+ g_string_append_uri_escaped (uri, priv->locale, NULL, TRUE);
+ }
+
+ if (include_granted_scopes) {
+ g_string_append (uri, "&include_granted_scopes=true");
+ } else {
+ g_string_append (uri, "&include_granted_scopes=false");
+ }
+
+ g_mutex_unlock (&priv->mutex);
+
+ return g_string_free (uri, FALSE);
+}
+
+/* NOTE: This has to be thread safe, as it can be called from
+ * refresh_authorization() at any time.
+ *
+ * Reference: https://developers.google.com/accounts/docs/OAuth2InstalledApp#handlingtheresponse
+ */
+static void
+parse_grant_response (GDataOAuth2Authorizer *self, guint status,
+ const gchar *reason_phrase, const gchar *response_body,
+ gssize length, GError **error)
+{
+ GDataOAuth2AuthorizerPrivate *priv;
+ JsonParser *parser = NULL; /* owned */
+ JsonNode *root_node; /* unowned */
+ JsonObject *root_object; /* unowned */
+ const gchar *access_token = NULL, *refresh_token = NULL;
+ GError *child_error = NULL;
+
+ priv = self->priv;
+
+ /* Parse the successful response */
+ parser = json_parser_new ();
+
+ json_parser_load_from_data (parser, response_body, length,
+ &child_error);
+
+ if (child_error != NULL) {
+ g_clear_error (&child_error);
+ g_set_error_literal (&child_error, GDATA_SERVICE_ERROR,
+ GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ _("The server returned a malformed response."));
+
+ goto done;
+ }
+
+ /* Extract the access token, TTL and refresh token */
+ root_node = json_parser_get_root (parser);
+
+ if (JSON_NODE_HOLDS_OBJECT (root_node) == FALSE) {
+ g_set_error_literal (&child_error, GDATA_SERVICE_ERROR,
+ GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ _("The server returned a malformed response."));
+ goto done;
+ }
+
+ root_object = json_node_get_object (root_node);
+
+ if (json_object_has_member (root_object, "access_token")) {
+ access_token = json_object_get_string_member (root_object,
+ "access_token");
+ }
+ if (json_object_has_member (root_object, "refresh_token")) {
+ refresh_token = json_object_get_string_member (root_object,
+ "refresh_token");
+ }
+
+ /* Always require an access token. */
+ if (access_token == NULL || *access_token == '\0') {
+ g_set_error_literal (&child_error, GDATA_SERVICE_ERROR,
+ GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ _("The server returned a malformed response."));
+
+ access_token = NULL;
+ refresh_token = NULL;
+
+ goto done;
+ }
+
+ /* Only require a refresh token if this is the first authentication.
+ * See the documentation for refreshing authentication:
+ * https://developers.google.com/accounts/docs/OAuth2InstalledApp#refresh
+ */
+ if ((refresh_token == NULL || *refresh_token == '\0') &&
+ priv->refresh_token == NULL) {
+ g_set_error_literal (&child_error, GDATA_SERVICE_ERROR,
+ GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ _("The server returned a malformed response."));
+
+ access_token = NULL;
+ refresh_token = NULL;
+
+ goto done;
+ }
+
+done:
+ /* Postconditions. */
+ g_assert ((refresh_token == NULL) || (access_token != NULL));
+ g_assert ((child_error != NULL) == (access_token == NULL));
+
+ /* Update state. */
+ g_mutex_lock (&priv->mutex);
+
+ g_free (priv->access_token);
+ priv->access_token = g_strdup (access_token);
+
+ if (refresh_token != NULL) {
+ g_free (priv->refresh_token);
+ priv->refresh_token = g_strdup (refresh_token);
+ }
+
+ g_mutex_unlock (&priv->mutex);
+
+ if (child_error != NULL) {
+ g_propagate_error (error, child_error);
+ }
+
+ g_object_unref (parser);
+}
+
+/* NOTE: This has to be thread safe, as it can be called from
+ * refresh_authorization() at any time.
+ *
+ * There is no reference for this, because Google apparently don’t deem it
+ * necessary to document.
+ *
+ * Example response:
+ * HTTP/1.1 400 Bad Request
+ * Content-Type: application/json
+ *
+ * {
+ * "error" : "invalid_grant"
+ * }
+ */
+static void
+parse_grant_error (GDataOAuth2Authorizer *self, guint status,
+ const gchar *reason_phrase, const gchar *response_body,
+ gssize length, GError **error)
+{
+ JsonParser *parser = NULL; /* owned */
+ JsonNode *root_node; /* unowned */
+ JsonObject *root_object; /* unowned */
+ const gchar *error_code = NULL;
+ GError *child_error = NULL;
+
+ /* Parse the error response */
+ parser = json_parser_new ();
+
+ if (response_body == NULL) {
+ g_clear_error (&child_error);
+ g_set_error_literal (&child_error, GDATA_SERVICE_ERROR,
+ GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ _("The server returned a malformed response."));
+
+ goto done;
+ }
+
+ json_parser_load_from_data (parser, response_body, length,
+ &child_error);
+
+ if (child_error != NULL) {
+ g_clear_error (&child_error);
+ g_set_error_literal (&child_error, GDATA_SERVICE_ERROR,
+ GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ _("The server returned a malformed response."));
+
+ goto done;
+ }
+
+ /* Extract the error code. */
+ root_node = json_parser_get_root (parser);
+
+ if (JSON_NODE_HOLDS_OBJECT (root_node) == FALSE) {
+ g_set_error_literal (&child_error, GDATA_SERVICE_ERROR,
+ GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ _("The server returned a malformed response."));
+ goto done;
+ }
+
+ root_object = json_node_get_object (root_node);
+
+ if (json_object_has_member (root_object, "error")) {
+ error_code = json_object_get_string_member (root_object,
+ "error");
+ }
+
+ /* Always require an error_code. */
+ if (error_code == NULL || *error_code == '\0') {
+ g_set_error_literal (&child_error, GDATA_SERVICE_ERROR,
+ GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ _("The server returned a malformed response."));
+
+ error_code = NULL;
+
+ goto done;
+ }
+
+ /* Parse the error code. */
+ if (strcmp (error_code, "invalid_grant") == 0) {
+ g_set_error_literal (&child_error, GDATA_SERVICE_ERROR,
+ GDATA_SERVICE_ERROR_FORBIDDEN,
+ _("Access was denied by the user or server."));
+ } else {
+ /* Unknown error code. */
+ g_set_error_literal (&child_error, GDATA_SERVICE_ERROR,
+ GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ _("The server returned a malformed response."));
+ }
+
+done:
+ /* Postconditions. */
+ g_assert (child_error != NULL);
+
+ if (child_error != NULL) {
+ g_propagate_error (error, child_error);
+ }
+
+ g_object_unref (parser);
+}
+
+/**
+ * gdata_oauth2_authorizer_request_authorization:
+ * @self: a #GDataOAuth2Authorizer
+ * @authorization_code: code returned from the authentication page
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @error: return location for a #GError, or %NULL
+ *
+ * Request an authorisation code from the user’s web browser is converted to
+ * authorisation (access and refresh) tokens. This is the final step in the
+ * authentication process; once complete, the #GDataOAuth2Authorizer should be
+ * fully authorised for its domains.
+ *
+ * On failure, %GDATA_SERVICE_ERROR_FORBIDDEN will be returned if the user or
+ * server denied the authorisation request. %GDATA_SERVICE_ERROR_PROTOCOL_ERROR
+ * will be returned if the server didn’t follow the expected protocol.
+ * %G_IO_ERROR_CANCELLED will be returned if the operation was cancelled using
+ * @cancellable.
+ *
+ * Return value: %TRUE on success, %FALSE otherwise
+ *
+ * Since: 0.17.0
+ */
+gboolean
+gdata_oauth2_authorizer_request_authorization (GDataOAuth2Authorizer *self,
+ const gchar *authorization_code,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GDataOAuth2AuthorizerPrivate *priv;
+ SoupMessage *message = NULL; /* owned */
+ SoupURI *_uri = NULL; /* owned */
+ gchar *request_body = NULL; /* owned */
+ guint status;
+ GError *child_error = NULL;
+
+ g_return_val_if_fail (GDATA_IS_OAUTH2_AUTHORIZER (self), FALSE);
+ g_return_val_if_fail (authorization_code != NULL &&
+ *authorization_code != '\0', FALSE);
+ g_return_val_if_fail (cancellable == NULL ||
+ G_IS_CANCELLABLE (cancellable), FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
+ priv = self->priv;
+
+ /* Prepare the request.
+ *
+ * Reference: https://developers.google.com/accounts/docs/OAuth2InstalledApp#handlingtheresponse
+ */
+ request_body = soup_form_encode ("client_id", priv->client_id,
+ "client_secret", priv->client_secret,
+ "code", authorization_code,
+ "redirect_uri", priv->redirect_uri,
+ "grant_type", "authorization_code",
+ NULL);
+
+ /* Build the message */
+ _uri = soup_uri_new ("https://accounts.google.com/o/oauth2/token");
+ soup_uri_set_port (_uri, _gdata_service_get_https_port ());
+ message = soup_message_new_from_uri (SOUP_METHOD_POST, _uri);
+ soup_uri_free (_uri);
+
+ soup_message_set_request (message, "application/x-www-form-urlencoded",
+ SOUP_MEMORY_TAKE, request_body,
+ strlen (request_body));
+ request_body = NULL;
+
+ /* Send the message */
+ _gdata_service_actually_send_message (priv->session, message,
+ cancellable, error);
+ status = message->status_code;
+
+ if (status == SOUP_STATUS_CANCELLED) {
+ /* Cancelled (the error has already been set) */
+ g_object_unref (message);
+ return FALSE;
+ } else if (status != SOUP_STATUS_OK) {
+ parse_grant_error (self, status, message->reason_phrase,
+ message->response_body->data,
+ message->response_body->length,
+ error);
+ g_object_unref (message);
+
+ return FALSE;
+ }
+
+ g_assert (message->response_body->data != NULL);
+
+ /* Parse and handle the response */
+ parse_grant_response (self, status, message->reason_phrase,
+ message->response_body->data,
+ message->response_body->length, &child_error);
+
+ g_object_unref (message);
+
+ if (child_error != NULL) {
+ g_propagate_error (error, child_error);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static void
+request_authorization_thread (GTask *task,
+ gpointer source_object,
+ gpointer task_data,
+ GCancellable *cancellable)
+{
+ GDataOAuth2Authorizer *authorizer = GDATA_OAUTH2_AUTHORIZER (source_object);
+ g_autoptr(GError) error = NULL;
+ const gchar *authorization_code = task_data;
+
+ if (!gdata_oauth2_authorizer_request_authorization (authorizer,
+ authorization_code,
+ cancellable,
+ &error))
+ g_task_return_error (task, g_steal_pointer (&error));
+ else
+ g_task_return_boolean (task, TRUE);
+}
+
+/**
+ * gdata_oauth2_authorizer_request_authorization_async:
+ * @self: a #GDataOAuth2Authorizer
+ * @authorization_code: code returned from the authentication page
+ * @cancellable: (allow-none): an optional #GCancellable, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when authorization is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Asynchronous version of gdata_oauth2_authorizer_request_authorization().
+ *
+ * Since: 0.17.0
+ */
+void
+gdata_oauth2_authorizer_request_authorization_async (GDataOAuth2Authorizer *self,
+ const gchar *authorization_code,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_autoptr(GTask) task = NULL;
+
+ g_return_if_fail (GDATA_IS_OAUTH2_AUTHORIZER (self));
+ g_return_if_fail (authorization_code != NULL &&
+ *authorization_code != '\0');
+ g_return_if_fail (cancellable == NULL ||
+ G_IS_CANCELLABLE (cancellable));
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_oauth2_authorizer_request_authorization_async);
+ g_task_set_task_data (task, g_strdup (authorization_code),
+ (GDestroyNotify) g_free);
+ g_task_run_in_thread (task, request_authorization_thread);
+}
+
+/**
+ * gdata_oauth2_authorizer_request_authorization_finish:
+ * @self: a #GDataOAuth2Authorizer
+ * @async_result: a #GAsyncResult
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous authorization operation started with
+ * gdata_oauth2_authorizer_request_authorization_async().
+ *
+ * Return value: %TRUE if authorization was successful, %FALSE otherwise
+ *
+ * Since: 0.17.0
+ */
+gboolean
+gdata_oauth2_authorizer_request_authorization_finish (GDataOAuth2Authorizer *self,
+ GAsyncResult *async_result,
+ GError **error)
+{
+ g_return_val_if_fail (GDATA_IS_OAUTH2_AUTHORIZER (self), FALSE);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (async_result), FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (g_task_is_valid (async_result, self), FALSE);
+ g_return_val_if_fail (g_async_result_is_tagged (async_result, gdata_oauth2_authorizer_request_authorization_async), FALSE);
+
+ return g_task_propagate_boolean (G_TASK (async_result), error);
+}
+
+/**
+ * gdata_oauth2_authorizer_get_client_id:
+ * @self: a #GDataOAuth2Authorizer
+ *
+ * Returns the authorizer's client ID, #GDataOAuth2Authorizer:client-id, as
+ * specified on constructing the #GDataOAuth2Authorizer.
+ *
+ * Return value: the authorizer's client ID
+ *
+ * Since: 0.17.0
+ */
+const gchar *
+gdata_oauth2_authorizer_get_client_id (GDataOAuth2Authorizer *self)
+{
+ g_return_val_if_fail (GDATA_IS_OAUTH2_AUTHORIZER (self), NULL);
+ return self->priv->client_id;
+}
+
+/**
+ * gdata_oauth2_authorizer_get_redirect_uri:
+ * @self: a #GDataOAuth2Authorizer
+ *
+ * Returns the authorizer’s redirect URI, #GDataOAuth2Authorizer:redirect-uri,
+ * as specified on constructing the #GDataOAuth2Authorizer.
+ *
+ * Return value: the authorizer’s redirect URI
+ *
+ * Since: 0.17.0
+ */
+const gchar *
+gdata_oauth2_authorizer_get_redirect_uri (GDataOAuth2Authorizer *self)
+{
+ g_return_val_if_fail (GDATA_IS_OAUTH2_AUTHORIZER (self), NULL);
+ return self->priv->redirect_uri;
+}
+
+/**
+ * gdata_oauth2_authorizer_get_client_secret:
+ * @self: a #GDataOAuth2Authorizer
+ *
+ * Returns the authorizer's client secret, #GDataOAuth2Authorizer:client-secret,
+ * as specified on constructing the #GDataOAuth2Authorizer.
+ *
+ * Return value: the authorizer's client secret
+ *
+ * Since: 0.17.0
+ */
+const gchar *
+gdata_oauth2_authorizer_get_client_secret (GDataOAuth2Authorizer *self)
+{
+ g_return_val_if_fail (GDATA_IS_OAUTH2_AUTHORIZER (self), NULL);
+ return self->priv->client_secret;
+}
+
+/**
+ * gdata_oauth2_authorizer_dup_refresh_token:
+ * @self: a #GDataOAuth2Authorizer
+ *
+ * Returns the authorizer's refresh token, #GDataOAuth2Authorizer:refresh-token,
+ * as set by client code previously on the #GDataOAuth2Authorizer, or as
+ * returned by the most recent authentication operation.
+ *
+ * Return value: (transfer full): the authorizer's refresh token
+ *
+ * Since: 0.17.2
+ */
+gchar *
+gdata_oauth2_authorizer_dup_refresh_token (GDataOAuth2Authorizer *self)
+{
+ GDataOAuth2AuthorizerPrivate *priv;
+ gchar *refresh_token; /* owned */
+
+ g_return_val_if_fail (GDATA_IS_OAUTH2_AUTHORIZER (self), NULL);
+
+ priv = self->priv;
+
+ g_mutex_lock (&priv->mutex);
+ refresh_token = g_strdup (priv->refresh_token);
+ g_mutex_unlock (&priv->mutex);
+
+ return refresh_token;
+}
+
+/**
+ * gdata_oauth2_authorizer_set_refresh_token:
+ * @self: a #GDataOAuth2Authorizer
+ * @refresh_token: (nullable): the new refresh token, or %NULL to clear
+ * authorization
+ *
+ * Sets the authorizer's refresh token, #GDataOAuth2Authorizer:refresh-token.
+ * This is used to periodically refresh the access token. Set it to %NULL to
+ * clear the current authentication from the authorizer.
+ *
+ * Since: 0.17.2
+ */
+void
+gdata_oauth2_authorizer_set_refresh_token (GDataOAuth2Authorizer *self,
+ const gchar *refresh_token)
+{
+ GDataOAuth2AuthorizerPrivate *priv;
+
+ g_return_if_fail (GDATA_IS_OAUTH2_AUTHORIZER (self));
+
+ priv = self->priv;
+
+ g_mutex_lock (&priv->mutex);
+
+ if (g_strcmp0 (priv->refresh_token, refresh_token) == 0) {
+ g_mutex_unlock (&priv->mutex);
+ return;
+ }
+
+ /* Clear the access token; if the refresh token has changed, it can
+ * no longer be valid, and we must avoid the situation:
+ * (access_token != NULL) && (refresh_token == NULL) */
+ g_free (priv->access_token);
+ priv->access_token = NULL;
+
+ /* Update the refresh token. */
+ g_free (priv->refresh_token);
+ priv->refresh_token = g_strdup (refresh_token);
+
+ g_mutex_unlock (&priv->mutex);
+
+ g_object_notify (G_OBJECT (self), "refresh-token");
+}
+
+/**
+ * gdata_oauth2_authorizer_get_locale:
+ * @self: a #GDataOAuth2Authorizer
+ *
+ * Returns the locale currently being used for network requests, or %NULL if the
+ * locale is the default.
+ *
+ * Return value: (allow-none): the current locale
+ *
+ * Since: 0.17.0
+ */
+const gchar *
+gdata_oauth2_authorizer_get_locale (GDataOAuth2Authorizer *self)
+{
+ g_return_val_if_fail (GDATA_IS_OAUTH2_AUTHORIZER (self), NULL);
+ return self->priv->locale;
+}
+
+/**
+ * gdata_oauth2_authorizer_set_locale:
+ * @self: a #GDataOAuth2Authorizer
+ * @locale: (allow-none): the new locale in UNIX locale format, or %NULL for the
+ * default locale
+ *
+ * Set the locale used for network requests to @locale, given in standard UNIX
+ * locale format. See #GDataOAuth2Authorizer:locale for more details.
+ *
+ * Note that while it’s possible to change the locale after sending network
+ * requests (i.e. calling gdata_oauth2_authorizer_build_authentication_uri() for
+ * the first time), it is unsupported, as the server-side software may behave
+ * unexpectedly. The only supported use of this method is after creation of the
+ * authorizer, but before any network requests are made.
+ *
+ * Since: 0.17.0
+ */
+void
+gdata_oauth2_authorizer_set_locale (GDataOAuth2Authorizer *self,
+ const gchar *locale)
+{
+ g_return_if_fail (GDATA_IS_OAUTH2_AUTHORIZER (self));
+
+ if (g_strcmp0 (locale, self->priv->locale) == 0) {
+ /* Already has this value */
+ return;
+ }
+
+ g_free (self->priv->locale);
+ self->priv->locale = g_strdup (locale);
+ g_object_notify (G_OBJECT (self), "locale");
+}
+
+static void
+notify_timeout_cb (GObject *gobject, GParamSpec *pspec, GObject *self)
+{
+ g_object_notify (self, "timeout");
+}
+
+/**
+ * gdata_oauth2_authorizer_get_timeout:
+ * @self: a #GDataOAuth2Authorizer
+ *
+ * Gets the #GDataOAuth2Authorizer:timeout property; the network timeout, in
+ * seconds.
+ *
+ * Return value: the timeout, or <code class="literal">0</code>
+ *
+ * Since: 0.17.0
+ */
+guint
+gdata_oauth2_authorizer_get_timeout (GDataOAuth2Authorizer *self)
+{
+ guint timeout;
+
+ g_return_val_if_fail (GDATA_IS_OAUTH2_AUTHORIZER (self), 0);
+
+ g_object_get (self->priv->session,
+ SOUP_SESSION_TIMEOUT, &timeout,
+ NULL);
+
+ return timeout;
+}
+
+/**
+ * gdata_oauth2_authorizer_set_timeout:
+ * @self: a #GDataOAuth2Authorizer
+ * @timeout: the timeout, or <code class="literal">0</code>
+ *
+ * Sets the #GDataOAuth2Authorizer:timeout property; the network timeout, in
+ * seconds.
+ *
+ * If @timeout is <code class="literal">0</code>, network operations will never
+ * time out.
+ *
+ * Since: 0.17.0
+ */
+void
+gdata_oauth2_authorizer_set_timeout (GDataOAuth2Authorizer *self, guint timeout)
+{
+ g_return_if_fail (GDATA_IS_OAUTH2_AUTHORIZER (self));
+
+ if (timeout == gdata_oauth2_authorizer_get_timeout (self)) {
+ return;
+ }
+
+ g_object_set (self->priv->session, SOUP_SESSION_TIMEOUT, timeout, NULL);
+}
+
+/**
+ * gdata_oauth2_authorizer_get_proxy_resolver:
+ * @self: a #GDataOAuth2Authorizer
+ *
+ * Gets the #GProxyResolver on the #GDataOAuth2Authorizer's #SoupSession.
+ *
+ * Return value: (transfer none) (allow-none): a #GProxyResolver, or %NULL
+ *
+ * Since: 0.17.0
+ */
+GProxyResolver *
+gdata_oauth2_authorizer_get_proxy_resolver (GDataOAuth2Authorizer *self)
+{
+ g_return_val_if_fail (GDATA_IS_OAUTH2_AUTHORIZER (self), NULL);
+
+ return self->priv->proxy_resolver;
+}
+
+/**
+ * gdata_oauth2_authorizer_set_proxy_resolver:
+ * @self: a #GDataOAuth2Authorizer
+ * @proxy_resolver: (allow-none): a #GProxyResolver, or %NULL
+ *
+ * Sets the #GProxyResolver on the #SoupSession used internally by the given
+ * #GDataOAuth2Authorizer.
+ *
+ * Since: 0.17.0
+ */
+void
+gdata_oauth2_authorizer_set_proxy_resolver (GDataOAuth2Authorizer *self,
+ GProxyResolver *proxy_resolver)
+{
+ g_return_if_fail (GDATA_IS_OAUTH2_AUTHORIZER (self));
+ g_return_if_fail (proxy_resolver == NULL ||
+ G_IS_PROXY_RESOLVER (proxy_resolver));
+
+ if (proxy_resolver != NULL) {
+ g_object_ref (proxy_resolver);
+ }
+
+ g_clear_object (&self->priv->proxy_resolver);
+ self->priv->proxy_resolver = proxy_resolver;
+
+ g_object_notify (G_OBJECT (self), "proxy-resolver");
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2011, 2014, 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_OAUTH2_AUTHORIZER_H
+#define GDATA_OAUTH2_AUTHORIZER_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include "gdata-authorizer.h"
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_OAUTH2_REDIRECT_URI_OOB:
+ *
+ * OAuth 2 redirect URI for out-of-band authorisation code transfer, where the
+ * user is shown the authorisation code and asked to copy it.
+ *
+ * See
+ * <ulink type="http" url="https://developers.google.com/accounts/docs/OAuth2InstalledApp#choosingredirecturi">reference
+ * documentation</ulink> for details.
+ *
+ * Since: 0.17.0
+ */
+#define GDATA_OAUTH2_REDIRECT_URI_OOB "urn:ietf:wg:oauth:2.0:oob"
+
+/**
+ * GDATA_OAUTH2_REDIRECT_URI_OOB_AUTO:
+ *
+ * OAuth 2 redirect URI for out-of-band authorisation code transfer, where the
+ * user is not shown the authorisation code or asked to copy it.
+ *
+ * See
+ * <ulink type="http" url="https://developers.google.com/accounts/docs/OAuth2InstalledApp#choosingredirecturi">reference
+ * documentation</ulink> for details.
+ *
+ * Since: 0.17.0
+ */
+#define GDATA_OAUTH2_REDIRECT_URI_OOB_AUTO "urn:ietf:wg:oauth:2.0:oob:auto"
+
+#define GDATA_TYPE_OAUTH2_AUTHORIZER (gdata_oauth2_authorizer_get_type ())
+#define GDATA_OAUTH2_AUTHORIZER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_OAUTH2_AUTHORIZER, GDataOAuth2Authorizer))
+#define GDATA_OAUTH2_AUTHORIZER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_OAUTH2_AUTHORIZER, GDataOAuth2AuthorizerClass))
+#define GDATA_IS_OAUTH2_AUTHORIZER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_OAUTH2_AUTHORIZER))
+#define GDATA_IS_OAUTH2_AUTHORIZER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_OAUTH2_AUTHORIZER))
+#define GDATA_OAUTH2_AUTHORIZER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_OAUTH2_AUTHORIZER, GDataOAuth2AuthorizerClass))
+
+typedef struct _GDataOAuth2AuthorizerPrivate GDataOAuth2AuthorizerPrivate;
+
+/**
+ * GDataOAuth2Authorizer:
+ *
+ * All the fields in the #GDataOAuth2Authorizer structure are private and should never be accessed directly.
+ *
+ * Since: 0.17.0
+ */
+typedef struct {
+ /*< private >*/
+ GObject parent;
+ GDataOAuth2AuthorizerPrivate *priv;
+} GDataOAuth2Authorizer;
+
+/**
+ * GDataOAuth2AuthorizerClass:
+ *
+ * All the fields in the #GDataOAuth2AuthorizerClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.17.0
+ */
+typedef struct {
+ /*< private >*/
+ GObjectClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataOAuth2AuthorizerClass;
+
+GType gdata_oauth2_authorizer_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataOAuth2Authorizer, g_object_unref)
+
+GDataOAuth2Authorizer *gdata_oauth2_authorizer_new (const gchar *client_id,
+ const gchar *client_secret,
+ const gchar *redirect_uri,
+ GType service_type) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+GDataOAuth2Authorizer *gdata_oauth2_authorizer_new_for_authorization_domains (const gchar *client_id,
+ const gchar *client_secret,
+ const gchar *redirect_uri,
+ GList *authorization_domains) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+gchar *gdata_oauth2_authorizer_build_authentication_uri (GDataOAuth2Authorizer *self,
+ const gchar *login_hint,
+ gboolean include_granted_scopes) G_GNUC_PURE;
+
+gboolean gdata_oauth2_authorizer_request_authorization (GDataOAuth2Authorizer *self, const gchar *authorization_code,
+ GCancellable *cancellable, GError **error);
+void gdata_oauth2_authorizer_request_authorization_async (GDataOAuth2Authorizer *self, const gchar *authorization_code,
+ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
+gboolean gdata_oauth2_authorizer_request_authorization_finish (GDataOAuth2Authorizer *self, GAsyncResult *async_result, GError **error);
+
+const gchar *gdata_oauth2_authorizer_get_client_id (GDataOAuth2Authorizer *self) G_GNUC_PURE;
+const gchar *gdata_oauth2_authorizer_get_redirect_uri (GDataOAuth2Authorizer *self) G_GNUC_PURE;
+const gchar *gdata_oauth2_authorizer_get_client_secret (GDataOAuth2Authorizer *self) G_GNUC_PURE;
+
+gchar *gdata_oauth2_authorizer_dup_refresh_token (GDataOAuth2Authorizer *self) G_GNUC_PURE;
+void gdata_oauth2_authorizer_set_refresh_token (GDataOAuth2Authorizer *self, const gchar *refresh_token);
+
+const gchar *gdata_oauth2_authorizer_get_locale (GDataOAuth2Authorizer *self) G_GNUC_PURE;
+void gdata_oauth2_authorizer_set_locale (GDataOAuth2Authorizer *self, const gchar *locale);
+
+guint gdata_oauth2_authorizer_get_timeout (GDataOAuth2Authorizer *self) G_GNUC_PURE;
+void gdata_oauth2_authorizer_set_timeout (GDataOAuth2Authorizer *self, guint timeout);
+
+GProxyResolver *gdata_oauth2_authorizer_get_proxy_resolver (GDataOAuth2Authorizer *self) G_GNUC_PURE;
+void gdata_oauth2_authorizer_set_proxy_resolver (GDataOAuth2Authorizer *self, GProxyResolver *proxy_resolver);
+
+G_END_DECLS
+
+#endif /* !GDATA_OAUTH2_AUTHORIZER_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-parsable
+ * @short_description: GData parsable object
+ * @stability: Stable
+ * @include: gdata/gdata-parsable.h
+ *
+ * #GDataParsable is an abstract class allowing easy implementation of an extensible parser. It is primarily extended by #GDataFeed and #GDataEntry,
+ * both of which require XML parsing which can be extended by subclassing.
+ *
+ * It allows methods to be defined for handling the root XML node, each of its child nodes, and a method to be called after parsing is complete.
+ *
+ * Since: 0.3.0
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+#include <libxml/parser.h>
+#include <json-glib/json-glib.h>
+
+#include "gdata-parsable.h"
+#include "gdata-private.h"
+#include "gdata-parser.h"
+
+GQuark
+gdata_parser_error_quark (void)
+{
+ return g_quark_from_static_string ("gdata-parser-error-quark");
+}
+
+static void gdata_parsable_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_parsable_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void gdata_parsable_finalize (GObject *object);
+static gboolean real_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error);
+static gboolean real_parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error);
+static const gchar *get_content_type (void);
+
+struct _GDataParsablePrivate {
+ /* XML stuff. */
+ GString *extra_xml;
+ GHashTable *extra_namespaces;
+
+ /* JSON stuff. */
+ GHashTable/*<gchar*, owned JsonNode*>*/ *extra_json;
+
+ gboolean constructed_from_xml;
+};
+
+enum {
+ PROP_CONSTRUCTED_FROM_XML = 1,
+};
+
+G_DEFINE_ABSTRACT_TYPE (GDataParsable, gdata_parsable, G_TYPE_OBJECT)
+
+static void
+gdata_parsable_class_init (GDataParsableClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataParsablePrivate));
+
+ gobject_class->get_property = gdata_parsable_get_property;
+ gobject_class->set_property = gdata_parsable_set_property;
+ gobject_class->finalize = gdata_parsable_finalize;
+ klass->parse_xml = real_parse_xml;
+ klass->parse_json = real_parse_json;
+ klass->get_content_type = get_content_type;
+
+ /**
+ * GDataParsable:constructed-from-xml:
+ *
+ * Specifies whether the object was constructed by parsing XML or manually.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_CONSTRUCTED_FROM_XML,
+ g_param_spec_boolean ("constructed-from-xml",
+ "Constructed from XML?",
+ "Specifies whether the object was constructed by parsing XML or manually.",
+ FALSE,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_parsable_init (GDataParsable *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_PARSABLE, GDataParsablePrivate);
+
+ self->priv->extra_xml = g_string_new ("");
+ self->priv->extra_namespaces = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
+
+ self->priv->extra_json = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) json_node_free);
+
+ self->priv->constructed_from_xml = FALSE;
+}
+
+
+static void
+gdata_parsable_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataParsablePrivate *priv = GDATA_PARSABLE (object)->priv;
+
+ switch (property_id) {
+ case PROP_CONSTRUCTED_FROM_XML:
+ g_value_set_boolean (value, priv->constructed_from_xml);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_parsable_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataParsablePrivate *priv = GDATA_PARSABLE (object)->priv;
+
+ switch (property_id) {
+ case PROP_CONSTRUCTED_FROM_XML:
+ priv->constructed_from_xml = g_value_get_boolean (value);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_parsable_finalize (GObject *object)
+{
+ GDataParsablePrivate *priv = GDATA_PARSABLE (object)->priv;
+
+ g_string_free (priv->extra_xml, TRUE);
+ g_hash_table_destroy (priv->extra_namespaces);
+
+ g_hash_table_destroy (priv->extra_json);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_parsable_parent_class)->finalize (object);
+}
+
+static gboolean
+real_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ xmlBuffer *buffer;
+ xmlNs **namespaces, **namespace;
+
+ /* Unhandled XML */
+ buffer = xmlBufferCreate ();
+ xmlNodeDump (buffer, doc, node, 0, 0);
+ g_string_append (parsable->priv->extra_xml, (gchar*) xmlBufferContent (buffer));
+ g_debug ("Unhandled XML in %s: %s", G_OBJECT_TYPE_NAME (parsable), (gchar*) xmlBufferContent (buffer));
+ xmlBufferFree (buffer);
+
+ /* Get the namespaces */
+ namespaces = xmlGetNsList (doc, node);
+ if (namespaces == NULL)
+ return TRUE;
+
+ for (namespace = namespaces; *namespace != NULL; namespace++) {
+ if ((*namespace)->prefix != NULL) {
+ /* NOTE: These two g_strdup()s leak, but it's probably acceptable, given that it saves us
+ * g_strdup()ing every other namespace we put in @extra_namespaces. */
+ g_hash_table_insert (parsable->priv->extra_namespaces,
+ g_strdup ((gchar*) ((*namespace)->prefix)),
+ g_strdup ((gchar*) ((*namespace)->href)));
+ }
+ }
+ xmlFree (namespaces);
+
+ return TRUE;
+}
+
+/* Extract the member node. This would be a lot easier if JsonReader had an API to return
+ * the current node (regardless of whether it's a value, object or array). FIXME: bgo#707100. */
+static JsonNode * /* transfer full */
+_json_reader_dup_current_node (JsonReader *reader)
+{
+ JsonNode *value;
+
+ if (json_reader_is_value (reader) == TRUE) {
+ /* Value nodes are easy. Well, ignoring the complication of nulls. */
+ if (json_reader_get_null_value (reader) == TRUE) {
+ value = json_node_new (JSON_NODE_NULL);
+ } else {
+ value = json_node_copy (json_reader_get_value (reader));
+ }
+ } else if (json_reader_is_object (reader) == TRUE) {
+ /* Object nodes require deep copies. */
+ gint i;
+ gchar **members;
+ JsonObject *obj;
+
+ obj = json_object_new ();
+
+ for (i = 0, members = json_reader_list_members (reader); members[i] != NULL; i++) {
+ json_reader_read_member (reader, members[i]);
+ json_object_set_member (obj, members[i], _json_reader_dup_current_node (reader));
+ json_reader_end_member (reader);
+ }
+
+ g_strfreev (members);
+
+ value = json_node_new (JSON_NODE_OBJECT);
+ json_node_take_object (value, obj);
+ } else if (json_reader_is_array (reader) == TRUE) {
+ /* Array nodes require deep copies. */
+ gint i, elements;
+ JsonArray *arr;
+
+ arr = json_array_new ();
+
+ for (i = 0, elements = json_reader_count_elements (reader); i < elements; i++) {
+ json_reader_read_element (reader, i);
+ json_array_add_element (arr, _json_reader_dup_current_node (reader));
+ json_reader_end_element (reader);
+ }
+
+ value = json_node_new (JSON_NODE_ARRAY);
+ json_node_take_array (value, arr);
+ } else {
+ /* Uh-oh. */
+ g_assert_not_reached ();
+ }
+
+ return value;
+}
+
+static gboolean
+real_parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error)
+{
+ gchar *json, *member_name;
+ JsonGenerator *generator;
+ JsonNode *value;
+
+ /* Unhandled JSON member. Save it and its value to ->extra_xml so that it's not lost if we
+ * re-upload this Parsable to the server. */
+ member_name = g_strdup (json_reader_get_member_name (reader));
+ g_assert (member_name != NULL);
+
+ /* Extract a copy of the current node. */
+ value = _json_reader_dup_current_node (reader);
+ g_assert (value != NULL);
+
+ /* Serialise the value for debugging. */
+ generator = json_generator_new ();
+ json_generator_set_root (generator, value);
+
+ json = json_generator_to_data (generator, NULL);
+ g_debug ("Unhandled JSON member ‘%s’ in %s: %s", member_name, G_OBJECT_TYPE_NAME (parsable), json);
+ g_free (json);
+
+ g_object_unref (generator);
+
+ /* Save the value. Transfer ownership of the member_name and value. */
+ g_hash_table_replace (parsable->priv->extra_json, (gpointer) member_name, (gpointer) value);
+
+ return TRUE;
+}
+
+static const gchar *
+get_content_type (void) {
+ return "application/atom+xml";
+}
+
+/**
+ * gdata_parsable_new_from_xml:
+ * @parsable_type: the type of the class represented by the XML
+ * @xml: the XML for just the parsable object, with full namespace declarations
+ * @length: the length of @xml, or -1
+ * @error: a #GError, or %NULL
+ *
+ * Creates a new #GDataParsable subclass (of the given @parsable_type) from the given @xml.
+ *
+ * An object of the given @parsable_type is created, and its <function>pre_parse_xml</function>, <function>parse_xml</function> and
+ * <function>post_parse_xml</function> class functions called on the XML tree obtained from @xml. <function>pre_parse_xml</function> and
+ * <function>post_parse_xml</function> are called once each on the root node of the tree, while <function>parse_xml</function> is called for
+ * each of the child nodes of the root node.
+ *
+ * If @length is -1, @xml will be assumed to be null-terminated.
+ *
+ * If an error occurs during parsing, a suitable error from #GDataParserError will be returned.
+ *
+ * Return value: a new #GDataParsable, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.4.0
+ */
+GDataParsable *
+gdata_parsable_new_from_xml (GType parsable_type, const gchar *xml, gint length, GError **error)
+{
+ g_return_val_if_fail (g_type_is_a (parsable_type, GDATA_TYPE_PARSABLE), NULL);
+ g_return_val_if_fail (xml != NULL && *xml != '\0', NULL);
+ g_return_val_if_fail (length >= -1, NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ return _gdata_parsable_new_from_xml (parsable_type, xml, length, NULL, error);
+}
+
+GDataParsable *
+_gdata_parsable_new_from_xml (GType parsable_type, const gchar *xml, gint length, gpointer user_data, GError **error)
+{
+ xmlDoc *doc;
+ xmlNode *node;
+ GDataParsable *parsable;
+ static gboolean libxml_initialised = FALSE;
+
+ g_return_val_if_fail (g_type_is_a (parsable_type, GDATA_TYPE_PARSABLE), NULL);
+ g_return_val_if_fail (xml != NULL && *xml != '\0', NULL);
+ g_return_val_if_fail (length >= -1, NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ /* Set up libxml. We do this here to avoid introducing a libgdata setup function, which would be unnecessary hassle. This is the only place
+ * that libxml can be initialised in the library. */
+ if (libxml_initialised == FALSE) {
+ /* Change the libxml memory allocation functions to be GLib's. This means we don't have to re-allocate all the strings we get from
+ * libxml, which cuts down on strdup() calls dramatically. */
+ xmlMemSetup ((xmlFreeFunc) g_free, (xmlMallocFunc) g_malloc, (xmlReallocFunc) g_realloc, (xmlStrdupFunc) g_strdup);
+ libxml_initialised = TRUE;
+ }
+
+ if (length == -1)
+ length = strlen (xml);
+
+ /* Parse the XML */
+ doc = xmlReadMemory (xml, length, "/dev/null", NULL, 0);
+ if (doc == NULL) {
+ xmlError *xml_error = xmlGetLastError ();
+ g_set_error (error, GDATA_PARSER_ERROR, GDATA_PARSER_ERROR_PARSING_STRING,
+ /* Translators: the parameter is an error message */
+ _("Error parsing XML: %s"),
+ (xml_error != NULL) ? xml_error->message : NULL);
+ return NULL;
+ }
+
+ /* Get the root element */
+ node = xmlDocGetRootElement (doc);
+ if (node == NULL) {
+ /* XML document's empty */
+ xmlFreeDoc (doc);
+ g_set_error (error, GDATA_PARSER_ERROR, GDATA_PARSER_ERROR_EMPTY_DOCUMENT,
+ _("Error parsing XML: %s"),
+ /* Translators: this is a dummy error message to be substituted into "Error parsing XML: %s". */
+ _("Empty document."));
+ return NULL;
+ }
+
+ parsable = _gdata_parsable_new_from_xml_node (parsable_type, doc, node, user_data, error);
+ xmlFreeDoc (doc);
+
+ return parsable;
+}
+
+GDataParsable *
+_gdata_parsable_new_from_xml_node (GType parsable_type, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ GDataParsable *parsable;
+ GDataParsableClass *klass;
+
+ g_return_val_if_fail (g_type_is_a (parsable_type, GDATA_TYPE_PARSABLE), NULL);
+ g_return_val_if_fail (doc != NULL, NULL);
+ g_return_val_if_fail (node != NULL, NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ parsable = g_object_new (parsable_type, "constructed-from-xml", TRUE, NULL);
+
+ klass = GDATA_PARSABLE_GET_CLASS (parsable);
+ if (klass->parse_xml == NULL) {
+ g_object_unref (parsable);
+ return NULL;
+ }
+
+ g_assert (klass->element_name != NULL);
+ /* TODO: See gdata-documents-entry.c:260 for an example of where the code below doesn't work */
+ /*if (xmlStrcmp (node->name, (xmlChar*) klass->element_name) != 0 ||
+ (node->ns != NULL && xmlStrcmp (node->ns->prefix, (xmlChar*) klass->element_namespace) != 0)) {
+ * No <entry> element (required) *
+ gdata_parser_error_required_element_missing (klass->element_name, "root", error);
+ return NULL;
+ }*/
+
+ /* Call the pre-parse function first */
+ if (klass->pre_parse_xml != NULL &&
+ klass->pre_parse_xml (parsable, doc, node, user_data, error) == FALSE) {
+ g_object_unref (parsable);
+ return NULL;
+ }
+
+ /* Parse each child element */
+ node = node->children;
+ while (node != NULL) {
+ if (klass->parse_xml (parsable, doc, node, user_data, error) == FALSE) {
+ g_object_unref (parsable);
+ return NULL;
+ }
+ node = node->next;
+ }
+
+ /* Call the post-parse function */
+ if (klass->post_parse_xml != NULL &&
+ klass->post_parse_xml (parsable, user_data, error) == FALSE) {
+ g_object_unref (parsable);
+ return NULL;
+ }
+
+ return parsable;
+}
+
+/**
+ * gdata_parsable_new_from_json:
+ * @parsable_type: the type of the class represented by the JSON
+ * @json: the JSON for just the parsable object
+ * @length: the length of @json, or -1
+ * @error: a #GError, or %NULL
+ *
+ * Creates a new #GDataParsable subclass (of the given @parsable_type) from the given @json.
+ *
+ * An object of the given @parsable_type is created, and its <function>parse_json</function> and
+ * <function>post_parse_json</function> class functions called on the JSON node obtained from @json.
+ * <function>post_parse_json</function> is called once on the root node, while <function>parse_json</function> is called for
+ * each of the node's members.
+ *
+ * If @length is -1, @json will be assumed to be nul-terminated.
+ *
+ * If an error occurs during parsing, a suitable error from #GDataParserError will be returned.
+ *
+ * Return value: a new #GDataParsable, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.15.0
+ */
+GDataParsable *
+gdata_parsable_new_from_json (GType parsable_type, const gchar *json, gint length, GError **error)
+{
+ g_return_val_if_fail (g_type_is_a (parsable_type, GDATA_TYPE_PARSABLE), NULL);
+ g_return_val_if_fail (json != NULL && *json != '\0', NULL);
+ g_return_val_if_fail (length >= -1, NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ return _gdata_parsable_new_from_json (parsable_type, json, length, NULL, error);
+}
+
+GDataParsable *
+_gdata_parsable_new_from_json (GType parsable_type, const gchar *json, gint length, gpointer user_data, GError **error)
+{
+ JsonParser *parser;
+ JsonReader *reader;
+ GDataParsable *parsable;
+ GError *child_error = NULL;
+
+ g_return_val_if_fail (g_type_is_a (parsable_type, GDATA_TYPE_PARSABLE), NULL);
+ g_return_val_if_fail (json != NULL && *json != '\0', NULL);
+ g_return_val_if_fail (length >= -1, NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ if (length == -1)
+ length = strlen (json);
+
+ parser = json_parser_new ();
+ if (!json_parser_load_from_data (parser, json, length, &child_error)) {
+ g_set_error (error, GDATA_PARSER_ERROR, GDATA_PARSER_ERROR_PARSING_STRING,
+ /* Translators: the parameter is an error message */
+ _("Error parsing JSON: %s"), child_error->message);
+ g_error_free (child_error);
+ g_object_unref (parser);
+
+ return NULL;
+ }
+
+ reader = json_reader_new (json_parser_get_root (parser));
+ parsable = _gdata_parsable_new_from_json_node (parsable_type, reader, user_data, error);
+
+ g_object_unref (reader);
+ g_object_unref (parser);
+
+ return parsable;
+}
+
+GDataParsable *
+_gdata_parsable_new_from_json_node (GType parsable_type, JsonReader *reader, gpointer user_data, GError **error)
+{
+ GDataParsable *parsable;
+ GDataParsableClass *klass;
+ gint i;
+
+ g_return_val_if_fail (g_type_is_a (parsable_type, GDATA_TYPE_PARSABLE), NULL);
+ g_return_val_if_fail (reader != NULL, NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ /* Indicator property which allows distinguishing between locally created and server based objects
+ * as it is used for non-XML tasks, and adding another one for JSON would be a bit pointless. */
+ parsable = g_object_new (parsable_type, "constructed-from-xml", TRUE, NULL);
+
+ klass = GDATA_PARSABLE_GET_CLASS (parsable);
+ g_assert (klass->parse_json != NULL);
+
+ /* Check that the outermost node is an object. */
+ if (json_reader_is_object (reader) == FALSE) {
+ g_set_error (error, GDATA_PARSER_ERROR, GDATA_PARSER_ERROR_PARSING_STRING,
+ /* Translators: the parameter is an error message */
+ _("Error parsing JSON: %s"),
+ _("Outermost JSON node is not an object."));
+ g_object_unref (parsable);
+ return NULL;
+ }
+
+ /* Parse each child member. This assumes the outermost node is an object. */
+ for (i = 0; i < json_reader_count_members (reader); i++) {
+ g_return_val_if_fail (json_reader_read_element (reader, i), NULL);
+
+ if (klass->parse_json (parsable, reader, user_data, error) == FALSE) {
+ json_reader_end_element (reader);
+ g_object_unref (parsable);
+ return NULL;
+ }
+
+ json_reader_end_element (reader);
+ }
+
+ /* Call the post-parse function */
+ if (klass->post_parse_json != NULL &&
+ klass->post_parse_json (parsable, user_data, error) == FALSE) {
+ g_object_unref (parsable);
+ return NULL;
+ }
+
+ return parsable;
+}
+
+/**
+ * gdata_parsable_get_content_type:
+ * @self: a #GDataParsable
+ *
+ * Returns the content type upon which the #GDataParsable is built. For example, `application/atom+xml` or `application/json`.
+ *
+ * Return value: the parsable's content type
+ *
+ * Since: 0.17.7
+ */
+const gchar *
+gdata_parsable_get_content_type (GDataParsable *self)
+{
+ GDataParsableClass *klass;
+
+ g_return_val_if_fail (GDATA_IS_PARSABLE (self), NULL);
+
+ klass = GDATA_PARSABLE_GET_CLASS (self);
+ g_assert (klass->get_content_type != NULL);
+
+ return klass->get_content_type ();
+}
+
+static void
+build_namespaces_cb (gchar *prefix, gchar *href, GString *output)
+{
+ g_string_append_printf (output, " xmlns:%s='%s'", prefix, href);
+}
+
+static gboolean
+filter_namespaces_cb (gchar *prefix, gchar *href, GHashTable *canonical_namespaces)
+{
+ if (g_hash_table_lookup (canonical_namespaces, prefix) != NULL)
+ return TRUE;
+ return FALSE;
+}
+
+/**
+ * gdata_parsable_get_xml:
+ * @self: a #GDataParsable
+ *
+ * Builds an XML representation of the #GDataParsable in its current state, such that it could be inserted on the server. The XML is guaranteed
+ * to have all its namespaces declared properly in a self-contained fashion, and is valid for stand-alone use.
+ *
+ * Return value: the object's XML; free with g_free()
+ *
+ * Since: 0.4.0
+ */
+gchar *
+gdata_parsable_get_xml (GDataParsable *self)
+{
+ GString *xml_string;
+
+ g_return_val_if_fail (GDATA_IS_PARSABLE (self), NULL);
+
+ xml_string = g_string_sized_new (1000);
+ g_string_append (xml_string, "<?xml version='1.0' encoding='UTF-8'?>");
+ _gdata_parsable_get_xml (self, xml_string, TRUE);
+ return g_string_free (xml_string, FALSE);
+}
+
+/*
+ * _gdata_parsable_get_xml:
+ * @self: a #GDataParsable
+ * @xml_string: a #GString to build the XML in
+ * @declare_namespaces: %TRUE if all the namespaces used in the outputted XML should be declared in the opening tag of the root element,
+ * %FALSE otherwise
+ *
+ * Builds an XML representation of the #GDataParsable in its current state, such that it could be inserted on the server. If @declare_namespaces is
+ * %TRUE, the XML is guaranteed to have all its namespaces declared properly in a self-contained fashion, and is valid for stand-alone use. If
+ * @declare_namespaces is %FALSE, none of the used namespaces are declared, and the XML is suitable for insertion into a larger XML tree.
+ *
+ * Return value: the object's XML; free with g_free()
+ *
+ * Since: 0.4.0
+ */
+void
+_gdata_parsable_get_xml (GDataParsable *self, GString *xml_string, gboolean declare_namespaces)
+{
+ GDataParsableClass *klass;
+ guint length;
+ GHashTable *namespaces = NULL; /* shut up, gcc */
+
+ g_return_if_fail (GDATA_IS_PARSABLE (self));
+ g_return_if_fail (xml_string != NULL);
+
+ klass = GDATA_PARSABLE_GET_CLASS (self);
+ g_assert (klass->element_name != NULL);
+
+ /* Get the namespaces the class uses */
+ if (declare_namespaces == TRUE && klass->get_namespaces != NULL) {
+ namespaces = g_hash_table_new (g_str_hash, g_str_equal);
+ klass->get_namespaces (self, namespaces);
+
+ /* Remove any duplicate extra namespaces */
+ g_hash_table_foreach_remove (self->priv->extra_namespaces, (GHRFunc) filter_namespaces_cb, namespaces);
+ }
+
+ /* Build up the namespace list */
+ if (klass->element_namespace != NULL)
+ g_string_append_printf (xml_string, "<%s:%s", klass->element_namespace, klass->element_name);
+ else
+ g_string_append_printf (xml_string, "<%s", klass->element_name);
+
+ /* We only include the normal namespaces if we're not at the top level of XML building */
+ if (declare_namespaces == TRUE) {
+ g_string_append (xml_string, " xmlns='http://www.w3.org/2005/Atom'");
+ if (namespaces != NULL) {
+ g_hash_table_foreach (namespaces, (GHFunc) build_namespaces_cb, xml_string);
+ g_hash_table_destroy (namespaces);
+ }
+ }
+
+ g_hash_table_foreach (self->priv->extra_namespaces, (GHFunc) build_namespaces_cb, xml_string);
+
+ /* Add anything the class thinks is suitable */
+ if (klass->pre_get_xml != NULL)
+ klass->pre_get_xml (self, xml_string);
+ g_string_append_c (xml_string, '>');
+
+ /* Store the length before we close the opening tag, so we can determine whether to self-close later on */
+ length = xml_string->len;
+
+ /* Add the rest of the XML */
+ if (klass->get_xml != NULL)
+ klass->get_xml (self, xml_string);
+
+ /* Any extra XML? */
+ if (self->priv->extra_xml != NULL && self->priv->extra_xml->str != NULL)
+ g_string_append (xml_string, self->priv->extra_xml->str);
+
+ /* Close the element; either by self-closing the opening tag, or by writing out a closing tag */
+ if (xml_string->len == length)
+ g_string_overwrite (xml_string, length - 1, "/>");
+ else if (klass->element_namespace != NULL)
+ g_string_append_printf (xml_string, "</%s:%s>", klass->element_namespace, klass->element_name);
+ else
+ g_string_append_printf (xml_string, "</%s>", klass->element_name);
+}
+
+/**
+ * gdata_parsable_get_json:
+ * @self: a #GDataParsable
+ *
+ * Builds a JSON representation of the #GDataParsable in its current state, such that it could be inserted on the server. The JSON
+ * is valid for stand-alone use.
+ *
+ * Return value: the object's JSON; free with g_free()
+ *
+ * Since: 0.15.0
+ */
+gchar *
+gdata_parsable_get_json (GDataParsable *self)
+{
+ JsonGenerator *generator;
+ JsonBuilder *builder;
+ JsonNode *root;
+ gchar *output;
+
+ g_return_val_if_fail (GDATA_IS_PARSABLE (self), NULL);
+
+ /* Build the JSON tree. */
+ builder = json_builder_new ();
+ _gdata_parsable_get_json (self, builder);
+ root = json_builder_get_root (builder);
+ g_object_unref (builder);
+
+ /* Serialise it to a string. */
+ generator = json_generator_new ();
+ json_generator_set_root (generator, root);
+ output = json_generator_to_data (generator, NULL);
+ g_object_unref (generator);
+
+ json_node_free (root);
+
+ return output;
+}
+
+/*
+ * _gdata_parsable_get_json:
+ * @self: a #GDataParsable
+ * @builder: a #JsonBuilder to build the JSON in
+ *
+ * Builds a JSON representation of the #GDataParsable in its current state, such that it could be inserted on the server.
+ *
+ * Since: 0.15.0
+ */
+void
+_gdata_parsable_get_json (GDataParsable *self, JsonBuilder *builder)
+{
+ GDataParsableClass *klass;
+ GHashTableIter iter;
+ gchar *member_name;
+ JsonNode *value;
+
+ g_return_if_fail (GDATA_IS_PARSABLE (self));
+ g_return_if_fail (JSON_IS_BUILDER (builder));
+
+ klass = GDATA_PARSABLE_GET_CLASS (self);
+
+ json_builder_begin_object (builder);
+
+ /* Add the JSON. */
+ if (klass->get_json != NULL)
+ klass->get_json (self, builder);
+
+ /* Any extra JSON which we couldn't parse before? */
+ g_hash_table_iter_init (&iter, self->priv->extra_json);
+ while (g_hash_table_iter_next (&iter, (gpointer *) &member_name, (gpointer *) &value) == TRUE) {
+ json_builder_set_member_name (builder, member_name);
+ json_builder_add_value (builder, json_node_copy (value)); /* transfers ownership */
+ }
+
+ json_builder_end_object (builder);
+}
+
+/*
+ * _gdata_parsable_is_constructed_from_xml:
+ * @self: a #GDataParsable
+ *
+ * Returns the value of #GDataParsable:constructed-from-xml.
+ *
+ * Return value: %TRUE if the #GDataParsable was constructed from XML, %FALSE otherwise
+ *
+ * Since: 0.7.0
+ */
+gboolean
+_gdata_parsable_is_constructed_from_xml (GDataParsable *self)
+{
+ g_return_val_if_fail (GDATA_IS_PARSABLE (self), FALSE);
+ return self->priv->constructed_from_xml;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_PARSABLE_H
+#define GDATA_PARSABLE_H
+
+#include <glib.h>
+#include <glib-object.h>
+#include <libxml/parser.h>
+#include <json-glib/json-glib.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDataParserError:
+ * @GDATA_PARSER_ERROR_PARSING_STRING: Error parsing the XML or JSON syntax itself
+ * @GDATA_PARSER_ERROR_EMPTY_DOCUMENT: Empty document
+ *
+ * Error codes for XML or JSON parsing operations.
+ */
+typedef enum {
+ GDATA_PARSER_ERROR_PARSING_STRING = 1,
+ GDATA_PARSER_ERROR_EMPTY_DOCUMENT
+} GDataParserError;
+
+#define GDATA_PARSER_ERROR gdata_parser_error_quark ()
+GQuark gdata_parser_error_quark (void) G_GNUC_CONST;
+
+#define GDATA_TYPE_PARSABLE (gdata_parsable_get_type ())
+#define GDATA_PARSABLE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_PARSABLE, GDataParsable))
+#define GDATA_PARSABLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_PARSABLE, GDataParsableClass))
+#define GDATA_IS_PARSABLE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_PARSABLE))
+#define GDATA_IS_PARSABLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_PARSABLE))
+#define GDATA_PARSABLE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_PARSABLE, GDataParsableClass))
+
+typedef struct _GDataParsablePrivate GDataParsablePrivate;
+
+/**
+ * GDataParsable:
+ *
+ * All the fields in the #GDataParsable structure are private and should never be accessed directly.
+ *
+ * Since: 0.3.0
+ */
+typedef struct {
+ GObject parent;
+ GDataParsablePrivate *priv;
+} GDataParsable;
+
+/**
+ * GDataParsableClass:
+ * @parent: the parent class
+ * @pre_parse_xml: a function called before parsing of an XML tree is started, which allows properties from the root node to be extracted
+ * and used in @parsable
+ * @parse_xml: a function to parse an XML representation of the #GDataParsable to set the properties of the @parsable
+ * @post_parse_xml: a function called after parsing an XML tree, to allow the @parsable to validate the parsed properties
+ * @pre_get_xml: a function called before building the XML representation of the children of the #GDataParsable, which allows attributes of the root
+ * XML node to be added to @xml_string
+ * @get_xml: a function to build an XML representation of the #GDataParsable in its current state, appending it to the provided #GString
+ * @get_namespaces: a function to return a string containing the namespace declarations used by the @parsable when represented in XML form
+ * @parse_json: a function to parse a JSON representation of the #GDataParsable to set the properties of the @parsable
+ * @post_parse_json: a function called after parsing a JSON object, to allow the @parsable to validate the parsed properties
+ * @get_json: a function to build a JSON representation of the #GDataParsable in its current state, appending it to the provided #JsonBuilder
+ * @get_content_type: a function which returns content type upon which is #GDataParsable built
+ * @element_name: the name of the XML element which represents this parsable
+ * @element_namespace: the prefix of the XML namespace used for the parsable
+ *
+ * The class structure for the #GDataParsable class. Note that JSON and XML functions are mutually exclusive:
+ * a given implementation of #GDataParsable is represented as exactly one of JSON and XML.
+ *
+ * Since: 0.3.0
+ */
+typedef struct {
+ GObjectClass parent;
+
+ gboolean (*pre_parse_xml) (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+ gboolean (*parse_xml) (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error);
+ gboolean (*post_parse_xml) (GDataParsable *parsable, gpointer user_data, GError **error);
+
+ void (*pre_get_xml) (GDataParsable *parsable, GString *xml_string);
+ void (*get_xml) (GDataParsable *parsable, GString *xml_string);
+ void (*get_namespaces) (GDataParsable *parsable, GHashTable *namespaces);
+
+ gboolean (*parse_json) (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error);
+ gboolean (*post_parse_json) (GDataParsable *parsable, gpointer user_data, GError **error);
+ void (*get_json) (GDataParsable *parsable, JsonBuilder *builder);
+
+ const gchar *(*get_content_type) (void);
+
+ const gchar *element_name;
+ const gchar *element_namespace;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+ void (*_g_reserved2) (void);
+ void (*_g_reserved3) (void);
+ void (*_g_reserved4) (void);
+ void (*_g_reserved5) (void);
+ void (*_g_reserved6) (void);
+ void (*_g_reserved7) (void);
+} GDataParsableClass;
+
+GType gdata_parsable_get_type (void) G_GNUC_CONST;
+
+const gchar *gdata_parsable_get_content_type (GDataParsable *self);
+
+GDataParsable *gdata_parsable_new_from_xml (GType parsable_type, const gchar *xml, gint length,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+gchar *gdata_parsable_get_xml (GDataParsable *self) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+GDataParsable *gdata_parsable_new_from_json (GType parsable_type, const gchar *json, gint length,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+gchar *gdata_parsable_get_json (GDataParsable *self) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+G_END_DECLS
+
+#endif /* !GDATA_PARSABLE_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <sys/time.h>
+#include <time.h>
+#include <string.h>
+#include <libxml/parser.h>
+#include <json-glib/json-glib.h>
+
+#include "gdata-parser.h"
+#include "gdata-service.h"
+#include "gdata-types.h"
+#include "gdata-private.h"
+
+static gchar *
+print_element (xmlNode *node)
+{
+ gboolean node_has_ns = (node->ns == NULL || node->ns->prefix == NULL ||
+ xmlStrcmp (node->ns->href, (xmlChar*) "http://www.w3.org/2005/Atom") == 0) ? FALSE : TRUE;
+
+ if (node->parent == NULL) {
+ /* No parent node */
+ if (node_has_ns == TRUE)
+ return g_strdup_printf ("<%s:%s>", node->ns->prefix, node->name);
+ else
+ return g_strdup_printf ("<%s>", node->name);
+ } else {
+ /* We have a parent node, which makes things a lot more complex */
+ gboolean parent_has_ns = (node->parent->type == XML_DOCUMENT_NODE || node->parent->ns == NULL || node->parent->ns->prefix == NULL ||
+ xmlStrcmp (node->parent->ns->href, (xmlChar*) "http://www.w3.org/2005/Atom") == 0) ? FALSE : TRUE;
+
+ if (parent_has_ns == TRUE && node_has_ns == TRUE)
+ return g_strdup_printf ("<%s:%s/%s:%s>", node->parent->ns->prefix, node->parent->name, node->ns->prefix, node->name);
+ else if (parent_has_ns == FALSE && node_has_ns == TRUE)
+ return g_strdup_printf ("<%s/%s:%s>", node->parent->name, node->ns->prefix, node->name);
+ else
+ return g_strdup_printf ("<%s/%s>", node->parent->name, node->name);
+ }
+}
+
+gboolean
+gdata_parser_error_required_content_missing (xmlNode *element, GError **error)
+{
+ gchar *element_string = print_element (element);
+
+ /* Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+ *
+ * For example:
+ * A <title> element was missing required content. */
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR, _("A %s element was missing required content."), element_string);
+ g_free (element_string);
+
+ return FALSE;
+}
+
+gboolean
+gdata_parser_error_not_iso8601_format (xmlNode *element, const gchar *actual_value, GError **error)
+{
+ gchar *element_string = print_element (element);
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+ * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+ *
+ * For example:
+ * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format. */
+ _("The content of a %s element (‘%s’) was not in ISO 8601 format."), element_string, actual_value);
+ g_free (element_string);
+
+ return FALSE;
+}
+
+gboolean
+gdata_parser_error_unknown_property_value (xmlNode *element, const gchar *property_name, const gchar *actual_value, GError **error)
+{
+ gchar *property_string, *element_string;
+
+ property_string = g_strdup_printf ("@%s", property_name);
+ element_string = print_element (element);
+
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+ * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+ *
+ * For example:
+ * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown. */
+ _("The value of the %s property of a %s element (‘%s’) was unknown."), property_string, element_string, actual_value);
+ g_free (property_string);
+ g_free (element_string);
+
+ return FALSE;
+}
+
+gboolean
+gdata_parser_error_unknown_content (xmlNode *element, const gchar *actual_content, GError **error)
+{
+ gchar *element_string = print_element (element);
+
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+ * and the second parameter is the unknown content of that element.
+ *
+ * For example:
+ * The content of a <gphoto:access> element (‘protected’) was unknown. */
+ _("The content of a %s element (‘%s’) was unknown."), element_string, actual_content);
+ g_free (element_string);
+
+ return FALSE;
+}
+
+gboolean
+gdata_parser_error_required_property_missing (xmlNode *element, const gchar *property_name, GError **error)
+{
+ gchar *property_string, *element_string;
+
+ property_string = g_strdup_printf ("@%s", property_name);
+ element_string = print_element (element);
+
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+ * and the second is the name of an XML property which it should have contained.
+ *
+ * For example:
+ * A required property of a <entry/gAcl:role> element (@value) was not present. */
+ _("A required property of a %s element (%s) was not present."), element_string, property_string);
+ g_free (property_string);
+ g_free (element_string);
+
+ return FALSE;
+}
+
+gboolean
+gdata_parser_error_mutexed_properties (xmlNode *element, const gchar *property1_name, const gchar *property2_name, GError **error)
+{
+ gchar *property1_string, *property2_string, *element_string;
+
+ property1_string = g_strdup_printf ("@%s", property1_name);
+ property2_string = g_strdup_printf ("@%s", property2_name);
+ element_string = print_element (element);
+
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the first two parameters are the names of XML properties of an XML element given in the third
+ * parameter (including the angle brackets ("<" and ">")).
+ *
+ * For example:
+ * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+ * two is allowed. */
+ _("Values were present for properties %s and %s of a %s element when only one of the two is allowed."),
+ property1_string, property2_string, element_string);
+ g_free (property1_string);
+ g_free (property2_string);
+ g_free (element_string);
+
+ return FALSE;
+}
+
+gboolean
+gdata_parser_error_required_element_missing (const gchar *element_name, const gchar *parent_element_name, GError **error)
+{
+ /* NOTE: This can't take an xmlNode, since such a node wouldn't exist. */
+ gchar *element_string = g_strdup_printf ("<%s/%s>", parent_element_name, element_name);
+
+ /* Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+ *
+ * For example:
+ * A required element (<entry/title>) was not present. */
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR, _("A required element (%s) was not present."), element_string);
+ g_free (element_string);
+
+ return FALSE;
+}
+
+gboolean
+gdata_parser_error_duplicate_element (xmlNode *element, GError **error)
+{
+ gchar *element_string = print_element (element);
+
+ /* Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+ *
+ * For example:
+ * A singleton element (<feed/title>) was duplicated. */
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR, _("A singleton element (%s) was duplicated."), element_string);
+ g_free (element_string);
+
+ return FALSE;
+}
+
+gboolean
+gdata_parser_int64_from_date (const gchar *date, gint64 *_time)
+{
+ gchar *iso8601_date;
+ gboolean success;
+ GTimeVal time_val;
+
+ if (strlen (date) != 10 && strlen (date) != 8)
+ return FALSE;
+
+ /* Note: This doesn't need translating, as it's outputting an ISO 8601 time string */
+ iso8601_date = g_strdup_printf ("%sT00:00:00Z", date);
+ success = g_time_val_from_iso8601 (iso8601_date, &time_val);
+ g_free (iso8601_date);
+
+ if (success == TRUE)
+ *_time = time_val.tv_sec;
+
+ return success;
+}
+
+gchar *
+gdata_parser_date_from_int64 (gint64 _time)
+{
+ time_t secs;
+ struct tm *tm;
+
+ secs = _time;
+ tm = gmtime (&secs);
+
+ /* Note: This doesn't need translating, as it's outputting an ISO 8601 date string */
+ return g_strdup_printf ("%04d-%02d-%02d", tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday);
+}
+
+gchar *
+gdata_parser_int64_to_iso8601 (gint64 _time)
+{
+ GTimeVal time_val;
+
+ time_val.tv_sec = _time;
+ time_val.tv_usec = 0;
+
+ return g_time_val_to_iso8601 (&time_val);
+}
+
+gboolean
+gdata_parser_int64_from_iso8601 (const gchar *date, gint64 *_time)
+{
+ GTimeVal time_val;
+
+ if (g_time_val_from_iso8601 (date, &time_val) == TRUE) {
+ *_time = time_val.tv_sec;
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+gboolean
+gdata_parser_error_required_json_content_missing (JsonReader *reader, GError **error)
+{
+ const gchar *element_string = json_reader_get_member_name (reader);
+
+ /* Translators: the parameter is the name of an JSON element.
+ *
+ * For example:
+ * A ‘title’ element was missing required content. */
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR, _("A ‘%s’ element was missing required content."), element_string);
+
+ return FALSE;
+}
+
+gboolean
+gdata_parser_error_duplicate_json_element (JsonReader *reader, GError **error)
+{
+ const gchar *element_string = json_reader_get_member_name (reader);
+
+ /* Translators: the parameter is the name of an JSON element.
+ *
+ * For example:
+ * A singleton element (title) was duplicated. */
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR, _("A singleton element (%s) was duplicated."), element_string);
+
+ return FALSE;
+}
+
+gboolean
+gdata_parser_error_not_iso8601_format_json (JsonReader *reader, const gchar *actual_value, GError **error)
+{
+ const gchar *element_string = json_reader_get_member_name (reader);
+
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the first parameter is the name of an JSON element,
+ * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+ *
+ * For example:
+ * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format. */
+ _("The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."), element_string, actual_value);
+
+ return FALSE;
+}
+
+gboolean
+gdata_parser_error_from_json_error (JsonReader *reader,
+ const GError *json_error, GError **error)
+{
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the parameter is an error message. */
+ _("Invalid JSON was received from the server: %s"), json_error->message);
+
+ return FALSE;
+}
+
+/*
+ * gdata_parser_boolean_from_property:
+ * @element: the XML element which owns the property to parse
+ * @property_name: the name of the property to parse
+ * @output: the return location for the parsed boolean value
+ * @default_output: the default value to return in @output if the property can't be found
+ * @error: a #GError, or %NULL
+ *
+ * Parses a GData boolean value from the property @property_name of @element.
+ * The boolean value should be of the form: "<element property_name='[true|false]'/>".
+ * A %GDATA_SERVICE_ERROR_PROTOCOL_ERROR error will be returned in @error if parsing fails, and @output will not be set.
+ *
+ * If no property with the name @property_name exists in @element and @default_output is <code class="literal">0</code>,
+ * @output will be set to %FALSE.
+ * If @default_output is <code class="literal">1</code>, @output will be set to %TRUE. If @default_output is <code class="literal">-1</code>,
+ * a %GDATA_SERVICE_ERROR_PROTOCOL_ERROR will be returned in @error.
+ *
+ * Return value: %TRUE on successful parsing, %FALSE otherwise
+ *
+ * Since: 0.7.0
+ */
+gboolean
+gdata_parser_boolean_from_property (xmlNode *element, const gchar *property_name, gboolean *output, gint default_output, GError **error)
+{
+ xmlChar *value = xmlGetProp (element, (xmlChar*) property_name);
+
+ if (value == NULL) {
+ /* Missing property */
+ if (default_output == -1)
+ return gdata_parser_error_required_property_missing (element, property_name, error);
+ *output = (default_output == 1) ? TRUE : FALSE;
+ } else if (xmlStrcmp (value, (xmlChar*) "false") == 0) {
+ *output = FALSE;
+ } else if (xmlStrcmp (value, (xmlChar*) "true") == 0) {
+ *output = TRUE;
+ } else {
+ /* Parsing failed */
+ gdata_parser_error_unknown_property_value (element, property_name, (gchar*) value, error);
+ xmlFree (value);
+ return FALSE;
+ }
+
+ xmlFree (value);
+ return TRUE;
+}
+
+/*
+ * gdata_parser_is_namespace:
+ * @element: the element to check
+ * @namespace_uri: the URI of the desired namespace
+ *
+ * Checks whether @element is in the namespace identified by @namespace_uri. If @element isn't in a namespace,
+ * %FALSE is returned.
+ *
+ * Return value: %TRUE if @element is in @namespace_uri; %FALSE otherwise
+ *
+ * Since: 0.7.0
+ */
+gboolean
+gdata_parser_is_namespace (xmlNode *element, const gchar *namespace_uri)
+{
+ if ((element->ns != NULL && xmlStrcmp (element->ns->href, (const xmlChar*) namespace_uri) == 0) ||
+ (element->ns == NULL && strcmp (namespace_uri, "http://www.w3.org/2005/Atom") == 0))
+ return TRUE;
+ return FALSE;
+}
+
+/*
+ * gdata_parser_string_from_element:
+ * @element: the element to check against
+ * @element_name: the name of the element to parse
+ * @options: a bitwise combination of parsing options from #GDataParserOptions, or %P_NONE
+ * @output: the return location for the parsed string content
+ * @success: the return location for a value which is %TRUE if the string was parsed successfully, %FALSE if an error was encountered,
+ * and undefined if @element didn't match @element_name
+ * @error: a #GError, or %NULL
+ *
+ * Gets the string content of @element if its name is @element_name, subject to various checks specified by @options.
+ *
+ * If @element doesn't match @element_name, %FALSE will be returned, @error will be unset and @success will be unset.
+ *
+ * If @element matches @element_name but one of the checks specified by @options fails, %TRUE will be returned, @error will be set to a
+ * %GDATA_SERVICE_ERROR_PROTOCOL_ERROR error and @success will be set to %FALSE.
+ *
+ * If @element matches @element_name and all of the checks specified by @options pass, %TRUE will be returned, @error will be unset and
+ * @success will be set to %TRUE.
+ *
+ * The reason for returning the success of the parsing in @success is so that calls to gdata_parser_string_from_element() can be chained
+ * together in a large "or" statement based on their return values, for the purposes of determining whether any of the calls matched
+ * a given @element. If any of the calls to gdata_parser_string_from_element() return %TRUE, the value of @success can be examined.
+ *
+ * Return value: %TRUE if @element matched @element_name, %FALSE otherwise
+ *
+ * Since: 0.7.0
+ */
+gboolean
+gdata_parser_string_from_element (xmlNode *element, const gchar *element_name, GDataParserOptions options,
+ gchar **output, gboolean *success, GError **error)
+{
+ xmlChar *text;
+
+ /* Check it's the right element */
+ if (xmlStrcmp (element->name, (xmlChar*) element_name) != 0)
+ return FALSE;
+
+ /* Check if the output string has already been set */
+ if (options & P_NO_DUPES && *output != NULL) {
+ *success = gdata_parser_error_duplicate_element (element, error);
+ return TRUE;
+ }
+
+ /* Get the string and check it for NULLness or emptiness */
+ text = xmlNodeListGetString (element->doc, element->children, TRUE);
+ if ((options & P_REQUIRED && text == NULL) || (options & P_NON_EMPTY && text != NULL && *text == '\0')) {
+ xmlFree (text);
+ *success = gdata_parser_error_required_content_missing (element, error);
+ return TRUE;
+ } else if (options & P_DEFAULT && (text == NULL || *text == '\0')) {
+ text = (xmlChar*) g_strdup ("");
+ }
+
+ /* Success! */
+ g_free (*output);
+ *output = (gchar*) text;
+ *success = TRUE;
+
+ return TRUE;
+}
+
+/*
+ * gdata_parser_int64_time_from_element:
+ * @element: the element to check against
+ * @element_name: the name of the element to parse
+ * @options: a bitwise combination of parsing options from #GDataParserOptions, or %P_NONE
+ * @output: (out caller-allocates): the return location for the parsed time value
+ * @success: the return location for a value which is %TRUE if the time val was parsed successfully, %FALSE if an error was encountered,
+ * and undefined if @element didn't match @element_name
+ * @error: a #GError, or %NULL
+ *
+ * Gets the time value of @element if its name is @element_name, subject to various checks specified by @options. It expects the text content
+ * of @element to be a date or time value in ISO 8601 format. The returned time value will be a UNIX timestamp (seconds since the epoch).
+ *
+ * If @element doesn't match @element_name, %FALSE will be returned, @error will be unset and @success will be unset.
+ *
+ * If @element matches @element_name but one of the checks specified by @options fails, %TRUE will be returned, @error will be set to a
+ * %GDATA_SERVICE_ERROR_PROTOCOL_ERROR error and @success will be set to %FALSE.
+ *
+ * If @element matches @element_name and all of the checks specified by @options pass, %TRUE will be returned, @error will be unset and
+ * @success will be set to %TRUE.
+ *
+ * The reason for returning the success of the parsing in @success is so that calls to gdata_parser_int64_time_from_element() can be chained
+ * together in a large "or" statement based on their return values, for the purposes of determining whether any of the calls matched
+ * a given @element. If any of the calls to gdata_parser_int64_time_from_element() return %TRUE, the value of @success can be examined.
+ *
+ * Return value: %TRUE if @element matched @element_name, %FALSE otherwise
+ *
+ * Since: 0.7.0
+ */
+gboolean
+gdata_parser_int64_time_from_element (xmlNode *element, const gchar *element_name, GDataParserOptions options,
+ gint64 *output, gboolean *success, GError **error)
+{
+ xmlChar *text;
+ GTimeVal time_val;
+
+ /* Check it's the right element */
+ if (xmlStrcmp (element->name, (xmlChar*) element_name) != 0)
+ return FALSE;
+
+ /* Check if the output time val has already been set */
+ if (options & P_NO_DUPES && *output != -1) {
+ *success = gdata_parser_error_duplicate_element (element, error);
+ return TRUE;
+ }
+
+ /* Get the string and check it for NULLness */
+ text = xmlNodeListGetString (element->doc, element->children, TRUE);
+ if (options & P_REQUIRED && (text == NULL || *text == '\0')) {
+ xmlFree (text);
+ *success = gdata_parser_error_required_content_missing (element, error);
+ return TRUE;
+ }
+
+ /* Attempt to parse the string as a GTimeVal */
+ if (g_time_val_from_iso8601 ((gchar*) text, &time_val) == FALSE) {
+ *success = gdata_parser_error_not_iso8601_format (element, (gchar*) text, error);
+ xmlFree (text);
+ return TRUE;
+ }
+
+ *output = time_val.tv_sec;
+
+ /* Success! */
+ xmlFree (text);
+ *success = TRUE;
+
+ return TRUE;
+}
+
+/*
+ * gdata_parser_int64_from_element:
+ * @element: the element to check against
+ * @element_name: the name of the element to parse
+ * @options: a bitwise combination of parsing options from #GDataParserOptions, or %P_NONE
+ * @output: (out caller-allocates): the return location for the parsed integer value
+ * @default_output: default value for the property, used with %P_NO_DUPES to detect duplicates
+ * @success: the return location for a value which is %TRUE if the integer was parsed successfully, %FALSE if an error was encountered,
+ * and undefined if @element didn't match @element_name
+ * @error: a #GError, or %NULL
+ *
+ * Gets the integer value of @element if its name is @element_name, subject to various checks specified by @options. It expects the text content
+ * of @element to be an integer in base 10 format.
+ *
+ * If @element doesn't match @element_name, %FALSE will be returned, @error will be unset and @success will be unset.
+ *
+ * If @element matches @element_name but one of the checks specified by @options fails, %TRUE will be returned, @error will be set to a
+ * %GDATA_SERVICE_ERROR_PROTOCOL_ERROR error and @success will be set to %FALSE.
+ *
+ * If @element matches @element_name and all of the checks specified by @options pass, %TRUE will be returned, @error will be unset and
+ * @success will be set to %TRUE.
+ *
+ * The reason for returning the success of the parsing in @success is so that calls to gdata_parser_int64_from_element() can be chained
+ * together in a large "or" statement based on their return values, for the purposes of determining whether any of the calls matched
+ * a given @element. If any of the calls to gdata_parser_int64_from_element() return %TRUE, the value of @success can be examined.
+ *
+ * Return value: %TRUE if @element matched @element_name, %FALSE otherwise
+ *
+ * Since: 0.13.0
+ */
+gboolean
+gdata_parser_int64_from_element (xmlNode *element, const gchar *element_name, GDataParserOptions options,
+ gint64 *output, gint64 default_output, gboolean *success, GError **error)
+{
+ xmlChar *text;
+ gchar *end_ptr;
+ gint64 val;
+
+ /* Check it's the right element */
+ if (xmlStrcmp (element->name, (xmlChar*) element_name) != 0) {
+ return FALSE;
+ }
+
+ /* Check if the output value has already been set */
+ if (options & P_NO_DUPES && *output != default_output) {
+ *success = gdata_parser_error_duplicate_element (element, error);
+ return TRUE;
+ }
+
+ /* Get the string and check it for NULLness */
+ text = xmlNodeListGetString (element->doc, element->children, TRUE);
+ if (options & P_REQUIRED && (text == NULL || *text == '\0')) {
+ xmlFree (text);
+ *success = gdata_parser_error_required_content_missing (element, error);
+ return TRUE;
+ }
+
+ /* Attempt to parse the string as a 64-bit integer */
+ val = g_ascii_strtoll ((const gchar*) text, &end_ptr, 10);
+ if (*end_ptr != '\0') {
+ *success = gdata_parser_error_unknown_content (element, (gchar*) text, error);
+ xmlFree (text);
+ return TRUE;
+ }
+
+ *output = val;
+
+ /* Success! */
+ xmlFree (text);
+ *success = TRUE;
+
+ return TRUE;
+}
+
+/*
+ * gdata_parser_object_from_element_setter:
+ * @element: the element to check against
+ * @element_name: the name of the element to parse
+ * @options: a bitwise combination of parsing options from #GDataParserOptions, or %P_NONE
+ * @object_type: the type of the object to parse
+ * @_setter: a function to call once parsing's finished to return the object (#GDataParserSetterFunc)
+ * @_parent_parsable: the first parameter to pass to @_setter (of type #GDataParsable)
+ * @success: the return location for a value which is %TRUE if the object was parsed successfully, %FALSE if an error was encountered,
+ * and undefined if @element didn't match @element_name
+ * @error: a #GError, or %NULL
+ *
+ * Gets the object content of @element if its name is @element_name, subject to various checks specified by @options. If @element matches
+ * @element_name, @element will be parsed as an @object_type, which must extend #GDataParsable. If parsing is successful, @_setter will be called
+ * with its first parameter as @_parent_parsable, and its second as the parsed object of type @object_type. @_setter must reference the parsed object
+ * it's passed if it wants to keep it, as gdata_parser_object_from_element_setter will unreference it before returning.
+ *
+ * If @element doesn't match @element_name, %FALSE will be returned, @error will be unset and @success will be unset.
+ *
+ * If @element matches @element_name but one of the checks specified by @options fails, %TRUE will be returned, @error will be set to a
+ * %GDATA_SERVICE_ERROR_PROTOCOL_ERROR error and @success will be set to %FALSE.
+ *
+ * If @element matches @element_name and all of the checks specified by @options pass, %TRUE will be returned, @error will be unset and
+ * @success will be set to %TRUE.
+ *
+ * The reason for returning the success of the parsing in @success is so that calls to gdata_parser_object_from_element_setter() can be chained
+ * together in a large "or" statement based on their return values, for the purposes of determining whether any of the calls matched
+ * a given @element. If any of the calls to gdata_parser_object_from_element_setter() return %TRUE, the value of @success can be examined.
+ *
+ * @_setter and @_parent_parsable are both #gpointers to avoid casts having to be put into calls to gdata_parser_object_from_element_setter().
+ * @_setter is actually of type #GDataParserSetterFunc, and @_parent_parsable should be a subclass of #GDataParsable.
+ * Neither parameter should be %NULL. No checks are implemented against these conditions (for efficiency reasons), so calling code must be correct.
+ *
+ * Return value: %TRUE if @element matched @element_name, %FALSE otherwise
+ *
+ * Since: 0.7.0
+ */
+gboolean
+gdata_parser_object_from_element_setter (xmlNode *element, const gchar *element_name, GDataParserOptions options, GType object_type,
+ gpointer /* GDataParserSetterFunc */ _setter, gpointer /* GDataParsable * */ _parent_parsable,
+ gboolean *success, GError **error)
+{
+ GDataParsable *parsable, *parent_parsable;
+ GDataParserSetterFunc setter;
+ GError *local_error = NULL;
+
+ g_return_val_if_fail (!(options & P_REQUIRED) || !(options & P_IGNORE_ERROR), FALSE);
+
+ /* We're lax on the types so that we don't have to do loads of casting when calling the function, which makes the parsing code more legible */
+ setter = (GDataParserSetterFunc) _setter;
+ parent_parsable = (GDataParsable*) _parent_parsable;
+
+ /* Check it's the right element */
+ if (xmlStrcmp (element->name, (xmlChar*) element_name) != 0)
+ return FALSE;
+
+ /* Get the object and check for instantiation failure */
+ parsable = _gdata_parsable_new_from_xml_node (object_type, element->doc, element, NULL, &local_error);
+ g_assert ((parsable == NULL) == (local_error != NULL));
+
+ if (options & P_REQUIRED && parsable == NULL) {
+ /* The error has already been set by _gdata_parsable_new_from_xml_node() */
+ g_propagate_error (error, g_steal_pointer (&local_error));
+ *success = FALSE;
+ return TRUE;
+ } else if ((options & P_IGNORE_ERROR) && parsable == NULL) {
+ g_clear_error (&local_error);
+ *success = TRUE;
+ return TRUE;
+ } else if (local_error != NULL) {
+ g_propagate_error (error, g_steal_pointer (&local_error));
+ *success = FALSE;
+ return TRUE;
+ }
+
+ /* Success! */
+ setter (parent_parsable, parsable);
+ g_object_unref (parsable);
+ *success = TRUE;
+
+ return TRUE;
+}
+
+/*
+ * gdata_parser_object_from_element:
+ * @element: the element to check against
+ * @element_name: the name of the element to parse
+ * @options: a bitwise combination of parsing options from #GDataParserOptions, or %P_NONE
+ * @object_type: the type of the object to parse
+ * @_output: the return location for the parsed object (of type #GDataParsable)
+ * @success: the return location for a value which is %TRUE if the object was parsed successfully, %FALSE if an error was encountered,
+ * and undefined if @element didn't match @element_name
+ * @error: a #GError, or %NULL
+ *
+ * Gets the object content of @element if its name is @element_name, subject to various checks specified by @options. If @element matches
+ * @element_name, @element will be parsed as an @object_type, which must extend #GDataParsable. If parsing is successful, the parsed object will be
+ * returned in @_output, which must be of type #GDataParsable (or a subclass). Ownership of the parsed object will pass to the calling code.
+ *
+ * If @element doesn't match @element_name, %FALSE will be returned, @error will be unset and @success will be unset.
+ *
+ * If @element matches @element_name but one of the checks specified by @options fails, %TRUE will be returned, @error will be set to a
+ * %GDATA_SERVICE_ERROR_PROTOCOL_ERROR error and @success will be set to %FALSE.
+ *
+ * If @element matches @element_name and all of the checks specified by @options pass, %TRUE will be returned, @error will be unset and
+ * @success will be set to %TRUE.
+ *
+ * The reason for returning the success of the parsing in @success is so that calls to gdata_parser_object_from_element() can be chained
+ * together in a large "or" statement based on their return values, for the purposes of determining whether any of the calls matched
+ * a given @element. If any of the calls to gdata_parser_object_from_element() return %TRUE, the value of @success can be examined.
+ *
+ * @_object is a #gpointer to avoid casts having to be put into calls to gdata_parser_object_from_element(). It is actually of type #GDataParsable
+ * and must not be %NULL. No check is implemented against this condition (for efficiency reasons), so calling code must be correct.
+ *
+ * Return value: %TRUE if @element matched @element_name, %FALSE otherwise
+ *
+ * Since: 0.7.0
+ */
+gboolean
+gdata_parser_object_from_element (xmlNode *element, const gchar *element_name, GDataParserOptions options, GType object_type,
+ gpointer /* GDataParsable ** */ _output, gboolean *success, GError **error)
+{
+ GDataParsable *parsable, **output;
+
+ /* We're lax on the types so that we don't have to do loads of casting when calling the function, which makes the parsing code more legible */
+ output = (GDataParsable**) _output;
+
+ /* Check it's the right element */
+ if (xmlStrcmp (element->name, (xmlChar*) element_name) != 0)
+ return FALSE;
+
+ /* If we're not using a setter, check if the output already exists */
+ if (options & P_NO_DUPES && *output != NULL) {
+ *success = gdata_parser_error_duplicate_element (element, error);
+ return TRUE;
+ }
+
+ /* Get the object and check for instantiation failure */
+ parsable = _gdata_parsable_new_from_xml_node (object_type, element->doc, element, NULL, error);
+ if (options & P_REQUIRED && parsable == NULL) {
+ /* The error has already been set by _gdata_parsable_new_from_xml_node() */
+ *success = FALSE;
+ return TRUE;
+ }
+
+ /* Success! */
+ if (*output != NULL)
+ g_object_unref (*output);
+ *output = parsable;
+ *success = TRUE;
+
+ return TRUE;
+}
+
+/*
+ * gdata_parser_string_from_json_member:
+ * @reader: #JsonReader cursor object to read JSON node from
+ * @member_name: the name of the member to parse
+ * @options: a bitwise combination of parsing options from #GDataParserOptions, or %P_NONE
+ * @output: the return location for the parsed string content
+ * @success: the return location for a value which is %TRUE if the string was parsed successfully, %FALSE if an error was encountered,
+ * and undefined if @element didn't match @element_name
+ * @error: a #GError, or %NULL
+ *
+ * Gets the string content of @element if its name is @element_name, subject to various checks specified by @options.
+ *
+ * If @element doesn't match @element_name, %FALSE will be returned, @error will be unset and @success will be unset.
+ *
+ * If @element matches @element_name but one of the checks specified by @options fails, %TRUE will be returned, @error will be set to a
+ * %GDATA_SERVICE_ERROR_PROTOCOL_ERROR error and @success will be set to %FALSE.
+ *
+ * If @element matches @element_name and all of the checks specified by @options pass, %TRUE will be returned, @error will be unset and
+ * @success will be set to %TRUE.
+ *
+ * The reason for returning the success of the parsing in @success is so that calls to gdata_parser_string_from_element() can be chained
+ * together in a large "or" statement based on their return values, for the purposes of determining whether any of the calls matched
+ * a given @element. If any of the calls to gdata_parser_string_from_element() return %TRUE, the value of @success can be examined.
+ *
+ * Return value: %TRUE if @element matched @element_name, %FALSE otherwise
+ *
+ * Since: 0.15.0
+ */
+gboolean
+gdata_parser_string_from_json_member (JsonReader *reader, const gchar *member_name, GDataParserOptions options,
+ gchar **output, gboolean *success, GError **error)
+{
+ const gchar *text;
+ const GError *child_error = NULL;
+
+ /* Check if there's such element */
+ if (g_strcmp0 (json_reader_get_member_name (reader), member_name) != 0) {
+ return FALSE;
+ }
+
+ /* Check if the output string has already been set. The JSON parser guarantees this can't happen. */
+ g_assert (!(options & P_NO_DUPES) || *output == NULL);
+
+ /* Get the string and check it for NULLness or emptiness. Check for parser errors first. */
+ text = json_reader_get_string_value (reader);
+ child_error = json_reader_get_error (reader);
+ if (child_error != NULL) {
+ *success = gdata_parser_error_from_json_error (reader,
+ child_error,
+ error);
+ return TRUE;
+ } else if ((options & P_REQUIRED && text == NULL) || (options & P_NON_EMPTY && text != NULL && *text == '\0')) {
+ *success = gdata_parser_error_required_json_content_missing (reader, error);
+ return TRUE;
+ } else if (options & P_DEFAULT && (text == NULL || *text == '\0')) {
+ text = "";
+ }
+
+ /* Success! */
+ g_free (*output);
+ *output = g_strdup (text);
+ *success = TRUE;
+
+ return TRUE;
+}
+
+/*
+ * gdata_parser_int_from_json_member:
+ * @reader: #JsonReader cursor object to read JSON node from
+ * @member_name: the name of the member to parse
+ * @options: a bitwise combination of parsing options from #GDataParserOptions,
+ * or %P_NONE
+ * @output: the return location for the parsed integer content
+ * @success: the return location for a value which is %TRUE if the integer was
+ * parsed successfully, %FALSE if an error was encountered, and undefined if
+ * @element didn't match @element_name
+ * @error: a #GError, or %NULL
+ *
+ * Gets the integer content of @element if its name is @element_name, subject to
+ * various checks specified by @options.
+ *
+ * If @element doesn't match @element_name, %FALSE will be returned, @error will
+ * be unset and @success will be unset.
+ *
+ * If @element matches @element_name but one of the checks specified by @options
+ * fails, %TRUE will be returned, @error will be set to a
+* %GDATA_SERVICE_ERROR_PROTOCOL_ERROR error and @success will be set to %FALSE.
+ *
+ * If @element matches @element_name and all of the checks specified by @options
+ * pass, %TRUE will be returned, @error will be unset and @success will be set
+ * to %TRUE.
+ *
+ * The reason for returning the success of the parsing in @success is so that
+ * calls to gdata_parser_int_from_element() can be chained together in a large
+ * "or" statement based on their return values, for the purposes of determining
+ * whether any of the calls matched a given @element. If any of the calls to
+ * gdata_parser_int_from_element() return %TRUE, the value of @success can be
+ * examined.
+ *
+ * Return value: %TRUE if @element matched @element_name, %FALSE otherwise
+ *
+ * Since: 0.17.0
+ */
+gboolean
+gdata_parser_int_from_json_member (JsonReader *reader,
+ const gchar *member_name,
+ GDataParserOptions options,
+ gint64 *output, gboolean *success,
+ GError **error)
+{
+ gint64 value;
+ const GError *child_error = NULL;
+
+ /* Check if there's such element */
+ if (g_strcmp0 (json_reader_get_member_name (reader), member_name) != 0) {
+ return FALSE;
+ }
+
+ value = json_reader_get_int_value (reader);
+ child_error = json_reader_get_error (reader);
+
+ if (child_error != NULL) {
+ *success = gdata_parser_error_from_json_error (reader,
+ child_error,
+ error);
+ return TRUE;
+ }
+
+ /* Success! */
+ *output = value;
+ *success = TRUE;
+
+ return TRUE;
+}
+
+/*
+ * gdata_parser_int64_time_from_json_member:
+ * @reader: #JsonReader cursor object to read JSON node from
+ * @element_name: the name of the element to parse
+ * @options: a bitwise combination of parsing options from #GDataParserOptions, or %P_NONE
+ * @output: (out caller-allocates): the return location for the parsed time value
+ * @success: the return location for a value which is %TRUE if the time val was parsed successfully, %FALSE if an error was encountered,
+ * and undefined if @element didn't match @element_name
+ * @error: a #GError, or %NULL
+ *
+ * Gets the time value of @element if its name is @element_name, subject to various checks specified by @options. It expects the text content
+ * of @element to be a date or time value in ISO 8601 format. The returned time value will be a UNIX timestamp (seconds since the epoch).
+ *
+ * If @element doesn't match @element_name, %FALSE will be returned, @error will be unset and @success will be unset.
+ *
+ * If @element matches @element_name but one of the checks specified by @options fails, %TRUE will be returned, @error will be set to a
+ * %GDATA_SERVICE_ERROR_PROTOCOL_ERROR error and @success will be set to %FALSE.
+ *
+ * If @element matches @element_name and all of the checks specified by @options pass, %TRUE will be returned, @error will be unset and
+ * @success will be set to %TRUE.
+ *
+ * The reason for returning the success of the parsing in @success is so that calls to gdata_parser_int64_time_from_element() can be chained
+ * together in a large "or" statement based on their return values, for the purposes of determining whether any of the calls matched
+ * a given @element. If any of the calls to gdata_parser_int64_time_from_element() return %TRUE, the value of @success can be examined.
+ *
+ * Return value: %TRUE if @element matched @element_name, %FALSE otherwise
+ *
+ * Since: 0.15.0
+ */
+gboolean
+gdata_parser_int64_time_from_json_member (JsonReader *reader, const gchar *member_name, GDataParserOptions options,
+ gint64 *output, gboolean *success, GError **error)
+{
+ const gchar *text;
+ GTimeVal time_val;
+ const GError *child_error = NULL;
+
+ /* Check if there's such element */
+ if (g_strcmp0 (json_reader_get_member_name (reader), member_name) != 0) {
+ return FALSE;
+ }
+
+ /* Check if the output time val has already been set. The JSON parser guarantees this can't happen. */
+ g_assert (!(options & P_NO_DUPES) || *output == -1);
+
+ /* Get the string and check it for NULLness. Check for errors first. */
+ text = json_reader_get_string_value (reader);
+ child_error = json_reader_get_error (reader);
+ if (child_error != NULL) {
+ *success = gdata_parser_error_from_json_error (reader,
+ child_error,
+ error);
+ return TRUE;
+ } else if (options & P_REQUIRED && (text == NULL || *text == '\0')) {
+ *success = gdata_parser_error_required_json_content_missing (reader, error);
+ return TRUE;
+ }
+
+ /* Attempt to parse the string as a GTimeVal */
+ if (g_time_val_from_iso8601 ((gchar*) text, &time_val) == FALSE) {
+ *success = gdata_parser_error_not_iso8601_format_json (reader, text, error);
+ return TRUE;
+ }
+
+ /* Success! */
+ *output = time_val.tv_sec;
+ *success = TRUE;
+
+ return TRUE;
+}
+
+/*
+ * gdata_parser_boolean_from_json_member:
+ * @reader: #JsonReader cursor object to read the JSON node from
+ * @member_name: the name of the JSON object member to parse
+ * @options: a bitwise combination of parsing options from #GDataParserOptions, or %P_NONE
+ * @output: (out caller-allocates): the return location for the parsed boolean value
+ * @success: (out caller-allocates): the return location for a value which is %TRUE if the boolean was parsed successfully, %FALSE if an error was encountered,
+ * and undefined if @member_name was not found in the current object in @reader
+ * @error: (allow-none): a #GError, or %NULL
+ *
+ * Gets the boolean value of the @member_name member of the current object in the #JsonReader, subject to various checks specified by @options.
+ *
+ * If no member matching @member_name can be found in the current @reader JSON object, %FALSE will be returned, @error will be unset and @success will be unset. @output will be undefined.
+ *
+ * If @member_name is found but one of the checks specified by @options fails, %TRUE will be returned, @error will be set to a
+ * %GDATA_SERVICE_ERROR_PROTOCOL_ERROR error and @success will be set to %FALSE. @output will be undefined.
+ *
+ * If @member_name is found and all of the checks specified by @options pass, %TRUE will be returned, @error will be unset and
+ * @success will be set to %TRUE. @output will be set to the parsed value.
+ *
+ * The reason for returning the success of the parsing in @success is so that calls to gdata_parser_boolean_from_json_node() can be chained
+ * together in a large "or" statement based on their return values, for the purposes of determining whether any of the calls matched
+ * a given JSON node. If any of the calls to gdata_parser_boolean_from_json_node() return %TRUE, the value of @success can be examined.
+ *
+ * Return value: %TRUE if @member_name was found, %FALSE otherwise
+ *
+ * Since: 0.15.0
+ */
+gboolean
+gdata_parser_boolean_from_json_member (JsonReader *reader, const gchar *member_name, GDataParserOptions options, gboolean *output, gboolean *success, GError **error)
+{
+ gboolean val;
+ const GError *child_error = NULL;
+
+ /* Check if there's such an element. */
+ if (g_strcmp0 (json_reader_get_member_name (reader), member_name) != 0) {
+ return FALSE;
+ }
+
+ /* Get the boolean. Check for parse errors. */
+ val = json_reader_get_boolean_value (reader);
+ child_error = json_reader_get_error (reader);
+ if (child_error != NULL) {
+ *success = gdata_parser_error_from_json_error (reader,
+ child_error,
+ error);
+ return TRUE;
+ }
+
+ /* Success! */
+ *output = val;
+ *success = TRUE;
+
+ return TRUE;
+}
+
+/*
+ * gdata_parser_strv_from_json_member:
+ * @reader: #JsonReader cursor object to read JSON node from
+ * @element_name: the name of the element to parse
+ * @options: a bitwise combination of parsing options from #GDataParserOptions,
+ * or %P_NONE
+ * @output: (out callee-allocates) (transfer full): the return location for the
+ * parsed string array
+ * @success: the return location for a value which is %TRUE if the string array
+ * was parsed successfully, %FALSE if an error was encountered, and undefined
+ * if @element didn't match @element_name
+ * @error: a #GError, or %NULL
+ *
+ * Gets the string array of @element if its name is @element_name, subject to
+ * various checks specified by @options. It expects the @element to be an array
+ * of strings.
+ *
+ * If @element doesn't match @element_name, %FALSE will be returned, @error will
+ * be unset and @success will be unset.
+ *
+ * If @element matches @element_name but one of the checks specified by @options
+ * fails, %TRUE will be returned, @error will be set to a
+ * %GDATA_SERVICE_ERROR_PROTOCOL_ERROR error and @success will be set to %FALSE.
+ *
+ * If @element matches @element_name and all of the checks specified by @options
+ * pass, %TRUE will be returned, @error will be unset and @success will be set
+ * to %TRUE.
+ *
+ * The reason for returning the success of the parsing in @success is so that
+ * calls to gdata_parser_strv_from_element() can be chained together in a large
+ * "or" statement based on their return values, for the purposes of determining
+ * whether any of the calls matched a given @element. If any of the calls to
+ * gdata_parser_strv_from_element() return %TRUE, the value of @success can be
+ * examined.
+ *
+ * Return value: %TRUE if @element matched @element_name, %FALSE otherwise
+ *
+ * Since: 0.17.0
+ */
+gboolean
+gdata_parser_strv_from_json_member (JsonReader *reader,
+ const gchar *member_name,
+ GDataParserOptions options,
+ gchar ***output, gboolean *success,
+ GError **error)
+{
+ guint i, len;
+ GPtrArray *out;
+ const GError *child_error = NULL;
+
+ /* Check if there's such element */
+ if (g_strcmp0 (json_reader_get_member_name (reader),
+ member_name) != 0) {
+ return FALSE;
+ }
+
+ /* Check if the output strv has already been set. The JSON parser
+ * guarantees this can't happen. */
+ g_assert (!(options & P_NO_DUPES) || *output == NULL);
+
+ len = json_reader_count_elements (reader);
+ child_error = json_reader_get_error (reader);
+
+ if (child_error != NULL) {
+ *success = gdata_parser_error_from_json_error (reader,
+ child_error,
+ error);
+ return TRUE;
+ }
+
+ out = g_ptr_array_new_full (len + 1 /* NULL terminator */, g_free);
+
+ for (i = 0; i < len; i++) {
+ const gchar *val;
+
+ json_reader_read_element (reader, i);
+ val = json_reader_get_string_value (reader);
+ child_error = json_reader_get_error (reader);
+
+ if (child_error != NULL) {
+ *success = gdata_parser_error_from_json_error (reader,
+ child_error,
+ error);
+ json_reader_end_element (reader);
+ g_ptr_array_unref (out);
+ return TRUE;
+ }
+
+ g_ptr_array_add (out, g_strdup (val));
+
+ json_reader_end_element (reader);
+ }
+
+ /* NULL terminator. */
+ g_ptr_array_add (out, NULL);
+
+ /* Success! */
+ *output = (gchar **) g_ptr_array_free (out, FALSE);
+ *success = TRUE;
+
+ return TRUE;
+}
+
+/*
+ * gdata_parser_color_from_json_member:
+ * @reader: #JsonReader cursor object to read JSON node from
+ * @element_name: the name of the element to parse
+ * @options: a bitwise combination of parsing options from #GDataParserOptions,
+ * or %P_NONE
+ * @output: (out caller-allocates): the return location for the parsed colour
+ * value
+ * @success: the return location for a value which is %TRUE if the colour was
+ * parsed successfully, %FALSE if an error was encountered, and undefined if
+ * @element didn't match @element_name
+ * @error: a #GError, or %NULL
+ *
+ * Gets the colour value of @element if its name is @element_name, subject to
+ * various checks specified by @options. It expects the text content of
+ * @element to be an RGB colour in hexadecimal format, with an optional leading
+ * hash symbol (for example, `#RRGGBB` or `RRGGBB`).
+ *
+ * If @element doesn't match @element_name, %FALSE will be returned, @error
+ * will be unset and @success will be unset.
+ *
+ * If @element matches @element_name but one of the checks specified by
+ * @options fails, %TRUE will be returned, @error will be set to a
+ * %GDATA_SERVICE_ERROR_PROTOCOL_ERROR error and @success will be set to %FALSE.
+ *
+ * If @element matches @element_name and all of the checks specified by
+ * @options pass, %TRUE will be returned, @error will be unset and @success
+ * will be set to %TRUE.
+ *
+ * The reason for returning the success of the parsing in @success is so that
+ * calls to gdata_parser_color_from_json_member() can be chained together in a
+ * large "or" statement based on their return values, for the purposes of
+ * determining whether any of the calls matched a given @element. If any of the
+ * calls to gdata_parser_color_from_json_member() return %TRUE, the value of
+ * @success can be examined.
+ *
+ * Return value: %TRUE if @element matched @element_name, %FALSE otherwise
+ *
+ * Since: 0.17.2
+ */
+gboolean
+gdata_parser_color_from_json_member (JsonReader *reader,
+ const gchar *member_name,
+ GDataParserOptions options,
+ GDataColor *output,
+ gboolean *success,
+ GError **error)
+{
+ const gchar *text;
+ GDataColor colour;
+ const GError *child_error = NULL;
+
+ /* Check if there's such an element */
+ if (g_strcmp0 (json_reader_get_member_name (reader), member_name) != 0) {
+ return FALSE;
+ }
+
+ /* Check if the output colour has already been set. The JSON parser
+ * guarantees this can't happen. */
+ g_assert (!(options & P_NO_DUPES) ||
+ (output->red == 0 && output->green == 0 && output->blue == 0));
+
+ /* Get the string and check it for NULLness. Check for errors first. */
+ text = json_reader_get_string_value (reader);
+ child_error = json_reader_get_error (reader);
+ if (child_error != NULL) {
+ *success = gdata_parser_error_from_json_error (reader, child_error, error);
+ return TRUE;
+ } else if (options & P_REQUIRED && (text == NULL || *text == '\0')) {
+ *success = gdata_parser_error_required_json_content_missing (reader, error);
+ return TRUE;
+ }
+
+ /* Attempt to parse the string as a hexadecimal colour. */
+ if (gdata_color_from_hexadecimal (text, &colour) == FALSE) {
+ /* Error */
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the first parameter is the name of an XML element (including the angle brackets
+ * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+ * RGB format).
+ *
+ * For example:
+ * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format. */
+ _("The content of a %s element (‘%s’) was not in hexadecimal RGB format."),
+ member_name, text);
+ *success = FALSE;
+
+ return TRUE;
+ }
+
+ /* Success! */
+ *output = colour;
+ *success = TRUE;
+
+ return TRUE;
+}
+
+void
+gdata_parser_string_append_escaped (GString *xml_string, const gchar *pre, const gchar *element_content, const gchar *post)
+{
+ /* Allocate 10 extra bytes when reallocating the GString, to try and avoid having to reallocate again, by assuming
+ * there will be an increase in the length of element_content when escaped of less than 10 characters. */
+/* #define SIZE_FUZZINESS 10*/
+
+/* guint new_size;*/
+ const gchar *p;
+
+ /* Expand xml_string as necessary */
+ /* TODO: There is no way to expand the allocation of a GString if you know in advance how much room
+ * lots of append operations are going to require. */
+/* new_size = xml_string->len + strlen (pre) + strlen (element_content) + strlen (post) + SIZE_FUZZINESS;
+ if (new_size > xml_string->allocated_len)
+ g_string_set_size (xml_string, new_size);*/
+
+ /* Append the pre content */
+ if (pre != NULL)
+ g_string_append (xml_string, pre);
+
+ /* Loop through the string to be escaped. Code adapted from GLib's g_markup_escape_text() function.
+ * Copyright 2000, 2003 Red Hat, Inc.
+ * Copyright 2007, 2008 Ryan Lortie <desrt@desrt.ca> */
+ p = element_content;
+ while (p != NULL && *p != '\0') {
+ const gchar *next = g_utf8_next_char (p);
+
+ switch (*p) {
+ case '&':
+ g_string_append (xml_string, "&");
+ break;
+ case '<':
+ g_string_append (xml_string, "<");
+ break;
+ case '>':
+ g_string_append (xml_string, ">");
+ break;
+ case '\'':
+ g_string_append (xml_string, "'");
+ break;
+ case '"':
+ g_string_append (xml_string, """);
+ break;
+ default: {
+ gunichar c = g_utf8_get_char (p);
+
+ if ((0x1 <= c && c <= 0x8) ||
+ (0xb <= c && c <= 0xc) ||
+ (0xe <= c && c <= 0x1f) ||
+ (0x7f <= c && c <= 0x84) ||
+ (0x86 <= c && c <= 0x9f)) {
+ g_string_append_printf (xml_string, "&#x%x;", c);
+ } else {
+ g_string_append_len (xml_string, p, next - p);
+ break;
+ }
+ }
+ }
+ p = next;
+ }
+
+ /* Append the post content */
+ if (post != NULL)
+ g_string_append (xml_string, post);
+}
+
+/* TODO: Should be perfectly possible to make this modify the string in-place */
+gchar *
+gdata_parser_utf8_trim_whitespace (const gchar *s)
+{
+ glong len;
+ const gchar *_s;
+
+ /* Skip the leading whitespace */
+ while (*s != '\0' && g_unichar_isspace (g_utf8_get_char (s)))
+ s = g_utf8_next_char (s);
+
+ /* Find the end of the string and backtrack until we've passed all the whitespace */
+ len = g_utf8_strlen (s, -1);
+ _s = g_utf8_offset_to_pointer (s, len - 1);
+ while (len > 0 && g_unichar_isspace (g_utf8_get_char (_s))) {
+ _s = g_utf8_prev_char (_s);
+ len--;
+ }
+ _s = g_utf8_next_char (_s);
+
+ return g_strndup (s, _s - s);
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib.h>
+
+#include "gdata-parsable.h"
+#include "gdata-types.h"
+
+#ifndef GDATA_PARSER_H
+#define GDATA_PARSER_H
+
+G_BEGIN_DECLS
+
+gboolean gdata_parser_error_required_content_missing (xmlNode *element, GError **error);
+gboolean gdata_parser_error_not_iso8601_format (xmlNode *element, const gchar *actual_value, GError **error);
+gboolean gdata_parser_error_unknown_property_value (xmlNode *element, const gchar *property_name, const gchar *actual_value, GError **error);
+gboolean gdata_parser_error_unknown_content (xmlNode *element, const gchar *actual_content, GError **error);
+gboolean gdata_parser_error_required_property_missing (xmlNode *element, const gchar *property_name, GError **error);
+gboolean gdata_parser_error_mutexed_properties (xmlNode *element, const gchar *property1_name, const gchar *property2_name, GError **error);
+gboolean gdata_parser_error_required_element_missing (const gchar *element_name, const gchar *parent_element_name, GError **error);
+gboolean gdata_parser_error_duplicate_element (xmlNode *element, GError **error);
+
+gboolean gdata_parser_error_duplicate_json_element (JsonReader *reader, GError **error);
+gboolean gdata_parser_error_required_json_content_missing (JsonReader *reader, GError **error);
+gboolean gdata_parser_error_not_iso8601_format_json (JsonReader *reader, const gchar *actual_value, GError **error);
+gboolean
+gdata_parser_error_from_json_error (JsonReader *reader,
+ const GError *json_error, GError **error);
+
+gboolean gdata_parser_int64_from_date (const gchar *date, gint64 *_time);
+gchar *gdata_parser_date_from_int64 (gint64 _time) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+gchar *gdata_parser_int64_to_iso8601 (gint64 _time) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+gboolean gdata_parser_int64_from_iso8601 (const gchar *date, gint64 *_time);
+
+/*
+ * GDataParserOptions:
+ * @P_NONE: no special options; the content of the element will be outputted directly without any checks
+ * @P_NO_DUPES: the element must be encountered at most once; if encountered more than once, an error will be returned
+ * @P_REQUIRED: the element content must not be %NULL if the element exists
+ * @P_NON_EMPTY: the element content must not be empty (i.e. a zero-length string) if the element exists;
+ * this only applies to gdata_parser_string_from_element()
+ * @P_DEFAULT: if the element content is %NULL or empty, return an empty value instead of erroring (this is mutually exclusive with %P_REQUIRED
+ * and %P_NON_EMPTY)
+ * @P_IGNORE_ERROR: ignore any error when the parse fails; can be used to skip empty values (this is mutually exclusive with %P_REQUIRED)
+ *
+ * Parsing options to be passed in a bitwise fashion to gdata_parser_string_from_element() or gdata_parser_object_from_element().
+ * Their names aren't namespaced as they aren't public, and brevity is important, since they're used frequently in the parsing code.
+ *
+ * Since: 0.7.0
+ */
+typedef enum {
+ P_NONE = 0,
+ P_NO_DUPES = 1 << 0,
+ P_REQUIRED = 1 << 1,
+ P_NON_EMPTY = 1 << 2,
+ P_DEFAULT = 1 << 3,
+ P_IGNORE_ERROR = 1 << 4
+} GDataParserOptions;
+
+typedef void (*GDataParserSetterFunc) (GDataParsable *parent_parsable, GDataParsable *parsable);
+
+gboolean gdata_parser_boolean_from_property (xmlNode *element, const gchar *property_name, gboolean *output, gint default_output, GError **error);
+
+gboolean gdata_parser_is_namespace (xmlNode *element, const gchar *namespace_uri);
+
+gboolean gdata_parser_string_from_element (xmlNode *element, const gchar *element_name, GDataParserOptions options,
+ gchar **output, gboolean *success, GError **error);
+gboolean gdata_parser_int64_time_from_element (xmlNode *element, const gchar *element_name, GDataParserOptions options,
+ gint64 *output, gboolean *success, GError **error);
+gboolean gdata_parser_int64_from_element (xmlNode *element, const gchar *element_name, GDataParserOptions options,
+ gint64 *output, gint64 default_output, gboolean *success, GError **error);
+gboolean gdata_parser_object_from_element_setter (xmlNode *element, const gchar *element_name, GDataParserOptions options, GType object_type,
+ gpointer /* GDataParserSetterFunc */ _setter, gpointer /* GDataParsable * */ _parent_parsable,
+ gboolean *success, GError **error);
+gboolean gdata_parser_object_from_element (xmlNode *element, const gchar *element_name, GDataParserOptions options, GType object_type,
+ gpointer /* GDataParsable ** */ _output, gboolean *success, GError **error);
+gboolean gdata_parser_string_from_json_member (JsonReader *reader, const gchar *member_name, GDataParserOptions options,
+ gchar **output, gboolean *success, GError **error);
+gboolean
+gdata_parser_int_from_json_member (JsonReader *reader,
+ const gchar *member_name,
+ GDataParserOptions options,
+ gint64 *output, gboolean *success,
+ GError **error);
+gboolean gdata_parser_int64_time_from_json_member (JsonReader *reader, const gchar *member_name, GDataParserOptions options,
+ gint64 *output, gboolean *success, GError **error);
+gboolean gdata_parser_boolean_from_json_member (JsonReader *reader, const gchar *member_name, GDataParserOptions options,
+ gboolean *output, gboolean *success, GError **error);
+gboolean
+gdata_parser_strv_from_json_member (JsonReader *reader,
+ const gchar *member_name,
+ GDataParserOptions options,
+ gchar ***output, gboolean *success,
+ GError **error);
+gboolean
+gdata_parser_color_from_json_member (JsonReader *reader,
+ const gchar *member_name,
+ GDataParserOptions options,
+ GDataColor *output,
+ gboolean *success,
+ GError **error);
+
+void gdata_parser_string_append_escaped (GString *xml_string, const gchar *pre, const gchar *element_content, const gchar *post);
+gchar *gdata_parser_utf8_trim_whitespace (const gchar *s) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+G_END_DECLS
+
+#endif /* !GDATA_PARSER_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2008-2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_PRIVATE_H
+#define GDATA_PRIVATE_H
+
+#include <glib.h>
+#include <libxml/parser.h>
+#include <libsoup/soup.h>
+
+#include <gdata/gdata-service.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDataLogLevel:
+ * @GDATA_LOG_NONE: Output no debug messages or network logs
+ * @GDATA_LOG_MESSAGES: Output debug messages, but not network logs
+ * @GDATA_LOG_HEADERS: Output debug messages and network traffic headers
+ * @GDATA_LOG_FULL: Output debug messages and full network traffic logs,
+ * redacting usernames, passwords and auth. tokens
+ * @GDATA_LOG_FULL_UNREDACTED: Output debug messages and full network traffic
+ * logs, and don't redact usernames, passwords and auth. tokens
+ *
+ * Logging level.
+ */
+typedef enum {
+ GDATA_LOG_NONE = 0,
+ GDATA_LOG_MESSAGES = 1,
+ GDATA_LOG_HEADERS = 2,
+ GDATA_LOG_FULL = 3,
+ GDATA_LOG_FULL_UNREDACTED = 4,
+} GDataLogLevel;
+
+#include "gdata-service.h"
+G_GNUC_INTERNAL SoupSession *_gdata_service_get_session (GDataService *self) G_GNUC_PURE;
+G_GNUC_INTERNAL SoupMessage *_gdata_service_build_message (GDataService *self, GDataAuthorizationDomain *domain, const gchar *method, const gchar *uri,
+ const gchar *etag, gboolean etag_if_match);
+G_GNUC_INTERNAL void _gdata_service_actually_send_message (SoupSession *session, SoupMessage *message, GCancellable *cancellable, GError **error);
+G_GNUC_INTERNAL guint _gdata_service_send_message (GDataService *self, SoupMessage *message, GCancellable *cancellable, GError **error);
+G_GNUC_INTERNAL SoupMessage *_gdata_service_query (GDataService *self, GDataAuthorizationDomain *domain, const gchar *feed_uri, GDataQuery *query,
+ GCancellable *cancellable, GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+G_GNUC_INTERNAL const gchar *_gdata_service_get_scheme (void) G_GNUC_CONST;
+G_GNUC_INTERNAL gchar *_gdata_service_build_uri (const gchar *format, ...) G_GNUC_PRINTF (1, 2) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+G_GNUC_INTERNAL guint _gdata_service_get_https_port (void);
+G_GNUC_INTERNAL gchar *_gdata_service_fix_uri_scheme (const gchar *uri) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+G_GNUC_INTERNAL GDataLogLevel _gdata_service_get_log_level (void) G_GNUC_CONST;
+G_GNUC_INTERNAL SoupSession *_gdata_service_build_session (void) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+typedef gchar *GDataSecureString;
+typedef const gchar *GDataConstSecureString;
+
+G_GNUC_INTERNAL GDataSecureString _gdata_service_secure_strdup (const gchar *str) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+G_GNUC_INTERNAL GDataSecureString _gdata_service_secure_strndup (const gchar *str, gsize n_bytes) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+G_GNUC_INTERNAL void _gdata_service_secure_strfree (GDataSecureString str);
+
+#include "gdata-query.h"
+typedef enum {
+ GDATA_QUERY_PAGINATION_INDEXED,
+ GDATA_QUERY_PAGINATION_URIS,
+ GDATA_QUERY_PAGINATION_TOKENS,
+} GDataQueryPaginationType;
+
+G_GNUC_INTERNAL void _gdata_query_add_q_internal (GDataQuery *self, const gchar *q);
+G_GNUC_INTERNAL void _gdata_query_clear_q_internal (GDataQuery *self);
+G_GNUC_INTERNAL void _gdata_query_clear_pagination (GDataQuery *self);
+G_GNUC_INTERNAL void _gdata_query_set_pagination_type (GDataQuery *self,
+ GDataQueryPaginationType type);
+G_GNUC_INTERNAL void _gdata_query_set_next_page_token (GDataQuery *self, const gchar *next_page_token);
+G_GNUC_INTERNAL void _gdata_query_set_next_uri (GDataQuery *self, const gchar *next_uri);
+G_GNUC_INTERNAL gboolean _gdata_query_is_finished (GDataQuery *self);
+G_GNUC_INTERNAL void _gdata_query_set_previous_uri (GDataQuery *self, const gchar *previous_uri);
+
+#include "gdata-parsable.h"
+G_GNUC_INTERNAL GDataParsable *_gdata_parsable_new_from_xml (GType parsable_type, const gchar *xml, gint length, gpointer user_data,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+G_GNUC_INTERNAL GDataParsable *_gdata_parsable_new_from_xml_node (GType parsable_type, xmlDoc *doc, xmlNode *node, gpointer user_data,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+G_GNUC_INTERNAL GDataParsable *_gdata_parsable_new_from_json (GType parsable_type, const gchar *json, gint length, gpointer user_data,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+G_GNUC_INTERNAL GDataParsable *_gdata_parsable_new_from_json_node (GType parsable_type, JsonReader *reader, gpointer user_data,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+G_GNUC_INTERNAL void _gdata_parsable_get_xml (GDataParsable *self, GString *xml_string, gboolean declare_namespaces);
+G_GNUC_INTERNAL void _gdata_parsable_get_json (GDataParsable *self, JsonBuilder *builder);
+G_GNUC_INTERNAL void _gdata_parsable_string_append_escaped (GString *xml_string, const gchar *pre, const gchar *element_content, const gchar *post);
+G_GNUC_INTERNAL gboolean _gdata_parsable_is_constructed_from_xml (GDataParsable *self);
+
+#include "gdata-feed.h"
+G_GNUC_INTERNAL GDataFeed *_gdata_feed_new (GType feed_type,
+ const gchar *title,
+ const gchar *id,
+ gint64 updated) G_GNUC_WARN_UNUSED_RESULT;
+G_GNUC_INTERNAL GDataFeed *_gdata_feed_new_from_xml (GType feed_type, const gchar *xml, gint length, GType entry_type,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+G_GNUC_INTERNAL GDataFeed *_gdata_feed_new_from_json (GType feed_type, const gchar *json, gint length, GType entry_type,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+G_GNUC_INTERNAL void _gdata_feed_add_entry (GDataFeed *self, GDataEntry *entry);
+G_GNUC_INTERNAL void _gdata_feed_add_link (GDataFeed *self, GDataLink *_link);
+G_GNUC_INTERNAL gpointer _gdata_feed_parse_data_new (GType entry_type, GDataQueryProgressCallback progress_callback, gpointer progress_user_data);
+G_GNUC_INTERNAL void _gdata_feed_parse_data_free (gpointer data);
+G_GNUC_INTERNAL void _gdata_feed_call_progress_callback (GDataFeed *self, gpointer user_data, GDataEntry *entry);
+G_GNUC_INTERNAL void
+_gdata_feed_set_page_info (GDataFeed *self, guint total_results,
+ guint items_per_page);
+
+#include "gdata-entry.h"
+#include "gdata-batch-operation.h"
+G_GNUC_INTERNAL void _gdata_entry_set_updated (GDataEntry *self, gint64 updated);
+G_GNUC_INTERNAL void _gdata_entry_set_published (GDataEntry *self, gint64 published);
+G_GNUC_INTERNAL void _gdata_entry_set_id (GDataEntry *self, const gchar *id);
+G_GNUC_INTERNAL void _gdata_entry_set_etag (GDataEntry *self, const gchar *etag);
+G_GNUC_INTERNAL void _gdata_entry_set_batch_data (GDataEntry *self, guint id, GDataBatchOperationType type);
+
+#include "gdata-access-rule.h"
+G_GNUC_INTERNAL void _gdata_access_rule_set_key (GDataAccessRule *self, const gchar *key);
+
+#include "gdata-parser.h"
+
+/**
+ * _GDATA_DEFINE_AUTHORIZATION_DOMAIN:
+ * @l_n: lowercase name for the authorization domain, separated by underscores
+ * @SERVICE_NAME: the service name, as listed here: http://code.google.com/apis/documents/faq_gdata.html#clientlogin
+ * @SCOPE: the scope URI, as listed here: http://code.google.com/apis/documents/faq_gdata.html#AuthScopes
+ *
+ * Defines a static function to return an interned singleton #GDataAuthorizationDomain instance for the given parameters. Every time it's called, the
+ * function will return the same instance.
+ *
+ * The function will be named <code class="literal">get_(l_n)_authorization_domain</code>.
+ *
+ * Return value: (transfer none): a #GDataAuthorizationDomain instance for the given parameters
+ *
+ * Since: 0.9.0
+ */
+#define _GDATA_DEFINE_AUTHORIZATION_DOMAIN(l_n, SERVICE_NAME, SCOPE) \
+static GDataAuthorizationDomain * \
+get_##l_n##_authorization_domain (void) \
+{ \
+ static volatile GDataAuthorizationDomain *domain__volatile = NULL; \
+ \
+ if (g_once_init_enter (&domain__volatile) == TRUE) { \
+ GDataAuthorizationDomain *domain; \
+ \
+ domain = g_object_new (GDATA_TYPE_AUTHORIZATION_DOMAIN, \
+ "service-name", SERVICE_NAME, \
+ "scope", SCOPE, \
+ NULL); \
+ \
+ g_once_init_leave (&domain__volatile, domain); \
+ } \
+ \
+ return GDATA_AUTHORIZATION_DOMAIN (domain__volatile); \
+}
+
+G_END_DECLS
+
+#endif /* !GDATA_PRIVATE_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ * Copyright (C) Red Hat, Inc. 2015
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-query
+ * @short_description: GData query object
+ * @stability: Stable
+ * @include: gdata/gdata-query.h
+ *
+ * #GDataQuery represents a collection of query parameters used in a series of queries on a #GDataService. It allows the query parameters to be
+ * set, with the aim of building a query URI using gdata_query_get_query_uri(). Pagination is supported using gdata_query_next_page() and
+ * gdata_query_previous_page().
+ *
+ * Each query can have an ETag associated with it, which is a unique identifier for the set of query results produced by the query.
+ * Each time a query is made, gdata_service_query() will set the #GDataQuery:etag property of the accompanying query to a value returned by the
+ * server. If the same query is made again (using the same #GDataQuery instance), the server can skip returning the resulting #GDataFeed if its
+ * contents haven't changed (in this case, gdata_service_query() will return %NULL with an empty error).
+ *
+ * For this reason, code using #GDataQuery should be careful when reusing #GDataQuery instances: the code should either unset #GDataQuery:etag after
+ * every query or (preferably) gracefully handle the case where gdata_service_query() returns %NULL to signify unchanged results.
+ *
+ * Every time a property of a #GDataQuery instance is changed, the instance's ETag will be unset.
+ *
+ * For more information on the standard GData query parameters supported by #GDataQuery, see the <ulink type="http"
+ * url="http://code.google.com/apis/gdata/docs/2.0/reference.html#Queries">online documentation</ulink>.
+ */
+
+#include <glib.h>
+#include <string.h>
+
+#include "gdata-query.h"
+#include "gdata-private.h"
+#include "gdata-types.h"
+
+static void gdata_query_finalize (GObject *object);
+static void gdata_query_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_query_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void get_query_uri (GDataQuery *self, const gchar *feed_uri, GString *query_uri, gboolean *params_started);
+
+struct _GDataQueryPrivate {
+ /* Standard query parameters (see: http://code.google.com/apis/gdata/docs/2.0/reference.html#Queries) */
+ gchar *q;
+ gchar *q_internal;
+ gchar *categories;
+ gchar *author;
+ gint64 updated_min;
+ gint64 updated_max;
+ gint64 published_min;
+ gint64 published_max;
+ guint start_index;
+ gboolean is_strict;
+ guint max_results;
+
+ /* Pagination management. The type of pagination is set as
+ * pagination_type, and should be set in the init() vfunc implementation
+ * of any class derived from GDataQuery. It defaults to
+ * %GDATA_QUERY_PAGINATION_INDEXED, which most subclasses will not want.
+ *
+ * The next_uri, previous_uri or next_page_token are set by
+ * #GDataService if a query returns a new #GDataFeed containing them. If
+ * the user then calls next_page() or previous_page(), use_next_page or
+ * use_previous_page are set as appropriate, and the next call to
+ * get_uri() will return a URI for the next or previous page. This might
+ * be next_uri, previous_uri, or a constructed URI which appends the
+ * next_page_token.
+ *
+ * Note that %GDATA_QUERY_PAGINATION_TOKENS does not support returning
+ * to the previous page.
+ *
+ * It is not invalid to have use_next_page set and to not have a
+ * next_uri for %GDATA_QUERY_PAGINATION_URIS; or to not have a
+ * next_page_token for %GDATA_QUERY_PAGINATION_TOKENS: this signifies
+ * that the current set of results are the last page. There are no
+ * further pages. Similarly for use_previous_page and a %NULL
+ * previous_page.
+ */
+ GDataQueryPaginationType pagination_type;
+
+ gchar *next_uri;
+ gchar *previous_uri;
+ gchar *next_page_token;
+
+ gboolean use_next_page;
+ gboolean use_previous_page;
+
+ gchar *etag;
+};
+
+enum {
+ PROP_Q = 1,
+ PROP_CATEGORIES,
+ PROP_AUTHOR,
+ PROP_UPDATED_MIN,
+ PROP_UPDATED_MAX,
+ PROP_PUBLISHED_MIN,
+ PROP_PUBLISHED_MAX,
+ PROP_START_INDEX,
+ PROP_IS_STRICT,
+ PROP_MAX_RESULTS,
+ PROP_ETAG
+};
+
+G_DEFINE_TYPE (GDataQuery, gdata_query, G_TYPE_OBJECT)
+
+static void
+gdata_query_class_init (GDataQueryClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataQueryPrivate));
+
+ gobject_class->set_property = gdata_query_set_property;
+ gobject_class->get_property = gdata_query_get_property;
+ gobject_class->finalize = gdata_query_finalize;
+
+ klass->get_query_uri = get_query_uri;
+
+ /**
+ * GDataQuery:q:
+ *
+ * A full-text query string.
+ *
+ * When creating a query, list search terms separated by spaces, in the form <userinput>term1 term2 term3</userinput>.
+ * (As with all of the query parameter values, the spaces must be URL encoded.) The service returns all entries that match all of the
+ * search terms (like using AND between terms). Like Google's web search, a service searches on complete words (and related words with
+ * the same stem), not substrings.
+ *
+ * To search for an exact phrase, enclose the phrase in quotation marks: <userinput>"exact phrase"</userinput>.
+ *
+ * To exclude entries that match a given term, use the form <userinput>-term</userinput>.
+ *
+ * The search is case-insensitive.
+ *
+ * Example: to search for all entries that contain the exact phrase "Elizabeth Bennet" and the word "Darcy" but don't contain the
+ * word "Austen", use the following query: <userinput>"Elizabeth Bennet" Darcy -Austen</userinput>.
+ */
+ g_object_class_install_property (gobject_class, PROP_Q,
+ g_param_spec_string ("q",
+ "Query terms", "Query terms for which to search.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataQuery:categories:
+ *
+ * A category filter.
+ *
+ * You can query on multiple categories by listing multiple categories separated by slashes. The service returns all entries that match all
+ * of the categories (like using AND between terms). For example: <userinput>Fritz/Laurie</userinput> returns
+ * entries that match both categories ("Fritz" and "Laurie").
+ *
+ * To do an OR between terms, use a pipe character (<literal>|</literal>). For example: <userinput>Fritz\%7CLaurie</userinput> returns
+ * entries that match either category.
+ *
+ * An entry matches a specified category if the entry is in a category that has a matching term or label, as defined in the Atom
+ * specification. (Roughly, the "term" is the internal string used by the software to identify the category, while the "label" is the
+ * human-readable string presented to a user in a user interface.)
+ *
+ * To exclude entries that match a given category, use the form <userinput>-categoryname</userinput>.
+ *
+ * To query for a category that has a scheme – such as <literal><category scheme="urn:google.com" term="public"/></literal> – you must
+ * place the scheme in curly braces before the category name. For example: <userinput>{urn:google.com}public</userinput>. To match a category
+ * that has no scheme, use an empty pair of curly braces. If you don't specify curly braces, then categories in any scheme will match.
+ *
+ * The above features can be combined. For example: <userinput>A|-{urn:google.com}B/-C</userinput> means (A OR (NOT B)) AND (NOT C).
+ */
+ g_object_class_install_property (gobject_class, PROP_CATEGORIES,
+ g_param_spec_string ("categories",
+ "Category string", "Category search string.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataQuery:author:
+ *
+ * An entry author. The service returns entries where the author name and/or e-mail address match your query string.
+ */
+ g_object_class_install_property (gobject_class, PROP_AUTHOR,
+ g_param_spec_string ("author",
+ "Author", "Author search string.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataQuery:updated-min:
+ *
+ * Lower bound on the entry update date, inclusive.
+ */
+ g_object_class_install_property (gobject_class, PROP_UPDATED_MIN,
+ g_param_spec_int64 ("updated-min",
+ "Minimum update date", "Minimum date for updates on returned entries.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataQuery:updated-max:
+ *
+ * Upper bound on the entry update date, exclusive.
+ */
+ g_object_class_install_property (gobject_class, PROP_UPDATED_MAX,
+ g_param_spec_int64 ("updated-max",
+ "Maximum update date", "Maximum date for updates on returned entries.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataQuery:published-min:
+ *
+ * Lower bound on the entry publish date, inclusive.
+ */
+ g_object_class_install_property (gobject_class, PROP_PUBLISHED_MIN,
+ g_param_spec_int64 ("published-min",
+ "Minimum publish date", "Minimum date for returned entries to be published.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataQuery:published-max:
+ *
+ * Upper bound on the entry publish date, exclusive.
+ */
+ g_object_class_install_property (gobject_class, PROP_PUBLISHED_MAX,
+ g_param_spec_int64 ("published-max",
+ "Maximum publish date", "Maximum date for returned entries to be published.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataQuery:start-index:
+ *
+ * The one-based index of the first result to be retrieved. Use gdata_query_next_page() and gdata_query_previous_page() to
+ * implement pagination, rather than manually changing #GDataQuery:start-index.
+ *
+ * Use <code class="literal">0</code> to not specify a start index.
+ */
+ g_object_class_install_property (gobject_class, PROP_START_INDEX,
+ g_param_spec_uint ("start-index",
+ "Start index", "One-based result start index.",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataQuery:is-strict:
+ *
+ * Strict query parameter checking. If this is enabled, an error will be returned by the online service if a parameter is
+ * not recognised.
+ *
+ * Since: 0.2.0
+ */
+ g_object_class_install_property (gobject_class, PROP_IS_STRICT,
+ g_param_spec_boolean ("is-strict",
+ "Strict?", "Should the server be strict about the query?",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataQuery:max-results:
+ *
+ * Maximum number of results to be retrieved. Most services have a default #GDataQuery:max-results size imposed by the server; if you wish
+ * to receive the entire feed, specify a large number such as %G_MAXUINT for this property.
+ *
+ * Use <code class="literal">0</code> to not specify a maximum number of results.
+ */
+ g_object_class_install_property (gobject_class, PROP_MAX_RESULTS,
+ g_param_spec_uint ("max-results",
+ "Maximum number of results", "The maximum number of entries to return.",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataQuery:etag:
+ *
+ * The ETag against which to check for updates. If the server-side ETag matches this one, the requested feed hasn't changed, and is not
+ * returned unnecessarily.
+ *
+ * Setting any of the other query properties will unset the ETag, as ETags match against entire queries. If the ETag should be used in a
+ * query, it must be set again using gdata_query_set_etag() after setting any other properties.
+ *
+ * Since: 0.2.0
+ */
+ g_object_class_install_property (gobject_class, PROP_ETAG,
+ g_param_spec_string ("etag",
+ "ETag", "An ETag against which to check.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_query_init (GDataQuery *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_QUERY, GDataQueryPrivate);
+ self->priv->updated_min = -1;
+ self->priv->updated_max = -1;
+ self->priv->published_min = -1;
+ self->priv->published_max = -1;
+
+ _gdata_query_set_pagination_type (self, GDATA_QUERY_PAGINATION_INDEXED);
+}
+
+static void
+gdata_query_finalize (GObject *object)
+{
+ GDataQueryPrivate *priv = GDATA_QUERY (object)->priv;
+
+ g_free (priv->q);
+ g_free (priv->q_internal);
+ g_free (priv->categories);
+ g_free (priv->author);
+ g_free (priv->next_uri);
+ g_free (priv->previous_uri);
+ g_free (priv->etag);
+ g_free (priv->next_page_token);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_query_parent_class)->finalize (object);
+}
+
+static void
+gdata_query_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataQueryPrivate *priv = GDATA_QUERY (object)->priv;
+
+ switch (property_id) {
+ case PROP_Q:
+ g_value_set_string (value, priv->q);
+ break;
+ case PROP_CATEGORIES:
+ g_value_set_string (value, priv->categories);
+ break;
+ case PROP_AUTHOR:
+ g_value_set_string (value, priv->author);
+ break;
+ case PROP_UPDATED_MIN:
+ g_value_set_int64 (value, priv->updated_min);
+ break;
+ case PROP_UPDATED_MAX:
+ g_value_set_int64 (value, priv->updated_max);
+ break;
+ case PROP_PUBLISHED_MIN:
+ g_value_set_int64 (value, priv->published_min);
+ break;
+ case PROP_PUBLISHED_MAX:
+ g_value_set_int64 (value, priv->published_max);
+ break;
+ case PROP_START_INDEX:
+ g_value_set_uint (value, priv->start_index);
+ break;
+ case PROP_IS_STRICT:
+ g_value_set_boolean (value, priv->is_strict);
+ break;
+ case PROP_MAX_RESULTS:
+ g_value_set_uint (value, priv->max_results);
+ break;
+ case PROP_ETAG:
+ g_value_set_string (value, priv->etag);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_query_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataQuery *self = GDATA_QUERY (object);
+
+ switch (property_id) {
+ case PROP_Q:
+ gdata_query_set_q (self, g_value_get_string (value));
+ break;
+ case PROP_CATEGORIES:
+ gdata_query_set_categories (self, g_value_get_string (value));
+ break;
+ case PROP_AUTHOR:
+ gdata_query_set_author (self, g_value_get_string (value));
+ break;
+ case PROP_UPDATED_MIN:
+ gdata_query_set_updated_min (self, g_value_get_int64 (value));
+ break;
+ case PROP_UPDATED_MAX:
+ gdata_query_set_updated_max (self, g_value_get_int64 (value));
+ break;
+ case PROP_PUBLISHED_MIN:
+ gdata_query_set_published_min (self, g_value_get_int64 (value));
+ break;
+ case PROP_PUBLISHED_MAX:
+ gdata_query_set_published_max (self, g_value_get_int64 (value));
+ break;
+ case PROP_START_INDEX:
+ gdata_query_set_start_index (self, g_value_get_uint (value));
+ break;
+ case PROP_IS_STRICT:
+ gdata_query_set_is_strict (self, g_value_get_boolean (value));
+ break;
+ case PROP_MAX_RESULTS:
+ gdata_query_set_max_results (self, g_value_get_uint (value));
+ break;
+ case PROP_ETAG:
+ gdata_query_set_etag (self, g_value_get_string (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+get_query_uri (GDataQuery *self, const gchar *feed_uri, GString *query_uri, gboolean *params_started)
+{
+ GDataQueryPrivate *priv = self->priv;
+
+ #define APPEND_SEP g_string_append_c (query_uri, (*params_started == FALSE) ? '?' : '&'); *params_started = TRUE;
+
+ /* Categories */
+ if (priv->categories != NULL) {
+ g_string_append (query_uri, "/-/");
+ g_string_append_uri_escaped (query_uri, priv->categories, "/", FALSE);
+ }
+
+ /* q param */
+ if (priv->q != NULL || priv->q_internal != NULL) {
+ APPEND_SEP
+ g_string_append (query_uri, "q=");
+
+ if (priv->q != NULL) {
+ g_string_append_uri_escaped (query_uri, priv->q, NULL, FALSE);
+ if (priv->q_internal != NULL)
+ g_string_append (query_uri, "%20and%20");
+ }
+ if (priv->q_internal != NULL)
+ g_string_append_uri_escaped (query_uri, priv->q_internal, NULL, FALSE);
+ }
+
+ if (priv->author != NULL) {
+ APPEND_SEP
+ g_string_append (query_uri, "author=");
+ g_string_append_uri_escaped (query_uri, priv->author, NULL, FALSE);
+ }
+
+ if (priv->updated_min != -1) {
+ gchar *updated_min;
+
+ APPEND_SEP
+ g_string_append (query_uri, "updated-min=");
+ updated_min = gdata_parser_int64_to_iso8601 (priv->updated_min);
+ g_string_append (query_uri, updated_min);
+ g_free (updated_min);
+ }
+
+ if (priv->updated_max != -1) {
+ gchar *updated_max;
+
+ APPEND_SEP
+ g_string_append (query_uri, "updated-max=");
+ updated_max = gdata_parser_int64_to_iso8601 (priv->updated_max);
+ g_string_append (query_uri, updated_max);
+ g_free (updated_max);
+ }
+
+ if (priv->published_min != -1) {
+ gchar *published_min;
+
+ APPEND_SEP
+ g_string_append (query_uri, "published-min=");
+ published_min = gdata_parser_int64_to_iso8601 (priv->published_min);
+ g_string_append (query_uri, published_min);
+ g_free (published_min);
+ }
+
+ if (priv->published_max != -1) {
+ gchar *published_max;
+
+ APPEND_SEP
+ g_string_append (query_uri, "published-max=");
+ published_max = gdata_parser_int64_to_iso8601 (priv->published_max);
+ g_string_append (query_uri, published_max);
+ g_free (published_max);
+ }
+
+ if (priv->start_index > 0) {
+ APPEND_SEP
+ g_string_append_printf (query_uri, "start-index=%u", priv->start_index);
+ }
+
+ if (priv->is_strict == TRUE) {
+ APPEND_SEP
+ g_string_append (query_uri, "strict=true");
+ }
+
+ if (priv->max_results > 0) {
+ APPEND_SEP
+ g_string_append_printf (query_uri, "max-results=%u", priv->max_results);
+ }
+
+ if (priv->pagination_type == GDATA_QUERY_PAGINATION_TOKENS && priv->use_next_page &&
+ priv->next_page_token != NULL && *priv->next_page_token != '\0') {
+ APPEND_SEP
+ g_string_append (query_uri, "pageToken=");
+ g_string_append_uri_escaped (query_uri, priv->next_page_token, NULL, FALSE);
+ }
+}
+
+/**
+ * gdata_query_new:
+ * @q: (allow-none): a query string, or %NULL
+ *
+ * Creates a new #GDataQuery with its #GDataQuery:q property set to @q.
+ *
+ * Return value: a new #GDataQuery
+ */
+GDataQuery *
+gdata_query_new (const gchar *q)
+{
+ return g_object_new (GDATA_TYPE_QUERY, "q", q, NULL);
+}
+
+/**
+ * gdata_query_new_with_limits:
+ * @q: (allow-none): a query string, or %NULL
+ * @start_index: a one-based start index for the results, or <code class="literal">0</code>
+ * @max_results: the maximum number of results to return, or <code class="literal">0</code>
+ *
+ * Creates a new #GDataQuery with its #GDataQuery:q property set to @q, and the limits @start_index and @max_results
+ * applied.
+ *
+ * Return value: a new #GDataQuery
+ */
+GDataQuery *
+gdata_query_new_with_limits (const gchar *q, guint start_index, guint max_results)
+{
+ return g_object_new (GDATA_TYPE_QUERY,
+ "q", q,
+ "start-index", start_index,
+ "max-results", max_results,
+ NULL);
+}
+
+/**
+ * gdata_query_get_query_uri:
+ * @self: a #GDataQuery
+ * @feed_uri: the feed URI on which to build the query URI
+ *
+ * Builds a query URI from the given base feed URI, using the properties of the #GDataQuery. This function will take care
+ * of all necessary URI escaping, so it should <emphasis>not</emphasis> be done beforehand.
+ *
+ * The query URI is what functions like gdata_service_query() use to query the online service.
+ *
+ * Return value: a query URI; free with g_free()
+ */
+gchar *
+gdata_query_get_query_uri (GDataQuery *self, const gchar *feed_uri)
+{
+ GDataQueryClass *klass;
+ GString *query_uri;
+ gboolean params_started;
+
+ g_return_val_if_fail (GDATA_IS_QUERY (self), NULL);
+ g_return_val_if_fail (feed_uri != NULL, NULL);
+
+ /* Check to see if we're paginating first */
+ if (self->priv->pagination_type == GDATA_QUERY_PAGINATION_URIS) {
+ if (self->priv->use_next_page)
+ return g_strdup (self->priv->next_uri);
+ if (self->priv->use_previous_page)
+ return g_strdup (self->priv->previous_uri);
+ }
+
+ klass = GDATA_QUERY_GET_CLASS (self);
+ g_assert (klass->get_query_uri != NULL);
+
+ /* Determine whether the first param has already been appended (e.g. it exists in the feed_uri) */
+ params_started = (strstr (feed_uri, "?") != NULL) ? TRUE : FALSE;
+
+ /* Build the query URI */
+ query_uri = g_string_new (feed_uri);
+ klass->get_query_uri (self, feed_uri, query_uri, ¶ms_started);
+
+ return g_string_free (query_uri, FALSE);
+}
+
+/* Used internally by child classes of GDataQuery to add search clauses that represent service-specific
+ * query properties. For example, in the Drive v2 API, certain GDataDocumentsQuery properties like
+ * show-deleted and show-folders no longer have their own parameters, but have to be specified as a search
+ * clause in the query string. */
+void
+_gdata_query_add_q_internal (GDataQuery *self, const gchar *q)
+{
+ GDataQueryPrivate *priv = self->priv;
+ GString *str;
+
+ g_return_if_fail (GDATA_IS_QUERY (self));
+ g_return_if_fail (q != NULL && q[0] != '\0');
+
+ str = g_string_new (priv->q_internal);
+
+ /* Search parameters: https://developers.google.com/drive/web/search-parameters */
+ if (str->len > 0)
+ g_string_append (str, " and ");
+
+ g_string_append (str, q);
+
+ g_free (priv->q_internal);
+ priv->q_internal = g_string_free (str, FALSE);
+}
+
+/* Used internally by child classes of GDataQuery to clear the internal query string when building the
+ * query URI in GDataQueryClass->get_query_uri */
+void
+_gdata_query_clear_q_internal (GDataQuery *self)
+{
+ GDataQueryPrivate *priv = self->priv;
+
+ g_return_if_fail (GDATA_IS_QUERY (self));
+
+ g_free (priv->q_internal);
+ priv->q_internal = NULL;
+}
+
+/**
+ * gdata_query_get_q:
+ * @self: a #GDataQuery
+ *
+ * Gets the #GDataQuery:q property.
+ *
+ * Return value: the q property, or %NULL if it is unset
+ */
+const gchar *
+gdata_query_get_q (GDataQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_QUERY (self), NULL);
+ return self->priv->q;
+}
+
+/**
+ * gdata_query_set_q:
+ * @self: a #GDataQuery
+ * @q: (allow-none): a new query string, or %NULL
+ *
+ * Sets the #GDataQuery:q property of the #GDataQuery to the new query string, @q.
+ *
+ * Set @q to %NULL to unset the property in the query URI.
+ */
+void
+gdata_query_set_q (GDataQuery *self, const gchar *q)
+{
+ g_return_if_fail (GDATA_IS_QUERY (self));
+
+ g_free (self->priv->q);
+ self->priv->q = g_strdup (q);
+ g_object_notify (G_OBJECT (self), "q");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (self, NULL);
+}
+
+/**
+ * gdata_query_get_categories:
+ * @self: a #GDataQuery
+ *
+ * Gets the #GDataQuery:categories property.
+ *
+ * Return value: the categories property, or %NULL if it is unset
+ */
+const gchar *
+gdata_query_get_categories (GDataQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_QUERY (self), NULL);
+ return self->priv->categories;
+}
+
+/**
+ * gdata_query_set_categories:
+ * @self: a #GDataQuery
+ * @categories: (allow-none): the new category string, or %NULL
+ *
+ * Sets the #GDataQuery:categories property of the #GDataQuery to the new category string, @categories.
+ *
+ * Set @categories to %NULL to unset the property in the query URI.
+ */
+void
+gdata_query_set_categories (GDataQuery *self, const gchar *categories)
+{
+ g_return_if_fail (GDATA_IS_QUERY (self));
+
+ g_free (self->priv->categories);
+ self->priv->categories = g_strdup (categories);
+ g_object_notify (G_OBJECT (self), "categories");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (self, NULL);
+}
+
+/**
+ * gdata_query_get_author:
+ * @self: a #GDataQuery
+ *
+ * Gets the #GDataQuery:author property.
+ *
+ * Return value: the author property, or %NULL if it is unset
+ */
+const gchar *
+gdata_query_get_author (GDataQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_QUERY (self), NULL);
+ return self->priv->author;
+}
+
+/**
+ * gdata_query_set_author:
+ * @self: a #GDataQuery
+ * @author: (allow-none): the new author string, or %NULL
+ *
+ * Sets the #GDataQuery:author property of the #GDataQuery to the new author string, @author.
+ *
+ * Set @author to %NULL to unset the property in the query URI.
+ */
+void
+gdata_query_set_author (GDataQuery *self, const gchar *author)
+{
+ g_return_if_fail (GDATA_IS_QUERY (self));
+
+ g_free (self->priv->author);
+ self->priv->author = g_strdup (author);
+ g_object_notify (G_OBJECT (self), "author");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (self, NULL);
+}
+
+/**
+ * gdata_query_get_updated_min:
+ * @self: a #GDataQuery
+ *
+ * Gets the #GDataQuery:updated-min property. If the property is unset, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the updated-min property, or <code class="literal">-1</code>
+ */
+gint64
+gdata_query_get_updated_min (GDataQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_QUERY (self), -1);
+ return self->priv->updated_min;
+}
+
+/**
+ * gdata_query_set_updated_min:
+ * @self: a #GDataQuery
+ * @updated_min: the new minimum update time, or <code class="literal">-1</code>
+ *
+ * Sets the #GDataQuery:updated-min property of the #GDataQuery to the new minimum update time, @updated_min.
+ *
+ * Set @updated_min to <code class="literal">-1</code> to unset the property in the query URI.
+ */
+void
+gdata_query_set_updated_min (GDataQuery *self, gint64 updated_min)
+{
+ g_return_if_fail (GDATA_IS_QUERY (self));
+ g_return_if_fail (updated_min >= -1);
+
+ self->priv->updated_min = updated_min;
+ g_object_notify (G_OBJECT (self), "updated-min");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (self, NULL);
+}
+
+/**
+ * gdata_query_get_updated_max:
+ * @self: a #GDataQuery
+ *
+ * Gets the #GDataQuery:updated-max property. If the property is unset, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the updated-max property, or <code class="literal">-1</code>
+ */
+gint64
+gdata_query_get_updated_max (GDataQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_QUERY (self), -1);
+ return self->priv->updated_max;
+}
+
+/**
+ * gdata_query_set_updated_max:
+ * @self: a #GDataQuery
+ * @updated_max: the new maximum update time, or <code class="literal">-1</code>
+ *
+ * Sets the #GDataQuery:updated-max property of the #GDataQuery to the new maximum update time, @updated_max.
+ *
+ * Set @updated_max to <code class="literal">-1</code> to unset the property in the query URI.
+ */
+void
+gdata_query_set_updated_max (GDataQuery *self, gint64 updated_max)
+{
+ g_return_if_fail (GDATA_IS_QUERY (self));
+ g_return_if_fail (updated_max >= -1);
+
+ self->priv->updated_max = updated_max;
+ g_object_notify (G_OBJECT (self), "updated-max");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (self, NULL);
+}
+
+/**
+ * gdata_query_get_published_min:
+ * @self: a #GDataQuery
+ *
+ * Gets the #GDataQuery:published-min property. If the property is unset, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the published-min property, or <code class="literal">-1</code>
+ */
+gint64
+gdata_query_get_published_min (GDataQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_QUERY (self), -1);
+ return self->priv->published_min;
+}
+
+/**
+ * gdata_query_set_published_min:
+ * @self: a #GDataQuery
+ * @published_min: the new minimum publish time, or <code class="literal">-1</code>
+ *
+ * Sets the #GDataQuery:published-min property of the #GDataQuery to the new minimum publish time, @published_min.
+ *
+ * Set @published_min to <code class="literal">-1</code> to unset the property in the query URI.
+ */
+void
+gdata_query_set_published_min (GDataQuery *self, gint64 published_min)
+{
+ g_return_if_fail (GDATA_IS_QUERY (self));
+ g_return_if_fail (published_min >= -1);
+
+ self->priv->published_min = published_min;
+ g_object_notify (G_OBJECT (self), "published-min");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (self, NULL);
+}
+
+/**
+ * gdata_query_get_published_max:
+ * @self: a #GDataQuery
+ *
+ * Gets the #GDataQuery:published-max property. If the property is unset, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the published-max property, or <code class="literal">-1</code>
+ */
+gint64
+gdata_query_get_published_max (GDataQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_QUERY (self), -1);
+ return self->priv->published_max;
+}
+
+/**
+ * gdata_query_set_published_max:
+ * @self: a #GDataQuery
+ * @published_max: the new maximum publish time, or <code class="literal">-1</code>
+ *
+ * Sets the #GDataQuery:published-max property of the #GDataQuery to the new maximum publish time, @published_max.
+ *
+ * Set @published_max to <code class="literal">-1</code> to unset the property in the query URI.
+ */
+void
+gdata_query_set_published_max (GDataQuery *self, gint64 published_max)
+{
+ g_return_if_fail (GDATA_IS_QUERY (self));
+ g_return_if_fail (published_max >= -1);
+
+ self->priv->published_max = published_max;
+ g_object_notify (G_OBJECT (self), "published-max");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (self, NULL);
+}
+
+/**
+ * gdata_query_get_start_index:
+ * @self: a #GDataQuery
+ *
+ * Gets the #GDataQuery:start-index property.
+ *
+ * Return value: the start index property, or <code class="literal">0</code> if it is unset
+ */
+guint
+gdata_query_get_start_index (GDataQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_QUERY (self), 0);
+ return self->priv->start_index;
+}
+
+/**
+ * gdata_query_set_start_index:
+ * @self: a #GDataQuery
+ * @start_index: the new start index, or <code class="literal">0</code>
+ *
+ * Sets the #GDataQuery:start-index property of the #GDataQuery to the new one-based start index, @start_index.
+ *
+ * Set @start_index to <code class="literal">0</code> to unset the property in the query URI.
+ */
+void
+gdata_query_set_start_index (GDataQuery *self, guint start_index)
+{
+ g_return_if_fail (GDATA_IS_QUERY (self));
+
+ self->priv->start_index = start_index;
+ g_object_notify (G_OBJECT (self), "start-index");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (self, NULL);
+}
+
+/**
+ * gdata_query_is_strict:
+ * @self: a #GDataQuery
+ *
+ * Gets the #GDataQuery:is-strict property.
+ *
+ * Return value: the strict property
+ *
+ * Since: 0.2.0
+ */
+gboolean
+gdata_query_is_strict (GDataQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_QUERY (self), FALSE);
+ return self->priv->is_strict;
+}
+
+/**
+ * gdata_query_set_is_strict:
+ * @self: a #GDataQuery
+ * @is_strict: the new strict value
+ *
+ * Sets the #GDataQuery:is-strict property of the #GDataQuery to the new strict value, @is_strict.
+ *
+ * Since: 0.2.0
+ */
+void
+gdata_query_set_is_strict (GDataQuery *self, gboolean is_strict)
+{
+ g_return_if_fail (GDATA_IS_QUERY (self));
+
+ self->priv->is_strict = is_strict;
+ g_object_notify (G_OBJECT (self), "is-strict");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (self, NULL);
+}
+
+/**
+ * gdata_query_get_max_results:
+ * @self: a #GDataQuery
+ *
+ * Gets the #GDataQuery:max-results property.
+ *
+ * Return value: the maximum results property, or <code class="literal">0</code> if it is unset
+ */
+guint
+gdata_query_get_max_results (GDataQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_QUERY (self), 0);
+ return self->priv->max_results;
+}
+
+/**
+ * gdata_query_set_max_results:
+ * @self: a #GDataQuery
+ * @max_results: the new maximum results value, or <code class="literal">0</code>
+ *
+ * Sets the #GDataQuery:max-results property of the #GDataQuery to the new maximum results value, @max_results.
+ *
+ * Set @max_results to <code class="literal">0</code> to unset the property in the query URI.
+ */
+void
+gdata_query_set_max_results (GDataQuery *self, guint max_results)
+{
+ g_return_if_fail (GDATA_IS_QUERY (self));
+
+ self->priv->max_results = max_results;
+ g_object_notify (G_OBJECT (self), "max-results");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (self, NULL);
+}
+
+/**
+ * gdata_query_get_etag:
+ * @self: a #GDataQuery
+ *
+ * Gets the #GDataQuery:etag property.
+ *
+ * Return value: the ETag property, or %NULL if it is unset
+ *
+ * Since: 0.2.0
+ */
+const gchar *
+gdata_query_get_etag (GDataQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_QUERY (self), NULL);
+ return self->priv->etag;
+}
+
+/**
+ * gdata_query_set_etag:
+ * @self: a #GDataQuery
+ * @etag: (allow-none): the new ETag, or %NULL
+ *
+ * Sets the #GDataQuery:etag property of the #GDataQuery to the new ETag, @etag.
+ *
+ * Set @etag to %NULL to not check against the server-side ETag.
+ *
+ * Since: 0.2.0
+ */
+void
+gdata_query_set_etag (GDataQuery *self, const gchar *etag)
+{
+ g_return_if_fail (GDATA_IS_QUERY (self));
+
+ g_free (self->priv->etag);
+ self->priv->etag = g_strdup (etag);
+ g_object_notify (G_OBJECT (self), "etag");
+}
+
+void
+_gdata_query_clear_pagination (GDataQuery *self)
+{
+ g_return_if_fail (GDATA_IS_QUERY (self));
+
+ switch (self->priv->pagination_type) {
+ case GDATA_QUERY_PAGINATION_INDEXED:
+ /* Nothing to do here: indexes can always be incremented. */
+ break;
+ case GDATA_QUERY_PAGINATION_URIS:
+ g_clear_pointer (&self->priv->next_uri, g_free);
+ g_clear_pointer (&self->priv->previous_uri, g_free);
+ break;
+ case GDATA_QUERY_PAGINATION_TOKENS:
+ g_clear_pointer (&self->priv->next_page_token, g_free);
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ self->priv->use_next_page = FALSE;
+ self->priv->use_previous_page = FALSE;
+}
+
+void
+_gdata_query_set_pagination_type (GDataQuery *self,
+ GDataQueryPaginationType type)
+{
+ g_debug ("%s: Pagination type set to %u", G_STRFUNC, type);
+
+ _gdata_query_clear_pagination (self);
+ self->priv->pagination_type = type;
+}
+
+void
+_gdata_query_set_next_page_token (GDataQuery *self,
+ const gchar *next_page_token)
+{
+ g_return_if_fail (GDATA_IS_QUERY (self));
+ g_return_if_fail (self->priv->pagination_type ==
+ GDATA_QUERY_PAGINATION_TOKENS);
+
+ g_free (self->priv->next_page_token);
+ self->priv->next_page_token = g_strdup (next_page_token);
+}
+
+void
+_gdata_query_set_next_uri (GDataQuery *self, const gchar *next_uri)
+{
+ g_return_if_fail (GDATA_IS_QUERY (self));
+ g_return_if_fail (self->priv->pagination_type ==
+ GDATA_QUERY_PAGINATION_URIS);
+
+ g_free (self->priv->next_uri);
+ self->priv->next_uri = g_strdup (next_uri);
+}
+
+gboolean
+_gdata_query_is_finished (GDataQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_QUERY (self), FALSE);
+
+ switch (self->priv->pagination_type) {
+ case GDATA_QUERY_PAGINATION_INDEXED:
+ return FALSE;
+ case GDATA_QUERY_PAGINATION_URIS:
+ return (self->priv->next_uri == NULL && self->priv->use_next_page);
+ case GDATA_QUERY_PAGINATION_TOKENS:
+ return (self->priv->next_page_token == NULL && self->priv->use_next_page);
+ default:
+ g_assert_not_reached ();
+ }
+}
+
+void
+_gdata_query_set_previous_uri (GDataQuery *self, const gchar *previous_uri)
+{
+ g_return_if_fail (GDATA_IS_QUERY (self));
+ g_return_if_fail (self->priv->pagination_type ==
+ GDATA_QUERY_PAGINATION_URIS);
+
+ g_free (self->priv->previous_uri);
+ self->priv->previous_uri = g_strdup (previous_uri);
+}
+
+/**
+ * gdata_query_next_page:
+ * @self: a #GDataQuery
+ *
+ * Changes the state of the #GDataQuery such that when gdata_query_get_query_uri() is next called, it will build the
+ * query URI for the next page in the result set.
+ *
+ * Ideally, the URI of the next page is retrieved from a feed automatically when gdata_service_query() is called, but
+ * gdata_query_next_page() will fall back to using #GDataQuery:start-index to emulate true pagination if this fails.
+ *
+ * You <emphasis>should not</emphasis> implement pagination manually using #GDataQuery:start-index.
+ */
+void
+gdata_query_next_page (GDataQuery *self)
+{
+ GDataQueryPrivate *priv = self->priv;
+
+ g_return_if_fail (GDATA_IS_QUERY (self));
+
+ switch (self->priv->pagination_type) {
+ case GDATA_QUERY_PAGINATION_INDEXED:
+ if (priv->start_index == 0)
+ priv->start_index++;
+ priv->start_index += priv->max_results;
+ break;
+ case GDATA_QUERY_PAGINATION_URIS:
+ case GDATA_QUERY_PAGINATION_TOKENS:
+ priv->use_next_page = TRUE;
+ priv->use_previous_page = FALSE;
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (self, NULL);
+}
+
+/**
+ * gdata_query_previous_page:
+ * @self: a #GDataQuery
+ *
+ * Changes the state of the #GDataQuery such that when gdata_query_get_query_uri() is next called, it will build the
+ * query URI for the previous page in the result set.
+ *
+ * See the documentation for gdata_query_next_page() for an explanation of how query URIs from the feeds are used to this end.
+ *
+ * Return value: %TRUE if there is a previous page and it has been switched to, %FALSE otherwise
+ */
+gboolean
+gdata_query_previous_page (GDataQuery *self)
+{
+ GDataQueryPrivate *priv = self->priv;
+ gboolean retval;
+
+ g_return_val_if_fail (GDATA_IS_QUERY (self), FALSE);
+
+ switch (self->priv->pagination_type) {
+ case GDATA_QUERY_PAGINATION_INDEXED:
+ if (priv->start_index <= priv->max_results) {
+ retval = FALSE;
+ } else {
+ priv->start_index -= priv->max_results;
+ if (priv->start_index == 1)
+ priv->start_index--;
+ retval = TRUE;
+ }
+ break;
+ case GDATA_QUERY_PAGINATION_URIS:
+ if (priv->previous_uri != NULL) {
+ priv->use_next_page = FALSE;
+ priv->use_previous_page = TRUE;
+ retval = TRUE;
+ } else {
+ retval = FALSE;
+ }
+ break;
+ case GDATA_QUERY_PAGINATION_TOKENS:
+ /* There are no previous page tokens, unfortunately. */
+ retval = FALSE;
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ if (retval) {
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (self, NULL);
+ }
+
+ return retval;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_QUERY_H
+#define GDATA_QUERY_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_QUERY (gdata_query_get_type ())
+#define GDATA_QUERY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_QUERY, GDataQuery))
+#define GDATA_QUERY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_QUERY, GDataQueryClass))
+#define GDATA_IS_QUERY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_QUERY))
+#define GDATA_IS_QUERY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_QUERY))
+#define GDATA_QUERY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_QUERY, GDataQueryClass))
+
+typedef struct _GDataQueryPrivate GDataQueryPrivate;
+
+/**
+ * GDataQuery:
+ *
+ * All the fields in the #GDataQuery structure are private and should never be accessed directly.
+ */
+typedef struct {
+ GObject parent;
+ GDataQueryPrivate *priv;
+} GDataQuery;
+
+/**
+ * GDataQueryClass:
+ *
+ * All the fields in the #GDataQueryClass structure are private and should never be accessed directly.
+ */
+typedef struct {
+ /*< private >*/
+ GObjectClass parent;
+
+ void (*get_query_uri) (GDataQuery *self, const gchar *feed_uri, GString *query_uri, gboolean *params_started);
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+ void (*_g_reserved2) (void);
+ void (*_g_reserved3) (void);
+ void (*_g_reserved4) (void);
+ void (*_g_reserved5) (void);
+} GDataQueryClass;
+
+GType gdata_query_get_type (void) G_GNUC_CONST;
+
+GDataQuery *gdata_query_new (const gchar *q) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+GDataQuery *gdata_query_new_with_limits (const gchar *q, guint start_index, guint max_results) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+gchar *gdata_query_get_query_uri (GDataQuery *self, const gchar *feed_uri) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_query_next_page (GDataQuery *self);
+gboolean gdata_query_previous_page (GDataQuery *self);
+
+const gchar *gdata_query_get_q (GDataQuery *self) G_GNUC_PURE;
+void gdata_query_set_q (GDataQuery *self, const gchar *q);
+const gchar *gdata_query_get_categories (GDataQuery *self) G_GNUC_PURE;
+void gdata_query_set_categories (GDataQuery *self, const gchar *categories);
+const gchar *gdata_query_get_author (GDataQuery *self) G_GNUC_PURE;
+void gdata_query_set_author (GDataQuery *self, const gchar *author);
+gint64 gdata_query_get_updated_min (GDataQuery *self);
+void gdata_query_set_updated_min (GDataQuery *self, gint64 updated_min);
+gint64 gdata_query_get_updated_max (GDataQuery *self);
+void gdata_query_set_updated_max (GDataQuery *self, gint64 updated_max);
+gint64 gdata_query_get_published_min (GDataQuery *self);
+void gdata_query_set_published_min (GDataQuery *self, gint64 published_min);
+gint64 gdata_query_get_published_max (GDataQuery *self);
+void gdata_query_set_published_max (GDataQuery *self, gint64 published_max);
+guint gdata_query_get_start_index (GDataQuery *self) G_GNUC_PURE;
+void gdata_query_set_start_index (GDataQuery *self, guint start_index);
+gboolean gdata_query_is_strict (GDataQuery *self) G_GNUC_PURE;
+void gdata_query_set_is_strict (GDataQuery *self, gboolean is_strict);
+guint gdata_query_get_max_results (GDataQuery *self) G_GNUC_PURE;
+void gdata_query_set_max_results (GDataQuery *self, guint max_results);
+const gchar *gdata_query_get_etag (GDataQuery *self) G_GNUC_PURE;
+void gdata_query_set_etag (GDataQuery *self, const gchar *etag);
+
+G_END_DECLS
+
+#endif /* !GDATA_QUERY_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2008, 2009, 2010, 2014 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-service
+ * @short_description: GData service object
+ * @stability: Stable
+ * @include: gdata/gdata-service.h
+ *
+ * #GDataService represents a GData API service, typically a website using the GData API, such as YouTube or Google Calendar. One
+ * #GDataService instance is required to issue queries to the service, handle insertions, updates and deletions, and generally
+ * communicate with the online service.
+ *
+ * If operations performed on a #GDataService need authorization (such as uploading a video to YouTube or querying the user's personal calendar on
+ * Google Calendar), the service needs a #GDataAuthorizer instance set as #GDataService:authorizer. Once the user is appropriately authenticated and
+ * authorized by the #GDataAuthorizer implementation (see the documentation for #GDataAuthorizer for details on how this is achieved for specific
+ * implementations), all operations will be automatically authorized.
+ *
+ * Note that it's not always necessary to supply a #GDataAuthorizer instance to a #GDataService. If the only operations to be performed on the
+ * #GDataService don't need authorization (e.g. they only query public information), setting up a #GDataAuthorizer is just extra overhead. See the
+ * documentation for the operations on individual #GDataService subclasses to see which need authorization and which don't.
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <libsoup/soup.h>
+#include <string.h>
+#include <stdarg.h>
+
+#ifdef HAVE_GNOME
+#define GCR_API_SUBJECT_TO_CHANGE
+#include <gcr/gcr-base.h>
+#endif /* HAVE_GNOME */
+
+#include "gdata-service.h"
+#include "gdata-private.h"
+#include "gdata-client-login-authorizer.h"
+#include "gdata-marshal.h"
+#include "gdata-types.h"
+
+GQuark
+gdata_service_error_quark (void)
+{
+ return g_quark_from_static_string ("gdata-service-error-quark");
+}
+
+static void gdata_service_dispose (GObject *object);
+static void gdata_service_finalize (GObject *object);
+static void gdata_service_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_service_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void real_append_query_headers (GDataService *self, GDataAuthorizationDomain *domain, SoupMessage *message);
+static void real_parse_error_response (GDataService *self, GDataOperationType operation_type, guint status, const gchar *reason_phrase,
+ const gchar *response_body, gint length, GError **error);
+static GDataFeed *
+real_parse_feed (GDataService *self,
+ GDataAuthorizationDomain *domain,
+ GDataQuery *query,
+ GType entry_type,
+ SoupMessage *message,
+ GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback,
+ gpointer progress_user_data,
+ GError **error);
+static void notify_proxy_uri_cb (GObject *gobject, GParamSpec *pspec, GObject *self);
+static void notify_timeout_cb (GObject *gobject, GParamSpec *pspec, GObject *self);
+static void debug_handler (const char *log_domain, GLogLevelFlags log_level, const char *message, gpointer user_data);
+static void soup_log_printer (SoupLogger *logger, SoupLoggerLogLevel level, char direction, const char *data, gpointer user_data);
+
+static GDataFeed *__gdata_service_query (GDataService *self, GDataAuthorizationDomain *domain, const gchar *feed_uri, GDataQuery *query,
+ GType entry_type, GCancellable *cancellable, GDataQueryProgressCallback progress_callback,
+ gpointer progress_user_data, GError **error);
+
+static SoupURI *_get_proxy_uri (GDataService *self);
+static void _set_proxy_uri (GDataService *self, SoupURI *proxy_uri);
+
+struct _GDataServicePrivate {
+ SoupSession *session;
+ gchar *locale;
+ GDataAuthorizer *authorizer;
+ GProxyResolver *proxy_resolver;
+};
+
+enum {
+ PROP_PROXY_URI = 1,
+ PROP_TIMEOUT,
+ PROP_LOCALE,
+ PROP_AUTHORIZER,
+ PROP_PROXY_RESOLVER,
+};
+
+G_DEFINE_TYPE (GDataService, gdata_service, G_TYPE_OBJECT)
+
+static void
+gdata_service_class_init (GDataServiceClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataServicePrivate));
+
+ gobject_class->set_property = gdata_service_set_property;
+ gobject_class->get_property = gdata_service_get_property;
+ gobject_class->dispose = gdata_service_dispose;
+ gobject_class->finalize = gdata_service_finalize;
+
+ klass->api_version = "2";
+ klass->feed_type = GDATA_TYPE_FEED;
+ klass->append_query_headers = real_append_query_headers;
+ klass->parse_error_response = real_parse_error_response;
+ klass->parse_feed = real_parse_feed;
+ klass->get_authorization_domains = NULL; /* equivalent to returning an empty list of domains */
+
+ /**
+ * GDataService:proxy-uri:
+ *
+ * The proxy URI used internally for all network requests.
+ *
+ * Note that if a #GDataAuthorizer is being used with this #GDataService, the authorizer might also need its proxy URI setting.
+ *
+ * Since: 0.2.0
+ * Deprecated: 0.15.0: Use #GDataService:proxy-resolver instead, which gives more flexibility over the proxy used.
+ */
+ g_object_class_install_property (gobject_class, PROP_PROXY_URI,
+ g_param_spec_boxed ("proxy-uri",
+ "Proxy URI", "The proxy URI used internally for all network requests.",
+ SOUP_TYPE_URI,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataService:timeout:
+ *
+ * A timeout, in seconds, for network operations. If the timeout is exceeded, the operation will be cancelled and
+ * %GDATA_SERVICE_ERROR_NETWORK_ERROR will be returned.
+ *
+ * If the timeout is <code class="literal">0</code>, operations will never time out.
+ *
+ * Note that if a #GDataAuthorizer is being used with this #GDataService, the authorizer might also need its timeout setting.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_TIMEOUT,
+ g_param_spec_uint ("timeout",
+ "Timeout", "A timeout, in seconds, for network operations.",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataService:locale:
+ *
+ * The locale to use for network requests, in Unix locale format. (e.g. "en_GB", "cs", "de_DE".) Use %NULL for the default "C" locale
+ * (typically "en_US").
+ *
+ * Typically, this locale will be used by the server-side software to localise results, such as by translating category names, or by choosing
+ * geographically relevant search results. This will vary from service to service.
+ *
+ * The server-side behaviour is undefined if it doesn't support a given locale.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LOCALE,
+ g_param_spec_string ("locale",
+ "Locale", "The locale to use for network requests, in Unix locale format.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataService:authorizer:
+ *
+ * An object which implements #GDataAuthorizer. This should have previously been authenticated authorized against this service type (and
+ * potentially other service types). The service will use the authorizer to add an authorization token to each request it performs.
+ *
+ * Your application should call methods on the #GDataAuthorizer object itself in order to authenticate with the Google accounts service and
+ * authorize against this service type. See the documentation for the particular #GDataAuthorizer implementation being used for more details.
+ *
+ * The authorizer for a service can be changed at runtime for a different #GDataAuthorizer object or %NULL without affecting ongoing requests
+ * and operations.
+ *
+ * Note that it's only necessary to set an authorizer on the service if your application is going to make requests of the service which
+ * require authorization. For example, listing the current most popular videos on YouTube does not require authorization, but uploading a
+ * video to YouTube does. It's an unnecessary overhead to require the user to authorize against a service when not strictly required.
+ *
+ * Since: 0.9.0
+ */
+ g_object_class_install_property (gobject_class, PROP_AUTHORIZER,
+ g_param_spec_object ("authorizer",
+ "Authorizer", "An authorizer object to provide an authorization token for each request.",
+ GDATA_TYPE_AUTHORIZER,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataService:proxy-resolver:
+ *
+ * The #GProxyResolver used to determine a proxy URI. Setting this will clear the #GDataService:proxy-uri property.
+ *
+ * Since: 0.15.0
+ */
+ g_object_class_install_property (gobject_class, PROP_PROXY_RESOLVER,
+ g_param_spec_object ("proxy-resolver",
+ "Proxy Resolver", "A GProxyResolver used to determine a proxy URI.",
+ G_TYPE_PROXY_RESOLVER,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_service_init (GDataService *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_SERVICE, GDataServicePrivate);
+ self->priv->session = _gdata_service_build_session ();
+
+ /* Log handling for all message types except debug */
+ g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_ERROR | G_LOG_LEVEL_INFO | G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_WARNING, (GLogFunc) debug_handler, self);
+
+ /* Proxy the SoupSession's proxy-uri and timeout properties */
+ g_signal_connect (self->priv->session, "notify::proxy-uri", (GCallback) notify_proxy_uri_cb, self);
+ g_signal_connect (self->priv->session, "notify::timeout", (GCallback) notify_timeout_cb, self);
+
+ /* Keep our GProxyResolver synchronized with SoupSession's. */
+ g_object_bind_property (self->priv->session, "proxy-resolver", self, "proxy-resolver", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
+}
+
+static void
+gdata_service_dispose (GObject *object)
+{
+ GDataServicePrivate *priv = GDATA_SERVICE (object)->priv;
+
+ if (priv->authorizer != NULL)
+ g_object_unref (priv->authorizer);
+ priv->authorizer = NULL;
+
+ if (priv->session != NULL)
+ g_object_unref (priv->session);
+ priv->session = NULL;
+
+ g_clear_object (&priv->proxy_resolver);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_service_parent_class)->dispose (object);
+}
+
+static void
+gdata_service_finalize (GObject *object)
+{
+ GDataServicePrivate *priv = GDATA_SERVICE (object)->priv;
+
+ g_free (priv->locale);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_service_parent_class)->finalize (object);
+}
+
+static void
+gdata_service_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataServicePrivate *priv = GDATA_SERVICE (object)->priv;
+
+ switch (property_id) {
+ case PROP_PROXY_URI:
+ g_value_set_boxed (value, _get_proxy_uri (GDATA_SERVICE (object)));
+ break;
+ case PROP_TIMEOUT:
+ g_value_set_uint (value, gdata_service_get_timeout (GDATA_SERVICE (object)));
+ break;
+ case PROP_LOCALE:
+ g_value_set_string (value, priv->locale);
+ break;
+ case PROP_AUTHORIZER:
+ g_value_set_object (value, priv->authorizer);
+ break;
+ case PROP_PROXY_RESOLVER:
+ g_value_set_object (value, priv->proxy_resolver);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_service_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ switch (property_id) {
+ case PROP_PROXY_URI:
+ _set_proxy_uri (GDATA_SERVICE (object), g_value_get_boxed (value));
+ break;
+ case PROP_TIMEOUT:
+ gdata_service_set_timeout (GDATA_SERVICE (object), g_value_get_uint (value));
+ break;
+ case PROP_LOCALE:
+ gdata_service_set_locale (GDATA_SERVICE (object), g_value_get_string (value));
+ break;
+ case PROP_AUTHORIZER:
+ gdata_service_set_authorizer (GDATA_SERVICE (object), g_value_get_object (value));
+ break;
+ case PROP_PROXY_RESOLVER:
+ gdata_service_set_proxy_resolver (GDATA_SERVICE (object), g_value_get_object (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+real_append_query_headers (GDataService *self, GDataAuthorizationDomain *domain, SoupMessage *message)
+{
+ g_assert (message != NULL);
+
+ /* Set the authorisation header */
+ if (self->priv->authorizer != NULL) {
+ gdata_authorizer_process_request (self->priv->authorizer, domain, message);
+
+ if (domain != NULL) {
+ /* Store the authorisation domain on the message so that we can access it again after refreshing authorisation if necessary.
+ * See _gdata_service_send_message(). */
+ g_object_set_data_full (G_OBJECT (message), "gdata-authorization-domain", g_object_ref (domain),
+ (GDestroyNotify) g_object_unref);
+ }
+ }
+
+ /* Set the GData-Version header to tell it we want to use the v2 API */
+ soup_message_headers_append (message->request_headers, "GData-Version", GDATA_SERVICE_GET_CLASS (self)->api_version);
+
+ /* Set the locale, if it's been set for the service */
+ if (self->priv->locale != NULL)
+ soup_message_headers_append (message->request_headers, "Accept-Language", self->priv->locale);
+}
+
+static void
+real_parse_error_response (GDataService *self, GDataOperationType operation_type, guint status, const gchar *reason_phrase,
+ const gchar *response_body, gint length, GError **error)
+{
+ /* We prefer to include the @response_body in the error message, but if it's empty, fall back to the @reason_phrase */
+ if (response_body == NULL || *response_body == '\0')
+ response_body = reason_phrase;
+
+ /* See: http://code.google.com/apis/gdata/docs/2.0/reference.html#HTTPStatusCodes */
+ switch (status) {
+ case SOUP_STATUS_CANT_RESOLVE:
+ case SOUP_STATUS_CANT_CONNECT:
+ case SOUP_STATUS_SSL_FAILED:
+ case SOUP_STATUS_IO_ERROR:
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_NETWORK_ERROR,
+ _("Cannot connect to the service’s server."));
+ return;
+ case SOUP_STATUS_CANT_RESOLVE_PROXY:
+ case SOUP_STATUS_CANT_CONNECT_PROXY:
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROXY_ERROR,
+ _("Cannot connect to the proxy server."));
+ return;
+ case SOUP_STATUS_MALFORMED:
+ case SOUP_STATUS_BAD_REQUEST: /* 400 */
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the parameter is an error message returned by the server. */
+ _("Invalid request URI or header, or unsupported nonstandard parameter: %s"), response_body);
+ return;
+ case SOUP_STATUS_UNAUTHORIZED: /* 401 */
+ case SOUP_STATUS_FORBIDDEN: /* 403 */
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED,
+ /* Translators: the parameter is an error message returned by the server. */
+ _("Authentication required: %s"), response_body);
+ return;
+ case SOUP_STATUS_NOT_FOUND: /* 404 */
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_NOT_FOUND,
+ /* Translators: the parameter is an error message returned by the server. */
+ _("The requested resource was not found: %s"), response_body);
+ return;
+ case SOUP_STATUS_CONFLICT: /* 409 */
+ case SOUP_STATUS_PRECONDITION_FAILED: /* 412 */
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_CONFLICT,
+ /* Translators: the parameter is an error message returned by the server. */
+ _("The entry has been modified since it was downloaded: %s"), response_body);
+ return;
+ case SOUP_STATUS_INTERNAL_SERVER_ERROR: /* 500 */
+ default:
+ /* We'll fall back to generic errors, below */
+ break;
+ }
+
+ /* If the error hasn't been handled already, throw a generic error */
+ switch (operation_type) {
+ case GDATA_OPERATION_AUTHENTICATION:
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the first parameter is an HTTP status,
+ * and the second is an error message returned by the server. */
+ _("Error code %u when authenticating: %s"), status, response_body);
+ break;
+ case GDATA_OPERATION_QUERY:
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the first parameter is an HTTP status,
+ * and the second is an error message returned by the server. */
+ _("Error code %u when querying: %s"), status, response_body);
+ break;
+ case GDATA_OPERATION_INSERTION:
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the first parameter is an HTTP status,
+ * and the second is an error message returned by the server. */
+ _("Error code %u when inserting an entry: %s"), status, response_body);
+ break;
+ case GDATA_OPERATION_UPDATE:
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the first parameter is an HTTP status,
+ * and the second is an error message returned by the server. */
+ _("Error code %u when updating an entry: %s"), status, response_body);
+ break;
+ case GDATA_OPERATION_DELETION:
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the first parameter is an HTTP status,
+ * and the second is an error message returned by the server. */
+ _("Error code %u when deleting an entry: %s"), status, response_body);
+ break;
+ case GDATA_OPERATION_DOWNLOAD:
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the first parameter is an HTTP status,
+ * and the second is an error message returned by the server. */
+ _("Error code %u when downloading: %s"), status, response_body);
+ break;
+ case GDATA_OPERATION_UPLOAD:
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the first parameter is an HTTP status,
+ * and the second is an error message returned by the server. */
+ _("Error code %u when uploading: %s"), status, response_body);
+ break;
+ case GDATA_OPERATION_BATCH:
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_WITH_BATCH_OPERATION,
+ /* Translators: the first parameter is a HTTP status,
+ * and the second is an error message returned by the server. */
+ _("Error code %u when running a batch operation: %s"), status, response_body);
+ break;
+ default:
+ /* We should not be called with anything other than the above operation types */
+ g_assert_not_reached ();
+ }
+}
+
+/**
+ * gdata_service_is_authorized:
+ * @self: a #GDataService
+ *
+ * Determines whether the service is authorized for all the #GDataAuthorizationDomains it belongs to (as returned by
+ * gdata_service_get_authorization_domains()). If the service's #GDataService:authorizer is %NULL, %FALSE is always returned.
+ *
+ * This is basically a convenience method for checking that the service's #GDataAuthorizer is authorized for all the service's
+ * #GDataAuthorizationDomains.
+ *
+ * Return value: %TRUE if the service is authorized for all its domains, %FALSE otherwise
+ *
+ * Since: 0.9.0
+ */
+gboolean
+gdata_service_is_authorized (GDataService *self)
+{
+ GList *domains, *i;
+ gboolean authorised = TRUE;
+
+ g_return_val_if_fail (GDATA_IS_SERVICE (self), FALSE);
+
+ /* If we don't have an authoriser set, we can't be authorised */
+ if (self->priv->authorizer == NULL) {
+ return FALSE;
+ }
+
+ domains = gdata_service_get_authorization_domains (G_OBJECT_TYPE (self));
+
+ /* Find any domains which we're not authorised for */
+ for (i = domains; i != NULL; i = i->next) {
+ if (gdata_authorizer_is_authorized_for_domain (self->priv->authorizer, GDATA_AUTHORIZATION_DOMAIN (i->data)) == FALSE) {
+ authorised = FALSE;
+ break;
+ }
+ }
+
+ g_list_free (domains);
+
+ return authorised;
+}
+
+/**
+ * gdata_service_get_authorizer:
+ * @self: a #GDataService
+ *
+ * Gets the #GDataAuthorizer object currently in use by the service. See the documentation for #GDataService:authorizer for more details.
+ *
+ * Return value: (transfer none): the authorizer object for this service, or %NULL
+ *
+ * Since: 0.9.0
+ */
+GDataAuthorizer *
+gdata_service_get_authorizer (GDataService *self)
+{
+ g_return_val_if_fail (GDATA_IS_SERVICE (self), NULL);
+
+ return self->priv->authorizer;
+}
+
+/**
+ * gdata_service_set_authorizer:
+ * @self: a #GDataService
+ * @authorizer: a new authorizer object for the service, or %NULL
+ *
+ * Sets #GDataService:authorizer to @authorizer. This may be %NULL if the service will only make requests in future which don't require authorization.
+ * See the documentation for #GDataService:authorizer for more information.
+ *
+ * Since: 0.9.0
+ */
+void
+gdata_service_set_authorizer (GDataService *self, GDataAuthorizer *authorizer)
+{
+ GDataServicePrivate *priv = self->priv;
+
+ g_return_if_fail (GDATA_IS_SERVICE (self));
+ g_return_if_fail (authorizer == NULL || GDATA_IS_AUTHORIZER (authorizer));
+
+ if (priv->authorizer != NULL) {
+ g_object_unref (priv->authorizer);
+ }
+
+ priv->authorizer = authorizer;
+
+ if (priv->authorizer != NULL) {
+ g_object_ref (priv->authorizer);
+ }
+
+ g_object_notify (G_OBJECT (self), "authorizer");
+}
+
+/**
+ * gdata_service_get_authorization_domains:
+ * @service_type: the #GType of the #GDataService subclass to retrieve the authorization domains for
+ *
+ * Retrieves the full list of #GDataAuthorizationDomains which relate to the specified @service_type. All the
+ * #GDataAuthorizationDomains are unique and interned, so can be compared with other domains by simple pointer comparison.
+ *
+ * Note that in addition to this method, #GDataService subclasses may expose some or all of their authorization domains individually by means of
+ * individual accessor functions.
+ *
+ * Return value: (transfer container) (element-type GDataAuthorizationDomain): an unordered list of #GDataAuthorizationDomains; free with
+ * g_list_free()
+ *
+ * Since: 0.9.0
+ */
+GList *
+gdata_service_get_authorization_domains (GType service_type)
+{
+ GDataServiceClass *klass;
+ GList *domains = NULL;
+
+ g_return_val_if_fail (g_type_is_a (service_type, GDATA_TYPE_SERVICE), NULL);
+
+ klass = GDATA_SERVICE_CLASS (g_type_class_ref (service_type));
+ if (klass->get_authorization_domains != NULL) {
+ domains = klass->get_authorization_domains ();
+ }
+ g_type_class_unref (klass);
+
+ return domains;
+}
+
+SoupMessage *
+_gdata_service_build_message (GDataService *self, GDataAuthorizationDomain *domain, const gchar *method, const gchar *uri,
+ const gchar *etag, gboolean etag_if_match)
+{
+ SoupMessage *message;
+ GDataServiceClass *klass;
+ SoupURI *_uri;
+
+ /* Create the message. Allow changing the HTTPS port just for testing,
+ * but require that the URI is always HTTPS for privacy. */
+ _uri = soup_uri_new (uri);
+ soup_uri_set_port (_uri, _gdata_service_get_https_port ());
+ g_assert_cmpstr (soup_uri_get_scheme (_uri), ==, SOUP_URI_SCHEME_HTTPS);
+ message = soup_message_new_from_uri (method, _uri);
+ soup_uri_free (_uri);
+
+ /* Make sure subclasses set their headers */
+ klass = GDATA_SERVICE_GET_CLASS (self);
+ if (klass->append_query_headers != NULL)
+ klass->append_query_headers (self, domain, message);
+
+ /* Append the ETag header if possible */
+ if (etag != NULL)
+ soup_message_headers_append (message->request_headers, (etag_if_match == TRUE) ? "If-Match" : "If-None-Match", etag);
+
+ return message;
+}
+
+typedef struct {
+ GMutex mutex; /* mutex to prevent cancellation before the message has been added to the session's message queue */
+ SoupSession *session;
+ SoupMessage *message;
+} MessageData;
+
+static void
+message_cancel_cb (GCancellable *cancellable, MessageData *data)
+{
+ g_mutex_lock (&(data->mutex));
+ soup_session_cancel_message (data->session, data->message, SOUP_STATUS_CANCELLED);
+ g_mutex_unlock (&(data->mutex));
+}
+
+static void
+message_request_queued_cb (SoupSession *session, SoupMessage *message, MessageData *data)
+{
+ if (message == data->message) {
+ g_mutex_unlock (&(data->mutex));
+ }
+}
+
+/* Synchronously send @message via @service, handling asynchronous cancellation as best we can. If @cancellable has been cancelled before we start
+ * network activity, return without doing any network activity. Otherwise, if @cancellable is cancelled (from another thread) after network activity
+ * has started, we wait until the message has been queued by the session, then cancel the network activity and return as soon as possible.
+ *
+ * If cancellation has been handled, @error is guaranteed to be set to %G_IO_ERROR_CANCELLED. Otherwise, @error is guaranteed to be unset. */
+void
+_gdata_service_actually_send_message (SoupSession *session, SoupMessage *message, GCancellable *cancellable, GError **error)
+{
+ MessageData data;
+ gulong cancel_signal = 0, request_queued_signal = 0;
+
+ /* Hold references to the session and message so they can't be freed by other threads. For example, if the SoupSession was freed by another
+ * thread while we were making a request, the request would be unexpectedly cancelled. See bgo#650835 for an example of this breaking things.
+ */
+ g_object_ref (session);
+ g_object_ref (message);
+
+ /* Listen for cancellation */
+ if (cancellable != NULL) {
+ g_mutex_init (&(data.mutex));
+ data.session = session;
+ data.message = message;
+
+ cancel_signal = g_cancellable_connect (cancellable, (GCallback) message_cancel_cb, &data, NULL);
+ request_queued_signal = g_signal_connect (session, "request-queued", (GCallback) message_request_queued_cb, &data);
+
+ /* We lock this mutex until the message has been queued by the session (i.e. it's unlocked in the request-queued callback), and require
+ * the mutex to be held to cancel the message. Consequently, if the message is cancelled (in another thread) any time between this lock
+ * and the request being queued, the cancellation will wait until the request has been queued before taking effect.
+ * This is a little ugly, but is the only way I can think of to avoid a race condition between calling soup_session_cancel_message()
+ * and soup_session_send_message(), as the former doesn't have any effect until the request has been queued, and once the latter has
+ * returned, all network activity has been finished so cancellation is pointless. */
+ g_mutex_lock (&(data.mutex));
+ }
+
+ /* Only send the message if it hasn't already been cancelled. There is no race condition here for the above reasons: if the cancellable has
+ * been cancelled, it's because it was cancelled before we called g_cancellable_connect().
+ *
+ * Otherwise, manually set the message's status code to SOUP_STATUS_CANCELLED, as the message was cancelled before even being queued to be
+ * sent. */
+ if (cancellable == NULL || g_cancellable_is_cancelled (cancellable) == FALSE)
+ soup_session_send_message (session, message);
+ else {
+ if (cancellable != NULL) {
+ g_mutex_unlock (&data.mutex);
+ }
+
+ soup_message_set_status (message, SOUP_STATUS_CANCELLED);
+ }
+
+ /* Clean up the cancellation code */
+ if (cancellable != NULL) {
+ g_signal_handler_disconnect (session, request_queued_signal);
+
+ if (cancel_signal != 0)
+ g_cancellable_disconnect (cancellable, cancel_signal);
+
+ g_mutex_clear (&(data.mutex));
+ }
+
+ /* Set the cancellation error if applicable. We can't assume that our GCancellable has been cancelled just because the message has;
+ * libsoup may internally cancel messages if, for example, the proxy URI of the SoupSession is changed.
+ * libsoup also sometimes seems to return a SOUP_STATUS_IO_ERROR when we cancel a message, even though we've specified SOUP_STATUS_CANCELLED
+ * at cancellation time. Ho Hum. */
+ g_assert (message->status_code != SOUP_STATUS_NONE);
+
+ if (message->status_code == SOUP_STATUS_CANCELLED ||
+ ((message->status_code == SOUP_STATUS_IO_ERROR || message->status_code == SOUP_STATUS_SSL_FAILED ||
+ message->status_code == SOUP_STATUS_CANT_CONNECT || message->status_code == SOUP_STATUS_CANT_RESOLVE) &&
+ cancellable != NULL && g_cancellable_is_cancelled (cancellable) == TRUE)) {
+ /* We hackily create and cancel a new GCancellable so that we can set the error using it and therefore save ourselves a translatable
+ * string and the associated maintenance. */
+ GCancellable *error_cancellable = g_cancellable_new ();
+ g_cancellable_cancel (error_cancellable);
+ g_assert (g_cancellable_set_error_if_cancelled (error_cancellable, error) == TRUE);
+ g_object_unref (error_cancellable);
+
+ /* As per the above comment, force the status to be SOUP_STATUS_CANCELLED. */
+ soup_message_set_status (message, SOUP_STATUS_CANCELLED);
+ }
+
+ /* Free things */
+ g_object_unref (message);
+ g_object_unref (session);
+}
+
+guint
+_gdata_service_send_message (GDataService *self, SoupMessage *message, GCancellable *cancellable, GError **error)
+{
+ /* Based on code from evolution-data-server's libgdata:
+ * Ebby Wiselyn <ebbywiselyn@gmail.com>
+ * Jason Willis <zenbrother@gmail.com>
+ *
+ * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
+ */
+
+ soup_message_set_flags (message, SOUP_MESSAGE_NO_REDIRECT);
+ _gdata_service_actually_send_message (self->priv->session, message, cancellable, error);
+ soup_message_set_flags (message, 0);
+
+ /* Handle redirections specially so we don't lose our custom headers when making the second request */
+ if (SOUP_STATUS_IS_REDIRECTION (message->status_code)) {
+ SoupURI *new_uri;
+ const gchar *new_location;
+
+ new_location = soup_message_headers_get_one (message->response_headers, "Location");
+ g_return_val_if_fail (new_location != NULL, SOUP_STATUS_NONE);
+
+ new_uri = soup_uri_new_with_base (soup_message_get_uri (message), new_location);
+ if (new_uri == NULL) {
+ gchar *uri_string = soup_uri_to_string (new_uri, FALSE);
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the parameter is the URI which is invalid. */
+ _("Invalid redirect URI: %s"), uri_string);
+ g_free (uri_string);
+ return SOUP_STATUS_NONE;
+ }
+
+ /* Allow overriding the URI for testing. */
+ soup_uri_set_port (new_uri, _gdata_service_get_https_port ());
+
+ soup_message_set_uri (message, new_uri);
+ soup_uri_free (new_uri);
+
+ /* Send the message again */
+ _gdata_service_actually_send_message (self->priv->session, message, cancellable, error);
+ }
+
+ /* Not authorised, or authorisation has expired. If we were authorised in the first place, attempt to refresh the authorisation and
+ * try sending the message again (but only once, so we don't get caught in an infinite loop of denied authorisation errors).
+ *
+ * Note that we have to re-process the message with the authoriser so that its authorisation headers get updated after the refresh
+ * (bgo#653535). */
+ if (message->status_code == SOUP_STATUS_UNAUTHORIZED ||
+ message->status_code == SOUP_STATUS_FORBIDDEN ||
+ message->status_code == SOUP_STATUS_NOT_FOUND) {
+ GDataAuthorizer *authorizer = self->priv->authorizer;
+
+ if (authorizer != NULL && gdata_authorizer_refresh_authorization (authorizer, cancellable, NULL) == TRUE) {
+ GDataAuthorizationDomain *domain;
+
+ /* Re-process the request */
+ domain = g_object_get_data (G_OBJECT (message), "gdata-authorization-domain");
+ g_assert (domain == NULL || GDATA_IS_AUTHORIZATION_DOMAIN (domain));
+
+ gdata_authorizer_process_request (authorizer, domain, message);
+
+ /* Send the message again */
+ g_clear_error (error);
+ _gdata_service_actually_send_message (self->priv->session, message, cancellable, error);
+ }
+ }
+
+ return message->status_code;
+}
+
+typedef struct {
+ /* Input */
+ GDataAuthorizationDomain *domain;
+ gchar *feed_uri;
+ GDataQuery *query;
+ GType entry_type;
+
+ /* Output */
+ GDataQueryProgressCallback progress_callback;
+ gpointer progress_user_data;
+ GDestroyNotify destroy_progress_user_data;
+} QueryAsyncData;
+
+static void
+query_async_data_free (QueryAsyncData *self)
+{
+ if (self->domain != NULL)
+ g_object_unref (self->domain);
+
+ g_free (self->feed_uri);
+ if (self->query)
+ g_object_unref (self->query);
+
+ g_slice_free (QueryAsyncData, self);
+}
+
+static void
+query_thread (GTask *task, gpointer source_object, gpointer task_data, GCancellable *cancellable)
+{
+ GDataService *service = GDATA_SERVICE (source_object);
+ g_autoptr(GError) error = NULL;
+ QueryAsyncData *data = task_data;
+ g_autoptr(GDataFeed) feed = NULL;
+
+ /* Execute the query and return */
+ feed = __gdata_service_query (service, data->domain, data->feed_uri, data->query, data->entry_type, cancellable,
+ data->progress_callback, data->progress_user_data, &error);
+ if (feed == NULL && error != NULL)
+ g_task_return_error (task, g_steal_pointer (&error));
+ else
+ g_task_return_pointer (task, g_steal_pointer (&feed), g_object_unref);
+
+ if (data->destroy_progress_user_data != NULL) {
+ data->destroy_progress_user_data (data->progress_user_data);
+ }
+}
+
+/**
+ * gdata_service_query_async:
+ * @self: a #GDataService
+ * @domain: (allow-none): the #GDataAuthorizationDomain the query falls under, or %NULL
+ * @feed_uri: the feed URI to query, including the host name and protocol
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @entry_type: a #GType for the #GDataEntrys to build from the XML
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @destroy_progress_user_data: (allow-none): the function to call when @progress_callback will not be called any more, or %NULL. This function will be
+ * called with @progress_user_data as a parameter and can be used to free any memory allocated for it.
+ * @callback: a #GAsyncReadyCallback to call when the query is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Queries the service's @feed_uri feed to build a #GDataFeed. @self, @feed_uri and
+ * @query are all reffed/copied when this function is called, so can safely be freed after this function returns.
+ *
+ * For more details, see gdata_service_query(), which is the synchronous version of this function.
+ *
+ * When the operation is finished, @callback will be called. You can then call gdata_service_query_finish()
+ * to get the results of the operation.
+ *
+ * Since: 0.9.1
+ */
+void
+gdata_service_query_async (GDataService *self, GDataAuthorizationDomain *domain, const gchar *feed_uri, GDataQuery *query, GType entry_type,
+ GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data, GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_autoptr(GTask) task = NULL;
+ QueryAsyncData *data;
+
+ g_return_if_fail (GDATA_IS_SERVICE (self));
+ g_return_if_fail (domain == NULL || GDATA_IS_AUTHORIZATION_DOMAIN (domain));
+ g_return_if_fail (feed_uri != NULL);
+ g_return_if_fail (g_type_is_a (entry_type, GDATA_TYPE_ENTRY));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+ g_return_if_fail (callback != NULL);
+
+ data = g_slice_new (QueryAsyncData);
+ data->domain = (domain != NULL) ? g_object_ref (domain) : NULL;
+ data->feed_uri = g_strdup (feed_uri);
+ data->query = (query != NULL) ? g_object_ref (query) : NULL;
+ data->entry_type = entry_type;
+ data->progress_callback = progress_callback;
+ data->progress_user_data = progress_user_data;
+ data->destroy_progress_user_data = destroy_progress_user_data;
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_service_query_async);
+ g_task_set_task_data (task, g_steal_pointer (&data), (GDestroyNotify) query_async_data_free);
+ g_task_run_in_thread (task, query_thread);
+}
+
+/**
+ * gdata_service_query_finish:
+ * @self: a #GDataService
+ * @async_result: a #GAsyncResult
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous query operation started with gdata_service_query_async().
+ *
+ * Return value: (transfer full): a #GDataFeed of query results, or %NULL; unref with g_object_unref()
+ */
+GDataFeed *
+gdata_service_query_finish (GDataService *self, GAsyncResult *async_result, GError **error)
+{
+ g_return_val_if_fail (GDATA_IS_SERVICE (self), NULL);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (async_result), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+ g_return_val_if_fail (g_task_is_valid (async_result, self), NULL);
+ g_return_val_if_fail (g_async_result_is_tagged (async_result, gdata_service_query_async), NULL);
+
+ return g_task_propagate_pointer (G_TASK (async_result), error);
+}
+
+/* Does the bulk of the work of gdata_service_query. Split out because certain queries (such as that done by
+ * gdata_service_query_single_entry()) only return a single entry, and thus need special parsing code. */
+SoupMessage *
+_gdata_service_query (GDataService *self, GDataAuthorizationDomain *domain, const gchar *feed_uri, GDataQuery *query,
+ GCancellable *cancellable, GError **error)
+{
+ SoupMessage *message;
+ guint status;
+ const gchar *etag = NULL;
+
+ /* Append the ETag header if possible */
+ if (query != NULL)
+ etag = gdata_query_get_etag (query);
+
+ /* Build the message */
+ if (query != NULL) {
+ gchar *query_uri = gdata_query_get_query_uri (query, feed_uri);
+ message = _gdata_service_build_message (self, domain, SOUP_METHOD_GET, query_uri, etag, FALSE);
+ g_free (query_uri);
+ } else {
+ message = _gdata_service_build_message (self, domain, SOUP_METHOD_GET, feed_uri, etag, FALSE);
+ }
+
+ /* Note that cancellation only applies to network activity; not to the processing done afterwards */
+ status = _gdata_service_send_message (self, message, cancellable, error);
+
+ if (status == SOUP_STATUS_NOT_MODIFIED || status == SOUP_STATUS_CANCELLED) {
+ /* Not modified (ETag has worked), or cancelled (in which case the error has been set) */
+ g_object_unref (message);
+ return NULL;
+ } else if (status != SOUP_STATUS_OK) {
+ /* Error */
+ GDataServiceClass *klass = GDATA_SERVICE_GET_CLASS (self);
+ g_assert (klass->parse_error_response != NULL);
+ klass->parse_error_response (self, GDATA_OPERATION_QUERY, status, message->reason_phrase, message->response_body->data,
+ message->response_body->length, error);
+ g_object_unref (message);
+ return NULL;
+ }
+
+ return message;
+}
+
+static GDataFeed *
+__gdata_service_query (GDataService *self, GDataAuthorizationDomain *domain, const gchar *feed_uri, GDataQuery *query, GType entry_type,
+ GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error)
+{
+ GDataServiceClass *klass;
+ SoupMessage *message;
+ GDataFeed *feed;
+
+ klass = GDATA_SERVICE_GET_CLASS (self);
+
+ /* Are we off the end of the final page? */
+ if (query != NULL && _gdata_query_is_finished (query)) {
+ GTimeVal updated;
+
+ /* Build an empty dummy feed to signify the end of the list. */
+ g_get_current_time (&updated);
+ return _gdata_feed_new (klass->feed_type, "Empty feed", "feed1",
+ updated.tv_sec);
+ }
+
+ /* Send the request. */
+ message = _gdata_service_query (self, domain, feed_uri, query, cancellable, error);
+ if (message == NULL)
+ return NULL;
+
+ g_assert (message->response_body->data != NULL);
+ g_assert (klass->parse_feed != NULL);
+
+ /* Parse the response. */
+ feed = klass->parse_feed (self, domain, query, entry_type,
+ message, cancellable, progress_callback,
+ progress_user_data, error);
+
+ g_object_unref (message);
+
+ return feed;
+}
+
+static GDataFeed *
+real_parse_feed (GDataService *self,
+ GDataAuthorizationDomain *domain,
+ GDataQuery *query,
+ GType entry_type,
+ SoupMessage *message,
+ GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback,
+ gpointer progress_user_data,
+ GError **error)
+{
+ GDataServiceClass *klass;
+ GDataFeed *feed = NULL;
+ SoupMessageHeaders *headers;
+ const gchar *content_type;
+
+ klass = GDATA_SERVICE_GET_CLASS (self);
+ headers = message->response_headers;
+ content_type = soup_message_headers_get_content_type (headers, NULL);
+
+ if (content_type != NULL && strcmp (content_type, "application/json") == 0) {
+ /* Definitely JSON. */
+ g_debug("JSON content type detected.");
+ feed = _gdata_feed_new_from_json (klass->feed_type, message->response_body->data, message->response_body->length, entry_type,
+ progress_callback, progress_user_data, error);
+ } else {
+ /* Potentially XML. Don't bother checking the Content-Type, since the parser
+ * will fail gracefully if the response body is not valid XML. */
+ g_debug("XML content type detected.");
+ feed = _gdata_feed_new_from_xml (klass->feed_type, message->response_body->data, message->response_body->length, entry_type,
+ progress_callback, progress_user_data, error);
+ }
+
+ /* Update the query with the feed's ETag */
+ if (query != NULL && feed != NULL && gdata_feed_get_etag (feed) != NULL)
+ gdata_query_set_etag (query, gdata_feed_get_etag (feed));
+
+ /* Update the query with the next and previous URIs from the feed */
+ if (query != NULL && feed != NULL) {
+ GDataLink *_link;
+ const gchar *token;
+
+ _gdata_query_clear_pagination (query);
+
+ /* Atom-style next and previous page links. */
+ _link = gdata_feed_look_up_link (feed, "http://www.iana.org/assignments/relation/next");
+ if (_link != NULL)
+ _gdata_query_set_next_uri (query, gdata_link_get_uri (_link));
+ _link = gdata_feed_look_up_link (feed, "http://www.iana.org/assignments/relation/previous");
+ if (_link != NULL)
+ _gdata_query_set_previous_uri (query, gdata_link_get_uri (_link));
+
+ /* JSON-style next page token. (There is no previous page
+ * token.) */
+ token = gdata_feed_get_next_page_token (feed);
+ if (token != NULL)
+ _gdata_query_set_next_page_token (query, token);
+ }
+
+ return feed;
+}
+
+/**
+ * gdata_service_query:
+ * @self: a #GDataService
+ * @domain: (allow-none): the #GDataAuthorizationDomain the query falls under, or %NULL
+ * @feed_uri: the feed URI to query, including the host name and protocol
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @entry_type: a #GType for the #GDataEntrys to build from the XML
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (scope call) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @error: a #GError, or %NULL
+ *
+ * Queries the service's @feed_uri feed to build a #GDataFeed.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by triggering the @cancellable object from another thread.
+ * If the operation was cancelled before or during network activity, the error %G_IO_ERROR_CANCELLED will be returned. Cancellation has no effect
+ * after network activity has finished, however, and the query will return successfully (or return an error sent by the server) if it is first
+ * cancelled after network activity has finished. See the <link linkend="cancellable-support">overview of cancellation</link> for
+ * more details.
+ *
+ * A %GDATA_SERVICE_ERROR_PROTOCOL_ERROR will be returned if the server indicates there is a problem with the query, but subclasses may override
+ * this and return their own errors. See their documentation for more details.
+ *
+ * For each entry in the response feed, @progress_callback will be called in the main thread. If there was an error parsing the XML response,
+ * a #GDataParserError will be returned.
+ *
+ * If the query is successful and the feed supports pagination, @query will be updated with the pagination URIs, and the next or previous page
+ * can then be loaded by calling gdata_query_next_page() or gdata_query_previous_page() before running the query again.
+ *
+ * If the #GDataQuery's ETag is set and it finds a match on the server, %NULL will be returned, but @error will remain unset. Otherwise,
+ * @query's ETag will be updated with the ETag from the returned feed, if available.
+ *
+ * Return value: (transfer full): a #GDataFeed of query results, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.9.0
+ */
+GDataFeed *
+gdata_service_query (GDataService *self, GDataAuthorizationDomain *domain, const gchar *feed_uri, GDataQuery *query, GType entry_type,
+ GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error)
+{
+ g_return_val_if_fail (GDATA_IS_SERVICE (self), NULL);
+ g_return_val_if_fail (domain == NULL || GDATA_IS_AUTHORIZATION_DOMAIN (domain), NULL);
+ g_return_val_if_fail (feed_uri != NULL, NULL);
+ g_return_val_if_fail (g_type_is_a (entry_type, GDATA_TYPE_ENTRY), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
+ return __gdata_service_query (self, domain, feed_uri, query, entry_type, cancellable, progress_callback, progress_user_data, error);
+}
+
+/**
+ * gdata_service_query_single_entry:
+ * @self: a #GDataService
+ * @domain: (allow-none): the #GDataAuthorizationDomain the query falls under, or %NULL
+ * @entry_id: the entry ID of the desired entry
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @entry_type: a #GType for the #GDataEntry to build from the XML
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Retrieves information about the single entry with the given @entry_id. @entry_id should be as returned by
+ * gdata_entry_get_id().
+ *
+ * Parameters and errors are as for gdata_service_query(). Most of the properties of @query aren't relevant, and
+ * will cause a server-side error if used. The most useful property to use is #GDataQuery:etag, which will cause the
+ * server to not return anything if the entry hasn't been modified since it was given the specified ETag; thus saving
+ * bandwidth. If the server does not return anything for this reason, gdata_service_query_single_entry() will return
+ * %NULL, but will not set an error in @error.
+ *
+ * Return value: (transfer full): a #GDataEntry, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.9.0
+ */
+GDataEntry *
+gdata_service_query_single_entry (GDataService *self, GDataAuthorizationDomain *domain, const gchar *entry_id, GDataQuery *query, GType entry_type,
+ GCancellable *cancellable, GError **error)
+{
+ GDataEntryClass *klass;
+ GDataEntry *entry;
+ gchar *entry_uri;
+ SoupMessage *message;
+ SoupMessageHeaders *headers;
+ const gchar *content_type;
+
+ g_return_val_if_fail (GDATA_IS_SERVICE (self), NULL);
+ g_return_val_if_fail (domain == NULL || GDATA_IS_AUTHORIZATION_DOMAIN (domain), NULL);
+ g_return_val_if_fail (entry_id != NULL, NULL);
+ g_return_val_if_fail (query == NULL || GDATA_IS_QUERY (query), NULL);
+ g_return_val_if_fail (g_type_is_a (entry_type, GDATA_TYPE_ENTRY) == TRUE, NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ /* Query for just the specified entry */
+ klass = GDATA_ENTRY_CLASS (g_type_class_ref (entry_type));
+ g_assert (klass->get_entry_uri != NULL);
+
+ entry_uri = klass->get_entry_uri (entry_id);
+ message = _gdata_service_query (GDATA_SERVICE (self), domain, entry_uri, query, cancellable, error);
+ g_free (entry_uri);
+
+ if (message == NULL) {
+ g_type_class_unref (klass);
+ return NULL;
+ }
+
+ g_assert (message->response_body->data != NULL);
+
+ headers = message->response_headers;
+ content_type = soup_message_headers_get_content_type (headers, NULL);
+
+ if (g_strcmp0 (content_type, "application/json") == 0) {
+ entry = GDATA_ENTRY (gdata_parsable_new_from_json (entry_type, message->response_body->data, message->response_body->length, error));
+ } else {
+ entry = GDATA_ENTRY (gdata_parsable_new_from_xml (entry_type, message->response_body->data, message->response_body->length, error));
+ }
+
+ g_object_unref (message);
+ g_type_class_unref (klass);
+
+ return entry;
+}
+
+typedef struct {
+ GDataAuthorizationDomain *domain;
+ gchar *entry_id;
+ GDataQuery *query;
+ GType entry_type;
+} QuerySingleEntryAsyncData;
+
+static void
+query_single_entry_async_data_free (QuerySingleEntryAsyncData *data)
+{
+ if (data->domain != NULL)
+ g_object_unref (data->domain);
+
+ g_free (data->entry_id);
+ if (data->query != NULL)
+ g_object_unref (data->query);
+ g_slice_free (QuerySingleEntryAsyncData, data);
+}
+
+static void
+query_single_entry_thread (GTask *task, gpointer source_object, gpointer task_data, GCancellable *cancellable)
+{
+ GDataService *service = GDATA_SERVICE (source_object);
+ g_autoptr(GDataEntry) entry = NULL;
+ g_autoptr(GError) error = NULL;
+ QuerySingleEntryAsyncData *data = task_data;
+
+ /* Execute the query and return */
+ entry = gdata_service_query_single_entry (service, data->domain, data->entry_id, data->query, data->entry_type, cancellable, &error);
+ if (entry == NULL && error != NULL)
+ g_task_return_error (task, g_steal_pointer (&error));
+ else
+ g_task_return_pointer (task, g_steal_pointer (&entry), g_object_unref);
+}
+
+/**
+ * gdata_service_query_single_entry_async:
+ * @self: a #GDataService
+ * @domain: (allow-none): the #GDataAuthorizationDomain the query falls under, or %NULL
+ * @entry_id: the entry ID of the desired entry
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @entry_type: a #GType for the #GDataEntry to build from the XML
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when the query is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Retrieves information about the single entry with the given @entry_id. @entry_id should be as returned by
+ * gdata_entry_get_id(). @self, @query and @entry_id are reffed/copied when this
+ * function is called, so can safely be freed after this function returns.
+ *
+ * For more details, see gdata_service_query_single_entry(), which is the synchronous version of this function.
+ *
+ * When the operation is finished, @callback will be called. You can then call gdata_service_query_single_entry_finish()
+ * to get the results of the operation.
+ *
+ * Since: 0.9.0
+ */
+void
+gdata_service_query_single_entry_async (GDataService *self, GDataAuthorizationDomain *domain, const gchar *entry_id, GDataQuery *query,
+ GType entry_type, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_autoptr(GTask) task = NULL;
+ QuerySingleEntryAsyncData *data;
+
+ g_return_if_fail (GDATA_IS_SERVICE (self));
+ g_return_if_fail (domain == NULL || GDATA_IS_AUTHORIZATION_DOMAIN (domain));
+ g_return_if_fail (entry_id != NULL);
+ g_return_if_fail (query == NULL || GDATA_IS_QUERY (query));
+ g_return_if_fail (g_type_is_a (entry_type, GDATA_TYPE_ENTRY) == TRUE);
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+ g_return_if_fail (callback != NULL);
+
+ data = g_slice_new (QuerySingleEntryAsyncData);
+ data->domain = (domain != NULL) ? g_object_ref (domain) : NULL;
+ data->query = (query != NULL) ? g_object_ref (query) : NULL;
+ data->entry_id = g_strdup (entry_id);
+ data->entry_type = entry_type;
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_service_query_single_entry_async);
+ g_task_set_task_data (task, g_steal_pointer (&data), (GDestroyNotify) query_single_entry_async_data_free);
+ g_task_run_in_thread (task, query_single_entry_thread);
+}
+
+/**
+ * gdata_service_query_single_entry_finish:
+ * @self: a #GDataService
+ * @async_result: a #GAsyncResult
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous query operation for a single entry, as started with gdata_service_query_single_entry_async().
+ *
+ * Return value: (transfer full): a #GDataEntry, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.7.0
+ */
+GDataEntry *
+gdata_service_query_single_entry_finish (GDataService *self, GAsyncResult *async_result, GError **error)
+{
+ g_return_val_if_fail (GDATA_IS_SERVICE (self), NULL);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (async_result), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+ g_return_val_if_fail (g_task_is_valid (async_result, self), NULL);
+ g_return_val_if_fail (g_async_result_is_tagged (async_result, gdata_service_query_single_entry_async), NULL);
+
+ return g_task_propagate_pointer (G_TASK (async_result), error);
+}
+
+typedef struct {
+ GDataAuthorizationDomain *domain;
+ gchar *upload_uri;
+ GDataEntry *entry;
+} InsertEntryAsyncData;
+
+static void
+insert_entry_async_data_free (InsertEntryAsyncData *self)
+{
+ if (self->domain != NULL)
+ g_object_unref (self->domain);
+
+ g_free (self->upload_uri);
+ if (self->entry)
+ g_object_unref (self->entry);
+
+ g_slice_free (InsertEntryAsyncData, self);
+}
+
+static void
+insert_entry_thread (GTask *task, gpointer source_object, gpointer task_data, GCancellable *cancellable)
+{
+ GDataService *service = GDATA_SERVICE (source_object);
+ g_autoptr(GDataEntry) updated_entry = NULL;
+ g_autoptr(GError) error = NULL;
+ InsertEntryAsyncData *data = task_data;
+
+ /* Insert the entry and return */
+ updated_entry = gdata_service_insert_entry (service, data->domain, data->upload_uri, data->entry, cancellable, &error);
+ if (updated_entry == NULL)
+ g_task_return_error (task, g_steal_pointer (&error));
+ else
+ g_task_return_pointer (task, g_steal_pointer (&updated_entry), g_object_unref);
+}
+
+/**
+ * gdata_service_insert_entry_async:
+ * @self: a #GDataService
+ * @domain: (allow-none): the #GDataAuthorizationDomain the insertion operation falls under, or %NULL
+ * @upload_uri: the URI to which the upload should be sent
+ * @entry: the #GDataEntry to insert
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when insertion is finished, or %NULL
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Inserts @entry by uploading it to the online service at @upload_uri. @self, @upload_uri and
+ * @entry are all reffed/copied when this function is called, so can safely be freed after this function returns.
+ *
+ * For more details, see gdata_service_insert_entry(), which is the synchronous version of this function.
+ *
+ * When the operation is finished, @callback will be called. You can then call gdata_service_insert_entry_finish()
+ * to get the results of the operation.
+ *
+ * Since: 0.9.0
+ */
+void
+gdata_service_insert_entry_async (GDataService *self, GDataAuthorizationDomain *domain, const gchar *upload_uri, GDataEntry *entry,
+ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_autoptr(GTask) task = NULL;
+ InsertEntryAsyncData *data;
+
+ g_return_if_fail (GDATA_IS_SERVICE (self));
+ g_return_if_fail (domain == NULL || GDATA_IS_AUTHORIZATION_DOMAIN (domain));
+ g_return_if_fail (upload_uri != NULL);
+ g_return_if_fail (GDATA_IS_ENTRY (entry));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+
+ data = g_slice_new (InsertEntryAsyncData);
+ data->domain = (domain != NULL) ? g_object_ref (domain) : NULL;
+ data->upload_uri = g_strdup (upload_uri);
+ data->entry = g_object_ref (entry);
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_service_insert_entry_async);
+ g_task_set_task_data (task, g_steal_pointer (&data), (GDestroyNotify) insert_entry_async_data_free);
+ g_task_run_in_thread (task, insert_entry_thread);
+}
+
+/**
+ * gdata_service_insert_entry_finish:
+ * @self: a #GDataService
+ * @async_result: a #GAsyncResult
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous entry insertion operation started with gdata_service_insert_entry_async().
+ *
+ * Return value: (transfer full): an updated #GDataEntry, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.3.0
+ */
+GDataEntry *
+gdata_service_insert_entry_finish (GDataService *self, GAsyncResult *async_result, GError **error)
+{
+ g_return_val_if_fail (GDATA_IS_SERVICE (self), NULL);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (async_result), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+ g_return_val_if_fail (g_task_is_valid (async_result, self), NULL);
+ g_return_val_if_fail (g_async_result_is_tagged (async_result, gdata_service_insert_entry_async), NULL);
+
+ return g_task_propagate_pointer (G_TASK (async_result), error);
+}
+
+/**
+ * gdata_service_insert_entry:
+ * @self: a #GDataService
+ * @domain: (allow-none): the #GDataAuthorizationDomain the insertion operation falls under, or %NULL
+ * @upload_uri: the URI to which the upload should be sent
+ * @entry: the #GDataEntry to insert
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Inserts @entry by uploading it to the online service at @upload_uri. For more information about the concept of inserting entries, see
+ * the <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/basics.html#InsertingEntry">online documentation</ulink> for the GData
+ * protocol.
+ *
+ * The service will return an updated version of the entry, which is the return value of this function on success.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by triggering the @cancellable object from another thread.
+ * If the operation was cancelled before or during network activity, the error %G_IO_ERROR_CANCELLED will be returned. Cancellation has no effect
+ * after network activity has finished, however, and the insertion will return successfully (or return an error sent by the server) if it is first
+ * cancelled after network activity has finished. See the <link linkend="cancellable-support">overview of cancellation</link> for
+ * more details.
+ *
+ * If the entry is marked as already having been inserted a %GDATA_SERVICE_ERROR_ENTRY_ALREADY_INSERTED error will be returned immediately
+ * (there will be no network requests).
+ *
+ * If there is an error inserting the entry, a %GDATA_SERVICE_ERROR_PROTOCOL_ERROR error will be returned. Currently, subclasses
+ * <emphasis>cannot</emphasis> cannot override this or provide more specific errors.
+ *
+ * Return value: (transfer full): an updated #GDataEntry, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.9.0
+ */
+GDataEntry *
+gdata_service_insert_entry (GDataService *self, GDataAuthorizationDomain *domain, const gchar *upload_uri, GDataEntry *entry,
+ GCancellable *cancellable, GError **error)
+{
+ GDataEntry *updated_entry;
+ SoupMessage *message;
+ gchar *upload_data;
+ guint status;
+ GDataParsableClass *klass;
+
+ g_return_val_if_fail (GDATA_IS_SERVICE (self), NULL);
+ g_return_val_if_fail (domain == NULL || GDATA_IS_AUTHORIZATION_DOMAIN (domain), NULL);
+ g_return_val_if_fail (upload_uri != NULL, NULL);
+ g_return_val_if_fail (GDATA_IS_ENTRY (entry), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
+ if (gdata_entry_is_inserted (entry) == TRUE) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_ENTRY_ALREADY_INSERTED,
+ _("The entry has already been inserted."));
+ return NULL;
+ }
+
+ message = _gdata_service_build_message (self, domain, SOUP_METHOD_POST, upload_uri, NULL, FALSE);
+
+ /* Append the data */
+ klass = GDATA_PARSABLE_GET_CLASS (entry);
+ g_assert (klass->get_content_type != NULL);
+ if (g_strcmp0 (klass->get_content_type (), "application/json") == 0) {
+ upload_data = gdata_parsable_get_json (GDATA_PARSABLE (entry));
+ soup_message_set_request (message, "application/json", SOUP_MEMORY_TAKE, upload_data, strlen (upload_data));
+ } else {
+ upload_data = gdata_parsable_get_xml (GDATA_PARSABLE (entry));
+ soup_message_set_request (message, "application/atom+xml", SOUP_MEMORY_TAKE, upload_data, strlen (upload_data));
+ }
+
+ /* Send the message */
+ status = _gdata_service_send_message (self, message, cancellable, error);
+
+ if (status == SOUP_STATUS_NONE || status == SOUP_STATUS_CANCELLED) {
+ /* Redirect error or cancelled */
+ g_object_unref (message);
+ return NULL;
+ } else if (status != SOUP_STATUS_CREATED && status != SOUP_STATUS_OK) {
+ /* Error: for XML APIs Google returns CREATED and for JSON it returns OK. */
+ GDataServiceClass *service_klass = GDATA_SERVICE_GET_CLASS (self);
+ g_assert (service_klass->parse_error_response != NULL);
+ service_klass->parse_error_response (self, GDATA_OPERATION_INSERTION, status, message->reason_phrase, message->response_body->data,
+ message->response_body->length, error);
+ g_object_unref (message);
+ return NULL;
+ }
+
+ /* Parse the XML or JSON according to GDataEntry type; create and return a new GDataEntry of the same type as @entry */
+ g_assert (message->response_body->data != NULL);
+ if (g_strcmp0 (klass->get_content_type (), "application/json") == 0) {
+ updated_entry = GDATA_ENTRY (gdata_parsable_new_from_json (G_OBJECT_TYPE (entry), message->response_body->data,
+ message->response_body->length, error));
+ } else {
+ updated_entry = GDATA_ENTRY (gdata_parsable_new_from_xml (G_OBJECT_TYPE (entry), message->response_body->data,
+ message->response_body->length, error));
+ }
+ g_object_unref (message);
+
+ return updated_entry;
+}
+
+typedef struct {
+ GDataAuthorizationDomain *domain;
+ GDataEntry *entry;
+} UpdateEntryAsyncData;
+
+static void
+update_entry_async_data_free (UpdateEntryAsyncData *data)
+{
+ if (data->domain != NULL)
+ g_object_unref (data->domain);
+
+ if (data->entry != NULL)
+ g_object_unref (data->entry);
+
+ g_slice_free (UpdateEntryAsyncData, data);
+}
+
+static void
+update_entry_thread (GTask *task, gpointer source_object, gpointer task_data, GCancellable *cancellable)
+{
+ GDataService *service = GDATA_SERVICE (source_object);
+ g_autoptr(GDataEntry) updated_entry = NULL;
+ g_autoptr(GError) error = NULL;
+ UpdateEntryAsyncData *data = task_data;
+
+ /* Update the entry and return */
+ updated_entry = gdata_service_update_entry (service, data->domain, data->entry, cancellable, &error);
+ if (updated_entry == NULL)
+ g_task_return_error (task, g_steal_pointer (&error));
+ else
+ g_task_return_pointer (task, g_steal_pointer (&updated_entry), g_object_unref);
+}
+
+/**
+ * gdata_service_update_entry_async:
+ * @self: a #GDataService
+ * @domain: (allow-none): the #GDataAuthorizationDomain the update operation falls under, or %NULL
+ * @entry: the #GDataEntry to update
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when the update is finished, or %NULL
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Updates @entry by PUTting it to its <literal>edit</literal> link's URI. @self and
+ * @entry are both reffed when this function is called, so can safely be unreffed after this function returns.
+ *
+ * For more details, see gdata_service_update_entry(), which is the synchronous version of this function.
+ *
+ * When the operation is finished, @callback will be called. You can then call gdata_service_update_entry_finish()
+ * to get the results of the operation.
+ *
+ * Since: 0.9.0
+ */
+void
+gdata_service_update_entry_async (GDataService *self, GDataAuthorizationDomain *domain, GDataEntry *entry,
+ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_autoptr(GTask) task = NULL;
+ UpdateEntryAsyncData *data;
+
+ g_return_if_fail (GDATA_IS_SERVICE (self));
+ g_return_if_fail (domain == NULL || GDATA_IS_AUTHORIZATION_DOMAIN (domain));
+ g_return_if_fail (GDATA_IS_ENTRY (entry));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+
+ data = g_slice_new (UpdateEntryAsyncData);
+ data->domain = (domain != NULL) ? g_object_ref (domain) : NULL;
+ data->entry = g_object_ref (entry);
+
+ task = g_task_new (task, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_service_update_entry_async);
+ g_task_set_task_data (task, g_steal_pointer (&data), (GDestroyNotify) update_entry_async_data_free);
+ g_task_run_in_thread (task, update_entry_thread);
+}
+
+/**
+ * gdata_service_update_entry_finish:
+ * @self: a #GDataService
+ * @async_result: a #GAsyncResult
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous entry update operation started with gdata_service_update_entry_async().
+ *
+ * Return value: (transfer full): an updated #GDataEntry, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.3.0
+ */
+GDataEntry *
+gdata_service_update_entry_finish (GDataService *self, GAsyncResult *async_result, GError **error)
+{
+ g_return_val_if_fail (GDATA_IS_SERVICE (self), NULL);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (async_result), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+ g_return_val_if_fail (g_task_is_valid (async_result, self), NULL);
+ g_return_val_if_fail (g_async_result_is_tagged (async_result, gdata_service_update_entry_async), NULL);
+
+ return g_task_propagate_pointer (G_TASK (async_result), error);
+}
+
+/**
+ * gdata_service_update_entry:
+ * @self: a #GDataService
+ * @domain: (allow-none): the #GDataAuthorizationDomain the update operation falls under, or %NULL
+ * @entry: the #GDataEntry to update
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Updates @entry by PUTting it to its <literal>edit</literal> link's URI. For more information about the concept of updating entries, see
+ * the <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/basics.html#UpdatingEntry">online documentation</ulink> for the GData
+ * protocol.
+ *
+ * The service will return an updated version of the entry, which is the return value of this function on success.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by triggering the @cancellable object from another thread.
+ * If the operation was cancelled before or during network activity, the error %G_IO_ERROR_CANCELLED will be returned. Cancellation has no effect
+ * after network activity has finished, however, and the update will return successfully (or return an error sent by the server) if it is first
+ * cancelled after network activity has finished. See the <link linkend="cancellable-support">overview of cancellation</link> for
+ * more details.
+ *
+ * If there is an error updating the entry, a %GDATA_SERVICE_ERROR_PROTOCOL_ERROR error will be returned. Currently, subclasses
+ * <emphasis>cannot</emphasis> cannot override this or provide more specific errors.
+ *
+ * Return value: (transfer full): an updated #GDataEntry, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.9.0
+ */
+GDataEntry *
+gdata_service_update_entry (GDataService *self, GDataAuthorizationDomain *domain, GDataEntry *entry, GCancellable *cancellable, GError **error)
+{
+ GDataEntry *updated_entry;
+ GDataLink *_link;
+ SoupMessage *message;
+ gchar *upload_data;
+ guint status;
+ GDataParsableClass *klass;
+
+ g_return_val_if_fail (GDATA_IS_SERVICE (self), NULL);
+ g_return_val_if_fail (domain == NULL || GDATA_IS_AUTHORIZATION_DOMAIN (domain), NULL);
+ g_return_val_if_fail (GDATA_IS_ENTRY (entry), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
+ /* Append the data */
+ klass = GDATA_PARSABLE_GET_CLASS (entry);
+ g_assert (klass->get_content_type != NULL);
+ if (g_strcmp0 (klass->get_content_type (), "application/json") == 0) {
+ /* Get the edit URI */
+ _link = gdata_entry_look_up_link (entry, GDATA_LINK_SELF);
+ g_assert (_link != NULL);
+ message = _gdata_service_build_message (self, domain, SOUP_METHOD_PUT, gdata_link_get_uri (_link), gdata_entry_get_etag (entry), TRUE);
+ upload_data = gdata_parsable_get_json (GDATA_PARSABLE (entry));
+ soup_message_set_request (message, "application/json", SOUP_MEMORY_TAKE, upload_data, strlen (upload_data));
+ } else {
+ /* Get the edit URI */
+ _link = gdata_entry_look_up_link (entry, GDATA_LINK_EDIT);
+ g_assert (_link != NULL);
+ message = _gdata_service_build_message (self, domain, SOUP_METHOD_PUT, gdata_link_get_uri (_link), gdata_entry_get_etag (entry), TRUE);
+ upload_data = gdata_parsable_get_xml (GDATA_PARSABLE (entry));
+ soup_message_set_request (message, "application/atom+xml", SOUP_MEMORY_TAKE, upload_data, strlen (upload_data));
+ }
+
+ /* Send the message */
+ status = _gdata_service_send_message (self, message, cancellable, error);
+
+ if (status == SOUP_STATUS_NONE || status == SOUP_STATUS_CANCELLED) {
+ /* Redirect error or cancelled */
+ g_object_unref (message);
+ return NULL;
+ } else if (status != SOUP_STATUS_OK) {
+ /* Error */
+ GDataServiceClass *service_klass = GDATA_SERVICE_GET_CLASS (self);
+ g_assert (service_klass->parse_error_response != NULL);
+ service_klass->parse_error_response (self, GDATA_OPERATION_UPDATE, status, message->reason_phrase, message->response_body->data,
+ message->response_body->length, error);
+ g_object_unref (message);
+ return NULL;
+ }
+
+ /* Parse the XML; create and return a new GDataEntry of the same type as @entry */
+ if (g_strcmp0 (klass->get_content_type (), "application/json") == 0) {
+ updated_entry = GDATA_ENTRY (gdata_parsable_new_from_json (G_OBJECT_TYPE (entry), message->response_body->data,
+ message->response_body->length, error));
+ } else {
+ updated_entry = GDATA_ENTRY (gdata_parsable_new_from_xml (G_OBJECT_TYPE (entry), message->response_body->data,
+ message->response_body->length, error));
+ }
+ g_object_unref (message);
+
+ return updated_entry;
+}
+
+typedef struct {
+ GDataAuthorizationDomain *domain;
+ GDataEntry *entry;
+} DeleteEntryAsyncData;
+
+static void
+delete_entry_async_data_free (DeleteEntryAsyncData *data)
+{
+ if (data->domain != NULL)
+ g_object_unref (data->domain);
+
+ if (data->entry != NULL)
+ g_object_unref (data->entry);
+
+ g_slice_free (DeleteEntryAsyncData, data);
+}
+
+static void
+delete_entry_thread (GTask *task, gpointer source_object, gpointer task_data, GCancellable *cancellable)
+{
+ GDataService *service = GDATA_SERVICE (source_object);
+ g_autoptr(GError) error = NULL;
+ DeleteEntryAsyncData *data = task_data;
+
+ /* Delete the entry and return */
+ if (!gdata_service_delete_entry (service, data->domain, data->entry, cancellable, &error))
+ g_task_return_error (task, g_steal_pointer (&error));
+ else
+ g_task_return_boolean (task, TRUE);
+}
+
+/**
+ * gdata_service_delete_entry_async:
+ * @self: a #GDataService
+ * @domain: (allow-none): the #GDataAuthorizationDomain the deletion falls under, or %NULL
+ * @entry: the #GDataEntry to delete
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when deletion is finished, or %NULL
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Deletes @entry from the server. @self and @entry are both reffed when this function is called,
+ * so can safely be unreffed after this function returns.
+ *
+ * For more details, see gdata_service_delete_entry(), which is the synchronous version of this function.
+ *
+ * When the operation is finished, @callback will be called. You can then call gdata_service_delete_entry_finish()
+ * to get the results of the operation.
+ *
+ * Since: 0.9.0
+ */
+void
+gdata_service_delete_entry_async (GDataService *self, GDataAuthorizationDomain *domain, GDataEntry *entry,
+ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_autoptr(GTask) task = NULL;
+ DeleteEntryAsyncData *data;
+
+ g_return_if_fail (GDATA_IS_SERVICE (self));
+ g_return_if_fail (domain == NULL || GDATA_IS_AUTHORIZATION_DOMAIN (domain));
+ g_return_if_fail (GDATA_IS_ENTRY (entry));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+
+ data = g_slice_new (DeleteEntryAsyncData);
+ data->domain = (domain != NULL) ? g_object_ref (domain) : NULL;
+ data->entry = g_object_ref (entry);
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_service_delete_entry_async);
+ g_task_set_task_data (task, g_steal_pointer (&data), (GDestroyNotify) delete_entry_async_data_free);
+ g_task_run_in_thread (task, delete_entry_thread);
+}
+
+/**
+ * gdata_service_delete_entry_finish:
+ * @self: a #GDataService
+ * @async_result: a #GAsyncResult
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous entry deletion operation started with gdata_service_delete_entry_async().
+ *
+ * Return value: %TRUE on success, %FALSE otherwise
+ *
+ * Since: 0.3.0
+ */
+gboolean
+gdata_service_delete_entry_finish (GDataService *self, GAsyncResult *async_result, GError **error)
+{
+ g_return_val_if_fail (GDATA_IS_SERVICE (self), FALSE);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (async_result), FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (g_task_is_valid (async_result, self), FALSE);
+ g_return_val_if_fail (g_async_result_is_tagged (async_result, gdata_service_delete_entry_async), FALSE);
+
+ return g_task_propagate_boolean (G_TASK (async_result), error);
+}
+
+/**
+ * gdata_service_delete_entry:
+ * @self: a #GDataService
+ * @domain: (allow-none): the #GDataAuthorizationDomain the deletion falls under, or %NULL
+ * @entry: the #GDataEntry to delete
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Deletes @entry from the server. For more information about the concept of deleting entries, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/basics.html#DeletingEntry">online documentation</ulink> for the GData
+ * protocol.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by triggering the @cancellable object from another thread.
+ * If the operation was cancelled before or during network activity, the error %G_IO_ERROR_CANCELLED will be returned. Cancellation has no effect
+ * after network activity has finished, however, and the deletion will return successfully (or return an error sent by the server) if it is first
+ * cancelled after network activity has finished. See the <link linkend="cancellable-support">overview of cancellation</link> for
+ * more details.
+ *
+ * If there is an error deleting the entry, a %GDATA_SERVICE_ERROR_PROTOCOL_ERROR error will be returned. Currently, subclasses
+ * <emphasis>cannot</emphasis> cannot override this or provide more specific errors.
+ *
+ * Return value: %TRUE on success, %FALSE otherwise
+ *
+ * Since: 0.9.0
+ */
+gboolean
+gdata_service_delete_entry (GDataService *self, GDataAuthorizationDomain *domain, GDataEntry *entry, GCancellable *cancellable, GError **error)
+{
+ GDataLink *_link;
+ SoupMessage *message;
+ guint status;
+ gchar *fixed_uri;
+ GDataParsableClass *klass;
+
+ g_return_val_if_fail (GDATA_IS_SERVICE (self), FALSE);
+ g_return_val_if_fail (domain == NULL || GDATA_IS_AUTHORIZATION_DOMAIN (domain), FALSE);
+ g_return_val_if_fail (GDATA_IS_ENTRY (entry), FALSE);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
+ /* Get the edit URI. We have to fix it to always use HTTPS as YouTube videos appear to incorrectly return a HTTP URI as their edit URI. */
+ klass = GDATA_PARSABLE_GET_CLASS (entry);
+ g_assert (klass->get_content_type != NULL);
+ if (g_strcmp0 (klass->get_content_type (), "application/json") == 0) {
+ _link = gdata_entry_look_up_link (entry, GDATA_LINK_SELF);
+ } else {
+ _link = gdata_entry_look_up_link (entry, GDATA_LINK_EDIT);
+ }
+ g_assert (_link != NULL);
+
+ fixed_uri = _gdata_service_fix_uri_scheme (gdata_link_get_uri (_link));
+ message = _gdata_service_build_message (self, domain, SOUP_METHOD_DELETE, fixed_uri, gdata_entry_get_etag (entry), TRUE);
+ g_free (fixed_uri);
+
+ /* Send the message */
+ status = _gdata_service_send_message (self, message, cancellable, error);
+
+ if (status == SOUP_STATUS_NONE || status == SOUP_STATUS_CANCELLED) {
+ /* Redirect error or cancelled */
+ g_object_unref (message);
+ return FALSE;
+ } else if (status != SOUP_STATUS_OK && status != SOUP_STATUS_NO_CONTENT) {
+ /* Error */
+ GDataServiceClass *service_klass = GDATA_SERVICE_GET_CLASS (self);
+ g_assert (service_klass->parse_error_response != NULL);
+ service_klass->parse_error_response (self, GDATA_OPERATION_DELETION, status, message->reason_phrase, message->response_body->data,
+ message->response_body->length, error);
+ g_object_unref (message);
+ return FALSE;
+ }
+
+ g_object_unref (message);
+
+ return TRUE;
+}
+
+static void
+notify_proxy_uri_cb (GObject *gobject, GParamSpec *pspec, GObject *self)
+{
+ g_object_notify (self, "proxy-uri");
+}
+
+/* Static function which isn't deprecated so we can continue using it internally. */
+static SoupURI *
+_get_proxy_uri (GDataService *self)
+{
+ SoupURI *proxy_uri;
+
+ g_return_val_if_fail (GDATA_IS_SERVICE (self), NULL);
+
+ g_object_get (self->priv->session, SOUP_SESSION_PROXY_URI, &proxy_uri, NULL);
+ g_object_unref (proxy_uri); /* remove the ref added by g_object_get */
+
+ return proxy_uri;
+}
+
+/**
+ * gdata_service_get_proxy_uri:
+ * @self: a #GDataService
+ *
+ * Gets the proxy URI on the #GDataService's #SoupSession.
+ *
+ * Return value: (transfer none): the proxy URI, or %NULL
+ *
+ * Since: 0.2.0
+ * Deprecated: 0.15.0: Use gdata_service_get_proxy_resolver() instead, which gives more flexibility over the proxy used.
+ */
+SoupURI *
+gdata_service_get_proxy_uri (GDataService *self)
+{
+ return _get_proxy_uri (self);
+}
+
+/* Static function which isn't deprecated so we can continue using it internally. */
+static void
+_set_proxy_uri (GDataService *self, SoupURI *proxy_uri)
+{
+ g_return_if_fail (GDATA_IS_SERVICE (self));
+ g_object_set (self->priv->session, SOUP_SESSION_PROXY_URI, proxy_uri, NULL);
+ g_object_notify (G_OBJECT (self), "proxy-uri");
+}
+
+/**
+ * gdata_service_set_proxy_uri:
+ * @self: a #GDataService
+ * @proxy_uri: (allow-none): the proxy URI, or %NULL
+ *
+ * Sets the proxy URI on the #SoupSession used internally by the given #GDataService.
+ * This forces all requests through the given proxy.
+ *
+ * If @proxy_uri is %NULL, no proxy will be used.
+ *
+ * Note that if a #GDataAuthorizer is being used with this #GDataService, the authorizer might also need its proxy URI setting.
+ *
+ * Since: 0.2.0
+ * Deprecated: 0.15.0: Use gdata_service_set_proxy_resolver() instead, which gives more flexibility over the proxy used.
+ */
+void
+gdata_service_set_proxy_uri (GDataService *self, SoupURI *proxy_uri)
+{
+ _set_proxy_uri (self, proxy_uri);
+}
+
+/**
+ * gdata_service_get_proxy_resolver:
+ * @self: a #GDataService
+ *
+ * Gets the #GProxyResolver on the #GDataService's #SoupSession.
+ *
+ * Return value: (transfer none) (allow-none): a #GProxyResolver, or %NULL
+ *
+ * Since: 0.15.0
+ */
+GProxyResolver *
+gdata_service_get_proxy_resolver (GDataService *self)
+{
+ g_return_val_if_fail (GDATA_IS_SERVICE (self), NULL);
+
+ return self->priv->proxy_resolver;
+}
+
+/**
+ * gdata_service_set_proxy_resolver:
+ * @self: a #GDataService
+ * @proxy_resolver: (allow-none): a #GProxyResolver, or %NULL
+ *
+ * Sets the #GProxyResolver on the #SoupSession used internally by the given #GDataService.
+ *
+ * Setting this will clear the #GDataService:proxy-uri property.
+ *
+ * Since: 0.15.0
+ */
+void
+gdata_service_set_proxy_resolver (GDataService *self, GProxyResolver *proxy_resolver)
+{
+ g_return_if_fail (GDATA_IS_SERVICE (self));
+ g_return_if_fail (proxy_resolver == NULL || G_IS_PROXY_RESOLVER (proxy_resolver));
+
+ if (proxy_resolver != NULL) {
+ g_object_ref (proxy_resolver);
+ }
+
+ g_clear_object (&self->priv->proxy_resolver);
+ self->priv->proxy_resolver = proxy_resolver;
+
+ g_object_notify (G_OBJECT (self), "proxy-resolver");
+}
+
+static void
+notify_timeout_cb (GObject *gobject, GParamSpec *pspec, GObject *self)
+{
+ g_object_notify (self, "timeout");
+}
+
+/**
+ * gdata_service_get_timeout:
+ * @self: a #GDataService
+ *
+ * Gets the #GDataService:timeout property; the network timeout, in seconds.
+ *
+ * Return value: the timeout, or <code class="literal">0</code>
+ *
+ * Since: 0.7.0
+ */
+guint
+gdata_service_get_timeout (GDataService *self)
+{
+ guint timeout;
+
+ g_return_val_if_fail (GDATA_IS_SERVICE (self), 0);
+
+ g_object_get (self->priv->session, SOUP_SESSION_TIMEOUT, &timeout, NULL);
+
+ return timeout;
+}
+
+/**
+ * gdata_service_set_timeout:
+ * @self: a #GDataService
+ * @timeout: the timeout, or <code class="literal">0</code>
+ *
+ * Sets the #GDataService:timeout property; the network timeout, in seconds.
+ *
+ * If @timeout is <code class="literal">0</code>, network operations will never time out.
+ *
+ * Note that if a #GDataAuthorizer is being used with this #GDataService, the authorizer might also need its timeout setting.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_service_set_timeout (GDataService *self, guint timeout)
+{
+ g_return_if_fail (GDATA_IS_SERVICE (self));
+ g_object_set (self->priv->session, SOUP_SESSION_TIMEOUT, timeout, NULL);
+ g_object_notify (G_OBJECT (self), "timeout");
+}
+
+SoupSession *
+_gdata_service_get_session (GDataService *self)
+{
+ g_return_val_if_fail (GDATA_IS_SERVICE (self), NULL);
+ return self->priv->session;
+}
+
+/*
+ * _gdata_service_get_scheme:
+ *
+ * Returns the name of the scheme to use, which will always be <code class="literal">https</code>. The return type used to vary according to the
+ * environment variable <code class="literal">LIBGDATA_FORCE_HTTP</code>, but Google has since switched to using HTTPS exclusively.
+ *
+ * See <ulink type="http" url="http://googlecode.blogspot.com/2011/03/improving-security-of-google-apis-with.html">Improving the security of Google
+ * APIs with SSL</ulink>.
+ *
+ * Return value: the scheme to use (<code class="literal">https</code>)
+ *
+ * Since: 0.6.0
+ */
+const gchar *
+_gdata_service_get_scheme (void)
+{
+ return "https";
+}
+
+/*
+ * _gdata_service_build_uri:
+ * @format: a standard printf() format string
+ * @...: the arguments to insert in the output
+ *
+ * Builds a URI from the given @format string, replacing each <code class="literal">%%s</code> format placeholder with a URI-escaped version of the
+ * corresponding argument, and each <code class="literal">%%p</code> format placeholder with a non-escaped version of the corresponding argument. No
+ * other printf() format placeholders are supported at the moment except <code class="literal">%%d</code>, which prints a signed integer; and
+ * <code class="literal">%%</code>, which prints a literal percent symbol.
+ *
+ * The returned URI is guaranteed to use the scheme returned by _gdata_service_get_scheme(). The format string, once all the arguments have been
+ * inserted into it, must include a scheme, but it doesn't matter which one.
+ *
+ * Return value: a newly allocated URI string; free with g_free()
+ */
+gchar *
+_gdata_service_build_uri (const gchar *format, ...)
+{
+ const gchar *p;
+ gchar *fixed_uri;
+ GString *uri;
+ va_list args;
+
+ g_return_val_if_fail (format != NULL, NULL);
+
+ /* Allocate a GString to build the URI in with at least as much space as the format string */
+ uri = g_string_sized_new (strlen (format));
+
+ /* Build the URI */
+ va_start (args, format);
+
+ for (p = format; *p != '\0'; p++) {
+ if (*p != '%') {
+ g_string_append_c (uri, *p);
+ continue;
+ }
+
+ switch(*++p) {
+ case 's':
+ g_string_append_uri_escaped (uri, va_arg (args, gchar*), NULL, TRUE);
+ break;
+ case 'p':
+ g_string_append (uri, va_arg (args, gchar*));
+ break;
+ case 'd':
+ g_string_append_printf (uri, "%d", va_arg (args, gint));
+ break;
+ case '%':
+ g_string_append_c (uri, '%');
+ break;
+ default:
+ g_error ("Unrecognized format placeholder '%%%c' in format '%s'. This is a programmer error.", *p, format);
+ break;
+ }
+ }
+
+ va_end (args);
+
+ /* Fix the scheme to always be HTTPS */
+ fixed_uri = _gdata_service_fix_uri_scheme (uri->str);
+ g_string_free (uri, TRUE);
+
+ return fixed_uri;
+}
+
+/**
+ * _gdata_service_fix_uri_scheme:
+ * @uri: an URI with either HTTP or HTTPS as the scheme
+ *
+ * Fixes the given URI to always have HTTPS as its scheme.
+ *
+ * Return value: (transfer full): the URI with HTTPS as its scheme
+ *
+ * Since: 0.9.0
+ */
+gchar *
+_gdata_service_fix_uri_scheme (const gchar *uri)
+{
+ g_return_val_if_fail (uri != NULL && *uri != '\0', NULL);
+
+ /* Ensure we're using the correct scheme (HTTP or HTTPS) */
+ if (g_str_has_prefix (uri, "https") == FALSE) {
+ gchar *fixed_uri, **pieces;
+
+ pieces = g_strsplit (uri, ":", 2);
+ g_assert (pieces[0] != NULL && pieces[1] != NULL && pieces[2] == NULL);
+
+ fixed_uri = g_strconcat ("https:", pieces[1], NULL);
+
+ g_strfreev (pieces);
+
+ return fixed_uri;
+ }
+
+ return g_strdup (uri);
+}
+
+/**
+ * _gdata_service_get_https_port:
+ *
+ * Gets the destination TCP/IP port number which libgdata should use for all outbound HTTPS traffic.
+ * This defaults to 443, but may be overridden using the <code class="literal">LIBGDATA_HTTPS_PORT</code>
+ * environment variable. This is intended to allow network traffic to be redirected to a local server for
+ * unit testing, with a listening port above 1024 so the tests don't need root privileges.
+ *
+ * The value returned by this function may change at any time (e.g. between unit tests), so callers must not cache the result.
+ *
+ * Return value: port number to use for HTTPS traffic
+ */
+guint
+_gdata_service_get_https_port (void)
+{
+ const gchar *port_string;
+
+ /* Allow changing the HTTPS port just for testing. */
+ port_string = g_getenv ("LIBGDATA_HTTPS_PORT");
+ if (port_string != NULL) {
+ const gchar *end;
+
+ guint64 port = g_ascii_strtoull (port_string, (gchar **) &end, 10);
+
+ if (port != 0 && *end == '\0') {
+ g_debug ("Overriding message port to %" G_GUINT64_FORMAT ".", port);
+ return port;
+ }
+ }
+
+ /* Return the default. */
+ return 443;
+}
+
+/*
+ * debug_handler:
+ *
+ * GLib debug message handler, which is passed all messages from g_debug() calls, and decides whether to print them.
+ */
+static void
+debug_handler (const char *log_domain, GLogLevelFlags log_level, const char *message, gpointer user_data)
+{
+ if (_gdata_service_get_log_level () != GDATA_LOG_NONE)
+ g_log_default_handler (log_domain, log_level, message, NULL);
+}
+
+/*
+ * soup_log_printer:
+ *
+ * Log printer for the libsoup logging functionality, which just marshals all soup log output to the standard GLib logging framework
+ * (and thus to debug_handler(), above).
+ */
+static void
+soup_log_printer (SoupLogger *logger, SoupLoggerLogLevel level, char direction, const char *data, gpointer user_data)
+{
+ gboolean filter_data;
+ gchar *_data = NULL;
+
+ filter_data = (_gdata_service_get_log_level () > GDATA_LOG_NONE && _gdata_service_get_log_level () < GDATA_LOG_FULL_UNREDACTED) ? TRUE : FALSE;
+
+ if (filter_data == TRUE) {
+ /* Filter out lines which look like they might contain usernames, passwords or auth. tokens. */
+ if (direction == '>' && g_str_has_prefix (data, "Authorization: GoogleLogin ") == TRUE) {
+ _data = g_strdup ("Authorization: GoogleLogin <redacted>");
+ } else if (direction == '>' && g_str_has_prefix (data, "Authorization: OAuth ") == TRUE) {
+ _data = g_strdup ("Authorization: OAuth <redacted>");
+ } else if (direction == '<' && g_str_has_prefix (data, "Set-Cookie: ") == TRUE) {
+ _data = g_strdup ("Set-Cookie: <redacted>");
+ } else if (direction == '<' && g_str_has_prefix (data, "Location: ") == TRUE) {
+ /* Looks like:
+ * "Location: https://www.google.com/calendar/feeds/default/owncalendars/full?gsessionid=sBjmp05m5i67exYA51XjDA". */
+ SoupURI *uri;
+ gchar *_uri;
+ GHashTable *params;
+
+ uri = soup_uri_new (data + strlen ("Location: "));
+
+ if (uri->query != NULL) {
+ params = soup_form_decode (uri->query);
+
+ /* strdup()s are necessary because the hash table's set up to free keys. */
+ if (g_hash_table_lookup (params, "gsessionid") != NULL) {
+ g_hash_table_insert (params, (gpointer) g_strdup ("gsessionid"), (gpointer) "<redacted>");
+ }
+
+ soup_uri_set_query_from_form (uri, params);
+ g_hash_table_destroy (params);
+ }
+
+ _uri = soup_uri_to_string (uri, FALSE);
+ _data = g_strconcat ("Location: ", _uri, NULL);
+ g_free (_uri);
+
+ soup_uri_free (uri);
+ } else if (direction == '<' && g_str_has_prefix (data, "SID=") == TRUE) {
+ _data = g_strdup ("SID=<redacted>");
+ } else if (direction == '<' && g_str_has_prefix (data, "LSID=") == TRUE) {
+ _data = g_strdup ("LSID=<redacted>");
+ } else if (direction == '<' && g_str_has_prefix (data, "Auth=") == TRUE) {
+ _data = g_strdup ("Auth=<redacted>");
+ } else if (direction == '>' && g_str_has_prefix (data, "accountType=") == TRUE) {
+ /* Looks like: "> accountType=HOSTED%5FOR%5FGOOGLE&Email=[e-mail address]&Passwd=[plaintex password]"
+ "&service=[service name]&source=ytapi%2DGNOME%2Dlibgdata%2D444fubtt%2D0". */
+ GHashTable *params = soup_form_decode (data);
+
+ /* strdup()s are necessary because the hash table's set up to free keys. */
+ if (g_hash_table_lookup (params, "Email") != NULL) {
+ g_hash_table_insert (params, (gpointer) g_strdup ("Email"), (gpointer) "<redacted>");
+ }
+ if (g_hash_table_lookup (params, "Passwd") != NULL) {
+ g_hash_table_insert (params, (gpointer) g_strdup ("Passwd"), (gpointer) "<redacted>");
+ }
+
+ _data = soup_form_encode_hash (params);
+
+ g_hash_table_destroy (params);
+ } else if (direction == '<' && g_str_has_prefix (data, "oauth_token=") == TRUE) {
+ /* Looks like: "< oauth_token=4%2FI-WU7sBzKk5GhGlQUF8a_TCZRnb7&oauth_token_secret=qTTTJg3no25auiiWFerzjW4I"
+ "&oauth_callback_confirmed=true". */
+ GHashTable *params = soup_form_decode (data);
+
+ /* strdup()s are necessary because the hash table's set up to free keys. */
+ if (g_hash_table_lookup (params, "oauth_token") != NULL) {
+ g_hash_table_insert (params, (gpointer) g_strdup ("oauth_token"), (gpointer) "<redacted>");
+ }
+ if (g_hash_table_lookup (params, "oauth_token_secret") != NULL) {
+ g_hash_table_insert (params, (gpointer) g_strdup ("oauth_token_secret"), (gpointer) "<redacted>");
+ }
+
+ _data = soup_form_encode_hash (params);
+
+ g_hash_table_destroy (params);
+ } else if (direction == '>' && g_str_has_prefix (data, "X-GData-Key: key=") == TRUE) {
+ /* Looks like: "> X-GData-Key: key=[dev key in hex]". */
+ _data = g_strdup ("X-GData-Key: key=<redacted>");
+ } else {
+ /* Nothing to redact. */
+ _data = g_strdup (data);
+ }
+ } else {
+ /* Don't dupe the string. */
+ _data = (gchar*) data;
+ }
+
+ /* Log the data. */
+ g_debug ("%c %s", direction, _data);
+
+ if (filter_data == TRUE) {
+ g_free (_data);
+ }
+}
+
+/**
+ * _gdata_service_get_log_level:
+ *
+ * Returns the logging level for the library, currently set by an environment variable.
+ *
+ * Return value: the log level
+ *
+ * Since: 0.7.0
+ */
+GDataLogLevel
+_gdata_service_get_log_level (void)
+{
+ static int level = -1;
+
+ if (level < 0) {
+ const gchar *envvar = g_getenv ("LIBGDATA_DEBUG");
+ if (envvar != NULL)
+ level = atoi (envvar);
+ level = MIN (MAX (level, 0), GDATA_LOG_FULL_UNREDACTED);
+ }
+
+ return level;
+}
+
+/* Build a User-Agent value to send to the server.
+ *
+ * If we support gzip, we can request gzip from the server by both including
+ * the appropriate Accept-Encoding header and putting 'gzip' in the User-Agent
+ * header:
+ * - https://developers.google.com/drive/web/performance#gzip
+ * - http://googleappsdeveloper.blogspot.co.uk/2011/12/optimizing-bandwidth-usage-with-gzip.html
+ */
+static gchar *
+build_user_agent (gboolean supports_gzip)
+{
+ if (supports_gzip) {
+ return g_strdup_printf ("libgdata/%s - gzip", VERSION);
+ } else {
+ return g_strdup_printf ("libgdata/%s", VERSION);
+ }
+}
+
+/**
+ * _gdata_service_build_session:
+ *
+ * Build a new #SoupSession, enabling GNOME features if support has been compiled for them, and adding a log printer which is hooked into
+ * libgdata's logging functionality.
+ *
+ * Return value: a new #SoupSession; unref with g_object_unref()
+ *
+ * Since: 0.9.0
+ */
+SoupSession *
+_gdata_service_build_session (void)
+{
+ SoupSession *session;
+ gboolean ssl_strict = TRUE;
+ gchar *user_agent;
+
+ /* Iff LIBGDATA_LAX_SSL_CERTIFICATES=1, relax SSL certificate validation to allow using invalid/unsigned certificates for testing. */
+ if (g_strcmp0 (g_getenv ("LIBGDATA_LAX_SSL_CERTIFICATES"), "1") == 0) {
+ ssl_strict = FALSE;
+ }
+
+ session = soup_session_new_with_options ("ssl-strict", ssl_strict,
+ "timeout", 0,
+ NULL);
+
+ user_agent = build_user_agent (soup_session_has_feature (session, SOUP_TYPE_CONTENT_DECODER));
+ g_object_set (session, "user-agent", user_agent, NULL);
+ g_free (user_agent);
+
+ soup_session_add_feature_by_type (session, SOUP_TYPE_PROXY_RESOLVER_DEFAULT);
+
+ /* Log all libsoup traffic if debugging's turned on */
+ if (_gdata_service_get_log_level () > GDATA_LOG_MESSAGES) {
+ SoupLoggerLogLevel level;
+ SoupLogger *logger;
+
+ switch (_gdata_service_get_log_level ()) {
+ case GDATA_LOG_FULL_UNREDACTED:
+ case GDATA_LOG_FULL:
+ level = SOUP_LOGGER_LOG_BODY;
+ break;
+ case GDATA_LOG_HEADERS:
+ level = SOUP_LOGGER_LOG_HEADERS;
+ break;
+ case GDATA_LOG_MESSAGES:
+ case GDATA_LOG_NONE:
+ default:
+ g_assert_not_reached ();
+ }
+
+ logger = soup_logger_new (level, -1);
+ soup_logger_set_printer (logger, (SoupLoggerPrinter) soup_log_printer, NULL, NULL);
+
+ soup_session_add_feature (session, SOUP_SESSION_FEATURE (logger));
+
+ g_object_unref (logger);
+ }
+
+ return session;
+}
+
+/**
+ * gdata_service_get_locale:
+ * @self: a #GDataService
+ *
+ * Returns the locale currently being used for network requests, or %NULL if the locale is the default.
+ *
+ * Return value: the current locale
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_service_get_locale (GDataService *self)
+{
+ g_return_val_if_fail (GDATA_IS_SERVICE (self), NULL);
+ return self->priv->locale;
+}
+
+/**
+ * gdata_service_set_locale:
+ * @self: a #GDataService
+ * @locale: (allow-none): the new locale in Unix locale format, or %NULL for the default locale
+ *
+ * Set the locale used for network requests to @locale, given in standard Unix locale format. See #GDataService:locale for more details.
+ *
+ * Note that while it's possible to change the locale after sending network requests, it is unsupported, as the server-side software may behave
+ * unexpectedly. The only supported use of this function is after creation of a service, but before any network requests are made.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_service_set_locale (GDataService *self, const gchar *locale)
+{
+ g_return_if_fail (GDATA_IS_SERVICE (self));
+
+ g_free (self->priv->locale);
+ self->priv->locale = g_strdup (locale);
+ g_object_notify (G_OBJECT (self), "locale");
+}
+
+/*
+ * _gdata_service_secure_strdup:
+ * @str: string (which may be in pageable memory) to be duplicated, or %NULL
+ *
+ * Duplicate a string into non-pageable memory (if libgdata has been compiled with HAVE_GNOME) or just fall back to g_strdup() (if libgdata hasn't).
+ * Passing %NULL to this function will cause %NULL to be returned.
+ *
+ * Strings allocated using this function must be freed using _gdata_service_secure_strfree().
+ *
+ * Return value: non-pageable copy of @str, or %NULL
+ * Since: 0.11.0
+ */
+GDataSecureString
+_gdata_service_secure_strdup (const gchar *str)
+{
+#ifdef HAVE_GNOME
+ return gcr_secure_memory_strdup (str);
+#else /* if !HAVE_GNOME */
+ return g_strdup (str);
+#endif /* !HAVE_GNOME */
+}
+
+/*
+ * _gdata_service_secure_strndup:
+ * @str: string (which may be in pageable memory) to be duplicated, or %NULL
+ * @n_bytes: maximum number of bytes to copy from @str
+ *
+ * Duplicate at most @n_bytes bytes from @str into non-pageable memory. See _gdata_service_secure_strdup() for more information; this function is just
+ * a version of that with the same semantics as strndup().
+ *
+ * Return value: non-pageable copy of at most the first @n_bytes bytes of @str, or %NULL
+ * Since: 0.11.0
+ */
+GDataSecureString
+_gdata_service_secure_strndup (const gchar *str, gsize n_bytes)
+{
+#ifdef HAVE_GNOME
+ gsize str_len;
+ GDataSecureString duped_str;
+
+ if (str == NULL) {
+ return NULL;
+ }
+
+ str_len = MIN (strlen (str), n_bytes);
+ duped_str = (GDataSecureString) gcr_secure_memory_alloc (str_len + 1);
+ strncpy (duped_str, str, str_len);
+ *(duped_str + str_len) = '\0';
+
+ return duped_str;
+#else /* if !HAVE_GNOME */
+ return g_strndup (str, n_bytes);
+#endif /* !HAVE_GNOME */
+}
+
+/*
+ * _gdata_service_secure_strfree:
+ * @str: a string to free, or %NULL
+ *
+ * Free a string which was allocated securely using _gdata_service_secure_strdup().
+ * Passing %NULL to this function is safe.
+ *
+ * Since: 0.11.0
+ */
+void
+_gdata_service_secure_strfree (GDataSecureString str)
+{
+#ifdef HAVE_GNOME
+ gcr_secure_memory_free (str);
+#else /* if !HAVE_GNOME */
+ /* Poor man's approximation to non-pageable memory: the best we can do is ensure that we don't leak it in free memory.
+ * This can't guarantee that it hasn't hit disk at some point, but does mean it can't hit disk in future. */
+ if (str != NULL) {
+ memset (str, 0, strlen (str));
+ }
+
+ g_free (str);
+#endif /* !HAVE_GNOME */
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2008, 2009, 2010, 2014 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_SERVICE_H
+#define GDATA_SERVICE_H
+
+#include <glib.h>
+#include <glib-object.h>
+#include <libsoup/soup.h>
+
+#include <gdata/gdata-authorizer.h>
+#include <gdata/gdata-feed.h>
+#include <gdata/gdata-query.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDataOperationType:
+ * @GDATA_OPERATION_QUERY: a query
+ * @GDATA_OPERATION_INSERTION: an insertion of a #GDataEntry
+ * @GDATA_OPERATION_UPDATE: an update of a #GDataEntry
+ * @GDATA_OPERATION_DELETION: a deletion of a #GDataEntry
+ * @GDATA_OPERATION_DOWNLOAD: a download of a file
+ * @GDATA_OPERATION_UPLOAD: an upload of a file
+ * @GDATA_OPERATION_AUTHENTICATION: authentication with the service
+ * @GDATA_OPERATION_BATCH: a batch operation with #GDataBatchOperation
+ *
+ * Representations of the different operations performed by the library.
+ *
+ * Since: 0.6.0
+ */
+typedef enum {
+ GDATA_OPERATION_QUERY = 1,
+ GDATA_OPERATION_INSERTION,
+ GDATA_OPERATION_UPDATE,
+ GDATA_OPERATION_DELETION,
+ GDATA_OPERATION_DOWNLOAD,
+ GDATA_OPERATION_UPLOAD,
+ GDATA_OPERATION_AUTHENTICATION,
+ GDATA_OPERATION_BATCH
+} GDataOperationType;
+
+/**
+ * GDataServiceError:
+ * @GDATA_SERVICE_ERROR_UNAVAILABLE: The service is unavailable due to maintenance or other reasons (e.g. network errors at the server end)
+ * @GDATA_SERVICE_ERROR_PROTOCOL_ERROR: The client or server unexpectedly strayed from the protocol (fatal error)
+ * @GDATA_SERVICE_ERROR_ENTRY_ALREADY_INSERTED: An entry has already been inserted, and cannot be re-inserted
+ * @GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED: The user attempted to do something which required authentication, and they weren't authenticated or
+ * didn't have authorization for the operation
+ * @GDATA_SERVICE_ERROR_NOT_FOUND: A requested resource (feed or entry) was not found on the server
+ * @GDATA_SERVICE_ERROR_CONFLICT: There was a conflict when updating an entry on the server; the server-side copy was modified between downloading
+ * and uploading the modified entry
+ * @GDATA_SERVICE_ERROR_FORBIDDEN: Generic error for a forbidden action (not due to having insufficient permissions)
+ * @GDATA_SERVICE_ERROR_BAD_QUERY_PARAMETER: A given query parameter was invalid for the query type
+ * @GDATA_SERVICE_ERROR_NETWORK_ERROR: The service is unavailable due to local network errors (e.g. no Internet connection)
+ * @GDATA_SERVICE_ERROR_PROXY_ERROR: The service is unavailable due to proxy network errors (e.g. proxy unreachable)
+ * @GDATA_SERVICE_ERROR_WITH_BATCH_OPERATION: Generic error when running a batch operation and the whole operation fails
+ * @GDATA_SERVICE_ERROR_API_QUOTA_EXCEEDED: The API request quota for this
+ * developer account has been exceeded for the current time period (e.g. day).
+ * Try again later. (Since: 0.16.0.)
+ *
+ * Error codes for #GDataService operations.
+ */
+typedef enum {
+ GDATA_SERVICE_ERROR_UNAVAILABLE = 1,
+ GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ GDATA_SERVICE_ERROR_ENTRY_ALREADY_INSERTED,
+ GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED,
+ GDATA_SERVICE_ERROR_NOT_FOUND,
+ GDATA_SERVICE_ERROR_CONFLICT,
+ GDATA_SERVICE_ERROR_FORBIDDEN,
+ GDATA_SERVICE_ERROR_BAD_QUERY_PARAMETER,
+ GDATA_SERVICE_ERROR_NETWORK_ERROR,
+ GDATA_SERVICE_ERROR_PROXY_ERROR,
+ GDATA_SERVICE_ERROR_WITH_BATCH_OPERATION,
+ GDATA_SERVICE_ERROR_API_QUOTA_EXCEEDED,
+} GDataServiceError;
+
+/**
+ * GDataQueryProgressCallback:
+ * @entry: a new #GDataEntry
+ * @entry_key: the key of the entry (zero-based index of its position in the feed)
+ * @entry_count: the total number of entries in the feed
+ * @user_data: user data passed to the callback
+ *
+ * Callback function called for each #GDataEntry parsed in a #GDataFeed when loading the results of a query.
+ *
+ * It is called in the main thread, so there is no guarantee on the order in which the callbacks are executed,
+ * or whether they will be called in a timely manner. It is, however, guaranteed that they will all be called before
+ * the #GAsyncReadyCallback which signals the completion of the query is called.
+ */
+typedef void (*GDataQueryProgressCallback) (GDataEntry *entry, guint entry_key, guint entry_count, gpointer user_data);
+
+#define GDATA_TYPE_SERVICE (gdata_service_get_type ())
+#define GDATA_SERVICE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_SERVICE, GDataService))
+#define GDATA_SERVICE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_SERVICE, GDataServiceClass))
+#define GDATA_IS_SERVICE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_SERVICE))
+#define GDATA_IS_SERVICE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_SERVICE))
+#define GDATA_SERVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_SERVICE, GDataServiceClass))
+
+#define GDATA_SERVICE_ERROR gdata_service_error_quark ()
+
+typedef struct _GDataServicePrivate GDataServicePrivate;
+
+/**
+ * GDataService:
+ *
+ * All the fields in the #GDataService structure are private and should never be accessed directly.
+ */
+typedef struct {
+ GObject parent;
+ GDataServicePrivate *priv;
+} GDataService;
+
+/**
+ * GDataServiceClass:
+ * @parent: the parent class
+ * @api_version: the version of the GData API used by the service (typically <code class="literal">2</code>)
+ * @feed_type: the #GType of the feed class (subclass of #GDataFeed) to use for query results from this service
+ * @append_query_headers: a function to allow subclasses to append their own headers to queries before they are submitted to the online service,
+ * using the given authorization domain; new in version 0.9.0
+ * @parse_error_response: a function to parse error responses to queries from the online service. It should set the error
+ * from the status, reason phrase and response body it is passed.
+ * @get_authorization_domains: a function to return a newly-allocated list of all the #GDataAuthorizationDomains the service makes use of;
+ * while the list should be newly-allocated, the individual domains should not be; not implementing this function is equivalent to returning an
+ * empty list; new in version 0.9.0
+ * @parse_feed: a function to parse feed responses to queries from the online
+ * service; new in version 0.17.0
+ *
+ * The class structure for the #GDataService type.
+ *
+ * Since: 0.9.0
+ */
+typedef struct {
+ GObjectClass parent;
+
+ const gchar *api_version;
+ GType feed_type;
+
+ void (*append_query_headers) (GDataService *self, GDataAuthorizationDomain *domain, SoupMessage *message);
+ void (*parse_error_response) (GDataService *self, GDataOperationType operation_type, guint status, const gchar *reason_phrase,
+ const gchar *response_body, gint length, GError **error);
+ GList *(*get_authorization_domains) (void);
+ GDataFeed *(*parse_feed) (GDataService *self,
+ GDataAuthorizationDomain *domain,
+ GDataQuery *query,
+ GType entry_type,
+ SoupMessage *message,
+ GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback,
+ gpointer progress_user_data,
+ GError **error);
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved1) (void);
+ void (*_g_reserved2) (void);
+ void (*_g_reserved3) (void);
+ void (*_g_reserved4) (void);
+ void (*_g_reserved5) (void);
+ void (*_g_reserved6) (void);
+ void (*_g_reserved7) (void);
+} GDataServiceClass;
+
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataService, g_object_unref)
+
+GType gdata_service_get_type (void) G_GNUC_CONST;
+GQuark gdata_service_error_quark (void) G_GNUC_CONST;
+
+GList *gdata_service_get_authorization_domains (GType service_type) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+gboolean gdata_service_is_authorized (GDataService *self);
+
+GDataAuthorizer *gdata_service_get_authorizer (GDataService *self) G_GNUC_PURE;
+void gdata_service_set_authorizer (GDataService *self, GDataAuthorizer *authorizer);
+
+#include <gdata/gdata-query.h>
+
+GDataFeed *gdata_service_query (GDataService *self, GDataAuthorizationDomain *domain, const gchar *feed_uri, GDataQuery *query, GType entry_type,
+ GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_service_query_async (GDataService *self, GDataAuthorizationDomain *domain, const gchar *feed_uri, GDataQuery *query, GType entry_type,
+ GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GDestroyNotify destroy_progress_user_data,
+ GAsyncReadyCallback callback, gpointer user_data);
+GDataFeed *gdata_service_query_finish (GDataService *self, GAsyncResult *async_result, GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+GDataEntry *gdata_service_query_single_entry (GDataService *self, GDataAuthorizationDomain *domain, const gchar *entry_id, GDataQuery *query,
+ GType entry_type, GCancellable *cancellable, GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_service_query_single_entry_async (GDataService *self, GDataAuthorizationDomain *domain, const gchar *entry_id, GDataQuery *query,
+ GType entry_type, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
+GDataEntry *gdata_service_query_single_entry_finish (GDataService *self, GAsyncResult *async_result,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+GDataEntry *gdata_service_insert_entry (GDataService *self, GDataAuthorizationDomain *domain, const gchar *upload_uri, GDataEntry *entry,
+ GCancellable *cancellable, GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_service_insert_entry_async (GDataService *self, GDataAuthorizationDomain *domain, const gchar *upload_uri, GDataEntry *entry,
+ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
+GDataEntry *gdata_service_insert_entry_finish (GDataService *self, GAsyncResult *async_result,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+GDataEntry *gdata_service_update_entry (GDataService *self, GDataAuthorizationDomain *domain, GDataEntry *entry,
+ GCancellable *cancellable, GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_service_update_entry_async (GDataService *self, GDataAuthorizationDomain *domain, GDataEntry *entry, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data);
+GDataEntry *gdata_service_update_entry_finish (GDataService *self, GAsyncResult *async_result,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+gboolean gdata_service_delete_entry (GDataService *self, GDataAuthorizationDomain *domain, GDataEntry *entry,
+ GCancellable *cancellable, GError **error);
+void gdata_service_delete_entry_async (GDataService *self, GDataAuthorizationDomain *domain, GDataEntry *entry, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data);
+gboolean gdata_service_delete_entry_finish (GDataService *self, GAsyncResult *async_result, GError **error);
+
+#ifndef LIBGDATA_DISABLE_DEPRECATED
+SoupURI *gdata_service_get_proxy_uri (GDataService *self) G_GNUC_PURE G_GNUC_DEPRECATED_FOR (gdata_service_get_proxy_resolver);
+void gdata_service_set_proxy_uri (GDataService *self, SoupURI *proxy_uri) G_GNUC_DEPRECATED_FOR (gdata_service_set_proxy_resolver);
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
+
+GProxyResolver *gdata_service_get_proxy_resolver (GDataService *self) G_GNUC_PURE;
+void gdata_service_set_proxy_resolver (GDataService *self, GProxyResolver *proxy_resolver);
+
+guint gdata_service_get_timeout (GDataService *self) G_GNUC_PURE;
+void gdata_service_set_timeout (GDataService *self, guint timeout);
+
+const gchar *gdata_service_get_locale (GDataService *self) G_GNUC_PURE;
+void gdata_service_set_locale (GDataService *self, const gchar *locale);
+
+G_END_DECLS
+
+#endif /* !GDATA_SERVICE_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2008-2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-types
+ * @short_description: miscellaneous data types
+ * @stability: Stable
+ * @include: gdata/gdata-types.h
+ *
+ * The structures here are used haphazardly across the library, describing
+ * various small data types.
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <string.h>
+#include <stdlib.h>
+#include <libsoup/soup.h>
+
+#include "gdata-types.h"
+
+static gpointer
+gdata_color_copy (gpointer color)
+{
+ return g_memdup (color, sizeof (GDataColor));
+}
+
+GType
+gdata_color_get_type (void)
+{
+ static GType type_id = 0;
+
+ if (type_id == 0) {
+ type_id = g_boxed_type_register_static (g_intern_static_string ("GDataColor"),
+ (GBoxedCopyFunc) gdata_color_copy,
+ (GBoxedFreeFunc) g_free);
+ }
+
+ return type_id;
+}
+
+/**
+ * gdata_color_from_hexadecimal:
+ * @hexadecimal: a hexadecimal color string
+ * @color: (out caller-allocates): a #GDataColor
+ *
+ * Parses @hexadecimal and returns a #GDataColor describing it in @color.
+ *
+ * @hexadecimal should be in the form <literal>#<replaceable>rr</replaceable><replaceable>gg</replaceable><replaceable>bb</replaceable></literal>,
+ * where <replaceable>rr</replaceable> is a two-digit hexadecimal red intensity value, <replaceable>gg</replaceable> is green
+ * and <replaceable>bb</replaceable> is blue. The hash is optional.
+ *
+ * Return value: %TRUE on success, %FALSE otherwise
+ */
+gboolean
+gdata_color_from_hexadecimal (const gchar *hexadecimal, GDataColor *color)
+{
+ gint temp;
+
+ g_return_val_if_fail (hexadecimal != NULL, FALSE);
+ g_return_val_if_fail (color != NULL, FALSE);
+
+ if (*hexadecimal == '#')
+ hexadecimal++;
+ if (strlen (hexadecimal) != 6)
+ return FALSE;
+
+ /* Red */
+ temp = g_ascii_xdigit_value (*(hexadecimal++)) * 16;
+ if (temp < 0)
+ return FALSE;
+ color->red = temp;
+ temp = g_ascii_xdigit_value (*(hexadecimal++));
+ if (temp < 0)
+ return FALSE;
+ color->red += temp;
+
+ /* Green */
+ temp = g_ascii_xdigit_value (*(hexadecimal++)) * 16;
+ if (temp < 0)
+ return FALSE;
+ color->green = temp;
+ temp = g_ascii_xdigit_value (*(hexadecimal++));
+ if (temp < 0)
+ return FALSE;
+ color->green += temp;
+
+ /* Blue */
+ temp = g_ascii_xdigit_value (*(hexadecimal++)) * 16;
+ if (temp < 0)
+ return FALSE;
+ color->blue = temp;
+ temp = g_ascii_xdigit_value (*(hexadecimal++));
+ if (temp < 0)
+ return FALSE;
+ color->blue += temp;
+
+ return TRUE;
+}
+
+/**
+ * gdata_color_to_hexadecimal:
+ * @color: a #GDataColor
+ *
+ * Returns a string describing @color in hexadecimal form; in the form <literal>#<replaceable>rr</replaceable><replaceable>gg</replaceable>
+ * <replaceable>bb</replaceable></literal>, where <replaceable>rr</replaceable> is a two-digit hexadecimal red intensity value,
+ * <replaceable>gg</replaceable> is green and <replaceable>bb</replaceable> is blue. The hash is always present.
+ *
+ * Return value: the color string; free with g_free()
+ *
+ * Since: 0.3.0
+ */
+gchar *
+gdata_color_to_hexadecimal (const GDataColor *color)
+{
+ g_return_val_if_fail (color != NULL, NULL);
+ return g_strdup_printf ("#%02x%02x%02x", color->red, color->green, color->blue);
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2008-2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib.h>
+
+#ifndef GDATA_TYPES_H
+#define GDATA_TYPES_H
+
+G_BEGIN_DECLS
+
+/**
+ * GDataColor:
+ * @red: red color intensity, from 0–255
+ * @green: green color intensity, from 0–255
+ * @blue: blue color intensity, from 0–255
+ *
+ * Describes a color, such as used in the Google Calendar interface to
+ * differentiate calendars.
+ */
+typedef struct {
+ /*< public >*/
+ guint16 red;
+ guint16 green;
+ guint16 blue;
+} GDataColor;
+
+#define GDATA_TYPE_COLOR (gdata_color_get_type ())
+GType gdata_color_get_type (void) G_GNUC_CONST;
+gboolean gdata_color_from_hexadecimal (const gchar *hexadecimal, GDataColor *color);
+gchar *gdata_color_to_hexadecimal (const GDataColor *color) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+G_END_DECLS
+
+#endif /* !GDATA_TYPES_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-upload-stream
+ * @short_description: GData upload stream object
+ * @stability: Stable
+ * @include: gdata/gdata-upload-stream.h
+ *
+ * #GDataUploadStream is a #GOutputStream subclass to allow uploading of files from GData services with authorization from a #GDataService under
+ * the given #GDataAuthorizationDomain. If authorization is not required to perform the upload, a #GDataAuthorizationDomain doesn't have to be
+ * specified.
+ *
+ * Once a #GDataUploadStream is instantiated with gdata_upload_stream_new(), the standard #GOutputStream API can be used on the stream to upload
+ * the file. Network communication may not actually begin until the first call to g_output_stream_write(), so having a #GDataUploadStream around is no
+ * guarantee that data is being uploaded.
+ *
+ * Uploads of a file, or a file with associated metadata (a #GDataEntry) should use #GDataUploadStream, but if you want to simply upload a single
+ * #GDataEntry, use gdata_service_insert_entry() instead. #GDataUploadStream is for large streaming uploads.
+ *
+ * Once an upload is complete, the server's response can be retrieved from the #GDataUploadStream using gdata_upload_stream_get_response(). In order
+ * for network communication to be guaranteed to have stopped (and thus the response definitely available), g_output_stream_close() must be called
+ * on the #GDataUploadStream first. Otherwise, gdata_upload_stream_get_response() may return saying that the operation is still in progress.
+ *
+ * If the server returns an error instead of a success response, the error will be returned by g_output_stream_close() as a #GDataServiceError.
+ *
+ * The entire upload operation can be cancelled using the #GCancellable instance provided to gdata_upload_stream_new(), or returned by
+ * gdata_upload_stream_get_cancellable(). Cancelling this at any time will cause all future #GOutputStream method calls to return
+ * %G_IO_ERROR_CANCELLED. If any #GOutputStream methods are in the process of being called, they will be cancelled and return %G_IO_ERROR_CANCELLED as
+ * soon as possible.
+ *
+ * Note that cancelling an individual method call (such as a call to g_output_stream_write()) using the #GCancellable parameter of the method will not
+ * cancel the upload as a whole — just that particular method call. In the case of g_output_stream_write(), this will cause it to return the number of
+ * bytes it has successfully written up to the point of cancellation (up to the requested number of bytes), or return a %G_IO_ERROR_CANCELLED if it
+ * had not managed to write any bytes to the network by that point. This is also the behaviour of g_output_stream_write() when the upload operation as
+ * a whole is cancelled.
+ *
+ * In the case of g_output_stream_close(), the call will return immediately if network activity hasn't yet started. If it has, the network activity
+ * will be cancelled, regardless of whether the call to g_output_stream_close() is cancelled. Cancelling a pending call to g_output_stream_close()
+ * (either using the method's #GCancellable, or by cancelling the upload stream as a whole) will cause it to stop waiting for the network activity to
+ * finish, and return %G_IO_ERROR_CANCELLED immediately. Network activity will continue to be shut down in the background.
+ *
+ * Any outstanding data is guaranteed to be written to the network successfully even if a call to g_output_stream_close() is cancelled. However, if
+ * the upload stream as a whole is cancelled using #GDataUploadStream:cancellable, no more data will be sent over the network, and the network
+ * connection will be closed immediately. i.e. #GDataUploadStream will do its best to instruct the server to cancel the upload and any associated
+ * server-side changes of state.
+ *
+ * If the server returns an error message (for example, if the user is not correctly authenticated/authorized or doesn't have suitable permissions
+ * to upload from the given URI), it will be returned as a #GDataServiceError by g_output_stream_close().
+ *
+ * <example>
+ * <title>Uploading from a File</title>
+ * <programlisting>
+ * GDataService *service;
+ * GDataAuthorizationDomain *domain;
+ * GCancellable *cancellable;
+ * GInputStream *input_stream;
+ * GOutputStream *upload_stream;
+ * GFile *file;
+ * GFileInfo *file_info;
+ * GError *error = NULL;
+ *
+ * /<!-- -->* Get the file to upload *<!-- -->/
+ * file = get_file_to_upload ();
+ * file_info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME "," G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE ","
+ * G_FILE_ATTRIBUTE_STANDARD_SIZE,
+ * G_FILE_QUERY_INFO_NONE, NULL, &error);
+ *
+ * if (file_info == NULL) {
+ * g_error ("Error getting file info: %s", error->message);
+ * g_error_free (error);
+ * g_object_unref (file);
+ * return;
+ * }
+ *
+ * input_stream = g_file_read (file, NULL, &error);
+ * g_object_unref (file);
+ *
+ * if (input_stream == NULL) {
+ * g_error ("Error getting file input stream: %s", error->message);
+ * g_error_free (error);
+ * g_object_unref (file_info);
+ * return;
+ * }
+ *
+ * /<!-- -->* Create the upload stream *<!-- -->/
+ * service = create_my_service ();
+ * domain = get_my_authorization_domain_from_service (service);
+ * cancellable = g_cancellable_new (); /<!-- -->* cancel this to cancel the entire upload operation *<!-- -->/
+ * upload_stream = gdata_upload_stream_new_resumable (service, domain, SOUP_METHOD_POST, upload_uri, NULL,
+ * g_file_info_get_display_name (file_info), g_file_info_get_content_type (file_info),
+ * g_file_info_get_size (file_info), cancellable);
+ * g_object_unref (file_info);
+ *
+ * /<!-- -->* Perform the upload asynchronously *<!-- -->/
+ * g_output_stream_splice_async (upload_stream, input_stream, G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET,
+ * G_PRIORITY_DEFAULT, NULL, (GAsyncReadyCallback) upload_splice_cb, NULL);
+ *
+ * g_object_unref (upload_stream);
+ * g_object_unref (input_stream);
+ * g_object_unref (cancellable);
+ * g_object_unref (domain);
+ * g_object_unref (service);
+ *
+ * static void
+ * upload_splice_cb (GOutputStream *upload_stream, GAsyncResult *result, gpointer user_data)
+ * {
+ * gssize length;
+ * GError *error = NULL;
+ *
+ * g_output_stream_splice_finish (upload_stream, result, &error);
+ *
+ * if (error != NULL && g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED) == FALSE)) {
+ * /<!-- -->* Error upload the file; potentially an I/O error (GIOError), or an error response from the server
+ * * (GDataServiceError). *<!-- -->/
+ * g_error ("Error uploading file: %s", error->message);
+ * g_error_free (error);
+ * }
+ *
+ * /<!-- -->* If the upload was successful, carry on to parse the result. Note that this will normally be handled by methods like
+ * * gdata_youtube_service_finish_video_upload(), gdata_picasaweb_service_finish_file_upload() and
+ * * gdata_documents_service_finish_upload() *<!-- -->/
+ * parse_server_result (gdata_upload_stream_get_response (GDATA_UPLOAD_STREAM (upload_stream), &length), length);
+ * }
+ * </programlisting>
+ * </example>
+ *
+ * Since: 0.5.0
+ */
+
+/*
+ * We have a network thread which does all the uploading work. We send the message encoded as chunks, but cannot use the SoupMessageBody as a
+ * data buffer, since it can only ever be touched by the network thread. Instead, we pass data to the network thread through a GDataBuffer, with
+ * the main thread pushing it on as and when write() is called. The network thread cannot block on popping data off the buffer, as it requests fixed-
+ * size chunks, and there's no way to notify it that we've reached EOF; so when it gets to popping the last chunk off the buffer, which may well be
+ * smaller than its chunk size, it would block for more data and therefore hang. Consequently, the network thread instead pops as much data as it can
+ * off the buffer, up to its chunk size, which is a non-blocking operation.
+ *
+ * The write() and close() operations on the output stream are synchronised with the network thread, so that the write() call only returns once the
+ * network thread has written at least as many bytes as were passed to the write() call, and the close() call only returns once all network activity
+ * has finished (including receiving the response from the server). Async versions of these calls are provided by GOutputStream.
+ *
+ * The number of bytes in the various buffers are recorded using:
+ * • message_bytes_outstanding: the number of bytes in the GDataBuffer which are waiting to be written to the SoupMessageBody
+ * • network_bytes_outstanding: the number of bytes which have been written to the SoupMessageBody, and are waiting to be written to the network
+ * • network_bytes_written: the total number of bytes which have been successfully written to the network
+ *
+ * Mutex locking order:
+ * 1. response_mutex
+ * 2. write_mutex
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+
+#include "gdata-upload-stream.h"
+#include "gdata-buffer.h"
+#include "gdata-private.h"
+
+#define BOUNDARY_STRING "0003Z5W789deadbeefRTE456KlemsnoZV"
+#define MAX_RESUMABLE_CHUNK_SIZE (512 * 1024) /* bytes = 512 KiB */
+
+static void gdata_upload_stream_constructed (GObject *object);
+static void gdata_upload_stream_dispose (GObject *object);
+static void gdata_upload_stream_finalize (GObject *object);
+static void gdata_upload_stream_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_upload_stream_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+
+static gssize gdata_upload_stream_write (GOutputStream *stream, const void *buffer, gsize count, GCancellable *cancellable, GError **error);
+static gboolean gdata_upload_stream_flush (GOutputStream *stream, GCancellable *cancellable, GError **error);
+static gboolean gdata_upload_stream_close (GOutputStream *stream, GCancellable *cancellable, GError **error);
+
+static void create_network_thread (GDataUploadStream *self, GError **error);
+
+typedef enum {
+ STATE_INITIAL_REQUEST, /* initial POST request to the resumable-create-media link (unused for non-resumable uploads) */
+ STATE_DATA_REQUESTS, /* one or more subsequent PUT requests (only state used for non-resumable uploads) */
+ STATE_FINISHED, /* finished successfully or in error */
+} UploadState;
+
+struct _GDataUploadStreamPrivate {
+ gchar *method;
+ gchar *upload_uri;
+ GDataService *service;
+ GDataAuthorizationDomain *authorization_domain;
+ GDataEntry *entry;
+ gchar *slug;
+ gchar *content_type;
+ goffset content_length; /* -1 for non-resumable uploads; 0 or greater for resumable ones */
+ SoupSession *session;
+ SoupMessage *message;
+ GDataBuffer *buffer;
+
+ GCancellable *cancellable;
+ GThread *network_thread;
+
+ UploadState state; /* protected by write_mutex */
+ GMutex write_mutex; /* mutex for write operations (specifically, write_finished) */
+ /* This persists across all resumable upload chunks. Note that it doesn't count bytes from the entry XML. */
+ gsize total_network_bytes_written; /* the number of bytes which have been written to the network in STATE_DATA_REQUESTS */
+
+ /* All of the following apply only to the current resumable upload chunk. */
+ gsize message_bytes_outstanding; /* the number of bytes which have been written to the buffer but not libsoup (signalled by write_cond) */
+ gsize network_bytes_outstanding; /* the number of bytes which have been written to libsoup but not the network (signalled by write_cond) */
+ gsize network_bytes_written; /* the number of bytes which have been written to the network (signalled by write_cond) */
+ gsize chunk_size; /* the size of the current chunk (in bytes); 0 iff content_length <= 0; must be <= MAX_RESUMABLE_CHUNK_SIZE */
+ GCond write_cond; /* signalled when a chunk has been written (protected by write_mutex) */
+
+ GCond finished_cond; /* signalled when sending the message (and receiving the response) is finished (protected by response_mutex) */
+ guint response_status; /* set once we finish receiving the response (SOUP_STATUS_NONE otherwise) (protected by response_mutex) */
+ GError *response_error; /* error asynchronously set by the network thread, and picked up by the main thread when appropriate */
+ GMutex response_mutex; /* mutex for ->response_error, ->response_status and ->finished_cond */
+};
+
+enum {
+ PROP_SERVICE = 1,
+ PROP_UPLOAD_URI,
+ PROP_ENTRY,
+ PROP_SLUG,
+ PROP_CONTENT_TYPE,
+ PROP_METHOD,
+ PROP_CANCELLABLE,
+ PROP_AUTHORIZATION_DOMAIN,
+ PROP_CONTENT_LENGTH,
+};
+
+G_DEFINE_TYPE (GDataUploadStream, gdata_upload_stream, G_TYPE_OUTPUT_STREAM)
+
+static void
+gdata_upload_stream_class_init (GDataUploadStreamClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GOutputStreamClass *stream_class = G_OUTPUT_STREAM_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataUploadStreamPrivate));
+
+ gobject_class->constructed = gdata_upload_stream_constructed;
+ gobject_class->dispose = gdata_upload_stream_dispose;
+ gobject_class->finalize = gdata_upload_stream_finalize;
+ gobject_class->get_property = gdata_upload_stream_get_property;
+ gobject_class->set_property = gdata_upload_stream_set_property;
+
+ /* We use the default implementations of the async functions, which just run
+ * our implementation of the sync function in a thread. */
+ stream_class->write_fn = gdata_upload_stream_write;
+ stream_class->flush = gdata_upload_stream_flush;
+ stream_class->close_fn = gdata_upload_stream_close;
+
+ /**
+ * GDataUploadStream:service:
+ *
+ * The service which is used to authorize the upload, and to which the upload relates.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SERVICE,
+ g_param_spec_object ("service",
+ "Service", "The service which is used to authorize the upload.",
+ GDATA_TYPE_SERVICE,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataUploadStream:authorization-domain:
+ *
+ * The authorization domain for the upload, against which the #GDataService:authorizer for the #GDataDownloadStream:service should be
+ * authorized. This may be %NULL if authorization is not needed for the upload.
+ *
+ * Since: 0.9.0
+ */
+ g_object_class_install_property (gobject_class, PROP_AUTHORIZATION_DOMAIN,
+ g_param_spec_object ("authorization-domain",
+ "Authorization domain", "The authorization domain for the upload.",
+ GDATA_TYPE_AUTHORIZATION_DOMAIN,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataUploadStream:method:
+ *
+ * The HTTP request method to use when uploading the file.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_METHOD,
+ g_param_spec_string ("method",
+ "Method", "The HTTP request method to use when uploading the file.",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataUploadStream:upload-uri:
+ *
+ * The URI to upload the data and metadata to. This must be HTTPS.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_UPLOAD_URI,
+ g_param_spec_string ("upload-uri",
+ "Upload URI", "The URI to upload the data and metadata to.",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataUploadStream:entry:
+ *
+ * The entry used for metadata to upload.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_ENTRY,
+ g_param_spec_object ("entry",
+ "Entry", "The entry used for metadata to upload.",
+ GDATA_TYPE_ENTRY,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataUploadStream:slug:
+ *
+ * The slug of the file being uploaded. This is usually the display name of the file (i.e. as returned by g_file_info_get_display_name()).
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SLUG,
+ g_param_spec_string ("slug",
+ "Slug", "The slug of the file being uploaded.",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataUploadStream:content-length:
+ *
+ * The content length (in bytes) of the file being uploaded (i.e. as returned by g_file_info_get_size()). Note that this does not include the
+ * length of the XML serialisation of #GDataUploadStream:entry, if set.
+ *
+ * If this is <code class="literal">-1</code> the upload will be non-resumable; if it is non-negative, the upload will be resumable.
+ *
+ * Since: 0.13.0
+ */
+ g_object_class_install_property (gobject_class, PROP_CONTENT_LENGTH,
+ g_param_spec_int64 ("content-length",
+ "Content length", "The content length (in bytes) of the file being uploaded.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataUploadStream:content-type:
+ *
+ * The content type of the file being uploaded (i.e. as returned by g_file_info_get_content_type()).
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_CONTENT_TYPE,
+ g_param_spec_string ("content-type",
+ "Content type", "The content type of the file being uploaded.",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataUploadStream:cancellable:
+ *
+ * An optional cancellable used to cancel the entire upload operation. If a #GCancellable instance isn't provided for this property at
+ * construction time (i.e. to gdata_upload_stream_new()), one will be created internally and can be retrieved using
+ * gdata_upload_stream_get_cancellable() and used to cancel the upload operation with g_cancellable_cancel() just as if it was passed to
+ * gdata_upload_stream_new().
+ *
+ * If the upload operation is cancelled using this #GCancellable, any ongoing network activity will be stopped, and any pending or future calls
+ * to #GOutputStream API on the #GDataUploadStream will return %G_IO_ERROR_CANCELLED. Note that the #GCancellable objects which can be passed
+ * to individual #GOutputStream operations will not cancel the upload operation proper if cancelled — they will merely cancel that API call.
+ * The only way to cancel the upload operation completely is using #GDataUploadStream:cancellable.
+ *
+ * Since: 0.8.0
+ */
+ g_object_class_install_property (gobject_class, PROP_CANCELLABLE,
+ g_param_spec_object ("cancellable",
+ "Cancellable", "An optional cancellable used to cancel the entire upload operation.",
+ G_TYPE_CANCELLABLE,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_upload_stream_init (GDataUploadStream *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_UPLOAD_STREAM, GDataUploadStreamPrivate);
+ self->priv->buffer = gdata_buffer_new ();
+ g_mutex_init (&(self->priv->write_mutex));
+ g_cond_init (&(self->priv->write_cond));
+ g_cond_init (&(self->priv->finished_cond));
+ g_mutex_init (&(self->priv->response_mutex));
+}
+
+static SoupMessage *
+build_message (GDataUploadStream *self, const gchar *method, const gchar *upload_uri)
+{
+ SoupMessage *new_message;
+ SoupURI *_uri;
+
+ /* Build the message */
+ _uri = soup_uri_new (upload_uri);
+ soup_uri_set_port (_uri, _gdata_service_get_https_port ());
+ new_message = soup_message_new_from_uri (method, _uri);
+ soup_uri_free (_uri);
+
+ /* We don't want to accumulate chunks */
+ soup_message_body_set_accumulate (new_message->request_body, FALSE);
+
+ return new_message;
+}
+
+static void
+gdata_upload_stream_constructed (GObject *object)
+{
+ GDataUploadStreamPrivate *priv;
+ GDataServiceClass *service_klass;
+ SoupURI *uri = NULL;
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_upload_stream_parent_class)->constructed (object);
+ priv = GDATA_UPLOAD_STREAM (object)->priv;
+
+ /* The upload URI must be HTTPS. */
+ uri = soup_uri_new (priv->upload_uri);
+ g_assert_cmpstr (soup_uri_get_scheme (uri), ==, SOUP_URI_SCHEME_HTTPS);
+ soup_uri_free (uri);
+
+ /* Create a #GCancellable for the entire upload operation if one wasn't specified for #GDataUploadStream:cancellable during construction */
+ if (priv->cancellable == NULL)
+ priv->cancellable = g_cancellable_new ();
+
+ /* Build the message */
+ priv->message = build_message (GDATA_UPLOAD_STREAM (object), priv->method, priv->upload_uri);
+
+ if (priv->slug != NULL)
+ soup_message_headers_append (priv->message->request_headers, "Slug", priv->slug);
+
+ if (priv->content_length == -1) {
+ /* Non-resumable upload */
+ soup_message_headers_set_encoding (priv->message->request_headers, SOUP_ENCODING_CHUNKED);
+
+ /* The Content-Type should be multipart/related if we're also uploading the metadata (entry != NULL),
+ * and the given content_type otherwise. */
+ if (priv->entry != NULL) {
+ gchar *first_part_header, *upload_data;
+ gchar *second_part_header;
+ GDataParsableClass *parsable_klass;
+
+ parsable_klass = GDATA_PARSABLE_GET_CLASS (priv->entry);
+ g_assert (parsable_klass->get_content_type != NULL);
+
+ soup_message_headers_set_content_type (priv->message->request_headers, "multipart/related; boundary=" BOUNDARY_STRING, NULL);
+
+ if (g_strcmp0 (parsable_klass->get_content_type (), "application/json") == 0) {
+ upload_data = gdata_parsable_get_json (GDATA_PARSABLE (priv->entry));
+ } else {
+ upload_data = gdata_parsable_get_xml (GDATA_PARSABLE (priv->entry));
+ }
+
+ /* Start by writing out the entry; then the thread has something to write to the network when it's created */
+ first_part_header = g_strdup_printf ("--" BOUNDARY_STRING "\n"
+ "Content-Type: %s; charset=UTF-8\n\n",
+ parsable_klass->get_content_type ());
+ second_part_header = g_strdup_printf ("\n--" BOUNDARY_STRING "\n"
+ "Content-Type: %s\n"
+ "Content-Transfer-Encoding: binary\n\n",
+ priv->content_type);
+
+ /* Push the message parts onto the message body; we can skip the buffer, since the network thread hasn't yet been created,
+ * so we're the sole thread accessing the SoupMessage. */
+ soup_message_body_append (priv->message->request_body,
+ SOUP_MEMORY_TAKE,
+ first_part_header,
+ strlen (first_part_header));
+ soup_message_body_append (priv->message->request_body,
+ SOUP_MEMORY_TAKE, upload_data,
+ strlen (upload_data));
+ soup_message_body_append (priv->message->request_body,
+ SOUP_MEMORY_TAKE,
+ second_part_header,
+ strlen (second_part_header));
+
+ first_part_header = NULL;
+ upload_data = NULL;
+ second_part_header = NULL;
+
+ priv->network_bytes_outstanding = priv->message->request_body->length;
+ } else {
+ soup_message_headers_set_content_type (priv->message->request_headers, priv->content_type, NULL);
+ }
+
+ /* Non-resumable uploads start with the data requests immediately. */
+ priv->state = STATE_DATA_REQUESTS;
+ } else {
+ gchar *content_length_str;
+
+ /* Resumable upload's initial request */
+ soup_message_headers_set_encoding (priv->message->request_headers, SOUP_ENCODING_CONTENT_LENGTH);
+ soup_message_headers_replace (priv->message->request_headers, "X-Upload-Content-Type", priv->content_type);
+
+ content_length_str = g_strdup_printf ("%" G_GOFFSET_FORMAT, priv->content_length);
+ soup_message_headers_replace (priv->message->request_headers, "X-Upload-Content-Length", content_length_str);
+ g_free (content_length_str);
+
+ if (priv->entry != NULL) {
+ GDataParsableClass *parsable_klass;
+ gchar *content_type, *upload_data;
+
+ parsable_klass = GDATA_PARSABLE_GET_CLASS (priv->entry);
+ g_assert (parsable_klass->get_content_type != NULL);
+
+ if (g_strcmp0 (parsable_klass->get_content_type (), "application/json") == 0) {
+ upload_data = gdata_parsable_get_json (GDATA_PARSABLE (priv->entry));
+ } else {
+ upload_data = gdata_parsable_get_xml (GDATA_PARSABLE (priv->entry));
+ }
+
+ content_type = g_strdup_printf ("%s; charset=UTF-8",
+ parsable_klass->get_content_type ());
+ soup_message_headers_set_content_type (priv->message->request_headers,
+ content_type,
+ NULL);
+ g_free (content_type);
+
+ soup_message_body_append (priv->message->request_body,
+ SOUP_MEMORY_TAKE,
+ upload_data,
+ strlen (upload_data));
+ upload_data = NULL;
+
+ priv->network_bytes_outstanding = priv->message->request_body->length;
+ } else {
+ soup_message_headers_set_content_length (priv->message->request_headers, 0);
+ }
+
+ /* Resumable uploads always start with an initial request, which either contains the XML or is empty. */
+ priv->state = STATE_INITIAL_REQUEST;
+ priv->chunk_size = MIN (priv->content_length, MAX_RESUMABLE_CHUNK_SIZE);
+ }
+
+ /* Make sure the headers are set. HACK: This should actually be in build_message(), but we have to work around
+ * http://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=3033 in GDataDocumentsService's append_query_headers(). */
+ service_klass = GDATA_SERVICE_GET_CLASS (priv->service);
+ if (service_klass->append_query_headers != NULL) {
+ service_klass->append_query_headers (priv->service, priv->authorization_domain, priv->message);
+ }
+
+ /* If the entry exists and has an ETag, we assume we're updating the entry, so we can set the If-Match header */
+ if (priv->entry != NULL && gdata_entry_get_etag (priv->entry) != NULL)
+ soup_message_headers_append (priv->message->request_headers, "If-Match", gdata_entry_get_etag (priv->entry));
+
+ /* Uploading doesn't actually start until the first call to write() */
+}
+
+static void
+gdata_upload_stream_dispose (GObject *object)
+{
+ GDataUploadStreamPrivate *priv = GDATA_UPLOAD_STREAM (object)->priv;
+
+ /* Close the stream before unreffing things like priv->service, which stops crashes like bgo#602156 if the stream is unreffed in the middle
+ * of network operations */
+ g_output_stream_close (G_OUTPUT_STREAM (object), NULL, NULL);
+
+ if (priv->cancellable != NULL)
+ g_object_unref (priv->cancellable);
+ priv->cancellable = NULL;
+
+ if (priv->service != NULL)
+ g_object_unref (priv->service);
+ priv->service = NULL;
+
+ if (priv->authorization_domain != NULL)
+ g_object_unref (priv->authorization_domain);
+ priv->authorization_domain = NULL;
+
+ if (priv->message != NULL)
+ g_object_unref (priv->message);
+ priv->message = NULL;
+
+ if (priv->entry != NULL)
+ g_object_unref (priv->entry);
+ priv->entry = NULL;
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_upload_stream_parent_class)->dispose (object);
+}
+
+static void
+gdata_upload_stream_finalize (GObject *object)
+{
+ GDataUploadStreamPrivate *priv = GDATA_UPLOAD_STREAM (object)->priv;
+
+ g_mutex_clear (&(priv->response_mutex));
+ g_cond_clear (&(priv->finished_cond));
+ g_cond_clear (&(priv->write_cond));
+ g_mutex_clear (&(priv->write_mutex));
+ gdata_buffer_free (priv->buffer);
+ g_clear_error (&(priv->response_error));
+ g_free (priv->upload_uri);
+ g_free (priv->method);
+ g_free (priv->slug);
+ g_free (priv->content_type);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_upload_stream_parent_class)->finalize (object);
+}
+
+static void
+gdata_upload_stream_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataUploadStreamPrivate *priv = GDATA_UPLOAD_STREAM (object)->priv;
+
+ switch (property_id) {
+ case PROP_SERVICE:
+ g_value_set_object (value, priv->service);
+ break;
+ case PROP_AUTHORIZATION_DOMAIN:
+ g_value_set_object (value, priv->authorization_domain);
+ break;
+ case PROP_METHOD:
+ g_value_set_string (value, priv->method);
+ break;
+ case PROP_UPLOAD_URI:
+ g_value_set_string (value, priv->upload_uri);
+ break;
+ case PROP_ENTRY:
+ g_value_set_object (value, priv->entry);
+ break;
+ case PROP_SLUG:
+ g_value_set_string (value, priv->slug);
+ break;
+ case PROP_CONTENT_TYPE:
+ g_value_set_string (value, priv->content_type);
+ break;
+ case PROP_CONTENT_LENGTH:
+ g_value_set_int64 (value, priv->content_length);
+ break;
+ case PROP_CANCELLABLE:
+ g_value_set_object (value, priv->cancellable);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_upload_stream_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataUploadStreamPrivate *priv = GDATA_UPLOAD_STREAM (object)->priv;
+
+ switch (property_id) {
+ case PROP_SERVICE:
+ priv->service = g_value_dup_object (value);
+ priv->session = _gdata_service_get_session (priv->service);
+ break;
+ case PROP_AUTHORIZATION_DOMAIN:
+ priv->authorization_domain = g_value_dup_object (value);
+ break;
+ case PROP_METHOD:
+ priv->method = g_value_dup_string (value);
+ break;
+ case PROP_UPLOAD_URI:
+ priv->upload_uri = g_value_dup_string (value);
+ break;
+ case PROP_ENTRY:
+ priv->entry = g_value_dup_object (value);
+ break;
+ case PROP_SLUG:
+ priv->slug = g_value_dup_string (value);
+ break;
+ case PROP_CONTENT_TYPE:
+ priv->content_type = g_value_dup_string (value);
+ break;
+ case PROP_CONTENT_LENGTH:
+ priv->content_length = g_value_get_int64 (value);
+ break;
+ case PROP_CANCELLABLE:
+ /* Construction only */
+ priv->cancellable = g_value_dup_object (value);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+typedef struct {
+ GDataUploadStream *upload_stream;
+ gboolean *cancelled;
+} CancelledData;
+
+static void
+write_cancelled_cb (GCancellable *cancellable, CancelledData *data)
+{
+ GDataUploadStreamPrivate *priv = data->upload_stream->priv;
+
+ /* Signal the gdata_upload_stream_write() function that it should stop blocking and cancel */
+ g_mutex_lock (&(priv->write_mutex));
+ *(data->cancelled) = TRUE;
+ g_cond_signal (&(priv->write_cond));
+ g_mutex_unlock (&(priv->write_mutex));
+}
+
+static gssize
+gdata_upload_stream_write (GOutputStream *stream, const void *buffer, gsize count, GCancellable *cancellable, GError **error_out)
+{
+ GDataUploadStreamPrivate *priv = GDATA_UPLOAD_STREAM (stream)->priv;
+ gssize length_written = -1;
+ gulong cancelled_signal = 0, global_cancelled_signal = 0;
+ gboolean cancelled = FALSE; /* must only be touched with ->write_mutex held */
+ gsize old_total_network_bytes_written;
+ CancelledData data;
+ GError *error = NULL;
+
+ /* Listen for cancellation events */
+ data.upload_stream = GDATA_UPLOAD_STREAM (stream);
+ data.cancelled = &cancelled;
+
+ global_cancelled_signal = g_cancellable_connect (priv->cancellable, (GCallback) write_cancelled_cb, &data, NULL);
+
+ if (cancellable != NULL)
+ cancelled_signal = g_cancellable_connect (cancellable, (GCallback) write_cancelled_cb, &data, NULL);
+
+ /* Check for an error and return if necessary */
+ g_mutex_lock (&(priv->write_mutex));
+
+ if (cancelled == TRUE) {
+ g_assert (g_cancellable_set_error_if_cancelled (cancellable, &error) == TRUE ||
+ g_cancellable_set_error_if_cancelled (priv->cancellable, &error) == TRUE);
+ g_mutex_unlock (&(priv->write_mutex));
+
+ length_written = -1;
+ goto done;
+ }
+
+ g_mutex_unlock (&(priv->write_mutex));
+
+ /* Increment the number of bytes outstanding for the new write, and keep a record of the old number written so we know if the write's
+ * finished before we reach write_cond. */
+ old_total_network_bytes_written = priv->total_network_bytes_written;
+ priv->message_bytes_outstanding += count;
+
+ /* Handle the more common case of the network thread already having been created first */
+ if (priv->network_thread != NULL) {
+ /* Push the new data into the buffer */
+ gdata_buffer_push_data (priv->buffer, buffer, count);
+ goto write;
+ }
+
+ /* Write out the first chunk of data, so there's guaranteed to be something in the buffer */
+ gdata_buffer_push_data (priv->buffer, buffer, count);
+
+ /* Create the thread and let the writing commence! */
+ create_network_thread (GDATA_UPLOAD_STREAM (stream), &error);
+ if (priv->network_thread == NULL) {
+ length_written = -1;
+ goto done;
+ }
+
+write:
+ g_mutex_lock (&(priv->write_mutex));
+
+ /* Wait for it to be written */
+ while (priv->total_network_bytes_written - old_total_network_bytes_written < count && cancelled == FALSE && priv->state != STATE_FINISHED) {
+ g_cond_wait (&(priv->write_cond), &(priv->write_mutex));
+ }
+ length_written = MIN (count, priv->total_network_bytes_written - old_total_network_bytes_written);
+
+ /* Check for an error and return if necessary */
+ if (cancelled == TRUE && length_written < 1) {
+ /* Cancellation. */
+ g_assert (g_cancellable_set_error_if_cancelled (cancellable, &error) == TRUE ||
+ g_cancellable_set_error_if_cancelled (priv->cancellable, &error) == TRUE);
+ length_written = -1;
+ } else if (priv->state == STATE_FINISHED && (length_written < 0 || (gsize) length_written < count)) {
+ /* Resumable upload error. */
+ g_set_error (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("Error received from server after uploading a resumable upload chunk."));
+ length_written = -1;
+ }
+
+ g_mutex_unlock (&(priv->write_mutex));
+
+done:
+ /* Disconnect from the cancelled signals. Note that we have to do this with @write_mutex not held, as g_cancellable_disconnect() blocks
+ * until any outstanding cancellation callbacks return, and they will block on @write_mutex. */
+ if (cancelled_signal != 0)
+ g_cancellable_disconnect (cancellable, cancelled_signal);
+ if (global_cancelled_signal != 0)
+ g_cancellable_disconnect (priv->cancellable, global_cancelled_signal);
+
+ g_assert (error != NULL || length_written > 0);
+
+ if (error != NULL) {
+ g_propagate_error (error_out, error);
+ }
+
+ return length_written;
+}
+
+static void
+flush_cancelled_cb (GCancellable *cancellable, CancelledData *data)
+{
+ GDataUploadStreamPrivate *priv = data->upload_stream->priv;
+
+ /* Signal the gdata_upload_stream_flush() function that it should stop blocking and cancel */
+ g_mutex_lock (&(priv->write_mutex));
+ *(data->cancelled) = TRUE;
+ g_cond_signal (&(priv->write_cond));
+ g_mutex_unlock (&(priv->write_mutex));
+}
+
+/* Block until ->network_bytes_outstanding reaches zero. Cancelling the cancellable passed to gdata_upload_stream_flush() breaks out of the wait(),
+ * but doesn't stop the network thread from continuing to write the remaining bytes to the network.
+ * The wrapper function, g_output_stream_flush(), calls g_output_stream_set_pending() before calling this function, and calls
+ * g_output_stream_clear_pending() afterwards, so we don't need to worry about other operations happening concurrently. We also don't need to worry
+ * about being called after the stream has been closed (though the network activity could finish before or during this function). */
+static gboolean
+gdata_upload_stream_flush (GOutputStream *stream, GCancellable *cancellable, GError **error)
+{
+ GDataUploadStreamPrivate *priv = GDATA_UPLOAD_STREAM (stream)->priv;
+ gulong cancelled_signal = 0, global_cancelled_signal = 0;
+ gboolean cancelled = FALSE; /* must only be touched with ->write_mutex held */
+ gboolean success = TRUE;
+ CancelledData data;
+
+ /* Listen for cancellation events */
+ data.upload_stream = GDATA_UPLOAD_STREAM (stream);
+ data.cancelled = &cancelled;
+
+ global_cancelled_signal = g_cancellable_connect (priv->cancellable, (GCallback) flush_cancelled_cb, &data, NULL);
+
+ if (cancellable != NULL)
+ cancelled_signal = g_cancellable_connect (cancellable, (GCallback) flush_cancelled_cb, &data, NULL);
+
+ /* Create the thread if it hasn't been created already. This can happen if flush() is called immediately after creating the stream. */
+ if (priv->network_thread == NULL) {
+ create_network_thread (GDATA_UPLOAD_STREAM (stream), error);
+ if (priv->network_thread == NULL) {
+ success = FALSE;
+ goto done;
+ }
+ }
+
+ /* Start the flush operation proper */
+ g_mutex_lock (&(priv->write_mutex));
+
+ /* Wait for all outstanding bytes to be written to the network */
+ while (priv->network_bytes_outstanding > 0 && cancelled == FALSE && priv->state != STATE_FINISHED) {
+ g_cond_wait (&(priv->write_cond), &(priv->write_mutex));
+ }
+
+ /* Check for an error and return if necessary */
+ if (cancelled == TRUE) {
+ g_assert (g_cancellable_set_error_if_cancelled (cancellable, error) == TRUE ||
+ g_cancellable_set_error_if_cancelled (priv->cancellable, error) == TRUE);
+ success = FALSE;
+ } else if (priv->state == STATE_FINISHED && priv->network_bytes_outstanding > 0) {
+ /* Resumable upload error. */
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, _("Error received from server after uploading a resumable upload chunk."));
+ success = FALSE;
+ }
+
+ g_mutex_unlock (&(priv->write_mutex));
+
+done:
+ /* Disconnect from the cancelled signals. Note that we have to do this without @write_mutex held, as g_cancellable_disconnect() blocks
+ * until any outstanding cancellation callbacks return, and they will block on @write_mutex. */
+ if (cancelled_signal != 0)
+ g_cancellable_disconnect (cancellable, cancelled_signal);
+ if (global_cancelled_signal != 0)
+ g_cancellable_disconnect (priv->cancellable, global_cancelled_signal);
+
+ return success;
+}
+
+static void
+close_cancelled_cb (GCancellable *cancellable, CancelledData *data)
+{
+ GDataUploadStreamPrivate *priv = data->upload_stream->priv;
+
+ /* Signal the gdata_upload_stream_close() function that it should stop blocking and cancel */
+ g_mutex_lock (&(priv->response_mutex));
+ *(data->cancelled) = TRUE;
+ g_cond_signal (&(priv->finished_cond));
+ g_mutex_unlock (&(priv->response_mutex));
+}
+
+/* It's guaranteed that we have set ->response_status and ->response_error and are done with *all* network activity before this returns, unless it's
+ * cancelled. This means that it's safe to call gdata_upload_stream_get_response() once a call to close() has returned without being cancelled.
+ *
+ * Even though calling g_output_stream_close() multiple times on this stream is guaranteed to call gdata_upload_stream_close() at most once, other
+ * GIO methods (notably g_output_stream_splice()) can call gdata_upload_stream_close() directly. Consequently, we need to be careful to be idempotent
+ * after the first call.
+ *
+ * If the network thread hasn't yet been started (i.e. gdata_upload_stream_write() hasn't been called at all yet), %TRUE will be returned immediately.
+ *
+ * If the global cancellable, ->cancellable, or @cancellable are cancelled before the call to gdata_upload_stream_close(), gdata_upload_stream_close()
+ * should return immediately with %G_IO_ERROR_CANCELLED. If they're cancelled during the call, gdata_upload_stream_close() should stop waiting for
+ * any outstanding data to be flushed to the network and return %G_IO_ERROR_CANCELLED (though the operation to finish off network activity and close
+ * the stream will still continue).
+ *
+ * If the call to gdata_upload_stream_close() is not cancelled by any #GCancellable, it will wait until all the data has been flushed to the network
+ * and a response has been received. At this point, ->response_status and ->response_error have been set (and won't ever change) and we can return
+ * either success or an error code. */
+static gboolean
+gdata_upload_stream_close (GOutputStream *stream, GCancellable *cancellable, GError **error)
+{
+ GDataUploadStreamPrivate *priv = GDATA_UPLOAD_STREAM (stream)->priv;
+ gboolean success = TRUE;
+ gboolean cancelled = FALSE; /* must only be touched with ->response_mutex held */
+ gulong cancelled_signal = 0, global_cancelled_signal = 0;
+ CancelledData data;
+ gboolean is_finished;
+ GError *child_error = NULL;
+
+ /* If the operation was never started, return successfully immediately */
+ if (priv->network_thread == NULL)
+ return TRUE;
+
+ /* If we've already closed the stream, return G_IO_ERROR_CLOSED */
+ g_mutex_lock (&(priv->response_mutex));
+
+ if (priv->response_status != SOUP_STATUS_NONE) {
+ g_mutex_unlock (&(priv->response_mutex));
+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_CLOSED, _("Stream is already closed"));
+ return FALSE;
+ }
+
+ g_mutex_unlock (&(priv->response_mutex));
+
+ /* Allow cancellation */
+ data.upload_stream = GDATA_UPLOAD_STREAM (stream);
+ data.cancelled = &cancelled;
+
+ global_cancelled_signal = g_cancellable_connect (priv->cancellable, (GCallback) close_cancelled_cb, &data, NULL);
+
+ if (cancellable != NULL)
+ cancelled_signal = g_cancellable_connect (cancellable, (GCallback) close_cancelled_cb, &data, NULL);
+
+ g_mutex_lock (&(priv->response_mutex));
+
+ g_mutex_lock (&(priv->write_mutex));
+ is_finished = (priv->state == STATE_FINISHED);
+ g_mutex_unlock (&(priv->write_mutex));
+
+ /* If an operation is still in progress, the upload thread hasn't finished yet… */
+ if (!is_finished) {
+ /* We've reached the end of the stream, so append the footer if the entire operation hasn't been cancelled. */
+ if (priv->entry != NULL && g_cancellable_is_cancelled (priv->cancellable) == FALSE) {
+ const gchar *footer = "\n--" BOUNDARY_STRING "--";
+ gsize footer_length = strlen (footer);
+
+ gdata_buffer_push_data (priv->buffer, (const guint8*) footer, footer_length);
+
+ g_mutex_lock (&(priv->write_mutex));
+ priv->message_bytes_outstanding += footer_length;
+ g_mutex_unlock (&(priv->write_mutex));
+ }
+
+ /* Mark the buffer as having reached EOF, and the write operation will close in its own time */
+ gdata_buffer_push_data (priv->buffer, NULL, 0);
+
+ /* Wait for the signal that we've finished. Cancelling the call to gdata_upload_stream_close() will cause this wait to be aborted,
+ * but won't actually prevent the stream being closed (i.e. all it means is that the stream isn't guaranteed to have been closed by
+ * the time gdata_upload_stream_close() returns — whereas normally it would be). */
+ if (cancelled == FALSE) {
+ g_cond_wait (&(priv->finished_cond), &(priv->response_mutex));
+ }
+ }
+
+ g_assert (priv->response_status == SOUP_STATUS_NONE);
+ g_assert (priv->response_error == NULL);
+
+ g_mutex_lock (&(priv->write_mutex));
+ is_finished = (priv->state == STATE_FINISHED);
+ g_mutex_unlock (&(priv->write_mutex));
+
+ /* Error handling */
+ if (!is_finished && cancelled == TRUE) {
+ /* Cancelled? If ->state == STATE_FINISHED, the network activity finished before the gdata_upload_stream_close() operation was
+ * cancelled, so we don't need to return an error. */
+ g_assert (g_cancellable_set_error_if_cancelled (cancellable, &child_error) == TRUE ||
+ g_cancellable_set_error_if_cancelled (priv->cancellable, &child_error) == TRUE);
+ priv->response_status = SOUP_STATUS_CANCELLED;
+ success = FALSE;
+ } else if (SOUP_STATUS_IS_SUCCESSFUL (priv->message->status_code) == FALSE) {
+ GDataServiceClass *klass = GDATA_SERVICE_GET_CLASS (priv->service);
+
+ /* Parse the error */
+ g_assert (klass->parse_error_response != NULL);
+ klass->parse_error_response (priv->service, GDATA_OPERATION_UPLOAD, priv->message->status_code, priv->message->reason_phrase,
+ priv->message->response_body->data, priv->message->response_body->length, &child_error);
+ priv->response_status = priv->message->status_code;
+ success = FALSE;
+ } else {
+ /* Success! Set the response status */
+ priv->response_status = priv->message->status_code;
+ }
+
+ g_assert (priv->response_status != SOUP_STATUS_NONE && (SOUP_STATUS_IS_SUCCESSFUL (priv->response_status) || child_error != NULL));
+
+ g_mutex_unlock (&(priv->response_mutex));
+
+ /* Disconnect from the signal handler. Note that we have to do this with @response_mutex not held, as g_cancellable_disconnect() blocks
+ * until any outstanding cancellation callbacks return, and they will block on @response_mutex. */
+ if (cancelled_signal != 0)
+ g_cancellable_disconnect (cancellable, cancelled_signal);
+ if (global_cancelled_signal != 0)
+ g_cancellable_disconnect (priv->cancellable, global_cancelled_signal);
+
+ g_assert ((success == TRUE && child_error == NULL) || (success == FALSE && child_error != NULL));
+
+ if (child_error != NULL)
+ g_propagate_error (error, child_error);
+
+ return success;
+}
+
+/* In the network thread context, called just after writing the headers, or just after writing a chunk, to write the next chunk to libsoup.
+ * We don't let it return until we've finished pushing all the data into the buffer.
+ * This is due to http://bugzilla.gnome.org/show_bug.cgi?id=522147, which means that
+ * we can't use soup_session_(un)?pause_message() with a SoupSessionSync.
+ * If we don't return from this signal handler, the message is never paused, and thus
+ * Bad Things don't happen (due to the bug, messages can be paused, but not unpaused).
+ * Obviously this means that our memory usage will increase, and we'll eventually end
+ * up storing the entire request body in memory, but that's unavoidable at this point. */
+static void
+write_next_chunk (GDataUploadStream *self, SoupMessage *message)
+{
+ #define CHUNK_SIZE 8192 /* 8KiB */
+
+ GDataUploadStreamPrivate *priv = self->priv;
+ gboolean has_network_bytes_outstanding, is_complete;
+ gsize length;
+ gboolean reached_eof = FALSE;
+ guint8 next_buffer[CHUNK_SIZE];
+
+ g_mutex_lock (&(priv->write_mutex));
+ has_network_bytes_outstanding = (priv->network_bytes_outstanding > 0);
+ is_complete = (priv->state == STATE_INITIAL_REQUEST ||
+ (priv->content_length != -1 && priv->network_bytes_written + priv->network_bytes_outstanding == priv->chunk_size));
+ g_mutex_unlock (&(priv->write_mutex));
+
+ /* If there are still bytes in libsoup's buffer, don't block on getting new bytes into the stream. Also, if we're making the initial request
+ * of a resumable upload, don't push new data onto the network, since all of the XML was pushed into the buffer when we started. */
+ if (has_network_bytes_outstanding) {
+ return;
+ } else if (is_complete) {
+ soup_message_body_complete (priv->message->request_body);
+
+ return;
+ }
+
+ /* Append the next chunk to the message body so it can join in the fun.
+ * Note that this call isn't necessarily blocking, and can return less than the CHUNK_SIZE. This is because
+ * we could deadlock if we block on getting CHUNK_SIZE bytes at the end of the stream. write() could
+ * easily be called with fewer bytes, but has no way to notify us that we've reached the end of the
+ * stream, so we'd happily block on receiving more bytes which weren't forthcoming.
+ *
+ * Note also that we can't block on this call with write_mutex locked, or we could get into a deadlock if the stream is flushed at the same
+ * time (in the case that we don't know the content length ahead of time). */
+ if (priv->content_length == -1) {
+ /* Non-resumable upload. */
+ length = gdata_buffer_pop_data_limited (priv->buffer, next_buffer, CHUNK_SIZE, &reached_eof);
+ } else {
+ /* Resumable upload. Ensure we don't exceed the chunk size. */
+ length = gdata_buffer_pop_data_limited (priv->buffer, next_buffer,
+ MIN (CHUNK_SIZE, priv->chunk_size - (priv->network_bytes_written +
+ priv->network_bytes_outstanding)), &reached_eof);
+ }
+
+ g_mutex_lock (&(priv->write_mutex));
+
+ priv->message_bytes_outstanding -= length;
+ priv->network_bytes_outstanding += length;
+
+ /* Append whatever data was returned */
+ if (length > 0)
+ soup_message_body_append (priv->message->request_body, SOUP_MEMORY_COPY, next_buffer, length);
+
+ /* Finish off the request body if we've reached EOF (i.e. the stream has been closed), or if we're doing a resumable upload and we reach
+ * the maximum chunk size. */
+ if (reached_eof == TRUE ||
+ (priv->content_length != -1 && priv->network_bytes_written + priv->network_bytes_outstanding == priv->chunk_size)) {
+ g_assert (reached_eof == FALSE || priv->message_bytes_outstanding == 0);
+
+ soup_message_body_complete (priv->message->request_body);
+ }
+
+ g_mutex_unlock (&(priv->write_mutex));
+}
+
+static void
+wrote_headers_cb (SoupMessage *message, GDataUploadStream *self)
+{
+ GDataUploadStreamPrivate *priv = self->priv;
+
+ /* Signal the main thread that the headers have been written */
+ g_mutex_lock (&(priv->write_mutex));
+ g_cond_signal (&(priv->write_cond));
+ g_mutex_unlock (&(priv->write_mutex));
+
+ /* Send the first chunk to libsoup */
+ write_next_chunk (self, message);
+}
+
+static void
+wrote_body_data_cb (SoupMessage *message, SoupBuffer *buffer, GDataUploadStream *self)
+{
+ GDataUploadStreamPrivate *priv = self->priv;
+
+ /* Signal the main thread that the chunk has been written */
+ g_mutex_lock (&(priv->write_mutex));
+ g_assert (priv->network_bytes_outstanding > 0);
+ priv->network_bytes_outstanding -= buffer->length;
+ priv->network_bytes_written += buffer->length;
+
+ if (priv->state == STATE_DATA_REQUESTS) {
+ priv->total_network_bytes_written += buffer->length;
+ }
+
+ g_cond_signal (&(priv->write_cond));
+ g_mutex_unlock (&(priv->write_mutex));
+
+ /* Send the next chunk to libsoup */
+ write_next_chunk (self, message);
+}
+
+static gpointer
+upload_thread (GDataUploadStream *self)
+{
+ GDataUploadStreamPrivate *priv = self->priv;
+ GDataAuthorizer *authorizer;
+
+ g_assert (priv->cancellable != NULL);
+
+ /* FIXME: Refresh authorization before sending message in order to prevent authorization errors during transfer.
+ * See: https://gitlab.gnome.org/GNOME/libgdata/issues/23 */
+ authorizer = gdata_service_get_authorizer (priv->service);
+ if (authorizer) {
+ g_autoptr(GError) error = NULL;
+
+ gdata_authorizer_refresh_authorization (authorizer, priv->cancellable, &error);
+ if (error != NULL)
+ g_debug ("Error returned when refreshing authorization: %s", error->message);
+ else
+ gdata_authorizer_process_request (authorizer, priv->authorization_domain, priv->message);
+ }
+
+ while (TRUE) {
+ GDataServiceClass *klass;
+ gulong wrote_headers_signal, wrote_body_data_signal;
+ gchar *new_uri;
+ SoupMessage *new_message;
+ gsize next_chunk_length;
+
+ /* Connect to the wrote-* signals so we can prepare the next chunk for transmission */
+ wrote_headers_signal = g_signal_connect (priv->message, "wrote-headers", (GCallback) wrote_headers_cb, self);
+ wrote_body_data_signal = g_signal_connect (priv->message, "wrote-body-data", (GCallback) wrote_body_data_cb, self);
+
+ _gdata_service_actually_send_message (priv->session, priv->message, priv->cancellable, NULL);
+
+ g_mutex_lock (&(priv->write_mutex));
+
+ /* If this is a resumable upload, continue to the next chunk. If it's a non-resumable upload, we're done. We have several cases:
+ * • Non-resumable upload:
+ * - Content only: STATE_DATA_REQUESTS → STATE_FINISHED
+ * - Metadata only: not supported
+ * - Content and metadata: STATE_DATA_REQUESTS → STATE_FINISHED
+ * • Resumable upload:
+ * - Content only:
+ * * STATE_INITIAL_REQUEST → STATE_DATA_REQUESTS
+ * * STATE_DATA_REQUESTS → STATE_DATA_REQUESTS
+ * * STATE_DATA_REQUESTS → STATE_FINISHED
+ * - Metadata only: STATE_INITIAL_REQUEST → STATE_FINISHED
+ * - Content and metadata:
+ * * STATE_INITIAL_REQUEST → STATE_DATA_REQUESTS
+ * * STATE_DATA_REQUESTS → STATE_DATA_REQUESTS
+ * * STATE_DATA_REQUESTS → STATE_FINISHED
+ */
+ switch (priv->state) {
+ case STATE_INITIAL_REQUEST:
+ /* We're either a content-only or a content-and-metadata resumable upload. */
+ priv->state = STATE_DATA_REQUESTS;
+
+ /* Check the response. On success it should be empty, status 200, with a Location header telling us where to upload
+ * next. If it's an error response, bail out and let the code in gdata_upload_stream_close() parse the error..*/
+ if (!SOUP_STATUS_IS_SUCCESSFUL (priv->message->status_code)) {
+ goto finished;
+ } else if (priv->content_length == 0 && priv->message->status_code == SOUP_STATUS_CREATED) {
+ /* If this was a metadata-only upload, we're done. */
+ goto finished;
+ }
+
+ /* Fall out and prepare the next message */
+ g_assert (priv->total_network_bytes_written == 0); /* haven't written any data yet */
+
+ break;
+ case STATE_DATA_REQUESTS:
+ /* Check the response. On completion it should contain the resulting entry's XML, status 201. On continuation it should
+ * be empty, status 308, with a Range header and potentially a Location header telling us what/where to upload next.
+ * If it's an error response, bail out and let the code in gdata_upload_stream_close() parse the error..*/
+ if (priv->message->status_code == 308) {
+ /* Continuation: fall out and prepare the next message */
+ g_assert (priv->content_length == -1 || priv->total_network_bytes_written < (gsize) priv->content_length);
+ } else if (SOUP_STATUS_IS_SUCCESSFUL (priv->message->status_code)) {
+ /* Completion. Check the server isn't misbehaving. */
+ g_assert (priv->content_length == -1 || priv->total_network_bytes_written == (gsize) priv->content_length);
+
+ goto finished;
+ } else {
+ /* Error */
+ goto finished;
+ }
+
+ /* Fall out and prepare the next message */
+ g_assert (priv->total_network_bytes_written > 0);
+
+ break;
+ case STATE_FINISHED:
+ default:
+ g_assert_not_reached ();
+ }
+
+ /* Prepare the next message. */
+ g_assert (priv->content_length != -1);
+
+ next_chunk_length = MIN (priv->content_length - priv->total_network_bytes_written, MAX_RESUMABLE_CHUNK_SIZE);
+
+ new_uri = g_strdup (soup_message_headers_get_one (priv->message->response_headers, "Location"));
+ if (new_uri == NULL) {
+ new_uri = soup_uri_to_string (soup_message_get_uri (priv->message), FALSE);
+ }
+
+ new_message = build_message (self, SOUP_METHOD_PUT, new_uri);
+
+ g_free (new_uri);
+
+ soup_message_headers_set_encoding (new_message->request_headers, SOUP_ENCODING_CONTENT_LENGTH);
+ soup_message_headers_set_content_type (new_message->request_headers, priv->content_type, NULL);
+ soup_message_headers_set_content_length (new_message->request_headers, next_chunk_length);
+ soup_message_headers_set_content_range (new_message->request_headers, priv->total_network_bytes_written,
+ priv->total_network_bytes_written + next_chunk_length - 1, priv->content_length);
+
+ /* Make sure the headers are set. HACK: This should actually be in build_message(), but we have to work around
+ * http://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=3033 in GDataDocumentsService's append_query_headers(). */
+ klass = GDATA_SERVICE_GET_CLASS (priv->service);
+ if (klass->append_query_headers != NULL) {
+ klass->append_query_headers (priv->service, priv->authorization_domain, new_message);
+ }
+
+ g_signal_handler_disconnect (priv->message, wrote_body_data_signal);
+ g_signal_handler_disconnect (priv->message, wrote_headers_signal);
+
+ g_object_unref (priv->message);
+ priv->message = new_message;
+
+ /* Reset various counters for the next upload. Note that message_bytes_outstanding may be > 0 at this point, since the client may
+ * have pushed some content into the buffer while we were waiting for the response to this request. */
+ g_assert (priv->network_bytes_outstanding == 0);
+ priv->chunk_size = next_chunk_length;
+ priv->network_bytes_written = 0;
+
+ /* Loop round and upload this chunk now. */
+ g_mutex_unlock (&(priv->write_mutex));
+
+ continue;
+
+finished:
+ g_mutex_unlock (&(priv->write_mutex));
+
+ goto finished_outer;
+ }
+
+finished_outer:
+ /* Signal that the operation has finished (either successfully or in error).
+ * Also signal write_cond, just in case we errored out and finished sending in the middle of a write. */
+ g_mutex_lock (&(priv->write_mutex));
+ priv->state = STATE_FINISHED;
+ g_cond_signal (&(priv->write_cond));
+ g_mutex_unlock (&(priv->write_mutex));
+
+ g_cond_signal (&(priv->finished_cond));
+
+ /* Referenced in create_network_thread(). */
+ g_object_unref (self);
+
+ return NULL;
+}
+
+static void
+create_network_thread (GDataUploadStream *self, GError **error)
+{
+ GDataUploadStreamPrivate *priv = self->priv;
+
+ g_assert (priv->network_thread == NULL);
+ g_object_ref (self); /* ownership transferred to thread */
+ priv->network_thread = g_thread_try_new ("upload-thread", (GThreadFunc) upload_thread, self, error);
+}
+
+/**
+ * gdata_upload_stream_new:
+ * @service: a #GDataService
+ * @domain: (allow-none): the #GDataAuthorizationDomain to authorize the upload, or %NULL
+ * @method: the HTTP method to use
+ * @upload_uri: the URI to upload, which must be HTTPS
+ * @entry: (allow-none): the entry to upload as metadata, or %NULL
+ * @slug: the file's slug (filename)
+ * @content_type: the content type of the file being uploaded
+ * @cancellable: (allow-none): a #GCancellable for the entire upload stream, or %NULL
+ *
+ * Creates a new #GDataUploadStream, allowing a file to be uploaded from a GData service using standard #GOutputStream API.
+ *
+ * The HTTP method to use should be specified in @method, and will typically be either %SOUP_METHOD_POST (for insertions) or %SOUP_METHOD_PUT
+ * (for updates), according to the server and the @upload_uri.
+ *
+ * If @entry is specified, it will be attached to the upload as the entry to which the file being uploaded belongs. Otherwise, just the file
+ * written to the stream will be uploaded, and given a default entry as determined by the server.
+ *
+ * @slug and @content_type must be specified before the upload begins, as they describe the file being streamed. @slug is the filename given to the
+ * file, which will typically be stored on the server and made available when downloading the file again. @content_type must be the correct
+ * content type for the file, and should be in the service's list of acceptable content types.
+ *
+ * As well as the standard GIO errors, calls to the #GOutputStream API on a #GDataUploadStream can also return any relevant specific error from
+ * #GDataServiceError, or %GDATA_SERVICE_ERROR_PROTOCOL_ERROR in the general case.
+ *
+ * If a #GCancellable is provided in @cancellable, the upload operation may be cancelled at any time from another thread using g_cancellable_cancel().
+ * In this case, any ongoing network activity will be stopped, and any pending or future calls to #GOutputStream API on the #GDataUploadStream will
+ * return %G_IO_ERROR_CANCELLED. Note that the #GCancellable objects which can be passed to individual #GOutputStream operations will not cancel the
+ * upload operation proper if cancelled — they will merely cancel that API call. The only way to cancel the upload operation completely is using this
+ * @cancellable.
+ *
+ * Note that network communication won't begin until the first call to g_output_stream_write() on the #GDataUploadStream.
+ *
+ * Return value: a new #GOutputStream, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.9.0
+ */
+GOutputStream *
+gdata_upload_stream_new (GDataService *service, GDataAuthorizationDomain *domain, const gchar *method, const gchar *upload_uri, GDataEntry *entry,
+ const gchar *slug, const gchar *content_type, GCancellable *cancellable)
+{
+ g_return_val_if_fail (GDATA_IS_SERVICE (service), NULL);
+ g_return_val_if_fail (domain == NULL || GDATA_IS_AUTHORIZATION_DOMAIN (domain), NULL);
+ g_return_val_if_fail (method != NULL, NULL);
+ g_return_val_if_fail (upload_uri != NULL, NULL);
+ g_return_val_if_fail (entry == NULL || GDATA_IS_ENTRY (entry), NULL);
+ g_return_val_if_fail (slug != NULL, NULL);
+ g_return_val_if_fail (content_type != NULL, NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+
+ /* Create the upload stream */
+ return G_OUTPUT_STREAM (g_object_new (GDATA_TYPE_UPLOAD_STREAM,
+ "method", method,
+ "upload-uri", upload_uri,
+ "service", service,
+ "authorization-domain", domain,
+ "entry", entry,
+ "slug", slug,
+ "content-type", content_type,
+ "cancellable", cancellable,
+ NULL));
+}
+
+/**
+ * gdata_upload_stream_new_resumable:
+ * @service: a #GDataService
+ * @domain: (allow-none): the #GDataAuthorizationDomain to authorize the upload, or %NULL
+ * @method: the HTTP method to use
+ * @upload_uri: the URI to upload
+ * @entry: (allow-none): the entry to upload as metadata, or %NULL
+ * @slug: the file's slug (filename)
+ * @content_type: the content type of the file being uploaded
+ * @content_length: the size (in bytes) of the file being uploaded
+ * @cancellable: (allow-none): a #GCancellable for the entire upload stream, or %NULL
+ *
+ * Creates a new resumable #GDataUploadStream, allowing a file to be uploaded from a GData service using standard #GOutputStream API. The upload will
+ * use GData's resumable upload API, so should be more reliable than a normal upload (especially if the file is large). See the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/resumable_upload.html">GData documentation on resumable uploads</ulink> for more
+ * information.
+ *
+ * The HTTP method to use should be specified in @method, and will typically be either %SOUP_METHOD_POST (for insertions) or %SOUP_METHOD_PUT
+ * (for updates), according to the server and the @upload_uri.
+ *
+ * If @entry is specified, it will be attached to the upload as the entry to which the file being uploaded belongs. Otherwise, just the file
+ * written to the stream will be uploaded, and given a default entry as determined by the server.
+ *
+ * @slug, @content_type and @content_length must be specified before the upload begins, as they describe the file being streamed. @slug is the filename
+ * given to the file, which will typically be stored on the server and made available when downloading the file again. @content_type must be the
+ * correct content type for the file, and should be in the service's list of acceptable content types. @content_length must be the size of the file
+ * being uploaded (not including the XML for any associated #GDataEntry) in bytes. Zero is accepted if a metadata-only upload is being performed.
+ *
+ * As well as the standard GIO errors, calls to the #GOutputStream API on a #GDataUploadStream can also return any relevant specific error from
+ * #GDataServiceError, or %GDATA_SERVICE_ERROR_PROTOCOL_ERROR in the general case.
+ *
+ * If a #GCancellable is provided in @cancellable, the upload operation may be cancelled at any time from another thread using g_cancellable_cancel().
+ * In this case, any ongoing network activity will be stopped, and any pending or future calls to #GOutputStream API on the #GDataUploadStream will
+ * return %G_IO_ERROR_CANCELLED. Note that the #GCancellable objects which can be passed to individual #GOutputStream operations will not cancel the
+ * upload operation proper if cancelled — they will merely cancel that API call. The only way to cancel the upload operation completely is using this
+ * @cancellable.
+ *
+ * Note that network communication won't begin until the first call to g_output_stream_write() on the #GDataUploadStream.
+ *
+ * Return value: a new #GOutputStream, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.13.0
+ */
+GOutputStream *
+gdata_upload_stream_new_resumable (GDataService *service, GDataAuthorizationDomain *domain, const gchar *method, const gchar *upload_uri,
+ GDataEntry *entry, const gchar *slug, const gchar *content_type, goffset content_length, GCancellable *cancellable)
+{
+ g_return_val_if_fail (GDATA_IS_SERVICE (service), NULL);
+ g_return_val_if_fail (domain == NULL || GDATA_IS_AUTHORIZATION_DOMAIN (domain), NULL);
+ g_return_val_if_fail (method != NULL, NULL);
+ g_return_val_if_fail (upload_uri != NULL, NULL);
+ g_return_val_if_fail (entry == NULL || GDATA_IS_ENTRY (entry), NULL);
+ g_return_val_if_fail (slug != NULL, NULL);
+ g_return_val_if_fail (content_type != NULL, NULL);
+ g_return_val_if_fail (content_length >= 0, NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+
+ /* Create the upload stream */
+ return G_OUTPUT_STREAM (g_object_new (GDATA_TYPE_UPLOAD_STREAM,
+ "method", method,
+ "upload-uri", upload_uri,
+ "service", service,
+ "authorization-domain", domain,
+ "entry", entry,
+ "slug", slug,
+ "content-type", content_type,
+ "content-length", content_length,
+ "cancellable", cancellable,
+ NULL));
+}
+
+/**
+ * gdata_upload_stream_get_response:
+ * @self: a #GDataUploadStream
+ * @length: (allow-none) (out caller-allocates): return location for the length of the response, or %NULL
+ *
+ * Returns the server's response to the upload operation performed by the #GDataUploadStream. If the operation
+ * is still underway, or the server's response hasn't been received yet, %NULL is returned and @length is set to <code class="literal">-1</code>.
+ *
+ * If there was an error during the upload operation (but it is complete), %NULL is returned, and @length is set to <code class="literal">0</code>.
+ *
+ * While it is safe to call this function from any thread at any time during the network operation, the only way to guarantee that the response has
+ * been set before calling this function is to have closed the #GDataUploadStream by calling g_output_stream_close() on it, without cancelling
+ * the close operation. Once the stream has been closed, all network communication is guaranteed to have finished. Note that if a call to
+ * g_output_stream_close() is cancelled, g_output_stream_is_closed() will immediately start to return %TRUE, even if the #GDataUploadStream is still
+ * attempting to flush the network buffers asynchronously — consequently, gdata_upload_stream_get_response() may still return %NULL and a @length of
+ * <code class="literal">-1</code>. The only reliable way to determine if the stream has been fully closed in this situation is to check the results
+ * of gdata_upload_stream_get_response(), rather than g_output_stream_is_closed().
+ *
+ * Return value: the server's response to the upload, or %NULL
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_upload_stream_get_response (GDataUploadStream *self, gssize *length)
+{
+ gssize _length;
+ const gchar *_response;
+
+ g_return_val_if_fail (GDATA_IS_UPLOAD_STREAM (self), NULL);
+
+ g_mutex_lock (&(self->priv->response_mutex));
+
+ if (self->priv->response_status == SOUP_STATUS_NONE) {
+ /* We can't touch the message until the network thread has finished using it, since it isn't threadsafe */
+ _length = -1;
+ _response = NULL;
+ } else if (SOUP_STATUS_IS_SUCCESSFUL (self->priv->response_status) == FALSE) {
+ /* The response has been received, and was unsuccessful */
+ _length = 0;
+ _response = NULL;
+ } else {
+ /* The response has been received, and was successful */
+ _length = self->priv->message->response_body->length;
+ _response = self->priv->message->response_body->data;
+ }
+
+ g_mutex_unlock (&(self->priv->response_mutex));
+
+ if (length != NULL)
+ *length = _length;
+ return _response;
+}
+
+/**
+ * gdata_upload_stream_get_service:
+ * @self: a #GDataUploadStream
+ *
+ * Gets the service used to authorize the upload, as passed to gdata_upload_stream_new().
+ *
+ * Return value: (transfer none): the #GDataService used to authorize the upload
+ *
+ * Since: 0.5.0
+ */
+GDataService *
+gdata_upload_stream_get_service (GDataUploadStream *self)
+{
+ g_return_val_if_fail (GDATA_IS_UPLOAD_STREAM (self), NULL);
+ return self->priv->service;
+}
+
+/**
+ * gdata_upload_stream_get_authorization_domain:
+ * @self: a #GDataUploadStream
+ *
+ * Gets the authorization domain used to authorize the upload, as passed to gdata_upload_stream_new(). It may be %NULL if authorization is not
+ * needed for the upload.
+ *
+ * Return value: (transfer none) (allow-none): the #GDataAuthorizationDomain used to authorize the upload, or %NULL
+ *
+ * Since: 0.9.0
+ */
+GDataAuthorizationDomain *
+gdata_upload_stream_get_authorization_domain (GDataUploadStream *self)
+{
+ g_return_val_if_fail (GDATA_IS_UPLOAD_STREAM (self), NULL);
+ return self->priv->authorization_domain;
+}
+
+/**
+ * gdata_upload_stream_get_method:
+ * @self: a #GDataUploadStream
+ *
+ * Gets the HTTP request method being used to upload the file, as passed to gdata_upload_stream_new().
+ *
+ * Return value: the HTTP request method in use
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_upload_stream_get_method (GDataUploadStream *self)
+{
+ g_return_val_if_fail (GDATA_IS_UPLOAD_STREAM (self), NULL);
+ return self->priv->method;
+}
+
+/**
+ * gdata_upload_stream_get_upload_uri:
+ * @self: a #GDataUploadStream
+ *
+ * Gets the URI the file is being uploaded to, as passed to gdata_upload_stream_new().
+ *
+ * Return value: the URI which the file is being uploaded to
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_upload_stream_get_upload_uri (GDataUploadStream *self)
+{
+ g_return_val_if_fail (GDATA_IS_UPLOAD_STREAM (self), NULL);
+ return self->priv->upload_uri;
+}
+
+/**
+ * gdata_upload_stream_get_entry:
+ * @self: a #GDataUploadStream
+ *
+ * Gets the entry being used to upload metadata, if one was passed to gdata_upload_stream_new().
+ *
+ * Return value: (transfer none): the entry used for metadata, or %NULL
+ *
+ * Since: 0.5.0
+ */
+GDataEntry *
+gdata_upload_stream_get_entry (GDataUploadStream *self)
+{
+ g_return_val_if_fail (GDATA_IS_UPLOAD_STREAM (self), NULL);
+ return self->priv->entry;
+}
+
+/**
+ * gdata_upload_stream_get_slug:
+ * @self: a #GDataUploadStream
+ *
+ * Gets the slug (filename) of the file being uploaded.
+ *
+ * Return value: the slug of the file being uploaded
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_upload_stream_get_slug (GDataUploadStream *self)
+{
+ g_return_val_if_fail (GDATA_IS_UPLOAD_STREAM (self), NULL);
+ return self->priv->slug;
+}
+
+/**
+ * gdata_upload_stream_get_content_type:
+ * @self: a #GDataUploadStream
+ *
+ * Gets the content type of the file being uploaded.
+ *
+ * Return value: the content type of the file being uploaded
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_upload_stream_get_content_type (GDataUploadStream *self)
+{
+ g_return_val_if_fail (GDATA_IS_UPLOAD_STREAM (self), NULL);
+ return self->priv->content_type;
+}
+
+/**
+ * gdata_upload_stream_get_content_length:
+ * @self: a #GDataUploadStream
+ *
+ * Gets the size (in bytes) of the file being uploaded. This will be <code class="literal">-1</code> for a non-resumable upload, and zero or greater
+ * for a resumable upload.
+ *
+ * Return value: the size of the file being uploaded
+ *
+ * Since: 0.13.0
+ */
+goffset
+gdata_upload_stream_get_content_length (GDataUploadStream *self)
+{
+ g_return_val_if_fail (GDATA_IS_UPLOAD_STREAM (self), -1);
+ return self->priv->content_length;
+}
+
+/**
+ * gdata_upload_stream_get_cancellable:
+ * @self: a #GDataUploadStream
+ *
+ * Gets the #GCancellable for the entire upload operation, #GDataUploadStream:cancellable.
+ *
+ * Return value: (transfer none): the #GCancellable for the entire upload operation
+ *
+ * Since: 0.8.0
+ */
+GCancellable *
+gdata_upload_stream_get_cancellable (GDataUploadStream *self)
+{
+ g_return_val_if_fail (GDATA_IS_UPLOAD_STREAM (self), NULL);
+ g_assert (self->priv->cancellable != NULL);
+ return self->priv->cancellable;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_UPLOAD_STREAM_H
+#define GDATA_UPLOAD_STREAM_H
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gio/gio.h>
+
+#include <gdata/gdata-service.h>
+#include <gdata/gdata-entry.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_LINK_RESUMABLE_CREATE_MEDIA:
+ *
+ * The relation type URI of the resumable upload location for resources attached to this resource.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/resumable_upload.html#ResumableUploadInitiate">GData resumable upload protocol
+ * specification</ulink>.
+ *
+ * Since: 0.13.0
+ */
+#define GDATA_LINK_RESUMABLE_CREATE_MEDIA "http://schemas.google.com/g/2005#resumable-create-media"
+
+/**
+ * GDATA_LINK_RESUMABLE_EDIT_MEDIA:
+ *
+ * The relation type URI of the resumable update location for resources attached to this resource.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/resumable_upload.html#ResumableUploadInitiate">GData resumable upload protocol
+ * specification</ulink>.
+ *
+ * Since: 0.13.0
+ */
+#define GDATA_LINK_RESUMABLE_EDIT_MEDIA "http://schemas.google.com/g/2005#resumable-edit-media"
+
+#define GDATA_TYPE_UPLOAD_STREAM (gdata_upload_stream_get_type ())
+#define GDATA_UPLOAD_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_UPLOAD_STREAM, GDataUploadStream))
+#define GDATA_UPLOAD_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_UPLOAD_STREAM, GDataUploadStreamClass))
+#define GDATA_IS_UPLOAD_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_UPLOAD_STREAM))
+#define GDATA_IS_UPLOAD_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_UPLOAD_STREAM))
+#define GDATA_UPLOAD_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_UPLOAD_STREAM, GDataUploadStreamClass))
+
+typedef struct _GDataUploadStreamPrivate GDataUploadStreamPrivate;
+
+/**
+ * GDataUploadStream:
+ *
+ * All the fields in the #GDataUploadStream structure are private and should never be accessed directly.
+ *
+ * Since: 0.5.0
+ */
+typedef struct {
+ GOutputStream parent;
+ GDataUploadStreamPrivate *priv;
+} GDataUploadStream;
+
+/**
+ * GDataUploadStreamClass:
+ *
+ * All the fields in the #GDataUploadStreamClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.5.0
+ */
+typedef struct {
+ /*< private >*/
+ GOutputStreamClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+ void (*_g_reserved2) (void);
+ void (*_g_reserved3) (void);
+ void (*_g_reserved4) (void);
+ void (*_g_reserved5) (void);
+} GDataUploadStreamClass;
+
+GType gdata_upload_stream_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataUploadStream, g_object_unref)
+
+GOutputStream *gdata_upload_stream_new (GDataService *service, GDataAuthorizationDomain *domain, const gchar *method, const gchar *upload_uri,
+ GDataEntry *entry, const gchar *slug, const gchar *content_type,
+ GCancellable *cancellable) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+GOutputStream *gdata_upload_stream_new_resumable (GDataService *service, GDataAuthorizationDomain *domain, const gchar *method, const gchar *upload_uri,
+ GDataEntry *entry, const gchar *slug, const gchar *content_type, goffset content_length,
+ GCancellable *cancellable) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_upload_stream_get_response (GDataUploadStream *self, gssize *length);
+
+GDataService *gdata_upload_stream_get_service (GDataUploadStream *self) G_GNUC_PURE;
+GDataAuthorizationDomain *gdata_upload_stream_get_authorization_domain (GDataUploadStream *self) G_GNUC_PURE;
+const gchar *gdata_upload_stream_get_method (GDataUploadStream *self) G_GNUC_PURE;
+const gchar *gdata_upload_stream_get_upload_uri (GDataUploadStream *self) G_GNUC_PURE;
+GDataEntry *gdata_upload_stream_get_entry (GDataUploadStream *self) G_GNUC_PURE;
+const gchar *gdata_upload_stream_get_slug (GDataUploadStream *self) G_GNUC_PURE;
+const gchar *gdata_upload_stream_get_content_type (GDataUploadStream *self) G_GNUC_PURE;
+goffset gdata_upload_stream_get_content_length (GDataUploadStream *self) G_GNUC_PURE;
+GCancellable *gdata_upload_stream_get_cancellable (GDataUploadStream *self) G_GNUC_PURE;
+
+G_END_DECLS
+
+#endif /* !GDATA_UPLOAD_STREAM_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Holger Berndt 2011 <hb@gnome.org>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_VERSION_H
+#define GDATA_VERSION_H
+
+/**
+ * SECTION:gdata-version
+ * @Short_description: Macros to check the libgdata version
+ * @Title: Version Information
+ *
+ * libgdata provides compile-time version information.
+ *
+ * Since: 0.11.0
+ */
+
+/**
+ * GDATA_MAJOR_VERSION:
+ *
+ * Evaluates to the major version of the GData headers at compile time.
+ * (e.g. in libgdata version 1.2.3 this is 1).
+ *
+ * Since: 0.11.0
+ */
+#define GDATA_MAJOR_VERSION (@GDATA_VERSION_MAJOR@)
+
+/**
+ * GDATA_MINOR_VERSION:
+ *
+ * Evaluates to the minor version of the GData headers at compile time.
+ * (e.g. in libgdata version 1.2.3 this is 2).
+ *
+ * Since: 0.11.0
+ */
+#define GDATA_MINOR_VERSION (@GDATA_VERSION_MINOR@)
+
+/**
+ * GDATA_MICRO_VERSION:
+ *
+ * Evaluates to the micro version of the GData headers at compile time.
+ * (e.g. in libgdata version 1.2.3 this is 3).
+ *
+ * Since: 0.11.0
+ */
+#define GDATA_MICRO_VERSION (@GDATA_VERSION_MICRO@)
+
+/**
+ * GDATA_CHECK_VERSION:
+ * @major: major version (e.g. 1 for version 1.2.3)
+ * @minor: minor version (e.g. 2 for version 1.2.3)
+ * @micro: micro version (e.g. 3 for version 1.2.3)
+ *
+ * Evaluates to %TRUE if the version of the GData header files
+ * is the same as or newer than the passed-in version.
+ *
+ * Since: 0.11.0
+ */
+#define GDATA_CHECK_VERSION(major,minor,micro) \
+ (GDATA_MAJOR_VERSION > (major) || \
+ (GDATA_MAJOR_VERSION == (major) && GDATA_MINOR_VERSION > (minor)) || \
+ (GDATA_MAJOR_VERSION == (major) && GDATA_MINOR_VERSION == (minor) && \
+ GDATA_MICRO_VERSION >= (micro)))
+
+#endif /* !GDATA_VERSION_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2008-2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_H
+#define GDATA_H
+
+/* Core files */
+#include <gdata/gdata-entry.h>
+#include <gdata/gdata-feed.h>
+#include <gdata/gdata-service.h>
+#include <gdata/gdata-types.h>
+#include <gdata/gdata-query.h>
+#include <gdata/gdata-enums.h>
+#include <gdata/gdata-access-handler.h>
+#include <gdata/gdata-access-rule.h>
+#include <gdata/gdata-parsable.h>
+#include <gdata/gdata-download-stream.h>
+#include <gdata/gdata-upload-stream.h>
+#include <gdata/gdata-comparable.h>
+#include <gdata/gdata-batchable.h>
+#include <gdata/gdata-batch-operation.h>
+#include <gdata/gdata-authorizer.h>
+#include <gdata/gdata-authorization-domain.h>
+#include <gdata/gdata-client-login-authorizer.h>
+#include <gdata/gdata-oauth1-authorizer.h>
+#include <gdata/gdata-oauth2-authorizer.h>
+#ifdef GOA_API_IS_SUBJECT_TO_CHANGE
+/* You need to define GOA_API_IS_SUBJECT_TO_CHANGE in order to use the GOA authoriser. */
+#include <gdata/gdata-goa-authorizer.h>
+#endif /* GOA_API_IS_SUBJECT_TO_CHANGE */
+#include <gdata/gdata-commentable.h>
+#include <gdata/gdata-comment.h>
+#include <gdata/gdata-version.h>
+
+/* Namespaces */
+
+/* Atom */
+#include <gdata/atom/gdata-author.h>
+#include <gdata/atom/gdata-category.h>
+#include <gdata/atom/gdata-generator.h>
+#include <gdata/atom/gdata-link.h>
+
+/* APP */
+#include <gdata/app/gdata-app-categories.h>
+
+/* GData */
+#include <gdata/gd/gdata-gd-email-address.h>
+#include <gdata/gd/gdata-gd-im-address.h>
+#include <gdata/gd/gdata-gd-name.h>
+#include <gdata/gd/gdata-gd-organization.h>
+#include <gdata/gd/gdata-gd-phone-number.h>
+#include <gdata/gd/gdata-gd-postal-address.h>
+#include <gdata/gd/gdata-gd-reminder.h>
+#include <gdata/gd/gdata-gd-when.h>
+#include <gdata/gd/gdata-gd-where.h>
+#include <gdata/gd/gdata-gd-who.h>
+
+/* GContact */
+#include <gdata/gcontact/gdata-gcontact-calendar.h>
+#include <gdata/gcontact/gdata-gcontact-event.h>
+#include <gdata/gcontact/gdata-gcontact-external-id.h>
+#include <gdata/gcontact/gdata-gcontact-jot.h>
+#include <gdata/gcontact/gdata-gcontact-language.h>
+#include <gdata/gcontact/gdata-gcontact-relation.h>
+#include <gdata/gcontact/gdata-gcontact-website.h>
+
+/* Media RSS */
+#include <gdata/media/gdata-media-category.h>
+#include <gdata/media/gdata-media-content.h>
+#include <gdata/media/gdata-media-credit.h>
+#include <gdata/media/gdata-media-enums.h>
+#include <gdata/media/gdata-media-thumbnail.h>
+
+/* Services */
+
+/* YouTube */
+#include <gdata/services/youtube/gdata-youtube-service.h>
+#include <gdata/services/youtube/gdata-youtube-feed.h>
+#include <gdata/services/youtube/gdata-youtube-query.h>
+#include <gdata/services/youtube/gdata-youtube-video.h>
+#include <gdata/services/youtube/gdata-youtube-content.h>
+#include <gdata/services/youtube/gdata-youtube-credit.h>
+#include <gdata/services/youtube/gdata-youtube-state.h>
+#include <gdata/services/youtube/gdata-youtube-enums.h>
+#include <gdata/services/youtube/gdata-youtube-category.h>
+#include <gdata/services/youtube/gdata-youtube-comment.h>
+
+/* Google Calendar */
+#include <gdata/services/calendar/gdata-calendar-service.h>
+#include <gdata/services/calendar/gdata-calendar-feed.h>
+#include <gdata/services/calendar/gdata-calendar-calendar.h>
+#include <gdata/services/calendar/gdata-calendar-event.h>
+#include <gdata/services/calendar/gdata-calendar-query.h>
+#include <gdata/services/calendar/gdata-calendar-access-rule.h>
+
+/* Google PicasaWeb */
+#include <gdata/services/picasaweb/gdata-picasaweb-service.h>
+#include <gdata/services/picasaweb/gdata-picasaweb-feed.h>
+#include <gdata/services/picasaweb/gdata-picasaweb-query.h>
+#include <gdata/services/picasaweb/gdata-picasaweb-album.h>
+#include <gdata/services/picasaweb/gdata-picasaweb-file.h>
+#include <gdata/services/picasaweb/gdata-picasaweb-enums.h>
+#include <gdata/services/picasaweb/gdata-picasaweb-user.h>
+#include <gdata/services/picasaweb/gdata-picasaweb-comment.h>
+
+/* Google Contacts */
+#include <gdata/services/contacts/gdata-contacts-service.h>
+#include <gdata/services/contacts/gdata-contacts-contact.h>
+#include <gdata/services/contacts/gdata-contacts-group.h>
+#include <gdata/services/contacts/gdata-contacts-query.h>
+
+/* Google Documents*/
+#include <gdata/services/documents/gdata-documents-entry.h>
+#include <gdata/services/documents/gdata-documents-document.h>
+#include <gdata/services/documents/gdata-documents-property.h>
+#include <gdata/services/documents/gdata-documents-text.h>
+#include <gdata/services/documents/gdata-documents-spreadsheet.h>
+#include <gdata/services/documents/gdata-documents-presentation.h>
+#include <gdata/services/documents/gdata-documents-folder.h>
+#include <gdata/services/documents/gdata-documents-query.h>
+#include <gdata/services/documents/gdata-documents-service.h>
+#include <gdata/services/documents/gdata-documents-metadata.h>
+#include <gdata/services/documents/gdata-documents-feed.h>
+#include <gdata/services/documents/gdata-documents-drawing.h>
+#include <gdata/services/documents/gdata-documents-pdf.h>
+#include <gdata/services/documents/gdata-documents-enums.h>
+#include <gdata/services/documents/gdata-documents-upload-query.h>
+#include <gdata/services/documents/gdata-documents-access-rule.h>
+
+/* Google Tasks */
+#include <gdata/services/tasks/gdata-tasks-service.h>
+#include <gdata/services/tasks/gdata-tasks-query.h>
+#include <gdata/services/tasks/gdata-tasks-tasklist.h>
+#include <gdata/services/tasks/gdata-tasks-task.h>
+
+/* Google Freebase */
+#include <gdata/services/freebase/gdata-freebase-service.h>
+#include <gdata/services/freebase/gdata-freebase-query.h>
+#include <gdata/services/freebase/gdata-freebase-result.h>
+#include <gdata/services/freebase/gdata-freebase-search-query.h>
+#include <gdata/services/freebase/gdata-freebase-search-result.h>
+#include <gdata/services/freebase/gdata-freebase-topic-query.h>
+#include <gdata/services/freebase/gdata-freebase-topic-result.h>
+#include <gdata/services/freebase/gdata-freebase-enums.h>
+
+#endif /* !GDATA_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ * Copyright (C) Richard Schwarting 2009 <aquarichy@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * SECTION:gdata-georss-where
+ * @short_description: GeoRSS where element
+ * @stability: Stable
+ * @include: gdata/georss/gdata-georss-where.h
+ *
+ * #GDataGeoRSSWhere represents a "where" element from the
+ * <ulink type="http" url="http://www.georss.org/georss">GeoRSS specification</ulink>.
+ * with PicasaWeb usage defined at
+ * <ulink type="http" url="http://code.google.com/apis/picasaweb/docs/2.0/reference.html#georss_reference">PicasaWeb API reference</ulink>.
+ *
+ * It is private API, since implementing classes are likely to proxy the properties and functions
+ * of #GDataGeoRSSWhere as appropriate; most entry types which implement #GDataGeoRSSWhere have no use
+ * for most of its properties, and it would be unnecessary and confusing to expose #GDataGeoRSSWhere itself.
+ *
+ * Since: 0.5.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+#include <string.h>
+
+#include "gdata-georss-where.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-private.h"
+
+static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+static void get_xml (GDataParsable *parsable, GString *xml_string);
+
+struct _GDataGeoRSSWherePrivate {
+ gdouble latitude;
+ gdouble longitude;
+};
+
+G_DEFINE_TYPE (GDataGeoRSSWhere, gdata_georss_where, GDATA_TYPE_PARSABLE)
+
+static void
+gdata_georss_where_class_init (GDataGeoRSSWhereClass *klass)
+{
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataGeoRSSWherePrivate));
+
+ parsable_class->get_xml = get_xml;
+ parsable_class->parse_xml = parse_xml;
+ parsable_class->get_namespaces = get_namespaces;
+ parsable_class->element_name = "where";
+ parsable_class->element_namespace = "georss";
+}
+
+static void
+gdata_georss_where_init (GDataGeoRSSWhere *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GEORSS_WHERE, GDataGeoRSSWherePrivate);
+
+ self->priv->latitude = G_MAXDOUBLE;
+ self->priv->longitude = G_MAXDOUBLE;
+}
+
+static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ GDataGeoRSSWhere *self = GDATA_GEORSS_WHERE (parsable);
+
+ if (gdata_parser_is_namespace (node, "http://www.opengis.net/gml") == TRUE &&
+ xmlStrcmp (node->name, (xmlChar*) "Point") == 0) {
+ /* gml:Point */
+ gboolean found_pos = FALSE;
+ xmlNode *child;
+
+ for (child = node->children; child != NULL; child = child->next) {
+ if (xmlStrcmp (child->name, (xmlChar*) "pos") == 0) {
+ xmlChar *pos = xmlNodeListGetString (doc, child->children, TRUE);
+ gchar *endptr;
+
+ self->priv->latitude = g_ascii_strtod ((gchar*) pos, &endptr);
+ self->priv->longitude = g_ascii_strtod (endptr, NULL);
+
+ xmlFree (pos);
+ found_pos = TRUE;
+ } else {
+ /* TODO: this logic copied from gdata-parsable.c. Re-evaluate this at some point in the future.
+ If GeoRSS and GML support were to be used more widely, it might due to implement GML objects. */
+ xmlBuffer *buffer;
+
+ /* Unhandled XML */
+ buffer = xmlBufferCreate ();
+ xmlNodeDump (buffer, doc, child, 0, 0);
+ g_debug ("Unhandled XML in <gml:Point>: %s", (gchar*) xmlBufferContent (buffer));
+ xmlBufferFree (buffer);
+ }
+ }
+
+ if (found_pos == FALSE)
+ return gdata_parser_error_required_element_missing ("pos", "gml:Point", error);
+ return TRUE;
+ }
+
+ return GDATA_PARSABLE_CLASS (gdata_georss_where_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+}
+
+static void
+get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataGeoRSSWherePrivate *priv = GDATA_GEORSS_WHERE (parsable)->priv;
+ gchar latitude_str[G_ASCII_DTOSTR_BUF_SIZE];
+ gchar longitude_str[G_ASCII_DTOSTR_BUF_SIZE];
+
+ if (priv->latitude != G_MAXDOUBLE && priv->longitude != G_MAXDOUBLE) {
+ g_string_append_printf (xml_string, "<gml:Point><gml:pos>%s %s</gml:pos></gml:Point>",
+ g_ascii_dtostr (latitude_str, sizeof (latitude_str), priv->latitude),
+ g_ascii_dtostr (longitude_str, sizeof (longitude_str), priv->longitude));
+ }
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ g_hash_table_insert (namespaces, (gchar*) "georss", (gchar*) "http://www.georss.org/georss");
+ g_hash_table_insert (namespaces, (gchar*) "gml", (gchar*) "http://www.opengis.net/gml");
+}
+
+/**
+ * gdata_georss_where_get_latitude:
+ * @self: a #GDataGeoRSSWhere
+ *
+ * Gets the #GDataGeoRSSWhere:latitude property.
+ *
+ * Return value: the latitude of this position, or %G_MAXDOUBLE if unknown
+ *
+ * Since: 0.5.0
+ */
+gdouble
+gdata_georss_where_get_latitude (GDataGeoRSSWhere *self)
+{
+ g_return_val_if_fail (GDATA_IS_GEORSS_WHERE (self), G_MAXDOUBLE);
+ return self->priv->latitude;
+}
+
+/**
+ * gdata_georss_where_get_longitude:
+ * @self: a #GDataGeoRSSWhere
+ *
+ * Gets the #GDataGeoRSSWhere:longitude property.
+ *
+ * Return value: the longitude of this position, or %G_MAXDOUBLE if unknown
+ *
+ * Since: 0.5.0
+ */
+gdouble
+gdata_georss_where_get_longitude (GDataGeoRSSWhere *self)
+{
+ g_return_val_if_fail (GDATA_IS_GEORSS_WHERE (self), G_MAXDOUBLE);
+ return self->priv->longitude;
+}
+
+/**
+ * gdata_georss_where_set_latitude:
+ * @self: a #GDataGeoRSSWhere
+ * @latitude: the new latitude coordinate, or %G_MAXDOUBLE
+ *
+ * Sets the #GDataGeoRSSWhere:latitude property to @latitude.
+ *
+ * Valid values range from <code class="literal">-90.0</code> to <code class="literal">90.0</code> inclusive.
+ * Set @latitude to %G_MAXDOUBLE to unset it.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_georss_where_set_latitude (GDataGeoRSSWhere *self, gdouble latitude)
+{
+ g_return_if_fail (GDATA_IS_GEORSS_WHERE (self));
+
+ if (latitude < -90.0 || latitude > 90.0)
+ self->priv->latitude = G_MAXDOUBLE;
+ else
+ self->priv->latitude = latitude;
+}
+
+/**
+ * gdata_georss_where_set_longitude:
+ * @self: a #GDataGeoRSSWhere
+ * @longitude: the new longitude coordinate, or %G_MAXDOUBLE
+ *
+ * Sets the #GDataGeoRSSWhere:longitude property to @longitude.
+ *
+ * Valid values range from <code class="literal">-180.0</code> to <code class="literal">180.0</code> inclusive.
+ * Set @longitude to %G_MAXDOUBLE to unset it.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_georss_where_set_longitude (GDataGeoRSSWhere *self, gdouble longitude)
+{
+ g_return_if_fail (GDATA_IS_GEORSS_WHERE (self));
+
+ if (longitude < -180.0 || longitude > 180.0)
+ self->priv->longitude = G_MAXDOUBLE;
+ else
+ self->priv->longitude = longitude;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Richard Schwarting 2009 <aquarichy@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_GEORSS_WHERE_H
+#define GDATA_GEORSS_WHERE_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_GEORSS_WHERE (gdata_georss_where_get_type ())
+#define GDATA_GEORSS_WHERE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_GEORSS_WHERE, GDataGeoRSSWhere))
+#define GDATA_GEORSS_WHERE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_GEORSS_WHERE, GDataGeoRSSWhereClass))
+#define GDATA_IS_GEORSS_WHERE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_GEORSS_WHERE))
+#define GDATA_IS_GEORSS_WHERE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_GEORSS_WHERE))
+#define GDATA_GEORSS_WHERE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_GEORSS_WHERE, GDataGeoRSSWhereClass))
+
+typedef struct _GDataGeoRSSWherePrivate GDataGeoRSSWherePrivate;
+
+/**
+ * GDataGeoRSSWhere:
+ *
+ * All the fields in the #GDataGeoRSSWhere structure are private and should never be accessed directly.
+ *
+ * Since: 0.5.0
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataGeoRSSWherePrivate *priv;
+} GDataGeoRSSWhere;
+
+/**
+ * GDataGeoRSSWhereClass:
+ *
+ * All the fields in the #GDataGeoRSSWhereClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.5.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataGeoRSSWhereClass;
+
+GType gdata_georss_where_get_type (void) G_GNUC_CONST;
+
+gdouble gdata_georss_where_get_latitude (GDataGeoRSSWhere *self) G_GNUC_PURE;
+gdouble gdata_georss_where_get_longitude (GDataGeoRSSWhere *self) G_GNUC_PURE;
+void gdata_georss_where_set_latitude (GDataGeoRSSWhere *self, gdouble latitude);
+void gdata_georss_where_set_longitude (GDataGeoRSSWhere *self, gdouble longitude);
+
+G_END_DECLS
+
+#endif /* !GDATA_GEORSS_WHERE_H */
--- /dev/null
+sources += files('gdata-georss-where.c')
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-media-category
+ * @short_description: Media RSS category element
+ * @stability: Stable
+ * @include: gdata/media/gdata-media-category.h
+ *
+ * #GDataMediaCategory represents a "category" element from the
+ * <ulink type="http" url="http://video.search.yahoo.com/mrss">Media RSS specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+
+#include "gdata-media-category.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-types.h"
+
+static void gdata_media_category_finalize (GObject *object);
+static void gdata_media_category_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_media_category_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error);
+static void pre_get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataMediaCategoryPrivate {
+ gchar *category;
+ gchar *scheme;
+ gchar *label;
+};
+
+enum {
+ PROP_CATEGORY = 1,
+ PROP_SCHEME,
+ PROP_LABEL
+};
+
+G_DEFINE_TYPE (GDataMediaCategory, gdata_media_category, GDATA_TYPE_PARSABLE)
+
+static void
+gdata_media_category_class_init (GDataMediaCategoryClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataMediaCategoryPrivate));
+
+ gobject_class->get_property = gdata_media_category_get_property;
+ gobject_class->set_property = gdata_media_category_set_property;
+ gobject_class->finalize = gdata_media_category_finalize;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ parsable_class->parse_xml = parse_xml;
+ parsable_class->pre_get_xml = pre_get_xml;
+ parsable_class->get_xml = get_xml;
+ parsable_class->get_namespaces = get_namespaces;
+ parsable_class->element_name = "category";
+ parsable_class->element_namespace = "media";
+
+ /**
+ * GDataMediaCategory:category:
+ *
+ * The category name.
+ *
+ * For more information, see the <ulink type="http" url="http://video.search.yahoo.com/mrss">Media RSS specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_CATEGORY,
+ g_param_spec_string ("category",
+ "Category", "The category name.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataMediaCategory:scheme:
+ *
+ * A URI that identifies the categorization scheme.
+ *
+ * For more information, see the <ulink type="http" url="http://video.search.yahoo.com/mrss">Media RSS specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SCHEME,
+ g_param_spec_string ("scheme",
+ "Scheme", "A URI that identifies the categorization scheme.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataMediaCategory:label:
+ *
+ * A human-readable label that can be displayed in end-user applications.
+ *
+ * For more information, see the <ulink type="http" url="http://video.search.yahoo.com/mrss">Media RSS specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LABEL,
+ g_param_spec_string ("label",
+ "Label", "A human-readable label that can be displayed in end-user applications.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_media_category_init (GDataMediaCategory *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_MEDIA_CATEGORY, GDataMediaCategoryPrivate);
+}
+
+static void
+gdata_media_category_finalize (GObject *object)
+{
+ GDataMediaCategoryPrivate *priv = GDATA_MEDIA_CATEGORY (object)->priv;
+
+ g_free (priv->category);
+ g_free (priv->scheme);
+ g_free (priv->label);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_media_category_parent_class)->finalize (object);
+}
+
+static void
+gdata_media_category_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataMediaCategoryPrivate *priv = GDATA_MEDIA_CATEGORY (object)->priv;
+
+ switch (property_id) {
+ case PROP_CATEGORY:
+ g_value_set_string (value, priv->category);
+ break;
+ case PROP_SCHEME:
+ g_value_set_string (value, priv->scheme);
+ break;
+ case PROP_LABEL:
+ g_value_set_string (value, priv->label);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_media_category_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataMediaCategory *self = GDATA_MEDIA_CATEGORY (object);
+
+ switch (property_id) {
+ case PROP_CATEGORY:
+ gdata_media_category_set_category (self, g_value_get_string (value));
+ break;
+ case PROP_SCHEME:
+ gdata_media_category_set_scheme (self, g_value_get_string (value));
+ break;
+ case PROP_LABEL:
+ gdata_media_category_set_label (self, g_value_get_string (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ GDataMediaCategoryPrivate *priv = GDATA_MEDIA_CATEGORY (parsable)->priv;
+ xmlChar *category, *scheme;
+
+ category = xmlNodeListGetString (doc, root_node->children, TRUE);
+ if (category == NULL || *category == '\0') {
+ xmlFree (category);
+ return gdata_parser_error_required_content_missing (root_node, error);
+ }
+
+ scheme = xmlGetProp (root_node, (xmlChar*) "scheme");
+ if (scheme != NULL && *scheme == '\0') {
+ xmlFree (scheme);
+ xmlFree (category);
+ return gdata_parser_error_required_property_missing (root_node, "scheme", error);
+ } else if (scheme == NULL) {
+ /* Default */
+ scheme = xmlStrdup ((xmlChar*) "http://video.search.yahoo.com/mrss/category_schema");
+ }
+
+ priv->category = (gchar*) category;
+ priv->scheme = (gchar*) scheme;
+ priv->label = (gchar*) xmlGetProp (root_node, (xmlChar*) "label");
+
+ return TRUE;
+}
+
+static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ /* Textual content's handled in pre_parse_xml */
+ if (node->type != XML_ELEMENT_NODE)
+ return TRUE;
+
+ return GDATA_PARSABLE_CLASS (gdata_media_category_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+}
+
+static void
+pre_get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataMediaCategoryPrivate *priv = GDATA_MEDIA_CATEGORY (parsable)->priv;
+
+ if (priv->scheme != NULL)
+ gdata_parser_string_append_escaped (xml_string, " scheme='", priv->scheme, "'");
+ if (priv->label != NULL)
+ gdata_parser_string_append_escaped (xml_string, " label='", priv->label, "'");
+}
+
+static void
+get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ gdata_parser_string_append_escaped (xml_string, NULL, GDATA_MEDIA_CATEGORY (parsable)->priv->category, NULL);
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ g_hash_table_insert (namespaces, (gchar*) "media", (gchar*) "http://search.yahoo.com/mrss/");
+}
+
+/**
+ * gdata_media_category_new:
+ * @category: a category describing the content
+ * @scheme: (allow-none): a URI identifying the categorisation scheme, or %NULL
+ * @label: (allow-none): a human-readable name for the category, or %NULL
+ *
+ * Creates a new #GDataMediaCategory. More information is available in the <ulink type="http"
+ * url="http://search.yahoo.com/mrss/">Media RSS specification</ulink>.
+ *
+ * Return value: a new #GDataMediaCategory, or %NULL; unref with g_object_unref()
+ */
+GDataMediaCategory *
+gdata_media_category_new (const gchar *category, const gchar *scheme, const gchar *label)
+{
+ g_return_val_if_fail (category != NULL && *category != '\0', NULL);
+ g_return_val_if_fail (scheme == NULL || *scheme != '\0', NULL);
+ return g_object_new (GDATA_TYPE_MEDIA_CATEGORY, "category", category, "scheme", scheme, "label", label, NULL);
+}
+
+/**
+ * gdata_media_category_get_category:
+ * @self: a #GDataMediaCategory
+ *
+ * Gets the #GDataMediaCategory:category property.
+ *
+ * Return value: the actual category
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_media_category_get_category (GDataMediaCategory *self)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_CATEGORY (self), NULL);
+ return self->priv->category;
+}
+
+/**
+ * gdata_media_category_set_category:
+ * @self: a #GDataMediaCategory
+ * @category: the new category
+ *
+ * Sets the #GDataMediaCategory:category property to @category.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_media_category_set_category (GDataMediaCategory *self, const gchar *category)
+{
+ g_return_if_fail (GDATA_IS_MEDIA_CATEGORY (self));
+ g_return_if_fail (category != NULL && *category != '\0');
+
+ g_free (self->priv->category);
+ self->priv->category = g_strdup (category);
+ g_object_notify (G_OBJECT (self), "category");
+}
+
+/**
+ * gdata_media_category_get_scheme:
+ * @self: a #GDataMediaCategory
+ *
+ * Gets the #GDataMediaCategory:scheme property.
+ *
+ * Return value: the category's scheme, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_media_category_get_scheme (GDataMediaCategory *self)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_CATEGORY (self), NULL);
+ return self->priv->scheme;
+}
+
+/**
+ * gdata_media_category_set_scheme:
+ * @self: a #GDataMediaCategory
+ * @scheme: (allow-none): the category's new scheme, or %NULL
+ *
+ * Sets the #GDataMediaCategory:scheme property to @scheme.
+ *
+ * Set @scheme to %NULL to unset the property.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_media_category_set_scheme (GDataMediaCategory *self, const gchar *scheme)
+{
+ g_return_if_fail (GDATA_IS_MEDIA_CATEGORY (self));
+ g_return_if_fail (scheme == NULL || *scheme != '\0');
+
+ if (scheme == NULL)
+ scheme = "http://video.search.yahoo.com/mrss/category_schema";
+
+ g_free (self->priv->scheme);
+ self->priv->scheme = g_strdup (scheme);
+ g_object_notify (G_OBJECT (self), "scheme");
+}
+
+/**
+ * gdata_media_category_get_label:
+ * @self: a #GDataMediaCategory
+ *
+ * Gets the #GDataMediaCategory:label property.
+ *
+ * Return value: the category's label, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_media_category_get_label (GDataMediaCategory *self)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_CATEGORY (self), NULL);
+ return self->priv->label;
+}
+
+/**
+ * gdata_media_category_set_label:
+ * @self: a #GDataMediaCategory
+ * @label: (allow-none): the category's new label, or %NULL
+ *
+ * Sets the #GDataMediaCategory:label property to @label.
+ *
+ * Set @label to %NULL to unset the property.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_media_category_set_label (GDataMediaCategory *self, const gchar *label)
+{
+ g_return_if_fail (GDATA_IS_MEDIA_CATEGORY (self));
+
+ g_free (self->priv->label);
+ self->priv->label = g_strdup (label);
+ g_object_notify (G_OBJECT (self), "label");
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_MEDIA_CATEGORY_H
+#define GDATA_MEDIA_CATEGORY_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_MEDIA_CATEGORY (gdata_media_category_get_type ())
+#define GDATA_MEDIA_CATEGORY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_MEDIA_CATEGORY, GDataMediaCategory))
+#define GDATA_MEDIA_CATEGORY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_MEDIA_CATEGORY, GDataMediaCategoryClass))
+#define GDATA_IS_MEDIA_CATEGORY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_MEDIA_CATEGORY))
+#define GDATA_IS_MEDIA_CATEGORY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_MEDIA_CATEGORY))
+#define GDATA_MEDIA_CATEGORY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_MEDIA_CATEGORY, GDataMediaCategoryClass))
+
+typedef struct _GDataMediaCategoryPrivate GDataMediaCategoryPrivate;
+
+/**
+ * GDataMediaCategory:
+ *
+ * All the fields in the #GDataMediaCategory structure are private and should never be accessed directly.
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataMediaCategoryPrivate *priv;
+} GDataMediaCategory;
+
+/**
+ * GDataMediaCategoryClass:
+ *
+ * All the fields in the #GDataMediaCategoryClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataMediaCategoryClass;
+
+GType gdata_media_category_get_type (void) G_GNUC_CONST;
+
+GDataMediaCategory *gdata_media_category_new (const gchar *category, const gchar *scheme, const gchar *label) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_media_category_get_category (GDataMediaCategory *self) G_GNUC_PURE;
+void gdata_media_category_set_category (GDataMediaCategory *self, const gchar *category);
+
+const gchar *gdata_media_category_get_scheme (GDataMediaCategory *self) G_GNUC_PURE;
+void gdata_media_category_set_scheme (GDataMediaCategory *self, const gchar *scheme);
+
+const gchar *gdata_media_category_get_label (GDataMediaCategory *self) G_GNUC_PURE;
+void gdata_media_category_set_label (GDataMediaCategory *self, const gchar *label);
+
+G_END_DECLS
+
+#endif /* !GDATA_MEDIA_CATEGORY_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-media-content
+ * @short_description: Media RSS content element
+ * @stability: Stable
+ * @include: gdata/media/gdata-media-content.h
+ *
+ * #GDataMediaContent represents a "content" element from the
+ * <ulink type="http" url="http://video.search.yahoo.com/mrss">Media RSS specification</ulink>.
+ *
+ * The class only implements parsing, not XML output, at the moment.
+ *
+ * Since: 0.4.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+
+#include "gdata-media-content.h"
+#include "gdata-download-stream.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-media-enums.h"
+#include "gdata-private.h"
+
+static void gdata_media_content_finalize (GObject *object);
+static void gdata_media_content_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataMediaContentPrivate {
+ gchar *uri;
+ gsize filesize;
+ gchar *content_type;
+ GDataMediaMedium medium;
+ gboolean is_default;
+ GDataMediaExpression expression;
+ gint64 duration;
+ guint height;
+ guint width;
+ /* TODO: implement other properties from the Media RSS standard */
+};
+
+enum {
+ PROP_URI = 1,
+ PROP_FILESIZE,
+ PROP_CONTENT_TYPE,
+ PROP_MEDIUM,
+ PROP_IS_DEFAULT,
+ PROP_EXPRESSION,
+ PROP_DURATION,
+ PROP_HEIGHT,
+ PROP_WIDTH
+};
+
+G_DEFINE_TYPE (GDataMediaContent, gdata_media_content, GDATA_TYPE_PARSABLE)
+
+static void
+gdata_media_content_class_init (GDataMediaContentClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataMediaContentPrivate));
+
+ gobject_class->get_property = gdata_media_content_get_property;
+ gobject_class->finalize = gdata_media_content_finalize;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ parsable_class->get_namespaces = get_namespaces;
+ parsable_class->element_name = "content";
+ parsable_class->element_namespace = "media";
+
+ /**
+ * GDataMediaContent:uri:
+ *
+ * The direct URI to the media object.
+ *
+ * For more information, see the <ulink type="http" url="http://video.search.yahoo.com/mrss">Media RSS specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_URI,
+ g_param_spec_string ("uri",
+ "URI", "The direct URI to the media object.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataMediaContent:filesize:
+ *
+ * The number of bytes of the media object.
+ *
+ * For more information, see the <ulink type="http" url="http://video.search.yahoo.com/mrss">Media RSS specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_FILESIZE,
+ g_param_spec_ulong ("filesize",
+ "Filesize", "The number of bytes of the media object.",
+ 0, G_MAXULONG, 0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataMediaContent:content-type:
+ *
+ * The standard MIME type of the object.
+ *
+ * For more information, see the <ulink type="http" url="http://video.search.yahoo.com/mrss">Media RSS specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_CONTENT_TYPE,
+ g_param_spec_string ("content-type",
+ "Content type", "The standard MIME type of the object.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataMediaContent:medium:
+ *
+ * The type of object, complementing #GDataMediaContent:content-type. It allows the consuming application to make simpler decisions between
+ * different content objects, based on whether they're a video or audio stream, for example.
+ *
+ * For more information, see the <ulink type="http" url="http://video.search.yahoo.com/mrss">Media RSS specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_MEDIUM,
+ g_param_spec_enum ("medium",
+ "Medium", "The type of object.",
+ GDATA_TYPE_MEDIA_MEDIUM, GDATA_MEDIA_UNKNOWN,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataMediaContent:is-default:
+ *
+ * Determines if this is the default content for the media group. There should only be one default object per media group.
+ *
+ * For more information, see the <ulink type="http" url="http://video.search.yahoo.com/mrss">Media RSS specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_IS_DEFAULT,
+ g_param_spec_boolean ("is-default",
+ "Default?", "Determines if this is the default content for the media group.",
+ FALSE,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataMediaContent:expression:
+ *
+ * Determines if the object is a sample or the full version of the object, or even if it is a continuous stream.
+ *
+ * For more information, see the <ulink type="http" url="http://video.search.yahoo.com/mrss">Media RSS specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_EXPRESSION,
+ g_param_spec_enum ("expression",
+ "Expression", "Determines if the object is a sample or the full version of the object.",
+ GDATA_TYPE_MEDIA_EXPRESSION, GDATA_MEDIA_EXPRESSION_FULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataMediaContent:duration:
+ *
+ * The number of seconds for which the media object plays.
+ *
+ * For more information, see the <ulink type="http" url="http://video.search.yahoo.com/mrss">Media RSS specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_DURATION,
+ g_param_spec_int64 ("duration",
+ "Duration", "The number of seconds for which the media object plays.",
+ 0, G_MAXINT64, 0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataMediaContent:height:
+ *
+ * The height of the media object.
+ *
+ * For more information, see the <ulink type="http" url="http://video.search.yahoo.com/mrss">Media RSS specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_HEIGHT,
+ g_param_spec_uint ("height",
+ "Height", "The height of the media object.",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataMediaContent:width:
+ *
+ * The width of the media object.
+ *
+ * For more information, see the <ulink type="http" url="http://video.search.yahoo.com/mrss">Media RSS specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_WIDTH,
+ g_param_spec_uint ("width",
+ "Width", "The width of the media object.",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_media_content_init (GDataMediaContent *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_MEDIA_CONTENT, GDataMediaContentPrivate);
+}
+
+static void
+gdata_media_content_finalize (GObject *object)
+{
+ GDataMediaContentPrivate *priv = GDATA_MEDIA_CONTENT (object)->priv;
+
+ g_free (priv->uri);
+ g_free (priv->content_type);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_media_content_parent_class)->finalize (object);
+}
+
+static void
+gdata_media_content_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataMediaContentPrivate *priv = GDATA_MEDIA_CONTENT (object)->priv;
+
+ switch (property_id) {
+ case PROP_URI:
+ g_value_set_string (value, priv->uri);
+ break;
+ case PROP_FILESIZE:
+ g_value_set_ulong (value, priv->filesize);
+ break;
+ case PROP_CONTENT_TYPE:
+ g_value_set_string (value, priv->content_type);
+ break;
+ case PROP_MEDIUM:
+ g_value_set_enum (value, priv->medium);
+ break;
+ case PROP_IS_DEFAULT:
+ g_value_set_boolean (value, priv->is_default);
+ break;
+ case PROP_EXPRESSION:
+ g_value_set_enum (value, priv->expression);
+ break;
+ case PROP_DURATION:
+ g_value_set_int64 (value, priv->duration);
+ break;
+ case PROP_HEIGHT:
+ g_value_set_uint (value, priv->height);
+ break;
+ case PROP_WIDTH:
+ g_value_set_uint (value, priv->width);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ GDataMediaContentPrivate *priv = GDATA_MEDIA_CONTENT (parsable)->priv;
+ xmlChar *uri, *expression, *medium, *duration, *filesize, *height, *width;
+ gboolean is_default_bool;
+ GDataMediaExpression expression_enum;
+ GDataMediaMedium medium_enum;
+ guint height_uint, width_uint;
+ gint64 duration_int64;
+ gulong filesize_ulong;
+
+ /* Parse isDefault */
+ if (gdata_parser_boolean_from_property (root_node, "isDefault", &is_default_bool, 0, error) == FALSE)
+ return FALSE;
+
+ /* Parse expression */
+ expression = xmlGetProp (root_node, (xmlChar*) "expression");
+ if (expression == NULL || xmlStrcmp (expression, (xmlChar*) "full") == 0) {
+ expression_enum = GDATA_MEDIA_EXPRESSION_FULL;
+ } else if (xmlStrcmp (expression, (xmlChar*) "sample") == 0) {
+ expression_enum = GDATA_MEDIA_EXPRESSION_SAMPLE;
+ } else if (xmlStrcmp (expression, (xmlChar*) "nonstop") == 0) {
+ expression_enum = GDATA_MEDIA_EXPRESSION_NONSTOP;
+ } else {
+ gdata_parser_error_unknown_property_value (root_node, "expression", (gchar*) expression, error);
+ xmlFree (expression);
+ return FALSE;
+ }
+ xmlFree (expression);
+
+ /* Parse medium */
+ medium = xmlGetProp (root_node, (xmlChar*) "medium");
+ if (medium == NULL) {
+ medium_enum = GDATA_MEDIA_UNKNOWN;
+ } else if (xmlStrcmp (medium, (xmlChar*) "image") == 0) {
+ medium_enum = GDATA_MEDIA_IMAGE;
+ } else if (xmlStrcmp (medium, (xmlChar*) "audio") == 0) {
+ medium_enum = GDATA_MEDIA_AUDIO;
+ } else if (xmlStrcmp (medium, (xmlChar*) "video") == 0) {
+ medium_enum = GDATA_MEDIA_VIDEO;
+ } else if (xmlStrcmp (medium, (xmlChar*) "document") == 0) {
+ medium_enum = GDATA_MEDIA_DOCUMENT;
+ } else if (xmlStrcmp (medium, (xmlChar*) "executable") == 0) {
+ medium_enum = GDATA_MEDIA_EXECUTABLE;
+ } else {
+ gdata_parser_error_unknown_property_value (root_node, "medium", (gchar*) medium, error);
+ xmlFree (medium);
+ return FALSE;
+ }
+ xmlFree (medium);
+
+ /* Parse duration */
+ duration = xmlGetProp (root_node, (xmlChar*) "duration");
+ duration_int64 = (duration == NULL) ? 0 : g_ascii_strtoll ((gchar*) duration, NULL, 10);
+ xmlFree (duration);
+
+ /* Parse filesize */
+ filesize = xmlGetProp (root_node, (xmlChar*) "fileSize");
+ filesize_ulong = (filesize == NULL) ? 0 : g_ascii_strtoull ((gchar*) filesize, NULL, 10);
+ xmlFree (filesize);
+
+ /* Parse height and width */
+ height = xmlGetProp (root_node, (xmlChar*) "height");
+ height_uint = (height == NULL) ? 0 : g_ascii_strtoull ((gchar*) height, NULL, 10);
+ xmlFree (height);
+
+ width = xmlGetProp (root_node, (xmlChar*) "width");
+ width_uint = (width == NULL) ? 0 : g_ascii_strtoull ((gchar*) width, NULL, 10);
+ xmlFree (width);
+
+ /* Other properties */
+ uri = xmlGetProp (root_node, (xmlChar*) "url");
+ if (uri != NULL && *uri == '\0') {
+ xmlFree (uri);
+ return gdata_parser_error_required_property_missing (root_node, "url", error);
+ }
+
+ priv->uri = (gchar*) uri;
+ priv->filesize = filesize_ulong;
+ priv->content_type = (gchar*) xmlGetProp (root_node, (xmlChar*) "type");
+ priv->medium = medium_enum;
+ priv->is_default = is_default_bool;
+ priv->expression = expression_enum;
+ priv->duration = duration_int64;
+ priv->height = height_uint;
+ priv->width = width_uint;
+
+ return TRUE;
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ g_hash_table_insert (namespaces, (gchar*) "media", (gchar*) "http://search.yahoo.com/mrss/");
+}
+
+/**
+ * gdata_media_content_get_uri:
+ * @self: a #GDataMediaContent
+ *
+ * Gets the #GDataMediaContent:uri property.
+ *
+ * Return value: the content's URI
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_media_content_get_uri (GDataMediaContent *self)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_CONTENT (self), NULL);
+ return self->priv->uri;
+}
+
+/**
+ * gdata_media_content_get_filesize:
+ * @self: a #GDataMediaContent
+ *
+ * Gets the #GDataMediaContent:filesize property.
+ *
+ * Return value: the number of bytes in the content, or <code class="literal">0</code>
+ *
+ * Since: 0.4.0
+ */
+gsize
+gdata_media_content_get_filesize (GDataMediaContent *self)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_CONTENT (self), 0);
+ return self->priv->filesize;
+}
+
+/**
+ * gdata_media_content_get_content_type:
+ * @self: a #GDataMediaContent
+ *
+ * Gets the #GDataMediaContent:content-type property.
+ *
+ * Return value: the content's content (MIME) type, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_media_content_get_content_type (GDataMediaContent *self)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_CONTENT (self), NULL);
+ return self->priv->content_type;
+}
+
+/**
+ * gdata_media_content_get_medium:
+ * @self: a #GDataMediaContent
+ *
+ * Gets the #GDataMediaContent:medium property.
+ *
+ * Return value: the type of the content, or %GDATA_MEDIA_UNKNOWN
+ *
+ * Since: 0.4.0
+ */
+GDataMediaMedium
+gdata_media_content_get_medium (GDataMediaContent *self)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_CONTENT (self), GDATA_MEDIA_UNKNOWN);
+ return self->priv->medium;
+}
+
+/**
+ * gdata_media_content_is_default:
+ * @self: a #GDataMediaContent
+ *
+ * Gets the #GDataMediaContent:is-default property.
+ *
+ * Return value: %TRUE if the #GDataMediaContent is the default content for the media group, %FALSE otherwise
+ *
+ * Since: 0.4.0
+ */
+gboolean
+gdata_media_content_is_default (GDataMediaContent *self)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_CONTENT (self), FALSE);
+ return self->priv->is_default;
+}
+
+/**
+ * gdata_media_content_get_expression:
+ * @self: a #GDataMediaContent
+ *
+ * Gets the #GDataMediaContent:expression property.
+ *
+ * Return value: the content's expression, or %GDATA_MEDIA_EXPRESSION_FULL
+ *
+ * Since: 0.4.0
+ */
+GDataMediaExpression
+gdata_media_content_get_expression (GDataMediaContent *self)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_CONTENT (self), GDATA_MEDIA_EXPRESSION_FULL);
+ return self->priv->expression;
+}
+
+/**
+ * gdata_media_content_get_duration:
+ * @self: a #GDataMediaContent
+ *
+ * Gets the #GDataMediaContent:duration property.
+ *
+ * Return value: the content's duration in seconds, or <code class="literal">0</code>
+ *
+ * Since: 0.4.0
+ */
+gint64
+gdata_media_content_get_duration (GDataMediaContent *self)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_CONTENT (self), 0);
+ return self->priv->duration;
+}
+
+/**
+ * gdata_media_content_get_height:
+ * @self: a #GDataMediaContent
+ *
+ * Gets the #GDataMediaContent:height property.
+ *
+ * Return value: the content's height in pixels, or <code class="literal">0</code>
+ *
+ * Since: 0.4.0
+ */
+guint
+gdata_media_content_get_height (GDataMediaContent *self)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_CONTENT (self), 0);
+ return self->priv->height;
+}
+
+/**
+ * gdata_media_content_get_width:
+ * @self: a #GDataMediaContent
+ *
+ * Gets the #GDataMediaContent:width property.
+ *
+ * Return value: the content's width in pixels, or <code class="literal">0</code>
+ *
+ * Since: 0.4.0
+ */
+guint
+gdata_media_content_get_width (GDataMediaContent *self)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_CONTENT (self), 0);
+ return self->priv->width;
+}
+
+/**
+ * gdata_media_content_download:
+ * @self: a #GDataMediaContent
+ * @service: the #GDataService
+ * @cancellable: (allow-none): a #GCancellable for the entire download stream, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Downloads and returns a #GDataDownloadStream allowing the content represented by @self to be read.
+ *
+ * To get the content type of the downloaded data, gdata_download_stream_get_content_type() can be called on the returned #GDataDownloadStream.
+ * Calling gdata_download_stream_get_content_length() on the stream will not return a meaningful result, however, as the stream is encoded in chunks,
+ * rather than by content length.
+ *
+ * In order to cancel the download, a #GCancellable passed in to @cancellable must be cancelled using g_cancellable_cancel(). Cancelling the individual
+ * #GInputStream operations on the #GDataDownloadStream will not cancel the entire download; merely the read or close operation in question. See the
+ * #GDataDownloadStream:cancellable for more details.
+ *
+ * Return value: (transfer full): a #GDataDownloadStream to download the content with, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.8.0
+ */
+GDataDownloadStream *
+gdata_media_content_download (GDataMediaContent *self, GDataService *service, GCancellable *cancellable, GError **error)
+{
+ const gchar *src_uri;
+
+ g_return_val_if_fail (GDATA_IS_MEDIA_CONTENT (self), NULL);
+ g_return_val_if_fail (GDATA_IS_SERVICE (service), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ /* We keep a GError in the argument list so that we can add authentication errors, etc., in future if necessary */
+
+ /* Get the download URI and create a stream for it */
+ src_uri = gdata_media_content_get_uri (self);
+ return GDATA_DOWNLOAD_STREAM (gdata_download_stream_new (service, NULL, src_uri, cancellable));
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_MEDIA_CONTENT_H
+#define GDATA_MEDIA_CONTENT_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-download-stream.h>
+#include <gdata/gdata-parsable.h>
+#include <gdata/gdata-service.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDataMediaExpression:
+ * @GDATA_MEDIA_EXPRESSION_SAMPLE: the media is a sample of a larger video
+ * @GDATA_MEDIA_EXPRESSION_FULL: the media is the full version
+ * @GDATA_MEDIA_EXPRESSION_NONSTOP: the media is a continuous stream
+ *
+ * An enum representing the possible values of #GDataMediaContent:expression.
+ */
+typedef enum {
+ GDATA_MEDIA_EXPRESSION_SAMPLE,
+ GDATA_MEDIA_EXPRESSION_FULL,
+ GDATA_MEDIA_EXPRESSION_NONSTOP
+} GDataMediaExpression;
+
+/**
+ * GDataMediaMedium:
+ * @GDATA_MEDIA_UNKNOWN: the type of the media is unknown
+ * @GDATA_MEDIA_IMAGE: the media is an image
+ * @GDATA_MEDIA_AUDIO: the media is an audio stream
+ * @GDATA_MEDIA_VIDEO: the media is a video
+ * @GDATA_MEDIA_DOCUMENT: the media is another type of document
+ * @GDATA_MEDIA_EXECUTABLE: the media is an executable file
+ *
+ * An enum representing the possible values of #GDataMediaContent:medium.
+ *
+ * Since: 0.4.0
+ */
+typedef enum {
+ GDATA_MEDIA_UNKNOWN,
+ GDATA_MEDIA_IMAGE,
+ GDATA_MEDIA_AUDIO,
+ GDATA_MEDIA_VIDEO,
+ GDATA_MEDIA_DOCUMENT,
+ GDATA_MEDIA_EXECUTABLE
+} GDataMediaMedium;
+
+#define GDATA_TYPE_MEDIA_CONTENT (gdata_media_content_get_type ())
+#define GDATA_MEDIA_CONTENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_MEDIA_CONTENT, GDataMediaContent))
+#define GDATA_MEDIA_CONTENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_MEDIA_CONTENT, GDataMediaContentClass))
+#define GDATA_IS_MEDIA_CONTENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_MEDIA_CONTENT))
+#define GDATA_IS_MEDIA_CONTENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_MEDIA_CONTENT))
+#define GDATA_MEDIA_CONTENT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_MEDIA_CONTENT, GDataMediaContentClass))
+
+typedef struct _GDataMediaContentPrivate GDataMediaContentPrivate;
+
+/**
+ * GDataMediaContent:
+ *
+ * All the fields in the #GDataMediaContent structure are private and should never be accessed directly.
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataMediaContentPrivate *priv;
+} GDataMediaContent;
+
+/**
+ * GDataMediaContentClass:
+ *
+ * All the fields in the #GDataMediaContentClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataMediaContentClass;
+
+GType gdata_media_content_get_type (void) G_GNUC_CONST;
+
+const gchar *gdata_media_content_get_uri (GDataMediaContent *self) G_GNUC_PURE;
+gsize gdata_media_content_get_filesize (GDataMediaContent *self) G_GNUC_PURE;
+const gchar *gdata_media_content_get_content_type (GDataMediaContent *self) G_GNUC_PURE;
+GDataMediaMedium gdata_media_content_get_medium (GDataMediaContent *self) G_GNUC_PURE;
+gboolean gdata_media_content_is_default (GDataMediaContent *self) G_GNUC_PURE;
+GDataMediaExpression gdata_media_content_get_expression (GDataMediaContent *self) G_GNUC_PURE;
+gint64 gdata_media_content_get_duration (GDataMediaContent *self) G_GNUC_PURE;
+guint gdata_media_content_get_height (GDataMediaContent *self) G_GNUC_PURE;
+guint gdata_media_content_get_width (GDataMediaContent *self) G_GNUC_PURE;
+
+GDataDownloadStream *gdata_media_content_download (GDataMediaContent *self, GDataService *service, GCancellable *cancellable,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+G_END_DECLS
+
+#endif /* !GDATA_MEDIA_CONTENT_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-media-credit
+ * @short_description: Media RSS credit element
+ * @stability: Stable
+ * @include: gdata/media/gdata-media-credit.h
+ *
+ * #GDataMediaCredit represents a "credit" element from the
+ * <ulink type="http" url="http://video.search.yahoo.com/mrss">Media RSS specification</ulink>.
+ *
+ * The class only implements parsing, not XML output, at the moment.
+ *
+ * Since: 0.4.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+
+#include "gdata-media-credit.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-types.h"
+
+static void gdata_media_credit_finalize (GObject *object);
+static void gdata_media_credit_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataMediaCreditPrivate {
+ gchar *credit;
+ gchar *scheme;
+ gchar *role;
+};
+
+enum {
+ PROP_CREDIT = 1,
+ PROP_SCHEME,
+ PROP_ROLE
+};
+
+G_DEFINE_TYPE (GDataMediaCredit, gdata_media_credit, GDATA_TYPE_PARSABLE)
+
+static void
+gdata_media_credit_class_init (GDataMediaCreditClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataMediaCreditPrivate));
+
+ gobject_class->get_property = gdata_media_credit_get_property;
+ gobject_class->finalize = gdata_media_credit_finalize;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ parsable_class->parse_xml = parse_xml;
+ parsable_class->get_namespaces = get_namespaces;
+ parsable_class->element_name = "credit";
+ parsable_class->element_namespace = "media";
+
+ /**
+ * GDataMediaCredit:credit:
+ *
+ * The credited entity's name.
+ *
+ * For more information, see the <ulink type="http" url="http://video.search.yahoo.com/mrss">Media RSS specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_CREDIT,
+ g_param_spec_string ("credit",
+ "Credit", "The credited entity's name.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataMediaCredit:scheme:
+ *
+ * A URI that identifies the role scheme.
+ *
+ * For more information, see the <ulink type="http" url="http://video.search.yahoo.com/mrss">Media RSS specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SCHEME,
+ g_param_spec_string ("scheme",
+ "Scheme", "A URI that identifies the role scheme.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataMediaCredit:role:
+ *
+ * The role the credited entity played in the production of the media.
+ *
+ * For more information, see the <ulink type="http" url="http://video.search.yahoo.com/mrss">Media RSS specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_ROLE,
+ g_param_spec_string ("role",
+ "Role", "The role the credited entity played in the production of the media.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_media_credit_init (GDataMediaCredit *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_MEDIA_CREDIT, GDataMediaCreditPrivate);
+}
+
+static void
+gdata_media_credit_finalize (GObject *object)
+{
+ GDataMediaCreditPrivate *priv = GDATA_MEDIA_CREDIT (object)->priv;
+
+ g_free (priv->credit);
+ g_free (priv->scheme);
+ g_free (priv->role);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_media_credit_parent_class)->finalize (object);
+}
+
+static void
+gdata_media_credit_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataMediaCreditPrivate *priv = GDATA_MEDIA_CREDIT (object)->priv;
+
+ switch (property_id) {
+ case PROP_CREDIT:
+ g_value_set_string (value, priv->credit);
+ break;
+ case PROP_SCHEME:
+ g_value_set_string (value, priv->scheme);
+ break;
+ case PROP_ROLE:
+ g_value_set_string (value, priv->role);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ GDataMediaCreditPrivate *priv = GDATA_MEDIA_CREDIT (parsable)->priv;
+ xmlChar *credit;
+ gchar *scheme;
+ guint i;
+
+ credit = xmlNodeListGetString (doc, root_node->children, TRUE);
+ if (credit == NULL || *credit == '\0') {
+ xmlFree (credit);
+ return gdata_parser_error_required_content_missing (root_node, error);
+ }
+
+ scheme = (gchar*) xmlGetProp (root_node, (xmlChar*) "scheme");
+ if (scheme != NULL && *scheme == '\0') {
+ g_free (scheme);
+ xmlFree (credit);
+ return gdata_parser_error_required_property_missing (root_node, "scheme", error);
+ } else if (scheme == NULL) {
+ /* Default */
+ scheme = g_strdup ("urn:ebu");
+ }
+
+ priv->credit = (gchar*) credit;
+ priv->scheme = scheme;
+ priv->role = (gchar*) xmlGetProp (root_node, (xmlChar*) "role");
+
+ /* Convert the role to lower case */
+ if (priv->role != NULL) {
+ for (i = 0; priv->role[i] != '\0'; i++)
+ priv->role[i] = g_ascii_tolower (priv->role[i]);
+ }
+
+ return TRUE;
+}
+
+static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ /* Textual content's handled in pre_parse_xml */
+ if (node->type != XML_ELEMENT_NODE)
+ return TRUE;
+
+ return GDATA_PARSABLE_CLASS (gdata_media_credit_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ g_hash_table_insert (namespaces, (gchar*) "media", (gchar*) "http://search.yahoo.com/mrss/");
+}
+
+/**
+ * gdata_media_credit_get_credit:
+ * @self: a #GDataMediaCredit
+ *
+ * Gets the #GDataMediaCredit:credit property.
+ *
+ * Return value: the name of the credited entity
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_media_credit_get_credit (GDataMediaCredit *self)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_CREDIT (self), NULL);
+ return self->priv->credit;
+}
+
+/**
+ * gdata_media_credit_get_scheme:
+ * @self: a #GDataMediaCredit
+ *
+ * Gets the #GDataMediaCredit:scheme property.
+ *
+ * Return value: the credit's role scheme, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_media_credit_get_scheme (GDataMediaCredit *self)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_CREDIT (self), NULL);
+ return self->priv->scheme;
+}
+
+/**
+ * gdata_media_credit_get_role:
+ * @self: a #GDataMediaCredit
+ *
+ * Gets the #GDataMediaCredit:role property.
+ *
+ * Return value: the credited entity's role, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_media_credit_get_role (GDataMediaCredit *self)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_CREDIT (self), NULL);
+ return self->priv->role;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_MEDIA_CREDIT_H
+#define GDATA_MEDIA_CREDIT_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_MEDIA_CREDIT (gdata_media_credit_get_type ())
+#define GDATA_MEDIA_CREDIT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_MEDIA_CREDIT, GDataMediaCredit))
+#define GDATA_MEDIA_CREDIT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_MEDIA_CREDIT, GDataMediaCreditClass))
+#define GDATA_IS_MEDIA_CREDIT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_MEDIA_CREDIT))
+#define GDATA_IS_MEDIA_CREDIT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_MEDIA_CREDIT))
+#define GDATA_MEDIA_CREDIT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_MEDIA_CREDIT, GDataMediaCreditClass))
+
+typedef struct _GDataMediaCreditPrivate GDataMediaCreditPrivate;
+
+/**
+ * GDataMediaCredit:
+ *
+ * All the fields in the #GDataMediaCredit structure are private and should never be accessed directly.
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataMediaCreditPrivate *priv;
+} GDataMediaCredit;
+
+/**
+ * GDataMediaCreditClass:
+ *
+ * All the fields in the #GDataMediaCreditClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataMediaCreditClass;
+
+GType gdata_media_credit_get_type (void) G_GNUC_CONST;
+
+const gchar *gdata_media_credit_get_credit (GDataMediaCredit *self) G_GNUC_PURE;
+const gchar *gdata_media_credit_get_scheme (GDataMediaCredit *self) G_GNUC_PURE;
+const gchar *gdata_media_credit_get_role (GDataMediaCredit *self) G_GNUC_PURE;
+
+G_END_DECLS
+
+#endif /* !GDATA_MEDIA_CREDIT_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * SECTION:gdata-media-group
+ * @short_description: Media RSS group element
+ * @stability: Stable
+ * @include: gdata/media/gdata-media-group.h
+ *
+ * #GDataMediaGroup represents a "group" element from the
+ * <ulink type="http" url="http://video.search.yahoo.com/mrss">Media RSS specification</ulink>.
+ *
+ * It is private API, since implementing classes are likely to proxy the properties and functions
+ * of #GDataMediaGroup as appropriate; most entry types which implement #GDataMediaGroup have no use
+ * for most of its properties, and it would be unnecessary and confusing to expose #GDataMediaGroup itself.
+ *
+ * For this reason, properties have not been implemented on #GDataMediaGroup (yet).
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+#include <string.h>
+
+#include "gdata-media-group.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-private.h"
+#include "media/gdata-media-category.h"
+#include "media/gdata-media-credit.h"
+#include "media/gdata-media-thumbnail.h"
+
+static void gdata_media_group_dispose (GObject *object);
+static void gdata_media_group_finalize (GObject *object);
+static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error);
+static void get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataMediaGroupPrivate {
+ gchar **keywords;
+ gchar *player_uri;
+ GHashTable *restricted_countries;
+ gchar *simple_rating;
+ gchar *mpaa_rating;
+ gchar *v_chip_rating;
+ GList *thumbnails; /* GDataMediaThumbnail */
+ gchar *title;
+ GDataMediaCategory *category;
+ GList *contents; /* GDataMediaContent */
+ GDataMediaCredit *credit;
+ gchar *description;
+};
+
+G_DEFINE_TYPE (GDataMediaGroup, gdata_media_group, GDATA_TYPE_PARSABLE)
+
+static void
+gdata_media_group_class_init (GDataMediaGroupClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataMediaGroupPrivate));
+
+ gobject_class->dispose = gdata_media_group_dispose;
+ gobject_class->finalize = gdata_media_group_finalize;
+
+ parsable_class->parse_xml = parse_xml;
+ parsable_class->get_xml = get_xml;
+ parsable_class->get_namespaces = get_namespaces;
+ parsable_class->element_name = "group";
+ parsable_class->element_namespace = "media";
+}
+
+static void
+gdata_media_group_init (GDataMediaGroup *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_MEDIA_GROUP, GDataMediaGroupPrivate);
+ self->priv->restricted_countries = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+}
+
+static void
+gdata_media_group_dispose (GObject *object)
+{
+ GDataMediaGroupPrivate *priv = GDATA_MEDIA_GROUP (object)->priv;
+
+ if (priv->category != NULL)
+ g_object_unref (priv->category);
+ priv->category = NULL;
+
+ if (priv->credit != NULL)
+ g_object_unref (priv->credit);
+ priv->credit = NULL;
+
+ g_list_free_full (priv->contents, g_object_unref);
+ priv->contents = NULL;
+
+ g_list_free_full (priv->thumbnails, g_object_unref);
+ priv->thumbnails = NULL;
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_media_group_parent_class)->dispose (object);
+}
+
+static void
+gdata_media_group_finalize (GObject *object)
+{
+ GDataMediaGroupPrivate *priv = GDATA_MEDIA_GROUP (object)->priv;
+
+ g_strfreev (priv->keywords);
+ g_free (priv->player_uri);
+ g_free (priv->v_chip_rating);
+ g_free (priv->mpaa_rating);
+ g_free (priv->simple_rating);
+ g_hash_table_destroy (priv->restricted_countries);
+ g_free (priv->title);
+ g_free (priv->description);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_media_group_parent_class)->finalize (object);
+}
+
+static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ gboolean success;
+ GDataMediaGroup *self = GDATA_MEDIA_GROUP (parsable);
+
+ if (gdata_parser_is_namespace (node, "http://search.yahoo.com/mrss/") == TRUE) {
+ if (gdata_parser_string_from_element (node, "title", P_NONE, &(self->priv->title), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "description", P_NONE, &(self->priv->description), &success, error) == TRUE ||
+ gdata_parser_object_from_element_setter (node, "category", P_REQUIRED, GDATA_TYPE_MEDIA_CATEGORY,
+ gdata_media_group_set_category, self, &success, error) == TRUE ||
+ gdata_parser_object_from_element_setter (node, "content", P_REQUIRED, GDATA_TYPE_MEDIA_CONTENT,
+ _gdata_media_group_add_content, self, &success, error) == TRUE ||
+ gdata_parser_object_from_element_setter (node, "thumbnail", P_REQUIRED, GDATA_TYPE_MEDIA_THUMBNAIL,
+ _gdata_media_group_add_thumbnail, self, &success, error) == TRUE ||
+ gdata_parser_object_from_element (node, "credit", P_REQUIRED | P_NO_DUPES, GDATA_TYPE_MEDIA_CREDIT,
+ &(self->priv->credit), &success, error) == TRUE) {
+ return success;
+ } else if (xmlStrcmp (node->name, (xmlChar*) "keywords") == 0) {
+ /* media:keywords */
+ guint i;
+ xmlChar *text = xmlNodeListGetString (node->doc, node->children, TRUE);
+
+ g_strfreev (self->priv->keywords);
+ if (text == NULL) {
+ self->priv->keywords = NULL;
+ return TRUE;
+ }
+
+ self->priv->keywords = g_strsplit ((gchar*) text, ",", -1);
+ xmlFree (text);
+
+ for (i = 0; self->priv->keywords[i] != NULL; i++) {
+ gchar *comma, *start = self->priv->keywords[i];
+ gchar *end = start + strlen (start);
+
+ /* Strip any whitespace from the ends of the keyword */
+ g_strstrip (start);
+
+ /* Unescape any %2Cs in the keyword to commas in-place */
+ while ((comma = g_strstr_len (start, -1, "%2C")) != NULL) {
+ /* Unescape the comma */
+ *comma = ',';
+
+ /* Move forwards, skipping the comma */
+ comma++;
+ end -= 2;
+
+ /* Shift the remainder of the string downwards */
+ memmove (comma, comma + 2, end - comma);
+ *end = '\0';
+ }
+ }
+ } else if (xmlStrcmp (node->name, (xmlChar*) "player") == 0) {
+ /* media:player */
+ xmlChar *player_uri = xmlGetProp (node, (xmlChar*) "url");
+ g_free (self->priv->player_uri);
+ self->priv->player_uri = (gchar*) player_uri;
+ } else if (xmlStrcmp (node->name, (xmlChar*) "rating") == 0) {
+ /* media:rating */
+ xmlChar *scheme;
+
+ /* The possible schemes are defined here:
+ * • http://video.search.yahoo.com/mrss
+ * • http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_media:rating
+ */
+ scheme = xmlGetProp (node, (xmlChar*) "scheme");
+
+ if (scheme == NULL || xmlStrcmp (scheme, (xmlChar*) "urn:simple") == 0) {
+ /* Options: adult, nonadult */
+ gdata_parser_string_from_element (node, "rating", P_REQUIRED | P_NON_EMPTY, &(self->priv->simple_rating),
+ &success, error);
+ } else if (xmlStrcmp (scheme, (xmlChar*) "urn:mpaa") == 0) {
+ /* Options: g, pg, pg-13, r, nc-17 */
+ gdata_parser_string_from_element (node, "rating", P_REQUIRED | P_NON_EMPTY, &(self->priv->mpaa_rating),
+ &success, error);
+ } else if (xmlStrcmp (scheme, (xmlChar*) "urn:v-chip") == 0) {
+ /* Options: tv-y, tv-y7, tv-y7-fv, tv-g, tv-pg, tv-14, tv-ma */
+ gdata_parser_string_from_element (node, "rating", P_REQUIRED | P_NON_EMPTY, &(self->priv->v_chip_rating),
+ &success, error);
+ } else if (xmlStrcmp (scheme, (xmlChar*) "http://gdata.youtube.com/schemas/2007#mediarating") == 0) {
+ /* No content, but we do get a list of countries. There's nothing like overloading the semantics of XML elements
+ * to brighten up one's day. */
+ xmlChar *countries;
+
+ countries = xmlGetProp (node, (xmlChar*) "country");
+
+ if (countries != NULL) {
+ gchar **country_list, **country;
+
+ /* It's either a comma-separated list of countries, or the value "all" */
+ country_list = g_strsplit ((const gchar*) countries, ",", -1);
+ xmlFree (countries);
+
+ /* Add all the listed countries to the restricted countries table */
+ for (country = country_list; *country != NULL; country++) {
+ g_hash_table_insert (self->priv->restricted_countries, *country, GUINT_TO_POINTER (TRUE));
+ }
+
+ g_free (country_list);
+ } else {
+ /* Assume it's restricted in all countries */
+ g_hash_table_insert (self->priv->restricted_countries, g_strdup ("all"), GUINT_TO_POINTER (TRUE));
+ }
+
+ success = TRUE;
+ } else {
+ /* Error */
+ gdata_parser_error_unknown_property_value (node, "scheme", (gchar*) scheme, error);
+ success = FALSE;
+ }
+
+ xmlFree (scheme);
+
+ return success;
+ } else if (xmlStrcmp (node->name, (xmlChar*) "restriction") == 0) {
+ /* media:restriction */
+ xmlChar *type, *countries, *relationship;
+ gchar **country_list, **country;
+ gboolean relationship_bool;
+
+ /* Check the type property is "country" */
+ type = xmlGetProp (node, (xmlChar*) "type");
+ if (xmlStrcmp (type, (xmlChar*) "country") != 0) {
+ gdata_parser_error_unknown_property_value (node, "type", (gchar*) type, error);
+ xmlFree (type);
+ return FALSE;
+ }
+ xmlFree (type);
+
+ relationship = xmlGetProp (node, (xmlChar*) "relationship");
+ if (xmlStrcmp (relationship, (xmlChar*) "allow") == 0) {
+ relationship_bool = FALSE; /* it's *not* a restricted country */
+ } else if (xmlStrcmp (relationship, (xmlChar*) "deny") == 0) {
+ relationship_bool = TRUE; /* it *is* a restricted country */
+ } else {
+ gdata_parser_error_unknown_property_value (node, "relationship", (gchar*) relationship, error);
+ xmlFree (relationship);
+ return FALSE;
+ }
+ xmlFree (relationship);
+
+ countries = xmlNodeListGetString (doc, node->children, TRUE);
+ country_list = g_strsplit ((const gchar*) countries, " ", -1);
+ xmlFree (countries);
+
+ /* Add "all" to the table, since it's an exception table */
+ g_hash_table_insert (self->priv->restricted_countries, g_strdup ("all"), GUINT_TO_POINTER (!relationship_bool));
+
+ /* Add all the listed countries to the restricted countries table */
+ for (country = country_list; *country != NULL; country++)
+ g_hash_table_insert (self->priv->restricted_countries, *country, GUINT_TO_POINTER (relationship_bool));
+ g_free (country_list);
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_media_group_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ }
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_media_group_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ }
+
+ return TRUE;
+}
+
+static void
+get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataMediaGroupPrivate *priv = GDATA_MEDIA_GROUP (parsable)->priv;
+
+ /* Media category */
+ if (priv->category != NULL)
+ _gdata_parsable_get_xml (GDATA_PARSABLE (priv->category), xml_string, FALSE);
+
+ if (priv->title != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<media:title type='plain'>", priv->title, "</media:title>");
+
+ if (priv->description != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<media:description type='plain'>", priv->description, "</media:description>");
+
+ if (priv->keywords != NULL) {
+ guint i;
+
+ g_string_append (xml_string, "<media:keywords>");
+
+ /* Add each keyword to the text content, comma-separated from the previous one */
+ for (i = 0; priv->keywords[i] != NULL; i++) {
+ const gchar *comma, *start = priv->keywords[i];
+
+ /* Delimit the previous keyword */
+ if (i != 0)
+ g_string_append_c (xml_string, ',');
+
+ /* Escape any commas in the keyword to %2C */
+ while ((comma = g_utf8_strchr (start, -1, ',')) != NULL) {
+ /* Copy the span */
+ gchar *span = g_strndup (start, comma - start);
+ gdata_parser_string_append_escaped (xml_string, NULL, span, NULL);
+ g_free (span);
+
+ /* Add an escaped comma */
+ g_string_append (xml_string, "%2C");
+
+ /* Move forwards, skipping the comma */
+ start = comma + 1;
+ }
+
+ /* Append the rest of the string (the entire string if there were no commas) */
+ gdata_parser_string_append_escaped (xml_string, NULL, start, NULL);
+ }
+
+ g_string_append (xml_string, "</media:keywords>");
+ }
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ g_hash_table_insert (namespaces, (gchar*) "media", (gchar*) "http://search.yahoo.com/mrss/");
+}
+
+/**
+ * gdata_media_group_get_title:
+ * @self: a #GDataMediaGroup
+ *
+ * Gets the #GDataMediaGroup:title property.
+ *
+ * Return value: the group's title, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_media_group_get_title (GDataMediaGroup *self)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_GROUP (self), NULL);
+ return self->priv->title;
+}
+
+/**
+ * gdata_media_group_set_title:
+ * @self: a #GDataMediaGroup
+ * @title: (allow-none): the group's new title, or %NULL
+ *
+ * Sets the #GDataMediaGroup:title property to @title.
+ *
+ * Set @title to %NULL to unset the property.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_media_group_set_title (GDataMediaGroup *self, const gchar *title)
+{
+ g_return_if_fail (GDATA_IS_MEDIA_GROUP (self));
+ g_free (self->priv->title);
+ self->priv->title = g_strdup (title);
+}
+
+/**
+ * gdata_media_group_get_description:
+ * @self: a #GDataMediaGroup
+ *
+ * Gets the #GDataMediaGroup:description property.
+ *
+ * Return value: the group's description, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_media_group_get_description (GDataMediaGroup *self)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_GROUP (self), NULL);
+ return self->priv->description;
+}
+
+/**
+ * gdata_media_group_set_description:
+ * @self: a #GDataMediaGroup
+ * @description: (allow-none): the group's new description, or %NULL
+ *
+ * Sets the #GDataMediaGroup:description property to @description.
+ *
+ * Set @description to %NULL to unset the property.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_media_group_set_description (GDataMediaGroup *self, const gchar *description)
+{
+ g_return_if_fail (GDATA_IS_MEDIA_GROUP (self));
+ g_free (self->priv->description);
+ self->priv->description = g_strdup (description);
+}
+
+/**
+ * gdata_media_group_get_keywords:
+ * @self: a #GDataMediaGroup
+ *
+ * Gets the #GDataMediaGroup:keywords property.
+ *
+ * Return value: (array zero-terminated=1): a %NULL-terminated array of the group's keywords, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar * const *
+gdata_media_group_get_keywords (GDataMediaGroup *self)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_GROUP (self), NULL);
+ return (const gchar * const *) self->priv->keywords;
+}
+
+/**
+ * gdata_media_group_set_keywords:
+ * @self: a #GDataMediaGroup
+ * @keywords: (array zero-terminated=1) (allow-none): a %NULL-terminated array of the group's new keywords, or %NULL
+ *
+ * Sets the #GDataMediaGroup:keywords property to @keywords.
+ *
+ * Set @keywords to %NULL to unset the property.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_media_group_set_keywords (GDataMediaGroup *self, const gchar * const *keywords)
+{
+ g_return_if_fail (GDATA_IS_MEDIA_GROUP (self));
+ g_strfreev (self->priv->keywords);
+ self->priv->keywords = g_strdupv ((gchar**) keywords);
+}
+
+/**
+ * gdata_media_group_get_category:
+ * @self: a #GDataMediaGroup
+ *
+ * Gets the #GDataMediaGroup:category property.
+ *
+ * Return value: a #GDataMediaCategory giving the group's category, or %NULL
+ */
+GDataMediaCategory *
+gdata_media_group_get_category (GDataMediaGroup *self)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_GROUP (self), NULL);
+ return self->priv->category;
+}
+
+/**
+ * gdata_media_group_set_category:
+ * @self: a #GDataMediaGroup
+ * @category: (allow-none): a new #GDataMediaCategory, or %NULL
+ *
+ * Sets the #GDataMediaGroup:category property to @category, and increments its reference count.
+ */
+void
+gdata_media_group_set_category (GDataMediaGroup *self, GDataMediaCategory *category)
+{
+ g_return_if_fail (GDATA_IS_MEDIA_GROUP (self));
+ g_return_if_fail (category == NULL || GDATA_IS_MEDIA_CATEGORY (category));
+
+ if (self->priv->category != NULL)
+ g_object_unref (self->priv->category);
+ self->priv->category = (category == NULL) ? NULL : g_object_ref (category);
+}
+
+static gint
+content_compare_cb (const GDataMediaContent *content, const gchar *type)
+{
+ return strcmp (gdata_media_content_get_content_type ((GDataMediaContent*) content), type);
+}
+
+/**
+ * gdata_media_group_look_up_content:
+ * @self: a #GDataMediaGroup
+ * @type: the MIME type of the content desired
+ *
+ * Looks up a #GDataMediaContent from the group with the given MIME type. The group's list of contents is
+ * a list of URIs to various formats of the group content itself, such as the SWF URI or RTSP stream for a video.
+ *
+ * Return value: (transfer none): a #GDataMediaContent matching @type, or %NULL
+ */
+GDataMediaContent *
+gdata_media_group_look_up_content (GDataMediaGroup *self, const gchar *type)
+{
+ GList *element;
+
+ g_return_val_if_fail (GDATA_IS_MEDIA_GROUP (self), NULL);
+ g_return_val_if_fail (type != NULL, NULL);
+
+ /* TODO: If type is required, and is unique, the contents can be stored in a hash table rather than a linked list */
+ element = g_list_find_custom (self->priv->contents, type, (GCompareFunc) content_compare_cb);
+ if (element == NULL)
+ return NULL;
+ return GDATA_MEDIA_CONTENT (element->data);
+}
+
+/**
+ * gdata_media_group_get_contents:
+ * @self: a #GDataMediaGroup
+ *
+ * Returns a list of #GDataMediaContents, giving the content enclosed by the group.
+ *
+ * Return value: (element-type GData.MediaContent) (transfer none): a #GList of #GDataMediaContents, or %NULL
+ */
+GList *
+gdata_media_group_get_contents (GDataMediaGroup *self)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_GROUP (self), NULL);
+ return self->priv->contents;
+}
+
+void
+_gdata_media_group_add_content (GDataMediaGroup *self, GDataMediaContent *content)
+{
+ g_return_if_fail (GDATA_IS_MEDIA_GROUP (self));
+ g_return_if_fail (GDATA_IS_MEDIA_CONTENT (content));
+ self->priv->contents = g_list_prepend (self->priv->contents, g_object_ref (content));
+}
+
+/**
+ * gdata_media_group_get_credit:
+ * @self: a #GDataMediaGroup
+ *
+ * Gets the #GDataMediaGroup:credit property.
+ *
+ * Return value: a #GDataMediaCredit giving information on whom to credit for the media group, or %NULL
+ */
+GDataMediaCredit *
+gdata_media_group_get_credit (GDataMediaGroup *self)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_GROUP (self), NULL);
+ return self->priv->credit;
+}
+
+void
+_gdata_media_group_set_credit (GDataMediaGroup *self, GDataMediaCredit *credit)
+{
+ g_return_if_fail (GDATA_IS_MEDIA_GROUP (self));
+ g_return_if_fail (credit == NULL ||GDATA_IS_MEDIA_CREDIT (credit));
+
+ if (self->priv->credit != NULL)
+ g_object_unref (self->priv->credit);
+ self->priv->credit = g_object_ref (credit);
+}
+
+/**
+ * gdata_media_group_get_media_group:
+ * @self: a #GDataMediaGroup
+ *
+ * Gets the #GDataMediaGroup:player-uri property.
+ *
+ * Return value: a URI where the media group is playable in a web browser, or %NULL
+ */
+const gchar *
+gdata_media_group_get_player_uri (GDataMediaGroup *self)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_GROUP (self), NULL);
+ return self->priv->player_uri;
+}
+
+/**
+ * gdata_media_group_is_restricted_in_country:
+ * @self: a #GDataMediaGroup
+ * @country: an ISO 3166 two-letter country code to check
+ *
+ * Checks whether viewing of the media is restricted in @country, either by its content rating, or by the request of the producer.
+ * The return value from this function is purely informational, and no obligation is assumed.
+ *
+ * Return value: %TRUE if the media is restricted in @country, %FALSE otherwise
+ */
+gboolean
+gdata_media_group_is_restricted_in_country (GDataMediaGroup *self, const gchar *country)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_GROUP (self), FALSE);
+ g_return_val_if_fail (country != NULL && *country != '\0', FALSE);
+
+ if (GPOINTER_TO_UINT (g_hash_table_lookup (self->priv->restricted_countries, country)) == TRUE)
+ return TRUE;
+
+ return GPOINTER_TO_UINT (g_hash_table_lookup (self->priv->restricted_countries, "all"));
+}
+
+/**
+ * gdata_media_group_get_media_rating:
+ * @self: a #GDataMediaGroup
+ * @rating_type: the type of rating to retrieve
+ *
+ * Returns the rating of the given type for the media, if one exists. For example, this could be a film rating awarded by the MPAA.
+ * The valid values for @rating_type are: <code class="literal">simple</code>, <code class="literal">mpaa</code> and
+ * <code class="literal">v-chip</code>.
+ *
+ * The rating values returned for each of these rating types are string as defined in the
+ * <ulink type="http" url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_media:rating">YouTube documentation</ulink> and
+ * <ulink type="http" url="http://video.search.yahoo.com/mrss">MRSS specification</ulink>.
+ *
+ * Return value: rating for the given rating type, or %NULL if the media has no rating for that type (or the type is invalid)
+ */
+const gchar *
+gdata_media_group_get_media_rating (GDataMediaGroup *self, const gchar *rating_type)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_GROUP (self), NULL);
+ g_return_val_if_fail (rating_type != NULL && *rating_type != '\0', NULL);
+
+ if (strcmp (rating_type, "simple") == 0) {
+ return self->priv->simple_rating;
+ } else if (strcmp (rating_type, "mpaa") == 0) {
+ return self->priv->mpaa_rating;
+ } else if (strcmp (rating_type, "v-chip") == 0) {
+ return self->priv->v_chip_rating;
+ }
+
+ return NULL;
+}
+
+/**
+ * gdata_media_group_get_thumbnails:
+ * @self: a #GDataMediaGroup
+ *
+ * Gets a list of the thumbnails available for the group.
+ *
+ * Return value: (element-type GData.MediaThumbnail) (transfer none): a #GList of #GDataMediaThumbnails, or %NULL
+ */
+GList *
+gdata_media_group_get_thumbnails (GDataMediaGroup *self)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_GROUP (self), NULL);
+ return self->priv->thumbnails;
+}
+
+void
+_gdata_media_group_add_thumbnail (GDataMediaGroup *self, GDataMediaThumbnail *thumbnail)
+{
+ g_return_if_fail (GDATA_IS_MEDIA_GROUP (self));
+ g_return_if_fail (GDATA_IS_MEDIA_THUMBNAIL (thumbnail));
+ self->priv->thumbnails = g_list_prepend (self->priv->thumbnails, g_object_ref (thumbnail));
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_MEDIA_GROUP_H
+#define GDATA_MEDIA_GROUP_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+#include <gdata/media/gdata-media-category.h>
+#include <gdata/media/gdata-media-content.h>
+#include <gdata/media/gdata-media-credit.h>
+#include <gdata/media/gdata-media-thumbnail.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_MEDIA_GROUP (gdata_media_group_get_type ())
+#define GDATA_MEDIA_GROUP(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_MEDIA_GROUP, GDataMediaGroup))
+#define GDATA_MEDIA_GROUP_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_MEDIA_GROUP, GDataMediaGroupClass))
+#define GDATA_IS_MEDIA_GROUP(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_MEDIA_GROUP))
+#define GDATA_IS_MEDIA_GROUP_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_MEDIA_GROUP))
+#define GDATA_MEDIA_GROUP_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_MEDIA_GROUP, GDataMediaGroupClass))
+
+typedef struct _GDataMediaGroupPrivate GDataMediaGroupPrivate;
+
+/**
+ * GDataMediaGroup:
+ *
+ * All the fields in the #GDataMediaGroup structure are private and should never be accessed directly.
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataMediaGroupPrivate *priv;
+} GDataMediaGroup;
+
+/**
+ * GDataMediaGroupClass:
+ *
+ * All the fields in the #GDataMediaGroupClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataMediaGroupClass;
+
+GType gdata_media_group_get_type (void) G_GNUC_CONST;
+
+const gchar *gdata_media_group_get_title (GDataMediaGroup *self) G_GNUC_PURE;
+void gdata_media_group_set_title (GDataMediaGroup *self, const gchar *title);
+const gchar *gdata_media_group_get_description (GDataMediaGroup *self) G_GNUC_PURE;
+void gdata_media_group_set_description (GDataMediaGroup *self, const gchar *description);
+const gchar * const *gdata_media_group_get_keywords (GDataMediaGroup *self) G_GNUC_PURE;
+void gdata_media_group_set_keywords (GDataMediaGroup *self, const gchar * const *keywords);
+GDataMediaCategory *gdata_media_group_get_category (GDataMediaGroup *self) G_GNUC_PURE;
+void gdata_media_group_set_category (GDataMediaGroup *self, GDataMediaCategory *category);
+GDataMediaContent *gdata_media_group_look_up_content (GDataMediaGroup *self, const gchar *type) G_GNUC_PURE;
+GList *gdata_media_group_get_contents (GDataMediaGroup *self) G_GNUC_PURE;
+void _gdata_media_group_add_content (GDataMediaGroup *self, GDataMediaContent *content);
+GDataMediaCredit *gdata_media_group_get_credit (GDataMediaGroup *self) G_GNUC_PURE;
+void _gdata_media_group_set_credit (GDataMediaGroup *self, GDataMediaCredit *credit);
+const gchar *gdata_media_group_get_player_uri (GDataMediaGroup *self) G_GNUC_PURE;
+gboolean gdata_media_group_is_restricted_in_country (GDataMediaGroup *self, const gchar *country) G_GNUC_PURE;
+const gchar *gdata_media_group_get_media_rating (GDataMediaGroup *self, const gchar *rating_type) G_GNUC_PURE;
+GList *gdata_media_group_get_thumbnails (GDataMediaGroup *self) G_GNUC_PURE;
+void _gdata_media_group_add_thumbnail (GDataMediaGroup *self, GDataMediaThumbnail *thumbnail);
+
+G_END_DECLS
+
+#endif /* !GDATA_MEDIA_GROUP_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-media-thumbnail
+ * @short_description: Media RSS thumbnail element
+ * @stability: Stable
+ * @include: gdata/media/gdata-media-thumbnail.h
+ *
+ * #GDataMediaThumbnail represents a "thumbnail" element from the
+ * <ulink type="http" url="http://video.search.yahoo.com/mrss">Media RSS specification</ulink>.
+ *
+ * The class only implements parsing, not XML output, at the moment.
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+#include <string.h>
+
+#include "gdata-media-thumbnail.h"
+#include "gdata-download-stream.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-private.h"
+
+static void gdata_media_thumbnail_finalize (GObject *object);
+static void gdata_media_thumbnail_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+static gboolean
+parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data,
+ GError **error);
+
+struct _GDataMediaThumbnailPrivate {
+ gchar *uri;
+ guint height;
+ guint width;
+ gint64 time;
+};
+
+enum {
+ PROP_URI = 1,
+ PROP_HEIGHT,
+ PROP_WIDTH,
+ PROP_TIME
+};
+
+G_DEFINE_TYPE (GDataMediaThumbnail, gdata_media_thumbnail, GDATA_TYPE_PARSABLE)
+
+static void
+gdata_media_thumbnail_class_init (GDataMediaThumbnailClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataMediaThumbnailPrivate));
+
+ gobject_class->get_property = gdata_media_thumbnail_get_property;
+ gobject_class->finalize = gdata_media_thumbnail_finalize;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ parsable_class->get_namespaces = get_namespaces;
+ parsable_class->parse_json = parse_json;
+ parsable_class->element_name = "thumbnail";
+ parsable_class->element_namespace = "media";
+
+ /**
+ * GDataMediaThumbnail:uri:
+ *
+ * The URI of the thumbnail.
+ *
+ * For more information, see the <ulink type="http" url="http://video.search.yahoo.com/mrss">Media RSS specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_URI,
+ g_param_spec_string ("uri",
+ "URI", "The URI of the thumbnail.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataMediaThumbnail:height:
+ *
+ * The height of the thumbnail, in pixels.
+ *
+ * For more information, see the <ulink type="http" url="http://video.search.yahoo.com/mrss">Media RSS specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_HEIGHT,
+ g_param_spec_uint ("height",
+ "Height", "The height of the thumbnail, in pixels.",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataMediaThumbnail:width:
+ *
+ * The width of the thumbnail, in pixels.
+ *
+ * For more information, see the <ulink type="http" url="http://video.search.yahoo.com/mrss">Media RSS specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_WIDTH,
+ g_param_spec_uint ("width",
+ "Width", "The width of the thumbnail, in pixels.",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataMediaThumbnail:time:
+ *
+ * The time offset of the thumbnail in relation to the media object, in milliseconds.
+ *
+ * For more information, see the <ulink type="http" url="http://video.search.yahoo.com/mrss">Media RSS specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_TIME,
+ g_param_spec_int64 ("time",
+ "Time", "The time offset of the thumbnail in relation to the media object, in ms.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_media_thumbnail_init (GDataMediaThumbnail *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_MEDIA_THUMBNAIL, GDataMediaThumbnailPrivate);
+}
+
+static void
+gdata_media_thumbnail_finalize (GObject *object)
+{
+ GDataMediaThumbnailPrivate *priv = GDATA_MEDIA_THUMBNAIL (object)->priv;
+
+ g_free (priv->uri);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_media_thumbnail_parent_class)->finalize (object);
+}
+
+static void
+gdata_media_thumbnail_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataMediaThumbnailPrivate *priv = GDATA_MEDIA_THUMBNAIL (object)->priv;
+
+ switch (property_id) {
+ case PROP_URI:
+ g_value_set_string (value, priv->uri);
+ break;
+ case PROP_HEIGHT:
+ g_value_set_uint (value, priv->height);
+ break;
+ case PROP_WIDTH:
+ g_value_set_uint (value, priv->width);
+ break;
+ case PROP_TIME:
+ g_value_set_int64 (value, priv->time);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+/*
+ * gdata_media_thumbnail_parse_time:
+ * @time_string: a time string to parse
+ *
+ * Parses a time string in (a subset of) NTP format into a number of milliseconds since the start of a media stream.
+ *
+ * For more information about NTP format, see <ulink type="http" url="http://www.ietf.org/rfc/rfc2326.txt">RFC 2326 3.6 Normal Play Time</ulink>.
+ *
+ * To build an NTP-format string, see gdata_media_thumbnail_build_time().
+ *
+ * Return value: number of milliseconds since the start of a media stream
+ */
+static gint64
+parse_time (const gchar *time_string)
+{
+ guint hours, minutes;
+ gdouble seconds;
+ gchar *end_pointer;
+
+ g_return_val_if_fail (time_string != NULL, 0);
+
+ hours = g_ascii_strtoull (time_string, &end_pointer, 10);
+ if (end_pointer != time_string + 2)
+ return -1;
+
+ minutes = g_ascii_strtoull (time_string + 3, &end_pointer, 10);
+ if (end_pointer != time_string + 5)
+ return -1;
+
+ seconds = g_ascii_strtod (time_string + 6, &end_pointer);
+ if (end_pointer != time_string + strlen (time_string))
+ return -1;
+
+ return (gint64) ((seconds + minutes * 60 + hours * 3600) * 1000);
+}
+
+/*
+ * gdata_media_thumbnail_build_time:
+ * @_time: a number of milliseconds since the start of a media stream
+ *
+ * Builds an NTP-format time string describing @_time milliseconds since the start
+ * of a media stream.
+ *
+ * Return value: an NTP-format string describing @_time; free with g_free()
+ */
+/*static gchar *
+build_time (gint64 _time)
+{
+ guint hours, minutes;
+ gfloat seconds;
+
+ hours = _time % 3600000;
+ _time -= hours * 3600000;
+
+ minutes = _time % 60000;
+ _time -= minutes * 60000;
+
+ seconds = _time / 1000.0;
+
+ return g_strdup_printf ("%02u:%02u:%02f", hours, minutes, seconds);
+}*/
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ GDataMediaThumbnailPrivate *priv = GDATA_MEDIA_THUMBNAIL (parsable)->priv;
+ xmlChar *uri, *width, *height, *_time;
+ guint width_uint, height_uint;
+ gint64 time_int64;
+
+ /* Get the width and height */
+ width = xmlGetProp (root_node, (xmlChar*) "width");
+ width_uint = (width == NULL) ? 0 : g_ascii_strtoull ((gchar*) width, NULL, 10);
+ xmlFree (width);
+
+ height = xmlGetProp (root_node, (xmlChar*) "height");
+ height_uint = (height == NULL) ? 0 : g_ascii_strtoull ((gchar*) height, NULL, 10);
+ xmlFree (height);
+
+ /* Get and parse the time */
+ _time = xmlGetProp (root_node, (xmlChar*) "time");
+ if (_time == NULL) {
+ time_int64 = -1;
+ } else {
+ time_int64 = parse_time ((gchar*) _time);
+ if (time_int64 == -1) {
+ gdata_parser_error_unknown_property_value (root_node, "time", (gchar*) _time, error);
+ xmlFree (_time);
+ return FALSE;
+ }
+ xmlFree (_time);
+ }
+
+ /* Get the URI */
+ uri = xmlGetProp (root_node, (xmlChar*) "url");
+ if (uri == NULL || *uri == '\0') {
+ xmlFree (uri);
+ return gdata_parser_error_required_property_missing (root_node, "url", error);
+ }
+
+ priv->uri = (gchar*) uri;
+ priv->height = height_uint;
+ priv->width = width_uint;
+ priv->time = time_int64;
+
+ return TRUE;
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ g_hash_table_insert (namespaces, (gchar*) "media", (gchar*) "http://search.yahoo.com/mrss/");
+}
+
+/* Reference:
+ * https://developers.google.com/youtube/v3/docs/videos#snippet.thumbnails */
+static gboolean
+parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data,
+ GError **error)
+{
+ gboolean success;
+ gint64 width, height;
+ GDataMediaThumbnail *self = GDATA_MEDIA_THUMBNAIL (parsable);
+ GDataMediaThumbnailPrivate *priv = self->priv;
+
+ if (gdata_parser_string_from_json_member (reader, "url", P_DEFAULT,
+ &priv->uri, &success,
+ error)) {
+ return success;
+ } else if (gdata_parser_int_from_json_member (reader, "width",
+ P_DEFAULT, &width,
+ &success, error)) {
+ priv->width = width;
+ return success;
+ } else if (gdata_parser_int_from_json_member (reader, "height",
+ P_DEFAULT, &height,
+ &success, error)) {
+ priv->height = height;
+ return success;
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_media_thumbnail_parent_class)->parse_json (parsable, reader, user_data, error);
+ }
+}
+
+/**
+ * gdata_media_thumbnail_get_uri:
+ * @self: a #GDataMediaThumbnail
+ *
+ * Gets the #GDataMediaThumbnail:uri property.
+ *
+ * Return value: the thumbnail's URI
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_media_thumbnail_get_uri (GDataMediaThumbnail *self)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_THUMBNAIL (self), NULL);
+ return self->priv->uri;
+}
+
+/**
+ * gdata_media_thumbnail_get_height:
+ * @self: a #GDataMediaThumbnail
+ *
+ * Gets the #GDataMediaThumbnail:height property.
+ *
+ * Return value: the thumbnail's height in pixels, or <code class="literal">0</code>
+ *
+ * Since: 0.4.0
+ */
+guint
+gdata_media_thumbnail_get_height (GDataMediaThumbnail *self)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_THUMBNAIL (self), 0);
+ return self->priv->height;
+}
+
+/**
+ * gdata_media_thumbnail_get_width:
+ * @self: a #GDataMediaThumbnail
+ *
+ * Gets the #GDataMediaThumbnail:width property.
+ *
+ * Return value: the thumbnail's width in pixels, or <code class="literal">0</code>
+ *
+ * Since: 0.4.0
+ */
+guint
+gdata_media_thumbnail_get_width (GDataMediaThumbnail *self)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_THUMBNAIL (self), 0);
+ return self->priv->width;
+}
+
+/**
+ * gdata_media_thumbnail_get_time:
+ * @self: a #GDataMediaThumbnail
+ *
+ * Gets the #GDataMediaThumbnail:time property.
+ *
+ * Return value: the thumbnail's time offset in the media, or <code class="literal">-1</code>
+ *
+ * Since: 0.4.0
+ */
+gint64
+gdata_media_thumbnail_get_time (GDataMediaThumbnail *self)
+{
+ g_return_val_if_fail (GDATA_IS_MEDIA_THUMBNAIL (self), -1);
+ return self->priv->time;
+}
+
+/**
+ * gdata_media_thumbnail_download:
+ * @self: a #GDataMediaThumbnail
+ * @service: the #GDataService
+ * @cancellable: (allow-none): a #GCancellable for the entire download stream, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Downloads and returns a #GDataDownloadStream allowing the thumbnail data represented by @self to be read.
+ *
+ * To get the content type of the downloaded data, gdata_download_stream_get_content_type() can be called on the returned #GDataDownloadStream.
+ * Calling gdata_download_stream_get_content_length() on the stream will not return a meaningful result, however, as the stream is encoded in chunks,
+ * rather than by content length.
+ *
+ * In order to cancel the download, a #GCancellable passed in to @cancellable must be cancelled using g_cancellable_cancel(). Cancelling the individual
+ * #GInputStream operations on the #GDataDownloadStream will not cancel the entire download; merely the read or close operation in question. See the
+ * #GDataDownloadStream:cancellable for more details.
+ *
+ * Return value: (transfer full): a #GDataDownloadStream to download the thumbnail with, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.8.0
+ */
+GDataDownloadStream *
+gdata_media_thumbnail_download (GDataMediaThumbnail *self, GDataService *service, GCancellable *cancellable, GError **error)
+{
+ const gchar *src_uri;
+
+ g_return_val_if_fail (GDATA_IS_MEDIA_THUMBNAIL (self), NULL);
+ g_return_val_if_fail (GDATA_IS_SERVICE (service), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ /* We keep a GError in the argument list so that we can add authentication errors, etc., in future if necessary */
+
+ /* Get the download URI and create a stream for it */
+ src_uri = gdata_media_thumbnail_get_uri (self);
+ return GDATA_DOWNLOAD_STREAM (gdata_download_stream_new (service, NULL, src_uri, cancellable));
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_MEDIA_THUMBNAIL_H
+#define GDATA_MEDIA_THUMBNAIL_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-download-stream.h>
+#include <gdata/gdata-service.h>
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_MEDIA_THUMBNAIL (gdata_media_thumbnail_get_type ())
+#define GDATA_MEDIA_THUMBNAIL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_MEDIA_THUMBNAIL, GDataMediaThumbnail))
+#define GDATA_MEDIA_THUMBNAIL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_MEDIA_THUMBNAIL, GDataMediaThumbnailClass))
+#define GDATA_IS_MEDIA_THUMBNAIL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_MEDIA_THUMBNAIL))
+#define GDATA_IS_MEDIA_THUMBNAIL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_MEDIA_THUMBNAIL))
+#define GDATA_MEDIA_THUMBNAIL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_MEDIA_THUMBNAIL, GDataMediaThumbnailClass))
+
+typedef struct _GDataMediaThumbnailPrivate GDataMediaThumbnailPrivate;
+
+/**
+ * GDataMediaThumbnail:
+ *
+ * All the fields in the #GDataMediaThumbnail structure are private and should never be accessed directly.
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataMediaThumbnailPrivate *priv;
+} GDataMediaThumbnail;
+
+/**
+ * GDataMediaThumbnailClass:
+ *
+ * All the fields in the #GDataMediaThumbnailClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataMediaThumbnailClass;
+
+GType gdata_media_thumbnail_get_type (void) G_GNUC_CONST;
+
+const gchar *gdata_media_thumbnail_get_uri (GDataMediaThumbnail *self) G_GNUC_PURE;
+guint gdata_media_thumbnail_get_height (GDataMediaThumbnail *self) G_GNUC_PURE;
+guint gdata_media_thumbnail_get_width (GDataMediaThumbnail *self) G_GNUC_PURE;
+gint64 gdata_media_thumbnail_get_time (GDataMediaThumbnail *self) G_GNUC_PURE;
+
+GDataDownloadStream *gdata_media_thumbnail_download (GDataMediaThumbnail *self, GDataService *service, GCancellable *cancellable,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+G_END_DECLS
+
+#endif /* !GDATA_MEDIA_THUMBNAIL_H */
--- /dev/null
+incs += include_directories('.')
+
+include_subdir = gdata_include_subdir / 'media'
+
+headers = files(
+ 'gdata-media-category.h',
+ 'gdata-media-content.h',
+ 'gdata-media-credit.h',
+ 'gdata-media-thumbnail.h',
+)
+
+install_headers(
+ headers,
+ subdir: include_subdir,
+)
+
+gir_headers += headers
+
+sources += files(
+ 'gdata-media-category.c',
+ 'gdata-media-content.c',
+ 'gdata-media-credit.c',
+ 'gdata-media-group.c',
+ 'gdata-media-thumbnail.c',
+)
+
+enums = 'gdata-media-enums'
+
+enums_in = gnome.mkenums_simple(
+ enums + '-in',
+ sources: headers,
+)
+
+# FIXME: Work around the namespace being incorrectly detected
+# by glib-mkenums. This needs to be fixed by changing the
+# namespace in libgdata. See !6.
+sources += custom_target(
+ enums + '.c',
+ input: enums_in[0],
+ output: enums + '.c',
+ command: enum_source_cmd,
+ capture: true,
+)
+
+enum_headers += custom_target(
+ enums + '.h',
+ input: enums_in[1],
+ output: enums + '.h',
+ command: enum_header_cmd,
+ capture: true,
+ install: true,
+ install_dir: gdata_includedir / include_subdir,
+)
--- /dev/null
+gdata_inc_dir = include_directories('.')
+
+enum_headers = []
+gir_headers = []
+
+sources = []
+
+incs = [
+ gdata_inc_dir,
+ top_inc_dir,
+]
+
+subdir('app')
+subdir('atom')
+subdir('exif')
+subdir('gcontact')
+subdir('gd')
+subdir('georss')
+subdir('media')
+subdir('services')
+
+headers = files(
+ 'gdata.h',
+ 'gdata-access-handler.h',
+ 'gdata-access-rule.h',
+ 'gdata-authorization-domain.h',
+ 'gdata-authorizer.h',
+ 'gdata-batch-operation.h',
+ 'gdata-batchable.h',
+ 'gdata-client-login-authorizer.h',
+ 'gdata-comment.h',
+ 'gdata-commentable.h',
+ 'gdata-comparable.h',
+ 'gdata-download-stream.h',
+ 'gdata-entry.h',
+ 'gdata-feed.h',
+ 'gdata-oauth1-authorizer.h',
+ 'gdata-oauth2-authorizer.h',
+ 'gdata-parsable.h',
+ 'gdata-query.h',
+ 'gdata-service.h',
+ 'gdata-types.h',
+ 'gdata-upload-stream.h',
+)
+
+sources += files(
+ 'gdata-access-handler.c',
+ 'gdata-access-rule.c',
+ 'gdata-authorization-domain.c',
+ 'gdata-authorizer.c',
+ 'gdata-batch-feed.c',
+ 'gdata-batch-operation.c',
+ 'gdata-batchable.c',
+ 'gdata-buffer.c',
+ 'gdata-client-login-authorizer.c',
+ 'gdata-comment.c',
+ 'gdata-commentable.c',
+ 'gdata-comparable.c',
+ 'gdata-download-stream.c',
+ 'gdata-entry.c',
+ 'gdata-feed.c',
+ 'gdata-oauth1-authorizer.c',
+ 'gdata-oauth2-authorizer.c',
+ 'gdata-parsable.c',
+ 'gdata-parser.c',
+ 'gdata-query.c',
+ 'gdata-service.c',
+ 'gdata-types.c',
+ 'gdata-upload-stream.c',
+)
+
+if enable_goa
+ headers += files('gdata-goa-authorizer.h')
+ sources += files('gdata-goa-authorizer.c')
+endif
+
+install_headers(
+ headers,
+ subdir: gdata_include_subdir,
+)
+
+version_conf = {
+ 'GDATA_VERSION_MAJOR': gdata_version_major,
+ 'GDATA_VERSION_MINOR': gdata_version_minor,
+ 'GDATA_VERSION_MICRO': gdata_version_micro,
+}
+
+headers += configure_file(
+ input: 'gdata-version.h.in',
+ output: '@BASENAME@',
+ configuration: version_conf,
+ install: true,
+ install_dir: gdata_includedir / gdata_include_subdir,
+)
+
+gir_headers += headers
+
+marshal = 'gdata-marshal'
+
+marshal_files = gnome.genmarshal(
+ marshal,
+ sources: marshal + '.list',
+ prefix: marshal.underscorify(),
+)
+
+enums = 'gdata-enums'
+
+enums_in = gnome.mkenums_simple(
+ enums + '-in',
+ sources: headers,
+)
+
+# FIXME: Work around the namespace being incorrectly detected
+# by glib-mkenums. This needs to be fixed by changing the
+# namespace in libgdata. See !6.
+sources += custom_target(
+ enums + '.c',
+ input: enums_in[0],
+ output: enums + '.c',
+ command: enum_source_cmd,
+ capture: true,
+)
+
+enum_headers += custom_target(
+ enums + '.h',
+ input: enums_in[1],
+ output: enums + '.h',
+ command: enum_header_cmd,
+ capture: true,
+ install: true,
+ install_dir: gdata_includedir / gdata_include_subdir,
+)
+
+symbol_map = meson.current_source_dir() / 'symbol.map'
+ldflags = cc.get_supported_link_arguments('-Wl,--version-script,' + symbol_map)
+
+libgdata_lib = shared_library(
+ 'gdata',
+ include_directories: incs,
+ sources: sources + enum_headers + marshal_files,
+ c_args: common_c_args + ['-DG_LOG_DOMAIN="@0@"'.format(gdata_name)],
+ dependencies: gdata_deps + gdata_private_deps,
+ link_args: ldflags,
+ link_depends: symbol_map,
+ install: true,
+ version: gdata_soversion,
+ gnu_symbol_visibility: 'default',
+)
+
+libgdata_dep = declare_dependency(
+ sources: enum_headers,
+ include_directories: gdata_inc_dir,
+ dependencies: gdata_deps,
+ link_with: libgdata_lib,
+)
+
+pkgconfig.generate(
+ name: 'libgdata',
+ description: 'GData client library',
+ subdirs: 'libgdata',
+ libraries: libgdata_lib,
+ requires: gdata_deps,
+ requires_private: gdata_private_deps,
+ filebase: 'libgdata',
+ version: gdata_version,
+ variables: [
+ 'exec_prefix=${prefix}',
+ 'goa_enabled=' + goa_dep.found().to_string(),
+ ],
+)
+
+if get_option('introspection')
+ gdata_gir_includes = ['GObject-2.0', 'libxml2-2.0', 'Soup-2.4', 'Json-1.0']
+ gdata_vapi_deps = ['libxml-2.0', 'libsoup-2.4', 'json-glib-1.0']
+
+ if enable_goa
+ gdata_gir_includes += ['Goa-1.0']
+ gdata_vapi_deps += ['goa-1.0']
+ endif
+
+ libgdata_gir = gnome.generate_gir(
+ libgdata_lib,
+ sources: sources + gir_headers + enum_headers,
+ nsversion: '@0@.@1@'.format(gdata_api_version_major, gdata_api_version_minor),
+ namespace: 'GData',
+ symbol_prefix: 'gdata',
+ includes: gdata_gir_includes,
+ header: 'gdata/gdata.h',
+ install: true,
+ export_packages: gdata_name,
+ )
+
+ if get_option('vapi')
+ libgdata_vapi = gnome.generate_vapi(gdata_name,
+ sources: libgdata_gir[0],
+ packages: gdata_vapi_deps,
+ install: true,
+ )
+ endif
+endif
+
+
+if always_build_tests
+ subdir('tests')
+endif
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-calendar-access-rule
+ * @short_description: GData Calendar access rule object
+ * @stability: Stable
+ * @include: gdata/services/calendar/gdata-calendar-access-rule.h
+ *
+ * #GDataCalendarAccessRule is a subclass of #GDataAccessRule to represent an
+ * access rule affecting users of a shared calendar in Google Calendar.
+ *
+ * Since: 0.17.2
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+
+#include "gdata-access-rule.h"
+#include "gdata-parser.h"
+#include "gdata-types.h"
+#include "gdata-private.h"
+#include "gdata-calendar-access-rule.h"
+
+static gboolean
+parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data,
+ GError **error);
+static gboolean
+post_parse_json (GDataParsable *parsable, gpointer user_data, GError **error);
+static void
+get_json (GDataParsable *parsable, JsonBuilder *builder);
+static const gchar *
+get_content_type (void);
+
+G_DEFINE_TYPE (GDataCalendarAccessRule, gdata_calendar_access_rule,
+ GDATA_TYPE_ACCESS_RULE)
+
+static void
+gdata_calendar_access_rule_class_init (GDataCalendarAccessRuleClass *klass)
+{
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+ GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
+
+ parsable_class->parse_json = parse_json;
+ parsable_class->post_parse_json = post_parse_json;
+ parsable_class->get_json = get_json;
+ parsable_class->get_content_type = get_content_type;
+
+ entry_class->kind_term = "calendar#aclRule";
+}
+
+static void
+gdata_calendar_access_rule_init (GDataCalendarAccessRule *self)
+{
+ /* Nothing to do here. */
+}
+
+/* V3 reference:
+ * https://developers.google.com/google-apps/calendar/v3/reference/acl#role
+ * V2 reference is no longer available.
+ */
+const struct {
+ const gchar *v3;
+ const gchar *v2;
+} role_pairs[] = {
+ { "none", "none" },
+ { "freeBusyReader", "http://schemas.google.com/gCal/2005#freebusy" },
+ { "reader", "http://schemas.google.com/gCal/2005#read" },
+ { "writer", "http://schemas.google.com/gCal/2005#editor" },
+ { "owner", "http://schemas.google.com/gCal/2005#owner" },
+};
+
+static const gchar *
+role_v3_to_v2 (const gchar *v3_role)
+{
+ guint i;
+
+ for (i = 0; i < G_N_ELEMENTS (role_pairs); i++) {
+ if (g_strcmp0 (v3_role, role_pairs[i].v3) == 0) {
+ return role_pairs[i].v2;
+ }
+ }
+
+ /* Fallback. */
+ return v3_role;
+}
+
+static const gchar *
+role_v2_to_v3 (const gchar *v2_role)
+{
+ guint i;
+
+ for (i = 0; i < G_N_ELEMENTS (role_pairs); i++) {
+ if (g_strcmp0 (v2_role, role_pairs[i].v2) == 0) {
+ return role_pairs[i].v3;
+ }
+ }
+
+ /* Fallback. */
+ return v2_role;
+}
+
+static const gchar *
+scope_type_v3_to_v2 (const gchar *v3_scope_type)
+{
+ /* Surprisingly, they have not changed from v2 to v3. */
+ return v3_scope_type;
+}
+
+static const gchar *
+scope_type_v2_to_v3 (const gchar *v2_scope_type)
+{
+ /* Surprisingly, they have not changed from v2 to v3. */
+ return v2_scope_type;
+}
+
+static gboolean
+parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error)
+{
+ gboolean success;
+
+ if (g_strcmp0 (json_reader_get_member_name (reader), "role") == 0) {
+ gchar *role = NULL; /* owned */
+
+ g_assert (gdata_parser_string_from_json_member (reader, "role",
+ P_REQUIRED |
+ P_NON_EMPTY,
+ &role, &success,
+ error));
+
+ if (!success) {
+ return FALSE;
+ }
+
+ gdata_access_rule_set_role (GDATA_ACCESS_RULE (parsable),
+ role_v3_to_v2 (role));
+ g_free (role);
+
+ return TRUE;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader),
+ "scope") == 0) {
+ const gchar *scope_type;
+ const gchar *scope_value;
+
+ /* Check this is an object. */
+ if (!json_reader_is_object (reader)) {
+ return gdata_parser_error_required_json_content_missing (reader,
+ error);
+ }
+
+ json_reader_read_member (reader, "type");
+ scope_type = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "value");
+ scope_value = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ /* Scope type is required. */
+ if (scope_type == NULL) {
+ return gdata_parser_error_required_json_content_missing (reader,
+ error);
+ }
+
+ gdata_access_rule_set_scope (GDATA_ACCESS_RULE (parsable),
+ scope_type_v3_to_v2 (scope_type),
+ scope_value);
+
+ return TRUE;
+ }
+
+ return GDATA_PARSABLE_CLASS (gdata_calendar_access_rule_parent_class)->parse_json (parsable, reader, user_data, error);
+}
+
+static gboolean
+post_parse_json (GDataParsable *parsable, gpointer user_data, GError **error)
+{
+ /* Do _not_ chain up. */
+ return TRUE;
+}
+
+static void
+get_json (GDataParsable *parsable, JsonBuilder *builder)
+{
+ GDataAccessRule *access_rule;
+ const gchar *id, *etag, *role, *scope_type, *scope_value;
+
+ access_rule = GDATA_ACCESS_RULE (parsable);
+
+ id = gdata_entry_get_id (GDATA_ENTRY (parsable));
+ if (id != NULL) {
+ json_builder_set_member_name (builder, "id");
+ json_builder_add_string_value (builder, id);
+ }
+
+ json_builder_set_member_name (builder, "kind");
+ json_builder_add_string_value (builder, "calendar#aclRule");
+
+ /* Add the ETag, if available. */
+ etag = gdata_entry_get_etag (GDATA_ENTRY (parsable));
+ if (etag != NULL) {
+ json_builder_set_member_name (builder, "etag");
+ json_builder_add_string_value (builder, etag);
+ }
+
+ role = gdata_access_rule_get_role (access_rule);
+ if (role != NULL) {
+ json_builder_set_member_name (builder, "role");
+ json_builder_add_string_value (builder, role_v2_to_v3 (role));
+ }
+
+ gdata_access_rule_get_scope (access_rule, &scope_type, &scope_value);
+ if (scope_type != NULL || scope_value != NULL) {
+ json_builder_set_member_name (builder, "scope");
+ json_builder_begin_object (builder);
+
+ if (scope_type != NULL) {
+ json_builder_set_member_name (builder, "type");
+ json_builder_add_string_value (builder,
+ scope_type_v2_to_v3 (scope_type));
+ }
+
+ if (scope_value != NULL) {
+ json_builder_set_member_name (builder, "value");
+ json_builder_add_string_value (builder, scope_value);
+ }
+
+ json_builder_end_object (builder);
+ }
+}
+
+static const gchar *
+get_content_type (void)
+{
+ return "application/json";
+}
+
+/**
+ * gdata_calendar_access_rule_new:
+ * @id: the access rule's ID, or %NULL
+ *
+ * Creates a new #GDataCalendarAccessRule with the given ID and default
+ * properties.
+ *
+ * Return value: (transfer full): a new #GDataCalendarAccessRule; unref with
+ * g_object_unref()
+ *
+ * Since: 0.17.2
+ */
+GDataCalendarAccessRule *
+gdata_calendar_access_rule_new (const gchar *id)
+{
+ GObject *retval = NULL; /* owned */
+
+ retval = g_object_new (GDATA_TYPE_CALENDAR_ACCESS_RULE,
+ "id", id,
+ NULL);
+ return GDATA_CALENDAR_ACCESS_RULE (retval);
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_CALENDAR_ACCESS_RULE_H
+#define GDATA_CALENDAR_ACCESS_RULE_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-access-rule.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_CALENDAR_ACCESS_ROLE_READ:
+ *
+ * The users specified by the #GDataCalendarAccessRule have read-only access to
+ * the calendar.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_CALENDAR_ACCESS_ROLE_READ "http://schemas.google.com/gCal/2005#read"
+
+/**
+ * GDATA_CALENDAR_ACCESS_ROLE_FREE_BUSY:
+ *
+ * The users specified by the #GDataCalendarAccessRule can only see the
+ * free/busy information on the calendar; not event details.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_CALENDAR_ACCESS_ROLE_FREE_BUSY "http://schemas.google.com/gCal/2005#freebusy"
+
+/**
+ * GDATA_CALENDAR_ACCESS_ROLE_EDITOR:
+ *
+ * The users specified by the #GDataCalendarAccessRule have full edit access to
+ * the calendar, except they can’t change the calendar’s access rules.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_CALENDAR_ACCESS_ROLE_EDITOR "http://schemas.google.com/gCal/2005#editor"
+
+/**
+ * GDATA_CALENDAR_ACCESS_ROLE_OWNER:
+ *
+ * The users specified by the #GDataCalendarAccessRule have full owner access
+ * to the calendar.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_CALENDAR_ACCESS_ROLE_OWNER "http://schemas.google.com/gCal/2005#owner"
+
+/**
+ * GDATA_CALENDAR_ACCESS_ROLE_ROOT:
+ *
+ * The users specified by the #GDataCalendarAccessRule have full administrator
+ * access to the calendar server. This is only available in Google Apps For
+ * Your Domain.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_CALENDAR_ACCESS_ROLE_ROOT "http://schemas.google.com/gCal/2005#root"
+
+#define GDATA_TYPE_CALENDAR_ACCESS_RULE (gdata_calendar_access_rule_get_type ())
+#define GDATA_CALENDAR_ACCESS_RULE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_CALENDAR_ACCESS_RULE, GDataCalendarAccessRule))
+#define GDATA_CALENDAR_ACCESS_RULE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_CALENDAR_ACCESS_RULE, GDataCalendarAccessRuleClass))
+#define GDATA_IS_CALENDAR_ACCESS_RULE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_CALENDAR_ACCESS_RULE))
+#define GDATA_IS_CALENDAR_ACCESS_RULE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_CALENDAR_ACCESS_RULE))
+#define GDATA_CALENDAR_ACCESS_RULE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_CALENDAR_ACCESS_RULE, GDataCalendarAccessRuleClass))
+
+/**
+ * GDataCalendarAccessRule:
+ *
+ * All the fields in the #GDataCalendarAccessRule structure are private and
+ * should never be accessed directly.
+ *
+ * Since: 0.17.2
+ */
+typedef struct {
+ GDataAccessRule parent;
+} GDataCalendarAccessRule;
+
+/**
+ * GDataCalendarAccessRuleClass:
+ *
+ * All the fields in the #GDataCalendarAccessRuleClass structure are private
+ * and should never be accessed directly.
+ *
+ * Since: 0.17.2
+ */
+typedef struct {
+ /*< private >*/
+ GDataAccessRuleClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataCalendarAccessRuleClass;
+
+GType gdata_calendar_access_rule_get_type (void) G_GNUC_CONST;
+
+GDataCalendarAccessRule *
+gdata_calendar_access_rule_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+G_END_DECLS
+
+#endif /* !GDATA_CALENDAR_ACCESS_RULE_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009, 2010, 2014, 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-calendar-calendar
+ * @short_description: GData Calendar calendar object
+ * @stability: Stable
+ * @include: gdata/services/calendar/gdata-calendar-calendar.h
+ *
+ * #GDataCalendarCalendar is a subclass of #GDataEntry to represent a calendar from Google Calendar.
+ *
+ * #GDataCalendarCalendar implements #GDataAccessHandler, meaning the access rules to it can be modified using that interface. As well as the
+ * access roles defined for the base #GDataAccessRule (e.g. %GDATA_ACCESS_ROLE_NONE), #GDataCalendarCalendar has its own, such as
+ * %GDATA_CALENDAR_ACCESS_ROLE_EDITOR and %GDATA_CALENDAR_ACCESS_ROLE_FREE_BUSY.
+ *
+ * For more details of Google Calendar's GData API, see the <ulink type="http" url="https://developers.google.com/google-apps/calendar/v3/reference/">
+ * online documentation</ulink>.
+ *
+ * <example>
+ * <title>Listing Calendars</title>
+ * <programlisting>
+ * GDataCalendarService *service;
+ * GDataFeed *feed;
+ * GList *i;
+ * GError *error = NULL;
+ *
+ * /<!-- -->* Create a service *<!-- -->/
+ * service = create_calendar_service ();
+ *
+ * /<!-- -->* Query for all of the calendars the currently authenticated user has access to, including those which they have read-only
+ * * access to. *<!-- -->/
+ * feed = gdata_calendar_service_query_all_calendars (service, NULL, NULL, NULL, NULL, &error);
+ *
+ * g_object_unref (service);
+ *
+ * if (error != NULL) {
+ * g_error ("Error querying for calendars: %s", error->message);
+ * g_error_free (error);
+ * return;
+ * }
+ *
+ * /<!-- -->* Iterate through the returned calendars and do something with them *<!-- -->/
+ * for (i = gdata_feed_get_entries (feed); i != NULL; i = i->next) {
+ * const gchar *access_level;
+ * gboolean has_write_access;
+ * GDataCalendarCalendar *calendar = GDATA_CALENDAR_CALENDAR (i->data);
+ *
+ * /<!-- -->* Determine whether we have write access to the calendar, or just read-only or free/busy access. Note that the access levels
+ * * are more detailed than this; see the documentation for gdata_calendar_calendar_get_access_level() for more information. *<!-- -->/
+ * access_level = gdata_calendar_calendar_get_access_level (calendar);
+ * has_write_access = (access_level != NULL && strcmp (access_level, GDATA_CALENDAR_ACCESS_ROLE_EDITOR) == 0) ? TRUE : FALSE;
+ *
+ * /<!-- -->* Do something with the calendar here, such as insert it into a UI *<!-- -->/
+ * }
+ *
+ * g_object_unref (feed);
+ * </programlisting>
+ * </example>
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+
+#include "gdata-calendar-calendar.h"
+#include "gdata-private.h"
+#include "gdata-service.h"
+#include "gdata-parser.h"
+#include "gdata-types.h"
+#include "gdata-access-handler.h"
+#include "gdata-calendar-service.h"
+#include "gdata-calendar-access-rule.h"
+
+static void gdata_calendar_calendar_access_handler_init (GDataAccessHandlerIface *iface);
+static void gdata_calendar_calendar_finalize (GObject *object);
+static void gdata_calendar_calendar_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_calendar_calendar_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void get_json (GDataParsable *parsable, JsonBuilder *builder);
+static gboolean parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error);
+static const gchar *get_content_type (void);
+
+struct _GDataCalendarCalendarPrivate {
+ gchar *timezone;
+ gboolean is_hidden;
+ GDataColor colour;
+ gboolean is_selected;
+ gchar *access_level;
+};
+
+enum {
+ PROP_TIMEZONE = 1,
+ PROP_TIMES_CLEANED,
+ PROP_IS_HIDDEN,
+ PROP_COLOR,
+ PROP_IS_SELECTED,
+ PROP_ACCESS_LEVEL,
+ PROP_EDITED,
+ PROP_ETAG,
+};
+
+G_DEFINE_TYPE_WITH_CODE (GDataCalendarCalendar, gdata_calendar_calendar, GDATA_TYPE_ENTRY,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_ACCESS_HANDLER, gdata_calendar_calendar_access_handler_init))
+
+static void
+gdata_calendar_calendar_class_init (GDataCalendarCalendarClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+ GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataCalendarCalendarPrivate));
+
+ gobject_class->set_property = gdata_calendar_calendar_set_property;
+ gobject_class->get_property = gdata_calendar_calendar_get_property;
+ gobject_class->finalize = gdata_calendar_calendar_finalize;
+
+ parsable_class->parse_json = parse_json;
+ parsable_class->get_json = get_json;
+ parsable_class->get_content_type = get_content_type;
+
+ entry_class->kind_term = "calendar#calendarListEntry";
+
+ /**
+ * GDataCalendarCalendar:timezone:
+ *
+ * The timezone in which the calendar's times are given. This is a timezone name in tz database notation: <ulink type="http"
+ * url="http://en.wikipedia.org/wiki/Tz_database#Names_of_time_zones">reference</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_TIMEZONE,
+ g_param_spec_string ("timezone",
+ "Timezone", "The timezone in which the calendar's times are given.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCalendarCalendar:times-cleaned:
+ *
+ * The number of times the calendar has been cleared of events.
+ *
+ * Deprecated: 0.17.2: Unsupported by the online API any more. There
+ * is no replacement; this will always return
+ * <code class="literal">0</code>.
+ */
+ g_object_class_install_property (gobject_class, PROP_TIMES_CLEANED,
+ g_param_spec_uint ("times-cleaned",
+ "Times cleaned", "The number of times the calendar has been cleared of events.",
+ 0, G_MAXUINT, 0,
+ G_PARAM_DEPRECATED |
+ G_PARAM_READABLE |
+ G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCalendarCalendar:is-hidden:
+ *
+ * Indicates whether the calendar is visible.
+ *
+ * Since: 0.2.0
+ */
+ g_object_class_install_property (gobject_class, PROP_IS_HIDDEN,
+ g_param_spec_boolean ("is-hidden",
+ "Hidden?", "Indicates whether the calendar is visible.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCalendarCalendar:color:
+ *
+ * The background color used to highlight the calendar in the user’s
+ * browser. This used to be restricted to a limited set of colours, but
+ * since 0.17.2 may be any RGB colour.
+ */
+ g_object_class_install_property (gobject_class, PROP_COLOR,
+ g_param_spec_boxed ("color",
+ "Color", "The background color used to highlight the calendar in the user's browser.",
+ GDATA_TYPE_COLOR,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCalendarCalendar:is-selected:
+ *
+ * Indicates whether the calendar is selected.
+ *
+ * Since: 0.2.0
+ */
+ g_object_class_install_property (gobject_class, PROP_IS_SELECTED,
+ g_param_spec_boolean ("is-selected",
+ "Selected?", "Indicates whether the calendar is selected.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCalendarCalendar:access-level:
+ *
+ * Indicates the access level the current user has to the calendar. For example: %GDATA_CALENDAR_ACCESS_ROLE_READ or
+ * %GDATA_CALENDAR_ACCESS_ROLE_FREE_BUSY. The "current user" is the one authenticated against the service's #GDataService:authorizer,
+ * or the guest user.
+ */
+ g_object_class_install_property (gobject_class, PROP_ACCESS_LEVEL,
+ g_param_spec_string ("access-level",
+ "Access level", "Indicates the access level the current user has to the calendar.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCalendarCalendar:edited:
+ *
+ * The last time the calendar was edited. If the calendar has not been edited yet, the content indicates the time it was created.
+ *
+ * For more information, see the <ulink type="http" url="http://www.atomenabled.org/developers/protocol/#appEdited">
+ * Atom Publishing Protocol specification</ulink>.
+ *
+ * Deprecated: 0.17.2: Unsupported by the online API any more. There
+ * is no replacement; this will always return -1.
+ */
+ g_object_class_install_property (gobject_class, PROP_EDITED,
+ g_param_spec_int64 ("edited",
+ "Edited", "The last time the calendar was edited.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_DEPRECATED |
+ G_PARAM_READABLE |
+ G_PARAM_STATIC_STRINGS));
+
+ /* Override the ETag property since ETags don't seem to be supported for calendars. */
+ g_object_class_override_property (gobject_class, PROP_ETAG, "etag");
+}
+
+static gboolean
+is_owner_rule (GDataAccessRule *rule)
+{
+ return (strcmp (gdata_access_rule_get_role (rule), GDATA_CALENDAR_ACCESS_ROLE_OWNER) == 0) ? TRUE : FALSE;
+}
+
+static GDataAuthorizationDomain *
+get_authorization_domain (GDataAccessHandler *self)
+{
+ return gdata_calendar_service_get_primary_authorization_domain ();
+}
+
+static GDataFeed *
+get_rules (GDataAccessHandler *self,
+ GDataService *service,
+ GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback,
+ gpointer progress_user_data,
+ GError **error)
+{
+ GDataAccessHandlerIface *iface;
+ GDataAuthorizationDomain *domain = NULL;
+ GDataFeed *feed;
+ GDataLink *_link;
+ SoupMessage *message;
+ GList/*<unowned GDataCalendarAccessRule>*/ *rules, *i;
+ const gchar *calendar_id;
+
+ _link = gdata_entry_look_up_link (GDATA_ENTRY (self),
+ GDATA_LINK_ACCESS_CONTROL_LIST);
+ g_assert (_link != NULL);
+
+ iface = GDATA_ACCESS_HANDLER_GET_IFACE (self);
+ if (iface->get_authorization_domain != NULL) {
+ domain = iface->get_authorization_domain (self);
+ }
+
+ message = _gdata_service_query (service, domain,
+ gdata_link_get_uri (_link), NULL,
+ cancellable, error);
+ if (message == NULL) {
+ return NULL;
+ }
+
+ g_assert (message->response_body->data != NULL);
+
+ feed = _gdata_feed_new_from_json (GDATA_TYPE_FEED,
+ message->response_body->data,
+ message->response_body->length,
+ GDATA_TYPE_CALENDAR_ACCESS_RULE,
+ progress_callback, progress_user_data,
+ error);
+
+ /* Set the self link on all the ACL rules so they can be deleted.
+ * Sigh. */
+ rules = gdata_feed_get_entries (feed);
+ calendar_id = gdata_entry_get_id (GDATA_ENTRY (self));
+
+ for (i = rules; i != NULL; i = i->next) {
+ const gchar *id;
+ gchar *uri = NULL; /* owned */
+
+ /* Set the self link, which is needed for
+ * gdata_service_delete_entry(). Unfortunately, it needs the
+ * ACL ID _and_ the calendar ID. */
+ id = gdata_entry_get_id (GDATA_ENTRY (i->data));
+
+ if (id == NULL || calendar_id == NULL) {
+ continue;
+ }
+
+ uri = g_strconcat ("https://www.googleapis.com"
+ "/calendar/v3/calendars/",
+ calendar_id, "/acl/", id, NULL);
+ _link = gdata_link_new (uri, GDATA_LINK_SELF);
+ gdata_entry_add_link (GDATA_ENTRY (i->data), _link);
+ g_object_unref (_link);
+ g_free (uri);
+ }
+
+ g_object_unref (message);
+
+ return feed;
+}
+
+static void
+gdata_calendar_calendar_access_handler_init (GDataAccessHandlerIface *iface)
+{
+ iface->is_owner_rule = is_owner_rule;
+ iface->get_authorization_domain = get_authorization_domain;
+ iface->get_rules = get_rules;
+}
+
+static void
+gdata_calendar_calendar_init (GDataCalendarCalendar *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_CALENDAR_CALENDAR, GDataCalendarCalendarPrivate);
+}
+
+static void
+gdata_calendar_calendar_finalize (GObject *object)
+{
+ GDataCalendarCalendarPrivate *priv = GDATA_CALENDAR_CALENDAR (object)->priv;
+
+ g_free (priv->timezone);
+ g_free (priv->access_level);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_calendar_calendar_parent_class)->finalize (object);
+}
+
+static void
+gdata_calendar_calendar_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataCalendarCalendar *self = GDATA_CALENDAR_CALENDAR (object);
+ GDataCalendarCalendarPrivate *priv = self->priv;
+
+ switch (property_id) {
+ case PROP_TIMEZONE:
+ g_value_set_string (value, priv->timezone);
+ break;
+ case PROP_TIMES_CLEANED:
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ g_value_set_uint (value, gdata_calendar_calendar_get_times_cleaned (self));
+ G_GNUC_END_IGNORE_DEPRECATIONS
+ break;
+ case PROP_IS_HIDDEN:
+ g_value_set_boolean (value, priv->is_hidden);
+ break;
+ case PROP_COLOR:
+ g_value_set_boxed (value, &(priv->colour));
+ break;
+ case PROP_IS_SELECTED:
+ g_value_set_boolean (value, priv->is_selected);
+ break;
+ case PROP_ACCESS_LEVEL:
+ g_value_set_string (value, priv->access_level);
+ break;
+ case PROP_EDITED:
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ g_value_set_int64 (value,
+ gdata_calendar_calendar_get_edited (self));
+ G_GNUC_END_IGNORE_DEPRECATIONS
+ break;
+ case PROP_ETAG:
+ /* Never return an ETag */
+ g_value_set_string (value, NULL);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_calendar_calendar_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataCalendarCalendar *self = GDATA_CALENDAR_CALENDAR (object);
+
+ switch (property_id) {
+ case PROP_TIMEZONE:
+ gdata_calendar_calendar_set_timezone (self, g_value_get_string (value));
+ break;
+ case PROP_IS_HIDDEN:
+ gdata_calendar_calendar_set_is_hidden (self, g_value_get_boolean (value));
+ break;
+ case PROP_COLOR:
+ gdata_calendar_calendar_set_color (self, g_value_get_boxed (value));
+ break;
+ case PROP_IS_SELECTED:
+ gdata_calendar_calendar_set_is_selected (self, g_value_get_boolean (value));
+ break;
+ case PROP_ETAG:
+ /* Never set an ETag (note that this doesn't stop it being set in GDataEntry due to XML parsing) */
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error)
+{
+ gboolean success;
+ GDataCalendarCalendar *self = GDATA_CALENDAR_CALENDAR (parsable);
+
+ /* FIXME: Unimplemented:
+ * - location
+ * - summaryOverride
+ * - colorId
+ * - foregroundColor
+ * - defaultReminders
+ * - notificationSettings
+ * - primary
+ * - deleted
+ */
+
+ if (gdata_parser_string_from_json_member (reader, "timeZone", P_DEFAULT, &self->priv->timezone, &success, error) ||
+ gdata_parser_color_from_json_member (reader, "backgroundColor", P_DEFAULT, &self->priv->colour, &success, error) ||
+ gdata_parser_boolean_from_json_member (reader, "hidden", P_DEFAULT, &self->priv->is_hidden, &success, error) ||
+ gdata_parser_boolean_from_json_member (reader, "selected", P_DEFAULT, &self->priv->is_selected, &success, error)) {
+ return success;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "summary") == 0) {
+ gchar *summary = NULL;
+
+ g_assert (gdata_parser_string_from_json_member (reader,
+ "summary",
+ P_DEFAULT,
+ &summary,
+ &success,
+ error));
+
+ if (summary != NULL) {
+ gdata_entry_set_title (GDATA_ENTRY (parsable), summary);
+ }
+
+ g_free (summary);
+
+ return success;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "description") == 0) {
+ gchar *description = NULL;
+
+ g_assert (gdata_parser_string_from_json_member (reader,
+ "description",
+ P_DEFAULT,
+ &description,
+ &success,
+ error));
+
+ if (description != NULL) {
+ gdata_entry_set_summary (GDATA_ENTRY (parsable),
+ description);
+ }
+
+ g_free (description);
+
+ return success;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "accessRole") == 0) {
+ gchar *access_role = NULL;
+
+ g_assert (gdata_parser_string_from_json_member (reader,
+ "accessRole",
+ P_DEFAULT,
+ &access_role,
+ &success,
+ error));
+
+ if (access_role != NULL) {
+ const gchar *level;
+
+ /* Convert from v3 format to v2. */
+ if (g_strcmp0 (access_role, "freeBusyReader") == 0) {
+ level = GDATA_CALENDAR_ACCESS_ROLE_FREE_BUSY;
+ } else if (g_strcmp0 (access_role, "reader") == 0) {
+ level = GDATA_CALENDAR_ACCESS_ROLE_READ;
+ } else if (g_strcmp0 (access_role, "writer") == 0) {
+ level = GDATA_CALENDAR_ACCESS_ROLE_EDITOR;
+ } else if (g_strcmp0 (access_role, "owner") == 0) {
+ level = GDATA_CALENDAR_ACCESS_ROLE_OWNER;
+ } else {
+ level = access_role;
+ }
+
+ self->priv->access_level = g_strdup (level);
+ }
+
+ g_free (access_role);
+
+ return success;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "id") == 0) {
+ GDataLink *_link;
+ const gchar *id;
+ gchar *uri;
+
+ id = json_reader_get_string_value (reader);
+ if (id != NULL && *id != '\0') {
+ /* Calendar entries don’t contain their own selfLink,
+ * so we have to add one manually. */
+ uri = g_strconcat ("https://www.googleapis.com/calendar/v3/calendars/", id, NULL);
+ _link = gdata_link_new (uri, GDATA_LINK_SELF);
+ gdata_entry_add_link (GDATA_ENTRY (parsable), _link);
+ g_object_unref (_link);
+ g_free (uri);
+
+ /* Similarly for the ACL link. */
+ uri = g_strconcat ("https://www.googleapis.com"
+ "/calendar/v3/calendars/", id,
+ "/acl", NULL);
+ _link = gdata_link_new (uri,
+ GDATA_LINK_ACCESS_CONTROL_LIST);
+ gdata_entry_add_link (GDATA_ENTRY (parsable), _link);
+ g_object_unref (_link);
+ g_free (uri);
+ }
+
+ return GDATA_PARSABLE_CLASS (gdata_calendar_calendar_parent_class)->parse_json (parsable, reader, user_data, error);
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_calendar_calendar_parent_class)->parse_json (parsable, reader, user_data, error);
+ }
+
+ return TRUE;
+}
+
+static void
+get_json (GDataParsable *parsable, JsonBuilder *builder)
+{
+ const gchar *id, *etag, *title, *description;
+ gchar *colour;
+ GDataCalendarCalendarPrivate *priv = GDATA_CALENDAR_CALENDAR (parsable)->priv;
+
+ id = gdata_entry_get_id (GDATA_ENTRY (parsable));
+ if (id != NULL) {
+ json_builder_set_member_name (builder, "id");
+ json_builder_add_string_value (builder, id);
+ }
+
+ json_builder_set_member_name (builder, "kind");
+ json_builder_add_string_value (builder, "calendar#calendar");
+
+ /* Add the ETag, if available. */
+ etag = gdata_entry_get_etag (GDATA_ENTRY (parsable));
+ if (etag != NULL) {
+ json_builder_set_member_name (builder, "etag");
+ json_builder_add_string_value (builder, etag);
+ }
+
+ /* Calendar labels titles as ‘summary’. */
+ title = gdata_entry_get_title (GDATA_ENTRY (parsable));
+ if (title != NULL) {
+ json_builder_set_member_name (builder, "summary");
+ json_builder_add_string_value (builder, title);
+ }
+
+ description = gdata_entry_get_summary (GDATA_ENTRY (parsable));
+ if (description != NULL) {
+ json_builder_set_member_name (builder, "description");
+ json_builder_add_string_value (builder, description);
+ }
+
+ /* Add all the calendar-specific JSON */
+ if (priv->timezone != NULL) {
+ json_builder_set_member_name (builder, "timeZone");
+ json_builder_add_string_value (builder, priv->timezone);
+ }
+
+ json_builder_set_member_name (builder, "hidden");
+ json_builder_add_boolean_value (builder, priv->is_hidden);
+
+ colour = gdata_color_to_hexadecimal (&priv->colour);
+ json_builder_set_member_name (builder, "backgroundColor");
+ json_builder_add_string_value (builder, colour);
+ g_free (colour);
+
+ json_builder_set_member_name (builder, "selected");
+ json_builder_add_boolean_value (builder, priv->is_selected);
+}
+
+static const gchar *
+get_content_type (void)
+{
+ return "application/json";
+}
+
+/**
+ * gdata_calendar_calendar_new:
+ * @id: (allow-none): the calendar's ID, or %NULL
+ *
+ * Creates a new #GDataCalendarCalendar with the given ID and default properties.
+ *
+ * Return value: a new #GDataCalendarCalendar; unref with g_object_unref()
+ */
+GDataCalendarCalendar *
+gdata_calendar_calendar_new (const gchar *id)
+{
+ return GDATA_CALENDAR_CALENDAR (g_object_new (GDATA_TYPE_CALENDAR_CALENDAR, "id", id, NULL));
+}
+
+/**
+ * gdata_calendar_calendar_get_timezone:
+ * @self: a #GDataCalendarCalendar
+ *
+ * Gets the #GDataCalendarCalendar:timezone property.
+ *
+ * Return value: the calendar's timezone, or %NULL
+ */
+const gchar *
+gdata_calendar_calendar_get_timezone (GDataCalendarCalendar *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_CALENDAR (self), NULL);
+ return self->priv->timezone;
+}
+
+/**
+ * gdata_calendar_calendar_set_timezone:
+ * @self: a #GDataCalendarCalendar
+ * @_timezone: (allow-none): a new timezone, or %NULL
+ *
+ * Sets the #GDataCalendarCalendar:timezone property to the new timezone, @_timezone.
+ *
+ * Set @_timezone to %NULL to unset the property in the calendar.
+ */
+void
+gdata_calendar_calendar_set_timezone (GDataCalendarCalendar *self, const gchar *_timezone)
+{
+ /* Blame "timezone" in /usr/include/time.h:291 for the weird parameter naming */
+ g_return_if_fail (GDATA_IS_CALENDAR_CALENDAR (self));
+
+ g_free (self->priv->timezone);
+ self->priv->timezone = g_strdup (_timezone);
+ g_object_notify (G_OBJECT (self), "timezone");
+}
+
+/**
+ * gdata_calendar_calendar_get_times_cleaned:
+ * @self: a #GDataCalendarCalendar
+ *
+ * Gets the #GDataCalendarCalendar:times-cleaned property.
+ *
+ * Return value: the number of times the calendar has been totally emptied
+ * Deprecated: 0.17.2: Unsupported by the online API any more. There is no
+ * replacement; this will always return <code class="literal">0</code>.
+ */
+guint
+gdata_calendar_calendar_get_times_cleaned (GDataCalendarCalendar *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_CALENDAR (self), 0);
+ return 0;
+}
+
+/**
+ * gdata_calendar_calendar_is_hidden:
+ * @self: a #GDataCalendarCalendar
+ *
+ * Gets the #GDataCalendarCalendar:is-hidden property.
+ *
+ * Return value: %TRUE if the calendar is hidden, %FALSE otherwise
+ *
+ * Since: 0.2.0
+ */
+gboolean
+gdata_calendar_calendar_is_hidden (GDataCalendarCalendar *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_CALENDAR (self), 0);
+ return self->priv->is_hidden;
+}
+
+/**
+ * gdata_calendar_calendar_set_is_hidden:
+ * @self: a #GDataCalendarCalendar
+ * @is_hidden: %TRUE to hide the calendar, %FALSE otherwise
+ *
+ * Sets the #GDataCalendarCalendar:is-hidden property to @is_hidden.
+ *
+ * Since: 0.2.0
+ */
+void
+gdata_calendar_calendar_set_is_hidden (GDataCalendarCalendar *self, gboolean is_hidden)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_CALENDAR (self));
+ self->priv->is_hidden = is_hidden;
+ g_object_notify (G_OBJECT (self), "is-hidden");
+}
+
+/**
+ * gdata_calendar_calendar_get_color:
+ * @self: a #GDataCalendarCalendar
+ * @color: (out caller-allocates): a #GDataColor
+ *
+ * Gets the #GDataCalendarCalendar:color property and puts it in @color.
+ */
+void
+gdata_calendar_calendar_get_color (GDataCalendarCalendar *self, GDataColor *color)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_CALENDAR (self));
+ g_return_if_fail (color != NULL);
+ *color = self->priv->colour;
+}
+
+/**
+ * gdata_calendar_calendar_set_color:
+ * @self: a #GDataCalendarCalendar
+ * @color: a new #GDataColor
+ *
+ * Sets the #GDataCalendarCalendar:color property to @color.
+ */
+void
+gdata_calendar_calendar_set_color (GDataCalendarCalendar *self, const GDataColor *color)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_CALENDAR (self));
+ g_return_if_fail (color != NULL);
+ self->priv->colour = *color;
+ g_object_notify (G_OBJECT (self), "color");
+}
+
+/**
+ * gdata_calendar_calendar_is_selected:
+ * @self: a #GDataCalendarCalendar
+ *
+ * Gets the #GDataCalendarCalendar:is-selected property.
+ *
+ * Return value: %TRUE if the calendar is selected, %FALSE otherwise
+ *
+ * Since: 0.2.0
+ */
+gboolean
+gdata_calendar_calendar_is_selected (GDataCalendarCalendar *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_CALENDAR (self), 0);
+ return self->priv->is_selected;
+}
+
+/**
+ * gdata_calendar_calendar_set_is_selected:
+ * @self: a #GDataCalendarCalendar
+ * @is_selected: %TRUE to select the calendar, %FALSE otherwise
+ *
+ * Sets the #GDataCalendarCalendar:is-selected property to @is_selected.
+ *
+ * Since: 0.2.0
+ */
+void
+gdata_calendar_calendar_set_is_selected (GDataCalendarCalendar *self, gboolean is_selected)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_CALENDAR (self));
+ self->priv->is_selected = is_selected;
+ g_object_notify (G_OBJECT (self), "is-selected");
+}
+
+/**
+ * gdata_calendar_calendar_get_access_level:
+ * @self: a #GDataCalendarCalendar
+ *
+ * Gets the #GDataCalendarCalendar:access-level property.
+ *
+ * Return value: the authenticated user's access level to the calendar, or %NULL
+ */
+const gchar *
+gdata_calendar_calendar_get_access_level (GDataCalendarCalendar *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_CALENDAR (self), NULL);
+ return self->priv->access_level;
+}
+
+/**
+ * gdata_calendar_calendar_get_edited:
+ * @self: a #GDataCalendarCalendar
+ *
+ * Gets the #GDataCalendarCalendar:edited property. If the property is unset, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the UNIX timestamp for the time the calendar was last edited, or <code class="literal">-1</code>
+ * Deprecated: 0.17.2: Unsupported by the online API any more. There is no
+ * replacement; this will always return <code class="literal">-1</code>.
+ */
+gint64
+gdata_calendar_calendar_get_edited (GDataCalendarCalendar *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_CALENDAR (self), -1);
+ return -1;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009, 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_CALENDAR_CALENDAR_H
+#define GDATA_CALENDAR_CALENDAR_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-entry.h>
+#include <gdata/gdata-types.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_CALENDAR_CALENDAR (gdata_calendar_calendar_get_type ())
+#define GDATA_CALENDAR_CALENDAR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_CALENDAR_CALENDAR, GDataCalendarCalendar))
+#define GDATA_CALENDAR_CALENDAR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_CALENDAR_CALENDAR, GDataCalendarCalendarClass))
+#define GDATA_IS_CALENDAR_CALENDAR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_CALENDAR_CALENDAR))
+#define GDATA_IS_CALENDAR_CALENDAR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_CALENDAR_CALENDAR))
+#define GDATA_CALENDAR_CALENDAR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_CALENDAR_CALENDAR, GDataCalendarCalendarClass))
+
+typedef struct _GDataCalendarCalendarPrivate GDataCalendarCalendarPrivate;
+
+/**
+ * GDataCalendarCalendar:
+ *
+ * All the fields in the #GDataCalendarCalendar structure are private and should never be accessed directly.
+ */
+typedef struct {
+ GDataEntry parent;
+ GDataCalendarCalendarPrivate *priv;
+} GDataCalendarCalendar;
+
+/**
+ * GDataCalendarCalendarClass:
+ *
+ * All the fields in the #GDataCalendarCalendarClass structure are private and should never be accessed directly.
+ */
+typedef struct {
+ /*< private >*/
+ GDataEntryClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataCalendarCalendarClass;
+
+GType gdata_calendar_calendar_get_type (void) G_GNUC_CONST;
+
+GDataCalendarCalendar *gdata_calendar_calendar_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_calendar_calendar_get_timezone (GDataCalendarCalendar *self) G_GNUC_PURE;
+void gdata_calendar_calendar_set_timezone (GDataCalendarCalendar *self, const gchar *_timezone);
+gboolean gdata_calendar_calendar_is_hidden (GDataCalendarCalendar *self) G_GNUC_PURE;
+void gdata_calendar_calendar_set_is_hidden (GDataCalendarCalendar *self, gboolean is_hidden);
+void gdata_calendar_calendar_get_color (GDataCalendarCalendar *self, GDataColor *color);
+void gdata_calendar_calendar_set_color (GDataCalendarCalendar *self, const GDataColor *color);
+gboolean gdata_calendar_calendar_is_selected (GDataCalendarCalendar *self) G_GNUC_PURE;
+void gdata_calendar_calendar_set_is_selected (GDataCalendarCalendar *self, gboolean is_selected);
+const gchar *gdata_calendar_calendar_get_access_level (GDataCalendarCalendar *self) G_GNUC_PURE;
+
+#ifndef LIBGDATA_DISABLE_DEPRECATED
+guint gdata_calendar_calendar_get_times_cleaned (GDataCalendarCalendar *self) G_GNUC_PURE G_GNUC_DEPRECATED;
+gint64 gdata_calendar_calendar_get_edited (GDataCalendarCalendar *self) G_GNUC_DEPRECATED;
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
+
+G_END_DECLS
+
+#endif /* !GDATA_CALENDAR_CALENDAR_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009, 2010, 2014, 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-calendar-event
+ * @short_description: GData Calendar event object
+ * @stability: Stable
+ * @include: gdata/services/calendar/gdata-calendar-event.h
+ *
+ * #GDataCalendarEvent is a subclass of #GDataEntry to represent an event on a calendar from Google Calendar.
+ *
+ * For more details of Google Calendar's GData API, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/calendar/v3/reference/">
+ * online documentation</ulink>.
+ *
+ * <example>
+ * <title>Adding a New Event to the Default Calendar</title>
+ * <programlisting>
+ * GDataCalendarService *service;
+ * GDataCalendarEvent *event, *new_event;
+ * GDataGDWhere *where;
+ * GDataGDWho *who;
+ * GDataGDWhen *when;
+ * GTimeVal current_time;
+ * GError *error = NULL;
+ *
+ * /<!-- -->* Create a service *<!-- -->/
+ * service = create_calendar_service ();
+ *
+ * /<!-- -->* Create the new event *<!-- -->/
+ * event = gdata_calendar_event_new (NULL);
+ *
+ * gdata_entry_set_title (GDATA_ENTRY (event), "Event Title");
+ * gdata_entry_set_content (GDATA_ENTRY (event), "Event description. This should be a few sentences long.");
+ * gdata_calendar_event_set_status (event, GDATA_GD_EVENT_STATUS_CONFIRMED);
+ *
+ * where = gdata_gd_where_new (NULL, "Description of the location", NULL);
+ * gdata_calendar_event_add_place (event, where);
+ * g_object_unref (where);
+ *
+ * who = gdata_gd_who_new (GDATA_GD_WHO_EVENT_ORGANIZER, "John Smith", "john.smith@gmail.com");
+ * gdata_calendar_event_add_person (event, who);
+ * g_object_unref (who);
+ *
+ * g_get_current_time (¤t_time);
+ * when = gdata_gd_when_new (current_time.tv_sec, current_time.tv_sec + 3600, FALSE);
+ * gdata_calendar_event_add_time (event, when);
+ * g_object_unref (when);
+ *
+ * /<!-- -->* Insert the event in the calendar *<!-- -->/
+ * new_event = gdata_calendar_service_insert_event (service, event, NULL, &error);
+ *
+ * g_object_unref (event);
+ * g_object_unref (service);
+ *
+ * if (error != NULL) {
+ * g_error ("Error inserting event: %s", error->message);
+ * g_error_free (error);
+ * return NULL;
+ * }
+ *
+ * /<!-- -->* Do something with the new_event here, such as return it to the user or store its ID for later usage *<!-- -->/
+ *
+ * g_object_unref (new_event);
+ * </programlisting>
+ * </example>
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+
+#include "gdata-calendar-event.h"
+#include "gdata-private.h"
+#include "gdata-service.h"
+#include "gdata-parser.h"
+#include "gdata-types.h"
+#include "gdata-comparable.h"
+
+static GObject *gdata_calendar_event_constructor (GType type, guint n_construct_params, GObjectConstructParam *construct_params);
+static void gdata_calendar_event_dispose (GObject *object);
+static void gdata_calendar_event_finalize (GObject *object);
+static void gdata_calendar_event_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_calendar_event_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void get_json (GDataParsable *parsable, JsonBuilder *builder);
+static gboolean parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error);
+static gboolean post_parse_json (GDataParsable *parsable, gpointer user_data, GError **error);
+static const gchar *get_content_type (void);
+
+struct _GDataCalendarEventPrivate {
+ gint64 edited;
+ gchar *status;
+ gchar *visibility;
+ gchar *transparency;
+ gchar *uid;
+ gint64 sequence;
+ GList *times; /* GDataGDWhen */
+ gboolean guests_can_modify;
+ gboolean guests_can_invite_others;
+ gboolean guests_can_see_guests;
+ gboolean anyone_can_add_self;
+ GList *people; /* GDataGDWho */
+ GList *places; /* GDataGDWhere */
+ gchar *recurrence;
+ gchar *original_event_id;
+ gchar *original_event_uri;
+ gchar *organiser_email; /* owned */
+
+ /* Parsing state. */
+ struct {
+ gint64 start_time;
+ gint64 end_time;
+ gboolean seen_start;
+ gboolean seen_end;
+ gboolean start_is_date;
+ gboolean end_is_date;
+ } parser;
+};
+
+enum {
+ PROP_EDITED = 1,
+ PROP_STATUS,
+ PROP_VISIBILITY,
+ PROP_TRANSPARENCY,
+ PROP_UID,
+ PROP_SEQUENCE,
+ PROP_GUESTS_CAN_MODIFY,
+ PROP_GUESTS_CAN_INVITE_OTHERS,
+ PROP_GUESTS_CAN_SEE_GUESTS,
+ PROP_ANYONE_CAN_ADD_SELF,
+ PROP_RECURRENCE,
+ PROP_ORIGINAL_EVENT_ID,
+ PROP_ORIGINAL_EVENT_URI
+};
+
+G_DEFINE_TYPE (GDataCalendarEvent, gdata_calendar_event, GDATA_TYPE_ENTRY)
+
+static void
+gdata_calendar_event_class_init (GDataCalendarEventClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+ GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataCalendarEventPrivate));
+
+ gobject_class->constructor = gdata_calendar_event_constructor;
+ gobject_class->get_property = gdata_calendar_event_get_property;
+ gobject_class->set_property = gdata_calendar_event_set_property;
+ gobject_class->dispose = gdata_calendar_event_dispose;
+ gobject_class->finalize = gdata_calendar_event_finalize;
+
+ parsable_class->parse_json = parse_json;
+ parsable_class->post_parse_json = post_parse_json;
+ parsable_class->get_json = get_json;
+ parsable_class->get_content_type = get_content_type;
+
+ entry_class->kind_term = "calendar#event";
+
+ /**
+ * GDataCalendarEvent:edited:
+ *
+ * The last time the event was edited. If the event has not been edited yet, the content indicates the time it was created.
+ *
+ * For more information, see the <ulink type="http" url="http://www.atomenabled.org/developers/protocol/#appEdited">
+ * Atom Publishing Protocol specification</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_EDITED,
+ g_param_spec_int64 ("edited",
+ "Edited", "The last time the event was edited.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCalendarEvent:status:
+ *
+ * The scheduling status of the event. For example: %GDATA_GD_EVENT_STATUS_CANCELED or %GDATA_GD_EVENT_STATUS_CONFIRMED.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/gdata/elements.html#gdEventStatus">
+ * GData specification</ulink>.
+ *
+ * Since: 0.2.0
+ */
+ g_object_class_install_property (gobject_class, PROP_STATUS,
+ g_param_spec_string ("status",
+ "Status", "The scheduling status of the event.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCalendarEvent:visibility:
+ *
+ * The event's visibility to calendar users. For example: %GDATA_GD_EVENT_VISIBILITY_PUBLIC or %GDATA_GD_EVENT_VISIBILITY_DEFAULT.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/gdata/elements.html#gdVisibility">
+ * GData specification</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_VISIBILITY,
+ g_param_spec_string ("visibility",
+ "Visibility", "The event's visibility to calendar users.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCalendarEvent:transparency:
+ *
+ * How the event is marked as consuming time on a calendar. For example: %GDATA_GD_EVENT_TRANSPARENCY_OPAQUE or
+ * %GDATA_GD_EVENT_TRANSPARENCY_TRANSPARENT.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/gdata/elements.html#gdTransparency">
+ * GData specification</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_TRANSPARENCY,
+ g_param_spec_string ("transparency",
+ "Transparency", "How the event is marked as consuming time on a calendar.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCalendarEvent:uid:
+ *
+ * The globally unique identifier (UID) of the event as defined in Section 4.8.4.7 of <ulink type="http"
+ * url="http://www.ietf.org/rfc/rfc2445.txt">RFC 2445</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_UID,
+ g_param_spec_string ("uid",
+ "UID", "The globally unique identifier (UID) of the event.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCalendarEvent:sequence:
+ *
+ * The revision sequence number of the event as defined in Section 4.8.7.4 of <ulink type="http"
+ * url="http://www.ietf.org/rfc/rfc2445.txt">RFC 2445</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_SEQUENCE,
+ g_param_spec_uint ("sequence",
+ "Sequence", "The revision sequence number of the event.",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCalendarEvent:guests-can-modify:
+ *
+ * Indicates whether attendees may modify the original event, so that changes are visible to organizers and other attendees.
+ * Otherwise, any changes made by attendees will be restricted to that attendee's calendar.
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/calendar/v3/reference/events#guestsCanInviteOthers">
+ * GData specification</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_GUESTS_CAN_MODIFY,
+ g_param_spec_boolean ("guests-can-modify",
+ "Guests can modify", "Indicates whether attendees may modify the original event.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCalendarEvent:guests-can-invite-others:
+ *
+ * Indicates whether attendees may invite others to the event.
+ *
+ * For more information, see the <ulink type="http"
+ * url="https://developers.google.com/google-apps/calendar/v3/reference/events#guestsCanInviteOthers">GData specification</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_GUESTS_CAN_INVITE_OTHERS,
+ g_param_spec_boolean ("guests-can-invite-others",
+ "Guests can invite others", "Indicates whether attendees may invite others.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCalendarEvent:guests-can-see-guests:
+ *
+ * Indicates whether attendees can see other people invited to the event.
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/calendar/v3/reference/events#guestsCanSeeOtherGuests">
+ * GData specification</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_GUESTS_CAN_SEE_GUESTS,
+ g_param_spec_boolean ("guests-can-see-guests",
+ "Guests can see guests", "Indicates whether attendees can see other people invited.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCalendarEvent:anyone-can-add-self:
+ *
+ * Indicates whether anyone can invite themselves to the event, by adding themselves to the attendee list.
+ */
+ g_object_class_install_property (gobject_class, PROP_ANYONE_CAN_ADD_SELF,
+ g_param_spec_boolean ("anyone-can-add-self",
+ "Anyone can add self", "Indicates whether anyone can invite themselves to the event.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCalendarEvent:recurrence:
+ *
+ * Represents the dates and times when a recurring event takes place. The returned string is in iCal format, as a list of properties.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/gdata/elements.html#gdRecurrence">
+ * GData specification</ulink>.
+ *
+ * Note: gdata_calendar_event_add_time() and gdata_calendar_event_set_recurrence() are mutually
+ * exclusive. See the documentation for gdata_calendar_event_add_time() for details.
+ *
+ * Since: 0.3.0
+ */
+ g_object_class_install_property (gobject_class, PROP_RECURRENCE,
+ g_param_spec_string ("recurrence",
+ "Recurrence", "Represents the dates and times when a recurring event takes place.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCalendarEvent:original-event-id:
+ *
+ * The event ID for the original event, if this event is an exception to a recurring event.
+ *
+ * Since: 0.3.0
+ */
+ g_object_class_install_property (gobject_class, PROP_ORIGINAL_EVENT_ID,
+ g_param_spec_string ("original-event-id",
+ "Original event ID", "The event ID for the original event.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCalendarEvent:original-event-uri:
+ *
+ * The event URI for the original event, if this event is an exception to a recurring event.
+ *
+ * Since: 0.3.0
+ */
+ g_object_class_install_property (gobject_class, PROP_ORIGINAL_EVENT_URI,
+ g_param_spec_string ("original-event-uri",
+ "Original event URI", "The event URI for the original event.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_calendar_event_init (GDataCalendarEvent *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_CALENDAR_EVENT, GDataCalendarEventPrivate);
+ self->priv->edited = -1;
+}
+
+static GObject *
+gdata_calendar_event_constructor (GType type, guint n_construct_params, GObjectConstructParam *construct_params)
+{
+ GObject *object;
+
+ /* Chain up to the parent class */
+ object = G_OBJECT_CLASS (gdata_calendar_event_parent_class)->constructor (type, n_construct_params, construct_params);
+
+ if (_gdata_parsable_is_constructed_from_xml (GDATA_PARSABLE (object)) == FALSE) {
+ GDataCalendarEventPrivate *priv = GDATA_CALENDAR_EVENT (object)->priv;
+ GTimeVal time_val;
+
+ /* Set the edited property to the current time (creation time). We don't do this in *_init() since that would cause
+ * setting it from parse_xml() to fail (duplicate element). */
+ g_get_current_time (&time_val);
+ priv->edited = time_val.tv_sec;
+ }
+
+ return object;
+}
+
+static void
+gdata_calendar_event_dispose (GObject *object)
+{
+ GDataCalendarEventPrivate *priv = GDATA_CALENDAR_EVENT (object)->priv;
+
+ g_list_free_full(priv->times, g_object_unref);
+ priv->times = NULL;
+
+ g_list_free_full (priv->people, g_object_unref);
+ priv->people = NULL;
+
+ g_list_free_full (priv->places, g_object_unref);
+ priv->places = NULL;
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_calendar_event_parent_class)->dispose (object);
+}
+
+static void
+gdata_calendar_event_finalize (GObject *object)
+{
+ GDataCalendarEventPrivate *priv = GDATA_CALENDAR_EVENT (object)->priv;
+
+ g_free (priv->status);
+ g_free (priv->visibility);
+ g_free (priv->transparency);
+ g_free (priv->uid);
+ g_free (priv->recurrence);
+ g_free (priv->original_event_id);
+ g_free (priv->original_event_uri);
+ g_free (priv->organiser_email);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_calendar_event_parent_class)->finalize (object);
+}
+
+static void
+gdata_calendar_event_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataCalendarEventPrivate *priv = GDATA_CALENDAR_EVENT (object)->priv;
+
+ switch (property_id) {
+ case PROP_EDITED:
+ g_value_set_int64 (value, priv->edited);
+ break;
+ case PROP_STATUS:
+ g_value_set_string (value, priv->status);
+ break;
+ case PROP_VISIBILITY:
+ g_value_set_string (value, priv->visibility);
+ break;
+ case PROP_TRANSPARENCY:
+ g_value_set_string (value, priv->transparency);
+ break;
+ case PROP_UID:
+ g_value_set_string (value, priv->uid);
+ break;
+ case PROP_SEQUENCE:
+ g_value_set_uint (value, CLAMP (priv->sequence, 0, G_MAXUINT));
+ break;
+ case PROP_GUESTS_CAN_MODIFY:
+ g_value_set_boolean (value, priv->guests_can_modify);
+ break;
+ case PROP_GUESTS_CAN_INVITE_OTHERS:
+ g_value_set_boolean (value, priv->guests_can_invite_others);
+ break;
+ case PROP_GUESTS_CAN_SEE_GUESTS:
+ g_value_set_boolean (value, priv->guests_can_see_guests);
+ break;
+ case PROP_ANYONE_CAN_ADD_SELF:
+ g_value_set_boolean (value, priv->anyone_can_add_self);
+ break;
+ case PROP_RECURRENCE:
+ g_value_set_string (value, priv->recurrence);
+ break;
+ case PROP_ORIGINAL_EVENT_ID:
+ g_value_set_string (value, priv->original_event_id);
+ break;
+ case PROP_ORIGINAL_EVENT_URI:
+ g_value_set_string (value, priv->original_event_uri);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_calendar_event_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataCalendarEvent *self = GDATA_CALENDAR_EVENT (object);
+
+ switch (property_id) {
+ case PROP_STATUS:
+ gdata_calendar_event_set_status (self, g_value_get_string (value));
+ break;
+ case PROP_VISIBILITY:
+ gdata_calendar_event_set_visibility (self, g_value_get_string (value));
+ break;
+ case PROP_TRANSPARENCY:
+ gdata_calendar_event_set_transparency (self, g_value_get_string (value));
+ break;
+ case PROP_UID:
+ gdata_calendar_event_set_uid (self, g_value_get_string (value));
+ break;
+ case PROP_SEQUENCE:
+ gdata_calendar_event_set_sequence (self, g_value_get_uint (value));
+ break;
+ case PROP_GUESTS_CAN_MODIFY:
+ gdata_calendar_event_set_guests_can_modify (self, g_value_get_boolean (value));
+ break;
+ case PROP_GUESTS_CAN_INVITE_OTHERS:
+ gdata_calendar_event_set_guests_can_invite_others (self, g_value_get_boolean (value));
+ break;
+ case PROP_GUESTS_CAN_SEE_GUESTS:
+ gdata_calendar_event_set_guests_can_see_guests (self, g_value_get_boolean (value));
+ break;
+ case PROP_ANYONE_CAN_ADD_SELF:
+ gdata_calendar_event_set_anyone_can_add_self (self, g_value_get_boolean (value));
+ break;
+ case PROP_RECURRENCE:
+ gdata_calendar_event_set_recurrence (self, g_value_get_string (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+date_object_from_json (JsonReader *reader,
+ const gchar *member_name,
+ GDataParserOptions options,
+ gint64 *date_time_output,
+ gboolean *is_date_output,
+ gboolean *success,
+ GError **error)
+{
+ gint64 date_time;
+ gboolean is_date = FALSE;
+ gboolean found_member = FALSE;
+
+ /* Check if there’s such an element */
+ if (g_strcmp0 (json_reader_get_member_name (reader), member_name) != 0) {
+ return FALSE;
+ }
+
+ /* Check that it’s an object. */
+ if (!json_reader_is_object (reader)) {
+ const GError *child_error;
+
+ /* Manufacture an error. */
+ json_reader_read_member (reader, "dateTime");
+ child_error = json_reader_get_error (reader);
+ g_assert (child_error != NULL);
+ *success = gdata_parser_error_from_json_error (reader,
+ child_error,
+ error);
+ json_reader_end_member (reader);
+
+ return TRUE;
+ }
+
+ /* Try to parse either the dateTime or date member. */
+ if (json_reader_read_member (reader, "dateTime")) {
+ const gchar *date_string;
+ const GError *child_error;
+ GTimeVal time_val;
+
+ date_string = json_reader_get_string_value (reader);
+ child_error = json_reader_get_error (reader);
+
+ if (child_error != NULL) {
+ *success = gdata_parser_error_from_json_error (reader,
+ child_error,
+ error);
+ json_reader_end_member (reader);
+ return TRUE;
+ }
+
+ if (!g_time_val_from_iso8601 (date_string, &time_val)) {
+ *success = gdata_parser_error_not_iso8601_format_json (reader, date_string, error);
+ json_reader_end_member (reader);
+ return TRUE;
+ }
+
+ date_time = time_val.tv_sec;
+ is_date = FALSE;
+ found_member = TRUE;
+ }
+ json_reader_end_member (reader);
+
+ if (json_reader_read_member (reader, "date")) {
+ const gchar *date_string;
+ const GError *child_error;
+
+ date_string = json_reader_get_string_value (reader);
+ child_error = json_reader_get_error (reader);
+
+ if (child_error != NULL) {
+ *success = gdata_parser_error_from_json_error (reader,
+ child_error,
+ error);
+ json_reader_end_member (reader);
+ return TRUE;
+ }
+
+ if (!gdata_parser_int64_from_date (date_string, &date_time)) {
+ *success = gdata_parser_error_not_iso8601_format_json (reader, date_string, error);
+ json_reader_end_member (reader);
+ return TRUE;
+ }
+
+ is_date = TRUE;
+ found_member = TRUE;
+ }
+ json_reader_end_member (reader);
+
+ /* Ignore timeZone; it should be specified in dateTime. */
+ if (!found_member) {
+ *success = gdata_parser_error_required_json_content_missing (reader, error);
+ return TRUE;
+ }
+
+ *date_time_output = date_time;
+ *is_date_output = is_date;
+ *success = TRUE;
+
+ return TRUE;
+}
+
+/* Convert between v2 and v3 versions of various enum values. v2 uses a URI
+ * style with a constant prefix; v3 simply drops this prefix, and changes the
+ * spelling of ‘canceled’ to ‘cancelled’. */
+#define V2_PREFIX "http://schemas.google.com/g/2005#event."
+
+static gchar *
+add_v2_prefix (const gchar *in)
+{
+ return g_strconcat (V2_PREFIX, in, NULL);
+}
+
+static const gchar *
+strip_v2_prefix (const gchar *uri)
+{
+ /* Convert to v3 format. */
+ if (g_str_has_prefix (uri, V2_PREFIX)) {
+ return uri + strlen (V2_PREFIX);
+ } else {
+ return uri;
+ }
+}
+
+static gboolean
+parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error)
+{
+ gboolean success;
+ GDataCalendarEvent *self = GDATA_CALENDAR_EVENT (parsable);
+ GDataCalendarEventPrivate *priv = self->priv;
+
+ /* FIXME: Currently unsupported:
+ * - htmlLink
+ * - colorId
+ * - endTimeUnspecified
+ * - originalStartTime
+ * - attendeesOmitted
+ * - extendedProperties
+ * - hangoutLink
+ * - gadget
+ * - privateCopy
+ * - locked
+ * - reminders
+ * - source
+ */
+
+ if (g_strcmp0 (json_reader_get_member_name (reader), "start") == 0) {
+ self->priv->parser.seen_start = TRUE;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "end") == 0) {
+ self->priv->parser.seen_end = TRUE;
+ }
+
+ if (gdata_parser_string_from_json_member (reader, "recurringEventId", P_DEFAULT, &self->priv->original_event_id, &success, error) ||
+ gdata_parser_boolean_from_json_member (reader, "guestsCanModify", P_DEFAULT, &self->priv->guests_can_modify, &success, error) ||
+ gdata_parser_boolean_from_json_member (reader, "guestsCanInviteOthers", P_DEFAULT, &self->priv->guests_can_invite_others, &success, error) ||
+ gdata_parser_boolean_from_json_member (reader, "guestsCanSeeOtherGuests", P_DEFAULT, &self->priv->guests_can_see_guests, &success, error) ||
+ gdata_parser_boolean_from_json_member (reader, "anyoneCanAddSelf", P_DEFAULT, &self->priv->anyone_can_add_self, &success, error) ||
+ gdata_parser_string_from_json_member (reader, "iCalUID", P_DEFAULT, &self->priv->uid, &success, error) ||
+ gdata_parser_int_from_json_member (reader, "sequence", P_DEFAULT, &self->priv->sequence, &success, error) ||
+ gdata_parser_int64_time_from_json_member (reader, "updated", P_DEFAULT, &self->priv->edited, &success, error) ||
+ date_object_from_json (reader, "start", P_DEFAULT, &self->priv->parser.start_time, &self->priv->parser.start_is_date, &success, error) ||
+ date_object_from_json (reader, "end", P_DEFAULT, &self->priv->parser.end_time, &self->priv->parser.end_is_date, &success, error)) {
+ if (success) {
+ if (self->priv->edited != -1) {
+ _gdata_entry_set_updated (GDATA_ENTRY (parsable),
+ self->priv->edited);
+ }
+
+ if (self->priv->original_event_id != NULL) {
+ g_free (self->priv->original_event_uri);
+ self->priv->original_event_uri = g_strconcat ("https://www.googleapis.com/calendar/v3/events/",
+ self->priv->original_event_id, NULL);
+ }
+
+ if (self->priv->parser.seen_start && self->priv->parser.seen_end) {
+ GDataGDWhen *when;
+
+ when = gdata_gd_when_new (self->priv->parser.start_time,
+ self->priv->parser.end_time,
+ self->priv->parser.start_is_date ||
+ self->priv->parser.end_is_date);
+ self->priv->times = g_list_prepend (self->priv->times, when); /* transfer ownership */
+
+ self->priv->parser.seen_start = FALSE;
+ self->priv->parser.seen_end = FALSE;
+ }
+ }
+
+ return success;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "transparency") == 0) {
+ gchar *transparency = NULL; /* owned */
+
+ g_assert (gdata_parser_string_from_json_member (reader,
+ "transparency",
+ P_DEFAULT,
+ &transparency,
+ &success,
+ error));
+
+ if (success) {
+ priv->transparency = add_v2_prefix (transparency);
+ }
+
+ g_free (transparency);
+
+ return success;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "visibility") == 0) {
+ gchar *visibility = NULL; /* owned */
+
+ g_assert (gdata_parser_string_from_json_member (reader,
+ "visibility",
+ P_DEFAULT,
+ &visibility,
+ &success,
+ error));
+
+ if (success) {
+ priv->visibility = add_v2_prefix (visibility);
+ }
+
+ g_free (visibility);
+
+ return success;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "status") == 0) {
+ gchar *status = NULL; /* owned */
+
+ g_assert (gdata_parser_string_from_json_member (reader,
+ "status",
+ P_DEFAULT,
+ &status,
+ &success,
+ error));
+
+ if (success) {
+ if (g_strcmp0 (status, "cancelled") == 0) {
+ /* Those damned British Englishes. */
+ priv->status = add_v2_prefix ("canceled");
+ } else {
+ priv->status = add_v2_prefix (status);
+ }
+ }
+
+ g_free (status);
+
+ return success;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "summary") == 0) {
+ const gchar *summary;
+ const GError *child_error = NULL;
+
+ summary = json_reader_get_string_value (reader);
+ child_error = json_reader_get_error (reader);
+
+ if (child_error != NULL) {
+ gdata_parser_error_from_json_error (reader,
+ child_error, error);
+ return FALSE;
+ }
+
+ gdata_entry_set_title (GDATA_ENTRY (parsable), summary);
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "description") == 0) {
+ const gchar *description;
+ const GError *child_error = NULL;
+
+ description = json_reader_get_string_value (reader);
+ child_error = json_reader_get_error (reader);
+
+ if (child_error != NULL) {
+ gdata_parser_error_from_json_error (reader,
+ child_error, error);
+ return FALSE;
+ }
+
+ gdata_entry_set_content (GDATA_ENTRY (parsable), description);
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "location") == 0) {
+ const gchar *location;
+ GDataGDWhere *where = NULL; /* owned */
+ const GError *child_error = NULL;
+
+ location = json_reader_get_string_value (reader);
+ child_error = json_reader_get_error (reader);
+
+ if (child_error != NULL) {
+ gdata_parser_error_from_json_error (reader,
+ child_error, error);
+ return FALSE;
+ }
+
+ where = gdata_gd_where_new (GDATA_GD_WHERE_EVENT,
+ location, NULL);
+ priv->places = g_list_prepend (priv->places, where); /* transfer ownership */
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "created") == 0) {
+ gint64 created;
+
+ g_assert (gdata_parser_int64_time_from_json_member (reader,
+ "created",
+ P_DEFAULT,
+ &created,
+ &success,
+ error));
+
+ if (success) {
+ _gdata_entry_set_published (GDATA_ENTRY (parsable),
+ created);
+ }
+
+ return success;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "recurrence") == 0) {
+ guint i, j;
+ GString *recurrence = NULL; /* owned */
+
+ /* In the JSON API, the recurrence is given as an array of
+ * strings, each giving an RFC 2445 property such as RRULE,
+ * EXRULE, RDATE or EXDATE. Concatenate them all to form a
+ * recurrence string as used in v2 of the API. */
+ if (self->priv->recurrence != NULL) {
+ return gdata_parser_error_duplicate_json_element (reader,
+ error);
+ }
+
+ recurrence = g_string_new ("");
+
+ for (i = 0, j = json_reader_count_elements (reader); i < j; i++) {
+ const gchar *line;
+ const GError *child_error;
+
+ json_reader_read_element (reader, i);
+
+ line = json_reader_get_string_value (reader);
+ child_error = json_reader_get_error (reader);
+ if (child_error != NULL) {
+ gdata_parser_error_from_json_error (reader, child_error, error);
+ json_reader_end_element (reader);
+ return FALSE;
+ }
+
+ g_string_append (recurrence, line);
+ g_string_append (recurrence, "\n");
+
+ json_reader_end_element (reader);
+ }
+
+ g_assert (self->priv->recurrence == NULL);
+ self->priv->recurrence = g_string_free (recurrence, FALSE);
+
+ return TRUE;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "attendees") == 0) {
+ guint i, j;
+
+ if (priv->people != NULL) {
+ return gdata_parser_error_duplicate_json_element (reader,
+ error);
+ }
+
+ for (i = 0, j = json_reader_count_elements (reader); i < j; i++) {
+ GDataGDWho *who = NULL; /* owned */
+ const gchar *email_address, *value_string;
+ const gchar *relation_type;
+ gboolean is_organizer, is_resource;
+ const GError *child_error;
+
+ json_reader_read_element (reader, i);
+
+ json_reader_read_member (reader, "responseStatus");
+ child_error = json_reader_get_error (reader);
+ if (child_error != NULL) {
+ gdata_parser_error_from_json_error (reader,
+ child_error,
+ error);
+ json_reader_end_member (reader);
+ return FALSE;
+ }
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "email");
+ email_address = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "displayName");
+ value_string = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "organizer");
+ is_organizer = json_reader_get_boolean_value (reader);
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "resource");
+ is_resource = json_reader_get_boolean_value (reader);
+ json_reader_end_member (reader);
+
+ /* FIXME: Currently unsupported:
+ * - id
+ * - self
+ * - optional (writeble)
+ * - responseStatus (writeble)
+ * - comment (writeble)
+ * - additionalGuests (writeble)
+ */
+
+ if (is_organizer) {
+ relation_type = GDATA_GD_WHO_EVENT_ORGANIZER;
+ } else if (!is_resource) {
+ relation_type = GDATA_GD_WHO_EVENT_ATTENDEE;
+ } else {
+ /* FIXME: Add support for resources. */
+ relation_type = NULL;
+ }
+
+ who = gdata_gd_who_new (relation_type, value_string,
+ email_address);
+ priv->people = g_list_prepend (priv->people, who); /* transfer ownership */
+
+ json_reader_end_element (reader);
+ }
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "organizer") == 0) {
+ /* This actually gives the parent calendar. Optional. */
+ g_clear_pointer (&priv->organiser_email, g_free);
+ if (json_reader_read_member (reader, "email"))
+ priv->organiser_email = g_strdup (json_reader_get_string_value (reader));
+ json_reader_end_member (reader);
+
+ return TRUE;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "creator") == 0) {
+ /* These are read-only and already handled as part of
+ * ‘attendees’, so ignore them. */
+ return TRUE;
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_calendar_event_parent_class)->parse_json (parsable, reader, user_data, error);
+ }
+
+ return TRUE;
+}
+
+static gboolean
+post_parse_json (GDataParsable *parsable, gpointer user_data, GError **error)
+{
+ GDataLink *_link = NULL; /* owned */
+ const gchar *id, *calendar_id;
+ gchar *uri = NULL; /* owned */
+ GDataCalendarEventPrivate *priv;
+
+ priv = GDATA_CALENDAR_EVENT (parsable)->priv;
+
+ /* Set the self link, which is needed for gdata_service_delete_entry().
+ * Unfortunately, it needs the event ID _and_ the calendar ID — which
+ * is perversely only available as the organiser e-mail address. */
+ id = gdata_entry_get_id (GDATA_ENTRY (parsable));
+ calendar_id = priv->organiser_email;
+
+ if (id == NULL || calendar_id == NULL) {
+ return TRUE;
+ }
+
+ uri = g_strconcat ("https://www.googleapis.com/calendar/v3/calendars/",
+ calendar_id, "/events/", id, NULL);
+ _link = gdata_link_new (uri, GDATA_LINK_SELF);
+ gdata_entry_add_link (GDATA_ENTRY (parsable), _link);
+ g_object_unref (_link);
+ g_free (uri);
+
+ return TRUE;
+}
+
+static void
+get_json (GDataParsable *parsable, JsonBuilder *builder)
+{
+ GList *l;
+ const gchar *id, *etag, *title, *description;
+ GDataGDWho *organiser_who = NULL; /* unowned */
+ GDataCalendarEventPrivate *priv = GDATA_CALENDAR_EVENT (parsable)->priv;
+
+ /* FIXME: Support:
+ * - colorId
+ * - attendeesOmitted
+ * - extendedProperties
+ * - gadget
+ * - reminders
+ * - source
+ */
+
+ id = gdata_entry_get_id (GDATA_ENTRY (parsable));
+ if (id != NULL) {
+ json_builder_set_member_name (builder, "id");
+ json_builder_add_string_value (builder, id);
+ }
+
+ json_builder_set_member_name (builder, "kind");
+ json_builder_add_string_value (builder, "calendar#event");
+
+ /* Add the ETag, if available. */
+ etag = gdata_entry_get_etag (GDATA_ENTRY (parsable));
+ if (etag != NULL) {
+ json_builder_set_member_name (builder, "etag");
+ json_builder_add_string_value (builder, etag);
+ }
+
+ /* Calendar labels titles as ‘summary’. */
+ title = gdata_entry_get_title (GDATA_ENTRY (parsable));
+ if (title != NULL) {
+ json_builder_set_member_name (builder, "summary");
+ json_builder_add_string_value (builder, title);
+ }
+
+ description = gdata_entry_get_content (GDATA_ENTRY (parsable));
+ if (description != NULL) {
+ json_builder_set_member_name (builder, "description");
+ json_builder_add_string_value (builder, description);
+ }
+
+ /* Add all the calendar-specific JSON */
+ json_builder_set_member_name (builder, "anyoneCanAddSelf");
+ json_builder_add_boolean_value (builder, priv->anyone_can_add_self);
+
+ json_builder_set_member_name (builder, "guestsCanInviteOthers");
+ json_builder_add_boolean_value (builder, priv->guests_can_invite_others);
+
+ json_builder_set_member_name (builder, "guestsCanModify");
+ json_builder_add_boolean_value (builder, priv->guests_can_modify);
+
+ json_builder_set_member_name (builder, "guestsCanSeeOtherGuests");
+ json_builder_add_boolean_value (builder, priv->guests_can_see_guests);
+
+ if (priv->transparency != NULL) {
+ json_builder_set_member_name (builder, "transparency");
+ json_builder_add_string_value (builder,
+ strip_v2_prefix (priv->transparency));
+ }
+
+ if (priv->visibility != NULL) {
+ json_builder_set_member_name (builder, "visibility");
+ json_builder_add_string_value (builder,
+ strip_v2_prefix (priv->visibility));
+ }
+
+ if (priv->uid != NULL) {
+ json_builder_set_member_name (builder, "iCalUID");
+ json_builder_add_string_value (builder, priv->uid);
+ }
+
+ if (priv->sequence > 0) {
+ json_builder_set_member_name (builder, "sequence");
+ json_builder_add_int_value (builder, priv->sequence);
+ }
+
+ if (priv->status != NULL) {
+ const gchar *status;
+
+ /* Convert to v3 format. */
+ status = strip_v2_prefix (priv->status);
+ if (g_strcmp0 (status, "canceled") == 0) {
+ status = "cancelled";
+ }
+
+ json_builder_set_member_name (builder, "status");
+ json_builder_add_string_value (builder, status);
+ }
+
+ if (priv->recurrence != NULL) {
+ gchar **parts;
+ guint i;
+
+ json_builder_set_member_name (builder, "recurrence");
+ json_builder_begin_array (builder);
+
+ parts = g_strsplit (priv->recurrence, "\n", -1);
+
+ for (i = 0; parts[i] != NULL; i++) {
+ json_builder_add_string_value (builder, parts[i]);
+ }
+
+ g_strfreev (parts);
+
+ json_builder_end_array (builder);
+ }
+
+ if (priv->original_event_id != NULL) {
+ json_builder_set_member_name (builder, "recurringEventId");
+ json_builder_add_string_value (builder, priv->original_event_id);
+ }
+
+ /* Times. */
+ for (l = priv->times; l != NULL; l = l->next) {
+ GDataGDWhen *when; /* unowned */
+ gchar *val = NULL; /* owned */
+ const gchar *member_name;
+ gint64 start_time, end_time;
+
+ when = l->data;
+
+ /* Start time. */
+ start_time = gdata_gd_when_get_start_time (when);
+ json_builder_set_member_name (builder, "start");
+ json_builder_begin_object (builder);
+
+ if (gdata_gd_when_is_date (when)) {
+ member_name = "date";
+ val = gdata_parser_date_from_int64 (start_time);
+ } else {
+ member_name = "dateTime";
+ val = gdata_parser_int64_to_iso8601 (start_time);
+ }
+
+ json_builder_set_member_name (builder, member_name);
+ json_builder_add_string_value (builder, val);
+ g_free (val);
+
+ json_builder_set_member_name (builder, "timeZone");
+ json_builder_add_string_value (builder, "UTC");
+
+ json_builder_end_object (builder);
+
+ /* End time. */
+ end_time = gdata_gd_when_get_end_time (when);
+
+ if (end_time > -1) {
+ json_builder_set_member_name (builder, "end");
+ json_builder_begin_object (builder);
+
+ if (gdata_gd_when_is_date (when)) {
+ member_name = "date";
+ val = gdata_parser_date_from_int64 (end_time);
+ } else {
+ member_name = "dateTime";
+ val = gdata_parser_int64_to_iso8601 (end_time);
+ }
+
+ json_builder_set_member_name (builder, member_name);
+ json_builder_add_string_value (builder, val);
+ g_free (val);
+
+ json_builder_set_member_name (builder, "timeZone");
+ json_builder_add_string_value (builder, "UTC");
+
+ json_builder_end_object (builder);
+ } else {
+ json_builder_set_member_name (builder, "endTimeUnspecified");
+ json_builder_add_boolean_value (builder, TRUE);
+ }
+
+ /* Only use the first time. :-(
+ * FIXME: There must be a better solution. */
+ if (l->next != NULL) {
+ g_warning ("Ignoring secondary times; they are no "
+ "longer supported by the server-side API.");
+ break;
+ }
+ }
+
+ /* Locations. */
+ for (l = priv->places; l != NULL; l = l->next) {
+ GDataGDWhere *where; /* unowned */
+ const gchar *location;
+
+ where = l->data;
+ location = gdata_gd_where_get_value_string (where);
+
+ json_builder_set_member_name (builder, "location");
+ json_builder_add_string_value (builder, location);
+
+ /* Only use the first location. :-(
+ * FIXME: There must be a better solution. */
+ if (l->next != NULL) {
+ g_warning ("Ignoring secondary locations; they are no "
+ "longer supported by the server-side API.");
+ break;
+ }
+ }
+
+ /* People. */
+ json_builder_set_member_name (builder, "attendees");
+ json_builder_begin_array (builder);
+
+ for (l = priv->people; l != NULL; l = l->next) {
+ GDataGDWho *who; /* unowned */
+ const gchar *display_name, *email_address;
+
+ who = l->data;
+
+ json_builder_begin_object (builder);
+
+ display_name = gdata_gd_who_get_value_string (who);
+ if (display_name != NULL) {
+ json_builder_set_member_name (builder, "displayName");
+ json_builder_add_string_value (builder, display_name);
+ }
+
+ email_address = gdata_gd_who_get_email_address (who);
+ if (email_address != NULL) {
+ json_builder_set_member_name (builder, "email");
+ json_builder_add_string_value (builder, email_address);
+ }
+
+ if (g_strcmp0 (gdata_gd_who_get_relation_type (who),
+ GDATA_GD_WHO_EVENT_ORGANIZER) == 0) {
+ json_builder_set_member_name (builder, "organizer");
+ json_builder_add_boolean_value (builder, TRUE);
+
+ organiser_who = who;
+ }
+
+ json_builder_end_object (builder);
+ }
+
+ json_builder_end_array (builder);
+
+ if (organiser_who != NULL) {
+ const gchar *display_name, *email_address;
+
+ json_builder_set_member_name (builder, "organizer");
+ json_builder_begin_object (builder);
+
+ display_name = gdata_gd_who_get_value_string (organiser_who);
+ if (display_name != NULL) {
+ json_builder_set_member_name (builder, "displayName");
+ json_builder_add_string_value (builder, display_name);
+ }
+
+ email_address = gdata_gd_who_get_email_address (organiser_who);
+ if (email_address != NULL) {
+ json_builder_set_member_name (builder, "email");
+ json_builder_add_string_value (builder, email_address);
+ }
+
+ json_builder_end_object (builder);
+ }
+}
+
+static const gchar *
+get_content_type (void)
+{
+ return "application/json";
+}
+
+/**
+ * gdata_calendar_event_new:
+ * @id: (allow-none): the event's ID, or %NULL
+ *
+ * Creates a new #GDataCalendarEvent with the given ID and default properties.
+ *
+ * Return value: a new #GDataCalendarEvent; unref with g_object_unref()
+ */
+GDataCalendarEvent *
+gdata_calendar_event_new (const gchar *id)
+{
+ return GDATA_CALENDAR_EVENT (g_object_new (GDATA_TYPE_CALENDAR_EVENT, "id", id, NULL));
+}
+
+/**
+ * gdata_calendar_event_get_edited:
+ * @self: a #GDataCalendarEvent
+ *
+ * Gets the #GDataCalendarEvent:edited property. If the property is unset, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the UNIX timestamp for the time the event was last edited, or <code class="literal">-1</code>
+ */
+gint64
+gdata_calendar_event_get_edited (GDataCalendarEvent *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_EVENT (self), -1);
+ return self->priv->edited;
+}
+
+/**
+ * gdata_calendar_event_get_status:
+ * @self: a #GDataCalendarEvent
+ *
+ * Gets the #GDataCalendarEvent:status property.
+ *
+ * Return value: the event status, or %NULL
+ *
+ * Since: 0.2.0
+ */
+const gchar *
+gdata_calendar_event_get_status (GDataCalendarEvent *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_EVENT (self), NULL);
+ return self->priv->status;
+}
+
+/**
+ * gdata_calendar_event_set_status:
+ * @self: a #GDataCalendarEvent
+ * @status: (allow-none): a new event status, or %NULL
+ *
+ * Sets the #GDataCalendarEvent:status property to the new status, @status.
+ *
+ * Set @status to %NULL to unset the property in the event.
+ *
+ * Since: 0.2.0
+ */
+void
+gdata_calendar_event_set_status (GDataCalendarEvent *self, const gchar *status)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_EVENT (self));
+
+ g_free (self->priv->status);
+ self->priv->status = g_strdup (status);
+ g_object_notify (G_OBJECT (self), "status");
+}
+
+/**
+ * gdata_calendar_event_get_visibility:
+ * @self: a #GDataCalendarEvent
+ *
+ * Gets the #GDataCalendarEvent:visibility property.
+ *
+ * Return value: the event visibility, or %NULL
+ */
+const gchar *
+gdata_calendar_event_get_visibility (GDataCalendarEvent *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_EVENT (self), NULL);
+ return self->priv->visibility;
+}
+
+/**
+ * gdata_calendar_event_set_visibility:
+ * @self: a #GDataCalendarEvent
+ * @visibility: (allow-none): a new event visibility, or %NULL
+ *
+ * Sets the #GDataCalendarEvent:visibility property to the new visibility, @visibility.
+ *
+ * Set @visibility to %NULL to unset the property in the event.
+ */
+void
+gdata_calendar_event_set_visibility (GDataCalendarEvent *self, const gchar *visibility)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_EVENT (self));
+
+ g_free (self->priv->visibility);
+ self->priv->visibility = g_strdup (visibility);
+ g_object_notify (G_OBJECT (self), "visibility");
+}
+
+/**
+ * gdata_calendar_event_get_transparency:
+ * @self: a #GDataCalendarEvent
+ *
+ * Gets the #GDataCalendarEvent:transparency property.
+ *
+ * Return value: the event transparency, or %NULL
+ */
+const gchar *
+gdata_calendar_event_get_transparency (GDataCalendarEvent *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_EVENT (self), NULL);
+ return self->priv->transparency;
+}
+
+/**
+ * gdata_calendar_event_set_transparency:
+ * @self: a #GDataCalendarEvent
+ * @transparency: (allow-none): a new event transparency, or %NULL
+ *
+ * Sets the #GDataCalendarEvent:transparency property to the new transparency, @transparency.
+ *
+ * Set @transparency to %NULL to unset the property in the event.
+ */
+void
+gdata_calendar_event_set_transparency (GDataCalendarEvent *self, const gchar *transparency)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_EVENT (self));
+
+ g_free (self->priv->transparency);
+ self->priv->transparency = g_strdup (transparency);
+ g_object_notify (G_OBJECT (self), "transparency");
+}
+
+/**
+ * gdata_calendar_event_get_uid:
+ * @self: a #GDataCalendarEvent
+ *
+ * Gets the #GDataCalendarEvent:uid property.
+ *
+ * Return value: the event's UID, or %NULL
+ */
+const gchar *
+gdata_calendar_event_get_uid (GDataCalendarEvent *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_EVENT (self), NULL);
+ return self->priv->uid;
+}
+
+/**
+ * gdata_calendar_event_set_uid:
+ * @self: a #GDataCalendarEvent
+ * @uid: (allow-none): a new event UID, or %NULL
+ *
+ * Sets the #GDataCalendarEvent:uid property to the new UID, @uid.
+ *
+ * Set @uid to %NULL to unset the property in the event.
+ */
+void
+gdata_calendar_event_set_uid (GDataCalendarEvent *self, const gchar *uid)
+{
+ /* TODO: is modifying this allowed? */
+ g_return_if_fail (GDATA_IS_CALENDAR_EVENT (self));
+
+ g_free (self->priv->uid);
+ self->priv->uid = g_strdup (uid);
+ g_object_notify (G_OBJECT (self), "uid");
+}
+
+/**
+ * gdata_calendar_event_get_sequence:
+ * @self: a #GDataCalendarEvent
+ *
+ * Gets the #GDataCalendarEvent:sequence property.
+ *
+ * Return value: the event's sequence number
+ */
+guint
+gdata_calendar_event_get_sequence (GDataCalendarEvent *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_EVENT (self), 0);
+ return CLAMP (self->priv->sequence, 0, G_MAXUINT);
+}
+
+/**
+ * gdata_calendar_event_set_sequence:
+ * @self: a #GDataCalendarEvent
+ * @sequence: a new sequence number, or <code class="literal">0</code>
+ *
+ * Sets the #GDataCalendarEvent:sequence property to the new sequence number, @sequence.
+ */
+void
+gdata_calendar_event_set_sequence (GDataCalendarEvent *self, guint sequence)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_EVENT (self));
+ self->priv->sequence = sequence;
+ g_object_notify (G_OBJECT (self), "sequence");
+}
+
+/**
+ * gdata_calendar_event_get_guests_can_modify:
+ * @self: a #GDataCalendarEvent
+ *
+ * Gets the #GDataCalendarEvent:guests-can-modify property.
+ *
+ * Return value: %TRUE if attendees can modify the original event, %FALSE otherwise
+ */
+gboolean
+gdata_calendar_event_get_guests_can_modify (GDataCalendarEvent *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_EVENT (self), FALSE);
+ return self->priv->guests_can_modify;
+}
+
+/**
+ * gdata_calendar_event_set_guests_can_modify:
+ * @self: a #GDataCalendarEvent
+ * @guests_can_modify: %TRUE if attendees can modify the original event, %FALSE otherwise
+ *
+ * Sets the #GDataCalendarEvent:guests-can-modify property to @guests_can_modify.
+ */
+void
+gdata_calendar_event_set_guests_can_modify (GDataCalendarEvent *self, gboolean guests_can_modify)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_EVENT (self));
+ self->priv->guests_can_modify = guests_can_modify;
+ g_object_notify (G_OBJECT (self), "guests-can-modify");
+}
+
+/**
+ * gdata_calendar_event_get_guests_can_invite_others:
+ * @self: a #GDataCalendarEvent
+ *
+ * Gets the #GDataCalendarEvent:guests-can-invite-others property.
+ *
+ * Return value: %TRUE if attendees can invite others to the event, %FALSE otherwise
+ */
+gboolean
+gdata_calendar_event_get_guests_can_invite_others (GDataCalendarEvent *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_EVENT (self), FALSE);
+ return self->priv->guests_can_invite_others;
+}
+
+/**
+ * gdata_calendar_event_set_guests_can_invite_others:
+ * @self: a #GDataCalendarEvent
+ * @guests_can_invite_others: %TRUE if attendees can invite others to the event, %FALSE otherwise
+ *
+ * Sets the #GDataCalendarEvent:guests-can-invite-others property to @guests_can_invite_others.
+ */
+void
+gdata_calendar_event_set_guests_can_invite_others (GDataCalendarEvent *self, gboolean guests_can_invite_others)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_EVENT (self));
+ self->priv->guests_can_invite_others = guests_can_invite_others;
+ g_object_notify (G_OBJECT (self), "guests-can-invite-others");
+}
+
+/**
+ * gdata_calendar_event_get_guests_can_see_guests:
+ * @self: a #GDataCalendarEvent
+ *
+ * Gets the #GDataCalendarEvent:guests-can-see-guests property.
+ *
+ * Return value: %TRUE if attendees can see who's attending the event, %FALSE otherwise
+ */
+gboolean
+gdata_calendar_event_get_guests_can_see_guests (GDataCalendarEvent *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_EVENT (self), FALSE);
+ return self->priv->guests_can_see_guests;
+}
+
+/**
+ * gdata_calendar_event_set_guests_can_see_guests:
+ * @self: a #GDataCalendarEvent
+ * @guests_can_see_guests: %TRUE if attendees can see who's attending the event, %FALSE otherwise
+ *
+ * Sets the #GDataCalendarEvent:guests-can-see-guests property to @guests_can_see_guests.
+ */
+void
+gdata_calendar_event_set_guests_can_see_guests (GDataCalendarEvent *self, gboolean guests_can_see_guests)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_EVENT (self));
+ self->priv->guests_can_see_guests = guests_can_see_guests;
+ g_object_notify (G_OBJECT (self), "guests-can-see-guests");
+}
+
+/**
+ * gdata_calendar_event_get_anyone_can_add_self:
+ * @self: a #GDataCalendarEvent
+ *
+ * Gets the #GDataCalendarEvent:anyone-can-add-self property.
+ *
+ * Return value: %TRUE if anyone can add themselves as an attendee to the event, %FALSE otherwise
+ */
+gboolean
+gdata_calendar_event_get_anyone_can_add_self (GDataCalendarEvent *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_EVENT (self), FALSE);
+ return self->priv->anyone_can_add_self;
+}
+
+/**
+ * gdata_calendar_event_set_anyone_can_add_self:
+ * @self: a #GDataCalendarEvent
+ * @anyone_can_add_self: %TRUE if anyone can add themselves as an attendee to the event, %FALSE otherwise
+ *
+ * Sets the #GDataCalendarEvent:anyone-can-add-self property to @anyone_can_add_self.
+ */
+void
+gdata_calendar_event_set_anyone_can_add_self (GDataCalendarEvent *self, gboolean anyone_can_add_self)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_EVENT (self));
+ self->priv->anyone_can_add_self = anyone_can_add_self;
+ g_object_notify (G_OBJECT (self), "anyone-can-add-self");
+}
+
+/**
+ * gdata_calendar_event_add_person:
+ * @self: a #GDataCalendarEvent
+ * @who: a #GDataGDWho to add
+ *
+ * Adds the person @who to the event as a guest (attendee, organiser, performer, etc.), and increments its reference count.
+ *
+ * Duplicate people will not be added to the list.
+ */
+void
+gdata_calendar_event_add_person (GDataCalendarEvent *self, GDataGDWho *who)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_EVENT (self));
+ g_return_if_fail (GDATA_IS_GD_WHO (who));
+
+ if (g_list_find_custom (self->priv->people, who, (GCompareFunc) gdata_comparable_compare) == NULL)
+ self->priv->people = g_list_append (self->priv->people, g_object_ref (who));
+}
+
+/**
+ * gdata_calendar_event_get_people:
+ * @self: a #GDataCalendarEvent
+ *
+ * Gets a list of the people attending the event.
+ *
+ * Return value: (element-type GData.GDWho) (transfer none): a #GList of #GDataGDWhos, or %NULL
+ *
+ * Since: 0.2.0
+ */
+GList *
+gdata_calendar_event_get_people (GDataCalendarEvent *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_EVENT (self), NULL);
+ return self->priv->people;
+}
+
+/**
+ * gdata_calendar_event_add_place:
+ * @self: a #GDataCalendarEvent
+ * @where: a #GDataGDWhere to add
+ *
+ * Adds the place @where to the event as a location and increments its reference count.
+ *
+ * Duplicate places will not be added to the list.
+ */
+void
+gdata_calendar_event_add_place (GDataCalendarEvent *self, GDataGDWhere *where)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_EVENT (self));
+ g_return_if_fail (GDATA_IS_GD_WHERE (where));
+
+ if (g_list_find_custom (self->priv->places, where, (GCompareFunc) gdata_comparable_compare) == NULL)
+ self->priv->places = g_list_append (self->priv->places, g_object_ref (where));
+}
+
+/**
+ * gdata_calendar_event_get_places:
+ * @self: a #GDataCalendarEvent
+ *
+ * Gets a list of the locations associated with the event.
+ *
+ * Return value: (element-type GData.GDWhere) (transfer none): a #GList of #GDataGDWheres, or %NULL
+ *
+ * Since: 0.2.0
+ */
+GList *
+gdata_calendar_event_get_places (GDataCalendarEvent *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_EVENT (self), NULL);
+ return self->priv->places;
+}
+
+/**
+ * gdata_calendar_event_add_time:
+ * @self: a #GDataCalendarEvent
+ * @when: a #GDataGDWhen to add
+ *
+ * Adds @when to the event as a time period when the event happens, and increments its reference count.
+ *
+ * Duplicate times will not be added to the list.
+ *
+ * Note: gdata_calendar_event_add_time() and gdata_calendar_event_set_recurrence() are mutually
+ * exclusive, as the server doesn't support positive exceptions to recurrence rules. If recurrences
+ * are required, use gdata_calendar_event_set_recurrence(). Note that this means reminders cannot
+ * be set for the event, as they are only supported by #GDataGDWhen. No checks are performed for
+ * these forbidden conditions, as to do so would break libgdata's API; if both a recurrence is set
+ * and a specific time is added, the server will return an error when the #GDataCalendarEvent is
+ * inserted using gdata_service_insert_entry().
+ *
+ * Since: 0.2.0
+ */
+void
+gdata_calendar_event_add_time (GDataCalendarEvent *self, GDataGDWhen *when)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_EVENT (self));
+ g_return_if_fail (GDATA_IS_GD_WHEN (when));
+
+ if (g_list_find_custom (self->priv->times, when, (GCompareFunc) gdata_comparable_compare) == NULL)
+ self->priv->times = g_list_append (self->priv->times, g_object_ref (when));
+}
+
+/**
+ * gdata_calendar_event_get_times:
+ * @self: a #GDataCalendarEvent
+ *
+ * Gets a list of the time periods associated with the event.
+ *
+ * Return value: (element-type GData.GDWhen) (transfer none): a #GList of #GDataGDWhens, or %NULL
+ *
+ * Since: 0.2.0
+ */
+GList *
+gdata_calendar_event_get_times (GDataCalendarEvent *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_EVENT (self), NULL);
+ return self->priv->times;
+}
+
+/**
+ * gdata_calendar_event_get_primary_time:
+ * @self: a #GDataCalendarEvent
+ * @start_time: (out caller-allocates): a #gint64 for the start time, or %NULL
+ * @end_time: (out caller-allocates): a #gint64 for the end time, or %NULL
+ * @when: (out callee-allocates) (transfer none): a #GDataGDWhen for the primary time structure, or %NULL
+ *
+ * Gets the first time period associated with the event, conveniently returning just its start and
+ * end times if required.
+ *
+ * If there are no time periods, or more than one time period, associated with the event, %FALSE will
+ * be returned, and the parameters will remain unmodified.
+ *
+ * Return value: %TRUE if there is only one time period associated with the event, %FALSE otherwise
+ *
+ * Since: 0.2.0
+ */
+gboolean
+gdata_calendar_event_get_primary_time (GDataCalendarEvent *self, gint64 *start_time, gint64 *end_time, GDataGDWhen **when)
+{
+ GDataGDWhen *primary_when;
+
+ g_return_val_if_fail (GDATA_IS_CALENDAR_EVENT (self), FALSE);
+
+ if (self->priv->times == NULL || self->priv->times->next != NULL)
+ return FALSE;
+
+ primary_when = GDATA_GD_WHEN (self->priv->times->data);
+ if (start_time != NULL)
+ *start_time = gdata_gd_when_get_start_time (primary_when);
+ if (end_time != NULL)
+ *end_time = gdata_gd_when_get_end_time (primary_when);
+ if (when != NULL)
+ *when = primary_when;
+
+ return TRUE;
+}
+
+/**
+ * gdata_calendar_event_get_recurrence:
+ * @self: a #GDataCalendarEvent
+ *
+ * Gets the #GDataCalendarEvent:recurrence property.
+ *
+ * Return value: the event recurrence patterns, or %NULL
+ *
+ * Since: 0.3.0
+ */
+const gchar *
+gdata_calendar_event_get_recurrence (GDataCalendarEvent *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_EVENT (self), NULL);
+ return self->priv->recurrence;
+}
+
+/**
+ * gdata_calendar_event_set_recurrence:
+ * @self: a #GDataCalendarEvent
+ * @recurrence: (allow-none): a new event recurrence, or %NULL
+ *
+ * Sets the #GDataCalendarEvent:recurrence property to the new recurrence, @recurrence.
+ *
+ * Set @recurrence to %NULL to unset the property in the event.
+ *
+ * Note: gdata_calendar_event_add_time() and gdata_calendar_event_set_recurrence() are mutually
+ * exclusive. See the documentation for gdata_calendar_event_add_time() for details.
+ *
+ * Since: 0.3.0
+ */
+void
+gdata_calendar_event_set_recurrence (GDataCalendarEvent *self, const gchar *recurrence)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_EVENT (self));
+
+ g_free (self->priv->recurrence);
+ self->priv->recurrence = g_strdup (recurrence);
+ g_object_notify (G_OBJECT (self), "recurrence");
+}
+
+/**
+ * gdata_calendar_event_get_original_event_details:
+ * @self: a #GDataCalendarEvent
+ * @event_id: (out callee-allocates) (transfer full): return location for the original event's ID, or %NULL
+ * @event_uri: (out callee-allocates) (transfer full): return location for the original event's URI, or %NULL
+ *
+ * Gets details of the original event, if this event is an exception to a recurring event. The original
+ * event's ID and the URI of the event's XML are returned in @event_id and @event_uri, respectively.
+ *
+ * If this event is not an exception to a recurring event, @event_id and @event_uri will be set to %NULL.
+ * See gdata_calendar_event_is_exception() to determine more simply whether an event is an exception to a
+ * recurring event.
+ *
+ * If both @event_id and @event_uri are %NULL, this function is a no-op. Otherwise, they should both be
+ * freed with g_free().
+ *
+ * Since: 0.3.0
+ */
+void
+gdata_calendar_event_get_original_event_details (GDataCalendarEvent *self, gchar **event_id, gchar **event_uri)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_EVENT (self));
+
+ if (event_id != NULL)
+ *event_id = g_strdup (self->priv->original_event_id);
+ if (event_uri != NULL)
+ *event_uri = g_strdup (self->priv->original_event_uri);
+}
+
+/**
+ * gdata_calendar_event_is_exception:
+ * @self: a #GDataCalendarEvent
+ *
+ * Determines whether the event is an exception to a recurring event. If it is, details of the original event
+ * can be retrieved using gdata_calendar_event_get_original_event_details().
+ *
+ * Return value: %TRUE if the event is an exception, %FALSE otherwise
+ *
+ * Since: 0.3.0
+ */
+gboolean
+gdata_calendar_event_is_exception (GDataCalendarEvent *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_EVENT (self), FALSE);
+ return (self->priv->original_event_id != NULL && self->priv->original_event_uri != NULL) ? TRUE : FALSE;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_CALENDAR_EVENT_H
+#define GDATA_CALENDAR_EVENT_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-entry.h>
+#include <gdata/gdata-types.h>
+#include <gdata/gd/gdata-gd-when.h>
+#include <gdata/gd/gdata-gd-where.h>
+#include <gdata/gd/gdata-gd-who.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_CALENDAR_EVENT (gdata_calendar_event_get_type ())
+#define GDATA_CALENDAR_EVENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_CALENDAR_EVENT, GDataCalendarEvent))
+#define GDATA_CALENDAR_EVENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_CALENDAR_EVENT, GDataCalendarEventClass))
+#define GDATA_IS_CALENDAR_EVENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_CALENDAR_EVENT))
+#define GDATA_IS_CALENDAR_EVENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_CALENDAR_EVENT))
+#define GDATA_CALENDAR_EVENT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_CALENDAR_EVENT, GDataCalendarEventClass))
+
+typedef struct _GDataCalendarEventPrivate GDataCalendarEventPrivate;
+
+/**
+ * GDataCalendarEvent:
+ *
+ * All the fields in the #GDataCalendarEvent structure are private and should never be accessed directly.
+ */
+typedef struct {
+ GDataEntry parent;
+ GDataCalendarEventPrivate *priv;
+} GDataCalendarEvent;
+
+/**
+ * GDataCalendarEventClass:
+ *
+ * All the fields in the #GDataCalendarEventClass structure are private and should never be accessed directly.
+ */
+typedef struct {
+ /*< private >*/
+ GDataEntryClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataCalendarEventClass;
+
+GType gdata_calendar_event_get_type (void) G_GNUC_CONST;
+
+GDataCalendarEvent *gdata_calendar_event_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+gint64 gdata_calendar_event_get_edited (GDataCalendarEvent *self);
+const gchar *gdata_calendar_event_get_status (GDataCalendarEvent *self) G_GNUC_PURE;
+void gdata_calendar_event_set_status (GDataCalendarEvent *self, const gchar *status);
+const gchar *gdata_calendar_event_get_visibility (GDataCalendarEvent *self) G_GNUC_PURE;
+void gdata_calendar_event_set_visibility (GDataCalendarEvent *self, const gchar *visibility);
+const gchar *gdata_calendar_event_get_transparency (GDataCalendarEvent *self) G_GNUC_PURE;
+void gdata_calendar_event_set_transparency (GDataCalendarEvent *self, const gchar *transparency);
+const gchar *gdata_calendar_event_get_uid (GDataCalendarEvent *self) G_GNUC_PURE;
+void gdata_calendar_event_set_uid (GDataCalendarEvent *self, const gchar *uid);
+guint gdata_calendar_event_get_sequence (GDataCalendarEvent *self) G_GNUC_PURE;
+void gdata_calendar_event_set_sequence (GDataCalendarEvent *self, guint sequence);
+gboolean gdata_calendar_event_get_guests_can_modify (GDataCalendarEvent *self) G_GNUC_PURE;
+void gdata_calendar_event_set_guests_can_modify (GDataCalendarEvent *self, gboolean guests_can_modify);
+gboolean gdata_calendar_event_get_guests_can_invite_others (GDataCalendarEvent *self) G_GNUC_PURE;
+void gdata_calendar_event_set_guests_can_invite_others (GDataCalendarEvent *self, gboolean guests_can_invite_others);
+gboolean gdata_calendar_event_get_guests_can_see_guests (GDataCalendarEvent *self) G_GNUC_PURE;
+void gdata_calendar_event_set_guests_can_see_guests (GDataCalendarEvent *self, gboolean guests_can_see_guests);
+gboolean gdata_calendar_event_get_anyone_can_add_self (GDataCalendarEvent *self) G_GNUC_PURE;
+void gdata_calendar_event_set_anyone_can_add_self (GDataCalendarEvent *self, gboolean anyone_can_add_self);
+void gdata_calendar_event_add_person (GDataCalendarEvent *self, GDataGDWho *who);
+GList *gdata_calendar_event_get_people (GDataCalendarEvent *self) G_GNUC_PURE;
+void gdata_calendar_event_add_place (GDataCalendarEvent *self, GDataGDWhere *where);
+GList *gdata_calendar_event_get_places (GDataCalendarEvent *self) G_GNUC_PURE;
+void gdata_calendar_event_add_time (GDataCalendarEvent *self, GDataGDWhen *when);
+GList *gdata_calendar_event_get_times (GDataCalendarEvent *self) G_GNUC_PURE;
+gboolean gdata_calendar_event_get_primary_time (GDataCalendarEvent *self, gint64 *start_time, gint64 *end_time, GDataGDWhen **when);
+const gchar *gdata_calendar_event_get_recurrence (GDataCalendarEvent *self) G_GNUC_PURE;
+void gdata_calendar_event_set_recurrence (GDataCalendarEvent *self, const gchar *recurrence);
+void gdata_calendar_event_get_original_event_details (GDataCalendarEvent *self, gchar **event_id, gchar **event_uri);
+gboolean gdata_calendar_event_is_exception (GDataCalendarEvent *self) G_GNUC_PURE;
+
+G_END_DECLS
+
+#endif /* !GDATA_CALENDAR_EVENT_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009, 2010, 2014, 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-calendar-feed
+ * @short_description: GData Calendar feed object
+ * @stability: Stable
+ * @include: gdata/services/calendar/gdata-calendar-feed.h
+ *
+ * #GDataCalendarFeed is a subclass of #GDataFeed to represent a results feed from Google Calendar. It adds a couple of
+ * properties which are specific to the Google Calendar API.
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+
+#include "gdata-calendar-feed.h"
+#include "gdata-feed.h"
+#include "gdata-private.h"
+
+static void gdata_calendar_feed_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+
+enum {
+ PROP_TIMEZONE = 1,
+ PROP_TIMES_CLEANED
+};
+
+G_DEFINE_TYPE (GDataCalendarFeed, gdata_calendar_feed, GDATA_TYPE_FEED)
+
+static void
+gdata_calendar_feed_class_init (GDataCalendarFeedClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ gobject_class->get_property = gdata_calendar_feed_get_property;
+
+ /**
+ * GDataCalendarFeed:timezone:
+ *
+ * The timezone in which the feed's times are given. This is a timezone name in tz database notation: <ulink type="http"
+ * url="http://en.wikipedia.org/wiki/Tz_database#Names_of_time_zones">reference</ulink>.
+ *
+ * Since: 0.3.0
+ * Deprecated: 0.17.2: Unsupported by the online API any more. There
+ * is no replacement; this will always return %NULL.
+ */
+ g_object_class_install_property (gobject_class, PROP_TIMEZONE,
+ g_param_spec_string ("timezone",
+ "Timezone", "The timezone in which the feed's times are given.",
+ NULL,
+ G_PARAM_DEPRECATED |
+ G_PARAM_READABLE |
+ G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCalendarFeed:times-cleaned:
+ *
+ * The number of times the feed has been completely cleared of entries.
+ *
+ * Since: 0.3.0
+ * Deprecated: 0.17.2: Unsupported by the online API any more. There
+ * is no replacement; this will always return 0.
+ */
+ g_object_class_install_property (gobject_class, PROP_TIMES_CLEANED,
+ g_param_spec_uint ("times-cleaned",
+ "Times cleaned", "The number of times the feed has been completely cleared of entries.",
+ 0, G_MAXUINT, 0,
+ G_PARAM_DEPRECATED |
+ G_PARAM_READABLE |
+ G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_calendar_feed_init (GDataCalendarFeed *self)
+{
+ /* Nothing to see here. */
+}
+
+static void
+gdata_calendar_feed_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataCalendarFeed *self = GDATA_CALENDAR_FEED (object);
+
+ switch (property_id) {
+ case PROP_TIMEZONE:
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ g_value_set_string (value,
+ gdata_calendar_feed_get_timezone (self));
+ G_GNUC_END_IGNORE_DEPRECATIONS
+ break;
+ case PROP_TIMES_CLEANED:
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ g_value_set_uint (value,
+ gdata_calendar_feed_get_times_cleaned (self));
+ G_GNUC_END_IGNORE_DEPRECATIONS
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+/**
+ * gdata_calendar_feed_get_timezone:
+ * @self: a #GDataCalendarFeed
+ *
+ * Gets the #GDataCalendarFeed:timezone property.
+ *
+ * Return value: the feed's timezone, or %NULL
+ *
+ * Since: 0.3.0
+ * Deprecated: 0.17.2: Unsupported by the online API any more. There is no
+ * replacement; this will always return %NULL.
+ */
+const gchar *
+gdata_calendar_feed_get_timezone (GDataCalendarFeed *self)
+{
+ /* Not supported any more by version 3 of the API. */
+ g_return_val_if_fail (GDATA_IS_CALENDAR_FEED (self), NULL);
+ return NULL;
+}
+
+/**
+ * gdata_calendar_feed_get_times_cleaned:
+ * @self: a #GDataCalendarFeed
+ *
+ * Gets the #GDataCalendarFeed:times-cleaned property.
+ *
+ * Return value: the number of times the feed has been totally emptied
+ *
+ * Since: 0.3.0
+ * Deprecated: 0.17.2: Unsupported by the online API any more. There is no
+ * replacement; this will always return %NULL.
+ */
+guint
+gdata_calendar_feed_get_times_cleaned (GDataCalendarFeed *self)
+{
+ /* Not supported any more by version 3 of the API. */
+ g_return_val_if_fail (GDATA_IS_CALENDAR_FEED (self), 0);
+ return 0;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009, 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_CALENDAR_FEED_H
+#define GDATA_CALENDAR_FEED_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+#include <gdata/gdata-feed.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_CALENDAR_FEED (gdata_calendar_feed_get_type ())
+#define GDATA_CALENDAR_FEED(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_CALENDAR_FEED, GDataCalendarFeed))
+#define GDATA_CALENDAR_FEED_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_CALENDAR_FEED, GDataCalendarFeedClass))
+#define GDATA_IS_CALENDAR_FEED(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_CALENDAR_FEED))
+#define GDATA_IS_CALENDAR_FEED_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_CALENDAR_FEED))
+#define GDATA_CALENDAR_FEED_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_CALENDAR_FEED, GDataCalendarFeedClass))
+
+typedef struct _GDataCalendarFeedPrivate GDataCalendarFeedPrivate;
+
+/**
+ * GDataCalendarFeed:
+ *
+ * All the fields in the #GDataCalendarFeed structure are private and should never be accessed directly.
+ *
+ * Since: 0.3.0
+ */
+typedef struct {
+ GDataFeed parent;
+ GDataCalendarFeedPrivate *priv;
+} GDataCalendarFeed;
+
+/**
+ * GDataCalendarFeedClass:
+ *
+ * All the fields in the #GDataCalendarFeedClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.3.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataFeedClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataCalendarFeedClass;
+
+GType gdata_calendar_feed_get_type (void);
+
+#ifndef LIBGDATA_DISABLE_DEPRECATED
+const gchar *gdata_calendar_feed_get_timezone (GDataCalendarFeed *self) G_GNUC_PURE G_GNUC_DEPRECATED;
+guint gdata_calendar_feed_get_times_cleaned (GDataCalendarFeed *self) G_GNUC_PURE G_GNUC_DEPRECATED;
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
+
+G_END_DECLS
+
+#endif /* !GDATA_CALENDAR_FEED_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009, 2010, 2017 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-calendar-query
+ * @short_description: GData Calendar query object
+ * @stability: Stable
+ * @include: gdata/services/calendar/gdata-calendar-query.h
+ *
+ * #GDataCalendarQuery represents a collection of query parameters specific to the Google Calendar service, which go above and beyond
+ * those catered for by #GDataQuery.
+ *
+ * For more information on the custom GData query parameters supported by #GDataCalendarQuery, see the <ulink type="http"
+ * url="https://developers.google.com/google-apps/calendar/v3/reference/events/list">online
+ * documentation</ulink>.
+ *
+ * <example>
+ * <title>Querying for Events</title>
+ * <programlisting>
+ * GDataCalendarService *service;
+ * GDataCalendarCalendar *calendar;
+ * GDataCalendarQuery *query;
+ * GDataFeed *feed;
+ * GTimeVal current_time;
+ * GList *i;
+ * GError *error = NULL;
+ *
+ * /<!-- -->* Create a service and find a calendar to query in *<!-- -->/
+ * service = create_calendar_service ();
+ * calendar = get_calendar (service);
+ *
+ * /<!-- -->* Create the query to use. We're going to query for events within the next week which match the search term "party",
+ * * ordered by last modification time (descending). *<!-- -->/
+ * g_get_current_time (¤t_time);
+ * query = gdata_calendar_query_new_with_limits ("party", current_time.tv_sec, current_time.tv_sec + 7 * 24 * 60 * 60);
+ * gdata_calendar_query_set_order_by (query, "lastmodified");
+ *
+ * /<!-- -->* Execute the query *<!-- -->/
+ * feed = gdata_calendar_service_query_events (service, calendar, query, NULL, NULL, NULL, &error);
+ *
+ * g_object_unref (query);
+ * g_object_unref (calendar);
+ * g_object_unref (service);
+ *
+ * if (error != NULL) {
+ * g_error ("Error querying for events: %s", error->message);
+ * g_error_free (error);
+ * return;
+ * }
+ *
+ * /<!-- -->* Iterate through the returned events and do something with them *<!-- -->/
+ * for (i = gdata_feed_get_entries (feed); i != NULL; i = i->next) {
+ * GDataCalendarEvent *event = GDATA_CALENDAR_EVENT (i->data);
+ *
+ * /<!-- -->* Do something with the event here, such as insert it into a UI *<!-- -->/
+ * }
+ *
+ * g_object_unref (feed);
+ * </programlisting>
+ * </example>
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+
+#include "gdata-calendar-query.h"
+#include "gdata-query.h"
+#include "gdata-parser.h"
+#include "gdata-private.h"
+
+static void gdata_calendar_query_finalize (GObject *object);
+static void gdata_calendar_query_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_calendar_query_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void get_query_uri (GDataQuery *self, const gchar *feed_uri, GString *query_uri, gboolean *params_started);
+
+struct _GDataCalendarQueryPrivate {
+ gboolean future_events;
+ gchar *order_by; /* TODO: #defined values */
+ gint64 recurrence_expansion_start;
+ gint64 recurrence_expansion_end;
+ gboolean single_events;
+ gchar *sort_order; /* TODO: #defined values */
+ gint64 start_min; /* UNIX timestamp, seconds */
+ gint64 start_max; /* UNIX timestamp, seconds */
+ gchar *timezone;
+ guint max_attendees;
+ gboolean show_deleted;
+};
+
+enum {
+ PROP_FUTURE_EVENTS = 1,
+ PROP_ORDER_BY,
+ PROP_RECURRENCE_EXPANSION_START,
+ PROP_RECURRENCE_EXPANSION_END,
+ PROP_SINGLE_EVENTS,
+ PROP_SORT_ORDER,
+ PROP_START_MIN,
+ PROP_START_MAX,
+ PROP_TIMEZONE,
+ PROP_MAX_ATTENDEES,
+ PROP_SHOW_DELETED,
+};
+
+G_DEFINE_TYPE (GDataCalendarQuery, gdata_calendar_query, GDATA_TYPE_QUERY)
+
+static void
+gdata_calendar_query_class_init (GDataCalendarQueryClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataQueryClass *query_class = GDATA_QUERY_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataCalendarQueryPrivate));
+
+ gobject_class->set_property = gdata_calendar_query_set_property;
+ gobject_class->get_property = gdata_calendar_query_get_property;
+ gobject_class->finalize = gdata_calendar_query_finalize;
+
+ query_class->get_query_uri = get_query_uri;
+
+ /**
+ * GDataCalendarQuery:future-events:
+ *
+ * A shortcut to request all events scheduled for the future. Overrides the
+ * #GDataCalendarQuery:recurrence-expansion-start, #GDataCalendarQuery:recurrence-expansion-end,
+ * #GDataCalendarQuery:start-min and #GDataCalendarQuery:start-max properties.
+ */
+ g_object_class_install_property (gobject_class, PROP_FUTURE_EVENTS,
+ g_param_spec_boolean ("future-events",
+ "Future events?", "A shortcut to request all events scheduled for the future.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCalendarQuery:order-by:
+ *
+ * Specifies order of entries in a feed. Supported values are <literal>lastmodified</literal> and
+ * <literal>starttime</literal>.
+ */
+ g_object_class_install_property (gobject_class, PROP_ORDER_BY,
+ g_param_spec_string ("order-by",
+ "Order by", "Specifies order of entries in a feed.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCalendarQuery:recurrence-expansion-start:
+ *
+ * Specifies the beginning of the time period to expand recurring events for, inclusive.
+ *
+ * Deprecated: 0.17.7: Use #GDataCalendarQuery:single-events instead, as this is no longer supported on the server.
+ */
+ g_object_class_install_property (gobject_class, PROP_RECURRENCE_EXPANSION_START,
+ g_param_spec_int64 ("recurrence-expansion-start",
+ "Recurrence expansion start", "Specifies start of period to expand recurrences for.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED));
+
+ /**
+ * GDataCalendarQuery:recurrence-expansion-end:
+ *
+ * Specifies the end of the time period to expand recurring events for, exclusive.
+ *
+ * Deprecated: 0.17.7: Use #GDataCalendarQuery:single-events instead, as this is no longer supported on the server.
+ */
+ g_object_class_install_property (gobject_class, PROP_RECURRENCE_EXPANSION_END,
+ g_param_spec_int64 ("recurrence-expansion-end",
+ "Recurrence expansion end", "Specifies end of period to expand recurrences for.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED));
+
+ /**
+ * GDataCalendarQuery:single-events:
+ *
+ * Indicates whether recurring events should be expanded or represented as a single event.
+ */
+ g_object_class_install_property (gobject_class, PROP_SINGLE_EVENTS,
+ g_param_spec_boolean ("single-events",
+ "Single events?", "Indicates whether recurring events should be expanded.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCalendarQuery:sort-order:
+ *
+ * Specifies direction of sorting. Supported values are <literal>ascending</literal> and
+ * <literal>descending</literal>.
+ *
+ * By default, results are returned in ascending order.
+ *
+ * Deprecated: 0.17.7: Manually sort the results after retrieving them, as this is no longer supported on the server.
+ */
+ g_object_class_install_property (gobject_class, PROP_SORT_ORDER,
+ g_param_spec_string ("sort-order",
+ "Sort order", "Specifies direction of sorting.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED));
+
+ /**
+ * GDataCalendarQuery:start-min:
+ *
+ * Together with #GDataCalendarQuery:start-max, creates a timespan such that only events within the timespan are returned.
+ *
+ * #GDataCalendarQuery:start-min is inclusive, while #GDataCalendarQuery:start-max is exclusive. Events that overlap the range are
+ * included. Both are specified in seconds since the UNIX epoch.
+ *
+ * If not specified, the default #GDataCalendarQuery:start-min is <literal>1970-01-01</literal>.
+ */
+ g_object_class_install_property (gobject_class, PROP_START_MIN,
+ g_param_spec_int64 ("start-min",
+ "Start min", "A timespan such that only events within the timespan are returned.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCalendarQuery:start-max:
+ *
+ * Together with #GDataCalendarQuery:start-min, creates a timespan such that only events within the timespan are returned
+ *
+ * #GDataCalendarQuery:start-min is inclusive, while #GDataCalendarQuery:start-max is exclusive. Events that overlap the range are
+ * included. Both are specified in seconds since the UNIX epoch.
+ *
+ * If not specified, the default #GDataCalendarQuery:start-max is <literal>2031-01-01</literal>.
+ */
+ g_object_class_install_property (gobject_class, PROP_START_MAX,
+ g_param_spec_int64 ("start-max",
+ "Start max", "A timespan such that only events within the timespan are returned.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCalendarQuery:timezone:
+ *
+ * The current timezone. If this is not specified, all times are returned in UTC.
+ *
+ * Since: 0.2.0
+ */
+ g_object_class_install_property (gobject_class, PROP_TIMEZONE,
+ g_param_spec_string ("timezone",
+ "Timezone", "The current timezone.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCalendarQuery:max-attendees:
+ *
+ * Specifies the maximum number of attendees to list for an event. If the actual number of attendees for an event is greater than this value,
+ * only the current user and the event organiser are listed.
+ *
+ * Since: 0.9.1
+ */
+ g_object_class_install_property (gobject_class, PROP_MAX_ATTENDEES,
+ g_param_spec_uint ("max-attendees",
+ "Max attendee count", "Specifies the maximum number of attendees to list for an event.",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataCalendarQuery:show-deleted:
+ *
+ * Whether to include deleted/cancelled events in the query feed. Deleted events have their #GDataCalendarEvent:status property set to
+ * %GDATA_GD_EVENT_STATUS_CANCELED. They do not normally appear in query results.
+ *
+ * Since: 0.9.1
+ */
+ g_object_class_install_property (gobject_class, PROP_SHOW_DELETED,
+ g_param_spec_boolean ("show-deleted",
+ "Show deleted?", "Whether to include deleted/cancelled events in the query feed.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_calendar_query_init (GDataCalendarQuery *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_CALENDAR_QUERY, GDataCalendarQueryPrivate);
+ self->priv->recurrence_expansion_start = -1;
+ self->priv->recurrence_expansion_end = -1;
+ self->priv->start_min = -1;
+ self->priv->start_max = -1;
+
+ _gdata_query_set_pagination_type (GDATA_QUERY (self),
+ GDATA_QUERY_PAGINATION_TOKENS);
+}
+
+static void
+gdata_calendar_query_finalize (GObject *object)
+{
+ GDataCalendarQueryPrivate *priv = GDATA_CALENDAR_QUERY (object)->priv;
+
+ g_free (priv->order_by);
+ g_free (priv->sort_order);
+ g_free (priv->timezone);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_calendar_query_parent_class)->finalize (object);
+}
+
+static void
+gdata_calendar_query_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataCalendarQueryPrivate *priv = GDATA_CALENDAR_QUERY (object)->priv;
+
+ switch (property_id) {
+ case PROP_FUTURE_EVENTS:
+ g_value_set_boolean (value, priv->future_events);
+ break;
+ case PROP_ORDER_BY:
+ g_value_set_string (value, priv->order_by);
+ break;
+ case PROP_RECURRENCE_EXPANSION_START:
+ g_value_set_int64 (value, priv->recurrence_expansion_start);
+ break;
+ case PROP_RECURRENCE_EXPANSION_END:
+ g_value_set_int64 (value, priv->recurrence_expansion_end);
+ break;
+ case PROP_SINGLE_EVENTS:
+ g_value_set_boolean (value, priv->single_events);
+ break;
+ case PROP_SORT_ORDER:
+ g_value_set_string (value, priv->sort_order);
+ break;
+ case PROP_START_MIN:
+ g_value_set_int64 (value, priv->start_min);
+ break;
+ case PROP_START_MAX:
+ g_value_set_int64 (value, priv->start_max);
+ break;
+ case PROP_TIMEZONE:
+ g_value_set_string (value, priv->timezone);
+ break;
+ case PROP_MAX_ATTENDEES:
+ g_value_set_uint (value, priv->max_attendees);
+ break;
+ case PROP_SHOW_DELETED:
+ g_value_set_boolean (value, priv->show_deleted);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_calendar_query_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataCalendarQuery *self = GDATA_CALENDAR_QUERY (object);
+
+ switch (property_id) {
+ case PROP_FUTURE_EVENTS:
+ gdata_calendar_query_set_future_events (self, g_value_get_boolean (value));
+ break;
+ case PROP_ORDER_BY:
+ gdata_calendar_query_set_order_by (self, g_value_get_string (value));
+ break;
+ case PROP_RECURRENCE_EXPANSION_START:
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ gdata_calendar_query_set_recurrence_expansion_start (self, g_value_get_int64 (value));
+G_GNUC_END_IGNORE_DEPRECATIONS
+ break;
+ case PROP_RECURRENCE_EXPANSION_END:
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ gdata_calendar_query_set_recurrence_expansion_end (self, g_value_get_int64 (value));
+G_GNUC_END_IGNORE_DEPRECATIONS
+ break;
+ case PROP_SINGLE_EVENTS:
+ gdata_calendar_query_set_single_events (self, g_value_get_boolean (value));
+ break;
+ case PROP_SORT_ORDER:
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ gdata_calendar_query_set_sort_order (self, g_value_get_string (value));
+G_GNUC_END_IGNORE_DEPRECATIONS
+ break;
+ case PROP_START_MIN:
+ gdata_calendar_query_set_start_min (self, g_value_get_int64 (value));
+ break;
+ case PROP_START_MAX:
+ gdata_calendar_query_set_start_max (self, g_value_get_int64 (value));
+ break;
+ case PROP_TIMEZONE:
+ gdata_calendar_query_set_timezone (self, g_value_get_string (value));
+ break;
+ case PROP_MAX_ATTENDEES:
+ gdata_calendar_query_set_max_attendees (self, g_value_get_uint (value));
+ break;
+ case PROP_SHOW_DELETED:
+ gdata_calendar_query_set_show_deleted (self, g_value_get_boolean (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+/* Convert the v2 order-by values to the v3 orderBy values:
+ * - https://developers.google.com/google-apps/calendar/v3/reference/events/list#orderBy
+ * - There is no reference for v2 any more.
+ */
+static const gchar *
+order_by_to_v3 (const gchar *order_by)
+{
+ if (g_strcmp0 (order_by, "lastmodified") == 0)
+ return "updated";
+ else if (g_strcmp0 (order_by, "starttime") == 0)
+ return "startTime";
+ else
+ return order_by;
+}
+
+static void
+get_query_uri (GDataQuery *self, const gchar *feed_uri, GString *query_uri, gboolean *params_started)
+{
+ GDataCalendarQueryPrivate *priv = GDATA_CALENDAR_QUERY (self)->priv;
+
+ #define APPEND_SEP g_string_append_c (query_uri, (*params_started == FALSE) ? '?' : '&'); *params_started = TRUE;
+
+ /* Chain up to the parent class */
+ GDATA_QUERY_CLASS (gdata_calendar_query_parent_class)->get_query_uri (self, feed_uri, query_uri, params_started);
+
+ if (gdata_query_get_max_results (GDATA_QUERY (self)) != 0) {
+ APPEND_SEP
+ g_string_append_printf (query_uri, "maxResults=%u",
+ gdata_query_get_max_results (GDATA_QUERY (self)));
+ }
+
+ if (priv->order_by != NULL) {
+ APPEND_SEP
+ g_string_append (query_uri, "orderBy=");
+ g_string_append_uri_escaped (query_uri,
+ order_by_to_v3 (priv->order_by), NULL, FALSE);
+ }
+
+ /* Convert the deprecated recurrence-expansion-* properties into single-events. */
+ APPEND_SEP
+ if (priv->single_events == TRUE ||
+ priv->recurrence_expansion_start >= 0 ||
+ priv->recurrence_expansion_end >= 0)
+ g_string_append (query_uri, "singleEvents=true");
+ else
+ g_string_append (query_uri, "singleEvents=false");
+
+ if (priv->start_min != -1) {
+ gchar *start_min;
+ gint64 start_min_time;
+
+ if (priv->future_events)
+ start_min_time = g_get_real_time () / G_USEC_PER_SEC;
+ else
+ start_min_time = priv->start_min;
+
+ APPEND_SEP
+ g_string_append (query_uri, "timeMin=");
+ start_min = gdata_parser_int64_to_iso8601 (start_min_time);
+ g_string_append (query_uri, start_min);
+ g_free (start_min);
+ }
+
+ if (priv->start_max != -1 && !priv->future_events) {
+ gchar *start_max;
+
+ APPEND_SEP
+ g_string_append (query_uri, "timeMax=");
+ start_max = gdata_parser_int64_to_iso8601 (priv->start_max);
+ g_string_append (query_uri, start_max);
+ g_free (start_max);
+ }
+
+ if (priv->timezone != NULL) {
+ APPEND_SEP
+ g_string_append (query_uri, "timeZone=");
+ g_string_append_uri_escaped (query_uri, priv->timezone, NULL, FALSE);
+ }
+
+ if (priv->max_attendees > 0) {
+ APPEND_SEP
+ g_string_append_printf (query_uri, "maxAttendees=%u", priv->max_attendees);
+ }
+
+ APPEND_SEP
+ if (priv->show_deleted == TRUE) {
+ g_string_append (query_uri, "showDeleted=true");
+ } else {
+ g_string_append (query_uri, "showDeleted=false");
+ }
+}
+
+/**
+ * gdata_calendar_query_new:
+ * @q: (allow-none): a query string, or %NULL
+ *
+ * Creates a new #GDataCalendarQuery with its #GDataQuery:q property set to @q.
+ *
+ * Return value: a new #GDataCalendarQuery
+ */
+GDataCalendarQuery *
+gdata_calendar_query_new (const gchar *q)
+{
+ return g_object_new (GDATA_TYPE_CALENDAR_QUERY, "q", q, NULL);
+}
+
+/**
+ * gdata_calendar_query_new_with_limits:
+ * @q: (allow-none): a query string, or %NULL
+ * @start_min: a starting time for the event period, or -1
+ * @start_max: an ending time for the event period, or -1
+ *
+ * Creates a new #GDataCalendarQuery with its #GDataQuery:q property set to @q, and the time limits @start_min and @start_max
+ * applied (both in seconds since the UNIX epoch).
+ *
+ * Return value: a new #GDataCalendarQuery
+ */
+GDataCalendarQuery *
+gdata_calendar_query_new_with_limits (const gchar *q, gint64 start_min, gint64 start_max)
+{
+ return g_object_new (GDATA_TYPE_CALENDAR_QUERY,
+ "q", q,
+ "start-min", start_min,
+ "start-max", start_max,
+ NULL);
+}
+
+/**
+ * gdata_calendar_query_get_future_events:
+ * @self: a #GDataCalendarQuery
+ *
+ * Gets the #GDataCalendarQuery:future-events property.
+ *
+ * Return value: the future events property
+ */
+gboolean
+gdata_calendar_query_get_future_events (GDataCalendarQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_QUERY (self), FALSE);
+ return self->priv->future_events;
+}
+
+/**
+ * gdata_calendar_query_set_future_events:
+ * @self: a #GDataCalendarQuery
+ * @future_events: %TRUE to unconditionally show future events, %FALSE otherwise
+ *
+ * Sets the #GDataCalendarQuery:future-events property of the #GDataCalendarQuery to @future_events.
+ */
+void
+gdata_calendar_query_set_future_events (GDataCalendarQuery *self, gboolean future_events)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_QUERY (self));
+ self->priv->future_events = future_events;
+ g_object_notify (G_OBJECT (self), "future-events");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_calendar_query_get_order_by:
+ * @self: a #GDataCalendarQuery
+ *
+ * Gets the #GDataCalendarQuery:order-by property.
+ *
+ * Return value: the order by property, or %NULL if it is unset
+ */
+const gchar *
+gdata_calendar_query_get_order_by (GDataCalendarQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_QUERY (self), NULL);
+ return self->priv->order_by;
+}
+
+/**
+ * gdata_calendar_query_set_order_by:
+ * @self: a #GDataCalendarQuery
+ * @order_by: (allow-none): a new order by string, or %NULL
+ *
+ * Sets the #GDataCalendarQuery:order-by property of the #GDataCalendarQuery to the new order by string, @order_by.
+ *
+ * Set @order_by to %NULL to unset the property in the query URI.
+ */
+void
+gdata_calendar_query_set_order_by (GDataCalendarQuery *self, const gchar *order_by)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_QUERY (self));
+
+ g_free (self->priv->order_by);
+ self->priv->order_by = g_strdup (order_by);
+ g_object_notify (G_OBJECT (self), "order-by");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_calendar_query_get_recurrence_expansion_start:
+ * @self: a #GDataCalendarQuery
+ *
+ * Gets the #GDataCalendarQuery:recurrence-expansion-start property. If the property is unset, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the UNIX timestamp for the recurrence-expansion-start property, or <code class="literal">-1</code>
+ * Deprecated: 0.17.7: Use #GDataCalendarQuery:single-events instead, as this is no longer supported on the server.
+ */
+gint64
+gdata_calendar_query_get_recurrence_expansion_start (GDataCalendarQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_QUERY (self), -1);
+ return self->priv->recurrence_expansion_start;
+}
+
+/**
+ * gdata_calendar_query_set_recurrence_expansion_start:
+ * @self: a #GDataCalendarQuery
+ * @start: a new start time, or <code class="literal">-1</code>
+ *
+ * Sets the #GDataCalendarQuery:recurrence-expansion-start property of the #GDataCalendarQuery
+ * to the new time/date, @start.
+ *
+ * Set @start to <code class="literal">-1</code> to unset the property in the query URI.
+ *
+ * Deprecated: 0.17.7: Use #GDataCalendarQuery:single-events instead, as this is no longer supported on the server.
+ */
+void
+gdata_calendar_query_set_recurrence_expansion_start (GDataCalendarQuery *self, gint64 start)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_QUERY (self));
+ g_return_if_fail (start >= -1);
+
+ self->priv->recurrence_expansion_start = start;
+ g_object_notify (G_OBJECT (self), "recurrence-expansion-start");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_calendar_query_get_recurrence_expansion_end:
+ * @self: a #GDataCalendarQuery
+ *
+ * Gets the #GDataCalendarQuery:recurrence-expansion-end property. If the property is unset, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the UNIX timestamp for the recurrence-expansion-end property, or <code class="literal">-1</code>
+ *
+ * Deprecated: 0.17.7: Use #GDataCalendarQuery:single-events instead, as this is no longer supported on the server.
+ */
+gint64
+gdata_calendar_query_get_recurrence_expansion_end (GDataCalendarQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_QUERY (self), -1 );
+ return self->priv->recurrence_expansion_end;
+}
+
+/**
+ * gdata_calendar_query_set_recurrence_expansion_end:
+ * @self: a #GDataCalendarQuery
+ * @end: a new end time, or <code class="literal">-1</code>
+ *
+ * Sets the #GDataCalendarQuery:recurrence-expansion-end property of the #GDataCalendarQuery
+ * to the new time/date, @end.
+ *
+ * Set @end to <code class="literal">-1</code> to unset the property in the query URI.
+ *
+ * Deprecated: 0.17.7: Use #GDataCalendarQuery:single-events instead, as this is no longer supported on the server.
+ */
+void
+gdata_calendar_query_set_recurrence_expansion_end (GDataCalendarQuery *self, gint64 end)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_QUERY (self));
+ g_return_if_fail (end >= -1);
+
+ self->priv->recurrence_expansion_end = end;
+ g_object_notify (G_OBJECT (self), "recurrence-expansion-end");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_calendar_query_get_single_events:
+ * @self: a #GDataCalendarQuery
+ *
+ * Gets the #GDataCalendarQuery:single-events property.
+ *
+ * Return value: the single events property
+ */
+gboolean
+gdata_calendar_query_get_single_events (GDataCalendarQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_QUERY (self), FALSE);
+ return self->priv->single_events;
+}
+
+/**
+ * gdata_calendar_query_set_single_events:
+ * @self: a #GDataCalendarQuery
+ * @single_events: %TRUE to show recurring events as single events, %FALSE otherwise
+ *
+ * Sets the #GDataCalendarQuery:single-events property of the #GDataCalendarQuery to @single_events.
+ */
+void
+gdata_calendar_query_set_single_events (GDataCalendarQuery *self, gboolean single_events)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_QUERY (self));
+ self->priv->single_events = single_events;
+ g_object_notify (G_OBJECT (self), "single-events");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_calendar_query_get_sort_order:
+ * @self: a #GDataCalendarQuery
+ *
+ * Gets the #GDataCalendarQuery:sort-order property.
+ *
+ * Return value: the sort order property, or %NULL if it is unset
+ * Deprecated: 0.17.7: Manually sort the results after retrieving them, as this is no longer supported on the server.
+ */
+const gchar *
+gdata_calendar_query_get_sort_order (GDataCalendarQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_QUERY (self), NULL);
+ return self->priv->sort_order;
+}
+
+/**
+ * gdata_calendar_query_set_sort_order:
+ * @self: a #GDataCalendarQuery
+ * @sort_order: (allow-none): a new sort order string, or %NULL
+ *
+ * Sets the #GDataCalendarQuery:sort-order property of the #GDataCalendarQuery to the new sort order string, @sort_order.
+ *
+ * Set @sort_order to %NULL to unset the property in the query URI.
+ *
+ * Deprecated: 0.17.7: Manually sort the results after retrieving them, as this is no longer supported on the server.
+ */
+void
+gdata_calendar_query_set_sort_order (GDataCalendarQuery *self, const gchar *sort_order)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_QUERY (self));
+
+ g_free (self->priv->sort_order);
+ self->priv->sort_order = g_strdup (sort_order);
+ g_object_notify (G_OBJECT (self), "sort-order");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_calendar_query_get_start_min:
+ * @self: a #GDataCalendarQuery
+ *
+ * Gets the #GDataCalendarQuery:start-min property. If the property is unset, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the UNIX timestamp (in seconds) for the start-min property, or <code class="literal">-1</code>
+ */
+gint64
+gdata_calendar_query_get_start_min (GDataCalendarQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_QUERY (self), -1);
+ return self->priv->start_min;
+}
+
+/**
+ * gdata_calendar_query_set_start_min:
+ * @self: a #GDataCalendarQuery
+ * @start_min: a new minimum start time (in seconds since the UNIX epoch), or <code class="literal">-1</code>
+ *
+ * Sets the #GDataCalendarQuery:start-min property of the #GDataCalendarQuery
+ * to the new time/date, @start_min.
+ *
+ * Set @start_min to <code class="literal">-1</code> to unset the property in the query URI.
+ */
+void
+gdata_calendar_query_set_start_min (GDataCalendarQuery *self, gint64 start_min)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_QUERY (self));
+ g_return_if_fail (start_min >= -1);
+
+ self->priv->start_min = start_min;
+ g_object_notify (G_OBJECT (self), "start-min");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_calendar_query_get_start_max:
+ * @self: a #GDataCalendarQuery
+ *
+ * Gets the #GDataCalendarQuery:start-max property. If the property is unset, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the UNIX timestamp (in seconds) for the start-max property, or <code class="literal">-1</code>
+ */
+gint64
+gdata_calendar_query_get_start_max (GDataCalendarQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_QUERY (self), -1);
+ return self->priv->start_max;
+}
+
+/**
+ * gdata_calendar_query_set_start_max:
+ * @self: a #GDataCalendarQuery
+ * @start_max: a new maximum start time (in seconds since the UNIX epoch), or <code class="literal">-1</code>
+ *
+ * Sets the #GDataCalendarQuery:start-max property of the #GDataCalendarQuery
+ * to the new time/date, @start_max.
+ *
+ * Set @start_max to <code class="literal">-1</code> to unset the property in the query URI.
+ */
+void
+gdata_calendar_query_set_start_max (GDataCalendarQuery *self, gint64 start_max)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_QUERY (self));
+ g_return_if_fail (start_max >= -1);
+
+ self->priv->start_max = start_max;
+ g_object_notify (G_OBJECT (self), "start-max");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_calendar_query_get_timezone:
+ * @self: a #GDataCalendarQuery
+ *
+ * Gets the #GDataCalendarQuery:timezone property.
+ *
+ * Return value: the timezone property, or %NULL if it is unset
+ *
+ * Since: 0.2.0
+ */
+const gchar *
+gdata_calendar_query_get_timezone (GDataCalendarQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_QUERY (self), NULL);
+ return self->priv->timezone;
+}
+
+/**
+ * gdata_calendar_query_set_timezone:
+ * @self: a #GDataCalendarQuery
+ * @_timezone: (allow-none): a new timezone string, or %NULL
+ *
+ * Sets the #GDataCalendarQuery:timezone property of the #GDataCalendarQuery to the new timezone string, @timezone.
+ *
+ * Set @timezone to %NULL to unset the property in the query URI.
+ *
+ * Since: 0.2.0
+ */
+void
+gdata_calendar_query_set_timezone (GDataCalendarQuery *self, const gchar *_timezone)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_QUERY (self));
+
+ g_free (self->priv->timezone);
+
+ /* Replace all spaces with underscores */
+ if (_timezone != NULL) {
+ gchar *zone, *i;
+
+ zone = g_strdup (_timezone);
+ for (i = zone; *i != '\0'; i++) {
+ if (*i == ' ')
+ *i = '_';
+ }
+ self->priv->timezone = zone;
+ } else {
+ self->priv->timezone = NULL;
+ }
+
+ g_object_notify (G_OBJECT (self), "timezone");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_calendar_query_get_max_attendees:
+ * @self: a #GDataCalendarQuery
+ *
+ * Gets the #GDataCalendarQuery:max-attendees property. If the property is unset, <code class="literal">0</code> will be returned.
+ *
+ * Return value: the maximum number of attendees, or <code class="literal">0</code>
+ *
+ * Since: 0.9.1
+ */
+guint
+gdata_calendar_query_get_max_attendees (GDataCalendarQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_QUERY (self), 0);
+ return self->priv->max_attendees;
+}
+
+/**
+ * gdata_calendar_query_set_max_attendees:
+ * @self: a #GDataCalendarQuery
+ * @max_attendees: a new maximum attendee count, or <code class="literal">0</code>
+ *
+ * Sets the #GDataCalendarQuery:max-attendees property of the #GDataCalendarQuery to the new value, @max_attendees.
+ *
+ * Set @max_attendees to <code class="literal">0</code> to unset the property in the query URI.
+ *
+ * Since: 0.9.1
+ */
+void
+gdata_calendar_query_set_max_attendees (GDataCalendarQuery *self, guint max_attendees)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_QUERY (self));
+
+ self->priv->max_attendees = max_attendees;
+ g_object_notify (G_OBJECT (self), "max-attendees");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_calendar_query_show_deleted:
+ * @self: a #GDataCalendarQuery
+ *
+ * Gets the #GDataCalendarQuery:show-deleted property.
+ *
+ * Return value: %TRUE if deleted/cancelled events should be shown, %FALSE otherwise
+ *
+ * Since: 0.9.1
+ */
+gboolean
+gdata_calendar_query_show_deleted (GDataCalendarQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_CALENDAR_QUERY (self), FALSE);
+ return self->priv->show_deleted;
+}
+
+/**
+ * gdata_calendar_query_set_show_deleted:
+ * @self: a #GDataCalendarQuery
+ * @show_deleted: %TRUE to show deleted events, %FALSE otherwise
+ *
+ * Sets the #GDataCalendarQuery:show-deleted property of the #GDataCalendarQuery.
+ *
+ * Since: 0.9.1
+ */
+void
+gdata_calendar_query_set_show_deleted (GDataCalendarQuery *self, gboolean show_deleted)
+{
+ g_return_if_fail (GDATA_IS_CALENDAR_QUERY (self));
+
+ self->priv->show_deleted = show_deleted;
+ g_object_notify (G_OBJECT (self), "show-deleted");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_CALENDAR_QUERY_H
+#define GDATA_CALENDAR_QUERY_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-query.h>
+#include <gdata/gdata-types.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_CALENDAR_QUERY (gdata_calendar_query_get_type ())
+#define GDATA_CALENDAR_QUERY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_CALENDAR_QUERY, GDataCalendarQuery))
+#define GDATA_CALENDAR_QUERY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_CALENDAR_QUERY, GDataCalendarQueryClass))
+#define GDATA_IS_CALENDAR_QUERY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_CALENDAR_QUERY))
+#define GDATA_IS_CALENDAR_QUERY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_CALENDAR_QUERY))
+#define GDATA_CALENDAR_QUERY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_CALENDAR_QUERY, GDataCalendarQueryClass))
+
+typedef struct _GDataCalendarQueryPrivate GDataCalendarQueryPrivate;
+
+/**
+ * GDataCalendarQuery:
+ *
+ * All the fields in the #GDataCalendarQuery structure are private and should never be accessed directly.
+ */
+typedef struct {
+ GDataQuery parent;
+ GDataCalendarQueryPrivate *priv;
+} GDataCalendarQuery;
+
+/**
+ * GDataCalendarQueryClass:
+ *
+ * All the fields in the #GDataCalendarQueryClass structure are private and should never be accessed directly.
+ */
+typedef struct {
+ /*< private >*/
+ GDataQueryClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataCalendarQueryClass;
+
+GType gdata_calendar_query_get_type (void) G_GNUC_CONST;
+
+GDataCalendarQuery *gdata_calendar_query_new (const gchar *q) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+GDataCalendarQuery *gdata_calendar_query_new_with_limits (const gchar *q, gint64 start_min, gint64 start_max) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+gboolean gdata_calendar_query_get_future_events (GDataCalendarQuery *self) G_GNUC_PURE;
+void gdata_calendar_query_set_future_events (GDataCalendarQuery *self, gboolean future_events);
+const gchar *gdata_calendar_query_get_order_by (GDataCalendarQuery *self) G_GNUC_PURE;
+void gdata_calendar_query_set_order_by (GDataCalendarQuery *self, const gchar *order_by);
+gboolean gdata_calendar_query_get_single_events (GDataCalendarQuery *self) G_GNUC_PURE;
+void gdata_calendar_query_set_single_events (GDataCalendarQuery *self, gboolean single_events);
+gint64 gdata_calendar_query_get_start_min (GDataCalendarQuery *self);
+void gdata_calendar_query_set_start_min (GDataCalendarQuery *self, gint64 start_min);
+gint64 gdata_calendar_query_get_start_max (GDataCalendarQuery *self);
+void gdata_calendar_query_set_start_max (GDataCalendarQuery *self, gint64 start_max);
+const gchar *gdata_calendar_query_get_timezone (GDataCalendarQuery *self) G_GNUC_PURE;
+void gdata_calendar_query_set_timezone (GDataCalendarQuery *self, const gchar *_timezone);
+guint gdata_calendar_query_get_max_attendees (GDataCalendarQuery *self) G_GNUC_PURE;
+void gdata_calendar_query_set_max_attendees (GDataCalendarQuery *self, guint max_attendees);
+gboolean gdata_calendar_query_show_deleted (GDataCalendarQuery *self) G_GNUC_PURE;
+void gdata_calendar_query_set_show_deleted (GDataCalendarQuery *self, gboolean show_deleted);
+
+#ifndef LIBGDATA_DISABLE_DEPRECATED
+gint64 gdata_calendar_query_get_recurrence_expansion_start (GDataCalendarQuery *self) G_GNUC_DEPRECATED_FOR (gdata_calendar_query_get_single_events);
+void gdata_calendar_query_set_recurrence_expansion_start (GDataCalendarQuery *self, gint64 start) G_GNUC_DEPRECATED_FOR (gdata_calendar_query_set_single_events);
+gint64 gdata_calendar_query_get_recurrence_expansion_end (GDataCalendarQuery *self) G_GNUC_DEPRECATED_FOR (gdata_calendar_query_get_single_events);
+void gdata_calendar_query_set_recurrence_expansion_end (GDataCalendarQuery *self, gint64 end) G_GNUC_DEPRECATED_FOR (gdata_calendar_query_set_single_events);
+
+const gchar *gdata_calendar_query_get_sort_order (GDataCalendarQuery *self) G_GNUC_PURE G_GNUC_DEPRECATED;
+void gdata_calendar_query_set_sort_order (GDataCalendarQuery *self, const gchar *sort_order) G_GNUC_DEPRECATED_FOR (g_list_sort);
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
+
+G_END_DECLS
+
+#endif /* !GDATA_CALENDAR_QUERY_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009, 2014, 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-calendar-service
+ * @short_description: GData Calendar service object
+ * @stability: Stable
+ * @include: gdata/services/calendar/gdata-calendar-service.h
+ *
+ * #GDataCalendarService is a subclass of #GDataService for communicating with the GData API of Google Calendar. It supports querying
+ * for, inserting, editing and deleting events from calendars, as well as operations on the calendars themselves.
+ *
+ * For more details of Google Calendar's GData API, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/calendar/v3/reference/">
+ * online documentation</ulink>.
+ *
+ * Each calendar accessible through the service has an access control list (ACL) which defines the level of access to the calendar to each user, and
+ * which users the calendar is shared with. For more information about ACLs for calendars, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/calendar/v3/reference/acl">online documentation on
+ * sharing calendars</ulink>.
+ *
+ * <example>
+ * <title>Retrieving the Access Control List for a Calendar</title>
+ * <programlisting>
+ * GDataCalendarService *service;
+ * GDataCalendarCalendar *calendar;
+ * GDataFeed *acl_feed;
+ * GDataAccessRule *rule, *new_rule;
+ * GDataLink *acl_link;
+ * GList *i;
+ * GError *error = NULL;
+ *
+ * /<!-- -->* Create a service and retrieve a calendar to work on *<!-- -->/
+ * service = create_calendar_service ();
+ * calendar = get_calendar (service);
+ *
+ * /<!-- -->* Query the service for the ACL for the given calendar *<!-- -->/
+ * acl_feed = gdata_access_handler_get_rules (GDATA_ACCESS_HANDLER (calendar), GDATA_SERVICE (service), NULL, NULL, NULL, &error);
+ *
+ * if (error != NULL) {
+ * g_error ("Error getting ACL feed for calendar: %s", error->message);
+ * g_error_free (error);
+ * g_object_unref (calendar);
+ * g_object_unref (service);
+ * return;
+ * }
+ *
+ * /<!-- -->* Iterate through the ACL *<!-- -->/
+ * for (i = gdata_feed_get_entries (acl_feed); i != NULL; i = i->next) {
+ * const gchar *scope_value;
+ *
+ * rule = GDATA_ACCESS_RULE (i->data);
+ *
+ * /<!-- -->* Do something with the access rule here. As an example, we update the rule applying to test@gmail.com and delete all
+ * * the other rules. We then insert another rule for example@gmail.com below. *<!-- -->/
+ * gdata_access_rule_get_scope (rule, NULL, &scope_value);
+ * if (scope_value != NULL && strcmp (scope_value, "test@gmail.com") == 0) {
+ * GDataAccessRule *updated_rule;
+ *
+ * /<!-- -->* Update the rule to make test@gmail.com an editor (full read/write access to the calendar, but they can't change
+ * * the ACL). *<!-- -->/
+ * gdata_access_rule_set_role (rule, GDATA_CALENDAR_ACCESS_ROLE_EDITOR);
+ * updated_rule = GDATA_ACCESS_RULE (gdata_service_update_entry (GDATA_SERVICE (service), GDATA_ENTRY (rule), NULL, &error));
+ *
+ * if (error != NULL) {
+ * g_error ("Error updating access rule for %s: %s", scope_value, error->message);
+ * g_error_free (error);
+ * g_object_unref (acl_feed);
+ * g_object_unref (calendar);
+ * g_object_unref (service);
+ * return;
+ * }
+ *
+ * g_object_unref (updated_rule);
+ * } else {
+ * /<!-- -->* Delete any rule which doesn't apply to test@gmail.com *<!-- -->/
+ * gdata_service_delete_entry (GDATA_SERVICE (service), GDATA_ENTRY (rule), NULL, &error);
+ *
+ * if (error != NULL) {
+ * g_error ("Error deleting access rule for %s: %s", scope_value, error->message);
+ * g_error_free (error);
+ * g_object_unref (acl_feed);
+ * g_object_unref (calendar);
+ * g_object_unref (service);
+ * return;
+ * }
+ * }
+ * }
+ *
+ * g_object_unref (acl_feed);
+ *
+ * /<!-- -->* Create and insert a new access rule for example@gmail.com which allows them to view free/busy information for events in the
+ * * calendar, but doesn't allow them to view the full event details. *<!-- -->/
+ * rule = gdata_access_rule_new (NULL);
+ * gdata_access_rule_set_role (rule, GDATA_CALENDAR_ACCESS_ROLE_FREE_BUSY);
+ * gdata_access_rule_set_scope (rule, GDATA_ACCESS_SCOPE_USER, "example@gmail.com");
+ *
+ * acl_link = gdata_entry_look_up_link (GDATA_ENTRY (calendar), GDATA_LINK_ACCESS_CONTROL_LIST);
+ * new_rule = GDATA_ACCESS_RULE (gdata_service_insert_entry (GDATA_SERVICE (service), gdata_link_get_uri (acl_link), GDATA_ENTRY (rule),
+ * NULL, &error));
+ *
+ * g_object_unref (rule);
+ * g_object_unref (calendar);
+ * g_object_unref (service);
+ *
+ * if (error != NULL) {
+ * g_error ("Error inserting access rule: %s", error->message);
+ * g_error_free (error);
+ * return;
+ * }
+ *
+ * g_object_unref (acl_link);
+ * </programlisting>
+ * </example>
+ *
+ * Before version 0.17.2, the Calendar service could be manipulated using
+ * batch operations. That is no longer supported, and any batch operations
+ * created on the calendar will fail.
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <libsoup/soup.h>
+#include <string.h>
+
+#include "gdata-calendar-service.h"
+#include "gdata-batchable.h"
+#include "gdata-service.h"
+#include "gdata-private.h"
+#include "gdata-query.h"
+#include "gdata-calendar-feed.h"
+
+/* Standards reference here:
+ * https://developers.google.com/google-apps/calendar/v3/reference/ */
+
+static void
+parse_error_response (GDataService *self,
+ GDataOperationType operation_type,
+ guint status,
+ const gchar *reason_phrase,
+ const gchar *response_body,
+ gint length,
+ GError **error);
+static GList *get_authorization_domains (void);
+
+_GDATA_DEFINE_AUTHORIZATION_DOMAIN (calendar, "cl", "https://www.google.com/calendar/feeds/")
+G_DEFINE_TYPE_WITH_CODE (GDataCalendarService, gdata_calendar_service, GDATA_TYPE_SERVICE, G_IMPLEMENT_INTERFACE (GDATA_TYPE_BATCHABLE, NULL))
+
+static void
+gdata_calendar_service_class_init (GDataCalendarServiceClass *klass)
+{
+ GDataServiceClass *service_class = GDATA_SERVICE_CLASS (klass);
+ service_class->feed_type = GDATA_TYPE_CALENDAR_FEED;
+ service_class->parse_error_response = parse_error_response;
+ service_class->get_authorization_domains = get_authorization_domains;
+}
+
+static void
+gdata_calendar_service_init (GDataCalendarService *self)
+{
+ /* Nothing to see here */
+}
+
+/* The error format used by the Google Calendar API doesn’t seem to be
+ * documented anywhere, which is a little frustrating. Here’s an example of it:
+ * {
+ * "error": {
+ * "errors": [
+ * {
+ * "domain": "global",
+ * "reason": "parseError",
+ * "message": "Parse Error",
+ * }
+ * ],
+ * "code": 400,
+ * "message": "Parse Error"
+ * }
+ * }
+ * or:
+ * {
+ * "error": {
+ * "errors": [
+ * {
+ * "domain": "global",
+ * "reason": "required",
+ * "message": "Missing end time."
+ * }
+ * ],
+ * "code": 400,
+ * "message": "Missing end time."
+ * }
+ * }
+ */
+static void
+parse_error_response (GDataService *self,
+ GDataOperationType operation_type,
+ guint status,
+ const gchar *reason_phrase,
+ const gchar *response_body,
+ gint length,
+ GError **error)
+{
+ JsonParser *parser = NULL; /* owned */
+ JsonReader *reader = NULL; /* owned */
+ gint i;
+ GError *child_error = NULL;
+
+ if (response_body == NULL) {
+ goto parent;
+ }
+
+ if (length == -1) {
+ length = strlen (response_body);
+ }
+
+ parser = json_parser_new ();
+ if (!json_parser_load_from_data (parser, response_body, length,
+ &child_error)) {
+ goto parent;
+ }
+
+ reader = json_reader_new (json_parser_get_root (parser));
+
+ /* Check that the outermost node is an object. */
+ if (!json_reader_is_object (reader)) {
+ goto parent;
+ }
+
+ /* Grab the ‘error’ member, then its ‘errors’ member. */
+ if (!json_reader_read_member (reader, "error") ||
+ !json_reader_is_object (reader) ||
+ !json_reader_read_member (reader, "errors") ||
+ !json_reader_is_array (reader)) {
+ goto parent;
+ }
+
+ /* Parse each of the errors. Return the first one, and print out any
+ * others. */
+ for (i = 0; i < json_reader_count_elements (reader); i++) {
+ const gchar *domain, *reason, *message, *extended_help;
+ const gchar *location_type, *location;
+
+ /* Parse the error. */
+ if (!json_reader_read_element (reader, i) ||
+ !json_reader_is_object (reader)) {
+ goto parent;
+ }
+
+ json_reader_read_member (reader, "domain");
+ domain = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "reason");
+ reason = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "message");
+ message = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "extendedHelp");
+ extended_help = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "locationType");
+ location_type = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "location");
+ location = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ /* End the error element. */
+ json_reader_end_element (reader);
+
+ /* Create an error message, but only for the first error */
+ if (error == NULL || *error == NULL) {
+ if (g_strcmp0 (domain, "usageLimits") == 0 &&
+ g_strcmp0 (reason,
+ "dailyLimitExceededUnreg") == 0) {
+ /* Daily Limit for Unauthenticated Use
+ * Exceeded. */
+ g_set_error (error, GDATA_SERVICE_ERROR,
+ GDATA_SERVICE_ERROR_API_QUOTA_EXCEEDED,
+ _("You have made too many API "
+ "calls recently. Please wait a "
+ "few minutes and try again."));
+ } else if (g_strcmp0 (domain, "global") == 0 &&
+ g_strcmp0 (reason, "notFound") == 0) {
+ /* Calendar not found. */
+ g_set_error (error, GDATA_SERVICE_ERROR,
+ GDATA_SERVICE_ERROR_NOT_FOUND,
+ /* Translators: the parameter is an
+ * error message returned by the
+ * server. */
+ _("The requested resource was not found: %s"),
+ message);
+ } else if ((g_strcmp0 (domain, "global") == 0 &&
+ g_strcmp0 (reason, "required") == 0) ||
+ (g_strcmp0 (domain, "global") == 0 &&
+ g_strcmp0 (reason, "conditionNotMet") == 0)) {
+ /* Client-side protocol error. */
+ g_set_error (error, GDATA_SERVICE_ERROR,
+ GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the parameter is an
+ * error message returned by the
+ * server. */
+ _("Invalid request URI or header, "
+ "or unsupported nonstandard "
+ "parameter: %s"), message);
+ } else if (g_strcmp0 (domain, "global") == 0 &&
+ (g_strcmp0 (reason, "authError") == 0 ||
+ g_strcmp0 (reason, "required") == 0)) {
+ /* Authentication problem */
+ g_set_error (error, GDATA_SERVICE_ERROR,
+ GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED,
+ _("You must be authenticated to "
+ "do this."));
+ } else if (g_strcmp0 (domain, "global") == 0 &&
+ g_strcmp0 (reason, "forbidden") == 0) {
+ g_set_error (error, GDATA_SERVICE_ERROR,
+ GDATA_SERVICE_ERROR_FORBIDDEN,
+ _("Access was denied by the user "
+ "or server."));
+ } else {
+ /* Unknown or validation (protocol) error. Fall
+ * back to working off the HTTP status code. */
+ g_warning ("Unknown error code ‘%s’ in domain "
+ "‘%s’ received with location type "
+ "‘%s’, location ‘%s’, extended help "
+ "‘%s’ and message ‘%s’.",
+ reason, domain, location_type,
+ location, extended_help, message);
+
+ goto parent;
+ }
+ } else {
+ /* For all errors after the first, log the error in the
+ * terminal. */
+ g_debug ("Error message received in response: domain "
+ "‘%s’, reason ‘%s’, extended help ‘%s’, "
+ "message ‘%s’, location type ‘%s’, location "
+ "‘%s’.",
+ domain, reason, extended_help, message,
+ location_type, location);
+ }
+ }
+
+ /* End the ‘errors’ and ‘error’ members. */
+ json_reader_end_element (reader);
+ json_reader_end_element (reader);
+
+ g_clear_object (&reader);
+ g_clear_object (&parser);
+
+ /* Ensure we’ve actually set an error message. */
+ g_assert (error == NULL || *error != NULL);
+
+ return;
+
+parent:
+ g_clear_object (&reader);
+ g_clear_object (&parser);
+
+ /* Chain up to the parent class */
+ GDATA_SERVICE_CLASS (gdata_calendar_service_parent_class)->parse_error_response (self, operation_type, status, reason_phrase,
+ response_body, length, error);
+}
+
+static GList *
+get_authorization_domains (void)
+{
+ return g_list_prepend (NULL, get_calendar_authorization_domain ());
+}
+
+/**
+ * gdata_calendar_service_new:
+ * @authorizer: (allow-none): a #GDataAuthorizer to authorize the service's requests, or %NULL
+ *
+ * Creates a new #GDataCalendarService using the given #GDataAuthorizer. If @authorizer is %NULL, all requests are made as an unauthenticated user.
+ *
+ * Return value: a new #GDataCalendarService, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.9.0
+ */
+GDataCalendarService *
+gdata_calendar_service_new (GDataAuthorizer *authorizer)
+{
+ g_return_val_if_fail (authorizer == NULL || GDATA_IS_AUTHORIZER (authorizer), NULL);
+
+ return g_object_new (GDATA_TYPE_CALENDAR_SERVICE,
+ "authorizer", authorizer,
+ NULL);
+}
+
+/**
+ * gdata_calendar_service_get_primary_authorization_domain:
+ *
+ * The primary #GDataAuthorizationDomain for interacting with Google Calendar. This will not normally need to be used, as it's used internally
+ * by the #GDataCalendarService methods. However, if using the plain #GDataService methods to implement custom queries or requests which libgdata
+ * does not support natively, then this domain may be needed to authorize the requests.
+ *
+ * The domain never changes, and is interned so that pointer comparison can be used to differentiate it from other authorization domains.
+ *
+ * Return value: (transfer none): the service's authorization domain
+ *
+ * Since: 0.9.0
+ */
+GDataAuthorizationDomain *
+gdata_calendar_service_get_primary_authorization_domain (void)
+{
+ return get_calendar_authorization_domain ();
+}
+
+/**
+ * gdata_calendar_service_query_all_calendars:
+ * @self: a #GDataCalendarService
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (scope call) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @error: a #GError, or %NULL
+ *
+ * Queries the service to return a list of all calendars from the authenticated account which match the given
+ * @query. It will return all calendars the user has read access to, including primary, secondary and imported
+ * calendars.
+ *
+ * For more details, see gdata_service_query().
+ *
+ * Return value: (transfer full): a #GDataFeed of query results; unref with g_object_unref()
+ */
+GDataFeed *
+gdata_calendar_service_query_all_calendars (GDataCalendarService *self, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error)
+{
+ GDataFeed *feed;
+ gchar *request_uri;
+
+ g_return_val_if_fail (GDATA_IS_CALENDAR_SERVICE (self), NULL);
+ g_return_val_if_fail (query == NULL || GDATA_IS_QUERY (query), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ /* Ensure we're authenticated first */
+ if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (self)),
+ get_calendar_authorization_domain ()) == FALSE) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED,
+ _("You must be authenticated to query all calendars."));
+ return NULL;
+ }
+
+ request_uri = g_strconcat (_gdata_service_get_scheme (), "://www.googleapis.com/calendar/v3/users/me/calendarList", NULL);
+ feed = gdata_service_query (GDATA_SERVICE (self), get_calendar_authorization_domain (), request_uri, query, GDATA_TYPE_CALENDAR_CALENDAR,
+ cancellable, progress_callback, progress_user_data, error);
+ g_free (request_uri);
+
+ return feed;
+}
+
+/**
+ * gdata_calendar_service_query_all_calendars_async:
+ * @self: a #GDataCalendarService
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @destroy_progress_user_data: (allow-none): the function to call when @progress_callback will not be called any more, or %NULL. This function will be
+ * called with @progress_user_data as a parameter and can be used to free any memory allocated for it.
+ * @callback: a #GAsyncReadyCallback to call when authentication is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Queries the service to return a list of all calendars from the authenticated account which match the given
+ * @query. @self and @query are all reffed when this function is called, so can safely be unreffed after
+ * this function returns.
+ *
+ * For more details, see gdata_calendar_service_query_all_calendars(), which is the synchronous version of
+ * this function, and gdata_service_query_async(), which is the base asynchronous query function.
+ *
+ * Since: 0.9.1
+ */
+void
+gdata_calendar_service_query_all_calendars_async (GDataCalendarService *self, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ gchar *request_uri;
+
+ g_return_if_fail (GDATA_IS_CALENDAR_SERVICE (self));
+ g_return_if_fail (query == NULL || GDATA_IS_QUERY (query));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+ g_return_if_fail (callback != NULL);
+
+ /* Ensure we're authenticated first */
+ if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (self)),
+ get_calendar_authorization_domain ()) == FALSE) {
+ g_autoptr(GTask) task = NULL;
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_service_query_async);
+ g_task_return_new_error (task, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED, "%s",
+ _("You must be authenticated to query all calendars."));
+
+ return;
+ }
+
+ request_uri = g_strconcat (_gdata_service_get_scheme (), "://www.googleapis.com/calendar/v3/users/me/calendarList", NULL);
+ gdata_service_query_async (GDATA_SERVICE (self), get_calendar_authorization_domain (), request_uri, query, GDATA_TYPE_CALENDAR_CALENDAR,
+ cancellable, progress_callback, progress_user_data, destroy_progress_user_data, callback, user_data);
+ g_free (request_uri);
+}
+
+/**
+ * gdata_calendar_service_query_own_calendars:
+ * @self: a #GDataCalendarService
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (scope call) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @error: a #GError, or %NULL
+ *
+ * Queries the service to return a list of calendars from the authenticated account which match the given
+ * @query, and the authenticated user owns. (i.e. They have full read/write access to the calendar, as well
+ * as the ability to set permissions on the calendar.)
+ *
+ * For more details, see gdata_service_query().
+ *
+ * Return value: (transfer full): a #GDataFeed of query results; unref with g_object_unref()
+ */
+GDataFeed *
+gdata_calendar_service_query_own_calendars (GDataCalendarService *self, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error)
+{
+ GDataFeed *feed;
+ gchar *request_uri;
+
+ g_return_val_if_fail (GDATA_IS_CALENDAR_SERVICE (self), NULL);
+ g_return_val_if_fail (query == NULL || GDATA_IS_QUERY (query), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ /* Ensure we're authenticated first */
+ if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (self)),
+ get_calendar_authorization_domain ()) == FALSE) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED,
+ _("You must be authenticated to query your own calendars."));
+ return NULL;
+ }
+
+ request_uri = g_strconcat (_gdata_service_get_scheme (), "://www.googleapis.com/calendar/v3/users/me/calendarList?minAccessRole=owner", NULL);
+ feed = gdata_service_query (GDATA_SERVICE (self), get_calendar_authorization_domain (), request_uri, query, GDATA_TYPE_CALENDAR_CALENDAR,
+ cancellable, progress_callback, progress_user_data, error);
+ g_free (request_uri);
+
+ return feed;
+}
+
+/**
+ * gdata_calendar_service_query_own_calendars_async:
+ * @self: a #GDataCalendarService
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @destroy_progress_user_data: (allow-none): the function to call when @progress_callback will not be called any more, or %NULL. This function will be
+ * called with @progress_user_data as a parameter and can be used to free any memory allocated for it.
+ * @callback: a #GAsyncReadyCallback to call when authentication is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Queries the service to return a list of calendars from the authenticated account which match the given
+ * @query, and the authenticated user owns. @self and @query are all reffed when this function is called,
+ * so can safely be unreffed after this function returns.
+ *
+ * For more details, see gdata_calendar_service_query_own_calendars(), which is the synchronous version of
+ * this function, and gdata_service_query_async(), which is the base asynchronous query function.
+ *
+ * Since: 0.9.1
+ */
+void
+gdata_calendar_service_query_own_calendars_async (GDataCalendarService *self, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ gchar *request_uri;
+
+ g_return_if_fail (GDATA_IS_CALENDAR_SERVICE (self));
+ g_return_if_fail (query == NULL || GDATA_IS_QUERY (query));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+ g_return_if_fail (callback != NULL);
+
+ /* Ensure we're authenticated first */
+ if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (self)),
+ get_calendar_authorization_domain ()) == FALSE) {
+ g_autoptr(GTask) task = NULL;
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_service_query_async);
+ g_task_return_new_error (task, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED, "%s",
+ _("You must be authenticated to query your own calendars."));
+
+ return;
+ }
+
+ request_uri = g_strconcat (_gdata_service_get_scheme (), "://www.googleapis.com/calendar/v3/users/me/calendarList?minAccessRole=owner", NULL);
+ gdata_service_query_async (GDATA_SERVICE (self), get_calendar_authorization_domain (), request_uri, query, GDATA_TYPE_CALENDAR_CALENDAR,
+ cancellable, progress_callback, progress_user_data, destroy_progress_user_data, callback, user_data);
+ g_free (request_uri);
+}
+
+static gchar *
+build_events_uri (GDataCalendarCalendar *calendar)
+{
+ GString *uri;
+ const gchar *calendar_id;
+
+ calendar_id = (calendar != NULL) ? gdata_entry_get_id (GDATA_ENTRY (calendar)) : "default";
+
+ uri = g_string_new (_gdata_service_get_scheme ());
+ g_string_append (uri, "://www.googleapis.com/calendar/v3/calendars/");
+ g_string_append_uri_escaped (uri, calendar_id, NULL, FALSE);
+ g_string_append (uri, "/events");
+
+ return g_string_free (uri, FALSE);
+}
+
+/**
+ * gdata_calendar_service_query_events:
+ * @self: a #GDataCalendarService
+ * @calendar: a #GDataCalendarCalendar
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (scope call) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @error: a #GError, or %NULL
+ *
+ * Queries the service to return a list of events in the given @calendar, which match @query.
+ *
+ * For more details, see gdata_service_query().
+ *
+ * Return value: (transfer full): a #GDataFeed of query results; unref with g_object_unref()
+ */
+GDataFeed *
+gdata_calendar_service_query_events (GDataCalendarService *self, GDataCalendarCalendar *calendar, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error)
+{
+ gchar *request_uri;
+ GDataFeed *feed;
+
+ g_return_val_if_fail (GDATA_IS_CALENDAR_SERVICE (self), NULL);
+ g_return_val_if_fail (GDATA_IS_CALENDAR_CALENDAR (calendar), NULL);
+ g_return_val_if_fail (query == NULL || GDATA_IS_QUERY (query), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ /* Ensure we're authenticated first */
+ if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (self)),
+ get_calendar_authorization_domain ()) == FALSE) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED,
+ _("You must be authenticated to query your own calendars."));
+ return NULL;
+ }
+
+ /* Execute the query. */
+ request_uri = build_events_uri (calendar);
+ feed = gdata_service_query (GDATA_SERVICE (self),
+ get_calendar_authorization_domain (),
+ request_uri, query,
+ GDATA_TYPE_CALENDAR_EVENT, cancellable,
+ progress_callback, progress_user_data,
+ error);
+ g_free (request_uri);
+
+ return feed;
+}
+
+/**
+ * gdata_calendar_service_query_events_async:
+ * @self: a #GDataCalendarService
+ * @calendar: a #GDataCalendarCalendar
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @destroy_progress_user_data: (allow-none): the function to call when @progress_callback will not be called any more, or %NULL. This function will be
+ * called with @progress_user_data as a parameter and can be used to free any memory allocated for it.
+ * @callback: a #GAsyncReadyCallback to call when the query is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Queries the service to return a list of events in the given @calendar, which match @query. @self, @calendar and @query are all reffed when this
+ * function is called, so can safely be unreffed after this function returns.
+ *
+ * Get the results of the query using gdata_service_query_finish() in the @callback.
+ *
+ * For more details, see gdata_calendar_service_query_events(), which is the synchronous version of this function, and gdata_service_query_async(),
+ * which is the base asynchronous query function.
+ *
+ * Since: 0.9.1
+ */
+void
+gdata_calendar_service_query_events_async (GDataCalendarService *self, GDataCalendarCalendar *calendar, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ gchar *request_uri;
+
+ g_return_if_fail (GDATA_IS_CALENDAR_SERVICE (self));
+ g_return_if_fail (GDATA_IS_CALENDAR_CALENDAR (calendar));
+ g_return_if_fail (query == NULL || GDATA_IS_QUERY (query));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+ g_return_if_fail (callback != NULL);
+
+ /* Ensure we're authenticated first */
+ if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (self)),
+ get_calendar_authorization_domain ()) == FALSE) {
+ g_autoptr(GTask) task = NULL;
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_service_query_async);
+ g_task_return_new_error (task, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED, "%s",
+ _("You must be authenticated to query your own calendars."));
+
+ return;
+ }
+
+ /* Execute the query. */
+ request_uri = build_events_uri (calendar);
+ gdata_service_query_async (GDATA_SERVICE (self),
+ get_calendar_authorization_domain (),
+ request_uri, query,
+ GDATA_TYPE_CALENDAR_EVENT, cancellable,
+ progress_callback, progress_user_data,
+ destroy_progress_user_data, callback,
+ user_data);
+ g_free (request_uri);
+}
+
+/**
+ * gdata_calendar_service_insert_event:
+ * @self: a #GDataCalendarService
+ * @event: the #GDataCalendarEvent to insert
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Inserts @event by uploading it to the online calendar service.
+ *
+ * For more details, see gdata_service_insert_entry().
+ *
+ * Return value: (transfer full): an updated #GDataCalendarEvent, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.2.0
+ * Deprecated: 0.17.2: Use gdata_calendar_service_insert_calendar_event()
+ * instead to be able to specify the calendar to add the event to; otherwise
+ * the default calendar will be used.
+ */
+GDataCalendarEvent *
+gdata_calendar_service_insert_event (GDataCalendarService *self, GDataCalendarEvent *event, GCancellable *cancellable, GError **error)
+{
+ gchar *uri;
+ GDataEntry *entry;
+
+ g_return_val_if_fail (GDATA_IS_CALENDAR_SERVICE (self), NULL);
+ g_return_val_if_fail (GDATA_IS_CALENDAR_EVENT (event), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ uri = build_events_uri (NULL);
+ entry = gdata_service_insert_entry (GDATA_SERVICE (self), get_calendar_authorization_domain (), uri, GDATA_ENTRY (event), cancellable, error);
+ g_free (uri);
+
+ return GDATA_CALENDAR_EVENT (entry);
+}
+
+/**
+ * gdata_calendar_service_insert_calendar_event:
+ * @self: a #GDataCalendarService
+ * @calendar: the #GDataCalendarCalendar to insert the event into
+ * @event: the #GDataCalendarEvent to insert
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Inserts @event by uploading it to the online calendar service, adding it to
+ * the specified @calendar.
+ *
+ * For more details, see gdata_service_insert_entry().
+ *
+ * Return value: (transfer full): an updated #GDataCalendarEvent, or %NULL;
+ * unref with g_object_unref()
+ *
+ * Since: 0.17.2
+ */
+GDataCalendarEvent *
+gdata_calendar_service_insert_calendar_event (GDataCalendarService *self,
+ GDataCalendarCalendar *calendar,
+ GDataCalendarEvent *event,
+ GCancellable *cancellable,
+ GError **error)
+{
+ gchar *uri;
+ GDataEntry *entry;
+
+ g_return_val_if_fail (GDATA_IS_CALENDAR_SERVICE (self), NULL);
+ g_return_val_if_fail (GDATA_IS_CALENDAR_CALENDAR (calendar), NULL);
+ g_return_val_if_fail (GDATA_IS_CALENDAR_EVENT (event), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ uri = build_events_uri (calendar);
+ entry = gdata_service_insert_entry (GDATA_SERVICE (self),
+ get_calendar_authorization_domain (),
+ uri, GDATA_ENTRY (event),
+ cancellable, error);
+ g_free (uri);
+
+ return GDATA_CALENDAR_EVENT (entry);
+}
+
+/**
+ * gdata_calendar_service_insert_event_async:
+ * @self: a #GDataCalendarService
+ * @event: the #GDataCalendarEvent to insert
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when insertion is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Inserts @event by uploading it to the online calendar service. @self and @event are both reffed when this function is called, so can safely be
+ * unreffed after this function returns.
+ *
+ * @callback should call gdata_service_insert_entry_finish() to obtain a #GDataCalendarEvent representing the inserted event and to check for possible
+ * errors.
+ *
+ * For more details, see gdata_calendar_service_insert_event(), which is the synchronous version of this function, and
+ * gdata_service_insert_entry_async(), which is the base asynchronous insertion function.
+ *
+ * Since: 0.8.0
+ * Deprecated: 0.17.2: Use
+ * gdata_calendar_service_insert_calendar_event_async() instead to be able to
+ * specify the calendar to add the event to; otherwise the default calendar
+ * will be used.
+ */
+void
+gdata_calendar_service_insert_event_async (GDataCalendarService *self, GDataCalendarEvent *event, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ gchar *uri;
+
+ g_return_if_fail (GDATA_IS_CALENDAR_SERVICE (self));
+ g_return_if_fail (GDATA_IS_CALENDAR_EVENT (event));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+
+ uri = build_events_uri (NULL);
+ gdata_service_insert_entry_async (GDATA_SERVICE (self), get_calendar_authorization_domain (), uri, GDATA_ENTRY (event), cancellable,
+ callback, user_data);
+ g_free (uri);
+}
+
+/**
+ * gdata_calendar_service_insert_calendar_event_async:
+ * @self: a #GDataCalendarService
+ * @calendar: the #GDataCalendarCalendar to insert the event into
+ * @event: the #GDataCalendarEvent to insert
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when insertion is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Inserts @event by uploading it to the online calendar service, adding it to
+ * the specified @calendar. @self and @event are both reffed when this function
+ * is called, so can safely be unreffed after this function returns.
+ *
+ * @callback should call gdata_service_insert_entry_finish() to obtain a
+ * #GDataCalendarEvent representing the inserted event and to check for possible
+ * errors.
+ *
+ * For more details, see gdata_calendar_service_insert_event(), which is the
+ * synchronous version of this function, and gdata_service_insert_entry_async(),
+ * which is the base asynchronous insertion function.
+ *
+ * Since: 0.17.2
+ */
+void
+gdata_calendar_service_insert_calendar_event_async (GDataCalendarService *self,
+ GDataCalendarCalendar *calendar,
+ GDataCalendarEvent *event,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ gchar *uri;
+
+ g_return_if_fail (GDATA_IS_CALENDAR_SERVICE (self));
+ g_return_if_fail (GDATA_IS_CALENDAR_EVENT (event));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+
+ uri = build_events_uri (calendar);
+ gdata_service_insert_entry_async (GDATA_SERVICE (self),
+ get_calendar_authorization_domain (),
+ uri, GDATA_ENTRY (event), cancellable,
+ callback, user_data);
+ g_free (uri);
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009, 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_CALENDAR_SERVICE_H
+#define GDATA_CALENDAR_SERVICE_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-service.h>
+#include <gdata/gdata-query.h>
+#include <gdata/services/calendar/gdata-calendar-calendar.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_CALENDAR_SERVICE (gdata_calendar_service_get_type ())
+#define GDATA_CALENDAR_SERVICE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_CALENDAR_SERVICE, GDataCalendarService))
+#define GDATA_CALENDAR_SERVICE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_CALENDAR_SERVICE, GDataCalendarServiceClass))
+#define GDATA_IS_CALENDAR_SERVICE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_CALENDAR_SERVICE))
+#define GDATA_IS_CALENDAR_SERVICE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_CALENDAR_SERVICE))
+#define GDATA_CALENDAR_SERVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_CALENDAR_SERVICE, GDataCalendarServiceClass))
+
+typedef struct _GDataCalendarServicePrivate GDataCalendarServicePrivate;
+
+/**
+ * GDataCalendarService:
+ *
+ * All the fields in the #GDataCalendarService structure are private and should never be accessed directly.
+ */
+typedef struct {
+ GDataService parent;
+} GDataCalendarService;
+
+/**
+ * GDataCalendarServiceClass:
+ *
+ * All the fields in the #GDataCalendarServiceClass structure are private and should never be accessed directly.
+ */
+typedef struct {
+ /*< private >*/
+ GDataServiceClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+ void (*_g_reserved2) (void);
+ void (*_g_reserved3) (void);
+ void (*_g_reserved4) (void);
+ void (*_g_reserved5) (void);
+} GDataCalendarServiceClass;
+
+GType gdata_calendar_service_get_type (void) G_GNUC_CONST;
+
+GDataCalendarService *gdata_calendar_service_new (GDataAuthorizer *authorizer) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+GDataAuthorizationDomain *gdata_calendar_service_get_primary_authorization_domain (void) G_GNUC_CONST;
+
+GDataFeed *gdata_calendar_service_query_all_calendars (GDataCalendarService *self, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_calendar_service_query_all_calendars_async (GDataCalendarService *self, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data, GAsyncReadyCallback callback, gpointer user_data);
+
+GDataFeed *gdata_calendar_service_query_own_calendars (GDataCalendarService *self, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_calendar_service_query_own_calendars_async (GDataCalendarService *self, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data, GAsyncReadyCallback callback, gpointer user_data);
+
+GDataFeed *gdata_calendar_service_query_events (GDataCalendarService *self, GDataCalendarCalendar *calendar, GDataQuery *query,
+ GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_calendar_service_query_events_async (GDataCalendarService *self, GDataCalendarCalendar *calendar, GDataQuery *query,
+ GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data, GAsyncReadyCallback callback, gpointer user_data);
+
+#include <gdata/services/calendar/gdata-calendar-event.h>
+
+#ifndef LIBGDATA_DISABLE_DEPRECATED
+GDataCalendarEvent *
+gdata_calendar_service_insert_event (GDataCalendarService *self,
+ GDataCalendarEvent *event,
+ GCancellable *cancellable,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC G_GNUC_DEPRECATED_FOR(gdata_calendar_service_insert_calendar_event);
+void
+gdata_calendar_service_insert_event_async (GDataCalendarService *self,
+ GDataCalendarEvent *event,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+ G_GNUC_DEPRECATED_FOR (gdata_calendar_service_insert_calendar_event_async);
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
+
+GDataCalendarEvent *
+gdata_calendar_service_insert_calendar_event (GDataCalendarService *self,
+ GDataCalendarCalendar *calendar,
+ GDataCalendarEvent *event,
+ GCancellable *cancellable,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void
+gdata_calendar_service_insert_calendar_event_async (GDataCalendarService *self,
+ GDataCalendarCalendar *calendar,
+ GDataCalendarEvent *event,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+G_END_DECLS
+
+#endif /* !GDATA_CALENDAR_SERVICE_H */
--- /dev/null
+headers = files(
+ 'gdata-calendar-access-rule.h',
+ 'gdata-calendar-calendar.h',
+ 'gdata-calendar-event.h',
+ 'gdata-calendar-feed.h',
+ 'gdata-calendar-query.h',
+ 'gdata-calendar-service.h',
+)
+
+install_headers(
+ headers,
+ subdir: gdata_include_subdir / 'services/calendar',
+)
+
+gir_headers += headers
+
+sources += files(
+ 'gdata-calendar-access-rule.c',
+ 'gdata-calendar-calendar.c',
+ 'gdata-calendar-event.c',
+ 'gdata-calendar-feed.c',
+ 'gdata-calendar-query.c',
+ 'gdata-calendar-service.c',
+)
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009, 2010, 2011 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-contacts-contact
+ * @short_description: GData Contacts contact object
+ * @stability: Stable
+ * @include: gdata/services/contacts/gdata-contacts-contact.h
+ *
+ * #GDataContactsContact is a subclass of #GDataEntry to represent a contact from a Google address book.
+ *
+ * For more details of Google Contacts' GData API, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/2.0/reference.html">
+ * online documentation</ulink>.
+ *
+ * In addition to all the standard properties available for a contact, #GDataContactsContact supports two kinds of additional property: extended
+ * properties and user-defined fields. Extended properties, set with gdata_contacts_contact_set_extended_property() and retrieved with
+ * gdata_contacts_contact_get_extended_property(), are provided as a method of storing client-specific data which shouldn't be seen or be editable
+ * by the user, such as IDs and cache times. User-defined fields, set with gdata_contacts_contact_set_user_defined_field() and retrieved with
+ * gdata_contacts_contact_get_user_defined_field(), store fields defined by the user, and editable by them in the interface (both the interface of
+ * the appliation using libgdata, and the Google Contacts web interface).
+ *
+ * <example>
+ * <title>Getting a Contact's Photo</title>
+ * <programlisting>
+ * GDataContactsService *service;
+ * GDataContactsContact *contact;
+ * guint8 *data;
+ * gchar *content_type = NULL;
+ * gsize length = 0;
+ * GError *error = NULL;
+ *
+ * /<!-- -->* Create a service and return the contact whose photo we're getting. *<!-- -->/
+ * service = create_contacts_service ();
+ * contact = query_user_for_contact (service);
+ *
+ * /<!-- -->* Get the photo. This should almost always be done asynchronously. *<!-- -->/
+ * data = gdata_contacts_contact_get_photo (contact, service, &length, &content_type, NULL, &error);
+ *
+ * g_object_unref (contact);
+ * g_object_unref (service);
+ *
+ * if (error != NULL) {
+ * g_error ("Error getting a contact's photo: %s", error->message);
+ * g_error_free (error);
+ * return;
+ * }
+ *
+ * /<!-- -->* Do something with the photo, stored in data, length and content_type. *<!-- -->/
+ *
+ * g_free (content_type);
+ * g_free (data);
+ * </programlisting>
+ * </example>
+ *
+ * <example>
+ * <title>Setting a Contact's Photo</title>
+ * <programlisting>
+ * GDataContactsService *service;
+ * GDataContactsContact *contact;
+ * guint8 *data;
+ * gchar *content_type = NULL;
+ * gsize length = 0;
+ * GError *error = NULL;
+ *
+ * /<!-- -->* Create a service and return the contact whose photo we're getting, as well as the details of the new photo. *<!-- -->/
+ * service = create_contacts_service ();
+ * contact = query_user_for_contact (service);
+ * data = query_user_for_new_photo (contact, &content_type, &length);
+ *
+ * /<!-- -->* Set the photo. This should almost always be done asynchronously. To delete the photo, just pass NULL as the photo data. *<!-- -->/
+ * gdata_contacts_contact_set_photo (contact, service, data, length, content_type, NULL, &error);
+ *
+ * g_free (data);
+ * g_free (content_type);
+ * g_object_unref (contact);
+ * g_object_unref (service);
+ *
+ * if (error != NULL) {
+ * g_error ("Error setting a contact's photo: %s", error->message);
+ * g_error_free (error);
+ * return;
+ * }
+ * </programlisting>
+ * </example>
+ *
+ * <example>
+ * <title>Updating a Contact's Details</title>
+ * <programlisting>
+ * GDataContactsService *service;
+ * GDataContactsContact *contact, *updated_contact;
+ * GDataGDEmailAddress *email_address;
+ * GDataGDIMAddress *im_address;
+ * GError *error = NULL;
+ *
+ * /<!-- -->* Create a service and return the contact whose details we're updating. *<!-- -->/
+ * service = create_contacts_service ();
+ * contact = query_user_for_contact (service);
+ *
+ * /<!-- -->* Update the contact's details. We set their nickname to "Fat Tony", add a new e-mail address, and replace all their existing IM
+ * * addresses with a single new one. *<!-- -->/
+ * gdata_contacts_contact_set_nickname (contact, "Fat Tony");
+ *
+ * email_address = gdata_gd_email_address_new ("tony@gmail.com", GDATA_GD_EMAIL_ADDRESS_HOME, NULL, FALSE);
+ * gdata_contacts_contact_add_email_address (contact, email_address);
+ * g_object_unref (email_address);
+ *
+ * gdata_contacts_contact_remove_all_im_addresses (contact);
+ * im_address = gdata_gd_im_address_new ("tony.work@gmail.com", GDATA_GD_IM_PROTOCOL_GOOGLE_TALK, GDATA_GD_IM_ADDRESS_WORK, NULL, TRUE);
+ * gdata_contacts_contact_add_im_address (contact, im_address);
+ * g_object_unref (im_address);
+ *
+ * /<!-- -->* Send the updated contact to the server *<!-- -->/
+ * updated_contact = GDATA_CONTACTS_CONTACT (gdata_service_update_entry (GDATA_SERVICE (service), GDATA_ENTRY (contact), NULL, &error));
+ *
+ * g_object_unref (contact);
+ * g_object_unref (service);
+ *
+ * if (error != NULL) {
+ * g_error ("Error updating a contact's details: %s", error->message);
+ * g_error_free (error);
+ * return;
+ * }
+ *
+ * /<!-- -->* Do something with the updated contact, such as update them in the UI, or store their ID for future use. *<!-- -->/
+ *
+ * g_object_unref (updated_contact);
+ * </programlisting>
+ * </example>
+ *
+ * Since: 0.2.0
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <libxml/parser.h>
+#include <string.h>
+
+#include "gdata-contacts-contact.h"
+#include "gdata-parser.h"
+#include "gdata-types.h"
+#include "gdata-private.h"
+#include "gdata-comparable.h"
+
+/* The maximum number of extended properties the server allows us. See
+ * http://code.google.com/apis/contacts/docs/2.0/reference.html#ProjectionsAndExtended.
+ * When updating this, make sure to update the API documentation for gdata_contacts_contact_get_extended_property()
+ * and gdata_contacts_contact_set_extended_property(). */
+#define MAX_N_EXTENDED_PROPERTIES 10
+
+static GObject *gdata_contacts_contact_constructor (GType type, guint n_construct_params, GObjectConstructParam *construct_params);
+static void gdata_contacts_contact_dispose (GObject *object);
+static void gdata_contacts_contact_finalize (GObject *object);
+static void gdata_contacts_contact_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_contacts_contact_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void get_xml (GDataParsable *parsable, GString *xml_string);
+static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+static gchar *get_entry_uri (const gchar *id) G_GNUC_WARN_UNUSED_RESULT;
+
+struct _GDataContactsContactPrivate {
+ gint64 edited;
+ GDataGDName *name;
+ GList *email_addresses; /* GDataGDEmailAddress */
+ GList *im_addresses; /* GDataGDIMAddress */
+ GList *phone_numbers; /* GDataGDPhoneNumber */
+ GList *postal_addresses; /* GDataGDPostalAddress */
+ GList *organizations; /* GDataGDOrganization */
+ GHashTable *extended_properties;
+ GHashTable *user_defined_fields;
+ GHashTable *groups;
+ gboolean deleted;
+ gchar *photo_etag;
+ GList *jots; /* GDataGContactJot */
+ gchar *nickname;
+ gchar *file_as;
+ GDate birthday;
+ gboolean birthday_has_year; /* contacts can choose to just give the month and day of their birth */
+ GList *relations; /* GDataGContactRelation */
+ GList *websites; /* GDataGContactWebsite */
+ GList *events; /* GDataGContactEvent */
+ GList *calendars; /* GDataGContactCalendar */
+ GList *external_ids; /* GDataGContactExternalID */
+ gchar *billing_information;
+ gchar *directory_server;
+ gchar *gender;
+ gchar *initials;
+ gchar *maiden_name;
+ gchar *mileage;
+ gchar *occupation;
+ gchar *priority;
+ gchar *sensitivity;
+ gchar *short_name;
+ gchar *subject;
+ GList *hobbies; /* gchar* */
+ GList *languages; /* GDataGContactLanguage */
+};
+
+enum {
+ PROP_EDITED = 1,
+ PROP_DELETED,
+ PROP_NAME,
+ PROP_NICKNAME,
+ PROP_BIRTHDAY,
+ PROP_BIRTHDAY_HAS_YEAR,
+ PROP_BILLING_INFORMATION,
+ PROP_DIRECTORY_SERVER,
+ PROP_GENDER,
+ PROP_INITIALS,
+ PROP_MAIDEN_NAME,
+ PROP_MILEAGE,
+ PROP_OCCUPATION,
+ PROP_PRIORITY,
+ PROP_SENSITIVITY,
+ PROP_SHORT_NAME,
+ PROP_SUBJECT,
+ PROP_PHOTO_ETAG,
+ PROP_FILE_AS,
+};
+
+G_DEFINE_TYPE (GDataContactsContact, gdata_contacts_contact, GDATA_TYPE_ENTRY)
+
+static void
+gdata_contacts_contact_class_init (GDataContactsContactClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+ GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataContactsContactPrivate));
+
+ gobject_class->constructor = gdata_contacts_contact_constructor;
+ gobject_class->get_property = gdata_contacts_contact_get_property;
+ gobject_class->set_property = gdata_contacts_contact_set_property;
+ gobject_class->dispose = gdata_contacts_contact_dispose;
+ gobject_class->finalize = gdata_contacts_contact_finalize;
+
+ parsable_class->parse_xml = parse_xml;
+ parsable_class->get_xml = get_xml;
+ parsable_class->get_namespaces = get_namespaces;
+
+ entry_class->get_entry_uri = get_entry_uri;
+ entry_class->kind_term = "http://schemas.google.com/contact/2008#contact";
+
+ /**
+ * GDataContactsContact:edited:
+ *
+ * The last time the contact was edited. If the contact has not been edited yet, the content indicates the time it was created.
+ *
+ * For more information, see the <ulink type="http" url="http://www.atomenabled.org/developers/protocol/#appEdited">
+ * Atom Publishing Protocol specification</ulink>.
+ *
+ * Since: 0.2.0
+ */
+ g_object_class_install_property (gobject_class, PROP_EDITED,
+ g_param_spec_int64 ("edited",
+ "Edited", "The last time the contact was edited.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataContactsContact:deleted:
+ *
+ * Whether the entry has been deleted.
+ *
+ * Since: 0.2.0
+ */
+ g_object_class_install_property (gobject_class, PROP_DELETED,
+ g_param_spec_boolean ("deleted",
+ "Deleted", "Whether the entry has been deleted.",
+ FALSE,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataContactsContact:photo-etag:
+ *
+ * The ETag of the contact's photo, if the contact has a photo; %NULL otherwise.
+ *
+ * Since: 0.9.0
+ */
+ g_object_class_install_property (gobject_class, PROP_PHOTO_ETAG,
+ g_param_spec_string ("photo-etag",
+ "Photo ETag", "The ETag of the contact's photo.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataContactsContact:name:
+ *
+ * The contact's name in a structured representation.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_NAME,
+ g_param_spec_object ("name",
+ "Name", "The contact's name in a structured representation.",
+ GDATA_TYPE_GD_NAME,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataContactsContact:nickname:
+ *
+ * The contact's chosen nickname.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_NICKNAME,
+ g_param_spec_string ("nickname",
+ "Nickname", "The contact's chosen nickname.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataContactsContact:file-as:
+ *
+ * The name to file the contact under for sorting purposes.
+ *
+ * Since: 0.11.0
+ */
+ g_object_class_install_property (gobject_class, PROP_FILE_AS,
+ g_param_spec_string ("file-as",
+ "File As", "The name to file the contact under for sorting purposes.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataContactsContact:birthday:
+ *
+ * The contact's birthday.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_BIRTHDAY,
+ g_param_spec_boxed ("birthday",
+ "Birthday", "The contact's birthday.",
+ G_TYPE_DATE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataContactsContact:birthday-has-year:
+ *
+ * Whether the contact's birthday includes their year of birth.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_BIRTHDAY_HAS_YEAR,
+ g_param_spec_boolean ("birthday-has-year",
+ "Birthday has year?", "Whether the contact's birthday includes their year of birth.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataContactsContact:billing-information:
+ *
+ * Billing information for the contact, such as their billing name and address.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_BILLING_INFORMATION,
+ g_param_spec_string ("billing-information",
+ "Billing information", "Billing information for the contact.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataContactsContact:directory-server:
+ *
+ * The name or address of a directory server associated with the contact.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_DIRECTORY_SERVER,
+ g_param_spec_string ("directory-server",
+ "Directory server", "The name or address of an associated directory server.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataContactsContact:gender:
+ *
+ * The gender of the contact. For example: %GDATA_CONTACTS_GENDER_MALE or %GDATA_CONTACTS_GENDER_FEMALE.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_GENDER,
+ g_param_spec_string ("gender",
+ "Gender", "The gender of the contact.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataContactsContact:initials:
+ *
+ * The initials of the contact.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_INITIALS,
+ g_param_spec_string ("initials",
+ "Initials", "The initials of the contact.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataContactsContact:maiden-name:
+ *
+ * The maiden name of the contact.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_MAIDEN_NAME,
+ g_param_spec_string ("maiden-name",
+ "Maiden name", "The maiden name of the contact.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataContactsContact:mileage:
+ *
+ * A mileage associated with the contact, such as one for reimbursement purposes. It can be in any format.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_MILEAGE,
+ g_param_spec_string ("mileage",
+ "Mileage", "A mileage associated with the contact.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataContactsContact:occupation:
+ *
+ * The contact's occupation.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_OCCUPATION,
+ g_param_spec_string ("occupation",
+ "Occupation", "The contact's occupation.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataContactsContact:priority:
+ *
+ * The contact's importance. For example: %GDATA_CONTACTS_PRIORITY_NORMAL or %GDATA_CONTACTS_PRIORITY_HIGH.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_PRIORITY,
+ g_param_spec_string ("priority",
+ "Priority", "The contact's importance.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataContactsContact:sensitivity:
+ *
+ * The sensitivity of the contact's data. For example: %GDATA_CONTACTS_SENSITIVITY_NORMAL or %GDATA_CONTACTS_SENSITIVITY_PRIVATE.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SENSITIVITY,
+ g_param_spec_string ("sensitivity",
+ "Sensitivity", "The sensitivity of the contact's data.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataContactsContact:short-name:
+ *
+ * A short name for the contact. This should be used for contracted versions of the contact's actual name,
+ * whereas #GDataContactsContact:nickname should be used for nicknames.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SHORT_NAME,
+ g_param_spec_string ("short-name",
+ "Short name", "A short name for the contact.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataContactsContact:subject:
+ *
+ * The subject of the contact. (i.e. The contact's relevance to the address book.)
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SUBJECT,
+ g_param_spec_string ("subject",
+ "Subject", "The subject of the contact.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void notify_full_name_cb (GObject *gobject, GParamSpec *pspec, GDataContactsContact *self);
+
+static void
+notify_title_cb (GObject *gobject, GParamSpec *pspec, GDataContactsContact *self)
+{
+ /* Update GDataGDName:full-name */
+ g_signal_handlers_block_by_func (self->priv->name, notify_full_name_cb, self);
+ gdata_gd_name_set_full_name (self->priv->name, gdata_entry_get_title (GDATA_ENTRY (self)));
+ g_signal_handlers_unblock_by_func (self->priv->name, notify_full_name_cb, self);
+}
+
+static void
+notify_full_name_cb (GObject *gobject, GParamSpec *pspec, GDataContactsContact *self)
+{
+ /* Update GDataEntry:title */
+ g_signal_handlers_block_by_func (self, notify_title_cb, self);
+ gdata_entry_set_title (GDATA_ENTRY (self), gdata_gd_name_get_full_name (self->priv->name));
+ g_signal_handlers_unblock_by_func (self, notify_title_cb, self);
+}
+
+static void
+gdata_contacts_contact_init (GDataContactsContact *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_CONTACTS_CONTACT, GDataContactsContactPrivate);
+ self->priv->extended_properties = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
+ self->priv->user_defined_fields = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
+ self->priv->groups = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+ self->priv->edited = -1;
+
+ /* Create a default name, so the name's properties can be set for a blank contact */
+ self->priv->name = gdata_gd_name_new (NULL, NULL);
+
+ /* Listen to change notifications for the entry's title, since it's linked to GDataGDName:full-name */
+ g_signal_connect (self, "notify::title", (GCallback) notify_title_cb, self);
+ g_signal_connect (self->priv->name, "notify::full-name", (GCallback) notify_full_name_cb, self);
+
+ /* Initialise the contact's birthday to a sane but invalid date */
+ g_date_clear (&(self->priv->birthday), 1);
+}
+
+static GObject *
+gdata_contacts_contact_constructor (GType type, guint n_construct_params, GObjectConstructParam *construct_params)
+{
+ GObject *object;
+ guint i;
+
+ /* Find the "id" property and ensure it's sane */
+ for (i = 0; i < n_construct_params; i++) {
+ GParamSpec *pspec = construct_params[i].pspec;
+ GValue *value = construct_params[i].value;
+
+ if (strcmp (g_param_spec_get_name (pspec), "id") == 0) {
+ gchar *base, *id;
+
+ id = g_value_dup_string (value);
+
+ /* Fix the ID to refer to the full projection, rather than the base projection. */
+ if (id != NULL) {
+ base = strstr (id, "/base/");
+ if (base != NULL)
+ memcpy (base, "/full/", 6);
+ }
+
+ g_value_take_string (value, id);
+
+ break;
+ }
+ }
+
+ /* Chain up to the parent class */
+ object = G_OBJECT_CLASS (gdata_contacts_contact_parent_class)->constructor (type, n_construct_params, construct_params);
+
+ if (_gdata_parsable_is_constructed_from_xml (GDATA_PARSABLE (object)) == FALSE) {
+ GDataContactsContactPrivate *priv = GDATA_CONTACTS_CONTACT (object)->priv;
+ GTimeVal time_val;
+
+ /* Set the edited property to the current time (creation time). We don't do this in *_init() since that would cause
+ * setting it from parse_xml() to fail (duplicate element). */
+ g_get_current_time (&time_val);
+ priv->edited = time_val.tv_sec;
+ }
+
+ return object;
+}
+
+static void
+gdata_contacts_contact_dispose (GObject *object)
+{
+ GDataContactsContact *self = GDATA_CONTACTS_CONTACT (object);
+
+ if (self->priv->name != NULL)
+ g_object_unref (self->priv->name);
+ self->priv->name = NULL;
+
+ gdata_contacts_contact_remove_all_organizations (self);
+ gdata_contacts_contact_remove_all_email_addresses (self);
+ gdata_contacts_contact_remove_all_im_addresses (self);
+ gdata_contacts_contact_remove_all_postal_addresses (self);
+ gdata_contacts_contact_remove_all_phone_numbers (self);
+ gdata_contacts_contact_remove_all_jots (self);
+ gdata_contacts_contact_remove_all_relations (self);
+ gdata_contacts_contact_remove_all_websites (self);
+ gdata_contacts_contact_remove_all_events (self);
+ gdata_contacts_contact_remove_all_calendars (self);
+ gdata_contacts_contact_remove_all_external_ids (self);
+ gdata_contacts_contact_remove_all_languages (self);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_contacts_contact_parent_class)->dispose (object);
+}
+
+static void
+gdata_contacts_contact_finalize (GObject *object)
+{
+ GDataContactsContactPrivate *priv = GDATA_CONTACTS_CONTACT (object)->priv;
+
+ g_hash_table_destroy (priv->extended_properties);
+ g_hash_table_destroy (priv->user_defined_fields);
+ g_hash_table_destroy (priv->groups);
+ g_free (priv->photo_etag);
+ g_free (priv->nickname);
+ g_free (priv->file_as);
+ g_free (priv->billing_information);
+ g_free (priv->directory_server);
+ g_free (priv->gender);
+ g_free (priv->initials);
+ g_free (priv->maiden_name);
+ g_free (priv->mileage);
+ g_free (priv->occupation);
+ g_free (priv->priority);
+ g_free (priv->sensitivity);
+ g_free (priv->short_name);
+ g_free (priv->subject);
+
+ g_list_free_full (priv->hobbies, g_free);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_contacts_contact_parent_class)->finalize (object);
+}
+
+static void
+gdata_contacts_contact_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataContactsContactPrivate *priv = GDATA_CONTACTS_CONTACT (object)->priv;
+
+ switch (property_id) {
+ case PROP_EDITED:
+ g_value_set_int64 (value, priv->edited);
+ break;
+ case PROP_DELETED:
+ g_value_set_boolean (value, priv->deleted);
+ break;
+ case PROP_PHOTO_ETAG:
+ g_value_set_string (value, priv->photo_etag);
+ break;
+ case PROP_NAME:
+ g_value_set_object (value, priv->name);
+ break;
+ case PROP_NICKNAME:
+ g_value_set_string (value, priv->nickname);
+ break;
+ case PROP_FILE_AS:
+ g_value_set_string (value, priv->file_as);
+ break;
+ case PROP_BIRTHDAY:
+ g_value_set_boxed (value, &(priv->birthday));
+ break;
+ case PROP_BIRTHDAY_HAS_YEAR:
+ g_value_set_boolean (value, priv->birthday_has_year);
+ break;
+ case PROP_BILLING_INFORMATION:
+ g_value_set_string (value, priv->billing_information);
+ break;
+ case PROP_DIRECTORY_SERVER:
+ g_value_set_string (value, priv->directory_server);
+ break;
+ case PROP_GENDER:
+ g_value_set_string (value, priv->gender);
+ break;
+ case PROP_INITIALS:
+ g_value_set_string (value, priv->initials);
+ break;
+ case PROP_MAIDEN_NAME:
+ g_value_set_string (value, priv->maiden_name);
+ break;
+ case PROP_MILEAGE:
+ g_value_set_string (value, priv->mileage);
+ break;
+ case PROP_OCCUPATION:
+ g_value_set_string (value, priv->occupation);
+ break;
+ case PROP_PRIORITY:
+ g_value_set_string (value, priv->priority);
+ break;
+ case PROP_SENSITIVITY:
+ g_value_set_string (value, priv->sensitivity);
+ break;
+ case PROP_SHORT_NAME:
+ g_value_set_string (value, priv->short_name);
+ break;
+ case PROP_SUBJECT:
+ g_value_set_string (value, priv->subject);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_contacts_contact_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataContactsContact *self = GDATA_CONTACTS_CONTACT (object);
+
+ switch (property_id) {
+ case PROP_NAME:
+ gdata_contacts_contact_set_name (self, g_value_get_object (value));
+ break;
+ case PROP_NICKNAME:
+ gdata_contacts_contact_set_nickname (self, g_value_get_string (value));
+ break;
+ case PROP_FILE_AS:
+ gdata_contacts_contact_set_file_as (self, g_value_get_string (value));
+ break;
+ case PROP_BIRTHDAY:
+ gdata_contacts_contact_set_birthday (self, g_value_get_boxed (value), self->priv->birthday_has_year);
+ break;
+ case PROP_BIRTHDAY_HAS_YEAR:
+ gdata_contacts_contact_set_birthday (self, &(self->priv->birthday), g_value_get_boolean (value));
+ break;
+ case PROP_BILLING_INFORMATION:
+ gdata_contacts_contact_set_billing_information (self, g_value_get_string (value));
+ break;
+ case PROP_DIRECTORY_SERVER:
+ gdata_contacts_contact_set_directory_server (self, g_value_get_string (value));
+ break;
+ case PROP_GENDER:
+ gdata_contacts_contact_set_gender (self, g_value_get_string (value));
+ break;
+ case PROP_INITIALS:
+ gdata_contacts_contact_set_initials (self, g_value_get_string (value));
+ break;
+ case PROP_MAIDEN_NAME:
+ gdata_contacts_contact_set_maiden_name (self, g_value_get_string (value));
+ break;
+ case PROP_MILEAGE:
+ gdata_contacts_contact_set_mileage (self, g_value_get_string (value));
+ break;
+ case PROP_OCCUPATION:
+ gdata_contacts_contact_set_occupation (self, g_value_get_string (value));
+ break;
+ case PROP_PRIORITY:
+ gdata_contacts_contact_set_priority (self, g_value_get_string (value));
+ break;
+ case PROP_SENSITIVITY:
+ gdata_contacts_contact_set_sensitivity (self, g_value_get_string (value));
+ break;
+ case PROP_SHORT_NAME:
+ gdata_contacts_contact_set_short_name (self, g_value_get_string (value));
+ break;
+ case PROP_SUBJECT:
+ gdata_contacts_contact_set_subject (self, g_value_get_string (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ gboolean success;
+ GDataContactsContact *self = GDATA_CONTACTS_CONTACT (parsable);
+
+ if (gdata_parser_is_namespace (node, "http://www.w3.org/2007/app") == TRUE &&
+ gdata_parser_int64_time_from_element (node, "edited", P_REQUIRED | P_NO_DUPES, &(self->priv->edited), &success, error) == TRUE) {
+ return success;
+ } else if (gdata_parser_is_namespace (node, "http://www.w3.org/2005/Atom") == TRUE && xmlStrcmp (node->name, (xmlChar*) "id") == 0) {
+ /* We have to override <id> parsing to fix the projection. Modify it in-place so that the parser in GDataEntry will pick up
+ * the changes. This fixes bugs caused by referring to contacts by the base projection, rather than the full projection;
+ * such as http://code.google.com/p/gdata-issues/issues/detail?id=2129. */
+ gchar *base;
+ gchar *id = (gchar*) xmlNodeListGetString (doc, node->children, TRUE);
+
+ if (id != NULL) {
+ base = strstr (id, "/base/");
+ if (base != NULL) {
+ memcpy (base, "/full/", 6);
+ xmlNodeSetContent (node, (xmlChar*) id);
+ }
+ }
+
+ xmlFree (id);
+
+ return GDATA_PARSABLE_CLASS (gdata_contacts_contact_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ } else if (gdata_parser_is_namespace (node, "http://schemas.google.com/g/2005") == TRUE) {
+ if (gdata_parser_object_from_element_setter (node, "im", P_REQUIRED, GDATA_TYPE_GD_IM_ADDRESS,
+ gdata_contacts_contact_add_im_address, self, &success, error) == TRUE ||
+ gdata_parser_object_from_element_setter (node, "phoneNumber", P_REQUIRED, GDATA_TYPE_GD_PHONE_NUMBER,
+ gdata_contacts_contact_add_phone_number, self, &success, error) == TRUE ||
+ gdata_parser_object_from_element_setter (node, "structuredPostalAddress", P_REQUIRED, GDATA_TYPE_GD_POSTAL_ADDRESS,
+ gdata_contacts_contact_add_postal_address, self, &success, error) == TRUE ||
+ gdata_parser_object_from_element_setter (node, "organization", P_REQUIRED, GDATA_TYPE_GD_ORGANIZATION,
+ gdata_contacts_contact_add_organization, self, &success, error) == TRUE ||
+ gdata_parser_object_from_element (node, "name", P_REQUIRED, GDATA_TYPE_GD_NAME, &(self->priv->name), &success, error) == TRUE) {
+ return success;
+ } else if (xmlStrcmp (node->name, (xmlChar*) "email") == 0) {
+ /* gd:email */
+ GDataParsable *_parsable;
+ xmlChar *address;
+
+ /* Check its address attribute is non-empty. Empty address attributes are apparently allowed, and make the
+ * gd:email element a no-op. See: https://bugzilla.gnome.org/show_bug.cgi?id=734863 */
+ address = xmlGetProp (node, (xmlChar *) "address");
+ if (address == NULL) {
+ return gdata_parser_error_required_property_missing (node, "address", error);
+ } else if (*address == '\0') {
+ xmlFree (address);
+ success = TRUE;
+ return TRUE;
+ }
+
+ xmlFree (address);
+
+ /* Parse the e-mail address. */
+ _parsable = _gdata_parsable_new_from_xml_node (GDATA_TYPE_GD_EMAIL_ADDRESS, node->doc, node, NULL, error);
+ if (_parsable == NULL) {
+ /* The error has already been set by _gdata_parsable_new_from_xml_node() */
+ success = FALSE;
+ return TRUE;
+ }
+
+ /* Success! */
+ gdata_contacts_contact_add_email_address (self, GDATA_GD_EMAIL_ADDRESS (_parsable));
+ g_object_unref (_parsable);
+ success = TRUE;
+
+ return TRUE;
+ } else if (xmlStrcmp (node->name, (xmlChar*) "extendedProperty") == 0) {
+ /* gd:extendedProperty */
+ xmlChar *name, *value;
+ xmlBuffer *buffer = NULL;
+
+ name = xmlGetProp (node, (xmlChar*) "name");
+ if (name == NULL)
+ return gdata_parser_error_required_property_missing (node, "name", error);
+
+ /* Get either the value property, or the element's content */
+ value = xmlGetProp (node, (xmlChar*) "value");
+ if (value == NULL) {
+ xmlNode *child_node;
+
+ /* Use the element's content instead (arbitrary XML) */
+ buffer = xmlBufferCreate ();
+ for (child_node = node->children; child_node != NULL; child_node = child_node->next)
+ xmlNodeDump (buffer, doc, child_node, 0, 0);
+ value = (xmlChar*) xmlBufferContent (buffer);
+ }
+
+ gdata_contacts_contact_set_extended_property (self, (gchar*) name, (gchar*) value);
+
+ xmlFree (name);
+ if (buffer != NULL)
+ xmlBufferFree (buffer);
+ else
+ xmlFree (value);
+ } else if (xmlStrcmp (node->name, (xmlChar*) "deleted") == 0) {
+ /* gd:deleted */
+ self->priv->deleted = TRUE;
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_contacts_contact_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ }
+ } else if (gdata_parser_is_namespace (node, "http://schemas.google.com/contact/2008") == TRUE) {
+ if (gdata_parser_object_from_element_setter (node, "jot", P_REQUIRED, GDATA_TYPE_GCONTACT_JOT,
+ gdata_contacts_contact_add_jot, self, &success, error) == TRUE ||
+ gdata_parser_object_from_element_setter (node, "relation", P_REQUIRED, GDATA_TYPE_GCONTACT_RELATION,
+ gdata_contacts_contact_add_relation, self, &success, error) == TRUE ||
+ gdata_parser_object_from_element_setter (node, "event", P_REQUIRED, GDATA_TYPE_GCONTACT_EVENT,
+ gdata_contacts_contact_add_event, self, &success, error) == TRUE ||
+ gdata_parser_object_from_element_setter (node, "website", P_IGNORE_ERROR, GDATA_TYPE_GCONTACT_WEBSITE,
+ gdata_contacts_contact_add_website, self, &success, error) == TRUE ||
+ gdata_parser_object_from_element_setter (node, "calendarLink", P_REQUIRED, GDATA_TYPE_GCONTACT_CALENDAR,
+ gdata_contacts_contact_add_calendar, self, &success, error) == TRUE ||
+ gdata_parser_object_from_element_setter (node, "externalId", P_REQUIRED, GDATA_TYPE_GCONTACT_EXTERNAL_ID,
+ gdata_contacts_contact_add_external_id, self, &success, error) == TRUE ||
+ gdata_parser_object_from_element_setter (node, "language", P_REQUIRED, GDATA_TYPE_GCONTACT_LANGUAGE,
+ gdata_contacts_contact_add_language, self, &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "nickname", P_REQUIRED | P_NO_DUPES, &(self->priv->nickname), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "fileAs", P_REQUIRED | P_NO_DUPES, &(self->priv->file_as), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "billingInformation", P_REQUIRED | P_NO_DUPES | P_NON_EMPTY,
+ &(self->priv->billing_information), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "directoryServer", P_REQUIRED | P_NO_DUPES | P_NON_EMPTY,
+ &(self->priv->directory_server), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "initials", P_REQUIRED | P_NO_DUPES, &(self->priv->initials), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "maidenName", P_REQUIRED | P_NO_DUPES,
+ &(self->priv->maiden_name), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "mileage", P_REQUIRED | P_NO_DUPES, &(self->priv->mileage), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "occupation", P_REQUIRED | P_NO_DUPES,
+ &(self->priv->occupation), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "shortName", P_REQUIRED | P_NO_DUPES,
+ &(self->priv->short_name), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "subject", P_REQUIRED | P_NO_DUPES, &(self->priv->subject), &success, error) == TRUE) {
+ return success;
+ } else if (xmlStrcmp (node->name, (xmlChar*) "gender") == 0) {
+ /* gContact:gender */
+ xmlChar *value;
+
+ if (self->priv->gender != NULL)
+ return gdata_parser_error_duplicate_element (node, error);
+
+ value = xmlGetProp (node, (xmlChar*) "value");
+ if (value == NULL || *value == '\0') {
+ xmlFree (value);
+ return gdata_parser_error_required_content_missing (node, error);
+ }
+
+ self->priv->gender = (gchar*) value;
+ } else if (xmlStrcmp (node->name, (xmlChar*) "hobby") == 0) {
+ /* gContact:hobby */
+ xmlChar *hobby;
+
+ hobby = xmlNodeListGetString (doc, node->children, TRUE);
+ if (hobby == NULL || *hobby == '\0') {
+ xmlFree (hobby);
+ return gdata_parser_error_required_content_missing (node, error);
+ }
+
+ gdata_contacts_contact_add_hobby (self, (gchar*) hobby);
+ xmlFree (hobby);
+ } else if (xmlStrcmp (node->name, (xmlChar*) "userDefinedField") == 0) {
+ /* gContact:userDefinedField */
+ xmlChar *name, *value;
+
+ /* Note that while we require the property to be present, we don't require it to be non-empty. See bgo#648058 */
+ name = xmlGetProp (node, (xmlChar*) "key");
+ if (name == NULL) {
+ return gdata_parser_error_required_property_missing (node, "key", error);
+ }
+
+ /* Get either the value property, or the element's content */
+ value = xmlGetProp (node, (xmlChar*) "value");
+ if (value == NULL) {
+ xmlFree (name);
+ return gdata_parser_error_required_property_missing (node, "value", error);
+ }
+
+ gdata_contacts_contact_set_user_defined_field (self, (gchar*) name, (gchar*) value);
+
+ xmlFree (name);
+ xmlFree (value);
+ } else if (xmlStrcmp (node->name, (xmlChar*) "priority") == 0) {
+ /* gContact:priority */
+ xmlChar *rel;
+
+ if (self->priv->priority != NULL)
+ return gdata_parser_error_duplicate_element (node, error);
+
+ rel = xmlGetProp (node, (xmlChar*) "rel");
+ if (rel == NULL || *rel == '\0') {
+ xmlFree (rel);
+ return gdata_parser_error_required_content_missing (node, error);
+ }
+
+ self->priv->priority = (gchar*) rel;
+ } else if (xmlStrcmp (node->name, (xmlChar*) "sensitivity") == 0) {
+ /* gContact:sensitivity */
+ xmlChar *rel;
+
+ if (self->priv->sensitivity != NULL)
+ return gdata_parser_error_duplicate_element (node, error);
+
+ rel = xmlGetProp (node, (xmlChar*) "rel");
+ if (rel == NULL || *rel == '\0') {
+ xmlFree (rel);
+ return gdata_parser_error_required_content_missing (node, error);
+ }
+
+ self->priv->sensitivity = (gchar*) rel;
+ } else if (xmlStrcmp (node->name, (xmlChar*) "groupMembershipInfo") == 0) {
+ /* gContact:groupMembershipInfo */
+ xmlChar *href;
+ gboolean deleted_bool;
+
+ href = xmlGetProp (node, (xmlChar*) "href");
+ if (href == NULL)
+ return gdata_parser_error_required_property_missing (node, "href", error);
+
+ /* Has it been deleted? */
+ if (gdata_parser_boolean_from_property (node, "deleted", &deleted_bool, 0, error) == FALSE) {
+ xmlFree (href);
+ return FALSE;
+ }
+
+ /* Insert it into the hash table */
+ g_hash_table_insert (self->priv->groups, (gchar*) href, GUINT_TO_POINTER (deleted_bool));
+ } else if (xmlStrcmp (node->name, (xmlChar*) "birthday") == 0) {
+ /* gContact:birthday */
+ xmlChar *birthday;
+ guint length = 0, year = 666, month, day;
+
+ if (g_date_valid (&(self->priv->birthday)) == TRUE)
+ return gdata_parser_error_duplicate_element (node, error);
+
+ birthday = xmlGetProp (node, (xmlChar*) "when");
+ if (birthday == NULL)
+ return gdata_parser_error_required_property_missing (node, "when", error);
+ length = strlen ((char*) birthday);
+
+ /* Try parsing the two possible formats: YYYY-MM-DD and --MM-DD */
+ if (((length == 10 && sscanf ((char*) birthday, "%4u-%2u-%2u", &year, &month, &day) == 3) ||
+ (length == 7 && sscanf ((char*) birthday, "--%2u-%2u", &month, &day) == 2)) &&
+ g_date_valid_dmy (day, month, year) == TRUE) {
+ /* Store the values in the GDate */
+ g_date_set_dmy (&(self->priv->birthday), day, month, year);
+ self->priv->birthday_has_year = (length == 10) ? TRUE : FALSE;
+ xmlFree (birthday);
+ } else {
+ /* Parsing failed */
+ gdata_parser_error_not_iso8601_format (node, (gchar*) birthday, error);
+ xmlFree (birthday);
+ return FALSE;
+ }
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_contacts_contact_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ }
+ } else {
+ /* If we haven't yet found a photo, check to see if it's a photo <link> element */
+ if (self->priv->photo_etag == NULL && xmlStrcmp (node->name, (xmlChar*) "link") == 0) {
+ xmlChar *rel = xmlGetProp (node, (xmlChar*) "rel");
+ if (xmlStrcmp (rel, (xmlChar*) "http://schemas.google.com/contacts/2008/rel#photo") == 0) {
+ /* It's the photo link (http://code.google.com/apis/contacts/docs/2.0/reference.html#Photos), whose ETag we should
+ * note down, then pass onto the parent class to parse properly */
+ self->priv->photo_etag = (gchar*) xmlGetProp (node, (xmlChar*) "etag");
+ }
+ xmlFree (rel);
+ }
+
+ return GDATA_PARSABLE_CLASS (gdata_contacts_contact_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ }
+
+ return TRUE;
+}
+
+static void
+get_child_xml (GList *list, GString *xml_string)
+{
+ GList *i;
+
+ for (i = list; i != NULL; i = i->next)
+ _gdata_parsable_get_xml (GDATA_PARSABLE (i->data), xml_string, FALSE);
+}
+
+static void
+get_extended_property_xml_cb (const gchar *name, const gchar *value, GString *xml_string)
+{
+ /* Note that the value *isn't* escaped (see http://code.google.com/apis/gdata/docs/2.0/elements.html#gdExtendedProperty) */
+ gdata_parser_string_append_escaped (xml_string, "<gd:extendedProperty name='", name, "'>");
+ g_string_append_printf (xml_string, "%s</gd:extendedProperty>", value);
+}
+
+static void
+get_user_defined_field_xml_cb (const gchar *name, const gchar *value, GString *xml_string)
+{
+ gdata_parser_string_append_escaped (xml_string, "<gContact:userDefinedField key='", name, "' ");
+ gdata_parser_string_append_escaped (xml_string, "value='", value, "'/>");
+}
+
+static void
+get_group_xml_cb (const gchar *href, gpointer deleted, GString *xml_string)
+{
+ gchar *full_pos, *uri = g_strdup (href);
+
+ /* The service API sometimes stubbornly insists on using the "full" view instead of the "base" view, which we have
+ * to fix, or it complains about an invalid group ID. */
+ full_pos = strstr (uri, "/full/");
+ if (full_pos != NULL)
+ memcpy ((char*) full_pos, "/base/", 6);
+
+ gdata_parser_string_append_escaped (xml_string, "<gContact:groupMembershipInfo href='", uri, "'/>");
+
+ g_free (uri);
+}
+
+static void
+get_hobby_xml_cb (const gchar *hobby, GString *xml_string)
+{
+ gdata_parser_string_append_escaped (xml_string, "<gContact:hobby>", hobby, "</gContact:hobby>");
+}
+
+static void
+get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataContactsContactPrivate *priv = GDATA_CONTACTS_CONTACT (parsable)->priv;
+
+ /* Chain up to the parent class */
+ GDATA_PARSABLE_CLASS (gdata_contacts_contact_parent_class)->get_xml (parsable, xml_string);
+
+ /* Name */
+ _gdata_parsable_get_xml (GDATA_PARSABLE (priv->name), xml_string, FALSE);
+
+ /* Lists of stuff */
+ get_child_xml (priv->email_addresses, xml_string);
+ get_child_xml (priv->im_addresses, xml_string);
+ get_child_xml (priv->phone_numbers, xml_string);
+ get_child_xml (priv->postal_addresses, xml_string);
+ get_child_xml (priv->organizations, xml_string);
+ get_child_xml (priv->jots, xml_string);
+ get_child_xml (priv->relations, xml_string);
+ get_child_xml (priv->websites, xml_string);
+ get_child_xml (priv->events, xml_string);
+ get_child_xml (priv->calendars, xml_string);
+ get_child_xml (priv->external_ids, xml_string);
+ get_child_xml (priv->languages, xml_string);
+
+ /* Extended properties */
+ g_hash_table_foreach (priv->extended_properties, (GHFunc) get_extended_property_xml_cb, xml_string);
+
+ /* User defined fields */
+ g_hash_table_foreach (priv->user_defined_fields, (GHFunc) get_user_defined_field_xml_cb, xml_string);
+
+ /* Group membership info */
+ g_hash_table_foreach (priv->groups, (GHFunc) get_group_xml_cb, xml_string);
+
+ /* Hobbies */
+ g_list_foreach (priv->hobbies, (GFunc) get_hobby_xml_cb, xml_string);
+
+ /* gContact:nickname */
+ if (priv->nickname != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<gContact:nickname>", priv->nickname, "</gContact:nickname>");
+
+ /* gContact:fileAs */
+ if (priv->file_as != NULL) {
+ gdata_parser_string_append_escaped (xml_string, "<gContact:fileAs>", priv->file_as, "</gContact:fileAs>");
+ }
+
+ /* gContact:birthday */
+ if (g_date_valid (&(priv->birthday)) == TRUE) {
+ if (priv->birthday_has_year == TRUE) {
+ g_string_append_printf (xml_string, "<gContact:birthday when='%04u-%02u-%02u'/>",
+ g_date_get_year (&(priv->birthday)),
+ g_date_get_month (&(priv->birthday)),
+ g_date_get_day (&(priv->birthday)));
+ } else {
+ g_string_append_printf (xml_string, "<gContact:birthday when='--%02u-%02u'/>",
+ g_date_get_month (&(priv->birthday)),
+ g_date_get_day (&(priv->birthday)));
+ }
+ }
+
+ /* gContact:billingInformation */
+ if (priv->billing_information != NULL) {
+ gdata_parser_string_append_escaped (xml_string,
+ "<gContact:billingInformation>", priv->billing_information, "</gContact:billingInformation>");
+ }
+
+ /* gContact:directoryServer */
+ if (priv->directory_server != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<gContact:directoryServer>", priv->directory_server, "</gContact:directoryServer>");
+
+ /* gContact:gender */
+ if (priv->gender != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<gContact:gender value='", priv->gender, "'/>");
+
+ /* gContact:initials */
+ if (priv->initials != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<gContact:initials>", priv->initials, "</gContact:initials>");
+
+ /* gContact:maidenName */
+ if (priv->maiden_name != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<gContact:maidenName>", priv->maiden_name, "</gContact:maidenName>");
+
+ /* gContact:mileage */
+ if (priv->mileage != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<gContact:mileage>", priv->mileage, "</gContact:mileage>");
+
+ /* gContact:occupation */
+ if (priv->occupation != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<gContact:occupation>", priv->occupation, "</gContact:occupation>");
+
+ /* gContact:priority */
+ if (priv->priority != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<gContact:priority rel='", priv->priority, "'/>");
+
+ /* gContact:sensitivity */
+ if (priv->sensitivity != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<gContact:sensitivity rel='", priv->sensitivity, "'/>");
+
+ /* gContact:shortName */
+ if (priv->short_name != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<gContact:shortName>", priv->short_name, "</gContact:shortName>");
+
+ /* gContact:subject */
+ if (priv->subject != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<gContact:subject>", priv->subject, "</gContact:subject>");
+
+ /* TODO:
+ * - Finish supporting all tags
+ */
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ /* Chain up to the parent class */
+ GDATA_PARSABLE_CLASS (gdata_contacts_contact_parent_class)->get_namespaces (parsable, namespaces);
+
+ g_hash_table_insert (namespaces, (gchar*) "gd", (gchar*) "http://schemas.google.com/g/2005");
+ g_hash_table_insert (namespaces, (gchar*) "gContact", (gchar*) "http://schemas.google.com/contact/2008");
+ g_hash_table_insert (namespaces, (gchar*) "app", (gchar*) "http://www.w3.org/2007/app");
+}
+
+static gchar *
+get_entry_uri (const gchar *id)
+{
+ const gchar *base_pos;
+ gchar *uri;
+
+ /* Ensure it uses the HTTPS protocol */
+ if (g_str_has_prefix (id, "http://") == TRUE) {
+ guint id_length = strlen (id);
+
+ uri = g_malloc (id_length + 2);
+ strcpy (uri, "https://");
+ strcpy (uri + strlen ("https://"), id + strlen ("http://"));
+ } else {
+ uri = g_strdup (id);
+ }
+
+ /* The service API sometimes stubbornly insists on using the "base" view instead of the "full" view, which we have
+ * to fix, or our extended attributes are never visible */
+ base_pos = strstr (uri, "/base/");
+ if (base_pos != NULL)
+ memcpy ((char*) base_pos, "/full/", 6);
+
+ return uri;
+}
+
+/**
+ * gdata_contacts_contact_new:
+ * @id: (allow-none): the contact's ID, or %NULL
+ *
+ * Creates a new #GDataContactsContact with the given ID and default properties.
+ *
+ * Return value: a new #GDataContactsContact; unref with g_object_unref()
+ *
+ * Since: 0.2.0
+ */
+GDataContactsContact *
+gdata_contacts_contact_new (const gchar *id)
+{
+ return GDATA_CONTACTS_CONTACT (g_object_new (GDATA_TYPE_CONTACTS_CONTACT, "id", id, NULL));
+}
+
+/**
+ * gdata_contacts_contact_get_edited:
+ * @self: a #GDataContactsContact
+ *
+ * Gets the #GDataContactsContact:edited property. If the property is unset, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the UNIX timestamp for the time the contact was last edited, or <code class="literal">-1</code>
+ *
+ * Since: 0.2.0
+ */
+gint64
+gdata_contacts_contact_get_edited (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), -1);
+ return self->priv->edited;
+}
+
+/**
+ * gdata_contacts_contact_get_name:
+ * @self: a #GDataContactsContact
+ *
+ * Gets the #GDataContactsContact:name property.
+ *
+ * Return value: (transfer none): the contact's name, or %NULL
+ *
+ * Since: 0.5.0
+ */
+GDataGDName *
+gdata_contacts_contact_get_name (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->name;
+}
+
+/**
+ * gdata_contacts_contact_set_name:
+ * @self: a #GDataContactsContact
+ * @name: the new #GDataGDName
+ *
+ * Sets the #GDataContactsContact:name property to @name, and increments its reference count.
+ *
+ * @name must not be %NULL, though all its properties may be %NULL.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_set_name (GDataContactsContact *self, GDataGDName *name)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+ g_return_if_fail (GDATA_IS_GD_NAME (name));
+
+ if (self->priv->name != NULL)
+ g_object_unref (self->priv->name);
+ self->priv->name = g_object_ref (name);
+ g_object_notify (G_OBJECT (self), "name");
+
+ /* Notify the change in #GDataGDName:full-name explicitly, so that our #GDataEntry:title gets updated */
+ notify_full_name_cb (G_OBJECT (name), NULL, self);
+}
+
+/**
+ * gdata_contacts_contact_get_nickname:
+ * @self: a #GDataContactsContact
+ *
+ * Gets the #GDataContactsContact:nickname property.
+ *
+ * Return value: the contact's nickname, or %NULL
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_contacts_contact_get_nickname (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->nickname;
+}
+
+/**
+ * gdata_contacts_contact_set_nickname:
+ * @self: a #GDataContactsContact
+ * @nickname: (allow-none): the new nickname, or %NULL
+ *
+ * Sets the #GDataContactsContact:nickname property to @nickname.
+ *
+ * If @nickname is %NULL, the contact's nickname will be removed.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_set_nickname (GDataContactsContact *self, const gchar *nickname)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+
+ g_free (self->priv->nickname);
+ self->priv->nickname = g_strdup (nickname);
+ g_object_notify (G_OBJECT (self), "nickname");
+}
+
+/**
+ * gdata_contacts_contact_get_file_as:
+ * @self: a #GDataContactsContact
+ *
+ * Gets the #GDataContactsContact:file-as property.
+ *
+ * Return value: the name the contact's filed under, or %NULL
+ *
+ * Since: 0.11.0
+ */
+const gchar *
+gdata_contacts_contact_get_file_as (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->file_as;
+}
+
+/**
+ * gdata_contacts_contact_set_file_as:
+ * @self: a #GDataContactsContact
+ * @file_as: (allow-none): the new name to file the contact under, or %NULL
+ *
+ * Sets the #GDataContactsContact:file-as property to @file_as.
+ *
+ * If @file_as is %NULL, the contact will be filed under their full name.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_set_file_as (GDataContactsContact *self, const gchar *file_as)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+
+ g_free (self->priv->file_as);
+ self->priv->file_as = g_strdup (file_as);
+ g_object_notify (G_OBJECT (self), "file-as");
+}
+
+/**
+ * gdata_contacts_contact_get_birthday:
+ * @self: a #GDataContactsContact
+ * @birthday: (allow-none) (out caller-allocates): return location for the birthday, or %NULL
+ *
+ * Gets the #GDataContactsContact:birthday and #GDataContactsContact:birthday-has-year properties. If @birthday is non-%NULL,
+ * #GDataContactsContact:birthday is returned in it. The function returns the value of #GDataContactsContact:birthday-has-year,
+ * which specifies whether the year in @birthday is meaningful. Contacts may not have the year of their birth set, in which
+ * case, the function would return %FALSE, and the year in @birthday should be ignored.
+ *
+ * Return value: whether the contact's birthday has the year set
+ *
+ * Since: 0.7.0
+ */
+gboolean
+gdata_contacts_contact_get_birthday (GDataContactsContact *self, GDate *birthday)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), FALSE);
+
+ if (birthday != NULL)
+ *birthday = self->priv->birthday;
+ return self->priv->birthday_has_year;
+}
+
+/**
+ * gdata_contacts_contact_set_birthday:
+ * @self: a #GDataContactsContact
+ * @birthday: (allow-none): the new birthday, or %NULL
+ * @birthday_has_year: %TRUE if @birthday's year is relevant, %FALSE otherwise
+ *
+ * Sets the #GDataContactsContact:birthday property to @birthday and the #GDataContactsContact:birthday-has-year property to @birthday_has_year.
+ * See gdata_contacts_contact_get_birthday() for an explanation of the interaction between these two properties.
+ *
+ * If @birthday is %NULL, the contact's birthday will be removed.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_set_birthday (GDataContactsContact *self, GDate *birthday, gboolean birthday_has_year)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+ g_return_if_fail (birthday == NULL || g_date_valid (birthday));
+
+ if (birthday != NULL)
+ self->priv->birthday = *birthday;
+ else
+ g_date_clear (&(self->priv->birthday), 1);
+
+ self->priv->birthday_has_year = birthday_has_year;
+
+ g_object_freeze_notify (G_OBJECT (self));
+ g_object_notify (G_OBJECT (self), "birthday");
+ g_object_notify (G_OBJECT (self), "birthday-has-year");
+ g_object_thaw_notify (G_OBJECT (self));
+}
+
+/**
+ * gdata_contacts_contact_get_billing_information:
+ * @self: a #GDataContactsContact
+ *
+ * Gets the #GDataContactsContact:billing-information property.
+ *
+ * Return value: the contact's billing information, or %NULL
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_contacts_contact_get_billing_information (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->billing_information;
+}
+
+/**
+ * gdata_contacts_contact_set_billing_information:
+ * @self: a #GDataContactsContact
+ * @billing_information: (allow-none): the new billing information for the contact, or %NULL
+ *
+ * Sets the #GDataContactsContact:billing-information property to @billing_information.
+ *
+ * If @billing_information is %NULL, the contact's billing information will be removed.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_set_billing_information (GDataContactsContact *self, const gchar *billing_information)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+ g_return_if_fail (billing_information == NULL || *billing_information != '\0');
+
+ g_free (self->priv->billing_information);
+ self->priv->billing_information = g_strdup (billing_information);
+ g_object_notify (G_OBJECT (self), "billing-information");
+}
+
+/**
+ * gdata_contacts_contact_get_directory_server:
+ * @self: a #GDataContactsContact
+ *
+ * Gets the #GDataContactsContact:directory-server property.
+ *
+ * Return value: the name or address of a directory server associated with the contact, or %NULL
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_contacts_contact_get_directory_server (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->directory_server;
+}
+
+/**
+ * gdata_contacts_contact_set_directory_server:
+ * @self: a #GDataContactsContact
+ * @directory_server: (allow-none): the new name or address of a directory server associated with the contact, or %NULL
+ *
+ * Sets the #GDataContactsContact:directory-server property to @directory_server.
+ *
+ * If @directory_server is %NULL, the contact's directory server will be removed.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_set_directory_server (GDataContactsContact *self, const gchar *directory_server)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+ g_return_if_fail (directory_server == NULL || *directory_server != '\0');
+
+ g_free (self->priv->directory_server);
+ self->priv->directory_server = g_strdup (directory_server);
+ g_object_notify (G_OBJECT (self), "directory-server");
+}
+
+/**
+ * gdata_contacts_contact_get_gender:
+ * @self: a #GDataContactsContact
+ *
+ * Gets the #GDataContactsContact:gender property.
+ *
+ * Return value: the gender of the contact, or %NULL
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_contacts_contact_get_gender (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->gender;
+}
+
+/**
+ * gdata_contacts_contact_set_gender:
+ * @self: a #GDataContactsContact
+ * @gender: (allow-none): the new gender of the contact, or %NULL
+ *
+ * Sets the #GDataContactsContact:gender property to @gender.
+ *
+ * If @gender is %NULL, the contact's gender will be removed.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_set_gender (GDataContactsContact *self, const gchar *gender)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+ g_return_if_fail (gender == NULL || *gender != '\0');
+
+ g_free (self->priv->gender);
+ self->priv->gender = g_strdup (gender);
+ g_object_notify (G_OBJECT (self), "gender");
+}
+
+/**
+ * gdata_contacts_contact_get_initials:
+ * @self: a #GDataContactsContact
+ *
+ * Gets the #GDataContactsContact:initials property.
+ *
+ * Return value: the initials of the contact, or %NULL
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_contacts_contact_get_initials (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->initials;
+}
+
+/**
+ * gdata_contacts_contact_set_initials:
+ * @self: a #GDataContactsContact
+ * @initials: (allow-none): the new initials of the contact, or %NULL
+ *
+ * Sets the #GDataContactsContact:initials property to @initials.
+ *
+ * If @initials is %NULL, the contact's initials will be removed.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_set_initials (GDataContactsContact *self, const gchar *initials)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+
+ g_free (self->priv->initials);
+ self->priv->initials = g_strdup (initials);
+ g_object_notify (G_OBJECT (self), "initials");
+}
+
+/**
+ * gdata_contacts_contact_get_maiden_name:
+ * @self: a #GDataContactsContact
+ *
+ * Gets the #GDataContactsContact:maiden-name property.
+ *
+ * Return value: the maiden name of the contact, or %NULL
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_contacts_contact_get_maiden_name (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->maiden_name;
+}
+
+/**
+ * gdata_contacts_contact_set_maiden_name:
+ * @self: a #GDataContactsContact
+ * @maiden_name: (allow-none): the new maiden name of the contact, or %NULL
+ *
+ * Sets the #GDataContactsContact:maiden-name property to @maiden_name.
+ *
+ * If @maiden_name is %NULL, the contact's maiden name will be removed.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_set_maiden_name (GDataContactsContact *self, const gchar *maiden_name)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+
+ g_free (self->priv->maiden_name);
+ self->priv->maiden_name = g_strdup (maiden_name);
+ g_object_notify (G_OBJECT (self), "maiden-name");
+}
+
+/**
+ * gdata_contacts_contact_get_mileage:
+ * @self: a #GDataContactsContact
+ *
+ * Gets the #GDataContactsContact:mileage property.
+ *
+ * Return value: a mileage associated with the contact, or %NULL
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_contacts_contact_get_mileage (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->mileage;
+}
+
+/**
+ * gdata_contacts_contact_set_mileage:
+ * @self: a #GDataContactsContact
+ * @mileage: (allow-none): the new mileage associated with the contact, or %NULL
+ *
+ * Sets the #GDataContactsContact:mileage property to @mileage.
+ *
+ * If @mileage is %NULL, the contact's mileage will be removed.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_set_mileage (GDataContactsContact *self, const gchar *mileage)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+
+ g_free (self->priv->mileage);
+ self->priv->mileage = g_strdup (mileage);
+ g_object_notify (G_OBJECT (self), "mileage");
+}
+
+/**
+ * gdata_contacts_contact_get_occupation:
+ * @self: a #GDataContactsContact
+ *
+ * Gets the #GDataContactsContact:occupation property.
+ *
+ * Return value: the contact's occupation, or %NULL
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_contacts_contact_get_occupation (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->occupation;
+}
+
+/**
+ * gdata_contacts_contact_set_occupation:
+ * @self: a #GDataContactsContact
+ * @occupation: (allow-none): the contact's new occupation, or %NULL
+ *
+ * Sets the #GDataContactsContact:occupation property to @occupation.
+ *
+ * If @occupation is %NULL, the contact's occupation will be removed.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_set_occupation (GDataContactsContact *self, const gchar *occupation)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+
+ g_free (self->priv->occupation);
+ self->priv->occupation = g_strdup (occupation);
+ g_object_notify (G_OBJECT (self), "occupation");
+}
+
+/**
+ * gdata_contacts_contact_get_priority:
+ * @self: a #GDataContactsContact
+ *
+ * Gets the #GDataContactsContact:priority property.
+ *
+ * Return value: the contact's priority, or %NULL
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_contacts_contact_get_priority (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->priority;
+}
+
+/**
+ * gdata_contacts_contact_set_priority:
+ * @self: a #GDataContactsContact
+ * @priority: (allow-none): the contact's new priority, or %NULL
+ *
+ * Sets the #GDataContactsContact:priority property to @priority.
+ *
+ * If @priority is %NULL, the contact's priority will be removed.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_set_priority (GDataContactsContact *self, const gchar *priority)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+ g_return_if_fail (priority == NULL || *priority != '\0');
+
+ g_free (self->priv->priority);
+ self->priv->priority = g_strdup (priority);
+ g_object_notify (G_OBJECT (self), "priority");
+}
+
+/**
+ * gdata_contacts_contact_get_sensitivity:
+ * @self: a #GDataContactsContact
+ *
+ * Gets the #GDataContactsContact:sensitivity property.
+ *
+ * Return value: the contact's sensitivity, or %NULL
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_contacts_contact_get_sensitivity (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->sensitivity;
+}
+
+/**
+ * gdata_contacts_contact_set_sensitivity:
+ * @self: a #GDataContactsContact
+ * @sensitivity: (allow-none): the contact's new sensitivity, or %NULL
+ *
+ * Sets the #GDataContactsContact:sensitivity property to @sensitivity.
+ *
+ * If @sensitivity is %NULL, the contact's sensitivity will be removed.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_set_sensitivity (GDataContactsContact *self, const gchar *sensitivity)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+ g_return_if_fail (sensitivity == NULL || *sensitivity != '\0');
+
+ g_free (self->priv->sensitivity);
+ self->priv->sensitivity = g_strdup (sensitivity);
+ g_object_notify (G_OBJECT (self), "sensitivity");
+}
+
+/**
+ * gdata_contacts_contact_get_short_name:
+ * @self: a #GDataContactsContact
+ *
+ * Gets the #GDataContactsContact:short-name property.
+ *
+ * Return value: the contact's short name, or %NULL
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_contacts_contact_get_short_name (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->short_name;
+}
+
+/**
+ * gdata_contacts_contact_set_short_name:
+ * @self: a #GDataContactsContact
+ * @short_name: (allow-none): the contact's new short name, or %NULL
+ *
+ * Sets the #GDataContactsContact:short-name property to @short_name.
+ *
+ * If @short_name is %NULL, the contact's short name will be removed.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_set_short_name (GDataContactsContact *self, const gchar *short_name)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+
+ g_free (self->priv->short_name);
+ self->priv->short_name = g_strdup (short_name);
+ g_object_notify (G_OBJECT (self), "short-name");
+}
+
+/**
+ * gdata_contacts_contact_get_subject:
+ * @self: a #GDataContactsContact
+ *
+ * Gets the #GDataContactsContact:subject property.
+ *
+ * Return value: the contact's subject, or %NULL
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_contacts_contact_get_subject (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->subject;
+}
+
+/**
+ * gdata_contacts_contact_set_subject:
+ * @self: a #GDataContactsContact
+ * @subject: (allow-none): the contact's new subject, or %NULL
+ *
+ * Sets the #GDataContactsContact:subject property to @subject.
+ *
+ * If @subject is %NULL, the contact's subject will be removed.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_set_subject (GDataContactsContact *self, const gchar *subject)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+
+ g_free (self->priv->subject);
+ self->priv->subject = g_strdup (subject);
+ g_object_notify (G_OBJECT (self), "subject");
+}
+
+/**
+ * gdata_contacts_contact_add_email_address:
+ * @self: a #GDataContactsContact
+ * @email_address: a #GDataGDEmailAddress to add
+ *
+ * Adds an e-mail address to the contact's list of e-mail addresses and increments its reference count.
+ *
+ * Note that only one e-mail address per contact may be marked as "primary". Insertion and update operations
+ * (with gdata_contacts_service_insert_contact()) will return an error if more than one e-mail address
+ * is marked as primary.
+ *
+ * Duplicate e-mail addresses will not be added to the list.
+ *
+ * Since: 0.2.0
+ */
+void
+gdata_contacts_contact_add_email_address (GDataContactsContact *self, GDataGDEmailAddress *email_address)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+ g_return_if_fail (GDATA_IS_GD_EMAIL_ADDRESS (email_address));
+
+ if (g_list_find_custom (self->priv->email_addresses, email_address, (GCompareFunc) gdata_comparable_compare) == NULL)
+ self->priv->email_addresses = g_list_append (self->priv->email_addresses, g_object_ref (email_address));
+}
+
+/**
+ * gdata_contacts_contact_get_email_addresses:
+ * @self: a #GDataContactsContact
+ *
+ * Gets a list of the e-mail addresses owned by the contact.
+ *
+ * Return value: (element-type GData.GDEmailAddress) (transfer none): a #GList of #GDataGDEmailAddress<!-- -->es, or %NULL
+ *
+ * Since: 0.2.0
+ */
+GList *
+gdata_contacts_contact_get_email_addresses (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->email_addresses;
+}
+
+/**
+ * gdata_contacts_contact_get_primary_email_address:
+ * @self: a #GDataContactsContact
+ *
+ * Gets the contact's primary e-mail address, if one exists.
+ *
+ * Return value: (transfer none): a #GDataGDEmailAddress, or %NULL
+ *
+ * Since: 0.2.0
+ */
+GDataGDEmailAddress *
+gdata_contacts_contact_get_primary_email_address (GDataContactsContact *self)
+{
+ GList *i;
+
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+
+ for (i = self->priv->email_addresses; i != NULL; i = i->next) {
+ if (gdata_gd_email_address_is_primary (GDATA_GD_EMAIL_ADDRESS (i->data)) == TRUE)
+ return GDATA_GD_EMAIL_ADDRESS (i->data);
+ }
+
+ return NULL;
+}
+
+/**
+ * gdata_contacts_contact_remove_all_email_addresses:
+ * @self: a #GDataContactsContact
+ *
+ * Removes all e-mail addresses from the contact.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_contacts_contact_remove_all_email_addresses (GDataContactsContact *self)
+{
+ GDataContactsContactPrivate *priv = self->priv;
+
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+
+ g_list_free_full (priv->email_addresses, g_object_unref);
+ priv->email_addresses = NULL;
+}
+
+/**
+ * gdata_contacts_contact_add_im_address:
+ * @self: a #GDataContactsContact
+ * @im_address: a #GDataGDIMAddress to add
+ *
+ * Adds an IM (instant messaging) address to the contact's list of IM addresses and increments its reference count.
+ *
+ * Note that only one IM address per contact may be marked as "primary". Insertion and update operations
+ * (with gdata_contacts_service_insert_contact()) will return an error if more than one IM address
+ * is marked as primary.
+ *
+ * Duplicate IM addresses will not be added to the list.
+ *
+ * Since: 0.2.0
+ */
+void
+gdata_contacts_contact_add_im_address (GDataContactsContact *self, GDataGDIMAddress *im_address)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+ g_return_if_fail (GDATA_IS_GD_IM_ADDRESS (im_address));
+
+ if (g_list_find_custom (self->priv->im_addresses, im_address, (GCompareFunc) gdata_comparable_compare) == NULL)
+ self->priv->im_addresses = g_list_append (self->priv->im_addresses, g_object_ref (im_address));
+}
+
+/**
+ * gdata_contacts_contact_get_im_addresses:
+ * @self: a #GDataContactsContact
+ *
+ * Gets a list of the IM addresses owned by the contact.
+ *
+ * Return value: (element-type GData.GDIMAddress) (transfer none): a #GList of #GDataGDIMAddress<!-- -->es, or %NULL
+ *
+ * Since: 0.2.0
+ */
+GList *
+gdata_contacts_contact_get_im_addresses (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->im_addresses;
+}
+
+/**
+ * gdata_contacts_contact_get_primary_im_address:
+ * @self: a #GDataContactsContact
+ *
+ * Gets the contact's primary IM address, if one exists.
+ *
+ * Return value: (transfer none): a #GDataGDIMAddress, or %NULL
+ *
+ * Since: 0.2.0
+ */
+GDataGDIMAddress *
+gdata_contacts_contact_get_primary_im_address (GDataContactsContact *self)
+{
+ GList *i;
+
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+
+ for (i = self->priv->im_addresses; i != NULL; i = i->next) {
+ if (gdata_gd_im_address_is_primary (GDATA_GD_IM_ADDRESS (i->data)) == TRUE)
+ return GDATA_GD_IM_ADDRESS (i->data);
+ }
+
+ return NULL;
+}
+
+/**
+ * gdata_contacts_contact_remove_all_im_addresses:
+ * @self: a #GDataContactsContact
+ *
+ * Removes all IM addresses from the contact.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_contacts_contact_remove_all_im_addresses (GDataContactsContact *self)
+{
+ GDataContactsContactPrivate *priv = self->priv;
+
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+
+ g_list_free_full (priv->im_addresses, g_object_unref);
+ priv->im_addresses = NULL;
+}
+
+/**
+ * gdata_contacts_contact_add_phone_number:
+ * @self: a #GDataContactsContact
+ * @phone_number: a #GDataGDPhoneNumber to add
+ *
+ * Adds a phone number to the contact's list of phone numbers and increments its reference count
+ *
+ * Note that only one phone number per contact may be marked as "primary". Insertion and update operations
+ * (with gdata_contacts_service_insert_contact()) will return an error if more than one phone number
+ * is marked as primary.
+ *
+ * Duplicate phone numbers will not be added to the list.
+ *
+ * Since: 0.2.0
+ */
+void
+gdata_contacts_contact_add_phone_number (GDataContactsContact *self, GDataGDPhoneNumber *phone_number)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+ g_return_if_fail (GDATA_IS_GD_PHONE_NUMBER (phone_number));
+
+ if (g_list_find_custom (self->priv->phone_numbers, phone_number, (GCompareFunc) gdata_comparable_compare) == NULL)
+ self->priv->phone_numbers = g_list_append (self->priv->phone_numbers, g_object_ref (phone_number));
+}
+
+/**
+ * gdata_contacts_contact_get_phone_numbers:
+ * @self: a #GDataContactsContact
+ *
+ * Gets a list of the phone numbers owned by the contact.
+ *
+ * Return value: (element-type GData.GDPhoneNumber) (transfer none): a #GList of #GDataGDPhoneNumbers, or %NULL
+ *
+ * Since: 0.2.0
+ */
+GList *
+gdata_contacts_contact_get_phone_numbers (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->phone_numbers;
+}
+
+/**
+ * gdata_contacts_contact_get_primary_phone_number:
+ * @self: a #GDataContactsContact
+ *
+ * Gets the contact's primary phone number, if one exists.
+ *
+ * Return value: (transfer none): a #GDataGDPhoneNumber, or %NULL
+ *
+ * Since: 0.2.0
+ */
+GDataGDPhoneNumber *
+gdata_contacts_contact_get_primary_phone_number (GDataContactsContact *self)
+{
+ GList *i;
+
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+
+ for (i = self->priv->phone_numbers; i != NULL; i = i->next) {
+ if (gdata_gd_phone_number_is_primary (GDATA_GD_PHONE_NUMBER (i->data)) == TRUE)
+ return GDATA_GD_PHONE_NUMBER (i->data);
+ }
+
+ return NULL;
+}
+
+/**
+ * gdata_contacts_contact_remove_all_phone_numbers:
+ * @self: a #GDataContactsContact
+ *
+ * Removes all phone numbers from the contact.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_contacts_contact_remove_all_phone_numbers (GDataContactsContact *self)
+{
+ GDataContactsContactPrivate *priv = self->priv;
+
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+
+ g_list_free_full (priv->phone_numbers, g_object_unref);
+ priv->phone_numbers = NULL;
+}
+
+/**
+ * gdata_contacts_contact_add_postal_address:
+ * @self: a #GDataContactsContact
+ * @postal_address: a #GDataGDPostalAddress to add
+ *
+ * Adds a postal address to the contact's list of postal addresses and increments its reference count.
+ *
+ * Note that only one postal address per contact may be marked as "primary". Insertion and update operations
+ * (with gdata_contacts_service_insert_contact()) will return an error if more than one postal address
+ * is marked as primary.
+ *
+ * Duplicate postal addresses will not be added to the list.
+ *
+ * Since: 0.2.0
+ */
+void
+gdata_contacts_contact_add_postal_address (GDataContactsContact *self, GDataGDPostalAddress *postal_address)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+ g_return_if_fail (GDATA_IS_GD_POSTAL_ADDRESS (postal_address));
+
+ if (g_list_find_custom (self->priv->postal_addresses, postal_address, (GCompareFunc) gdata_comparable_compare) == NULL)
+ self->priv->postal_addresses = g_list_append (self->priv->postal_addresses, g_object_ref (postal_address));
+}
+
+/**
+ * gdata_contacts_contact_get_postal_addresses:
+ * @self: a #GDataContactsContact
+ *
+ * Gets a list of the postal addresses owned by the contact.
+ *
+ * Return value: (element-type GData.GDPostalAddress) (transfer none): a #GList of #GDataGDPostalAddress<!-- -->es, or %NULL
+ *
+ * Since: 0.2.0
+ */
+GList *
+gdata_contacts_contact_get_postal_addresses (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->postal_addresses;
+}
+
+/**
+ * gdata_contacts_contact_get_primary_postal_address:
+ * @self: a #GDataContactsContact
+ *
+ * Gets the contact's primary postal address, if one exists.
+ *
+ * Return value: (transfer none): a #GDataGDPostalAddress, or %NULL
+ *
+ * Since: 0.2.0
+ */
+GDataGDPostalAddress *
+gdata_contacts_contact_get_primary_postal_address (GDataContactsContact *self)
+{
+ GList *i;
+
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+
+ for (i = self->priv->postal_addresses; i != NULL; i = i->next) {
+ if (gdata_gd_postal_address_is_primary (GDATA_GD_POSTAL_ADDRESS (i->data)) == TRUE)
+ return GDATA_GD_POSTAL_ADDRESS (i->data);
+ }
+
+ return NULL;
+}
+
+/**
+ * gdata_contacts_contact_remove_all_postal_addresses:
+ * @self: a #GDataContactsContact
+ *
+ * Removes all postal addresses from the contact.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_contacts_contact_remove_all_postal_addresses (GDataContactsContact *self)
+{
+ GDataContactsContactPrivate *priv = self->priv;
+
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+
+ g_list_free_full (priv->postal_addresses, g_object_unref);
+ priv->postal_addresses = NULL;
+}
+
+/**
+ * gdata_contacts_contact_add_organization:
+ * @self: a #GDataContactsContact
+ * @organization: a #GDataGDOrganization to add
+ *
+ * Adds an organization to the contact's list of organizations (e.g. employers) and increments its reference count.
+ *
+ * Note that only one organization per contact may be marked as "primary". Insertion and update operations
+ * (with gdata_contacts_service_insert_contact()) will return an error if more than one organization
+ * is marked as primary.
+ *
+ * Duplicate organizations will not be added to the list.
+ *
+ * Since: 0.2.0
+ */
+void
+gdata_contacts_contact_add_organization (GDataContactsContact *self, GDataGDOrganization *organization)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+ g_return_if_fail (organization != NULL);
+
+ if (g_list_find_custom (self->priv->organizations, organization, (GCompareFunc) gdata_comparable_compare) == NULL)
+ self->priv->organizations = g_list_append (self->priv->organizations, g_object_ref (organization));
+}
+
+/**
+ * gdata_contacts_contact_get_organizations:
+ * @self: a #GDataContactsContact
+ *
+ * Gets a list of the organizations to which the contact belongs.
+ *
+ * Return value: (element-type GData.GDOrganization) (transfer none): a #GList of #GDataGDOrganizations, or %NULL
+ *
+ * Since: 0.2.0
+ */
+GList *
+gdata_contacts_contact_get_organizations (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->organizations;
+}
+
+/**
+ * gdata_contacts_contact_get_primary_organization:
+ * @self: a #GDataContactsContact
+ *
+ * Gets the contact's primary organization, if one exists.
+ *
+ * Return value: (transfer none): a #GDataGDOrganization, or %NULL
+ *
+ * Since: 0.2.0
+ */
+GDataGDOrganization *
+gdata_contacts_contact_get_primary_organization (GDataContactsContact *self)
+{
+ GList *i;
+
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+
+ for (i = self->priv->organizations; i != NULL; i = i->next) {
+ if (gdata_gd_organization_is_primary (GDATA_GD_ORGANIZATION (i->data)) == TRUE)
+ return GDATA_GD_ORGANIZATION (i->data);
+ }
+
+ return NULL;
+}
+
+/**
+ * gdata_contacts_contact_remove_all_organizations:
+ * @self: a #GDataContactsContact
+ *
+ * Removes all organizations from the contact.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_contacts_contact_remove_all_organizations (GDataContactsContact *self)
+{
+ GDataContactsContactPrivate *priv = self->priv;
+
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+
+ g_list_free_full (priv->organizations, g_object_unref);
+ priv->organizations = NULL;
+}
+
+/**
+ * gdata_contacts_contact_add_jot:
+ * @self: a #GDataContactsContact
+ * @jot: a #GDataGContactJot to add
+ *
+ * Adds a jot to the contact's list of jots and increments its reference count.
+ *
+ * Duplicate jots will be added to the list, and multiple jots with the same relation type can be added to a single contact.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_add_jot (GDataContactsContact *self, GDataGContactJot *jot)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+ g_return_if_fail (GDATA_IS_GCONTACT_JOT (jot));
+
+ self->priv->jots = g_list_append (self->priv->jots, g_object_ref (jot));
+}
+
+/**
+ * gdata_contacts_contact_get_jots:
+ * @self: a #GDataContactsContact
+ *
+ * Gets a list of the jots attached to the contact.
+ *
+ * Return value: (element-type GData.GContactJot) (transfer none): a #GList of #GDataGContactJots, or %NULL
+ *
+ * Since: 0.7.0
+ */
+GList *
+gdata_contacts_contact_get_jots (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->jots;
+}
+
+/**
+ * gdata_contacts_contact_remove_all_jots:
+ * @self: a #GDataContactsContact
+ *
+ * Removes all jots from the contact.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_remove_all_jots (GDataContactsContact *self)
+{
+ GDataContactsContactPrivate *priv = self->priv;
+
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+
+ g_list_free_full (priv->jots, g_object_unref);
+ priv->jots = NULL;
+}
+
+/**
+ * gdata_contacts_contact_add_relation:
+ * @self: a #GDataContactsContact
+ * @relation: a #GDataGContactRelation to add
+ *
+ * Adds a relation to the contact's list of relations and increments its reference count.
+ *
+ * Duplicate relations will be added to the list, and multiple relations with the same relation type can be added to a single contact.
+ * Though it may not make sense for some relation types to be repeated, adding them is allowed.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_add_relation (GDataContactsContact *self, GDataGContactRelation *relation)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+ g_return_if_fail (GDATA_IS_GCONTACT_RELATION (relation));
+
+ self->priv->relations = g_list_append (self->priv->relations, g_object_ref (relation));
+}
+
+/**
+ * gdata_contacts_contact_get_relations:
+ * @self: a #GDataContactsContact
+ *
+ * Gets a list of the relations of the contact.
+ *
+ * Return value: (element-type GData.GContactRelation) (transfer none): a #GList of #GDataGContactRelations, or %NULL
+ *
+ * Since: 0.7.0
+ */
+GList *
+gdata_contacts_contact_get_relations (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->relations;
+}
+
+/**
+ * gdata_contacts_contact_remove_all_relations:
+ * @self: a #GDataContactsContact
+ *
+ * Removes all relations from the contact.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_remove_all_relations (GDataContactsContact *self)
+{
+ GDataContactsContactPrivate *priv = self->priv;
+
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+
+ g_list_free_full (priv->relations, g_object_unref);
+ priv->relations = NULL;
+}
+
+/**
+ * gdata_contacts_contact_add_website:
+ * @self: a #GDataContactsContact
+ * @website: a #GDataGContactWebsite to add
+ *
+ * Adds a website to the contact's list of websites and increments its reference count.
+ *
+ * Duplicate websites will not be added to the list, though the same URI may appear in several #GDataGContactWebsites with different
+ * relation types or labels.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_add_website (GDataContactsContact *self, GDataGContactWebsite *website)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+ g_return_if_fail (GDATA_IS_GCONTACT_WEBSITE (website));
+
+ if (g_list_find_custom (self->priv->websites, website, (GCompareFunc) gdata_comparable_compare) == NULL)
+ self->priv->websites = g_list_append (self->priv->websites, g_object_ref (website));
+}
+
+/**
+ * gdata_contacts_contact_get_websites:
+ * @self: a #GDataContactsContact
+ *
+ * Gets a list of the websites of the contact.
+ *
+ * Return value: (element-type GData.GContactWebsite) (transfer none): a #GList of #GDataGContactWebsites, or %NULL
+ *
+ * Since: 0.7.0
+ */
+GList *
+gdata_contacts_contact_get_websites (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->websites;
+}
+
+/**
+ * gdata_contacts_contact_get_primary_website:
+ * @self: a #GDataContactsContact
+ *
+ * Gets the contact's primary website, if one exists.
+ *
+ * Return value: (transfer none): a #GDataGContactWebsite, or %NULL
+ *
+ * Since: 0.7.0
+ */
+GDataGContactWebsite *
+gdata_contacts_contact_get_primary_website (GDataContactsContact *self)
+{
+ GList *i;
+
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+
+ for (i = self->priv->websites; i != NULL; i = i->next) {
+ if (gdata_gcontact_website_is_primary (GDATA_GCONTACT_WEBSITE (i->data)) == TRUE)
+ return GDATA_GCONTACT_WEBSITE (i->data);
+ }
+
+ return NULL;
+}
+
+/**
+ * gdata_contacts_contact_remove_all_websites:
+ * @self: a #GDataContactsContact
+ *
+ * Removes all websites from the contact.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_remove_all_websites (GDataContactsContact *self)
+{
+ GDataContactsContactPrivate *priv = self->priv;
+
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+
+ g_list_free_full (priv->websites, g_object_unref);
+ priv->websites = NULL;
+}
+
+/**
+ * gdata_contacts_contact_add_event:
+ * @self: a #GDataContactsContact
+ * @event: a #GDataGContactEvent to add
+ *
+ * Adds an event to the contact's list of events and increments its reference count.
+ *
+ * Duplicate events will be added to the list, and multiple events with the same event type can be added to a single contact.
+ * Though it may not make sense for some event types to be repeated, adding them is allowed.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_add_event (GDataContactsContact *self, GDataGContactEvent *event)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+ g_return_if_fail (GDATA_IS_GCONTACT_EVENT (event));
+
+ self->priv->events = g_list_append (self->priv->events, g_object_ref (event));
+}
+
+/**
+ * gdata_contacts_contact_get_events:
+ * @self: a #GDataContactsContact
+ *
+ * Gets a list of the events of the contact.
+ *
+ * Return value: (element-type GData.GContactEvent) (transfer none): a #GList of #GDataGContactEvents, or %NULL
+ *
+ * Since: 0.7.0
+ */
+GList *
+gdata_contacts_contact_get_events (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->events;
+}
+
+/**
+ * gdata_contacts_contact_remove_all_events:
+ * @self: a #GDataContactsContact
+ *
+ * Removes all events from the contact.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_remove_all_events (GDataContactsContact *self)
+{
+ GDataContactsContactPrivate *priv = self->priv;
+
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+
+ g_list_free_full (priv->events, g_object_unref);
+ priv->events = NULL;
+}
+
+/**
+ * gdata_contacts_contact_add_calendar:
+ * @self: a #GDataContactsContact
+ * @calendar: a #GDataGContactCalendar to add
+ *
+ * Adds a calendar to the contact's list of calendars and increments its reference count.
+ *
+ * Duplicate calendars will not be added to the list, though the same URI may appear in several #GDataGContactCalendars with different
+ * relation types or labels.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_add_calendar (GDataContactsContact *self, GDataGContactCalendar *calendar)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+ g_return_if_fail (GDATA_IS_GCONTACT_CALENDAR (calendar));
+
+ if (g_list_find_custom (self->priv->calendars, calendar, (GCompareFunc) gdata_comparable_compare) == NULL)
+ self->priv->calendars = g_list_append (self->priv->calendars, g_object_ref (calendar));
+}
+
+/**
+ * gdata_contacts_contact_get_calendars:
+ * @self: a #GDataContactsContact
+ *
+ * Gets a list of the calendars of the contact.
+ *
+ * Return value: (element-type GData.GContactCalendar) (transfer none): a #GList of #GDataGContactCalendars, or %NULL
+ *
+ * Since: 0.7.0
+ */
+GList *
+gdata_contacts_contact_get_calendars (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->calendars;
+}
+
+/**
+ * gdata_contacts_contact_get_primary_calendar:
+ * @self: a #GDataContactsContact
+ *
+ * Gets the contact's primary calendar, if one exists.
+ *
+ * Return value: (transfer none): a #GDataGContactCalendar, or %NULL
+ *
+ * Since: 0.7.0
+ */
+GDataGContactCalendar *
+gdata_contacts_contact_get_primary_calendar (GDataContactsContact *self)
+{
+ GList *i;
+
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+
+ for (i = self->priv->calendars; i != NULL; i = i->next) {
+ if (gdata_gcontact_calendar_is_primary (GDATA_GCONTACT_CALENDAR (i->data)) == TRUE)
+ return GDATA_GCONTACT_CALENDAR (i->data);
+ }
+
+ return NULL;
+}
+
+/**
+ * gdata_contacts_contact_remove_all_calendars:
+ * @self: a #GDataContactsContact
+ *
+ * Removes all calendars from the contact.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_remove_all_calendars (GDataContactsContact *self)
+{
+ GDataContactsContactPrivate *priv = self->priv;
+
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+
+ g_list_free_full (priv->calendars, g_object_unref);
+ priv->calendars = NULL;
+}
+
+/**
+ * gdata_contacts_contact_add_external_id:
+ * @self: a #GDataContactsContact
+ * @external_id: a #GDataGContactExternalID to add
+ *
+ * Adds an external ID to the contact's list of external IDs and increments its reference count.
+ *
+ * Duplicate IDs will not be added to the list.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_add_external_id (GDataContactsContact *self, GDataGContactExternalID *external_id)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+ g_return_if_fail (GDATA_IS_GCONTACT_EXTERNAL_ID (external_id));
+
+ if (g_list_find_custom (self->priv->external_ids, external_id, (GCompareFunc) gdata_comparable_compare) == NULL)
+ self->priv->external_ids = g_list_append (self->priv->external_ids, g_object_ref (external_id));
+}
+
+/**
+ * gdata_contacts_contact_get_external_ids:
+ * @self: a #GDataContactsContact
+ *
+ * Gets a list of the external IDs of the contact.
+ *
+ * Return value: (element-type GData.GContactExternalID) (transfer none): a #GList of #GDataGContactExternalIDs, or %NULL
+ *
+ * Since: 0.7.0
+ */
+GList *
+gdata_contacts_contact_get_external_ids (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->external_ids;
+}
+
+/**
+ * gdata_contacts_contact_remove_all_external_ids:
+ * @self: a #GDataContactsContact
+ *
+ * Removes all external IDs from the contact.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_remove_all_external_ids (GDataContactsContact *self)
+{
+ GDataContactsContactPrivate *priv = self->priv;
+
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+
+ g_list_free_full (priv->external_ids, g_object_unref);
+ priv->external_ids = NULL;
+}
+
+/**
+ * gdata_contacts_contact_add_hobby:
+ * @self: a #GDataContactsContact
+ * @hobby: a hobby to add
+ *
+ * Adds a hobby to the contact's list of hobbies, copying it in the process.
+ *
+ * Duplicate hobbies will not be added to the list.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_add_hobby (GDataContactsContact *self, const gchar *hobby)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+ g_return_if_fail (hobby != NULL && *hobby != '\0');
+
+ if (g_list_find_custom (self->priv->hobbies, hobby, (GCompareFunc) g_strcmp0) == NULL)
+ self->priv->hobbies = g_list_append (self->priv->hobbies, g_strdup (hobby));
+}
+
+/**
+ * gdata_contacts_contact_get_hobbies:
+ * @self: a #GDataContactsContact
+ *
+ * Gets a list of the hobbies of the contact.
+ *
+ * Return value: (element-type utf8) (transfer none): a #GList of hobby strings, or %NULL
+ *
+ * Since: 0.7.0
+ */
+GList *
+gdata_contacts_contact_get_hobbies (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->hobbies;
+}
+
+/**
+ * gdata_contacts_contact_remove_all_hobbies:
+ * @self: a #GDataContactsContact
+ *
+ * Removes all hobbies from the contact.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_remove_all_hobbies (GDataContactsContact *self)
+{
+ GDataContactsContactPrivate *priv = self->priv;
+
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+
+ g_list_free_full (priv->hobbies, g_free);
+ priv->hobbies = NULL;
+}
+
+/**
+ * gdata_contacts_contact_add_language:
+ * @self: a #GDataContactsContact
+ * @language: a #GDataGContactLanguage to add
+ *
+ * Adds a language to the contact's list of languages and increments its reference count.
+ *
+ * Duplicate languages will not be added to the list.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_add_language (GDataContactsContact *self, GDataGContactLanguage *language)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+ g_return_if_fail (GDATA_IS_GCONTACT_LANGUAGE (language));
+
+ if (g_list_find_custom (self->priv->languages, language, (GCompareFunc) gdata_comparable_compare) == NULL)
+ self->priv->languages = g_list_append (self->priv->languages, g_object_ref (language));
+}
+
+/**
+ * gdata_contacts_contact_get_languages:
+ * @self: a #GDataContactsContact
+ *
+ * Gets a list of the languages of the contact.
+ *
+ * Return value: (element-type GData.GContactLanguage) (transfer none): a #GList of #GDataGContactLanguages, or %NULL
+ *
+ * Since: 0.7.0
+ */
+GList *
+gdata_contacts_contact_get_languages (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->languages;
+}
+
+/**
+ * gdata_contacts_contact_remove_all_languages:
+ * @self: a #GDataContactsContact
+ *
+ * Removes all languages from the contact.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_remove_all_languages (GDataContactsContact *self)
+{
+ GDataContactsContactPrivate *priv = self->priv;
+
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+
+ g_list_free_full (priv->languages, g_object_unref);
+ priv->languages = NULL;
+}
+
+/**
+ * gdata_contacts_contact_get_extended_property:
+ * @self: a #GDataContactsContact
+ * @name: the property name; an arbitrary, unique string
+ *
+ * Gets the value of an extended property of the contact. Each contact can have up to 10 client-set extended
+ * properties to store data of the client's choosing.
+ *
+ * Return value: the property's value, or %NULL
+ *
+ * Since: 0.2.0
+ */
+const gchar *
+gdata_contacts_contact_get_extended_property (GDataContactsContact *self, const gchar *name)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ g_return_val_if_fail (name != NULL && *name != '\0', NULL);
+ return g_hash_table_lookup (self->priv->extended_properties, name);
+}
+
+/**
+ * gdata_contacts_contact_get_extended_properties:
+ * @self: a #GDataContactsContact
+ *
+ * Gets the full list of extended properties of the contact; a hash table mapping property name to value.
+ *
+ * Return value: (transfer none): a #GHashTable of extended properties
+ *
+ * Since: 0.4.0
+ */
+GHashTable *
+gdata_contacts_contact_get_extended_properties (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->extended_properties;
+}
+
+/**
+ * gdata_contacts_contact_set_extended_property:
+ * @self: a #GDataContactsContact
+ * @name: the property name; an arbitrary, unique string
+ * @value: (allow-none): the property value, or %NULL
+ *
+ * Sets the value of a contact's extended property. Extended property names are unique (but of the client's choosing),
+ * and reusing the same property name will result in the old value of that property being overwritten.
+ *
+ * To unset a property, set @value to %NULL or an empty string.
+ *
+ * A contact may have up to 10 extended properties, and each should be reasonably small (i.e. not a photo or ringtone).
+ * For more information, see the <ulink type="http"
+ * url="http://code.google.com/apis/contacts/docs/2.0/reference.html#ProjectionsAndExtended">online documentation</ulink>.
+ * %FALSE will be returned if you attempt to add more than 10 extended properties.
+ *
+ * Return value: %TRUE if the property was updated or deleted successfully, %FALSE otherwise
+ *
+ * Since: 0.2.0
+ */
+gboolean
+gdata_contacts_contact_set_extended_property (GDataContactsContact *self, const gchar *name, const gchar *value)
+{
+ GHashTable *extended_properties = self->priv->extended_properties;
+
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), FALSE);
+ g_return_val_if_fail (name != NULL && *name != '\0', FALSE);
+
+ if (value == NULL || *value == '\0') {
+ /* Removing a property */
+ g_hash_table_remove (extended_properties, name);
+ return TRUE;
+ }
+
+ /* We can't add more than MAX_N_EXTENDED_PROPERTIES */
+ if (g_hash_table_lookup (extended_properties, name) == NULL &&
+ g_hash_table_size (extended_properties) >= MAX_N_EXTENDED_PROPERTIES)
+ return FALSE;
+
+ /* Updating an existing property or adding a new one */
+ g_hash_table_insert (extended_properties, g_strdup (name), g_strdup (value));
+
+ return TRUE;
+}
+
+/**
+ * gdata_contacts_contact_get_user_defined_field:
+ * @self: a #GDataContactsContact
+ * @name: the field name; an arbitrary, case-sensitive, unique string
+ *
+ * Gets the value of a user-defined field of the contact. User-defined fields are settable by the user through the Google Contacts web interface,
+ * in contrast to extended properties, which are visible and settable only through the GData interface.
+ *
+ * The @name of the field may not be %NULL, but may be an empty string.
+ *
+ * Return value: the field's value, or %NULL
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_contacts_contact_get_user_defined_field (GDataContactsContact *self, const gchar *name)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ g_return_val_if_fail (name != NULL, NULL);
+ return g_hash_table_lookup (self->priv->user_defined_fields, name);
+}
+
+/**
+ * gdata_contacts_contact_get_user_defined_fields:
+ * @self: a #GDataContactsContact
+ *
+ * Gets the full list of user-defined fields of the contact; a hash table mapping field name to value.
+ *
+ * Return value: (transfer none): a #GHashTable of user-defined fields
+ *
+ * Since: 0.7.0
+ */
+GHashTable *
+gdata_contacts_contact_get_user_defined_fields (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->user_defined_fields;
+}
+
+/**
+ * gdata_contacts_contact_set_user_defined_field:
+ * @self: a #GDataContactsContact
+ * @name: the field name; an arbitrary, case-sensitive, unique string
+ * @value: (allow-none): the field value, or %NULL
+ *
+ * Sets the value of a contact's user-defined field. User-defined field names are unique (but of the client's choosing),
+ * and reusing the same field name will result in the old value of that field being overwritten.
+ *
+ * The @name of the field may not be %NULL, but may be an empty string.
+ *
+ * To unset a field, set @value to %NULL.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_contact_set_user_defined_field (GDataContactsContact *self, const gchar *name, const gchar *value)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+ g_return_if_fail (name != NULL);
+
+ if (value == NULL) {
+ /* Removing a field */
+ g_hash_table_remove (self->priv->user_defined_fields, name);
+ } else {
+ /* Updating an existing field or adding a new one */
+ g_hash_table_insert (self->priv->user_defined_fields, g_strdup (name), g_strdup (value));
+ }
+}
+
+/**
+ * gdata_contacts_contact_add_group:
+ * @self: a #GDataContactsContact
+ * @href: the group's ID URI
+ *
+ * Adds the contact to the given group. @href should be a URI.
+ *
+ * Since: 0.2.0
+ */
+void
+gdata_contacts_contact_add_group (GDataContactsContact *self, const gchar *href)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+ g_return_if_fail (href != NULL);
+ g_hash_table_insert (self->priv->groups, g_strdup (href), GUINT_TO_POINTER (FALSE));
+}
+
+/**
+ * gdata_contacts_contact_remove_group:
+ * @self: a #GDataContactsContact
+ * @href: the group's ID URI
+ *
+ * Removes the contact from the given group. @href should be a URI.
+ *
+ * Since: 0.2.0
+ */
+void
+gdata_contacts_contact_remove_group (GDataContactsContact *self, const gchar *href)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+ g_return_if_fail (href != NULL);
+ g_hash_table_remove (self->priv->groups, href);
+}
+
+/**
+ * gdata_contacts_contact_is_group_deleted:
+ * @self: a #GDataContactsContact
+ * @href: the group's ID URI
+ *
+ * Returns whether the contact has recently been removed from the given group on the server. This
+ * will always return %FALSE unless #GDataContactsQuery:show-deleted has been set to
+ * %TRUE for the query which returned the contact.
+ *
+ * If you've just removed a contact from a group locally using gdata_contacts_contact_remove_group(), %FALSE will still be returned by this function,
+ * as the change hasn't been sent to the server.
+ *
+ * Return value: %TRUE if the contact has recently been removed from the group, %FALSE otherwise
+ *
+ * Since: 0.2.0
+ */
+gboolean
+gdata_contacts_contact_is_group_deleted (GDataContactsContact *self, const gchar *href)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), FALSE);
+ g_return_val_if_fail (href != NULL, FALSE);
+ return GPOINTER_TO_UINT (g_hash_table_lookup (self->priv->groups, href));
+}
+
+/**
+ * gdata_contacts_contact_get_groups:
+ * @self: a #GDataContactsContact
+ *
+ * Gets a list of the groups to which the contact belongs.
+ *
+ * Return value: (element-type utf8) (transfer container): a #GList of constant group ID URIs, or %NULL; free with g_list_free()
+ *
+ * Since: 0.2.0
+ */
+GList *
+gdata_contacts_contact_get_groups (GDataContactsContact *self)
+{
+ GHashTableIter iter;
+ const gchar *href;
+ gpointer value;
+ GList *groups = NULL;
+
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+
+ g_hash_table_iter_init (&iter, self->priv->groups);
+ while (g_hash_table_iter_next (&iter, (gpointer*) &href, &value) == TRUE) {
+ /* Add the group to the list as long as it hasn't been deleted */
+ if (GPOINTER_TO_UINT (value) == FALSE)
+ groups = g_list_prepend (groups, (gpointer) href);
+ }
+
+ return g_list_reverse (groups);
+}
+
+/**
+ * gdata_contacts_contact_is_deleted:
+ * @self: a #GDataContactsContact
+ *
+ * Returns whether the contact has recently been deleted. This will always return
+ * %FALSE unless #GDataContactsQuery:show-deleted has been set to
+ * %TRUE for the query which returned the contact; then this function will return
+ * %TRUE only if the contact has been deleted.
+ *
+ * If a contact has been deleted, no other information is available about it. This
+ * is designed to allow contacts to be deleted from local address books using
+ * incremental updates from the server (e.g. with #GDataQuery:updated-min and
+ * #GDataContactsQuery:show-deleted).
+ *
+ * Return value: %TRUE if the contact has been deleted, %FALSE otherwise
+ *
+ * Since: 0.2.0
+ */
+gboolean
+gdata_contacts_contact_is_deleted (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), FALSE);
+ return self->priv->deleted;
+}
+
+/**
+ * gdata_contacts_contact_get_photo_etag:
+ * @self: a #GDataContactsContact
+ *
+ * Returns the ETag for the contact's attached photo, if it exists. If it does exist, the contact's photo can be retrieved using
+ * gdata_contacts_contact_get_photo(). If it doesn't exist, %NULL will be returned, and the contact doesn't have a photo (so calling
+ * gdata_contacts_contact_get_photo() will also return %NULL)
+ *
+ * Return value: the contact's photo's ETag if it exists, %NULL otherwise
+ *
+ * Since: 0.9.0
+ */
+const gchar *
+gdata_contacts_contact_get_photo_etag (GDataContactsContact *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ return self->priv->photo_etag;
+}
+
+/**
+ * gdata_contacts_contact_get_photo:
+ * @self: a #GDataContactsContact
+ * @service: a #GDataContactsService
+ * @length: (out caller-allocates): return location for the image length, in bytes
+ * @content_type: (out callee-allocates) (transfer full) (allow-none): return location for the image's content type, or %NULL; free with g_free()
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Downloads and returns the contact's photo, if they have one. If the contact doesn't
+ * have a photo (i.e. gdata_contacts_contact_get_photo_etag() returns %NULL), %NULL is returned, but
+ * no error is set in @error.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by triggering the @cancellable object from another thread.
+ * If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * If there is an error getting the photo, a %GDATA_SERVICE_ERROR_PROTOCOL_ERROR error will be returned.
+ *
+ * Return value: (transfer full) (array length=length): the image data, or %NULL; free with g_free()
+ *
+ * Since: 0.8.0
+ */
+guint8 *
+gdata_contacts_contact_get_photo (GDataContactsContact *self, GDataContactsService *service, gsize *length, gchar **content_type,
+ GCancellable *cancellable, GError **error)
+{
+ GDataLink *_link;
+ SoupMessage *message;
+ guint status;
+ guint8 *data;
+
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ g_return_val_if_fail (GDATA_IS_CONTACTS_SERVICE (service), NULL);
+ g_return_val_if_fail (length != NULL, NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ /* Return if there is no photo */
+ if (gdata_contacts_contact_get_photo_etag (self) == NULL)
+ return NULL;
+
+ /* Get the photo URI */
+ /* TODO: ETag support */
+ _link = gdata_entry_look_up_link (GDATA_ENTRY (self), "http://schemas.google.com/contacts/2008/rel#photo");
+ g_assert (_link != NULL);
+ message = _gdata_service_build_message (GDATA_SERVICE (service), gdata_contacts_service_get_primary_authorization_domain (),
+ SOUP_METHOD_GET, gdata_link_get_uri (_link), NULL, FALSE);
+
+ /* Send the message */
+ status = _gdata_service_send_message (GDATA_SERVICE (service), message, cancellable, error);
+
+ if (status == SOUP_STATUS_NONE || status == SOUP_STATUS_CANCELLED) {
+ /* Redirect error or cancelled */
+ g_object_unref (message);
+ return NULL;
+ } else if (status != SOUP_STATUS_OK) {
+ /* Error */
+ GDataServiceClass *klass = GDATA_SERVICE_GET_CLASS (service);
+ g_assert (klass->parse_error_response != NULL);
+ klass->parse_error_response (GDATA_SERVICE (service), GDATA_OPERATION_DOWNLOAD, status, message->reason_phrase,
+ message->response_body->data, message->response_body->length, error);
+ g_object_unref (message);
+ return NULL;
+ }
+
+ g_assert (message->response_body->data != NULL);
+
+ /* Sort out the return values */
+ if (content_type != NULL)
+ *content_type = g_strdup (soup_message_headers_get_content_type (message->response_headers, NULL));
+ *length = message->response_body->length;
+ data = g_memdup (message->response_body->data, message->response_body->length);
+
+ /* Update the stored photo ETag */
+ g_free (self->priv->photo_etag);
+ self->priv->photo_etag = g_strdup (soup_message_headers_get_one (message->response_headers, "ETag"));
+ g_object_unref (message);
+
+ return data;
+}
+
+typedef struct {
+ GDataContactsService *service;
+ guint8 *data;
+ gsize length;
+ gchar *content_type;
+} PhotoData;
+
+static void
+photo_data_free (PhotoData *data)
+{
+ if (data->service != NULL)
+ g_object_unref (data->service);
+ g_free (data->data);
+ g_free (data->content_type);
+ g_slice_free (PhotoData, data);
+}
+
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (PhotoData, photo_data_free)
+
+static void
+get_photo_thread (GTask *task, gpointer source_object, gpointer task_data, GCancellable *cancellable)
+{
+ GDataContactsContact *contact = GDATA_CONTACTS_CONTACT (source_object);
+ GDataContactsService *service = GDATA_CONTACTS_SERVICE (task_data);
+ g_autoptr(PhotoData) data = NULL;
+ g_autoptr(GError) error = NULL;
+
+ /* Input and output */
+ data = g_slice_new0 (PhotoData);
+
+ /* Get the photo */
+ data->data = gdata_contacts_contact_get_photo (contact, service, &(data->length), &(data->content_type), cancellable, &error);
+ if (error != NULL)
+ g_task_return_error (task, g_steal_pointer (&error));
+ else
+ g_task_return_pointer (task, g_steal_pointer (&data), (GDestroyNotify) photo_data_free);
+}
+
+/**
+ * gdata_contacts_contact_get_photo_async:
+ * @self: a #GDataContactsContact
+ * @service: a #GDataContactsService
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when the photo has been retrieved, or %NULL
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Downloads and returns the contact's photo, if they have one, asynchronously. @self and @service are both reffed when this function is called, so
+ * can safely be unreffed after this function returns.
+ *
+ * When the operation is finished, @callback will be called. You can then call gdata_contacts_contact_get_photo_finish() to get the results of the
+ * operation.
+ *
+ * For more details, see gdata_contacts_contact_get_photo(), which is the synchronous version of this function.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by triggering the @cancellable object from another thread.
+ * If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned by gdata_contacts_contact_get_photo_finish().
+ *
+ * If there is an error getting the photo, a %GDATA_SERVICE_ERROR_PROTOCOL_ERROR error will be returned by gdata_contacts_contact_get_photo_finish().
+ *
+ * Since: 0.8.0
+ */
+void
+gdata_contacts_contact_get_photo_async (GDataContactsContact *self, GDataContactsService *service, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_autoptr(GTask) task = NULL;
+
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+ g_return_if_fail (GDATA_IS_CONTACTS_SERVICE (service));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+ g_return_if_fail (callback != NULL);
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_contacts_contact_get_photo_async);
+ g_task_set_task_data (task, g_object_ref (service), (GDestroyNotify) g_object_unref);
+ g_task_run_in_thread (task, get_photo_thread);
+}
+
+/**
+ * gdata_contacts_contact_get_photo_finish:
+ * @self: a #GDataContactsContact
+ * @async_result: a #GAsyncResult
+ * @length: (out caller-allocates): return location for the image length, in bytes
+ * @content_type: (out callee-allocates) (transfer full) (allow-none): return location for the image's content type, or %NULL; free with g_free()
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous contact photo retrieval operation started with gdata_contacts_contact_get_photo_async(). If the contact doesn't have a
+ * photo (i.e. gdata_contacts_contact_get_photo_etag() returns %NULL), %NULL is returned, but no error is set in @error.
+ *
+ * If there is an error getting the photo, a %GDATA_SERVICE_ERROR_PROTOCOL_ERROR error will be returned. @length will be set to
+ * <code class="literal">0</code> and @content_type will be set to %NULL.
+ *
+ * Return value: (transfer full) (array length=length): the image data, or %NULL; free with g_free()
+ *
+ * Since: 0.8.0
+ */
+guint8 *
+gdata_contacts_contact_get_photo_finish (GDataContactsContact *self, GAsyncResult *async_result, gsize *length, gchar **content_type, GError **error)
+{
+ g_autoptr(PhotoData) data = NULL;
+
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (async_result), NULL);
+ g_return_val_if_fail (length != NULL, NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+ g_return_val_if_fail (g_task_is_valid (async_result, self), NULL);
+ g_return_val_if_fail (g_async_result_is_tagged (async_result, gdata_contacts_contact_get_photo_async), NULL);
+
+ data = g_task_propagate_pointer (G_TASK (async_result), error);
+ if (data == NULL) {
+ /* Error */
+ *length = 0;
+
+ if (content_type != NULL) {
+ *content_type = NULL;
+ }
+
+ return NULL;
+ }
+
+ /* Return the photo (steal the data from the PhotoData struct so we don't have to copy it again) */
+ *length = data->length;
+ if (content_type != NULL)
+ *content_type = g_steal_pointer (&data->content_type);
+
+ return g_steal_pointer (&data->data);
+}
+
+/**
+ * gdata_contacts_contact_set_photo:
+ * @self: a #GDataContactsContact
+ * @service: a #GDataContactsService
+ * @data: (allow-none): the image data, or %NULL
+ * @length: the image length, in bytes
+ * @content_type: (allow-none): the content type of the image, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Sets the contact's photo to @data or, if @data is %NULL, deletes the contact's photo. @content_type must be specified if @data is non-%NULL.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by triggering the @cancellable object from another thread.
+ * If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * If there is an error setting the photo, a %GDATA_SERVICE_ERROR_PROTOCOL_ERROR error will be returned.
+ *
+ * Return value: %TRUE on success, %FALSE otherwise
+ *
+ * Since: 0.8.0
+ */
+gboolean
+gdata_contacts_contact_set_photo (GDataContactsContact *self, GDataContactsService *service, const guint8 *data, gsize length,
+ const gchar *content_type, GCancellable *cancellable, GError **error)
+{
+ GDataLink *_link;
+ SoupMessage *message;
+ guint status;
+ gboolean deleting_photo = FALSE;
+ const gchar *etag;
+
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), FALSE);
+ g_return_val_if_fail (GDATA_IS_CONTACTS_SERVICE (service), FALSE);
+ g_return_val_if_fail (data == NULL || content_type != NULL, FALSE);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
+ if (self->priv->photo_etag != NULL && data == NULL)
+ deleting_photo = TRUE;
+
+ /* Get the photo URI */
+ _link = gdata_entry_look_up_link (GDATA_ENTRY (self), "http://schemas.google.com/contacts/2008/rel#photo");
+ g_assert (_link != NULL);
+
+ /* We always have to set an If-Match header. */
+ etag = self->priv->photo_etag;
+ if (etag == NULL || *etag == '\0') {
+ etag = "*";
+ }
+
+ message = _gdata_service_build_message (GDATA_SERVICE (service), gdata_contacts_service_get_primary_authorization_domain (),
+ (deleting_photo == TRUE) ? SOUP_METHOD_DELETE : SOUP_METHOD_PUT,
+ gdata_link_get_uri (_link), etag, TRUE);
+
+ /* Append the data */
+ if (deleting_photo == FALSE)
+ soup_message_set_request (message, content_type, SOUP_MEMORY_STATIC, (gchar*) data, length);
+
+ /* Send the message */
+ status = _gdata_service_send_message (GDATA_SERVICE (service), message, cancellable, error);
+
+ if (status == SOUP_STATUS_NONE || status == SOUP_STATUS_CANCELLED) {
+ /* Redirect error or cancelled */
+ g_object_unref (message);
+ return FALSE;
+ } else if (status != SOUP_STATUS_OK) {
+ /* Error */
+ GDataServiceClass *klass = GDATA_SERVICE_GET_CLASS (service);
+ g_assert (klass->parse_error_response != NULL);
+ klass->parse_error_response (GDATA_SERVICE (service), GDATA_OPERATION_UPLOAD, status, message->reason_phrase,
+ message->response_body->data, message->response_body->length, error);
+ g_object_unref (message);
+ return FALSE;
+ }
+
+ /* Update the stored photo ETag */
+ g_free (self->priv->photo_etag);
+ self->priv->photo_etag = g_strdup (soup_message_headers_get_one (message->response_headers, "ETag"));
+ g_object_notify (G_OBJECT (self), "photo-etag");
+
+ g_object_unref (message);
+
+ return TRUE;
+}
+
+static void
+set_photo_thread (GTask *task, gpointer source_object, gpointer task_data, GCancellable *cancellable)
+{
+ GDataContactsContact *contact = GDATA_CONTACTS_CONTACT (source_object);
+ PhotoData *data = task_data;
+ g_autoptr(GError) error = NULL;
+
+ /* Set the photo */
+ if (!gdata_contacts_contact_set_photo (contact, data->service, data->data, data->length, data->content_type, cancellable, &error))
+ g_task_return_error (task, g_steal_pointer (&error));
+ else
+ g_task_return_boolean (task, TRUE);
+}
+
+/**
+ * gdata_contacts_contact_set_photo_async:
+ * @self: a #GDataContactsContact
+ * @service: a #GDataContactsService
+ * @data: (allow-none): the image data, or %NULL
+ * @length: the image length, in bytes
+ * @content_type: (allow-none): the content type of the image, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when the photo has been set, or %NULL
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Sets the contact's photo to @data or, if @data is %NULL, deletes the contact's photo. @content_type must be specified if @data is non-%NULL. @self,
+ * @service, @data and @content_type are all reffed and copied when this function is called, so can safely be unreffed after this function returns.
+ *
+ * When the operation is finished, @callback will be called. You can then call gdata_contacts_contact_set_photo_finish() to get the results of the
+ * operation.
+ *
+ * For more details, see gdata_contacts_contact_set_photo(), which is the synchronous version of this function.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by triggering the @cancellable object from another thread.
+ * If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned by gdata_contacts_contact_set_photo_finish().
+ *
+ * If there is an error setting the photo, a %GDATA_SERVICE_ERROR_PROTOCOL_ERROR error will be returned by gdata_contacts_contact_set_photo_finish().
+ *
+ * Since: 0.8.0
+ */
+void
+gdata_contacts_contact_set_photo_async (GDataContactsContact *self, GDataContactsService *service, const guint8 *data, gsize length,
+ const gchar *content_type, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_autoptr(GTask) task = NULL;
+ g_autoptr(PhotoData) photo_data = NULL;
+
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
+ g_return_if_fail (GDATA_IS_CONTACTS_SERVICE (service));
+ g_return_if_fail (data == NULL || content_type != NULL);
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+
+ /* Prepare the data to be passed to the thread */
+ photo_data = g_slice_new (PhotoData);
+ photo_data->service = g_object_ref (service);
+ photo_data->data = g_memdup (data, length);
+ photo_data->length = length;
+ photo_data->content_type = g_strdup (content_type);
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_contacts_contact_set_photo_async);
+ g_task_set_task_data (task, g_steal_pointer (&photo_data), (GDestroyNotify) photo_data_free);
+ g_task_run_in_thread (task, set_photo_thread);
+}
+
+/**
+ * gdata_contacts_contact_set_photo_finish:
+ * @self: a #GDataContactsContact
+ * @async_result: a #GAsyncResult
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous contact photo setting operation started with gdata_contacts_contact_set_photo_async().
+ *
+ * If there is an error setting the photo, a %GDATA_SERVICE_ERROR_PROTOCOL_ERROR error will be returned.
+ *
+ * Return value: %TRUE on success, %FALSE otherwise
+ *
+ * Since: 0.8.0
+ */
+gboolean
+gdata_contacts_contact_set_photo_finish (GDataContactsContact *self, GAsyncResult *async_result, GError **error)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), FALSE);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (async_result), FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (g_task_is_valid (async_result, self), FALSE);
+ g_return_val_if_fail (g_async_result_is_tagged (async_result, gdata_contacts_contact_set_photo_async), FALSE);
+
+ return g_task_propagate_boolean (G_TASK (async_result), error);
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009, 2010, 2011 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_CONTACTS_CONTACT_H
+#define GDATA_CONTACTS_CONTACT_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-entry.h>
+#include <gdata/gd/gdata-gd-name.h>
+#include <gdata/gd/gdata-gd-email-address.h>
+#include <gdata/gd/gdata-gd-im-address.h>
+#include <gdata/gd/gdata-gd-organization.h>
+#include <gdata/gd/gdata-gd-phone-number.h>
+#include <gdata/gd/gdata-gd-postal-address.h>
+#include <gdata/gcontact/gdata-gcontact-calendar.h>
+#include <gdata/gcontact/gdata-gcontact-event.h>
+#include <gdata/gcontact/gdata-gcontact-external-id.h>
+#include <gdata/gcontact/gdata-gcontact-jot.h>
+#include <gdata/gcontact/gdata-gcontact-language.h>
+#include <gdata/gcontact/gdata-gcontact-relation.h>
+#include <gdata/gcontact/gdata-gcontact-website.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_CONTACTS_GENDER_MALE:
+ *
+ * The contact is male.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_CONTACTS_GENDER_MALE "male"
+
+/**
+ * GDATA_CONTACTS_GENDER_FEMALE:
+ *
+ * The contact is female.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_CONTACTS_GENDER_FEMALE "female"
+
+/**
+ * GDATA_CONTACTS_PRIORITY_LOW:
+ *
+ * The contact is of low importance.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_CONTACTS_PRIORITY_LOW "low"
+
+/**
+ * GDATA_CONTACTS_PRIORITY_NORMAL:
+ *
+ * The contact is of normal importance.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_CONTACTS_PRIORITY_NORMAL "normal"
+
+/**
+ * GDATA_CONTACTS_PRIORITY_HIGH:
+ *
+ * The contact is of high importance.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_CONTACTS_PRIORITY_HIGH "high"
+
+/**
+ * GDATA_CONTACTS_SENSITIVITY_CONFIDENTIAL:
+ *
+ * The contact's data is confidential.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_CONTACTS_SENSITIVITY_CONFIDENTIAL "confidential"
+
+/**
+ * GDATA_CONTACTS_SENSITIVITY_NORMAL:
+ *
+ * The contact's data is of normal sensitivity.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_CONTACTS_SENSITIVITY_NORMAL "normal"
+
+/**
+ * GDATA_CONTACTS_SENSITIVITY_PERSONAL:
+ *
+ * The contact's data is personal.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_CONTACTS_SENSITIVITY_PERSONAL "personal"
+
+/**
+ * GDATA_CONTACTS_SENSITIVITY_PRIVATE:
+ *
+ * The contact's data is private.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_CONTACTS_SENSITIVITY_PRIVATE "private"
+
+#define GDATA_TYPE_CONTACTS_CONTACT (gdata_contacts_contact_get_type ())
+#define GDATA_CONTACTS_CONTACT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_CONTACTS_CONTACT, GDataContactsContact))
+#define GDATA_CONTACTS_CONTACT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_CONTACTS_CONTACT, GDataContactsContactClass))
+#define GDATA_IS_CONTACTS_CONTACT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_CONTACTS_CONTACT))
+#define GDATA_IS_CONTACTS_CONTACT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_CONTACTS_CONTACT))
+#define GDATA_CONTACTS_CONTACT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_CONTACTS_CONTACT, GDataContactsContactClass))
+
+typedef struct _GDataContactsContactPrivate GDataContactsContactPrivate;
+
+/**
+ * GDataContactsContact:
+ *
+ * All the fields in the #GDataContactsContact structure are private and should never be accessed directly.
+ *
+ * Since: 0.2.0
+ */
+typedef struct {
+ GDataEntry parent;
+ GDataContactsContactPrivate *priv;
+} GDataContactsContact;
+
+/**
+ * GDataContactsContactClass:
+ *
+ * All the fields in the #GDataContactsContactClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.2.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataEntryClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataContactsContactClass;
+
+GType gdata_contacts_contact_get_type (void) G_GNUC_CONST;
+
+GDataContactsContact *gdata_contacts_contact_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+gint64 gdata_contacts_contact_get_edited (GDataContactsContact *self);
+gboolean gdata_contacts_contact_is_deleted (GDataContactsContact *self) G_GNUC_PURE;
+
+GDataGDName *gdata_contacts_contact_get_name (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_set_name (GDataContactsContact *self, GDataGDName *name);
+
+const gchar *gdata_contacts_contact_get_nickname (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_set_nickname (GDataContactsContact *self, const gchar *nickname);
+
+const gchar *gdata_contacts_contact_get_file_as (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_set_file_as (GDataContactsContact *self, const gchar *file_as);
+
+gboolean gdata_contacts_contact_get_birthday (GDataContactsContact *self, GDate *birthday) G_GNUC_PURE;
+void gdata_contacts_contact_set_birthday (GDataContactsContact *self, GDate *birthday, gboolean birthday_has_year);
+
+const gchar *gdata_contacts_contact_get_billing_information (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_set_billing_information (GDataContactsContact *self, const gchar *billing_information);
+
+const gchar *gdata_contacts_contact_get_directory_server (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_set_directory_server (GDataContactsContact *self, const gchar *directory_server);
+
+const gchar *gdata_contacts_contact_get_gender (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_set_gender (GDataContactsContact *self, const gchar *gender);
+
+const gchar *gdata_contacts_contact_get_initials (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_set_initials (GDataContactsContact *self, const gchar *initials);
+
+const gchar *gdata_contacts_contact_get_maiden_name (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_set_maiden_name (GDataContactsContact *self, const gchar *maiden_name);
+
+const gchar *gdata_contacts_contact_get_mileage (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_set_mileage (GDataContactsContact *self, const gchar *mileage);
+
+const gchar *gdata_contacts_contact_get_occupation (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_set_occupation (GDataContactsContact *self, const gchar *occupation);
+
+const gchar *gdata_contacts_contact_get_priority (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_set_priority (GDataContactsContact *self, const gchar *priority);
+
+const gchar *gdata_contacts_contact_get_sensitivity (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_set_sensitivity (GDataContactsContact *self, const gchar *sensitivity);
+
+const gchar *gdata_contacts_contact_get_short_name (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_set_short_name (GDataContactsContact *self, const gchar *short_name);
+
+const gchar *gdata_contacts_contact_get_subject (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_set_subject (GDataContactsContact *self, const gchar *subject);
+
+void gdata_contacts_contact_add_email_address (GDataContactsContact *self, GDataGDEmailAddress *email_address);
+GList *gdata_contacts_contact_get_email_addresses (GDataContactsContact *self) G_GNUC_PURE;
+GDataGDEmailAddress *gdata_contacts_contact_get_primary_email_address (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_remove_all_email_addresses (GDataContactsContact *self);
+
+void gdata_contacts_contact_add_im_address (GDataContactsContact *self, GDataGDIMAddress *im_address);
+GList *gdata_contacts_contact_get_im_addresses (GDataContactsContact *self) G_GNUC_PURE;
+GDataGDIMAddress *gdata_contacts_contact_get_primary_im_address (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_remove_all_im_addresses (GDataContactsContact *self);
+
+void gdata_contacts_contact_add_phone_number (GDataContactsContact *self, GDataGDPhoneNumber *phone_number);
+GList *gdata_contacts_contact_get_phone_numbers (GDataContactsContact *self) G_GNUC_PURE;
+GDataGDPhoneNumber *gdata_contacts_contact_get_primary_phone_number (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_remove_all_phone_numbers (GDataContactsContact *self);
+
+void gdata_contacts_contact_add_postal_address (GDataContactsContact *self, GDataGDPostalAddress *postal_address);
+GList *gdata_contacts_contact_get_postal_addresses (GDataContactsContact *self) G_GNUC_PURE;
+GDataGDPostalAddress *gdata_contacts_contact_get_primary_postal_address (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_remove_all_postal_addresses (GDataContactsContact *self);
+
+void gdata_contacts_contact_add_organization (GDataContactsContact *self, GDataGDOrganization *organization);
+GList *gdata_contacts_contact_get_organizations (GDataContactsContact *self) G_GNUC_PURE;
+GDataGDOrganization *gdata_contacts_contact_get_primary_organization (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_remove_all_organizations (GDataContactsContact *self);
+
+void gdata_contacts_contact_add_jot (GDataContactsContact *self, GDataGContactJot *jot);
+GList *gdata_contacts_contact_get_jots (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_remove_all_jots (GDataContactsContact *self);
+
+void gdata_contacts_contact_add_relation (GDataContactsContact *self, GDataGContactRelation *relation);
+GList *gdata_contacts_contact_get_relations (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_remove_all_relations (GDataContactsContact *self);
+
+void gdata_contacts_contact_add_website (GDataContactsContact *self, GDataGContactWebsite *website);
+GList *gdata_contacts_contact_get_websites (GDataContactsContact *self) G_GNUC_PURE;
+GDataGContactWebsite *gdata_contacts_contact_get_primary_website (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_remove_all_websites (GDataContactsContact *self);
+
+void gdata_contacts_contact_add_event (GDataContactsContact *self, GDataGContactEvent *event);
+GList *gdata_contacts_contact_get_events (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_remove_all_events (GDataContactsContact *self);
+
+void gdata_contacts_contact_add_calendar (GDataContactsContact *self, GDataGContactCalendar *calendar);
+GList *gdata_contacts_contact_get_calendars (GDataContactsContact *self) G_GNUC_PURE;
+GDataGContactCalendar *gdata_contacts_contact_get_primary_calendar (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_remove_all_calendars (GDataContactsContact *self);
+
+void gdata_contacts_contact_add_external_id (GDataContactsContact *self, GDataGContactExternalID *external_id);
+GList *gdata_contacts_contact_get_external_ids (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_remove_all_external_ids (GDataContactsContact *self);
+
+void gdata_contacts_contact_add_hobby (GDataContactsContact *self, const gchar *hobby);
+GList *gdata_contacts_contact_get_hobbies (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_remove_all_hobbies (GDataContactsContact *self);
+
+void gdata_contacts_contact_add_language (GDataContactsContact *self, GDataGContactLanguage *language);
+GList *gdata_contacts_contact_get_languages (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_remove_all_languages (GDataContactsContact *self);
+
+const gchar *gdata_contacts_contact_get_extended_property (GDataContactsContact *self, const gchar *name) G_GNUC_PURE;
+GHashTable *gdata_contacts_contact_get_extended_properties (GDataContactsContact *self) G_GNUC_PURE;
+gboolean gdata_contacts_contact_set_extended_property (GDataContactsContact *self, const gchar *name, const gchar *value);
+
+const gchar *gdata_contacts_contact_get_user_defined_field (GDataContactsContact *self, const gchar *name) G_GNUC_PURE;
+GHashTable *gdata_contacts_contact_get_user_defined_fields (GDataContactsContact *self) G_GNUC_PURE;
+void gdata_contacts_contact_set_user_defined_field (GDataContactsContact *self, const gchar *name, const gchar *value);
+
+void gdata_contacts_contact_add_group (GDataContactsContact *self, const gchar *href);
+void gdata_contacts_contact_remove_group (GDataContactsContact *self, const gchar *href);
+gboolean gdata_contacts_contact_is_group_deleted (GDataContactsContact *self, const gchar *href) G_GNUC_PURE;
+GList *gdata_contacts_contact_get_groups (GDataContactsContact *self) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+#include <gdata/services/contacts/gdata-contacts-service.h>
+
+const gchar *gdata_contacts_contact_get_photo_etag (GDataContactsContact *self) G_GNUC_PURE;
+
+guint8 *gdata_contacts_contact_get_photo (GDataContactsContact *self, GDataContactsService *service, gsize *length, gchar **content_type,
+ GCancellable *cancellable, GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_contacts_contact_get_photo_async (GDataContactsContact *self, GDataContactsService *service, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data);
+guint8 *gdata_contacts_contact_get_photo_finish (GDataContactsContact *self, GAsyncResult *async_result, gsize *length, gchar **content_type,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+gboolean gdata_contacts_contact_set_photo (GDataContactsContact *self, GDataContactsService *service, const guint8 *data, gsize length,
+ const gchar *content_type, GCancellable *cancellable, GError **error);
+void gdata_contacts_contact_set_photo_async (GDataContactsContact *self, GDataContactsService *service, const guint8 *data, gsize length,
+ const gchar *content_type, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
+gboolean gdata_contacts_contact_set_photo_finish (GDataContactsContact *self, GAsyncResult *async_result, GError **error);
+
+G_END_DECLS
+
+#endif /* !GDATA_CONTACTS_CONTACT_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-contacts-group
+ * @short_description: GData Contacts group object
+ * @stability: Stable
+ * @include: gdata/services/contacts/gdata-contacts-group.h
+ *
+ * #GDataContactsGroup is a subclass of #GDataEntry to represent a group from a Google address book.
+ *
+ * For more details of Google Contacts' GData API, see the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/developers_guide_protocol.html#Groups">online documentation</ulink>.
+ *
+ * The user-set name of the group is stored in the #GDataEntry:title property, retrievable using gdata_entry_get_title(). Note that for system groups
+ * (see #GDataContactsGroup:system-group-id), this group name is provided by Google, and is not localised. Clients should provide their own localised
+ * group names for the system groups.
+ *
+ * In addition to all the standard properties available for a group, #GDataContactsGroup supports an additional kind of property: extended
+ * properties. Extended properties, set with gdata_contacts_group_set_extended_property() and retrieved with
+ * gdata_contacts_group_get_extended_property(), are provided as a method of storing client-specific data which shouldn't be seen or be editable
+ * by the user, such as IDs and cache times.
+ *
+ * <example>
+ * <title>Adding a New Group</title>
+ * <programlisting>
+ * GDataContactsService *service;
+ * GDataContactsGroup *group, *updated_group;
+ * GDataContactsContact *contact, *updated_contact;
+ * GError *error = NULL;
+ *
+ * /<!-- -->* Create a service and return a contact to add to the new group. *<!-- -->/
+ * service = create_contacts_service ();
+ * contact = query_user_for_contact (service);
+ *
+ * /<!-- -->* Create the new group *<!-- -->/
+ * group = gdata_contacts_group_new (NULL);
+ * gdata_entry_set_title (GDATA_ENTRY (group), "Group Name");
+ *
+ * /<!-- -->* Insert the group on the server *<!-- -->/
+ * updated_group = gdata_contacts_service_insert_group (service, group, NULL, &error);
+ *
+ * g_object_unref (group);
+ *
+ * if (error != NULL) {
+ * g_error ("Error adding a group: %s", error->message);
+ * g_error_free (error);
+ * g_object_unref (contact);
+ * g_object_unref (service);
+ * return;
+ * }
+ *
+ * /<!-- -->* Add the contact to the new group. *<!-- -->/
+ * gdata_contacts_contact_add_group (contact, gdata_entry_get_id (GDATA_ENTRY (updated_group)));
+ *
+ * g_object_unref (updated_group);
+ *
+ * /<!-- -->* Update the contact on the server *<!-- -->/
+ * updated_contact = GDATA_CONTACTS_CONTACT (gdata_service_update_entry (GDATA_SERVICE (service), GDATA_ENTRY (contact), NULL, &error));
+ *
+ * g_object_unref (contact);
+ * g_object_unref (service);
+ *
+ * if (error != NULL) {
+ * g_error ("Error updating contact: %s", error->message);
+ * g_error_free (error);
+ * return;
+ * }
+ *
+ * /<!-- -->* Do something with the updated contact, such as update them in the UI, or store their ID for future use. *<!-- -->/
+ *
+ * g_object_unref (updated_contact);
+ * </programlisting>
+ * </example>
+ *
+ * Since: 0.7.0
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <libxml/parser.h>
+#include <string.h>
+
+#include "gdata-contacts-group.h"
+#include "gdata-parser.h"
+#include "gdata-types.h"
+#include "gdata-private.h"
+
+/* The maximum number of extended properties the server allows us. See
+ * http://code.google.com/apis/contacts/docs/3.0/reference.html#ProjectionsAndExtended.
+ * When updating this, make sure to update the API documentation for gdata_contacts_group_get_extended_property() and
+ * gdata_contacts_group_set_extended_property(). */
+#define MAX_N_EXTENDED_PROPERTIES 10
+
+static GObject *gdata_contacts_group_constructor (GType type, guint n_construct_params, GObjectConstructParam *construct_params);
+static void gdata_contacts_group_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_contacts_group_finalize (GObject *object);
+static void get_xml (GDataParsable *parsable, GString *xml_string);
+static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+static gchar *get_entry_uri (const gchar *id) G_GNUC_WARN_UNUSED_RESULT;
+
+struct _GDataContactsGroupPrivate {
+ gint64 edited;
+ GHashTable *extended_properties;
+ gboolean deleted;
+ gchar *system_group_id;
+};
+
+enum {
+ PROP_EDITED = 1,
+ PROP_DELETED,
+ PROP_SYSTEM_GROUP_ID
+};
+
+G_DEFINE_TYPE (GDataContactsGroup, gdata_contacts_group, GDATA_TYPE_ENTRY)
+
+static void
+gdata_contacts_group_class_init (GDataContactsGroupClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+ GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataContactsGroupPrivate));
+
+ gobject_class->constructor = gdata_contacts_group_constructor;
+ gobject_class->get_property = gdata_contacts_group_get_property;
+ gobject_class->finalize = gdata_contacts_group_finalize;
+
+ parsable_class->parse_xml = parse_xml;
+ parsable_class->get_xml = get_xml;
+ parsable_class->get_namespaces = get_namespaces;
+
+ entry_class->get_entry_uri = get_entry_uri;
+ entry_class->kind_term = "http://schemas.google.com/contact/2008#group";
+
+ /**
+ * GDataContactsGroup:edited:
+ *
+ * The last time the group was edited. If the group has not been edited yet, the content indicates the time it was created.
+ *
+ * For more information, see the <ulink type="http" url="http://www.atomenabled.org/developers/protocol/#appEdited">
+ * Atom Publishing Protocol specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_EDITED,
+ g_param_spec_int64 ("edited",
+ "Edited", "The last time the group was edited.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataContactsGroup:deleted:
+ *
+ * Whether the entry has been deleted.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_DELETED,
+ g_param_spec_boolean ("deleted",
+ "Deleted", "Whether the entry has been deleted.",
+ FALSE,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataContactsGroup:system-group-id:
+ *
+ * The system group ID for this group, if it's a system group. If the group is not a system group, this is %NULL. Otherwise, it is one of the
+ * four system group IDs: %GDATA_CONTACTS_GROUP_CONTACTS, %GDATA_CONTACTS_GROUP_FRIENDS, %GDATA_CONTACTS_GROUP_FAMILY and
+ * %GDATA_CONTACTS_GROUP_COWORKERS.
+ *
+ * If this is non-%NULL, the group name stored in #GDataEntry:title will not be localised, so clients should provide localised group names of
+ * their own for each of the system groups. Whether a group is a system group should be detected solely on the basis of the value of this
+ * property, not by comparing the group name (#GDataEntry:title) or entry ID (#GDataEntry:id). The entry ID is not the same as the system
+ * group ID.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SYSTEM_GROUP_ID,
+ g_param_spec_string ("system-group-id",
+ "System group ID", "The system group ID for this group, if it's a system group.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+}
+
+static void notify_content_cb (GObject *gobject, GParamSpec *pspec, GDataContactsGroup *self);
+
+static void
+notify_title_cb (GObject *gobject, GParamSpec *pspec, GDataContactsGroup *self)
+{
+ /* Update GDataEntry:content */
+ g_signal_handlers_block_by_func (self, notify_content_cb, self);
+ gdata_entry_set_content (GDATA_ENTRY (self), gdata_entry_get_title (GDATA_ENTRY (self)));
+ g_signal_handlers_unblock_by_func (self, notify_content_cb, self);
+}
+
+static void
+notify_content_cb (GObject *gobject, GParamSpec *pspec, GDataContactsGroup *self)
+{
+ /* Update GDataEntry:title */
+ g_signal_handlers_block_by_func (self, notify_title_cb, self);
+ gdata_entry_set_title (GDATA_ENTRY (self), gdata_entry_get_content (GDATA_ENTRY (self)));
+ g_signal_handlers_unblock_by_func (self, notify_title_cb, self);
+}
+
+static void
+gdata_contacts_group_init (GDataContactsGroup *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_CONTACTS_GROUP, GDataContactsGroupPrivate);
+ self->priv->extended_properties = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
+ self->priv->edited = -1;
+
+ /* Listen to change notifications for the entry's title and content, since they're linked */
+ g_signal_connect (self, "notify::title", (GCallback) notify_title_cb, self);
+ g_signal_connect (self, "notify::content", (GCallback) notify_content_cb, self);
+}
+
+static GObject *
+gdata_contacts_group_constructor (GType type, guint n_construct_params, GObjectConstructParam *construct_params)
+{
+ GObject *object;
+ guint i;
+
+ /* Find the "id" property and ensure it's sane */
+ for (i = 0; i < n_construct_params; i++) {
+ GParamSpec *pspec = construct_params[i].pspec;
+ GValue *value = construct_params[i].value;
+
+ if (strcmp (g_param_spec_get_name (pspec), "id") == 0) {
+ gchar *base, *id;
+
+ id = g_value_dup_string (value);
+
+ /* Fix the ID to refer to the full projection, rather than the base projection. */
+ if (id != NULL) {
+ base = strstr (id, "/base/");
+ if (base != NULL)
+ memcpy (base, "/full/", 6);
+ }
+
+ g_value_take_string (value, id);
+
+ break;
+ }
+ }
+
+ /* Chain up to the parent class */
+ object = G_OBJECT_CLASS (gdata_contacts_group_parent_class)->constructor (type, n_construct_params, construct_params);
+
+ if (_gdata_parsable_is_constructed_from_xml (GDATA_PARSABLE (object)) == FALSE) {
+ GDataContactsGroupPrivate *priv = GDATA_CONTACTS_GROUP (object)->priv;
+ GTimeVal time_val;
+
+ /* Set the edited property to the current time (creation time). We don't do this in *_init() since that would cause setting it from
+ * parse_xml() to fail (duplicate element). */
+ g_get_current_time (&time_val);
+ priv->edited = time_val.tv_sec;
+ }
+
+ return object;
+}
+
+static void
+gdata_contacts_group_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataContactsGroupPrivate *priv = GDATA_CONTACTS_GROUP (object)->priv;
+
+ switch (property_id) {
+ case PROP_EDITED:
+ g_value_set_int64 (value, priv->edited);
+ break;
+ case PROP_DELETED:
+ g_value_set_boolean (value, priv->deleted);
+ break;
+ case PROP_SYSTEM_GROUP_ID:
+ g_value_set_string (value, priv->system_group_id);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_contacts_group_finalize (GObject *object)
+{
+ GDataContactsGroupPrivate *priv = GDATA_CONTACTS_GROUP (object)->priv;
+
+ g_hash_table_destroy (priv->extended_properties);
+ g_free (priv->system_group_id);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_contacts_group_parent_class)->finalize (object);
+}
+
+static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ gboolean success;
+ GDataContactsGroup *self = GDATA_CONTACTS_GROUP (parsable);
+
+ if (gdata_parser_is_namespace (node, "http://www.w3.org/2007/app") == TRUE &&
+ gdata_parser_int64_time_from_element (node, "edited", P_REQUIRED | P_NO_DUPES, &(self->priv->edited), &success, error) == TRUE) {
+ return success;
+ } else if (gdata_parser_is_namespace (node, "http://www.w3.org/2005/Atom") == TRUE && xmlStrcmp (node->name, (xmlChar*) "id") == 0) {
+ /* We have to override <id> parsing to fix the projection. Modify it in-place so that the parser in GDataEntry will pick up the
+ * changes. This fixes bugs caused by referring to contacts by the base projection, rather than the full projection; such as
+ * http://code.google.com/p/gdata-issues/issues/detail?id=2129. */
+ gchar *base;
+ gchar *id = (gchar*) xmlNodeListGetString (doc, node->children, TRUE);
+
+ if (id != NULL) {
+ base = strstr (id, "/base/");
+ if (base != NULL) {
+ memcpy (base, "/full/", 6);
+ xmlNodeSetContent (node, (xmlChar*) id);
+ }
+ }
+
+ xmlFree (id);
+
+ return GDATA_PARSABLE_CLASS (gdata_contacts_group_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ } else if (gdata_parser_is_namespace (node, "http://schemas.google.com/g/2005") == TRUE) {
+ if (xmlStrcmp (node->name, (xmlChar*) "extendedProperty") == 0) {
+ /* gd:extendedProperty */
+ xmlChar *name, *value;
+ xmlBuffer *buffer = NULL;
+
+ name = xmlGetProp (node, (xmlChar*) "name");
+ if (name == NULL)
+ return gdata_parser_error_required_property_missing (node, "name", error);
+
+ /* Get either the value property, or the element's content */
+ value = xmlGetProp (node, (xmlChar*) "value");
+ if (value == NULL) {
+ xmlNode *child_node;
+
+ /* Use the element's content instead (arbitrary XML) */
+ buffer = xmlBufferCreate ();
+ for (child_node = node->children; child_node != NULL; child_node = child_node->next)
+ xmlNodeDump (buffer, doc, child_node, 0, 0);
+ value = (xmlChar*) xmlBufferContent (buffer);
+ }
+
+ gdata_contacts_group_set_extended_property (self, (gchar*) name, (gchar*) value);
+
+ xmlFree (name);
+ if (buffer != NULL)
+ xmlBufferFree (buffer);
+ else
+ xmlFree (value);
+ } else if (xmlStrcmp (node->name, (xmlChar*) "deleted") == 0) {
+ /* gd:deleted */
+ if (self->priv->deleted == TRUE)
+ return gdata_parser_error_duplicate_element (node, error);
+
+ self->priv->deleted = TRUE;
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_contacts_group_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ }
+ } else if (gdata_parser_is_namespace (node, "http://schemas.google.com/contact/2008") == TRUE) {
+ if (xmlStrcmp (node->name, (xmlChar*) "systemGroup") == 0) {
+ /* gContact:systemGroup */
+ xmlChar *value;
+
+ if (self->priv->system_group_id != NULL)
+ return gdata_parser_error_duplicate_element (node, error);
+
+ value = xmlGetProp (node, (xmlChar*) "id");
+ if (value == NULL || *value == '\0') {
+ xmlFree (value);
+ return gdata_parser_error_required_property_missing (node, "id", error);
+ }
+
+ self->priv->system_group_id = (gchar*) value;
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_contacts_group_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ }
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_contacts_group_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ }
+
+ return TRUE;
+}
+
+static void
+get_extended_property_xml_cb (const gchar *name, const gchar *value, GString *xml_string)
+{
+ /* Note that the value *isn't* escaped (see http://code.google.com/apis/gdata/docs/2.0/elements.html#gdExtendedProperty) */
+ gdata_parser_string_append_escaped (xml_string, "<gd:extendedProperty name='", name, "'>");
+ g_string_append_printf (xml_string, "%s</gd:extendedProperty>", value);
+}
+
+static void
+get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataContactsGroupPrivate *priv = GDATA_CONTACTS_GROUP (parsable)->priv;
+
+ /* Chain up to the parent class */
+ GDATA_PARSABLE_CLASS (gdata_contacts_group_parent_class)->get_xml (parsable, xml_string);
+
+ /* Extended properties */
+ g_hash_table_foreach (priv->extended_properties, (GHFunc) get_extended_property_xml_cb, xml_string);
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ /* Chain up to the parent class */
+ GDATA_PARSABLE_CLASS (gdata_contacts_group_parent_class)->get_namespaces (parsable, namespaces);
+
+ g_hash_table_insert (namespaces, (gchar*) "gd", (gchar*) "http://schemas.google.com/g/2005");
+ g_hash_table_insert (namespaces, (gchar*) "gContact", (gchar*) "http://schemas.google.com/contact/2008");
+ g_hash_table_insert (namespaces, (gchar*) "app", (gchar*) "http://www.w3.org/2007/app");
+}
+
+static gchar *
+get_entry_uri (const gchar *id)
+{
+ const gchar *base_pos;
+ gchar *uri = g_strdup (id);
+
+ /* The service API sometimes stubbornly insists on using the "base" view instead of the "full" view, which we have to fix, or our extended
+ * attributes are never visible */
+ base_pos = strstr (uri, "/base/");
+ if (base_pos != NULL)
+ memcpy ((char*) base_pos, "/full/", 6);
+
+ return uri;
+}
+
+/**
+ * gdata_contacts_group_new:
+ * @id: (allow-none): the group's ID, or %NULL
+ *
+ * Creates a new #GDataContactsGroup with the given ID and default properties.
+ *
+ * Return value: a new #GDataContactsGroup; unref with g_object_unref()
+ *
+ * Since: 0.7.0
+ */
+GDataContactsGroup *
+gdata_contacts_group_new (const gchar *id)
+{
+ return GDATA_CONTACTS_GROUP (g_object_new (GDATA_TYPE_CONTACTS_GROUP, "id", id, NULL));
+}
+
+/**
+ * gdata_contacts_group_get_edited:
+ * @self: a #GDataContactsGroup
+ *
+ * Gets the #GDataContactsGroup:edited property. If the property is unset, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the UNIX timestamp for the time the file was last edited, or <code class="literal">-1</code>
+ *
+ * Since: 0.7.0
+ */
+gint64
+gdata_contacts_group_get_edited (GDataContactsGroup *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_GROUP (self), -1);
+ return self->priv->edited;
+}
+
+/**
+ * gdata_contacts_group_get_system_group_id:
+ * @self: a #GDataContactsGroup
+ *
+ * Gets the #GDataContactsGroup:system-group-id property. If the group is not a system group, %NULL will be returned.
+ *
+ * Return value: the group's system group ID, or %NULL
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_contacts_group_get_system_group_id (GDataContactsGroup *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_GROUP (self), NULL);
+ return self->priv->system_group_id;
+}
+
+/**
+ * gdata_contacts_group_get_extended_property:
+ * @self: a #GDataContactsGroup
+ * @name: the property name; an arbitrary, unique string
+ *
+ * Gets the value of an extended property of the group. Each group can have up to 10 client-set extended properties to store data of the client's
+ * choosing.
+ *
+ * Return value: the property's value, or %NULL
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_contacts_group_get_extended_property (GDataContactsGroup *self, const gchar *name)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_GROUP (self), NULL);
+ g_return_val_if_fail (name != NULL && *name != '\0', NULL);
+ return g_hash_table_lookup (self->priv->extended_properties, name);
+}
+
+/**
+ * gdata_contacts_group_get_extended_properties:
+ * @self: a #GDataContactsGroup
+ *
+ * Gets the full list of extended properties of the group; a hash table mapping property name to value.
+ *
+ * Return value: (transfer none): a #GHashTable of extended properties
+ *
+ * Since: 0.7.0
+ */
+GHashTable *
+gdata_contacts_group_get_extended_properties (GDataContactsGroup *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_GROUP (self), NULL);
+ return self->priv->extended_properties;
+}
+
+/**
+ * gdata_contacts_group_set_extended_property:
+ * @self: a #GDataContactsGroup
+ * @name: the property name; an arbitrary, unique string
+ * @value: (allow-none): the property value, or %NULL
+ *
+ * Sets the value of a group's extended property. Extended property names are unique (but of the client's choosing), and reusing the same property
+ * name will result in the old value of that property being overwritten.
+ *
+ * To unset a property, set @value to %NULL or an empty string.
+ *
+ * A group may have up to 10 extended properties, and each should be reasonably small (i.e. not a photo or ringtone). For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/2.0/reference.html#ProjectionsAndExtended">online documentation</ulink>.
+ * %FALSE will be returned if you attempt to add more than 10 extended properties.
+ *
+ * Return value: %TRUE if the property was updated or deleted successfully, %FALSE otherwise
+ *
+ * Since: 0.7.0
+ */
+gboolean
+gdata_contacts_group_set_extended_property (GDataContactsGroup *self, const gchar *name, const gchar *value)
+{
+ GHashTable *extended_properties = self->priv->extended_properties;
+
+ g_return_val_if_fail (GDATA_IS_CONTACTS_GROUP (self), FALSE);
+ g_return_val_if_fail (name != NULL && *name != '\0', FALSE);
+
+ if (value == NULL || *value == '\0') {
+ /* Removing a property */
+ g_hash_table_remove (extended_properties, name);
+ return TRUE;
+ }
+
+ /* We can't add more than MAX_N_EXTENDED_PROPERTIES */
+ if (g_hash_table_lookup (extended_properties, name) == NULL && g_hash_table_size (extended_properties) >= MAX_N_EXTENDED_PROPERTIES)
+ return FALSE;
+
+ /* Updating an existing property or adding a new one */
+ g_hash_table_insert (extended_properties, g_strdup (name), g_strdup (value));
+
+ return TRUE;
+}
+
+/**
+ * gdata_contacts_group_is_deleted:
+ * @self: a #GDataContactsGroup
+ *
+ * Returns whether the group has recently been deleted. This will always return %FALSE unless #GDataContactsQuery:show-deleted has been set to %TRUE
+ * for the query which returned the group; then this function will return %TRUE only if the group has been deleted.
+ *
+ * If a group has been deleted, no other information is available about it. This is designed to allow groups to be deleted from local address
+ * books using incremental updates from the server (e.g. with #GDataQuery:updated-min and #GDataContactsQuery:show-deleted).
+ *
+ * Return value: %TRUE if the group has been deleted, %FALSE otherwise
+ *
+ * Since: 0.7.0
+ */
+gboolean
+gdata_contacts_group_is_deleted (GDataContactsGroup *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_GROUP (self), FALSE);
+ return self->priv->deleted;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_CONTACTS_GROUP_H
+#define GDATA_CONTACTS_GROUP_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-entry.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_CONTACTS_GROUP_CONTACTS:
+ *
+ * The system group ID for the "My Contacts" system group.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_CONTACTS_GROUP_CONTACTS "Contacts"
+
+/**
+ * GDATA_CONTACTS_GROUP_FRIENDS:
+ *
+ * The system group ID for the "Friends" system group.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_CONTACTS_GROUP_FRIENDS "Friends"
+
+/**
+ * GDATA_CONTACTS_GROUP_FAMILY:
+ *
+ * The system group ID for the "Family" system group.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_CONTACTS_GROUP_FAMILY "Family"
+
+/**
+ * GDATA_CONTACTS_GROUP_COWORKERS:
+ *
+ * The system group ID for the "Coworkers" system group.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_CONTACTS_GROUP_COWORKERS "Coworkers"
+
+#define GDATA_TYPE_CONTACTS_GROUP (gdata_contacts_group_get_type ())
+#define GDATA_CONTACTS_GROUP(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_CONTACTS_GROUP, GDataContactsGroup))
+#define GDATA_CONTACTS_GROUP_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_CONTACTS_GROUP, GDataContactsGroupClass))
+#define GDATA_IS_CONTACTS_GROUP(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_CONTACTS_GROUP))
+#define GDATA_IS_CONTACTS_GROUP_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_CONTACTS_GROUP))
+#define GDATA_CONTACTS_GROUP_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_CONTACTS_GROUP, GDataContactsGroupClass))
+
+typedef struct _GDataContactsGroupPrivate GDataContactsGroupPrivate;
+
+/**
+ * GDataContactsGroup:
+ *
+ * All the fields in the #GDataContactsGroup structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ GDataEntry parent;
+ GDataContactsGroupPrivate *priv;
+} GDataContactsGroup;
+
+/**
+ * GDataContactsGroupClass:
+ *
+ * All the fields in the #GDataContactsGroupClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataEntryClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataContactsGroupClass;
+
+GType gdata_contacts_group_get_type (void) G_GNUC_CONST;
+
+GDataContactsGroup *gdata_contacts_group_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+gint64 gdata_contacts_group_get_edited (GDataContactsGroup *self);
+gboolean gdata_contacts_group_is_deleted (GDataContactsGroup *self) G_GNUC_PURE;
+const gchar *gdata_contacts_group_get_system_group_id (GDataContactsGroup *self) G_GNUC_PURE;
+
+const gchar *gdata_contacts_group_get_extended_property (GDataContactsGroup *self, const gchar *name) G_GNUC_PURE;
+GHashTable *gdata_contacts_group_get_extended_properties (GDataContactsGroup *self) G_GNUC_PURE;
+gboolean gdata_contacts_group_set_extended_property (GDataContactsGroup *self, const gchar *name, const gchar *value);
+
+G_END_DECLS
+
+#endif /* !GDATA_CONTACTS_GROUP_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-contacts-query
+ * @short_description: GData Contacts query object
+ * @stability: Stable
+ * @include: gdata/services/contacts/gdata-contacts-query.h
+ *
+ * #GDataContactsQuery represents a collection of query parameters specific to the Google Contacts service, which go above and beyond
+ * those catered for by #GDataQuery.
+ *
+ * For more information on the custom GData query parameters supported by #GDataContactsQuery, see the <ulink type="http"
+ * url="http://code.google.com/apis/contacts/docs/2.0/reference.html#Parameters">online documentation</ulink>.
+ *
+ * <example>
+ * <title>Querying for Contacts</title>
+ * <programlisting>
+ * GDataContactsService *service;
+ * gchar *group_id;
+ * GDataContactsQuery *query;
+ * GDataFeed *feed;
+ * GList *i;
+ * GError *error = NULL;
+ *
+ * /<!-- -->* Create a service and return the group we're querying within. *<!-- -->/
+ * service = create_contacts_service ();
+ * group_id = query_user_for_group (service);
+ *
+ * /<!-- -->* Create the query to use. We're going to query for contacts which match the search term "John" within a given group,
+ * * including deleted contacts. The group is specified by its ID. *<!-- -->/
+ * query = gdata_contacts_query_new ("John");
+ * gdata_contacts_query_set_show_deleted (query, TRUE);
+ * gdata_contacts_query_set_group (query, group_id);
+ *
+ * g_free (group_id);
+ *
+ * /<!-- -->* Execute the query *<!-- -->/
+ * feed = gdata_contacts_service_query_contacts (service, query, NULL, NULL, NULL, &error);
+ *
+ * g_object_unref (query);
+ * g_object_unref (service);
+ *
+ * if (error != NULL) {
+ * g_error ("Error querying for contacts: %s", error->message);
+ * g_error_free (error);
+ * return;
+ * }
+ *
+ * /<!-- -->* Iterate through the returned contacts and do something with them *<!-- -->/
+ * for (i = gdata_feed_get_entries (feed); i != NULL; i = i->next) {
+ * GDataContactsContact *contact = GDATA_CONTACTS_CONTACT (i->data);
+ *
+ * /<!-- -->* Do something with the contact here, such as insert it into a UI *<!-- -->/
+ * }
+ *
+ * g_object_unref (feed);
+ * </programlisting>
+ * </example>
+ *
+ * Since: 0.2.0
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+
+#include "gdata-contacts-query.h"
+#include "gdata-query.h"
+#include "gdata-private.h"
+
+static void gdata_contacts_query_finalize (GObject *object);
+static void gdata_contacts_query_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_contacts_query_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void get_query_uri (GDataQuery *self, const gchar *feed_uri, GString *query_uri, gboolean *params_started);
+
+struct _GDataContactsQueryPrivate {
+ gchar *order_by; /* TODO: #defined values */
+ gboolean show_deleted;
+ gchar *sort_order; /* TODO: #defined values */
+ gchar *group;
+};
+
+enum {
+ PROP_ORDER_BY = 1,
+ PROP_SHOW_DELETED,
+ PROP_SORT_ORDER,
+ PROP_GROUP
+};
+
+G_DEFINE_TYPE (GDataContactsQuery, gdata_contacts_query, GDATA_TYPE_QUERY)
+
+static void
+gdata_contacts_query_class_init (GDataContactsQueryClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataQueryClass *query_class = GDATA_QUERY_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataContactsQueryPrivate));
+
+ gobject_class->set_property = gdata_contacts_query_set_property;
+ gobject_class->get_property = gdata_contacts_query_get_property;
+ gobject_class->finalize = gdata_contacts_query_finalize;
+
+ query_class->get_query_uri = get_query_uri;
+
+ /**
+ * GDataContactsQuery:order-by:
+ *
+ * Sorting criterion. The only supported value is <literal>lastmodified</literal>.
+ *
+ * Since: 0.2.0
+ */
+ g_object_class_install_property (gobject_class, PROP_ORDER_BY,
+ g_param_spec_string ("order-by",
+ "Order by", "Sorting criterion.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataContactsQuery:show-deleted:
+ *
+ * Whether to include deleted contacts in the query feed. Deleted contacts return %TRUE
+ * from gdata_contacts_contact_is_deleted(), and have no other information. They do not
+ * normally appear in query results.
+ *
+ * Since: 0.2.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SHOW_DELETED,
+ g_param_spec_boolean ("show-deleted",
+ "Show deleted?", "Whether to include deleted contacts in the query feed.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataContactsQuery:sort-order:
+ *
+ * Sorting order direction. Can be either <literal>ascending</literal> or <literal>descending</literal>.
+ *
+ * Since: 0.2.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SORT_ORDER,
+ g_param_spec_string ("sort-order",
+ "Sort order", "Sorting order direction.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataContactsQuery:group:
+ *
+ * Constrains the results to only those belonging to the group specified. The value of this parameter
+ * should be a group ID URI.
+ *
+ * Since: 0.2.0
+ */
+ g_object_class_install_property (gobject_class, PROP_GROUP,
+ g_param_spec_string ("group",
+ "Group", "Constrains the results to only those belonging to the group specified.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_contacts_query_init (GDataContactsQuery *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_CONTACTS_QUERY, GDataContactsQueryPrivate);
+
+ /* https://developers.google.com/google-apps/contacts/v3/reference#contacts-query-parameters-reference
+ * indicates that the Contacts service uses index pagination, but all
+ * the results include next/previous URIs, so use those instead.
+ * (We have to — the #GDataService code will use them unconditionally.) */
+ _gdata_query_set_pagination_type (GDATA_QUERY (self),
+ GDATA_QUERY_PAGINATION_URIS);
+}
+
+static void
+gdata_contacts_query_finalize (GObject *object)
+{
+ GDataContactsQueryPrivate *priv = GDATA_CONTACTS_QUERY (object)->priv;
+
+ g_free (priv->order_by);
+ g_free (priv->sort_order);
+ g_free (priv->group);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_contacts_query_parent_class)->finalize (object);
+}
+
+static void
+gdata_contacts_query_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataContactsQueryPrivate *priv = GDATA_CONTACTS_QUERY (object)->priv;
+
+ switch (property_id) {
+ case PROP_ORDER_BY:
+ g_value_set_string (value, priv->order_by);
+ break;
+ case PROP_SHOW_DELETED:
+ g_value_set_boolean (value, priv->show_deleted);
+ break;
+ case PROP_SORT_ORDER:
+ g_value_set_string (value, priv->sort_order);
+ break;
+ case PROP_GROUP:
+ g_value_set_string (value, priv->group);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_contacts_query_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataContactsQuery *self = GDATA_CONTACTS_QUERY (object);
+
+ switch (property_id) {
+ case PROP_ORDER_BY:
+ gdata_contacts_query_set_order_by (self, g_value_get_string (value));
+ break;
+ case PROP_SHOW_DELETED:
+ gdata_contacts_query_set_show_deleted (self, g_value_get_boolean (value));
+ break;
+ case PROP_SORT_ORDER:
+ gdata_contacts_query_set_sort_order (self, g_value_get_string (value));
+ break;
+ case PROP_GROUP:
+ gdata_contacts_query_set_group (self, g_value_get_string (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+get_query_uri (GDataQuery *self, const gchar *feed_uri, GString *query_uri, gboolean *params_started)
+{
+ GDataContactsQueryPrivate *priv = GDATA_CONTACTS_QUERY (self)->priv;
+
+ #define APPEND_SEP g_string_append_c (query_uri, (*params_started == FALSE) ? '?' : '&'); *params_started = TRUE;
+
+ /* Chain up to the parent class */
+ GDATA_QUERY_CLASS (gdata_contacts_query_parent_class)->get_query_uri (self, feed_uri, query_uri, params_started);
+
+ if (priv->order_by != NULL) {
+ APPEND_SEP
+ g_string_append (query_uri, "orderby=");
+ g_string_append_uri_escaped (query_uri, priv->order_by, NULL, FALSE);
+ }
+
+ APPEND_SEP
+ if (priv->show_deleted == TRUE)
+ g_string_append (query_uri, "showdeleted=true");
+ else
+ g_string_append (query_uri, "showdeleted=false");
+
+ if (priv->sort_order != NULL) {
+ APPEND_SEP
+ g_string_append (query_uri, "sortorder=");
+ g_string_append_uri_escaped (query_uri, priv->sort_order, NULL, FALSE);
+ }
+
+ if (priv->group != NULL) {
+ APPEND_SEP
+ g_string_append (query_uri, "group=");
+ g_string_append_uri_escaped (query_uri, priv->group, NULL, FALSE);
+ }
+}
+
+/**
+ * gdata_contacts_query_new:
+ * @q: (allow-none): a query string, or %NULL
+ *
+ * Creates a new #GDataContactsQuery with its #GDataQuery:q property set to @q.
+ *
+ * Return value: a new #GDataContactsQuery
+ *
+ * Since: 0.2.0
+ */
+GDataContactsQuery *
+gdata_contacts_query_new (const gchar *q)
+{
+ return g_object_new (GDATA_TYPE_CONTACTS_QUERY, "q", q, NULL);
+}
+
+/**
+ * gdata_contacts_query_new_with_limits:
+ * @q: (allow-none): a query string, or %NULL
+ * @start_index: a one-based start index for the results, or <code class="literal">0</code>
+ * @max_results: the maximum number of results to return, or <code class="literal">0</code>
+ *
+ * Creates a new #GDataContactsQuery with its #GDataQuery:q property set to @q, and the limits @start_index and @max_results
+ * applied.
+ *
+ * Return value: a new #GDataContactsQuery
+ *
+ * Since: 0.2.0
+ */
+GDataContactsQuery *
+gdata_contacts_query_new_with_limits (const gchar *q, guint start_index, guint max_results)
+{
+ return g_object_new (GDATA_TYPE_CONTACTS_QUERY,
+ "q", q,
+ "start-index", start_index,
+ "max-results", max_results,
+ NULL);
+}
+
+/**
+ * gdata_contacts_query_get_order_by:
+ * @self: a #GDataContactsQuery
+ *
+ * Gets the #GDataContactsQuery:order-by property.
+ *
+ * Return value: the order by property, or %NULL if it is unset
+ *
+ * Since: 0.2.0
+ */
+const gchar *
+gdata_contacts_query_get_order_by (GDataContactsQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_QUERY (self), NULL);
+ return self->priv->order_by;
+}
+
+/**
+ * gdata_contacts_query_set_order_by:
+ * @self: a #GDataContactsQuery
+ * @order_by: (allow-none): a new order by string, or %NULL
+ *
+ * Sets the #GDataContactsQuery:order-by property of the #GDataContactsQuery to the new order by string, @order_by.
+ *
+ * Set @order_by to %NULL to unset the property in the query URI.
+ *
+ * Since: 0.2.0
+ */
+void
+gdata_contacts_query_set_order_by (GDataContactsQuery *self, const gchar *order_by)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_QUERY (self));
+
+ g_free (self->priv->order_by);
+ self->priv->order_by = g_strdup (order_by);
+ g_object_notify (G_OBJECT (self), "order-by");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_contacts_query_show_deleted:
+ * @self: a #GDataContactsQuery
+ *
+ * Gets the #GDataContactsQuery:show-deleted property.
+ *
+ * Return value: %TRUE if deleted contacts should be shown, %FALSE otherwise
+ *
+ * Since: 0.2.0
+ */
+gboolean
+gdata_contacts_query_show_deleted (GDataContactsQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_QUERY (self), FALSE);
+ return self->priv->show_deleted;
+}
+
+/**
+ * gdata_contacts_query_set_show_deleted:
+ * @self: a #GDataContactsQuery
+ * @show_deleted: %TRUE to show deleted contacts, %FALSE otherwise
+ *
+ * Sets the #GDataContactsQuery:show-deleted property of the #GDataContactsQuery.
+ *
+ * Since: 0.2.0
+ */
+void
+gdata_contacts_query_set_show_deleted (GDataContactsQuery *self, gboolean show_deleted)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_QUERY (self));
+ self->priv->show_deleted = show_deleted;
+ g_object_notify (G_OBJECT (self), "show-deleted");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_contacts_query_get_sort_order:
+ * @self: a #GDataContactsQuery
+ *
+ * Gets the #GDataContactsQuery:sort-order property.
+ *
+ * Return value: the sort order property, or %NULL if it is unset
+ *
+ * Since: 0.2.0
+ */
+const gchar *
+gdata_contacts_query_get_sort_order (GDataContactsQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_QUERY (self), NULL);
+ return self->priv->sort_order;
+}
+
+/**
+ * gdata_contacts_query_set_sort_order:
+ * @self: a #GDataContactsQuery
+ * @sort_order: (allow-none): a new sort order string, or %NULL
+ *
+ * Sets the #GDataContactsQuery:sort-order property of the #GDataContactsQuery to the new sort order string, @sort_order.
+ *
+ * Set @sort_order to %NULL to unset the property in the query URI.
+ *
+ * Since: 0.2.0
+ */
+void
+gdata_contacts_query_set_sort_order (GDataContactsQuery *self, const gchar *sort_order)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_QUERY (self));
+
+ g_free (self->priv->sort_order);
+ self->priv->sort_order = g_strdup (sort_order);
+ g_object_notify (G_OBJECT (self), "sort-order");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_contacts_query_get_group:
+ * @self: a #GDataContactsQuery
+ *
+ * Gets the #GDataContactsQuery:group property.
+ *
+ * Return value: the group property, or %NULL if it is unset
+ *
+ * Since: 0.2.0
+ */
+const gchar *
+gdata_contacts_query_get_group (GDataContactsQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_CONTACTS_QUERY (self), NULL);
+ return self->priv->group;
+}
+
+/**
+ * gdata_contacts_query_set_group:
+ * @self: a #GDataContactsQuery
+ * @group: (allow-none): a new group ID URI, or %NULL
+ *
+ * Sets the #GDataContactsQuery:group property of the #GDataContactsQuery to the new group ID URI, @group.
+ *
+ * Set @group to %NULL to unset the property in the query URI.
+ *
+ * Since: 0.2.0
+ */
+void
+gdata_contacts_query_set_group (GDataContactsQuery *self, const gchar *group)
+{
+ g_return_if_fail (GDATA_IS_CONTACTS_QUERY (self));
+
+ g_free (self->priv->group);
+ self->priv->group = g_strdup (group);
+ g_object_notify (G_OBJECT (self), "group");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_CONTACTS_QUERY_H
+#define GDATA_CONTACTS_QUERY_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-query.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_CONTACTS_QUERY (gdata_contacts_query_get_type ())
+#define GDATA_CONTACTS_QUERY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_CONTACTS_QUERY, GDataContactsQuery))
+#define GDATA_CONTACTS_QUERY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_CONTACTS_QUERY, GDataContactsQueryClass))
+#define GDATA_IS_CONTACTS_QUERY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_CONTACTS_QUERY))
+#define GDATA_IS_CONTACTS_QUERY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_CONTACTS_QUERY))
+#define GDATA_CONTACTS_QUERY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_CONTACTS_QUERY, GDataContactsQueryClass))
+
+typedef struct _GDataContactsQueryPrivate GDataContactsQueryPrivate;
+
+/**
+ * GDataContactsQuery:
+ *
+ * All the fields in the #GDataContactsQuery structure are private and should never be accessed directly.
+ *
+ * Since: 0.2.0
+ */
+typedef struct {
+ GDataQuery parent;
+ GDataContactsQueryPrivate *priv;
+} GDataContactsQuery;
+
+/**
+ * GDataContactsQueryClass:
+ *
+ * All the fields in the #GDataContactsQueryClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.2.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataQueryClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataContactsQueryClass;
+
+GType gdata_contacts_query_get_type (void) G_GNUC_CONST;
+
+GDataContactsQuery *gdata_contacts_query_new (const gchar *q) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+GDataContactsQuery *gdata_contacts_query_new_with_limits (const gchar *q, guint start_index,
+ guint max_results) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_contacts_query_get_order_by (GDataContactsQuery *self) G_GNUC_PURE;
+void gdata_contacts_query_set_order_by (GDataContactsQuery *self, const gchar *order_by);
+gboolean gdata_contacts_query_show_deleted (GDataContactsQuery *self) G_GNUC_PURE;
+void gdata_contacts_query_set_show_deleted (GDataContactsQuery *self, gboolean show_deleted);
+const gchar *gdata_contacts_query_get_sort_order (GDataContactsQuery *self) G_GNUC_PURE;
+void gdata_contacts_query_set_sort_order (GDataContactsQuery *self, const gchar *sort_order);
+const gchar *gdata_contacts_query_get_group (GDataContactsQuery *self) G_GNUC_PURE;
+void gdata_contacts_query_set_group (GDataContactsQuery *self, const gchar *group);
+
+G_END_DECLS
+
+#endif /* !GDATA_CONTACTS_QUERY_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-contacts-service
+ * @short_description: GData Contacts service object
+ * @stability: Stable
+ * @include: gdata/services/contacts/gdata-contacts-service.h
+ *
+ * #GDataContactsService is a subclass of #GDataService for communicating with the GData API of Google Contacts. It supports querying
+ * for, inserting, editing and deleting contacts from a Google address book.
+ *
+ * For more details of Google Contacts' GData API, see the <ulink type="http" url="http://code.google.com/apis/contacts/docs/2.0/reference.html">
+ * online documentation</ulink>.
+ *
+ * <example>
+ * <title>Querying for Groups</title>
+ * <programlisting>
+ * GDataContactsService *service;
+ * GDataFeed *feed;
+ * GList *i;
+ * GError *error = NULL;
+ *
+ * /<!-- -->* Create a service *<!-- -->/
+ * service = create_contacts_service ();
+ *
+ * /<!-- -->* Query for groups *<!-- -->/
+ * feed = gdata_contacts_service_query_groups (service, NULL, NULL, NULL, NULL, &error);
+ *
+ * g_object_unref (service);
+ *
+ * if (error != NULL) {
+ * g_error ("Error querying for groups: %s", error->message);
+ * g_error_free (error);
+ * return;
+ * }
+ *
+ * /<!-- -->* Iterate through the returned groups and do something with them *<!-- -->/
+ * for (i = gdata_feed_get_entries (feed); i != NULL; i = i->next) {
+ * const gchar *system_group_id, *group_name;
+ * gboolean is_system_group;
+ * GDataContactsGroup *group = GDATA_CONTACTS_GROUP (i->data);
+ *
+ * /<!-- -->* Determine whether the group's a system group. If so, you should use the system group ID to provide your application's own
+ * * translations of the group name, as it's not translated. *<!-- -->/
+ * system_group_id = gdata_contacts_group_get_system_group_id (group);
+ * is_system_group = (system_group_id != NULL) ? TRUE : FALSE;
+ * group_name = (is_system_group == TRUE) ? get_group_name_for_system_group_id (system_group_id)
+ * : gdata_entry_get_title (GDATA_ENTRY (group));
+ *
+ * /<!-- -->* Do something with the group here, such as insert it into a UI. Note that system groups are not allowed to be deleted,
+ * * so you may want to make certain parts of your UI insensitive accordingly if the group is a system group. *<!-- -->/
+ * }
+ *
+ * g_object_unref (feed);
+ * </programlisting>
+ * </example>
+ *
+ * The Contacts service can be manipulated using batch operations, too. See the
+ * <ulink type="http" url="http://code.google.com/apis/contacts/docs/3.0/developers_guide_protocol.html#Batch">online documentation on batch
+ * operations</ulink> for more information.
+ *
+ * <example>
+ * <title>Performing a Batch Operation on Contacts</title>
+ * <programlisting>
+ * GDataContactsService *service;
+ * GDataBatchOperation *operation;
+ * GDataFeed *feed;
+ * GDataLink *batch_link;
+ * GList *i;
+ * GError *error = NULL;
+ *
+ * /<!-- -->* Create a service *<!-- -->/
+ * service = create_contacts_service ();
+ *
+ * /<!-- -->* Create the batch operation; this requires that we have done a query first so that we can get the batch link *<!-- -->/
+ * feed = do_some_query (service);
+ * batch_link = gdata_feed_look_up_link (feed, GDATA_LINK_BATCH);
+ * operation = gdata_batchable_create_operation (GDATA_BATCHABLE (service), gdata_link_get_uri (batch_link));
+ * g_object_unref (feed);
+ *
+ * gdata_batch_operation_add_query (operation, contact_entry_id_to_query, GDATA_TYPE_CONTACTS_CONTACT,
+ * (GDataBatchOperationCallback) batch_query_cb, user_data);
+ * gdata_batch_operation_add_insertion (operation, new_entry, (GDataBatchOperationCallback) batch_insertion_cb, user_data);
+ * gdata_batch_operation_add_update (operation, old_entry, (GDataBatchOperationCallback) batch_update_cb, user_data);
+ * gdata_batch_operation_add_deletion (operation, entry_to_delete, (GDataBatchOperationCallback) batch_deletion_cb, user_data);
+ *
+ * /<!-- -->* Run the batch operation and handle the results in the various callbacks *<!-- -->/
+ * gdata_test_batch_operation_run (operation, NULL, &error);
+ *
+ * g_object_unref (operation);
+ * g_object_unref (service);
+ *
+ * if (error != NULL) {
+ * g_error ("Error running batch operation: %s", error->message);
+ * g_error_free (error);
+ * return;
+ * }
+ *
+ * static void
+ * batch_query_cb (guint operation_id, GDataBatchOperationType operation_type, GDataEntry *entry, GError *error, gpointer user_data)
+ * {
+ * /<!-- -->* operation_type == GDATA_BATCH_OPERATION_QUERY *<!-- -->/
+ * /<!-- -->* Reference and do something with the returned entry. *<!-- -->/
+ * }
+ *
+ * static void
+ * batch_insertion_cb (guint operation_id, GDataBatchOperationType operation_type, GDataEntry *entry, GError *error, gpointer user_data)
+ * {
+ * /<!-- -->* operation_type == GDATA_BATCH_OPERATION_INSERTION *<!-- -->/
+ * /<!-- -->* Reference and do something with the returned entry. *<!-- -->/
+ * }
+ *
+ * static void
+ * batch_update_cb (guint operation_id, GDataBatchOperationType operation_type, GDataEntry *entry, GError *error, gpointer user_data)
+ * {
+ * /<!-- -->* operation_type == GDATA_BATCH_OPERATION_UPDATE *<!-- -->/
+ * /<!-- -->* Reference and do something with the returned entry. *<!-- -->/
+ * }
+ *
+ * static void
+ * batch_deletion_cb (guint operation_id, GDataBatchOperationType operation_type, GDataEntry *entry, GError *error, gpointer user_data)
+ * {
+ * /<!-- -->* operation_type == GDATA_BATCH_OPERATION_DELETION, entry == NULL *<!-- -->/
+ * }
+ * </programlisting>
+ * </example>
+ *
+ * Since: 0.2.0
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <libsoup/soup.h>
+#include <string.h>
+
+#include "gdata-contacts-service.h"
+#include "gdata-batchable.h"
+#include "gdata-service.h"
+#include "gdata-private.h"
+#include "gdata-query.h"
+
+static GList *get_authorization_domains (void);
+
+_GDATA_DEFINE_AUTHORIZATION_DOMAIN (contacts, "cp", "https://www.google.com/m8/feeds/")
+G_DEFINE_TYPE_WITH_CODE (GDataContactsService, gdata_contacts_service, GDATA_TYPE_SERVICE,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_BATCHABLE, NULL))
+
+static void
+gdata_contacts_service_class_init (GDataContactsServiceClass *klass)
+{
+ GDataServiceClass *service_class = GDATA_SERVICE_CLASS (klass);
+ service_class->api_version = "3";
+ service_class->get_authorization_domains = get_authorization_domains;
+}
+
+static void
+gdata_contacts_service_init (GDataContactsService *self)
+{
+ /* Nothing to see here */
+}
+
+static GList *
+get_authorization_domains (void)
+{
+ return g_list_prepend (NULL, get_contacts_authorization_domain ());
+}
+
+/**
+ * gdata_contacts_service_new:
+ * @authorizer: (allow-none): a #GDataAuthorizer to authorize the service's requests, or %NULL
+ *
+ * Creates a new #GDataContactsService using the given #GDataAuthorizer. If @authorizer is %NULL, all requests are made as an unauthenticated user.
+ *
+ * Return value: a new #GDataContactsService, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.9.0
+ */
+GDataContactsService *
+gdata_contacts_service_new (GDataAuthorizer *authorizer)
+{
+ g_return_val_if_fail (authorizer == NULL || GDATA_IS_AUTHORIZER (authorizer), NULL);
+
+ return g_object_new (GDATA_TYPE_CONTACTS_SERVICE,
+ "authorizer", authorizer,
+ NULL);
+}
+
+/**
+ * gdata_contacts_service_get_primary_authorization_domain:
+ *
+ * The primary #GDataAuthorizationDomain for interacting with Google Contacts. This will not normally need to be used, as it's used internally
+ * by the #GDataContactsService methods. However, if using the plain #GDataService methods to implement custom queries or requests which libgdata
+ * does not support natively, then this domain may be needed to authorize the requests.
+ *
+ * The domain never changes, and is interned so that pointer comparison can be used to differentiate it from other authorization domains.
+ *
+ * Return value: (transfer none): the service's authorization domain
+ *
+ * Since: 0.9.0
+ */
+GDataAuthorizationDomain *
+gdata_contacts_service_get_primary_authorization_domain (void)
+{
+ return get_contacts_authorization_domain ();
+}
+
+/**
+ * gdata_contacts_service_query_contacts:
+ * @self: a #GDataContactsService
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (scope call) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @error: a #GError, or %NULL
+ *
+ * Queries the service to return a list of contacts matching the given @query.
+ *
+ * For more details, see gdata_service_query().
+ *
+ * Return value: (transfer full): a #GDataFeed of query results; unref with g_object_unref()
+ *
+ * Since: 0.2.0
+ */
+GDataFeed *
+gdata_contacts_service_query_contacts (GDataContactsService *self, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error)
+{
+ GDataFeed *feed;
+ gchar *request_uri;
+
+ g_return_val_if_fail (GDATA_IS_CONTACTS_SERVICE (self), NULL);
+ g_return_val_if_fail (query == NULL || GDATA_IS_QUERY (query), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ /* Ensure we're authenticated first */
+ if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (self)),
+ get_contacts_authorization_domain ()) == FALSE) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED,
+ _("You must be authenticated to query contacts."));
+ return NULL;
+ }
+
+ request_uri = g_strconcat (_gdata_service_get_scheme (), "://www.google.com/m8/feeds/contacts/default/full", NULL);
+ feed = gdata_service_query (GDATA_SERVICE (self), get_contacts_authorization_domain (), request_uri, GDATA_QUERY (query),
+ GDATA_TYPE_CONTACTS_CONTACT, cancellable, progress_callback, progress_user_data, error);
+ g_free (request_uri);
+
+ return feed;
+}
+
+/**
+ * gdata_contacts_service_query_contacts_async:
+ * @self: a #GDataContactsService
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @destroy_progress_user_data: (allow-none): the function to call when @progress_callback will not be called any more, or %NULL. This function will be
+ * called with @progress_user_data as a parameter and can be used to free any memory allocated for it.
+ * @callback: a #GAsyncReadyCallback to call when the query is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Queries the service to return a list of contacts matching the given @query. @self and
+ * @query are all reffed when this function is called, so can safely be unreffed after this function returns.
+ *
+ * For more details, see gdata_contacts_service_query_contacts(), which is the synchronous version of this function,
+ * and gdata_service_query_async(), which is the base asynchronous query function.
+ *
+ * Since: 0.9.1
+ */
+void
+gdata_contacts_service_query_contacts_async (GDataContactsService *self, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ gchar *request_uri;
+
+ g_return_if_fail (GDATA_IS_CONTACTS_SERVICE (self));
+ g_return_if_fail (query == NULL || GDATA_IS_QUERY (query));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+ g_return_if_fail (callback != NULL);
+
+ /* Ensure we're authenticated first */
+ if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (self)),
+ get_contacts_authorization_domain ()) == FALSE) {
+ g_autoptr(GTask) task = NULL;
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_service_query_async);
+ g_task_return_new_error (task, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED, "%s",
+ _("You must be authenticated to query contacts."));
+
+ return;
+ }
+
+ request_uri = g_strconcat (_gdata_service_get_scheme (), "://www.google.com/m8/feeds/contacts/default/full", NULL);
+ gdata_service_query_async (GDATA_SERVICE (self), get_contacts_authorization_domain (), request_uri, GDATA_QUERY (query),
+ GDATA_TYPE_CONTACTS_CONTACT, cancellable, progress_callback, progress_user_data,
+ destroy_progress_user_data, callback, user_data);
+ g_free (request_uri);
+}
+
+/**
+ * gdata_contacts_service_insert_contact:
+ * @self: a #GDataContactsService
+ * @contact: the #GDataContactsContact to insert
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Inserts @contact by uploading it to the online contacts service.
+ *
+ * For more details, see gdata_service_insert_entry().
+ *
+ * Return value: (transfer full): an updated #GDataContactsContact, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.2.0
+ */
+GDataContactsContact *
+gdata_contacts_service_insert_contact (GDataContactsService *self, GDataContactsContact *contact, GCancellable *cancellable, GError **error)
+{
+ gchar *uri;
+ GDataEntry *entry;
+
+ g_return_val_if_fail (GDATA_IS_CONTACTS_SERVICE (self), NULL);
+ g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (contact), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ uri = g_strconcat (_gdata_service_get_scheme (), "://www.google.com/m8/feeds/contacts/default/full", NULL);
+ entry = gdata_service_insert_entry (GDATA_SERVICE (self), get_contacts_authorization_domain (), uri, GDATA_ENTRY (contact), cancellable,
+ error);
+ g_free (uri);
+
+ return GDATA_CONTACTS_CONTACT (entry);
+}
+
+/**
+ * gdata_contacts_service_insert_contact_async:
+ * @self: a #GDataContactsService
+ * @contact: the #GDataContactsContact to insert
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when insertion is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Inserts @contact by uploading it to the online contacts service. @self and @contact are both reffed when this function is called, so can safely be
+ * unreffed after this function returns.
+ *
+ * @callback should call gdata_service_insert_entry_finish() to obtain a #GDataContactsContact representing the inserted contact and to check for
+ * possible errors.
+ *
+ * For more details, see gdata_contacts_service_insert_contact(), which is the synchronous version of this function,
+ * and gdata_service_insert_entry_async(), which is the base asynchronous insertion function.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_service_insert_contact_async (GDataContactsService *self, GDataContactsContact *contact, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ gchar *uri;
+
+ g_return_if_fail (GDATA_IS_CONTACTS_SERVICE (self));
+ g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (contact));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+
+ uri = g_strconcat (_gdata_service_get_scheme (), "://www.google.com/m8/feeds/contacts/default/full", NULL);
+ gdata_service_insert_entry_async (GDATA_SERVICE (self), get_contacts_authorization_domain (), uri, GDATA_ENTRY (contact), cancellable,
+ callback, user_data);
+ g_free (uri);
+}
+
+/**
+ * gdata_contacts_service_query_groups:
+ * @self: a #GDataContactsService
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (scope call) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @error: a #GError, or %NULL
+ *
+ * Queries the service to return a list of groups matching the given @query.
+ *
+ * For more details, see gdata_service_query().
+ *
+ * Return value: (transfer full): a #GDataFeed of query results; unref with g_object_unref()
+ *
+ * Since: 0.7.0
+ */
+GDataFeed *
+gdata_contacts_service_query_groups (GDataContactsService *self, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error)
+{
+ GDataFeed *feed;
+ gchar *request_uri;
+
+ g_return_val_if_fail (GDATA_IS_CONTACTS_SERVICE (self), NULL);
+ g_return_val_if_fail (query == NULL || GDATA_IS_QUERY (query), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ /* Ensure we're authenticated first */
+ if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (self)),
+ get_contacts_authorization_domain ()) == FALSE) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED,
+ _("You must be authenticated to query contact groups."));
+ return NULL;
+ }
+
+ request_uri = g_strconcat (_gdata_service_get_scheme (), "://www.google.com/m8/feeds/groups/default/full", NULL);
+ feed = gdata_service_query (GDATA_SERVICE (self), get_contacts_authorization_domain (), request_uri, GDATA_QUERY (query),
+ GDATA_TYPE_CONTACTS_GROUP, cancellable, progress_callback, progress_user_data, error);
+ g_free (request_uri);
+
+ return feed;
+}
+
+/**
+ * gdata_contacts_service_query_groups_async:
+ * @self: a #GDataContactsService
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @destroy_progress_user_data: (allow-none): the function to call when @progress_callback will not be called any more, or %NULL. This function will be
+ * called with @progress_user_data as a parameter and can be used to free any memory allocated for it.
+ * @callback: a #GAsyncReadyCallback to call when the query is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Queries the service to return a list of groups matching the given @query. @self and @query are all reffed when this function is called, so can
+ * safely be unreffed after this function returns.
+ *
+ * For more details, see gdata_contacts_service_query_groups(), which is the synchronous version of this function, and gdata_service_query_async(),
+ * which is the base asynchronous query function.
+ *
+ * Since: 0.9.1
+ */
+void
+gdata_contacts_service_query_groups_async (GDataContactsService *self, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ gchar *request_uri;
+
+ g_return_if_fail (GDATA_IS_CONTACTS_SERVICE (self));
+ g_return_if_fail (query == NULL || GDATA_IS_QUERY (query));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+ g_return_if_fail (callback != NULL);
+
+ /* Ensure we're authenticated first */
+ if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (self)),
+ get_contacts_authorization_domain ()) == FALSE) {
+ g_autoptr(GTask) task = NULL;
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_service_query_async);
+ g_task_return_new_error (task, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED, "%s",
+ _("You must be authenticated to query contact groups."));
+
+ return;
+ }
+
+ request_uri = g_strconcat (_gdata_service_get_scheme (), "://www.google.com/m8/feeds/groups/default/full", NULL);
+ gdata_service_query_async (GDATA_SERVICE (self), get_contacts_authorization_domain (), request_uri, GDATA_QUERY (query),
+ GDATA_TYPE_CONTACTS_GROUP, cancellable, progress_callback, progress_user_data,
+ destroy_progress_user_data, callback, user_data);
+ g_free (request_uri);
+}
+
+/**
+ * gdata_contacts_service_insert_group:
+ * @self: a #GDataContactsService
+ * @group: a #GDataContactsGroup to create on the server
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Inserts a new contact group described by @group. The user must be authenticated to use this function.
+ *
+ * Return value: (transfer full): the inserted #GDataContactsGroup; unref with g_object_unref()
+ *
+ * Since: 0.7.0
+ */
+GDataContactsGroup *
+gdata_contacts_service_insert_group (GDataContactsService *self, GDataContactsGroup *group, GCancellable *cancellable, GError **error)
+{
+ gchar *request_uri;
+ GDataEntry *new_group;
+
+ g_return_val_if_fail (GDATA_IS_CONTACTS_SERVICE (self), NULL);
+ g_return_val_if_fail (GDATA_IS_CONTACTS_GROUP (group), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ if (gdata_entry_is_inserted (GDATA_ENTRY (group)) == TRUE) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_ENTRY_ALREADY_INSERTED,
+ _("The group has already been inserted."));
+ return NULL;
+ }
+
+ if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (self)),
+ get_contacts_authorization_domain ()) == FALSE) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED,
+ _("You must be authenticated to insert a group."));
+ return NULL;
+ }
+
+ request_uri = g_strconcat (_gdata_service_get_scheme (), "://www.google.com/m8/feeds/groups/default/full", NULL);
+ new_group = gdata_service_insert_entry (GDATA_SERVICE (self), get_contacts_authorization_domain (), request_uri, GDATA_ENTRY (group),
+ cancellable, error);
+ g_free (request_uri);
+
+ return GDATA_CONTACTS_GROUP (new_group);
+}
+
+/**
+ * gdata_contacts_service_insert_group_async:
+ * @self: a #GDataContactsService
+ * @group: the #GDataContactsGroup to insert
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when insertion is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Inserts a new contact group described by @group. The user must be authenticated to use this function. @self and @group are both reffed when this
+ * function is called, so can safely be unreffed after this function returns.
+ *
+ * @callback should call gdata_service_insert_entry_finish() to obtain a #GDataContactsGroup representing the inserted group and to check for possible
+ * errors.
+ *
+ * For more details, see gdata_contacts_service_insert_group(), which is the synchronous version of this function, and
+ * gdata_service_insert_entry_async(), which is the base asynchronous insertion function.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_contacts_service_insert_group_async (GDataContactsService *self, GDataContactsGroup *group, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ gchar *request_uri;
+
+ g_return_if_fail (GDATA_IS_CONTACTS_SERVICE (self));
+ g_return_if_fail (GDATA_IS_CONTACTS_GROUP (group));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+
+ request_uri = g_strconcat (_gdata_service_get_scheme (), "://www.google.com/m8/feeds/groups/default/full", NULL);
+ gdata_service_insert_entry_async (GDATA_SERVICE (self), get_contacts_authorization_domain (), request_uri, GDATA_ENTRY (group), cancellable,
+ callback, user_data);
+ g_free (request_uri);
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_CONTACTS_SERVICE_H
+#define GDATA_CONTACTS_SERVICE_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-service.h>
+#include <gdata/gdata-query.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_CONTACTS_SERVICE (gdata_contacts_service_get_type ())
+#define GDATA_CONTACTS_SERVICE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_CONTACTS_SERVICE, GDataContactsService))
+#define GDATA_CONTACTS_SERVICE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_CONTACTS_SERVICE, GDataContactsServiceClass))
+#define GDATA_IS_CONTACTS_SERVICE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_CONTACTS_SERVICE))
+#define GDATA_IS_CONTACTS_SERVICE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_CONTACTS_SERVICE))
+#define GDATA_CONTACTS_SERVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_CONTACTS_SERVICE, GDataContactsServiceClass))
+
+typedef struct _GDataContactsServicePrivate GDataContactsServicePrivate;
+
+/**
+ * GDataContactsService:
+ *
+ * All the fields in the #GDataContactsService structure are private and should never be accessed directly.
+ *
+ * Since: 0.2.0
+ */
+typedef struct {
+ GDataService parent;
+} GDataContactsService;
+
+/**
+ * GDataContactsServiceClass:
+ *
+ * All the fields in the #GDataContactsServiceClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.2.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataServiceClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+ void (*_g_reserved2) (void);
+ void (*_g_reserved3) (void);
+ void (*_g_reserved4) (void);
+ void (*_g_reserved5) (void);
+} GDataContactsServiceClass;
+
+GType gdata_contacts_service_get_type (void) G_GNUC_CONST;
+
+GDataContactsService *gdata_contacts_service_new (GDataAuthorizer *authorizer) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+GDataAuthorizationDomain *gdata_contacts_service_get_primary_authorization_domain (void) G_GNUC_CONST;
+
+GDataFeed *gdata_contacts_service_query_contacts (GDataContactsService *self, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_contacts_service_query_contacts_async (GDataContactsService *self, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
+ GAsyncReadyCallback callback, gpointer user_data);
+
+#include <gdata/services/contacts/gdata-contacts-contact.h>
+
+GDataContactsContact *gdata_contacts_service_insert_contact (GDataContactsService *self, GDataContactsContact *contact,
+ GCancellable *cancellable, GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_contacts_service_insert_contact_async (GDataContactsService *self, GDataContactsContact *contact, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data);
+
+#include <gdata/services/contacts/gdata-contacts-group.h>
+
+GDataFeed *gdata_contacts_service_query_groups (GDataContactsService *self, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_contacts_service_query_groups_async (GDataContactsService *self, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
+ GAsyncReadyCallback callback, gpointer user_data);
+
+GDataContactsGroup *gdata_contacts_service_insert_group (GDataContactsService *self, GDataContactsGroup *group,
+ GCancellable *cancellable, GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_contacts_service_insert_group_async (GDataContactsService *self, GDataContactsGroup *group, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data);
+
+G_END_DECLS
+
+#endif /* !GDATA_CONTACTS_SERVICE_H */
--- /dev/null
+headers = files(
+ 'gdata-contacts-contact.h',
+ 'gdata-contacts-group.h',
+ 'gdata-contacts-query.h',
+ 'gdata-contacts-service.h',
+)
+
+install_headers(
+ headers,
+ subdir: gdata_include_subdir / 'services/contacts',
+)
+
+gir_headers += headers
+
+sources += files(
+ 'gdata-contacts-contact.c',
+ 'gdata-contacts-group.c',
+ 'gdata-contacts-query.c',
+ 'gdata-contacts-service.c',
+)
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Red Hat, Inc. 2015
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-documents-access-rule
+ * @short_description: GData Documents access rule object
+ * @stability: Stable
+ * @include: gdata/services/documents/gdata-documents-access-rule.h
+ *
+ * #GDataDocumentsAccessRule is a subclass of #GDataAccessRule to represent an
+ * access rule affecting users of a Google Documents entry.
+ *
+ * Since: 0.17.2
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+
+#include "gdata-documents-access-rule.h"
+#include "gdata-parser.h"
+#include "gdata-private.h"
+
+static void gdata_documents_access_rule_finalize (GObject *object);
+static gboolean parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error);
+static gboolean post_parse_json (GDataParsable *parsable, gpointer user_data, GError **error);
+static const gchar *get_content_type (void);
+static void get_json (GDataParsable *parsable, JsonBuilder *builder);
+
+typedef struct {
+ gchar *domain;
+ gchar *email;
+ gchar *scope_type;
+} GDataDocumentsAccessRulePrivate;
+
+G_DEFINE_TYPE_WITH_PRIVATE (GDataDocumentsAccessRule, gdata_documents_access_rule, GDATA_TYPE_ACCESS_RULE)
+
+static void
+gdata_documents_access_rule_class_init (GDataDocumentsAccessRuleClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ gobject_class->finalize = gdata_documents_access_rule_finalize;
+ parsable_class->parse_json = parse_json;
+ parsable_class->post_parse_json = post_parse_json;
+ parsable_class->get_content_type = get_content_type;
+ parsable_class->get_json = get_json;
+}
+
+static void
+gdata_documents_access_rule_init (GDataDocumentsAccessRule *self)
+{
+ /* Nothing to do here. */
+}
+
+static void
+gdata_documents_access_rule_finalize (GObject *object)
+{
+ GDataDocumentsAccessRulePrivate *priv;
+
+ priv = gdata_documents_access_rule_get_instance_private (GDATA_DOCUMENTS_ACCESS_RULE (object));
+
+ g_free (priv->domain);
+ g_free (priv->email);
+ g_free (priv->scope_type);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_documents_access_rule_parent_class)->finalize (object);
+}
+
+static gboolean
+parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error)
+{
+ GDataDocumentsAccessRulePrivate *priv;
+ gboolean success;
+ gchar *key = NULL;
+ gchar *role = NULL;
+ gchar *scope_type = NULL;
+
+ priv = gdata_documents_access_rule_get_instance_private (GDATA_DOCUMENTS_ACCESS_RULE (parsable));
+
+ /* JSON format: https://developers.google.com/drive/v2/reference/permissions */
+
+ if (gdata_parser_string_from_json_member (reader, "emailAddress", P_REQUIRED | P_NON_EMPTY, &(priv->email), &success, error) == TRUE ||
+ gdata_parser_string_from_json_member (reader, "domain", P_REQUIRED | P_NON_EMPTY, &(priv->domain), &success, error) == TRUE) {
+ return success;
+ } else if (gdata_parser_string_from_json_member (reader, "authKey", P_REQUIRED | P_NON_EMPTY, &key, &success, error) == TRUE) {
+ if (success && key != NULL && key[0] != '\0')
+ _gdata_access_rule_set_key (GDATA_ACCESS_RULE (parsable), key);
+
+ g_free (key);
+ return success;
+ } else if (gdata_parser_string_from_json_member (reader, "role", P_REQUIRED | P_NON_EMPTY, &role, &success, error) == TRUE) {
+ if (success && role != NULL && role[0] != '\0')
+ gdata_access_rule_set_role (GDATA_ACCESS_RULE (parsable), role);
+
+ g_free (role);
+ return success;
+ } else if (gdata_parser_string_from_json_member (reader, "type", P_REQUIRED | P_NON_EMPTY, &scope_type, &success, error) == TRUE) {
+ if (g_strcmp0 (scope_type, "anyone") == 0) {
+ priv->scope_type = g_strdup (GDATA_ACCESS_SCOPE_DEFAULT);
+ } else {
+ priv->scope_type = scope_type;
+ scope_type = NULL;
+ }
+
+ g_free (scope_type);
+ return success;
+ }
+
+ return GDATA_PARSABLE_CLASS (gdata_documents_access_rule_parent_class)->parse_json (parsable, reader, user_data, error);
+}
+
+static gboolean
+post_parse_json (GDataParsable *parsable, gpointer user_data, GError **error)
+{
+ GDataDocumentsAccessRulePrivate *priv;
+
+ priv = gdata_documents_access_rule_get_instance_private (GDATA_DOCUMENTS_ACCESS_RULE (parsable));
+
+ if (g_strcmp0 (priv->scope_type, GDATA_ACCESS_SCOPE_DEFAULT) == 0) {
+ gdata_access_rule_set_scope (GDATA_ACCESS_RULE (parsable), priv->scope_type, NULL);
+ } else if (g_strcmp0 (priv->scope_type, "group") == 0 || g_strcmp0 (priv->scope_type, GDATA_ACCESS_SCOPE_USER) == 0) {
+ if (priv->email == NULL || priv->email[0] == '\0') {
+ g_set_error (error, GDATA_PARSER_ERROR, GDATA_PARSER_ERROR_PARSING_STRING,
+ /* Translators: the parameter is an error message */
+ _("Error parsing JSON: %s"),
+ "Permission type ‘group’ or ‘user’ needs an ‘emailAddress’ property.");
+ return FALSE;
+ } else {
+ gdata_access_rule_set_scope (GDATA_ACCESS_RULE (parsable), priv->scope_type, priv->email);
+ }
+ } else if (g_strcmp0 (priv->scope_type, GDATA_ACCESS_SCOPE_DOMAIN) == 0) {
+ if (priv->domain == NULL || priv->domain[0] == '\0') {
+ g_set_error (error, GDATA_PARSER_ERROR, GDATA_PARSER_ERROR_PARSING_STRING,
+ /* Translators: the parameter is an error message */
+ _("Error parsing JSON: %s"),
+ "Permission type ‘domain’ needs a ‘domain’ property.");
+ return FALSE;
+ } else {
+ gdata_access_rule_set_scope (GDATA_ACCESS_RULE (parsable), priv->scope_type, priv->domain);
+ }
+ }
+
+ return TRUE;
+}
+
+static const gchar *
+get_content_type (void)
+{
+ return "application/json";
+}
+
+static void
+get_json (GDataParsable *parsable, JsonBuilder *builder)
+{
+ const gchar *key;
+ const gchar *role;
+ const gchar *scope_type;
+ const gchar *scope_value;
+
+ GDATA_PARSABLE_CLASS (gdata_documents_access_rule_parent_class)->get_json (parsable, builder);
+
+ key = gdata_access_rule_get_key (GDATA_ACCESS_RULE (parsable));
+ if (key != NULL && key[0] != '\0') {
+ json_builder_set_member_name (builder, "authKey");
+ json_builder_add_string_value (builder, key);
+ }
+
+ role = gdata_access_rule_get_role (GDATA_ACCESS_RULE (parsable));
+ if (role != NULL && role[0] != '\0') {
+ json_builder_set_member_name (builder, "role");
+ json_builder_add_string_value (builder, role);
+ }
+
+ gdata_access_rule_get_scope (GDATA_ACCESS_RULE (parsable), &scope_type, &scope_value);
+
+ if (scope_type != NULL && scope_type[0] != '\0') {
+ if (g_strcmp0 (scope_type, GDATA_ACCESS_SCOPE_DEFAULT) == 0)
+ scope_type = "anyone";
+
+ json_builder_set_member_name (builder, "type");
+ json_builder_add_string_value (builder, scope_type);
+ }
+
+ if (scope_value != NULL && scope_value[0] != '\0') {
+ json_builder_set_member_name (builder, "value");
+ json_builder_add_string_value (builder, scope_value);
+ }
+}
+
+/**
+ * gdata_documents_access_rule_new:
+ * @id: the access rule's ID, or %NULL
+ *
+ * Creates a new #GDataDocumentsAccessRule with the given ID and default
+ * properties.
+ *
+ * Return value: (transfer full): a new #GDataDocumentsAccessRule; unref with
+ * g_object_unref()
+ *
+ * Since: 0.17.2
+ */
+GDataDocumentsAccessRule *
+gdata_documents_access_rule_new (const gchar *id)
+{
+ GObject *retval = NULL; /* owned */
+
+ retval = g_object_new (GDATA_TYPE_DOCUMENTS_ACCESS_RULE,
+ "id", id,
+ NULL);
+ return GDATA_DOCUMENTS_ACCESS_RULE (retval);
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Red Hat, Inc. 2015
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_DOCUMENTS_ACCESS_RULE_H
+#define GDATA_DOCUMENTS_ACCESS_RULE_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-access-rule.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_DOCUMENTS_ACCESS_RULE (gdata_documents_access_rule_get_type ())
+#define GDATA_DOCUMENTS_ACCESS_RULE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_DOCUMENTS_ACCESS_RULE, GDataDocumentsAccessRule))
+#define GDATA_DOCUMENTS_ACCESS_RULE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_DOCUMENTS_ACCESS_RULE, GDataDocumentsAccessRuleClass))
+#define GDATA_IS_DOCUMENTS_ACCESS_RULE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_DOCUMENTS_ACCESS_RULE))
+#define GDATA_IS_DOCUMENTS_ACCESS_RULE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_DOCUMENTS_ACCESS_RULE))
+#define GDATA_DOCUMENTS_ACCESS_RULE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_DOCUMENTS_ACCESS_RULE, GDataDocumentsAccessRuleClass))
+
+/**
+ * GDataDocumentsAccessRule:
+ *
+ * All the fields in the #GDataDocumentsAccessRule structure are private and
+ * should never be accessed directly.
+ *
+ * Since: 0.17.2
+ */
+typedef struct {
+ GDataAccessRule parent;
+} GDataDocumentsAccessRule;
+
+/**
+ * GDataDocumentsAccessRuleClass:
+ *
+ * All the fields in the #GDataDocumentsAccessRuleClass structure are private
+ * and should never be accessed directly.
+ *
+ * Since: 0.17.2
+ */
+typedef struct {
+ /*< private >*/
+ GDataAccessRuleClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataDocumentsAccessRuleClass;
+
+GType gdata_documents_access_rule_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataDocumentsAccessRule, g_object_unref)
+
+GDataDocumentsAccessRule *
+gdata_documents_access_rule_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+G_END_DECLS
+
+#endif /* !GDATA_DOCUMENTS_ACCESS_RULE_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ * Copyright (C) Red Hat, Inc. 2015, 2017
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-documents-document
+ * @short_description: GData documents document object
+ * @stability: Stable
+ * @include: gdata/services/documents/gdata-documents-document.h
+ *
+ * #GDataDocumentsDocument is a subclass of #GDataDocumentsEntry to represent an arbitrary Google Drive document (i.e. an arbitrary file which
+ * isn't a Google Documents presentation, text document, PDF, drawing or spreadsheet). It is subclassed by #GDataDocumentsPresentation, #GDataDocumentsText,
+ * #GDataDocumentsPdf, #GDataDocumentsDrawing and #GDataDocumentsSpreadsheet, which represent those specific types of Google Document, respectively.
+ *
+ * #GDataDocumentsDocument used to be abstract, but was made instantiable in version 0.13.0 to allow for arbitrary file uploads. This can be achieved
+ * by setting #GDataDocumentsUploadQuery:convert to %FALSE when making an upload using gdata_documents_service_upload_document_resumable(). See the
+ * documentation for #GDataDocumentsUploadQuery for an example.
+ *
+ * It should be noted that #GDataDocumentsDocument should only be used to represent arbitrary files; its subclasses should be used any time a standard
+ * Google Document (spreadsheet, text document, presentation, etc.) is to be represented.
+ *
+ * For more details of Google Drive’s GData API, see the
+ * <ulink type="http" url="https://developers.google.com/drive/v2/web/about-sdk">online documentation</ulink>.
+ *
+ * <example>
+ * <title>Downloading a Document</title>
+ * <programlisting>
+ * GDataDocumentsService *service;
+ * GDataDocumentsDocument *document;
+ * GFile *destination_file;
+ * const gchar *download_format;
+ * GDataDownloadStream *download_stream;
+ * GFileOutputStream *output_stream;
+ * GError *error = NULL;
+ *
+ * /<!-- -->* Create a service and retrieve the document to download and the file and format to save the download in *<!-- -->/
+ * service = create_youtube_service ();
+ * document = get_document_to_download (service);
+ * destination_file = query_user_for_destination_file (document);
+ * download_format = query_user_for_download_format (document);
+ *
+ * /<!-- -->* Create the download stream *<!-- -->/
+ * download_stream = gdata_documents_document_download (document, service, download_format, NULL, &error);
+ *
+ * g_object_unref (document);
+ * g_object_unref (service);
+ *
+ * if (error != NULL) {
+ * g_error ("Error creating download stream: %s", error->message);
+ * g_error_free (error);
+ * g_object_unref (destination_file);
+ * return;
+ * }
+ *
+ * /<!-- -->* Create the file output stream *<!-- -->/
+ * output_stream = g_file_replace (destination_file, NULL, FALSE, G_FILE_CREATE_REPLACE_DESTINATION, NULL, &error);
+ *
+ * g_object_unref (destination_file);
+ *
+ * if (error != NULL) {
+ * g_error ("Error creating destination file: %s", error->message);
+ * g_error_free (error);
+ * g_object_unref (download_stream);
+ * return;
+ * }
+ *
+ * /<!-- -->* Download the document. This should almost always be done asynchronously. *<!-- -->/
+ * g_output_stream_splice (G_OUTPUT_STREAM (output_stream), G_INPUT_STREAM (download_stream),
+ * G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, NULL, &error);
+ *
+ * g_object_unref (output_stream);
+ * g_object_unref (download_stream);
+ *
+ * if (error != NULL) {
+ * g_error ("Error downloading document: %s", error->message);
+ * g_error_free (error);
+ * return;
+ * }
+ * </programlisting>
+ * </example>
+ *
+ * Each document accessible through the service has an access control list (ACL) which defines the level of access to the document to each user, and
+ * which users the document is shared with. For more information about ACLs for documents, see the <ulink type="http"
+ * url="https://developers.google.com/google-apps/documents-list/#managing_sharing_permissions_of_resources_via_access_control_lists_acls">online
+ * documentation on sharing documents</ulink>.
+ *
+ * <example>
+ * <title>Retrieving the Access Control List for a Document</title>
+ * <programlisting>
+ * GDataDocumentsService *service;
+ * GDataDocumentsDocument *document;
+ * GDataFeed *acl_feed;
+ * GDataAccessRule *rule, *new_rule;
+ * GDataLink *acl_link;
+ * GList *i;
+ * GError *error = NULL;
+ *
+ * /<!-- -->* Create a service and retrieve a document to work on *<!-- -->/
+ * service = create_documents_service ();
+ * document = get_document (service);
+ *
+ * /<!-- -->* Query the service for the ACL for the given document *<!-- -->/
+ * acl_feed = gdata_access_handler_get_rules (GDATA_ACCESS_HANDLER (document), GDATA_SERVICE (service), NULL, NULL, NULL, &error);
+ *
+ * if (error != NULL) {
+ * g_error ("Error getting ACL feed for document: %s", error->message);
+ * g_error_free (error);
+ * g_object_unref (document);
+ * g_object_unref (service);
+ * return;
+ * }
+ *
+ * /<!-- -->* Iterate through the ACL *<!-- -->/
+ * for (i = gdata_feed_get_entries (acl_feed); i != NULL; i = i->next) {
+ * const gchar *scope_value;
+ *
+ * rule = GDATA_ACCESS_RULE (i->data);
+ *
+ * /<!-- -->* Do something with the access rule here. As an example, we update the rule applying to test@gmail.com and delete all
+ * * the other rules. We then insert another rule for example@gmail.com below. *<!-- -->/
+ * gdata_access_rule_get_scope (rule, NULL, &scope_value);
+ * if (scope_value != NULL && strcmp (scope_value, "test@gmail.com") == 0) {
+ * GDataAccessRule *updated_rule;
+ *
+ * /<!-- -->* Update the rule to make test@gmail.com a writer (full read/write access to the document, but they can't change
+ * * the ACL or delete the document). *<!-- -->/
+ * gdata_access_rule_set_role (rule, GDATA_DOCUMENTS_ACCESS_ROLE_WRITER);
+ * updated_rule = GDATA_ACCESS_RULE (gdata_service_update_entry (GDATA_SERVICE (service), GDATA_ENTRY (rule), NULL, &error));
+ *
+ * if (error != NULL) {
+ * g_error ("Error updating access rule for %s: %s", scope_value, error->message);
+ * g_error_free (error);
+ * g_object_unref (acl_feed);
+ * g_object_unref (document);
+ * g_object_unref (service);
+ * return;
+ * }
+ *
+ * g_object_unref (updated_rule);
+ * } else {
+ * /<!-- -->* Delete any rule which doesn't apply to test@gmail.com *<!-- -->/
+ * gdata_service_delete_entry (GDATA_SERVICE (service), GDATA_ENTRY (rule), NULL, &error);
+ *
+ * if (error != NULL) {
+ * g_error ("Error deleting access rule for %s: %s", scope_value, error->message);
+ * g_error_free (error);
+ * g_object_unref (acl_feed);
+ * g_object_unref (document);
+ * g_object_unref (service);
+ * return;
+ * }
+ * }
+ * }
+ *
+ * g_object_unref (acl_feed);
+ *
+ * /<!-- -->* Create and insert a new access rule for example@gmail.com which allows them read-only access to the document. *<!-- -->/
+ * rule = gdata_access_rule_new (NULL);
+ * gdata_access_rule_set_role (rule, GDATA_DOCUMENTS_ACCESS_ROLE_READER);
+ * gdata_access_rule_set_scope (rule, GDATA_ACCESS_SCOPE_USER, "example@gmail.com");
+ *
+ * acl_link = gdata_entry_look_up_link (GDATA_ENTRY (document), GDATA_LINK_ACCESS_CONTROL_LIST);
+ * new_rule = GDATA_ACCESS_RULE (gdata_service_insert_entry (GDATA_SERVICE (service), gdata_link_get_uri (acl_link), GDATA_ENTRY (rule),
+ * NULL, &error));
+ *
+ * g_object_unref (rule);
+ * g_object_unref (document);
+ * g_object_unref (service);
+ *
+ * if (error != NULL) {
+ * g_error ("Error inserting access rule: %s", error->message);
+ * g_error_free (error);
+ * return;
+ * }
+ *
+ * g_object_unref (acl_link);
+ * </programlisting>
+ * </example>
+ *
+ * Since: 0.7.0
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+
+#include "gdata-documents-document.h"
+#include "gdata-documents-drawing.h"
+#include "gdata-documents-entry.h"
+#include "gdata-documents-entry-private.h"
+#include "gdata-documents-presentation.h"
+#include "gdata-documents-spreadsheet.h"
+#include "gdata-documents-text.h"
+#include "gdata-documents-utils.h"
+#include "gdata-download-stream.h"
+#include "gdata-private.h"
+#include "gdata-service.h"
+
+static void gdata_documents_document_finalize (GObject *object);
+static gboolean parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error);
+static gboolean post_parse_json (GDataParsable *parsable, gpointer user_data, GError **error);
+
+struct _GDataDocumentsDocumentPrivate {
+ GHashTable *export_links; /* owned string → owned string */
+};
+
+G_DEFINE_TYPE (GDataDocumentsDocument, gdata_documents_document, GDATA_TYPE_DOCUMENTS_ENTRY)
+
+static void
+gdata_documents_document_class_init (GDataDocumentsDocumentClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+ GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataDocumentsDocumentPrivate));
+
+ gobject_class->finalize = gdata_documents_document_finalize;
+ parsable_class->parse_json = parse_json;
+ parsable_class->post_parse_json = post_parse_json;
+ entry_class->kind_term = "http://schemas.google.com/docs/2007#file";
+}
+
+static void
+gdata_documents_document_init (GDataDocumentsDocument *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_DOCUMENTS_DOCUMENT, GDataDocumentsDocumentPrivate);
+ self->priv->export_links = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
+}
+
+static void
+gdata_documents_document_finalize (GObject *object)
+{
+ GDataDocumentsDocumentPrivate *priv = GDATA_DOCUMENTS_DOCUMENT (object)->priv;
+
+ g_hash_table_unref (priv->export_links);
+
+ G_OBJECT_CLASS (gdata_documents_document_parent_class)->finalize (object);
+}
+
+static gboolean
+parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error)
+{
+ GDataDocumentsDocumentPrivate *priv = GDATA_DOCUMENTS_DOCUMENT (parsable)->priv;
+ gboolean success;
+ gchar *content_uri = NULL;
+ gchar *thumbnail_uri = NULL;
+
+ /* JSON format: https://developers.google.com/drive/v2/reference/files */
+
+ if (gdata_parser_string_from_json_member (reader, "downloadUrl", P_DEFAULT, &content_uri, &success, error) == TRUE) {
+ if (success && content_uri != NULL && content_uri[0] != '\0')
+ gdata_entry_set_content_uri (GDATA_ENTRY (parsable), content_uri);
+ g_free (content_uri);
+ return success;
+ } else if (gdata_parser_string_from_json_member (reader, "thumbnailLink", P_DEFAULT, &thumbnail_uri, &success, error) == TRUE) {
+ if (success && thumbnail_uri != NULL && thumbnail_uri[0] != '\0') {
+ GDataLink *_link;
+
+ _link = gdata_link_new (thumbnail_uri, "http://schemas.google.com/docs/2007/thumbnail");
+ gdata_entry_add_link (GDATA_ENTRY (parsable), _link);
+ g_object_unref (_link);
+ }
+
+ g_free (thumbnail_uri);
+ return success;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "exportLinks") == 0) {
+ guint i, members;
+
+ if (json_reader_is_object (reader) == FALSE) {
+ g_set_error (error, GDATA_PARSER_ERROR, GDATA_PARSER_ERROR_PARSING_STRING,
+ /* Translators: the parameter is an error message */
+ _("Error parsing JSON: %s"),
+ "JSON node ‘exportLinks’ is not an object.");
+ return FALSE;
+ }
+
+ for (i = 0, members = (guint) json_reader_count_members (reader); i < members; i++) {
+ const gchar *format;
+ gchar *uri = NULL;
+
+ json_reader_read_element (reader, i);
+
+ format = json_reader_get_member_name (reader);
+
+ g_assert (gdata_parser_string_from_json_member (reader, format, P_REQUIRED | P_NON_EMPTY, &uri, &success, NULL));
+ if (success) {
+ g_hash_table_insert (priv->export_links, g_strdup (format), uri);
+ uri = NULL;
+ }
+
+ json_reader_end_element (reader);
+ g_free (uri);
+ }
+
+ return TRUE;
+ }
+
+ return GDATA_PARSABLE_CLASS (gdata_documents_document_parent_class)->parse_json (parsable, reader, user_data, error);
+}
+
+static gboolean
+post_parse_json (GDataParsable *parsable, gpointer user_data, GError **error)
+{
+ const gchar *id;
+ gchar *resource_id;
+
+ id = gdata_entry_get_id (GDATA_ENTRY (parsable));
+
+ /* Since the document-id is identical to GDataEntry:id, which is parsed by the parent class, we can't
+ * create the resource-id while parsing. */
+ resource_id = g_strconcat ("document:", id, NULL);
+ _gdata_documents_entry_set_resource_id (GDATA_DOCUMENTS_ENTRY (parsable), resource_id);
+
+ g_free (resource_id);
+ return GDATA_PARSABLE_CLASS (gdata_documents_document_parent_class)->post_parse_json (parsable, user_data, error);
+}
+
+/**
+ * gdata_documents_document_new:
+ * @id: (allow-none): the entry's ID (not the document ID), or %NULL
+ *
+ * Creates a new #GDataDocumentsDocument with the given entry ID (#GDataEntry:id).
+ *
+ * Return value: (transfer full): a new #GDataDocumentsDocument, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.13.0
+ */
+GDataDocumentsDocument *
+gdata_documents_document_new (const gchar *id)
+{
+ return GDATA_DOCUMENTS_DOCUMENT (g_object_new (GDATA_TYPE_DOCUMENTS_DOCUMENT, "id", id, NULL));
+}
+
+/**
+ * gdata_documents_document_download:
+ * @self: a #GDataDocumentsDocument
+ * @service: a #GDataDocumentsService
+ * @export_format: the format in which the document should be exported
+ * @cancellable: (allow-none): a #GCancellable for the entire download stream, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Downloads and returns the document file represented by the #GDataDocumentsDocument. If the document doesn't exist, %NULL is returned, but no error
+ * is set in @error.
+ *
+ * @export_format should be the file extension of the desired output format for the document, from the list accepted by Google Documents. For example:
+ * %GDATA_DOCUMENTS_PRESENTATION_PDF, %GDATA_DOCUMENTS_SPREADSHEET_ODS or %GDATA_DOCUMENTS_TEXT_ODT.
+ *
+ * If @self is a #GDataDocumentsSpreadsheet, only the first grid, or sheet, in the spreadsheet will be downloaded for some export formats. To download
+ * a specific a specific grid, use gdata_documents_spreadsheet_get_download_uri() with #GDataDownloadStream to download the grid manually. See the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#downloading_spreadsheets">GData protocol
+ * specification</ulink> for more information.
+ *
+ * To get the content type of the downloaded file, gdata_download_stream_get_content_type() can be called on the returned #GDataDownloadStream.
+ * Calling gdata_download_stream_get_content_length() on the stream will not return a meaningful result, however, as the stream is encoded in chunks,
+ * rather than by content length.
+ *
+ * In order to cancel the download, a #GCancellable passed in to @cancellable must be cancelled using g_cancellable_cancel(). Cancelling the individual
+ * #GInputStream operations on the #GDataDownloadStream will not cancel the entire download; merely the read or close operation in question. See the
+ * #GDataDownloadStream:cancellable for more details.
+ *
+ * If the given @export_format is unrecognised or not supported for this document, %GDATA_SERVICE_ERROR_NOT_FOUND will be returned.
+ *
+ * If @service isn't authenticated, a %GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED will be returned.
+ *
+ * If there is an error getting the document, a %GDATA_SERVICE_ERROR_PROTOCOL_ERROR error will be returned.
+ *
+ * Return value: (transfer full): a #GDataDownloadStream to download the document with, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.8.0
+ */
+GDataDownloadStream *
+gdata_documents_document_download (GDataDocumentsDocument *self, GDataDocumentsService *service, const gchar *export_format, GCancellable *cancellable,
+ GError **error)
+{
+ gchar *download_uri;
+ GDataAuthorizationDomain *domain;
+ GDataDownloadStream *download_stream;
+
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_DOCUMENT (self), NULL);
+ g_return_val_if_fail (GDATA_IS_SERVICE (service), NULL);
+ g_return_val_if_fail (export_format != NULL && *export_format != '\0', NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ /* If we're downloading a spreadsheet we have to use a different authorization domain. */
+ if (GDATA_IS_DOCUMENTS_SPREADSHEET (self)) {
+ domain = gdata_documents_service_get_spreadsheet_authorization_domain ();
+ } else {
+ domain = gdata_documents_service_get_primary_authorization_domain ();
+ }
+
+ /* Ensure we're authenticated first */
+ if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (service)), domain) == FALSE) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED,
+ _("You must be authenticated to download documents."));
+ return NULL;
+ }
+
+ /* Get the download URI and create a stream for it */
+ download_uri = gdata_documents_document_get_download_uri (self, export_format);
+
+ if (download_uri == NULL) {
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_NOT_FOUND,
+ _("Unknown or unsupported document export format ‘%s’."), export_format);
+ return NULL;
+ }
+
+ download_stream = GDATA_DOWNLOAD_STREAM (gdata_download_stream_new (GDATA_SERVICE (service), domain, download_uri, cancellable));
+ g_free (download_uri);
+
+ return download_stream;
+}
+
+/**
+ * gdata_documents_document_get_download_uri:
+ * @self: a #GDataDocumentsDocument
+ * @export_format: the format in which the document should be exported when downloaded
+ *
+ * Builds and returns the download URI for the given #GDataDocumentsDocument in the desired format. Note that directly downloading the document using
+ * this URI isn't possible, as authentication is required. You should instead use gdata_download_stream_new() with the URI, and use the resulting
+ * #GInputStream.
+ *
+ * @export_format should be the file extension of the desired output format for the document, from the list accepted by Google Documents. For example:
+ * %GDATA_DOCUMENTS_PRESENTATION_PDF, %GDATA_DOCUMENTS_SPREADSHEET_ODS or %GDATA_DOCUMENTS_TEXT_ODT.
+ *
+ * If the @export_format is not recognised or not supported for this document, %NULL is returned.
+ *
+ * Return value: (nullable): the download URI, or %NULL; free with g_free()
+ *
+ * Since: 0.7.0
+ */
+gchar *
+gdata_documents_document_get_download_uri (GDataDocumentsDocument *self, const gchar *export_format)
+{
+ const gchar *format;
+ const gchar *mime_type;
+
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_DOCUMENT (self), NULL);
+ g_return_val_if_fail (export_format != NULL && *export_format != '\0', NULL);
+
+ if (g_strcmp0 (export_format, "html") == 0)
+ format = "text/html";
+ else if (g_strcmp0 (export_format, "jpeg") == 0)
+ format = "image/jpeg";
+ else if (g_strcmp0 (export_format, "pdf") == 0)
+ format = "application/pdf";
+ else if (g_strcmp0 (export_format, "png") == 0)
+ format = "image/png";
+ else if (g_strcmp0 (export_format, "txt") == 0)
+ format = "text/plain";
+ else if (g_strcmp0 (export_format, GDATA_DOCUMENTS_DRAWING_SVG) == 0)
+ format = "image/svg+xml";
+ else if (g_strcmp0 (export_format, GDATA_DOCUMENTS_PRESENTATION_PPT) == 0)
+ format = "application/vnd.openxmlformats-officedocument.presentationml.presentation";
+ else if (g_strcmp0 (export_format, GDATA_DOCUMENTS_SPREADSHEET_CSV) == 0)
+ format = "text/csv";
+ else if (g_strcmp0 (export_format, GDATA_DOCUMENTS_SPREADSHEET_ODS) == 0)
+ format = "application/x-vnd.oasis.opendocument.spreadsheet";
+ else if (g_strcmp0 (export_format, GDATA_DOCUMENTS_SPREADSHEET_XLS) == 0)
+ format = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
+ else if (g_strcmp0 (export_format, GDATA_DOCUMENTS_TEXT_ODT) == 0)
+ format = "application/vnd.oasis.opendocument.text";
+ else if (g_strcmp0 (export_format, GDATA_DOCUMENTS_TEXT_RTF) == 0)
+ format = "application/rtf";
+ else
+ format = export_format;
+
+ /* We use the exportLinks JSON member to do the format conversion during download. Unfortunately, there
+ * won't be any hits if the export format matches the original MIME type. We resort to downloadUrl in
+ * those cases.
+ */
+ mime_type = gdata_documents_utils_get_content_type (GDATA_DOCUMENTS_ENTRY (self));
+ if (g_content_type_equals (mime_type, format))
+ return g_strdup (gdata_entry_get_content_uri (GDATA_ENTRY (self)));
+
+ return g_strdup (g_hash_table_lookup (self->priv->export_links, format));
+}
+
+/**
+ * gdata_documents_document_get_thumbnail_uri:
+ * @self: a #GDataDocumentsDocument
+ *
+ * Gets the URI of the thumbnail for the #GDataDocumentsDocument. If no thumbnail exists for the document, %NULL will be returned.
+ *
+ * The thumbnail may then be downloaded using a #GDataDownloadStream.
+ *
+ * <example>
+ * <title>Downloading a Document Thumbnail</title>
+ * <programlisting>
+ * GDataDocumentsService *service;
+ * const gchar *thumbnail_uri;
+ * GCancellable *cancellable;
+ * GdkPixbuf *pixbuf;
+ * GError *error = NULL;
+ *
+ * service = get_my_documents_service ();
+ * thumbnail_uri = gdata_documents_document_get_thumbnail_uri (my_document);
+ * cancellable = g_cancellable_new ();
+ *
+ * /<!-- -->* Prepare a download stream *<!-- -->/
+ * download_stream = GDATA_DOWNLOAD_STREAM (gdata_download_stream_new (GDATA_SERVICE (service), NULL, thumbnail_uri, cancellable));
+ *
+ * /<!-- -->* Download into a new GdkPixbuf. This can be cancelled using 'cancellable'. *<!-- -->/
+ * pixbuf = gdk_pixbuf_new_from_stream (G_INPUT_STREAM (download_stream), NULL, &error);
+ *
+ * if (error != NULL) {
+ * /<!-- -->* Handle the error. *<!-- -->/
+ * g_error_free (error);
+ * }
+ *
+ * g_object_unref (download_stream);
+ * g_object_unref (cancellable);
+ *
+ * /<!-- -->* Do something with the GdkPixbuf. *<!-- -->/
+ *
+ * g_object_unref (pixbuf);
+ * </programlisting>
+ * </example>
+ *
+ * Return value: (allow-none): the URI of the document's thumbnail, or %NULL
+ *
+ * Since: 0.13.1
+ */
+const gchar *
+gdata_documents_document_get_thumbnail_uri (GDataDocumentsDocument *self)
+{
+ GDataLink *thumbnail_link;
+
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_DOCUMENT (self), NULL);
+
+ /* Get the thumbnail URI (if it exists). */
+ thumbnail_link = gdata_entry_look_up_link (GDATA_ENTRY (self), "http://schemas.google.com/docs/2007/thumbnail");
+
+ if (thumbnail_link == NULL) {
+ return NULL;
+ }
+
+ return gdata_link_get_uri (thumbnail_link);
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_DOCUMENTS_DOCUMENT_H
+#define GDATA_DOCUMENTS_DOCUMENT_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-download-stream.h>
+#include <gdata/services/documents/gdata-documents-entry.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_DOCUMENTS_DOCUMENT (gdata_documents_document_get_type ())
+#define GDATA_DOCUMENTS_DOCUMENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_DOCUMENTS_DOCUMENT, GDataDocumentsDocument))
+#define GDATA_DOCUMENTS_DOCUMENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_DOCUMENTS_DOCUMENT, GDataDocumentsDocumentClass))
+#define GDATA_IS_DOCUMENTS_DOCUMENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_DOCUMENTS_DOCUMENT))
+#define GDATA_IS_DOCUMENTS_DOCUMENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_DOCUMENTS_DOCUMENT))
+#define GDATA_DOCUMENTS_DOCUMENT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_DOCUMENTS_DOCUMENT, GDataDocumentsDocumentClass))
+
+typedef struct _GDataDocumentsDocumentPrivate GDataDocumentsDocumentPrivate;
+
+/**
+ * GDataDocumentsDocument:
+ *
+ * All the fields in the #GDataDocumentsDocument structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ GDataDocumentsEntry parent;
+ GDataDocumentsDocumentPrivate *priv;
+} GDataDocumentsDocument;
+
+/**
+ * GDataDocumentsDocumentClass:
+ *
+ * All the fields in the #GDataDocumentsDocumentClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataDocumentsEntryClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataDocumentsDocumentClass;
+
+GType gdata_documents_document_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataDocumentsDocument, g_object_unref)
+
+GDataDocumentsDocument *gdata_documents_document_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+#include <gdata/services/documents/gdata-documents-service.h>
+
+GDataDownloadStream *gdata_documents_document_download (GDataDocumentsDocument *self, GDataDocumentsService *service, const gchar *export_format,
+ GCancellable *cancellable, GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+gchar *gdata_documents_document_get_download_uri (GDataDocumentsDocument *self, const gchar *export_format) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_documents_document_get_thumbnail_uri (GDataDocumentsDocument *self) G_GNUC_PURE;
+
+G_END_DECLS
+
+#endif /* !GDATA_DOCUMENTS_DOCUMENT_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Thibault Saunier 2009 <saunierthibault@gmail.com>
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ * Copyright (C) Cosimo Cecchi 2012 <cosimoc@gnome.org>
+ * Copyright (C) Red Hat, Inc. 2016
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-documents-drawing
+ * @short_description: GData Documents drawing object
+ * @stability: Stable
+ * @include: gdata/services/documents/gdata-documents-drawing.h
+ *
+ * #GDataDocumentsDrawing is a subclass of #GDataDocumentsDocument to represent a drawing document from Google Documents.
+ *
+ * For more details of Google Drive's GData API, see the
+ * <ulink type="http" url="https://developers.google.com/drive/v2/web/about-sdk">online documentation</ulink>.
+ *
+ * Since: 0.13.1
+ */
+
+#include <config.h>
+#include <glib.h>
+
+#include "gdata-documents-drawing.h"
+#include "gdata-documents-utils.h"
+#include "gdata-parser.h"
+#include "gdata-private.h"
+
+static void gdata_documents_drawing_constructed (GObject *object);
+
+G_DEFINE_TYPE (GDataDocumentsDrawing, gdata_documents_drawing, GDATA_TYPE_DOCUMENTS_DOCUMENT)
+
+static void
+gdata_documents_drawing_class_init (GDataDocumentsDrawingClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
+
+ gobject_class->constructed = gdata_documents_drawing_constructed;
+ entry_class->kind_term = "http://schemas.google.com/docs/2007#drawing";
+}
+
+static void
+gdata_documents_drawing_init (GDataDocumentsDrawing *self)
+{
+ /* Why am I writing it? */
+}
+
+static void
+gdata_documents_drawing_constructed (GObject *object)
+{
+ G_OBJECT_CLASS (gdata_documents_drawing_parent_class)->constructed (object);
+
+ if (!_gdata_parsable_is_constructed_from_xml (GDATA_PARSABLE (object)))
+ gdata_documents_utils_add_content_type (GDATA_DOCUMENTS_ENTRY (object), "application/vnd.google-apps.drawing");
+}
+
+/**
+ * gdata_documents_drawing_new:
+ * @id: (allow-none): the entry's ID (not the document ID of the drawing document), or %NULL
+ *
+ * Creates a new #GDataDocumentsDrawing with the given entry ID (#GDataEntry:id).
+ *
+ * Return value: (transfer full): a new #GDataDocumentsDrawing, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.13.1
+ */
+GDataDocumentsDrawing *
+gdata_documents_drawing_new (const gchar *id)
+{
+ return GDATA_DOCUMENTS_DRAWING (g_object_new (GDATA_TYPE_DOCUMENTS_DRAWING, "id", id, NULL));
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Thibault Saunier 2009 <saunierthibault@gmail.com>
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ * Copyright (C) Cosimo Cecchi 2012 <cosimoc@gnome.org>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_DOCUMENTS_DRAWING_H
+#define GDATA_DOCUMENTS_DRAWING_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/services/documents/gdata-documents-document.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_DOCUMENTS_DRAWING_JPEG:
+ *
+ * The export format for JPEG image format.
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#valid_download_formats_for_drawings">
+ * GData protocol specification</ulink>.
+ *
+ * Since: 0.13.1
+ */
+#define GDATA_DOCUMENTS_DRAWING_JPEG "jpeg"
+
+/**
+ * GDATA_DOCUMENTS_DRAWING_PDF:
+ *
+ * The export format for Portable Document Format (PDF).
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#valid_download_formats_for_drawings">
+ * GData protocol specification</ulink>.
+ *
+ * Since: 0.13.1
+ */
+#define GDATA_DOCUMENTS_DRAWING_PDF "pdf"
+
+/**
+ * GDATA_DOCUMENTS_DRAWING_PNG:
+ *
+ * The export format for Portable Network Graphics (PNG) image format.
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#valid_download_formats_for_drawings">
+ * GData protocol specification</ulink>.
+ *
+ * Since: 0.13.1
+ */
+#define GDATA_DOCUMENTS_DRAWING_PNG "png"
+
+/**
+ * GDATA_DOCUMENTS_DRAWING_SVG:
+ *
+ * The export format for Scalable Vector Graphics (SVG) image format.
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#valid_download_formats_for_drawings">
+ * GData protocol specification</ulink>.
+ *
+ * Since: 0.13.1
+ */
+#define GDATA_DOCUMENTS_DRAWING_SVG "svg"
+
+
+#define GDATA_TYPE_DOCUMENTS_DRAWING (gdata_documents_drawing_get_type ())
+#define GDATA_DOCUMENTS_DRAWING(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_DOCUMENTS_DRAWING, GDataDocumentsDrawing))
+#define GDATA_DOCUMENTS_DRAWING_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_DOCUMENTS_DRAWING, GDataDocumentsDrawingClass))
+#define GDATA_IS_DOCUMENTS_DRAWING(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_DOCUMENTS_DRAWING))
+#define GDATA_IS_DOCUMENTS_DRAWING_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_DOCUMENTS_DRAWING))
+#define GDATA_DOCUMENTS_DRAWING_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_DOCUMENTS_DRAWING, GDataDocumentsDrawingClass))
+
+typedef struct _GDataDocumentsDrawingPrivate GDataDocumentsDrawingPrivate;
+
+/**
+ * GDataDocumentsDrawing:
+ *
+ * All the fields in the #GDataDocumentsDrawing structure are private and should never be accessed directly.
+ *
+ * Since: 0.13.1
+ */
+typedef struct {
+ GDataDocumentsDocument parent;
+ GDataDocumentsDrawingPrivate *priv;
+} GDataDocumentsDrawing;
+
+/**
+ * GDataDocumentsDrawingClass:
+ *
+ * All the fields in the #GDataDocumentsDrawingClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.13.1
+ */
+typedef struct {
+ /*< private >*/
+ GDataDocumentsDocumentClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataDocumentsDrawingClass;
+
+GType gdata_documents_drawing_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataDocumentsDrawing, g_object_unref)
+
+GDataDocumentsDrawing *gdata_documents_drawing_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+G_END_DECLS
+
+#endif /* !GDATA_DOCUMENTS_DRAWING_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Red Hat, Inc. 2017
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_DOCUMENTS_ENTRY_PRIVATE_H
+#define GDATA_DOCUMENTS_ENTRY_PRIVATE_H
+
+#include <glib.h>
+
+#include <gdata/services/documents/gdata-documents-entry.h>
+
+G_BEGIN_DECLS
+
+G_GNUC_INTERNAL void _gdata_documents_entry_set_resource_id (GDataDocumentsEntry *self, const gchar *resource_id);
+
+G_END_DECLS
+
+#endif /* !GDATA_DOCUMENTS_ENTRY_PRIVATE_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Thibault Saunier 2009 <saunierthibault@gmail.com>
+ * Copyright (C) Red Hat, Inc. 2015, 2016
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-documents-entry
+ * @short_description: GData document object abstract class
+ * @stability: Stable
+ * @include: gdata/services/documents/gdata-documents-entry.h
+ *
+ * #GDataDocumentsEntry is a subclass of #GDataEntry to represent a Google Drive entry, which is then further subclassed
+ * to give specific document types.
+ *
+ * #GDataDocumentsEntry implements #GDataAccessHandler, meaning the access rules to it can be modified using that interface. As well as the
+ * access roles defined for the base #GDataAccessRule (e.g. %GDATA_ACCESS_ROLE_NONE), #GDataDocumentsEntry has its own, such as
+ * %GDATA_DOCUMENTS_ACCESS_ROLE_OWNER and %GDATA_DOCUMENTS_ACCESS_ROLE_READER.
+ *
+ * Documents can (confusingly) be referenced by three different types of IDs: their entry ID, their resource ID and their document ID (untyped resource
+ * ID). Each is a substring of the previous ones (i.e. the entry ID contains the resource ID, which in turn contains the document ID). The resource ID
+ * and document ID should almost always be considered as internal, and thus entry IDs (#GDataEntry:id) should normally be used to uniquely identify
+ * documents. For more information, see #GDataDocumentsEntry:resource-id.
+ *
+ * For more details of Google Drive's GData API, see the
+ * <ulink type="http" url="https://developers.google.com/drive/v2/web/about-sdk">online documentation</ulink>.
+ *
+ * <example>
+ * <title>Moving an Entry Between Folders</title>
+ * <programlisting>
+ * GDataDocumentsService *service;
+ * GDataDocumentsEntry *entry, *intermediate_entry, *updated_entry;
+ * GDataDocumentsFolder *old_folder, *new_folder;
+ * GError *error = NULL;
+ *
+ * /<!-- -->* Create a service *<!-- -->/
+ * service = create_documents_service ();
+ *
+ * /<!-- -->* Get the entry, the folder it's being moved out of, and the folder it's being moved into. The entry can either be a document or
+ * * another folder, allowing hierarchies of folders to be constructed. *<!-- -->/
+ * entry = query_user_for_entry (service);
+ * old_folder = query_user_for_old_folder (service);
+ * new_folder = query_user_for_new_folder (service);
+ *
+ * /<!-- -->* Add the entry to the new folder *<!-- -->/
+ * intermediate_entry = gdata_documents_service_add_entry_to_folder (service, entry, new_folder, NULL, &error);
+ *
+ * g_object_unref (entry);
+ * g_object_unref (new_folder);
+ *
+ * if (error != NULL) {
+ * g_error ("Error adding entry to new folder: %s", error->message);
+ * g_error_free (error);
+ * g_object_unref (old_folder);
+ * g_object_unref (service);
+ * return;
+ * }
+ *
+ * /<!-- -->* Remove the entry from the old folder *<!-- -->/
+ * updated_entry = gdata_documents_service_remove_entry_from_folder (service, intermediate_entry, old_folder, NULL, &error);
+ *
+ * g_object_unref (intermediate_entry);
+ * g_object_unref (old_folder);
+ * g_object_unref (service);
+ *
+ * if (error != NULL) {
+ * /<!-- -->* Note that you might want to attempt to remove the intermediate_entry from the new_folder in this error case, so that
+ * * the operation is aborted cleanly. *<!-- -->/
+ * g_error ("Error removing entry from previous folder: %s", error->message);
+ * g_error_free (error);
+ * return;
+ * }
+ *
+ * /<!-- -->* Do something with the updated entry *<!-- -->/
+ *
+ * g_object_unref (updated_entry);
+ * </programlisting>
+ * </example>
+ *
+ * Since: 0.4.0
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+
+#include "gdata-comparable.h"
+#include "gdata-documents-entry.h"
+#include "gdata-documents-entry-private.h"
+#include "gdata-parser.h"
+#include "gdata-types.h"
+#include "gdata-private.h"
+#include "gdata-access-handler.h"
+#include "gdata-documents-access-rule.h"
+#include "gdata-documents-service.h"
+
+#include "gdata-documents-spreadsheet.h"
+#include "gdata-documents-presentation.h"
+#include "gdata-documents-text.h"
+#include "gdata-documents-folder.h"
+#include "gdata-documents-utils.h"
+
+static void gdata_documents_entry_access_handler_init (GDataAccessHandlerIface *iface);
+static void gdata_documents_entry_finalize (GObject *object);
+static void gdata_entry_dispose (GObject *object);
+static const gchar *get_content_type (void);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+static void gdata_documents_entry_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_documents_entry_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static gboolean parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error);
+static gboolean post_parse_json (GDataParsable *parsable, gpointer user_data, GError **error);
+static void get_json (GDataParsable *parsable, JsonBuilder *builder);
+static gchar *get_entry_uri (const gchar *id);
+
+struct _GDataDocumentsEntryPrivate {
+ gint64 last_viewed;
+ gchar *resource_id;
+ gboolean writers_can_invite;
+ gboolean is_deleted;
+ GDataAuthor *last_modified_by;
+ goffset quota_used; /* bytes */
+ goffset file_size; /* bytes */
+ GList *properties; /* GDataDocumentsProperty */
+};
+
+enum {
+ PROP_EDITED = 1,
+ PROP_LAST_VIEWED,
+ PROP_DOCUMENT_ID,
+ PROP_LAST_MODIFIED_BY,
+ PROP_IS_DELETED,
+ PROP_WRITERS_CAN_INVITE,
+ PROP_RESOURCE_ID,
+ PROP_QUOTA_USED,
+ PROP_FILE_SIZE,
+};
+
+G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GDataDocumentsEntry, gdata_documents_entry, GDATA_TYPE_ENTRY,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_ACCESS_HANDLER, gdata_documents_entry_access_handler_init))
+
+static void
+gdata_documents_entry_class_init (GDataDocumentsEntryClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+ GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataDocumentsEntryPrivate));
+
+ gobject_class->get_property = gdata_documents_entry_get_property;
+ gobject_class->set_property = gdata_documents_entry_set_property;
+ gobject_class->finalize = gdata_documents_entry_finalize;
+ gobject_class->dispose = gdata_entry_dispose;
+
+ parsable_class->parse_json = parse_json;
+ parsable_class->post_parse_json = post_parse_json;
+ parsable_class->get_content_type = get_content_type;
+ parsable_class->get_json = get_json;
+ parsable_class->get_namespaces = get_namespaces;
+
+ entry_class->get_entry_uri = get_entry_uri;
+
+ /**
+ * GDataDocumentsEntry:edited:
+ *
+ * The last time the document was edited. If the document has not been edited yet, the content indicates the time it was created.
+ *
+ * Since: 0.4.0
+ * Deprecated: 0.17.0: This is identical to #GDataEntry:updated.
+ */
+ g_object_class_install_property (gobject_class, PROP_EDITED,
+ g_param_spec_int64 ("edited",
+ "Edited", "The last time the document was edited.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED));
+
+ /**
+ * GDataDocumentsEntry:last-viewed:
+ *
+ * The last time the document was viewed.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LAST_VIEWED,
+ g_param_spec_int64 ("last-viewed",
+ "Last viewed", "The last time the document was viewed.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataDocumentsEntry:writers-can-invite:
+ *
+ * Indicates whether the document entry writers can invite others to edit the document.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_WRITERS_CAN_INVITE,
+ g_param_spec_boolean ("writers-can-invite",
+ "Writers can invite?", "Indicates whether writers can invite others to edit.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataDocumentsEntry:is-deleted:
+ *
+ * Indicates whether the document entry has been deleted (moved to the trash). Deleted documents will only
+ * appear in query results if the #GDataDocumentsQuery:show-deleted property is %TRUE.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_IS_DELETED,
+ g_param_spec_boolean ("is-deleted",
+ "Deleted?", "Indicates whether the document entry has been deleted.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataDocumentsEntry:resource-id:
+ *
+ * The resource ID of the document. This should not normally need to be used in client code, and is mostly for internal use. To uniquely
+ * identify a given document or folder, use its #GDataEntry:id.
+ *
+ * Resource IDs have the form:
+ * <literal><replaceable>document|drawing|pdf|spreadsheet|presentation|folder</replaceable>:<replaceable>untyped resource ID</replaceable></literal>; whereas
+ * entry IDs have the form:
+ * <literal>https://docs.google.com/feeds/id/<replaceable>resource ID</replaceable></literal> in version 3 of the API.
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#resource_ids_explained">Google Documents
+ * API reference</ulink>.
+ *
+ * Since: 0.11.0
+ */
+ g_object_class_install_property (gobject_class, PROP_RESOURCE_ID,
+ g_param_spec_string ("resource-id",
+ "Resource ID", "The resource ID of the document.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataDocumentsEntry:document-id:
+ *
+ * The document ID of the document, which is different from its entry ID (GDataEntry:id). The
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#terminology_used_in_this_guide">online GData
+ * Documentation</ulink> refers to these as “untyped resource IDs”.
+ *
+ * Since: 0.4.0
+ * Deprecated: 0.11.0: This a substring of the #GDataDocumentsEntry:resource-id, which is more general and should be used instead.
+ */
+ g_object_class_install_property (gobject_class, PROP_DOCUMENT_ID,
+ g_param_spec_string ("document-id",
+ "Document ID", "The document ID of the document.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED));
+
+ /**
+ * GDataDocumentsEntry:last-modified-by:
+ *
+ * Indicates the author of the last modification.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LAST_MODIFIED_BY,
+ g_param_spec_object ("last-modified-by",
+ "Last modified by", "Indicates the author of the last modification.",
+ GDATA_TYPE_AUTHOR,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataDocumentsEntry:quota-used:
+ *
+ * The amount of user quota the document is occupying. Currently, only arbitrary files consume file space quota (whereas standard document
+ * formats, such as #GDataDocumentsText, #GDataDocumentsSpreadsheet and #GDataDocumentsFolder don't). Measured in bytes.
+ *
+ * This property will be <code class="literal">0</code> for documents which aren't consuming any quota.
+ *
+ * Since: 0.13.0
+ */
+ g_object_class_install_property (gobject_class, PROP_QUOTA_USED,
+ g_param_spec_int64 ("quota-used",
+ "Quota used", "The amount of user quota the document is occupying.",
+ 0, G_MAXINT64, 0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataDocumentsEntry:file-size:
+ *
+ * The size of the document. This is only set for non-document files.
+ * Standard formats, such as #GDataDocumentsText,
+ * #GDataDocumentsSpreadsheet and #GDataDocumentsFolder are not binary
+ * data and so have no size. Measured in bytes.
+ *
+ * Since: 0.17.7
+ */
+ g_object_class_install_property (gobject_class, PROP_FILE_SIZE,
+ g_param_spec_int64 ("file-size",
+ "File size", "The size of the document.",
+ 0, G_MAXINT64, 0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+}
+
+static gboolean
+is_owner_rule (GDataAccessRule *rule)
+{
+ return (strcmp (gdata_access_rule_get_role (rule), GDATA_DOCUMENTS_ACCESS_ROLE_OWNER) == 0) ? TRUE : FALSE;
+}
+
+static GDataAuthorizationDomain *
+get_authorization_domain (GDataAccessHandler *self)
+{
+ return gdata_documents_service_get_primary_authorization_domain ();
+}
+
+static GDataFeed *
+get_rules (GDataAccessHandler *self,
+ GDataService *service,
+ GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback,
+ gpointer progress_user_data,
+ GError **error)
+{
+ GDataAccessHandlerIface *iface;
+ GDataAuthorizationDomain *domain = NULL;
+ GDataFeed *feed;
+ GDataLink *_link;
+ SoupMessage *message;
+
+ _link = gdata_entry_look_up_link (GDATA_ENTRY (self), GDATA_LINK_ACCESS_CONTROL_LIST);
+ g_assert (_link != NULL);
+
+ iface = GDATA_ACCESS_HANDLER_GET_IFACE (self);
+ if (iface->get_authorization_domain != NULL) {
+ domain = iface->get_authorization_domain (self);
+ }
+
+ message = _gdata_service_query (service, domain, gdata_link_get_uri (_link), NULL, cancellable, error);
+ if (message == NULL) {
+ return NULL;
+ }
+
+ g_assert (message->response_body->data != NULL);
+
+ feed = _gdata_feed_new_from_json (GDATA_TYPE_FEED, message->response_body->data, message->response_body->length, GDATA_TYPE_DOCUMENTS_ACCESS_RULE,
+ progress_callback, progress_user_data, error);
+
+ g_object_unref (message);
+
+ return feed;
+}
+
+static void
+gdata_documents_entry_access_handler_init (GDataAccessHandlerIface *iface)
+{
+ iface->is_owner_rule = is_owner_rule;
+ iface->get_authorization_domain = get_authorization_domain;
+ iface->get_rules = get_rules;
+}
+
+static void
+gdata_documents_entry_init (GDataDocumentsEntry *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_DOCUMENTS_ENTRY, GDataDocumentsEntryPrivate);
+ self->priv->last_viewed = -1;
+}
+
+static void
+gdata_entry_dispose (GObject *object)
+{
+ GDataDocumentsEntryPrivate *priv = GDATA_DOCUMENTS_ENTRY (object)->priv;
+
+ if (priv->last_modified_by != NULL)
+ g_object_unref (priv->last_modified_by);
+ priv->last_modified_by = NULL;
+
+ g_list_free_full (priv->properties, g_object_unref);
+ priv->properties = NULL;
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_documents_entry_parent_class)->dispose (object);
+}
+
+static void
+gdata_documents_entry_finalize (GObject *object)
+{
+ GDataDocumentsEntryPrivate *priv = GDATA_DOCUMENTS_ENTRY (object)->priv;
+
+ g_free (priv->resource_id);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_documents_entry_parent_class)->finalize (object);
+}
+
+static void
+gdata_documents_entry_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataDocumentsEntryPrivate *priv = GDATA_DOCUMENTS_ENTRY (object)->priv;
+
+ switch (property_id) {
+ case PROP_RESOURCE_ID:
+ g_value_set_string (value, priv->resource_id);
+ break;
+ case PROP_DOCUMENT_ID:
+ g_value_set_string (value, gdata_entry_get_id (GDATA_ENTRY (object)));
+ break;
+ case PROP_WRITERS_CAN_INVITE:
+ g_value_set_boolean (value, priv->writers_can_invite);
+ break;
+ case PROP_IS_DELETED:
+ g_value_set_boolean (value, priv->is_deleted);
+ break;
+ case PROP_EDITED:
+ g_value_set_int64 (value, gdata_entry_get_updated (GDATA_ENTRY (object)));
+ break;
+ case PROP_LAST_VIEWED:
+ g_value_set_int64 (value, priv->last_viewed);
+ break;
+ case PROP_LAST_MODIFIED_BY:
+ g_value_set_object (value, priv->last_modified_by);
+ break;
+ case PROP_QUOTA_USED:
+ g_value_set_int64 (value, priv->quota_used);
+ break;
+ case PROP_FILE_SIZE:
+ g_value_set_int64 (value, priv->file_size);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_documents_entry_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataDocumentsEntry *self = GDATA_DOCUMENTS_ENTRY (object);
+
+ switch (property_id) {
+ case PROP_WRITERS_CAN_INVITE:
+ gdata_documents_entry_set_writers_can_invite (self, g_value_get_boolean (value));
+ break;
+ case PROP_QUOTA_USED:
+ case PROP_FILE_SIZE:
+ /* Read only. */
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+get_key_value_and_visibility (JsonReader *reader, gchar **out_key, gchar **out_value, gchar **out_visibility, GError **error)
+{
+ g_autoptr(GError) child_error = NULL;
+ g_autofree gchar *key = NULL;
+ g_autofree gchar *value = NULL;
+ g_autofree gchar *visibility = NULL;
+ gboolean success = FALSE;
+ guint i, members;
+
+ for (i = 0, members = (guint) json_reader_count_members (reader); i < members; i++) {
+ json_reader_read_element (reader, i);
+
+ if (gdata_parser_string_from_json_member (reader, "key", P_REQUIRED | P_NON_EMPTY, &key, &success, &child_error) == TRUE) {
+ if (!success && child_error != NULL) {
+ g_propagate_prefixed_error (error, g_steal_pointer (&child_error),
+ /* Translators: the parameter is an error message */
+ _("Error parsing JSON: %s"),
+ "Failed to find ‘key’.");
+ json_reader_end_element (reader);
+ return;
+ }
+ }
+
+ if (gdata_parser_string_from_json_member (reader, "visibility", P_REQUIRED | P_NON_EMPTY, &visibility, &success, &child_error) == TRUE) {
+ if (!success && child_error != NULL) {
+ g_propagate_prefixed_error (error, g_steal_pointer (&child_error),
+ /* Translators: the parameter is an error message */
+ _("Error parsing JSON: %s"),
+ "Failed to find ‘visibility’.");
+ json_reader_end_element (reader);
+ return;
+ }
+ }
+
+ /* A Property can have a value field to be an empty string */
+ if (gdata_parser_string_from_json_member (reader, "value", P_DEFAULT, &value, &success, &child_error) == TRUE) {
+ if (!success && child_error != NULL) {
+ g_propagate_prefixed_error (error, g_steal_pointer (&child_error),
+ /* Translators: the parameter is an error message */
+ _("Error parsing JSON: %s"),
+ "Failed to find ‘value’.");
+ json_reader_end_element (reader);
+ return;
+ }
+ }
+
+ json_reader_end_element (reader);
+ }
+
+ if (out_key != NULL) {
+ *out_key = g_steal_pointer (&key);
+ }
+
+ if (out_visibility != NULL) {
+ *out_visibility = g_steal_pointer (&visibility);
+ }
+
+ if (out_value != NULL) {
+ *out_value = g_steal_pointer (&value);
+ }
+}
+
+static void
+get_kind_email_and_name (JsonReader *reader, gchar **out_kind, gchar **out_email, gchar **out_name, GError **error)
+{
+ GError *child_error = NULL;
+ gboolean success;
+ gchar *email = NULL;
+ gchar *kind = NULL;
+ gchar *name = NULL;
+ guint i, members;
+
+ for (i = 0, members = (guint) json_reader_count_members (reader); i < members; i++) {
+ json_reader_read_element (reader, i);
+
+ if (gdata_parser_string_from_json_member (reader, "kind", P_REQUIRED | P_NON_EMPTY, &kind, &success, &child_error) == TRUE) {
+ if (!success && child_error != NULL) {
+ g_propagate_prefixed_error (error, child_error,
+ /* Translators: the parameter is an error message */
+ _("Error parsing JSON: %s"),
+ "Failed to find ‘kind’.");
+ json_reader_end_element (reader);
+ goto out;
+ }
+ }
+
+ if (gdata_parser_string_from_json_member (reader, "displayName", P_REQUIRED | P_NON_EMPTY, &name, &success, &child_error) == TRUE) {
+ if (!success && child_error != NULL) {
+ g_propagate_prefixed_error (error, child_error,
+ /* Translators: the parameter is an error message */
+ _("Error parsing JSON: %s"),
+ "Failed to find ‘displayName’.");
+ json_reader_end_element (reader);
+ goto out;
+ }
+ }
+
+ if (gdata_parser_string_from_json_member (reader, "emailAddress", P_DEFAULT, &email, &success, &child_error) == TRUE) {
+ if (!success && child_error != NULL) {
+ g_propagate_prefixed_error (error, child_error,
+ /* Translators: the parameter is an error message */
+ _("Error parsing JSON: %s"),
+ "Failed to find ‘emailAddress’.");
+ json_reader_end_element (reader);
+ goto out;
+ }
+ }
+
+ json_reader_end_element (reader);
+ }
+
+ if (out_kind != NULL) {
+ *out_kind = kind;
+ kind = NULL;
+ }
+
+ if (out_email != NULL) {
+ *out_email = email;
+ email = NULL;
+ }
+
+ if (out_name != NULL) {
+ *out_name = name;
+ name = NULL;
+ }
+
+ out:
+ g_free (kind);
+ g_free (email);
+ g_free (name);
+}
+
+static void
+get_kind_and_parent_link (JsonReader *reader, gchar **out_kind, gchar **out_parent_link, GError **error)
+{
+ GError *child_error = NULL;
+ gboolean success;
+ gchar *kind = NULL;
+ gchar *parent_link = NULL;
+ guint i, members;
+
+ for (i = 0, members = (guint) json_reader_count_members (reader); i < members; i++) {
+ json_reader_read_element (reader, i);
+
+ if (gdata_parser_string_from_json_member (reader, "kind", P_REQUIRED | P_NON_EMPTY, &kind, &success, &child_error) == TRUE) {
+ if (!success && child_error != NULL) {
+ g_propagate_prefixed_error (error, child_error,
+ /* Translators: the parameter is an error message */
+ _("Error parsing JSON: %s"),
+ "Failed to find ‘kind’.");
+ json_reader_end_element (reader);
+ goto out;
+ }
+ }
+
+ if (gdata_parser_string_from_json_member (reader, "parentLink", P_REQUIRED | P_NON_EMPTY, &parent_link, &success, &child_error) == TRUE) {
+ if (!success && child_error != NULL) {
+ g_propagate_prefixed_error (error, child_error,
+ /* Translators: the parameter is an error message */
+ _("Error parsing JSON: %s"),
+ "Failed to find ‘parentLink’.");
+ json_reader_end_element (reader);
+ goto out;
+ }
+ }
+
+ json_reader_end_element (reader);
+ }
+
+ if (out_kind != NULL) {
+ *out_kind = kind;
+ kind = NULL;
+ }
+
+ if (out_parent_link != NULL) {
+ *out_parent_link = parent_link;
+ parent_link = NULL;
+ }
+
+ out:
+ g_free (kind);
+ g_free (parent_link);
+}
+
+static gboolean
+parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error)
+{
+ GDataDocumentsEntryPrivate *priv = GDATA_DOCUMENTS_ENTRY (parsable)->priv;
+ GDataCategory *category;
+ GError *child_error = NULL;
+ gboolean shared;
+ gboolean success = TRUE;
+ gchar *alternate_uri = NULL;
+ gchar *kind = NULL;
+ gchar *mime_type = NULL;
+ gchar *quota_used = NULL;
+ gchar *file_size = NULL;
+ gint64 published;
+ gint64 updated;
+
+ /* JSON format: https://developers.google.com/drive/v2/reference/files */
+
+ if (gdata_parser_string_from_json_member (reader, "alternateLink", P_DEFAULT, &alternate_uri, &success, error) == TRUE) {
+ if (success && alternate_uri != NULL && alternate_uri[0] != '\0') {
+ GDataLink *_link;
+
+ _link = gdata_link_new (alternate_uri, GDATA_LINK_ALTERNATE);
+ gdata_entry_add_link (GDATA_ENTRY (parsable), _link);
+ g_object_unref (_link);
+ }
+
+ g_free (alternate_uri);
+ return success;
+ } else if (gdata_parser_string_from_json_member (reader, "mimeType", P_DEFAULT, &mime_type, &success, error) == TRUE) {
+ if (success)
+ gdata_documents_utils_add_content_type (GDATA_DOCUMENTS_ENTRY (parsable), mime_type);
+ g_free (mime_type);
+ return success;
+ } else if (gdata_parser_int64_time_from_json_member (reader, "lastViewedByMeDate", P_DEFAULT, &(priv->last_viewed), &success, error) == TRUE ||
+ gdata_parser_string_from_json_member (reader, "kind", P_REQUIRED | P_NON_EMPTY, &kind, &success, error) == TRUE) {
+ g_free (kind);
+ return success;
+ } else if (gdata_parser_int64_time_from_json_member (reader, "createdDate", P_DEFAULT, &published, &success, error) == TRUE) {
+ if (success)
+ _gdata_entry_set_published (GDATA_ENTRY (parsable), published);
+ return success;
+ } else if (gdata_parser_int64_time_from_json_member (reader, "modifiedDate", P_DEFAULT, &updated, &success, error) == TRUE) {
+ if (success)
+ _gdata_entry_set_updated (GDATA_ENTRY (parsable), updated);
+ return success;
+ } else if (gdata_parser_string_from_json_member (reader, "quotaBytesUsed", P_DEFAULT, "a_used, &success, error) == TRUE) {
+ gchar *end_ptr;
+ guint64 val;
+
+ /* Even though ‘quotaBytesUsed’ is documented as long,
+ * it is actually a string in the JSON.
+ */
+ val = g_ascii_strtoull (quota_used, &end_ptr, 10);
+ if (*end_ptr == '\0')
+ priv->quota_used = (goffset) val;
+ g_free (quota_used);
+ return success;
+ } else if (gdata_parser_string_from_json_member (reader, "fileSize", P_DEFAULT, &file_size, &success, error) == TRUE) {
+ gchar *end_ptr;
+ guint64 val;
+
+ /* like 'quotaBytesUsed', 'fileSize' is also a string
+ * in the JSON.
+ */
+ val = g_ascii_strtoull (file_size, &end_ptr, 10);
+ if (*end_ptr == '\0')
+ priv->file_size = (goffset) val;
+ g_free (file_size);
+ return success;
+ } else if (gdata_parser_boolean_from_json_member (reader, "shared", P_DEFAULT, &shared, &success, error) == TRUE) {
+ if (success && shared) {
+ category = gdata_category_new ("http://schemas.google.com/g/2005/labels#shared", GDATA_CATEGORY_SCHEMA_LABELS, "shared");
+ gdata_entry_add_category (GDATA_ENTRY (parsable), category);
+ g_object_unref (category);
+ }
+ return success;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "labels") == 0) {
+ guint i, members;
+
+ if (json_reader_is_object (reader) == FALSE) {
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the parameter is an error message */
+ _("Error parsing JSON: %s"),
+ "JSON node ‘labels’ is not an object.");
+ return FALSE;
+ }
+
+ for (i = 0, members = (guint) json_reader_count_members (reader); i < members; i++) {
+ gboolean starred;
+ gboolean viewed;
+
+ json_reader_read_element (reader, i);
+
+ gdata_parser_boolean_from_json_member (reader, "starred", P_DEFAULT, &starred, &success, NULL);
+ if (success && starred) {
+ category = gdata_category_new (GDATA_CATEGORY_SCHEMA_LABELS_STARRED, GDATA_CATEGORY_SCHEMA_LABELS, "starred");
+ gdata_entry_add_category (GDATA_ENTRY (parsable), category);
+ g_object_unref (category);
+ }
+
+ gdata_parser_boolean_from_json_member (reader, "viewed", P_DEFAULT, &viewed, &success, NULL);
+ if (success && viewed) {
+ category = gdata_category_new ("http://schemas.google.com/g/2005/labels#viewed", GDATA_CATEGORY_SCHEMA_LABELS, "viewed");
+ gdata_entry_add_category (GDATA_ENTRY (parsable), category);
+ g_object_unref (category);
+ }
+
+ json_reader_end_element (reader);
+ }
+
+ return TRUE;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "owners") == 0) {
+ guint i, elements;
+
+ if (json_reader_is_array (reader) == FALSE) {
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the parameter is an error message */
+ _("Error parsing JSON: %s"),
+ "JSON node ‘owners’ is not an array.");
+ return FALSE;
+ }
+
+ /* Loop through the elements array. */
+ for (i = 0, elements = json_reader_count_elements (reader); success && i < elements; i++) {
+ gchar *email = NULL;
+ gchar *name = NULL;
+
+ json_reader_read_element (reader, i);
+
+ if (json_reader_is_object (reader) == FALSE) {
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the parameter is an error message */
+ _("Error parsing JSON: %s"),
+ "JSON node inside ‘owners’ is not an object.");
+ success = FALSE;
+ goto continue_owners;
+ }
+
+ get_kind_email_and_name (reader, &kind, &email, &name, &child_error);
+ if (child_error != NULL) {
+ g_propagate_error (error, child_error);
+ success = FALSE;
+ goto continue_owners;
+ }
+ if (name == NULL || name[0] == '\0') {
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the parameter is an error message */
+ _("Error parsing JSON: %s"),
+ "Failed to find ‘displayName’.");
+ success = FALSE;
+ goto continue_owners;
+ }
+
+ if (g_strcmp0 (kind, "drive#user") == 0) {
+ GDataAuthor *author;
+
+ author = gdata_author_new (name, NULL, email);
+ gdata_entry_add_author (GDATA_ENTRY (parsable), author);
+ g_object_unref (author);
+ } else {
+ g_warning ("%s authors are not handled yet", kind);
+ }
+
+ continue_owners:
+ g_free (email);
+ g_free (kind);
+ g_free (name);
+ json_reader_end_element (reader);
+ }
+
+ return success;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "parents") == 0) {
+ guint i, elements;
+
+ if (json_reader_is_array (reader) == FALSE) {
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the parameter is an error message */
+ _("Error parsing JSON: %s"),
+ "JSON node ‘parents’ is not an array.");
+ return FALSE;
+ }
+
+ /* Loop through the elements array. */
+ for (i = 0, elements = (guint) json_reader_count_elements (reader); success && i < elements; i++) {
+ GDataLink *_link = NULL;
+ const gchar *relation_type = NULL;
+ gchar *uri = NULL;
+
+ json_reader_read_element (reader, i);
+
+ if (json_reader_is_object (reader) == FALSE) {
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the parameter is an error message */
+ _("Error parsing JSON: %s"),
+ "JSON node inside ‘parents’ is not an object.");
+ success = FALSE;
+ goto continue_parents;
+ }
+
+ get_kind_and_parent_link (reader, &kind, &uri, &child_error);
+ if (child_error != NULL) {
+ g_propagate_error (error, child_error);
+ success = FALSE;
+ goto continue_parents;
+ }
+
+ if (g_strcmp0 (kind, "drive#parentReference") == 0) {
+ relation_type = GDATA_LINK_PARENT;
+ } else {
+ g_warning ("%s parents are not handled yet", kind);
+ }
+
+ if (relation_type == NULL)
+ goto continue_parents;
+
+ _link = gdata_link_new (uri, relation_type);
+ gdata_entry_add_link (GDATA_ENTRY (parsable), _link);
+
+ continue_parents:
+ g_clear_object (&_link);
+ g_free (kind);
+ g_free (uri);
+ json_reader_end_element (reader);
+ }
+
+ return success;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "properties") == 0) {
+ guint i, elements;
+
+ if (!json_reader_is_array (reader)) {
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the parameter is an error message */
+ _("Error parsing JSON: %s"),
+ "JSON node ‘properties’ is not an array.");
+ return FALSE;
+ }
+
+ /* Loop through the properties array. */
+ for (i = 0, elements = (guint) json_reader_count_elements (reader); success && i < elements; i++) {
+ g_autofree gchar *key = NULL;
+ g_autofree gchar *value = NULL;
+ g_autofree gchar *visibility = NULL;
+ g_autoptr(GDataDocumentsProperty) property = NULL;
+
+ json_reader_read_element (reader, i);
+
+ if (!json_reader_is_object (reader)) {
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the parameter is an error message */
+ _("Error parsing JSON: %s"),
+ "JSON node inside ‘properties’ is not an object.");
+ success = FALSE;
+ goto continue_properties;
+ }
+
+ get_key_value_and_visibility (reader, &key, &value, &visibility, &child_error);
+
+ if (child_error != NULL) {
+ g_propagate_error (error, child_error);
+ success = FALSE;
+ goto continue_properties;
+ }
+
+ if (g_strcmp0 (visibility, GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PUBLIC) &&
+ g_strcmp0 (visibility, GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PRIVATE)) {
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the parameter is the invalid value of visibility variable */
+ _("Invalid visibility: unrecognized value ‘%s’"),
+ visibility);
+ success = FALSE;
+ goto continue_properties;
+ }
+
+ g_assert (key != NULL);
+
+ property = gdata_documents_property_new (key);
+ gdata_documents_property_set_visibility (property, visibility);
+ gdata_documents_property_set_value (property, value);
+
+ gdata_documents_entry_add_documents_property (GDATA_DOCUMENTS_ENTRY (parsable), property);
+
+ continue_properties:
+ json_reader_end_element (reader);
+ }
+
+ return success;
+ }
+
+ return GDATA_PARSABLE_CLASS (gdata_documents_entry_parent_class)->parse_json (parsable, reader, user_data, error);
+}
+
+static gboolean
+post_parse_json (GDataParsable *parsable, gpointer user_data, GError **error)
+{
+ GDataLink *_link;
+ const gchar *id;
+ gchar *uri;
+
+ id = gdata_entry_get_id (GDATA_ENTRY (parsable));
+
+ /* gdata_access_handler_get_rules requires the presence of a GDATA_LINK_ACCESS_CONTROL_LIST link with the
+ * right URI. */
+ uri = g_strconcat ("https://www.googleapis.com/drive/v2/files/", id, "/permissions", NULL);
+ _link = gdata_link_new (uri, GDATA_LINK_ACCESS_CONTROL_LIST);
+ gdata_entry_add_link (GDATA_ENTRY (parsable), _link);
+ g_free (uri);
+ g_object_unref (_link);
+
+ return TRUE;
+}
+
+static const gchar *
+get_content_type (void)
+{
+ return "application/json";
+}
+
+static void
+get_json (GDataParsable *parsable, JsonBuilder *builder)
+{
+ GList *i;
+ GList *parent_folders_list, *documents_properties_list;
+ const gchar *mime_type;
+
+ GDATA_PARSABLE_CLASS (gdata_documents_entry_parent_class)->get_json (parsable, builder);
+
+ /* Inserting files: https://developers.google.com/drive/v2/reference/files/insert */
+
+ mime_type = gdata_documents_utils_get_content_type (GDATA_DOCUMENTS_ENTRY (parsable));
+ if (mime_type != NULL) {
+ json_builder_set_member_name (builder, "mimeType");
+ json_builder_add_string_value (builder, mime_type);
+ }
+
+ /* Upload to a folder: https://developers.google.com/drive/v2/web/folder */
+
+ json_builder_set_member_name (builder, "parents");
+ json_builder_begin_array (builder);
+
+ parent_folders_list = gdata_entry_look_up_links (GDATA_ENTRY (parsable), GDATA_LINK_PARENT);
+ for (i = parent_folders_list; i != NULL; i = i->next) {
+ GDataLink *_link = GDATA_LINK (i->data);
+ const gchar *id;
+
+ id = gdata_documents_utils_get_id_from_link (_link);
+ if (id != NULL) {
+ json_builder_begin_object (builder);
+ json_builder_set_member_name (builder, "kind");
+ json_builder_add_string_value (builder, "drive#fileLink");
+ json_builder_set_member_name (builder, "id");
+ json_builder_add_string_value (builder, id);
+ json_builder_end_object (builder);
+ }
+ }
+
+ json_builder_end_array (builder);
+
+ g_list_free (parent_folders_list);
+
+ /* Set all the properties */
+ json_builder_set_member_name (builder, "properties");
+ json_builder_begin_array (builder);
+
+ documents_properties_list = gdata_documents_entry_get_document_properties (GDATA_DOCUMENTS_ENTRY (parsable));
+ for (i = documents_properties_list; i != NULL; i = i->next) {
+ GDataDocumentsProperty *property = GDATA_DOCUMENTS_PROPERTY (i->data);
+ const gchar *key = NULL;
+ const gchar *value = NULL;
+ const gchar *visibility = NULL;
+
+ if (property != NULL) {
+ key = gdata_documents_property_get_key (property);
+ value = gdata_documents_property_get_value (property);
+ visibility = gdata_documents_property_get_visibility (property);
+
+ json_builder_begin_object (builder);
+
+ json_builder_set_member_name (builder, "key");
+ json_builder_add_string_value (builder, key);
+
+ json_builder_set_member_name (builder, "visibility");
+ json_builder_add_string_value (builder, visibility);
+
+ json_builder_set_member_name (builder, "value");
+ if (value == NULL) {
+ json_builder_add_null_value (builder);
+ } else {
+ json_builder_add_string_value (builder, value);
+ }
+
+ json_builder_end_object (builder);
+ }
+ }
+
+ json_builder_end_array (builder);
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ /* Chain up to the parent class */
+ GDATA_PARSABLE_CLASS (gdata_documents_entry_parent_class)->get_namespaces (parsable, namespaces);
+
+ g_hash_table_insert (namespaces, (gchar*) "docs", (gchar*) "http://schemas.google.com/docs/2007");
+}
+
+static gchar *
+get_entry_uri (const gchar *id)
+{
+ return g_strconcat ("https://www.googleapis.com/drive/v2/files/", id, NULL);
+}
+
+/**
+ * gdata_documents_entry_get_edited:
+ * @self: a #GDataDocumentsEntry
+ *
+ * Gets the #GDataDocumentsEntry:edited property. If the property is unset, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the UNIX timestamp for the time the document was last edited, or <code class="literal">-1</code>
+ *
+ * Since: 0.4.0
+ * Deprecated: 0.17.0: Use gdata_entry_get_updated() instead. See #GDataDocumentsEntry:edited.
+ */
+gint64
+gdata_documents_entry_get_edited (GDataDocumentsEntry *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_ENTRY (self), -1);
+ return gdata_entry_get_updated (GDATA_ENTRY (self));
+}
+
+/**
+ * gdata_documents_entry_get_last_viewed:
+ * @self: a #GDataDocumentsEntry
+ *
+ * Gets the #GDataDocumentsEntry:last-viewed property. If the property is unset, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the UNIX timestamp for the time the document was last viewed, or <code class="literal">-1</code>
+ *
+ * Since: 0.4.0
+ */
+gint64
+gdata_documents_entry_get_last_viewed (GDataDocumentsEntry *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_ENTRY (self), -1);
+ return self->priv->last_viewed;
+}
+
+/**
+ * gdata_documents_entry_get_path:
+ * @self: a #GDataDocumentsEntry
+ *
+ * Builds a path for the #GDataDocumentsEntry, starting from a root node and traversing the folders containing the document, then ending with the
+ * document's ID.
+ *
+ * An example path would be: <literal>/folder_id1/folder_id2/document_id</literal>.
+ *
+ * Note: the path is based on the entry/document IDs of the folders (#GDataEntry:id) and document (#GDataDocumentsEntry:document-id),
+ * and not the entries' human-readable names (#GDataEntry:title).
+ *
+ * Return value: the folder hierarchy path containing the document, or %NULL; free with g_free()
+ *
+ * Since: 0.4.0
+ */
+gchar *
+gdata_documents_entry_get_path (GDataDocumentsEntry *self)
+{
+ GList *element, *parent_folders_list = NULL;
+ GString *path;
+ const gchar *id;
+
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_ENTRY (self), NULL);
+
+ path = g_string_new ("/");
+ parent_folders_list = gdata_entry_look_up_links (GDATA_ENTRY (self), GDATA_LINK_PARENT);
+
+ /* We check all the folders contained that are parents of the GDataDocumentsEntry */
+ for (element = parent_folders_list; element != NULL; element = element->next) {
+ guint i;
+ gchar *folder_id = NULL;
+ gchar **link_href_cut = g_strsplit (gdata_link_get_uri (GDATA_LINK (element->data)), "/", 0);
+
+ /* Extract the folder ID from the folder URI, which is of the form:
+ * http://docs.google.com/feeds/documents/private/full/folder%3Afolder_id
+ * We want the "folder_id" bit. */
+ for (i = 0;; i++) {
+ gchar **path_cut = NULL;
+
+ if (link_href_cut[i] == NULL)
+ break;
+
+ path_cut = g_strsplit (link_href_cut[i], "%3A", 2);
+ if (*path_cut != NULL) {
+ if (strcmp (path_cut[0], "folder") == 0){
+ folder_id = g_strdup (path_cut[1]);
+ g_strfreev (path_cut);
+ break;
+ }
+ }
+ g_strfreev (path_cut);
+ }
+ g_strfreev (link_href_cut);
+ g_assert (folder_id != NULL);
+
+ /* Append the folder ID to our path */
+ g_string_append (path, folder_id);
+ g_string_append_c (path, '/');
+ g_free (folder_id);
+ }
+
+ /* Append the entry ID */
+ id = gdata_entry_get_id (GDATA_ENTRY (self));
+ g_string_append (path, id);
+
+ return g_string_free (path, FALSE);
+}
+
+/**
+ * gdata_documents_entry_get_document_id:
+ * @self: a #GDataDocumentsEntry
+ *
+ * Gets the #GDataDocumentsEntry:document-id property. The
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#terminology_used_in_this_guide">online GData Documentation</ulink>
+ * refers to these as “untyped resource IDs”.
+ *
+ * Return value: the document's document ID
+ *
+ * Since: 0.4.0
+ * Deprecated: 0.11.0: Use gdata_documents_entry_get_resource_id() instead. See #GDataDocumentsEntry:document-id.
+ */
+const gchar *
+gdata_documents_entry_get_document_id (GDataDocumentsEntry *self )
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_ENTRY (self), NULL);
+ return gdata_entry_get_id (GDATA_ENTRY (self));
+}
+
+/**
+ * gdata_documents_entry_get_resource_id:
+ * @self: a #GDataDocumentsEntry
+ *
+ * Gets the #GDataDocumentsEntry:resource-id property.
+ *
+ * Return value: the document's resource ID
+ *
+ * Since: 0.11.0
+ */
+const gchar *
+gdata_documents_entry_get_resource_id (GDataDocumentsEntry *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_ENTRY (self), NULL);
+ return self->priv->resource_id;
+}
+
+void
+_gdata_documents_entry_set_resource_id (GDataDocumentsEntry *self, const gchar *resource_id)
+{
+ g_return_if_fail (GDATA_IS_DOCUMENTS_ENTRY (self));
+ g_return_if_fail (resource_id != NULL && resource_id[0] != '\0');
+
+ if (g_strcmp0 (resource_id, self->priv->resource_id) == 0)
+ return;
+
+ g_free (self->priv->resource_id);
+ self->priv->resource_id = g_strdup (resource_id);
+
+ g_object_notify (G_OBJECT (self), "resource-id");
+}
+
+/**
+ * gdata_documents_entry_set_writers_can_invite:
+ * @self: a #GDataDocumentsEntry
+ * @writers_can_invite: %TRUE if writers can invite other people to edit the document, %FALSE otherwise
+ *
+ * Sets the #GDataDocumentsEntry:writers-can-invite property to @writers_can_invite.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_documents_entry_set_writers_can_invite (GDataDocumentsEntry *self, gboolean writers_can_invite)
+{
+ g_return_if_fail (GDATA_IS_DOCUMENTS_ENTRY (self));
+ self->priv->writers_can_invite = writers_can_invite;
+ g_object_notify (G_OBJECT (self), "writers-can-invite");
+}
+
+/**
+ * gdata_documents_entry_writers_can_invite:
+ * @self: a #GDataDocumentsEntry
+ *
+ * Gets the #GDataDocumentsEntry:writers-can-invite property.
+ *
+ * Return value: %TRUE if writers can invite other people to edit the document, %FALSE otherwise
+ *
+ * Since: 0.4.0
+ */
+gboolean
+gdata_documents_entry_writers_can_invite (GDataDocumentsEntry *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_ENTRY (self ), FALSE);
+ return self->priv->writers_can_invite;
+}
+
+/**
+ * gdata_documents_entry_get_last_modified_by:
+ * @self: a #GDataDocumentsEntry
+ *
+ * Gets the #GDataDocumentsEntry:last-modified-by property.
+ *
+ * Return value: (transfer none): the author who last modified the document
+ *
+ * Since: 0.4.0
+ */
+GDataAuthor *
+gdata_documents_entry_get_last_modified_by (GDataDocumentsEntry *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_ENTRY (self), NULL);
+ return self->priv->last_modified_by;
+}
+
+/**
+ * gdata_documents_entry_get_quota_used:
+ * @self: a #GDataDocumentsEntry
+ *
+ * Gets the #GDataDocumentsEntry:quota-used property.
+ *
+ * Return value: the number of quota bytes used by the document
+ *
+ * Since: 0.13.0
+ */
+goffset
+gdata_documents_entry_get_quota_used (GDataDocumentsEntry *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_ENTRY (self), 0);
+
+ return self->priv->quota_used;
+}
+
+/**
+ * gdata_documents_entry_get_file_size:
+ * @self: a #GDataDocumentsEntry
+ *
+ * Gets the #GDataDocumentsEntry:file-size property.
+ *
+ * Return value: the size of the document in bytes
+ *
+ * Since: 0.17.7
+ */
+goffset
+gdata_documents_entry_get_file_size (GDataDocumentsEntry *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_ENTRY (self), 0);
+
+ return self->priv->file_size;
+}
+
+/**
+ * gdata_documents_entry_is_deleted:
+ * @self: a #GDataDocumentsEntry
+ *
+ * Gets the #GDataDocumentsEntry:is-deleted property.
+ *
+ * Return value: %TRUE if the document has been deleted, %FALSE otherwise
+ *
+ * Since: 0.5.0
+ */
+gboolean
+gdata_documents_entry_is_deleted (GDataDocumentsEntry *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_ENTRY (self), FALSE);
+ return self->priv->is_deleted;
+}
+
+
+/**
+ * gdata_documents_entry_get_document_properties:
+ * @self: a #GDataDocumentsEntry
+ *
+ * Gets a list of the #GDataDocumentsPropertys for this entry.
+ *
+ * Return value: (transfer none) (element-type GDataDocumentsProperty): a #GList of pointers to #GDataDocumentsPropertys
+ *
+ * Since: 0.17.11
+ */
+GList *
+gdata_documents_entry_get_document_properties (GDataDocumentsEntry *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_ENTRY (self), NULL);
+ return self->priv->properties;
+}
+
+/**
+ * gdata_documents_entry_add_documents_property:
+ * @self: a #GDataDocumentsEntry
+ * @property: a #GDataDocumentsProperty
+ *
+ * Inserts/updates @property on "properties" list in @self. Since, a GDataDocumentsProperty is uniquely identified by #GDataDocumentsProperty:key and #GDataDocumentsProperty:visibility, if no such property exists in the "properties" list, then a @property will be appended to the list after incrementing the reference count.
+ *
+ * In case that there already exists a @property in "properties", the #GDataDocumentsProperty inside the list will be updated to @property. Note that #GDataDocumentsProperty:value has no role in determining the uniqueness of a #GDataDocumentsProperty.
+ *
+ * The changes made by this function will be local only and you need to explicitly update @self by calling gdata_service_update_entry().
+ *
+ * Return value: %TRUE if the @property doesn't exist in the "properties" list, or that #GDataDocumentsProperty:value of @property has been set to %NULL by a call to gdata_documents_entry_remove_documents_property(). %FALSE if @property exists in "properties" list, or in the case that @self or @property aren't of proper types.
+ *
+ * Since: 0.17.11
+ */
+gboolean
+gdata_documents_entry_add_documents_property (GDataDocumentsEntry *self, GDataDocumentsProperty *property) {
+ GList *l = NULL;
+ gboolean ret_val = TRUE;
+
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_ENTRY (self), FALSE);
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_PROPERTY (property), FALSE);
+
+ l = g_list_find_custom (self->priv->properties, property, (GCompareFunc) gdata_comparable_compare);
+
+ if (l == NULL) {
+ self->priv->properties = g_list_prepend (self->priv->properties, g_object_ref (property));
+ } else {
+ GDataDocumentsProperty *_prop = GDATA_DOCUMENTS_PROPERTY (l->data);
+ if (gdata_documents_property_get_value (_prop) != NULL)
+ ret_val = FALSE;
+ gdata_documents_property_set_value (_prop, gdata_documents_property_get_value (property));
+ }
+
+ return ret_val;
+}
+
+/**
+ * gdata_documents_entry_remove_documents_property:
+ * @self: a #GDataDocumentsEntry
+ * @property: a #GDataDocumentsProperty
+ *
+ * The property specified by @property will be removed from the "properties" list on @self.
+ *
+ * Only #GDataDocumentsProperty:key and #GDataDocumentsProperty:visibility will be used to find @property in "properties" list. #GDataDocumentsProperty:value has no role in determining the uniqueness of a #GDataDocumentsProperty.
+ *
+ * The changes made by this function will be local only and you need to explicitly update @self by calling gdata_service_update_entry().
+ *
+ * Return value: %TRUE if @property has been successfully removed from "properties" list on @self, %FALSE otherwise.
+ *
+ * Since: 0.17.11
+ */
+gboolean
+gdata_documents_entry_remove_documents_property (GDataDocumentsEntry *self, GDataDocumentsProperty *property) {
+ GList *l;
+
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_ENTRY (self), FALSE);
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_PROPERTY (property), FALSE);
+
+ l = g_list_find_custom (self->priv->properties, property, (GCompareFunc) gdata_comparable_compare);
+
+ if (l == NULL) {
+ return FALSE;
+ }
+
+ /* Google Drive has this weird behaviour that setting the properties
+ * array to empty with file/update method doesn't empties the array.
+ * For eg. Suppose we initially did an update with properties array
+ * with value [1, 2, 3]. If we again update the properties array with
+ * [1, 5, 6], the final resulting properties array will be [1, 2, 3, 5,
+ * 6] meaning that the values get appended on subsequent updates.
+ *
+ * The way to counter this is to set the "value" field in the Property
+ * Resource to NULL, which removes that Property Resource from the
+ * properties array.
+ */
+ gdata_documents_property_set_value ((GDataDocumentsProperty *) l->data, NULL);
+
+ return TRUE;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Thibault Saunier 2009 <saunierthibault@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_DOCUMENTS_ENTRY_H
+#define GDATA_DOCUMENTS_ENTRY_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-entry.h>
+#include <gdata/gdata-service.h>
+#include <gdata/atom/gdata-author.h>
+#include <gdata/services/documents/gdata-documents-property.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_DOCUMENTS_ACCESS_ROLE_OWNER:
+ *
+ * The users specified by the #GDataAccessRule have full owner access to the document. This allows them to modify the access rules and delete
+ * the document, amongst other things.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_DOCUMENTS_ACCESS_ROLE_OWNER "owner"
+
+/**
+ * GDATA_DOCUMENTS_ACCESS_ROLE_WRITER:
+ *
+ * The users specified by the #GDataAccessRule have write access to the document. They cannot modify the access rules or delete the document.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_DOCUMENTS_ACCESS_ROLE_WRITER "writer"
+
+/**
+ * GDATA_DOCUMENTS_ACCESS_ROLE_READER:
+ *
+ * The users specified by the #GDataAccessRule have read-only access to the document.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_DOCUMENTS_ACCESS_ROLE_READER "reader"
+
+#define GDATA_TYPE_DOCUMENTS_ENTRY (gdata_documents_entry_get_type ())
+#define GDATA_DOCUMENTS_ENTRY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_DOCUMENTS_ENTRY, GDataDocumentsEntry))
+#define GDATA_DOCUMENTS_ENTRY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_DOCUMENTS_ENTRY, GDataDocumentsEntryClass))
+#define GDATA_IS_DOCUMENTS_ENTRY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_DOCUMENTS_ENTRY))
+#define GDATA_IS_DOCUMENTS_ENTRY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_DOCUMENTS_ENTRY))
+#define GDATA_DOCUMENTS_ENTRY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_DOCUMENTS_ENTRY, GDataDocumentsEntryClass))
+
+typedef struct _GDataDocumentsEntryPrivate GDataDocumentsEntryPrivate;
+
+/**
+ * GDataDocumentsEntry:
+ *
+ * All the fields in the #GDataDocumentsEntry structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ GDataEntry parent;
+ GDataDocumentsEntryPrivate *priv;
+} GDataDocumentsEntry;
+
+/**
+ * GDataDocumentsEntryClass:
+ *
+ * All the fields in the #GDataDocumentsEntryClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataEntryClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataDocumentsEntryClass;
+
+GType gdata_documents_entry_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataDocumentsEntry, g_object_unref)
+
+gchar *gdata_documents_entry_get_path (GDataDocumentsEntry *self) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_documents_entry_get_resource_id (GDataDocumentsEntry *self) G_GNUC_PURE;
+
+#ifndef LIBGDATA_DISABLE_DEPRECATED
+const gchar *gdata_documents_entry_get_document_id (GDataDocumentsEntry *self) G_GNUC_PURE G_GNUC_DEPRECATED_FOR(gdata_documents_entry_get_resource_id);
+gint64 gdata_documents_entry_get_edited (GDataDocumentsEntry *self) G_GNUC_DEPRECATED_FOR(gdata_entry_get_updated);
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
+
+gint64 gdata_documents_entry_get_last_viewed (GDataDocumentsEntry *self);
+
+void gdata_documents_entry_set_writers_can_invite (GDataDocumentsEntry *self, gboolean writers_can_invite);
+gboolean gdata_documents_entry_writers_can_invite (GDataDocumentsEntry *self) G_GNUC_PURE;
+
+GDataAuthor *gdata_documents_entry_get_last_modified_by (GDataDocumentsEntry *self) G_GNUC_PURE;
+
+goffset gdata_documents_entry_get_quota_used (GDataDocumentsEntry *self) G_GNUC_PURE;
+goffset gdata_documents_entry_get_file_size (GDataDocumentsEntry *self) G_GNUC_PURE;
+
+gboolean gdata_documents_entry_is_deleted (GDataDocumentsEntry *self) G_GNUC_PURE;
+
+GList *gdata_documents_entry_get_document_properties (GDataDocumentsEntry *self);
+
+gboolean gdata_documents_entry_add_documents_property (GDataDocumentsEntry *self, GDataDocumentsProperty *property);
+gboolean gdata_documents_entry_remove_documents_property (GDataDocumentsEntry *self, GDataDocumentsProperty *property);
+
+G_END_DECLS
+
+#endif /* !GDATA_DOCUMENTS_ENTRY_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Thibault Saunier 2009 <saunierthibault@gmail.com>
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ * Copyright (C) Red Hat, Inc. 2015
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-documents-feed
+ * @short_description: GData documents feed object
+ * @stability: Stable
+ * @include: gdata/services/documents/gdata-documents-feed.h
+ *
+ * #GDataDocumentsFeed is a list of entries (#GDataDocumentsEntry subclasses) returned as the result of a query to a #GDataDocumentsService,
+ * or given as the input to another operation on the online service.
+ *
+ * Each #GDataDocumentsEntry represents a single object on the Google Documents online service, such as a text document, presentation document,
+ * spreadsheet document or a folder, and the #GDataDocumentsFeed represents a collection of those objects.
+ *
+ * Since: 0.4.0
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+
+#include "gdata-documents-feed.h"
+#include "gdata-documents-utils.h"
+#include "gdata-types.h"
+#include "gdata-private.h"
+#include "gdata-service.h"
+
+static gboolean parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error);
+
+G_DEFINE_TYPE (GDataDocumentsFeed, gdata_documents_feed, GDATA_TYPE_FEED)
+
+static void
+gdata_documents_feed_class_init (GDataDocumentsFeedClass *klass)
+{
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+ parsable_class->parse_json = parse_json;
+}
+
+static void
+gdata_documents_feed_init (GDataDocumentsFeed *self)
+{
+ /* Why am I writing it? */
+}
+
+static void
+get_kind_and_mime_type (JsonReader *reader, gchar **out_kind, gchar **out_mime_type, GError **error)
+{
+ GError *child_error = NULL;
+ gboolean success;
+ gchar *kind = NULL;
+ gchar *mime_type = NULL;
+ guint i, members;
+
+ for (i = 0, members = (guint) json_reader_count_members (reader); i < members; i++) {
+ json_reader_read_element (reader, i);
+
+ if (gdata_parser_string_from_json_member (reader, "kind", P_REQUIRED | P_NON_EMPTY, &kind, &success, &child_error) == TRUE) {
+ if (!success && child_error != NULL) {
+ g_propagate_prefixed_error (error, child_error,
+ /* Translators: the parameter is an error message */
+ _("Error parsing JSON: %s"),
+ "Failed to find ‘kind’.");
+ json_reader_end_element (reader);
+ goto out;
+ }
+ }
+
+ if (gdata_parser_string_from_json_member (reader, "mimeType", P_DEFAULT, &mime_type, &success, &child_error) == TRUE) {
+ if (!success && child_error != NULL) {
+ g_propagate_prefixed_error (error, child_error,
+ /* Translators: the parameter is an error message */
+ _("Error parsing JSON: %s"),
+ "Failed to find ‘mimeType’.");
+ json_reader_end_element (reader);
+ goto out;
+ }
+ }
+
+ json_reader_end_element (reader);
+ }
+
+ if (out_kind != NULL) {
+ *out_kind = kind;
+ kind = NULL;
+ }
+
+ if (out_mime_type != NULL) {
+ *out_mime_type = mime_type;
+ mime_type = NULL;
+ }
+
+ out:
+ g_free (kind);
+ g_free (mime_type);
+}
+
+static gboolean
+parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error)
+{
+ /* JSON format: https://developers.google.com/drive/v2/reference/files/list */
+
+ if (g_strcmp0 (json_reader_get_member_name (reader), "items") == 0) {
+ gboolean success = TRUE;
+ guint i, elements;
+
+ if (json_reader_is_array (reader) == FALSE) {
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the parameter is an error message */
+ _("Error parsing JSON: %s"),
+ "JSON node ‘items’ is not an array.");
+ return FALSE;
+ }
+
+ /* Loop through the elements array. */
+ for (i = 0, elements = (guint) json_reader_count_elements (reader); success && i < elements; i++) {
+ GDataEntry *entry = NULL;
+ GError *child_error = NULL;
+ GType entry_type = G_TYPE_INVALID;
+ gchar *kind = NULL;
+ gchar *mime_type = NULL;
+
+ json_reader_read_element (reader, i);
+
+ if (json_reader_is_object (reader) == FALSE) {
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ /* Translators: the parameter is an error message */
+ _("Error parsing JSON: %s"),
+ "JSON node inside ‘items’ is not an object");
+ success = FALSE;
+ goto continuation;
+ }
+
+ get_kind_and_mime_type (reader, &kind, &mime_type, &child_error);
+ if (child_error != NULL) {
+ g_propagate_error (error, child_error);
+ success = FALSE;
+ goto continuation;
+ }
+
+ if (g_strcmp0 (kind, "drive#file") == 0) {
+ entry_type = gdata_documents_utils_get_type_from_content_type (mime_type);
+ } else {
+ g_warning ("%s files are not handled yet", kind);
+ }
+
+ if (entry_type == G_TYPE_INVALID)
+ goto continuation;
+
+ entry = GDATA_ENTRY (_gdata_parsable_new_from_json_node (entry_type, reader, NULL, error));
+ /* Call the progress callback in the main thread */
+ _gdata_feed_call_progress_callback (GDATA_FEED (parsable), user_data, entry);
+ _gdata_feed_add_entry (GDATA_FEED (parsable), entry);
+
+ continuation:
+ g_clear_object (&entry);
+ g_free (kind);
+ g_free (mime_type);
+ json_reader_end_element (reader);
+ }
+
+ return success;
+ }
+
+ return GDATA_PARSABLE_CLASS (gdata_documents_feed_parent_class)->parse_json (parsable, reader, user_data, error);
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Thibault Saunier <saunierthibault@gmail.com
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_DOCUMENTS_FEED_H
+#define GDATA_DOCUMENTS_FEED_H
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gdata/gdata-feed.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_DOCUMENTS_FEED (gdata_documents_feed_get_type ())
+#define GDATA_DOCUMENTS_FEED(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_DOCUMENTS_FEED, GDataDocumentsFeed))
+#define GDATA_DOCUMENTS_FEED_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_DOCUMENTS_FEED, GDataDocumentsFeedClass))
+#define GDATA_IS_DOCUMENTS_FEED(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_DOCUMENTS_FEED))
+#define GDATA_IS_DOCUMENTS_FEED_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_DOCUMENTS_FEED))
+#define GDATA_DOCUMENTS_FEED_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_DOCUMENTS_FEED, GDataDocumentsFeedClass))
+
+typedef struct _GDataDocumentsFeedPrivate GDataDocumentsFeedPrivate;
+
+/**
+ * GDataDocumentsFeed:
+ *
+ * All the fields in the #GDataDocumentsFeed structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataFeed parent;
+ GDataDocumentsFeedPrivate *priv;
+} GDataDocumentsFeed;
+
+/**
+ * GDataDocumentsFeedClass:
+ *
+ * All the fields in the #GDataDocumentsFeedClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataFeedClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataDocumentsFeedClass;
+
+GType gdata_documents_feed_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataDocumentsFeed, g_object_unref)
+
+G_END_DECLS
+
+#endif /* !GDATA_DOCUMENTS_FEED_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Thibault Saunier 2009 <saunierthibault@gmail.com>
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ * Copyright (C) Red Hat, Inc. 2015, 2016, 2017
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-documents-folder
+ * @short_description: GData documents folder object
+ * @stability: Stable
+ * @include: gdata/services/documents/gdata-documents-folder.h
+ *
+ * #GDataDocumentsFolder is a subclass of #GDataDocumentsEntry to represent a folder from Google Documents.
+ *
+ * For more details of Google Drive's GData API, see the
+ * <ulink type="http" url="https://developers.google.com/drive/v2/web/about-sdk">online documentation</ulink>.
+ *
+ * <example>
+ * <title>Adding a Folder</title>
+ * <programlisting>
+ * GDataAuthorizationDomain *domain;
+ * GDataDocumentsService *service;
+ * GDataDocumentsFolder *folder, *new_folder, *parent_folder;
+ * GError *error = NULL;
+ *
+ * domain = gdata_documents_service_get_primary_authorization_domain ();
+ *
+ * /<!-- -->* Create a service *<!-- -->/
+ * service = create_documents_service ();
+ *
+ * parent_folder = GDATA_DOCUMENTS_FOLDER (gdata_service_query_single_entry (GDATA_SERVICE (service), domain, "root", NULL,
+ * GDATA_TYPE_DOCUMENTS_FOLDER, NULL, &error));
+ * if (error != NULL) {
+ * g_error ("Error getting root folder");
+ * g_error_free (error);
+ * return;
+ * }
+ *
+ * /<!-- -->* Create the new folder *<!-- -->/
+ * folder = gdata_documents_folder_new (NULL);
+ * gdata_entry_set_title (GDATA_ENTRY (folder), "Folder Name");
+ *
+ * /<!-- -->* Insert the folder *<!-- -->/
+ * new_folder = GDATA_DOCUMENTS_FOLDER (gdata_documents_service_add_entry_to_folder (GDATA_SERVICE (service), GDATA_DOCUMENTS_ENTRY (folder),
+ * parent_folder, NULL, &error));
+ *
+ * g_object_unref (folder);
+ * g_object_unref (parent_folder);
+ * g_object_unref (service);
+ *
+ * if (error != NULL) {
+ * g_error ("Error inserting new folder: %s", error->message);
+ * g_error_free (error);
+ * return;
+ * }
+ *
+ * /<!-- -->* Do something with the new folder, such as store its ID for future use *<!-- -->/
+ *
+ * g_object_unref (new_folder);
+ * </programlisting>
+ * </example>
+ *
+ * Since: 0.4.0
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <libxml/parser.h>
+#include <string.h>
+
+#include "gdata-documents-entry-private.h"
+#include "gdata-documents-folder.h"
+#include "gdata-documents-utils.h"
+#include "gdata-parser.h"
+#include "gdata-types.h"
+#include "gdata-private.h"
+
+static void gdata_documents_folder_constructed (GObject *object);
+static gboolean post_parse_json (GDataParsable *parsable, gpointer user_data, GError **error);
+
+G_DEFINE_TYPE (GDataDocumentsFolder, gdata_documents_folder, GDATA_TYPE_DOCUMENTS_ENTRY)
+
+static void
+gdata_documents_folder_class_init (GDataDocumentsFolderClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+ GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
+
+ gobject_class->constructed = gdata_documents_folder_constructed;
+ parsable_class->post_parse_json = post_parse_json;
+ entry_class->kind_term = "http://schemas.google.com/docs/2007#folder";
+}
+
+static void
+gdata_documents_folder_init (GDataDocumentsFolder *self)
+{
+ /* Why am I writing it? */
+}
+
+static void
+gdata_documents_folder_constructed (GObject *object)
+{
+ G_OBJECT_CLASS (gdata_documents_folder_parent_class)->constructed (object);
+
+ if (!_gdata_parsable_is_constructed_from_xml (GDATA_PARSABLE (object)))
+ gdata_documents_utils_add_content_type (GDATA_DOCUMENTS_ENTRY (object), "application/vnd.google-apps.folder");
+}
+
+static gboolean
+post_parse_json (GDataParsable *parsable, gpointer user_data, GError **error)
+{
+ const gchar *id;
+ gchar *resource_id;
+
+ id = gdata_entry_get_id (GDATA_ENTRY (parsable));
+
+ /* Since the document-id is identical to GDataEntry:id, which is parsed by the parent class, we can't
+ * create the resource-id while parsing. */
+ resource_id = g_strconcat ("folder:", id, NULL);
+ _gdata_documents_entry_set_resource_id (GDATA_DOCUMENTS_ENTRY (parsable), resource_id);
+
+ g_free (resource_id);
+ return GDATA_PARSABLE_CLASS (gdata_documents_folder_parent_class)->post_parse_json (parsable, user_data, error);
+}
+
+/**
+ * gdata_documents_folder_new:
+ * @id: (allow-none): the entry's ID (not the document ID of the folder), or %NULL
+ *
+ * Creates a new #GDataDocumentsFolder with the given entry ID (#GDataEntry:id).
+ *
+ * Return value: a new #GDataDocumentsFolder, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.4.0
+ */
+GDataDocumentsFolder *
+gdata_documents_folder_new (const gchar *id)
+{
+ return GDATA_DOCUMENTS_FOLDER (g_object_new (GDATA_TYPE_DOCUMENTS_FOLDER, "id", id, NULL));
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Thibault Saunier 2009 <saunierthibault@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_DOCUMENTS_FOLDER_H
+#define GDATA_DOCUMENTS_FOLDER_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/services/documents/gdata-documents-entry.h>
+#include <gdata/gdata-types.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_DOCUMENTS_FOLDER (gdata_documents_folder_get_type ())
+#define GDATA_DOCUMENTS_FOLDER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_DOCUMENTS_FOLDER, GDataDocumentsFolder))
+#define GDATA_DOCUMENTS_FOLDER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_DOCUMENTS_FOLDER, GDataDocumentsFolderClass))
+#define GDATA_IS_DOCUMENTS_FOLDER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_DOCUMENTS_FOLDER))
+#define GDATA_IS_DOCUMENTS_FOLDER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_DOCUMENTS_FOLDER))
+#define GDATA_DOCUMENTS_FOLDER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_DOCUMENTS_FOLDER, GDataDocumentsFolderClass))
+
+typedef struct _GDataDocumentsFolderPrivate GDataDocumentsFolderPrivate;
+
+/**
+ * GDataDocumentsFolder:
+ *
+ * All the fields in the #GDataDocumentsFolder structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ GDataDocumentsEntry parent;
+ GDataDocumentsFolderPrivate *priv;
+} GDataDocumentsFolder;
+
+/**
+ * GDataDocumentsFolderClass:
+ *
+ * All the fields in the #GDataDocumentsFolderClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataDocumentsEntryClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataDocumentsFolderClass;
+
+GType gdata_documents_folder_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataDocumentsFolder, g_object_unref)
+
+GDataDocumentsFolder *gdata_documents_folder_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+G_END_DECLS
+
+#endif /* !GDATA_DOCUMENTS_FOLDER_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Michael Terry 2017 <mike@mterry.name>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-documents-metadata
+ * @short_description: GData document service metadata class
+ * @stability: Stable
+ * @include: gdata/services/documents/gdata-documents-metadata.h
+ *
+ * #GDataDocumentsMetadata is a subclass of #GDataParsable to represent Google Drive service metadata.
+ *
+ * For more details of Google Documents' GData API, see the
+ * <ulink type="http" url="https://developers.google.com/drive/v2/web/about-sdk">online documentation</ulink>.
+ *
+ * Since: 0.17.9
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+
+#include "gdata-documents-metadata.h"
+#include "gdata-parser.h"
+#include "gdata-types.h"
+
+static const gchar *get_content_type (void);
+static void gdata_documents_metadata_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_documents_metadata_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static gboolean parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error);
+
+struct _GDataDocumentsMetadataPrivate {
+ goffset quota_total; /* bytes */
+ goffset quota_used; /* bytes */
+ gboolean quota_unlimited;
+};
+
+enum {
+ PROP_QUOTA_TOTAL = 1,
+ PROP_QUOTA_USED,
+};
+
+G_DEFINE_TYPE (GDataDocumentsMetadata, gdata_documents_metadata, GDATA_TYPE_PARSABLE)
+
+static void
+gdata_documents_metadata_class_init (GDataDocumentsMetadataClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataDocumentsMetadataPrivate));
+
+ gobject_class->get_property = gdata_documents_metadata_get_property;
+ gobject_class->set_property = gdata_documents_metadata_set_property;
+
+ parsable_class->parse_json = parse_json;
+ parsable_class->get_content_type = get_content_type;
+
+ /**
+ * GDataDocumentsMetadata:quota-total:
+ *
+ * The user quota limit across all services. Measured in bytes.
+ *
+ * Since: 0.17.9
+ */
+ g_object_class_install_property (gobject_class, PROP_QUOTA_TOTAL,
+ g_param_spec_int64 ("quota-total",
+ "Quota total", "The user quota limit across all services.",
+ -1, G_MAXINT64, 0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataDocumentsMetadata:quota-used:
+ *
+ * The amount of user quota used up across all services. Measured in bytes.
+ *
+ * Since: 0.17.9
+ */
+ g_object_class_install_property (gobject_class, PROP_QUOTA_USED,
+ g_param_spec_int64 ("quota-used",
+ "Quota used", "The amount of user quota used up across all services.",
+ 0, G_MAXINT64, 0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_documents_metadata_init (GDataDocumentsMetadata *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_DOCUMENTS_METADATA, GDataDocumentsMetadataPrivate);
+}
+
+static void
+gdata_documents_metadata_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataDocumentsMetadata *self = GDATA_DOCUMENTS_METADATA (object);
+
+ switch (property_id) {
+ case PROP_QUOTA_TOTAL:
+ g_value_set_int64 (value, gdata_documents_metadata_get_quota_total (self));
+ break;
+ case PROP_QUOTA_USED:
+ g_value_set_int64 (value, gdata_documents_metadata_get_quota_used (self));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_documents_metadata_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ switch (property_id) {
+ case PROP_QUOTA_TOTAL:
+ case PROP_QUOTA_USED:
+ /* Read only. */
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error)
+{
+ GDataDocumentsMetadataPrivate *priv = GDATA_DOCUMENTS_METADATA (parsable)->priv;
+ gboolean success = TRUE;
+ gchar *quota_total = NULL;
+ gchar *quota_used = NULL;
+ gchar *quota_type = NULL;
+
+ /* JSON format: https://developers.google.com/drive/v2/reference/about */
+
+ if (gdata_parser_string_from_json_member (reader, "quotaBytesTotal", P_DEFAULT, "a_total, &success, error) == TRUE) {
+ gchar *end_ptr;
+ guint64 val;
+
+ /* Even though ‘quotaBytesTotal’ is documented as long,
+ * it is actually a string in the JSON.
+ */
+ val = g_ascii_strtoull (quota_total, &end_ptr, 10);
+ if (*end_ptr == '\0')
+ priv->quota_total = (goffset) val;
+ g_free (quota_total);
+ return success;
+ } else if (gdata_parser_string_from_json_member (reader, "quotaBytesUsedAggregate", P_DEFAULT, "a_used, &success, error) == TRUE) {
+ gchar *end_ptr;
+ guint64 val;
+
+ /* Even though ‘quotaBytesUsedAggregate’ is documented as long,
+ * it is actually a string in the JSON.
+ */
+ val = g_ascii_strtoull (quota_used, &end_ptr, 10);
+ if (*end_ptr == '\0')
+ priv->quota_used = (goffset) val;
+ g_free (quota_used);
+ return success;
+ } else if (gdata_parser_string_from_json_member (reader, "quotaType", P_DEFAULT, "a_type, &success, error) == TRUE) {
+ if (g_strcmp0 (quota_type, "UNLIMITED") == 0)
+ priv->quota_unlimited = TRUE;
+ g_free (quota_type);
+ return success;
+ }
+
+ return GDATA_PARSABLE_CLASS (gdata_documents_metadata_parent_class)->parse_json (parsable, reader, user_data, error);
+}
+
+static const gchar *
+get_content_type (void)
+{
+ return "application/json";
+}
+
+/**
+ * gdata_documents_metadata_get_quota_total:
+ * @self: a #GDataDocumentsMetadata
+ *
+ * Gets the #GDataDocumentsMetadata:quota-total property.
+ *
+ * Return value: the number of quota bytes available in total. Returns -1 if
+ * there is no quota limit.
+ *
+ * Since: 0.17.9
+ */
+goffset
+gdata_documents_metadata_get_quota_total (GDataDocumentsMetadata *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_METADATA (self), 0);
+
+ if (self->priv->quota_unlimited)
+ return -1;
+ else
+ return self->priv->quota_total;
+}
+
+/**
+ * gdata_documents_metadata_get_quota_used:
+ * @self: a #GDataDocumentsMetadata
+ *
+ * Gets the #GDataDocumentsMetadata:quota-used property.
+ *
+ * Return value: the number of quota bytes used by the documents service
+ *
+ * Since: 0.17.9
+ */
+goffset
+gdata_documents_metadata_get_quota_used (GDataDocumentsMetadata *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_METADATA (self), 0);
+
+ return self->priv->quota_used;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Michael Terry 2017 <mike@mterry.name>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_DOCUMENTS_METADATA_H
+#define GDATA_DOCUMENTS_METADATA_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+
+#define GDATA_TYPE_DOCUMENTS_METADATA (gdata_documents_metadata_get_type ())
+#define GDATA_DOCUMENTS_METADATA(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_DOCUMENTS_METADATA, GDataDocumentsMetadata))
+#define GDATA_DOCUMENTS_METADATA_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_DOCUMENTS_METADATA, GDataDocumentsMetadataClass))
+#define GDATA_IS_DOCUMENTS_METADATA(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_DOCUMENTS_METADATA))
+#define GDATA_IS_DOCUMENTS_METADATA_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_DOCUMENTS_METADATA))
+#define GDATA_DOCUMENTS_METADATA_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_DOCUMENTS_METADATA, GDataDocumentsMetadataClass))
+
+typedef struct _GDataDocumentsMetadataPrivate GDataDocumentsMetadataPrivate;
+
+/**
+ * GDataDocumentsMetadata:
+ *
+ * All the fields in the #GDataDocumentsMetadata structure are private and should never be accessed directly.
+ *
+ * Since: 0.17.9
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataDocumentsMetadataPrivate *priv;
+} GDataDocumentsMetadata;
+
+/**
+ * GDataDocumentsMetadataClass:
+ *
+ * All the fields in the #GDataDocumentsMetadataClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.17.9
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataDocumentsMetadataClass;
+
+GType gdata_documents_metadata_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataDocumentsMetadata, g_object_unref)
+
+goffset gdata_documents_metadata_get_quota_total (GDataDocumentsMetadata *self) G_GNUC_PURE;
+goffset gdata_documents_metadata_get_quota_used (GDataDocumentsMetadata *self) G_GNUC_PURE;
+
+G_END_DECLS
+
+#endif /* !GDATA_DOCUMENTS_METADATA_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Thibault Saunier 2009 <saunierthibault@gmail.com>
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ * Copyright (C) Cosimo Cecchi 2012 <cosimoc@gnome.org>
+ * Copyright (C) Red Hat, Inc. 2016
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-documents-pdf
+ * @short_description: GData Documents pdf object
+ * @stability: Stable
+ * @include: gdata/services/documents/gdata-documents-pdf.h
+ *
+ * #GDataDocumentsPdf is a subclass of #GDataDocumentsDocument to represent a PDF document from Google Documents.
+ *
+ * For more details of Google Drive's GData API, see the
+ * <ulink type="http" url="https://developers.google.com/drive/v2/web/about-sdk">online documentation</ulink>.
+ *
+ * Since: 0.13.3
+ */
+
+#include <config.h>
+#include <glib.h>
+
+#include "gdata-documents-pdf.h"
+#include "gdata-documents-utils.h"
+#include "gdata-parser.h"
+#include "gdata-private.h"
+
+static void gdata_documents_pdf_constructed (GObject *object);
+
+G_DEFINE_TYPE (GDataDocumentsPdf, gdata_documents_pdf, GDATA_TYPE_DOCUMENTS_DOCUMENT)
+
+static void
+gdata_documents_pdf_class_init (GDataDocumentsPdfClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
+
+ gobject_class->constructed = gdata_documents_pdf_constructed;
+ entry_class->kind_term = "http://schemas.google.com/docs/2007#pdf";
+}
+
+static void
+gdata_documents_pdf_init (GDataDocumentsPdf *self)
+{
+ /* Why am I writing it? */
+}
+
+static void
+gdata_documents_pdf_constructed (GObject *object)
+{
+ G_OBJECT_CLASS (gdata_documents_pdf_parent_class)->constructed (object);
+
+ if (!_gdata_parsable_is_constructed_from_xml (GDATA_PARSABLE (object)))
+ gdata_documents_utils_add_content_type (GDATA_DOCUMENTS_ENTRY (object), "application/pdf");
+}
+
+/**
+ * gdata_documents_pdf_new:
+ * @id: (allow-none): the entry's ID (not the document ID of the pdf document), or %NULL
+ *
+ * Creates a new #GDataDocumentsPdf with the given entry ID (#GDataEntry:id).
+ *
+ * Return value: (transfer full): a new #GDataDocumentsPdf, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.13.3
+ */
+GDataDocumentsPdf *
+gdata_documents_pdf_new (const gchar *id)
+{
+ return GDATA_DOCUMENTS_PDF (g_object_new (GDATA_TYPE_DOCUMENTS_PDF, "id", id, NULL));
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Thibault Saunier 2009 <saunierthibault@gmail.com>
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ * Copyright (C) Cosimo Cecchi 2012 <cosimoc@gnome.org>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_DOCUMENTS_PDF_H
+#define GDATA_DOCUMENTS_PDF_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/services/documents/gdata-documents-document.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_DOCUMENTS_PDF (gdata_documents_pdf_get_type ())
+#define GDATA_DOCUMENTS_PDF(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_DOCUMENTS_PDF, GDataDocumentsPdf))
+#define GDATA_DOCUMENTS_PDF_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_DOCUMENTS_PDF, GDataDocumentsPdfClass))
+#define GDATA_IS_DOCUMENTS_PDF(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_DOCUMENTS_PDF))
+#define GDATA_IS_DOCUMENTS_PDF_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_DOCUMENTS_PDF))
+#define GDATA_DOCUMENTS_PDF_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_DOCUMENTS_PDF, GDataDocumentsPdfClass))
+
+typedef struct _GDataDocumentsPdfPrivate GDataDocumentsPdfPrivate;
+
+/**
+ * GDataDocumentsPdf:
+ *
+ * All the fields in the #GDataDocumentsPdf structure are private and should never be accessed directly.
+ *
+ * Since: 0.13.3
+ */
+typedef struct {
+ GDataDocumentsDocument parent;
+ GDataDocumentsPdfPrivate *priv;
+} GDataDocumentsPdf;
+
+/**
+ * GDataDocumentsPdfClass:
+ *
+ * All the fields in the #GDataDocumentsPdfClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.13.3
+ */
+typedef struct {
+ /*< private >*/
+ GDataDocumentsDocumentClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataDocumentsPdfClass;
+
+GType gdata_documents_pdf_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataDocumentsPdf, g_object_unref)
+
+GDataDocumentsPdf *gdata_documents_pdf_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+G_END_DECLS
+
+#endif /* !GDATA_DOCUMENTS_PDF_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Thibault Saunier 2009 <saunierthibault@gmail.com>
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ * Copyright (C) Red Hat, Inc. 2016
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-documents-presentation
+ * @short_description: GData documents presentation object
+ * @stability: Stable
+ * @include: gdata/services/documents/gdata-documents-presentation.h
+ *
+ * #GDataDocumentsPresentation is a subclass of #GDataDocumentsDocument to represent a Google Documents presentation.
+ *
+ * For more details of Google Drive's GData API, see the
+ * <ulink type="http" url="https://developers.google.com/drive/v2/web/about-sdk">online documentation</ulink>.
+ *
+ * Since: 0.4.0
+ */
+
+#include <config.h>
+#include <glib.h>
+
+#include "gdata-documents-presentation.h"
+#include "gdata-documents-utils.h"
+#include "gdata-parser.h"
+#include "gdata-private.h"
+
+static void gdata_documents_presentation_constructed (GObject *object);
+
+G_DEFINE_TYPE (GDataDocumentsPresentation, gdata_documents_presentation, GDATA_TYPE_DOCUMENTS_DOCUMENT)
+
+static void
+gdata_documents_presentation_class_init (GDataDocumentsPresentationClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
+
+ gobject_class->constructed = gdata_documents_presentation_constructed;
+ entry_class->kind_term = "http://schemas.google.com/docs/2007#presentation";
+}
+
+static void
+gdata_documents_presentation_init (GDataDocumentsPresentation *self)
+{
+ /* Why am I writing it? */
+}
+
+static void
+gdata_documents_presentation_constructed (GObject *object)
+{
+ G_OBJECT_CLASS (gdata_documents_presentation_parent_class)->constructed (object);
+
+ if (!_gdata_parsable_is_constructed_from_xml (GDATA_PARSABLE (object)))
+ gdata_documents_utils_add_content_type (GDATA_DOCUMENTS_ENTRY (object), "application/vnd.google-apps.presentation");
+}
+
+/**
+ * gdata_documents_presentation_new:
+ * @id: (allow-none): the entry's ID (not the document ID of the presentation), or %NULL
+ *
+ * Creates a new #GDataDocumentsPresentation with the given entry ID (#GDataEntry:id).
+ *
+ * Return value: (transfer full): a new #GDataDocumentsPresentation, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.4.0
+ */
+GDataDocumentsPresentation *
+gdata_documents_presentation_new (const gchar *id)
+{
+ return GDATA_DOCUMENTS_PRESENTATION (g_object_new (GDATA_TYPE_DOCUMENTS_PRESENTATION, "id", id, NULL));
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Thibault Saunier 2009 <saunierthibault@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_DOCUMENTS_PRESENTATION_H
+#define GDATA_DOCUMENTS_PRESENTATION_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/services/documents/gdata-documents-document.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_DOCUMENTS_PRESENTATION_PDF:
+ *
+ * The export format for Portable Document Format (PDF).
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#valid_formats_for_presentations">
+ * GData protocol specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_DOCUMENTS_PRESENTATION_PDF "pdf"
+
+/**
+ * GDATA_DOCUMENTS_PRESENTATION_PNG:
+ *
+ * The export format for Portable Network Graphics (PNG) image format.
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#valid_formats_for_presentations">
+ * GData protocol specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_DOCUMENTS_PRESENTATION_PNG "png"
+
+/**
+ * GDATA_DOCUMENTS_PRESENTATION_PPT:
+ *
+ * The export format for Microsoft PowerPoint (PPT) format.
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#valid_formats_for_presentations">
+ * GData protocol specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_DOCUMENTS_PRESENTATION_PPT "ppt"
+
+/**
+ * GDATA_DOCUMENTS_PRESENTATION_SWF:
+ *
+ * The export format for Adobe Flash (SWF) format.
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#valid_formats_for_presentations">
+ * GData protocol specification</ulink>.
+ *
+ * Since: 0.7.0
+ * Deprecated: SWF export has been deprecated in the protocol due to low demand for it; PDF export (using %GDATA_DOCUMENTS_PRESENTATION_PDF) is
+ * recommended instead. (Since: 0.11.0.)
+ */
+#ifndef LIBGDATA_DISABLE_DEPRECATED
+#define GDATA_DOCUMENTS_PRESENTATION_SWF "swf"
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
+
+/**
+ * GDATA_DOCUMENTS_PRESENTATION_TXT:
+ *
+ * The export format for plain text format.
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#valid_formats_for_presentations">
+ * GData protocol specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_DOCUMENTS_PRESENTATION_TXT "txt"
+
+#define GDATA_TYPE_DOCUMENTS_PRESENTATION (gdata_documents_presentation_get_type ())
+#define GDATA_DOCUMENTS_PRESENTATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_DOCUMENTS_PRESENTATION, \
+ GDataDocumentsPresentation))
+#define GDATA_DOCUMENTS_PRESENTATION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_DOCUMENTS_PRESENTATION, \
+ GDataDocumentsPresentationClass))
+#define GDATA_IS_DOCUMENTS_PRESENTATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_DOCUMENTS_PRESENTATION))
+#define GDATA_IS_DOCUMENTS_PRESENTATION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_DOCUMENTS_PRESENTATION))
+#define GDATA_DOCUMENTS_PRESENTATION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_DOCUMENTS_PRESENTATION, \
+ GDataDocumentsPresentationClass))
+
+typedef struct _GDataDocumentsPresentationPrivate GDataDocumentsPresentationPrivate;
+
+/**
+ * GDataDocumentsPresentation:
+ *
+ * All the fields in the #GDataDocumentsPresentation structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ GDataDocumentsDocument parent;
+ GDataDocumentsPresentationPrivate *priv;
+} GDataDocumentsPresentation;
+
+/**
+ * GDataDocumentsPresentationClass:
+ *
+ * All the fields in the #GDataDocumentsPresentationClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataDocumentsDocumentClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataDocumentsPresentationClass;
+
+GType gdata_documents_presentation_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataDocumentsPresentation, g_object_unref)
+
+GDataDocumentsPresentation *gdata_documents_presentation_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+G_END_DECLS
+
+#endif /* !GDATA_DOCUMENTS_PRESENTATION_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Mayank Sharma <mayank8019@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-documents-property
+ * @short_description: GData Documents property object
+ * @stability: Unstable
+ * @include: gdata/gdata-property.h
+ *
+ * #GDataDocumentsProperty is a subclass of #GDataParsable and represents a Google Drive Property Resource on a file object.
+ *
+ * It allows applications to store additional metadata on a file, such as tags, IDs from other data stores, viewing preferences etc. Properties can be used to share metadata between applications, for example, in a workflow application.
+ *
+ * Each #GDataDocumentsProperty is characterized by a key-value pair (where value is optional, and takes empty string "" by default) and a visibility parameter. The visibility can take values "PUBLIC" for public properties and "PRIVATE" for private properties (default). Private properties are accessible only by the application which set them, but public properties can be read/written by other applications as well.
+ *
+ * Since: 0.17.11
+ */
+
+#include <glib.h>
+#include <gdata/gdata-parsable.h>
+#include <json-glib/json-glib.h>
+
+#include "gdata-documents-property.h"
+#include "gdata-parser.h"
+#include "gdata-comparable.h"
+
+static void gdata_documents_property_comparable_init (GDataComparableIface *iface);
+static void gdata_documents_property_finalize (GObject *object);
+static void gdata_documents_property_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_documents_property_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+
+static void _gdata_documents_property_set_key (GDataDocumentsProperty *self, const gchar *key);
+static void _gdata_documents_property_set_etag (GDataDocumentsProperty *self, const gchar *etag);
+
+static gboolean parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error);
+static void get_json (GDataParsable *parsable, JsonBuilder *builder);
+
+struct _GDataDocumentsPropertyPrivate {
+ gchar *key;
+ gchar *etag;
+ gchar *value; /* default - empty string ("") */
+ gchar *visibility; /* default - "PRIVATE" */
+};
+
+enum {
+ PROP_KEY = 1,
+ PROP_ETAG,
+ PROP_VALUE,
+ PROP_VISIBILITY
+};
+
+G_DEFINE_TYPE_WITH_CODE (GDataDocumentsProperty, gdata_documents_property, GDATA_TYPE_PARSABLE,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_documents_property_comparable_init))
+
+static void
+gdata_documents_property_class_init (GDataDocumentsPropertyClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataDocumentsPropertyPrivate));
+
+ gobject_class->set_property = gdata_documents_property_set_property;
+ gobject_class->get_property = gdata_documents_property_get_property;
+ gobject_class->finalize = gdata_documents_property_finalize;
+
+ parsable_class->parse_json = parse_json;
+ parsable_class->get_json = get_json;
+ parsable_class->element_name = "property";
+
+ /**
+ * GDataDocumentsProperty:key:
+ *
+ * The key of this property.
+ *
+ * For more information, see the <ulink type="http" url="https://developers.google.com/drive/api/v2/reference/properties">Properties Resource</ulink>
+ *
+ * Since: 0.17.11
+ */
+ g_object_class_install_property (gobject_class, PROP_KEY,
+ g_param_spec_string ("key",
+ "Key", "The key of this property.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataDocumentsProperty:etag:
+ *
+ * ETag of the property.
+ *
+ * For more information, see the <ulink type="http" url="https://developers.google.com/drive/api/v2/reference/properties">Properties Resource</ulink>
+ *
+ * Since: 0.17.11
+ */
+ g_object_class_install_property (gobject_class, PROP_ETAG,
+ g_param_spec_string ("etag",
+ "ETag", "ETag of the property.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataDocumentsProperty:value:
+ *
+ * The value of this property. By default, it takes the an empty string ("").
+ *
+ * For more information, see the <ulink type="http" url="https://developers.google.com/drive/api/v2/reference/properties">Properties Resource</ulink>
+ *
+ * Since: 0.17.11
+ */
+ g_object_class_install_property (gobject_class, PROP_VALUE,
+ g_param_spec_string ("value",
+ "Value", "The value of this property.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataDocumentsProperty:visibility:
+ *
+ * The visibility status of this property. The default value of
+ * visibility is PRIVATE on a Drive Properties Resource object,
+ * hence #GDataDocumentsProperty:visibility is %GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PRIVATE
+ * by default. A private property restricts its visibility to only the app which created it.
+ *
+ * For more information, see the <ulink type="http" url="https://developers.google.com/drive/api/v2/reference/properties">Properties Resource</ulink>
+ *
+ * Since: 0.17.11
+ */
+ g_object_class_install_property (gobject_class, PROP_VISIBILITY,
+ g_param_spec_string ("visibility",
+ "Visibility", "The visibility of this property.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static gint
+compare_with (GDataComparable *self, GDataComparable *other)
+{
+
+ GDataDocumentsPropertyPrivate *a = ((GDataDocumentsProperty*) self)->priv, *b = ((GDataDocumentsProperty*) other)->priv;
+
+ if (g_strcmp0 (a->key, b->key) == 0 && g_strcmp0 (a->visibility, b->visibility) == 0)
+ return 0;
+ return 1;
+}
+
+static gboolean
+parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error)
+{
+ gchar *output_val = NULL;
+ gboolean success = TRUE, is_key_parsed = FALSE;
+
+ if (gdata_parser_string_from_json_member (reader, "key", P_DEFAULT, &output_val, &success, error) == TRUE) {
+ if (success && output_val != NULL && output_val[0] != '\0') {
+ _gdata_documents_property_set_key (GDATA_DOCUMENTS_PROPERTY (parsable), output_val);
+ }
+
+ is_key_parsed = TRUE;
+ } else if (gdata_parser_string_from_json_member (reader, "etag", P_DEFAULT, &output_val, &success, error) == TRUE) {
+ if (success && output_val != NULL && output_val[0] != '\0') {
+ _gdata_documents_property_set_etag (GDATA_DOCUMENTS_PROPERTY (parsable), output_val);
+ }
+
+ is_key_parsed = TRUE;
+ } else if (gdata_parser_string_from_json_member (reader, "value", P_DEFAULT, &output_val, &success, error) == TRUE) {
+
+ /* A Property can have a value field to be an empty string, but
+ * never NULL */
+ if (success && output_val != NULL) {
+ gdata_documents_property_set_value (GDATA_DOCUMENTS_PROPERTY (parsable), output_val);
+ }
+
+ is_key_parsed = TRUE;
+ } else if (gdata_parser_string_from_json_member (reader, "visibility", P_REQUIRED | P_NON_EMPTY, &output_val, &success, error) == TRUE) {
+ gdata_documents_property_set_visibility (GDATA_DOCUMENTS_PROPERTY (parsable), output_val);
+
+ is_key_parsed = TRUE;
+ }
+
+ if (is_key_parsed) {
+ g_free (output_val);
+ return success;
+ }
+
+ /* Chain up to the parent class */
+ return GDATA_PARSABLE_CLASS (gdata_documents_property_parent_class)->parse_json (parsable, reader, user_data, error);
+}
+
+static void
+get_json (GDataParsable *parsable, JsonBuilder *builder)
+{
+
+ GDataDocumentsPropertyPrivate *priv = GDATA_DOCUMENTS_PROPERTY (parsable)->priv;
+
+ /* Add all the Property specific JSON members */
+ g_assert (priv->key != NULL);
+ json_builder_set_member_name (builder, "key");
+ json_builder_add_string_value (builder, priv->key);
+
+ if (gdata_documents_property_get_etag (GDATA_DOCUMENTS_PROPERTY (parsable)) != NULL) {
+ json_builder_set_member_name (builder, "etag");
+ json_builder_add_string_value (builder, priv->etag);
+ }
+
+ /* Setting the "value" field of a Property Resource deletes that Property Resource */
+ json_builder_set_member_name (builder, "value");
+ json_builder_add_string_value (builder, priv->value);
+
+ json_builder_set_member_name (builder, "visibility");
+ json_builder_add_string_value (builder, priv->visibility);
+}
+
+static void
+gdata_documents_property_comparable_init (GDataComparableIface *iface)
+{
+ iface->compare_with = compare_with;
+}
+
+static void
+gdata_documents_property_init (GDataDocumentsProperty *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_DOCUMENTS_PROPERTY, GDataDocumentsPropertyPrivate);
+
+ /* Google Drive sets the default value of a Property Resource to be an empty string (""),
+ * and visibility is %GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PRIVATE by default */
+ self->priv->value = g_strdup ("");
+ self->priv->visibility = g_strdup (GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PRIVATE);
+}
+
+static void
+gdata_documents_property_finalize (GObject *object)
+{
+ GDataDocumentsPropertyPrivate *priv = GDATA_DOCUMENTS_PROPERTY (object)->priv;
+
+ g_free (priv->key);
+ g_free (priv->etag);
+ g_free (priv->value);
+ g_free (priv->visibility);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_documents_property_parent_class)->finalize (object);
+}
+
+static void
+gdata_documents_property_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataDocumentsPropertyPrivate *priv = GDATA_DOCUMENTS_PROPERTY (object)->priv;
+
+ switch (property_id) {
+ case PROP_KEY:
+ g_value_set_string (value, priv->key);
+ break;
+ case PROP_ETAG:
+ g_value_set_string (value, priv->etag);
+ break;
+ case PROP_VALUE:
+ g_value_set_string (value, priv->value);
+ break;
+ case PROP_VISIBILITY:
+ g_value_set_string (value, priv->visibility);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_documents_property_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataDocumentsProperty *self = GDATA_DOCUMENTS_PROPERTY (object);
+
+ switch (property_id) {
+ case PROP_KEY:
+ _gdata_documents_property_set_key (self, g_value_get_string (value));
+ break;
+ case PROP_ETAG:
+ _gdata_documents_property_set_etag (self, g_value_get_string (value));
+ break;
+ case PROP_VALUE:
+ gdata_documents_property_set_value (self, g_value_get_string (value));
+ break;
+ case PROP_VISIBILITY:
+ gdata_documents_property_set_visibility (self, g_value_get_string (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+/**
+ * gdata_documents_property_new:
+ * @key: the property's key
+ *
+ * Creates a new #GDataEntry with the given ID and default properties.
+ *
+ * Return value: (transfer full): a new #GDataDocumentsProperty; unref with g_object_unref()
+ *
+ * Since: 0.17.11
+ */
+GDataDocumentsProperty *
+gdata_documents_property_new (const gchar *key)
+{
+ /* GDataDocumentsProperty must have a non NULL key at initialization time,
+ * rest of the properties can be NULL or take their default values. */
+ g_return_val_if_fail (key != NULL && key[0] != '\0', NULL);
+
+ return GDATA_DOCUMENTS_PROPERTY (g_object_new (GDATA_TYPE_DOCUMENTS_PROPERTY, "key", key, NULL));
+}
+
+/**
+ * gdata_documents_property_get_key:
+ * @self: a #GDataDocumentsProperty
+ *
+ * Returns the key of the property. This will never be %NULL or an empty string ("").
+ *
+ * Return value: (transfer none): the property's key
+ *
+ * Since: 0.17.11
+ */
+const gchar *
+gdata_documents_property_get_key (GDataDocumentsProperty *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_PROPERTY (self), NULL);
+ return self->priv->key;
+}
+
+static void
+_gdata_documents_property_set_key (GDataDocumentsProperty *self, const gchar *key)
+{
+ /* This is a READ-ONLY PROPERTY */
+ g_return_if_fail (GDATA_IS_DOCUMENTS_PROPERTY (self));
+ g_return_if_fail (key != NULL && *key != '\0');
+
+ g_free (self->priv->key);
+ self->priv->key = g_strdup (key);
+
+ g_object_notify (G_OBJECT (self), "key");
+}
+
+/**
+ * gdata_documents_property_get_etag:
+ * @self: a #GDataDocumentsProperty
+ *
+ * Returns the ETag of the property.
+ *
+ * Return value: (transfer none): the property's ETag. The ETag will never be empty; it's either %NULL or a valid ETag.
+ *
+ * Since: 0.17.11
+ */
+const gchar *
+gdata_documents_property_get_etag (GDataDocumentsProperty *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_PROPERTY (self), NULL);
+ return self->priv->etag;
+}
+
+static void
+_gdata_documents_property_set_etag (GDataDocumentsProperty *self, const gchar *etag)
+{
+ g_return_if_fail (GDATA_IS_DOCUMENTS_PROPERTY (self));
+
+ if (g_strcmp0 (self->priv->etag, etag) != 0) {
+ g_free (self->priv->etag);
+ self->priv->etag = g_strdup (etag);
+ g_object_notify (G_OBJECT (self), "etag");
+ }
+}
+
+/**
+ * gdata_documents_property_get_value:
+ * @self: a #GDataDocumentsProperty
+ *
+ * Returns the value of the property.
+ *
+ * In the case that this value is %NULL, the Property Resource corresponding to @self will be deleted from the properties array on a file's metadata, whereas in the case that it's empty string (""), it will be set as it is.
+ *
+ * Return value: (nullable): the property's value. This can be %NULL or empty.
+ *
+ * Since: 0.17.11
+ */
+const gchar *
+gdata_documents_property_get_value (GDataDocumentsProperty *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_PROPERTY (self), NULL);
+ return self->priv->value;
+}
+
+/**
+ * gdata_documents_property_set_value:
+ * @self: a #GDataDocumentsProperty
+ * @value: (allow-none): the new value of the property
+ *
+ * Sets #GDataDocumentsProperty:value to @value, corresponding to the key.
+ *
+ * In the case that @value is %NULL, the Property Resource corresponding to @self will be deleted from the properties array on a file's metadata, whereas in the case that it's empty string (""), it will be set as it is.
+ *
+ * Since: 0.17.11
+ */
+void
+gdata_documents_property_set_value (GDataDocumentsProperty *self, const gchar *value)
+{
+ g_return_if_fail (GDATA_IS_DOCUMENTS_PROPERTY (self));
+
+ if (g_strcmp0 (self->priv->value, value) != 0) {
+ g_free (self->priv->value);
+ self->priv->value = g_strdup (value);
+ g_object_notify (G_OBJECT (self), "value");
+ }
+}
+
+/**
+ * gdata_documents_property_get_visibility:
+ * @self: a #GDataDocumentsProperty
+ *
+ * Returns the visibility status of the property.
+ *
+ * Return value: %GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PUBLIC if the #GDataDocumentsProperty is publicly visible to other
+ * apps, %GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PRIVATE if the #GDataDocumentsProperty is restricted to the application which
+ * created it.
+ *
+ * Since: 0.17.11
+ */
+const gchar *
+gdata_documents_property_get_visibility (GDataDocumentsProperty *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_PROPERTY (self), NULL);
+ return self->priv->visibility;
+}
+
+/**
+ * gdata_documents_property_set_visibility:
+ * @self: a #GDataDocumentsProperty
+ * @visibility: the new visibility status of the property
+ *
+ * Sets #GDataDocumentsProperty:visibility to %GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PUBLIC for
+ * public properties and %GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PRIVATE for
+ * private properties (default).
+ *
+ * Since: 0.17.11
+ */
+void
+gdata_documents_property_set_visibility (GDataDocumentsProperty *self, const gchar *visibility)
+{
+ g_return_if_fail (GDATA_IS_DOCUMENTS_PROPERTY (self));
+ g_return_if_fail (g_strcmp0 (visibility, GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PUBLIC) == 0 ||
+ g_strcmp0 (visibility, GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PRIVATE) == 0);
+
+ if (g_strcmp0 (self->priv->visibility, visibility) != 0) {
+ g_free (self->priv->visibility);
+ self->priv->visibility = g_strdup (visibility);
+ g_object_notify (G_OBJECT (self), "visibility");
+ }
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Mayank Sharma <mayank8019@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_DOCUMENTS_PROPERTY_H
+#define GDATA_DOCUMENTS_PROPERTY_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PUBLIC:
+ *
+ * The #GDataDocumentsProperty having the visibility set to TRUE corresponds to having the visibility property
+ * on a Drive Property Resource
+ * set to "PUBLIC". This makes the Property Resource visible to other apps.
+ *
+ * Since: 0.17.11
+ */
+#define GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PUBLIC "PUBLIC"
+
+/**
+ * GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PRIVATE:
+ *
+ * The #GDataDocumentsProperty having the visibility set to FALSE (default) corresponds to having the visibility property on a Drive Property Resource
+ * set to "PRIVATE". This makes the Property Resource accessible only by the app that created it.
+ *
+ * Since: 0.17.11
+ */
+#define GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PRIVATE "PRIVATE"
+
+#define GDATA_TYPE_DOCUMENTS_PROPERTY (gdata_documents_property_get_type ())
+#define GDATA_DOCUMENTS_PROPERTY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_DOCUMENTS_PROPERTY, GDataDocumentsProperty))
+#define GDATA_DOCUMENTS_PROPERTY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_DOCUMENTS_PROPERTY, GDataDocumentsPropertyClass))
+#define GDATA_IS_DOCUMENTS_PROPERTY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_DOCUMENTS_PROPERTY))
+#define GDATA_IS_DOCUMENTS_PROPERTY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_DOCUMENTS_PROPERTY))
+#define GDATA_DOCUMENTS_PROPERTY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_DOCUMENTS_PROPERTY, GDataDocumentsPropertyClass))
+
+typedef struct _GDataDocumentsPropertyPrivate GDataDocumentsPropertyPrivate;
+
+/**
+ * GDataDocumentsProperty:
+ *
+ * All the fields in the #GDataDocumentsProperty structure are private and should never be accessed directly.
+ *
+ * Since: 0.17.11
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataDocumentsPropertyPrivate *priv;
+} GDataDocumentsProperty;
+
+/**
+ * GDataDocumentsPropertyClass:
+ *
+ * All the fields in the #GDataDocumentsPropertyClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.17.11
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataDocumentsPropertyClass;
+
+GType gdata_documents_property_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataDocumentsProperty, g_object_unref)
+
+GDataDocumentsProperty *gdata_documents_property_new (const gchar *key) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_documents_property_get_key (GDataDocumentsProperty *self) G_GNUC_PURE;
+
+const gchar *gdata_documents_property_get_etag (GDataDocumentsProperty *self) G_GNUC_PURE;
+
+const gchar *gdata_documents_property_get_value (GDataDocumentsProperty *self) G_GNUC_PURE;
+void gdata_documents_property_set_value (GDataDocumentsProperty *self, const gchar *value);
+
+const gchar *gdata_documents_property_get_visibility (GDataDocumentsProperty *self) G_GNUC_PURE;
+void gdata_documents_property_set_visibility (GDataDocumentsProperty *self, const gchar *visibility);
+
+G_END_DECLS
+
+#endif /* !GDATA_DOCUMENTS_PROPERTY_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Thibault Saunier 2009 <saunierthibault@gmail.com>
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ * Copyright (C) Red Hat, Inc. 2015
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-documents-query
+ * @short_description: GData Documents query object
+ * @stability: Stable
+ * @include: gdata/services/documents/gdata-documents-query.h
+ *
+ * #GDataDocumentsQuery represents a collection of query parameters specific to the Google Documents service, which go above and beyond
+ * those catered for by #GDataQuery.
+ *
+ * For more information on the custom GData query parameters supported by #GDataDocumentsQuery, see the <ulink type="http"
+ * url="https://developers.google.com/google-apps/documents-list/#searching_for_documents_and_files">online documentation</ulink>.
+ *
+ * <example>
+ * <title>Querying for Documents</title>
+ * <programlisting>
+ * GDataDocumentsService *service;
+ * GDataDocumentsQuery *query;
+ * GDataFeed *feed;
+ * GTimeVal current_time;
+ * GList *i;
+ * GError *error = NULL;
+ *
+ * /<!-- -->* Create a service *<!-- -->/
+ * service = create_documents_service ();
+ *
+ * /<!-- -->* Create the query to use. We're going to query for the last 10 documents modified by example@gmail.com in the past week, including
+ * * deleted documents. *<!-- -->/
+ * query = gdata_documents_query_new_with_limits (NULL, 0, 10);
+ *
+ * gdata_documents_query_add_collaborator (query, "example@gmail.com");
+ * gdata_documents_query_set_show_deleted (query, TRUE);
+ *
+ * g_get_current_time (¤t_time);
+ * gdata_query_set_updated_min (GDATA_QUERY (query), current_time.tv_sec - 7 * 24 * 60 * 60);
+ * gdata_query_set_updated_max (GDATA_QUERY (query), current_time.tv_sec);
+ *
+ * /<!-- -->* Execute the query *<!-- -->/
+ * feed = gdata_documents_service_query_documents (service, query, NULL, NULL, NULL, &error);
+ *
+ * g_object_unref (query);
+ * g_object_unref (service);
+ *
+ * if (error != NULL) {
+ * g_error ("Error querying for documents: %s", error->message);
+ * g_error_free (error);
+ * return;
+ * }
+ *
+ * /<!-- -->* Iterate through the returned documents and do something with them *<!-- -->/
+ * for (i = gdata_feed_get_entries (feed); i != NULL; i = i->next) {
+ * GDataDocumentsDocument *document = GDATA_DOCUMENTS_DOCUMENT (i->data);
+ *
+ * /<!-- -->* Do something with the document here, such as insert it into a UI *<!-- -->/
+ * }
+ *
+ * g_object_unref (feed);
+ * </programlisting>
+ * </example>
+ *
+ * Since: 0.4.0
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+
+#include "gd/gdata-gd-email-address.h"
+#include "gdata-documents-query.h"
+#include "gdata-private.h"
+#include "gdata-query.h"
+
+#include <gdata/services/documents/gdata-documents-spreadsheet.h>
+#include <gdata/services/documents/gdata-documents-presentation.h>
+#include <gdata/services/documents/gdata-documents-text.h>
+#include <gdata/services/documents/gdata-documents-folder.h>
+
+static void gdata_documents_query_dispose (GObject *object);
+static void gdata_documents_query_finalize (GObject *object);
+static void gdata_documents_query_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_documents_query_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void get_query_uri (GDataQuery *self, const gchar *feed_uri, GString *query_uri, gboolean *params_started);
+
+struct _GDataDocumentsQueryPrivate {
+ gboolean show_deleted;
+ gboolean show_folders;
+ gboolean exact_title;
+ gchar *folder_id;
+ gchar *title;
+ GList *collaborator_addresses; /* GDataGDEmailAddress */
+ GList *reader_addresses; /* GDataGDEmailAddress */
+};
+
+enum {
+ PROP_SHOW_DELETED = 1,
+ PROP_SHOW_FOLDERS,
+ PROP_EXACT_TITLE,
+ PROP_FOLDER_ID,
+ PROP_TITLE
+};
+
+G_DEFINE_TYPE (GDataDocumentsQuery, gdata_documents_query, GDATA_TYPE_QUERY)
+
+static void
+gdata_documents_query_class_init (GDataDocumentsQueryClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataQueryClass *query_class = GDATA_QUERY_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataDocumentsQueryPrivate));
+
+ gobject_class->get_property = gdata_documents_query_get_property;
+ gobject_class->set_property = gdata_documents_query_set_property;
+ gobject_class->dispose = gdata_documents_query_dispose;
+ gobject_class->finalize = gdata_documents_query_finalize;
+
+ query_class->get_query_uri = get_query_uri;
+
+ /**
+ * GDataDocumentsQuery:show-deleted:
+ *
+ * A shortcut to request all documents that have been deleted.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SHOW_DELETED,
+ g_param_spec_boolean ("show-deleted",
+ "Show deleted?", "A shortcut to request all documents that have been deleted.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataDocumentsQuery:show-folders:
+ *
+ * Specifies if the request also returns folders.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SHOW_FOLDERS,
+ g_param_spec_boolean ("show-folders",
+ "Show folders?", "Specifies if the request also returns folders.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataDocumentsQuery:exact-title:
+ *
+ * Specifies whether the query should search for an exact title match for the #GDataDocumentsQuery:title parameter.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_EXACT_TITLE,
+ g_param_spec_boolean ("exact-title",
+ "Exact title?", "Specifies whether the query should search for an exact title match.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataDocumentsQuery:folder-id:
+ *
+ * Specifies the ID of the folder in which to search.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_FOLDER_ID,
+ g_param_spec_string ("folder-id",
+ "Folder ID", "Specifies the ID of the folder in which to search.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataDocumentsQuery:title:
+ *
+ * A title (or title fragment) to be searched for. If #GDataDocumentsQuery:exact-title is %TRUE, an exact
+ * title match will be searched for, otherwise substring matches will also be returned.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_TITLE,
+ g_param_spec_string ("title",
+ "Title", "A title (or title fragment) to be searched for.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_documents_query_init (GDataDocumentsQuery *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_DOCUMENTS_QUERY, GDataDocumentsQueryPrivate);
+
+ /* https://developers.google.com/drive/v3/reference/files/list#q */
+ _gdata_query_set_pagination_type (GDATA_QUERY (self),
+ GDATA_QUERY_PAGINATION_TOKENS);
+}
+
+static void
+gdata_documents_query_dispose (GObject *object)
+{
+ GList *i;
+ GDataDocumentsQueryPrivate *priv = GDATA_DOCUMENTS_QUERY (object)->priv;
+
+ for (i = priv->collaborator_addresses; i != NULL; i = i->next)
+ g_object_unref (i->data);
+ g_list_free (priv->collaborator_addresses);
+ priv->collaborator_addresses = NULL;
+
+ for (i = priv->reader_addresses; i != NULL; i = i->next)
+ g_object_unref (i->data);
+ g_list_free (priv->reader_addresses);
+ priv->reader_addresses = NULL;
+
+ G_OBJECT_CLASS (gdata_documents_query_parent_class)->dispose (object);
+}
+
+static void
+gdata_documents_query_finalize (GObject *object)
+{
+ GDataDocumentsQueryPrivate *priv = GDATA_DOCUMENTS_QUERY (object)->priv;
+
+ g_free (priv->folder_id);
+ g_free (priv->title);
+
+ G_OBJECT_CLASS (gdata_documents_query_parent_class)->finalize (object);
+}
+
+static void
+gdata_documents_query_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataDocumentsQueryPrivate *priv = GDATA_DOCUMENTS_QUERY (object)->priv;
+
+ switch (property_id) {
+ case PROP_SHOW_DELETED:
+ g_value_set_boolean (value, priv->show_deleted);
+ break;
+ case PROP_SHOW_FOLDERS:
+ g_value_set_boolean (value, priv->show_folders);
+ break;
+ case PROP_FOLDER_ID:
+ g_value_set_string (value, priv->folder_id);
+ break;
+ case PROP_EXACT_TITLE:
+ g_value_set_boolean (value, priv->exact_title);
+ break;
+ case PROP_TITLE:
+ g_value_set_string (value, priv->title);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_documents_query_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataDocumentsQuery *self = GDATA_DOCUMENTS_QUERY (object);
+
+ switch (property_id) {
+ case PROP_SHOW_DELETED:
+ gdata_documents_query_set_show_deleted (self, g_value_get_boolean (value));
+ break;
+ case PROP_SHOW_FOLDERS:
+ gdata_documents_query_set_show_folders (self, g_value_get_boolean (value));
+ break;
+ case PROP_FOLDER_ID:
+ gdata_documents_query_set_folder_id (self, g_value_get_string (value));
+ break;
+ case PROP_EXACT_TITLE:
+ self->priv->exact_title = g_value_get_boolean (value);
+ break;
+ case PROP_TITLE:
+ gdata_documents_query_set_title (self, g_value_get_string (value), TRUE);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+get_query_uri (GDataQuery *self, const gchar *feed_uri, GString *query_uri, gboolean *params_started)
+{
+ GDataDocumentsQueryPrivate *priv = GDATA_DOCUMENTS_QUERY (self)->priv;
+ guint max_results;
+
+ #define APPEND_SEP g_string_append_c (query_uri, (*params_started == FALSE) ? '?' : '&'); *params_started = TRUE;
+
+ if (priv->folder_id != NULL) {
+ g_string_append (query_uri, "/folder%3A");
+ g_string_append_uri_escaped (query_uri, priv->folder_id, NULL, FALSE);
+ }
+
+ /* Search parameters: https://developers.google.com/drive/web/search-parameters */
+
+ _gdata_query_clear_q_internal (self);
+
+ if (priv->collaborator_addresses != NULL) {
+ GList *i;
+ GString *str;
+
+ str = g_string_new (NULL);
+
+ for (i = priv->collaborator_addresses; i != NULL; i = i->next) {
+ GDataGDEmailAddress *email_address = GDATA_GD_EMAIL_ADDRESS (i->data);
+ const gchar *address;
+
+ address = gdata_gd_email_address_get_address (email_address);
+ g_string_append_printf (str, "'%s' in writers", address);
+ if (i->next != NULL)
+ g_string_append (str, " or ");
+ }
+
+ _gdata_query_add_q_internal (self, str->str);
+ g_string_free (str, TRUE);
+ }
+
+ if (priv->reader_addresses != NULL) {
+ GList *i;
+ GString *str;
+
+ str = g_string_new (NULL);
+
+ for (i = priv->reader_addresses; i != NULL; i = i->next) {
+ GDataGDEmailAddress *email_address = GDATA_GD_EMAIL_ADDRESS (i->data);
+ const gchar *address;
+
+ address = gdata_gd_email_address_get_address (email_address);
+ g_string_append_printf (str, "'%s' in readers", address);
+ if (i->next != NULL)
+ g_string_append (str, " or ");
+ }
+
+ _gdata_query_add_q_internal (self, str->str);
+ g_string_free (str, TRUE);
+ }
+
+ if (priv->show_deleted == TRUE)
+ _gdata_query_add_q_internal (self, "trashed=true");
+ else
+ _gdata_query_add_q_internal (self, "trashed=false");
+
+ if (priv->show_folders == FALSE)
+ _gdata_query_add_q_internal (self, "mimeType!='application/vnd.google-apps.folder'");
+
+ if (priv->title != NULL) {
+ GString *title_query;
+ const gchar *ptr, *ptr_end;
+
+ title_query = g_string_new ("title");
+ if (priv->exact_title) {
+ g_string_append_c (title_query, '=');
+ } else {
+ g_string_append (title_query, " contains ");
+ }
+ g_string_append_c (title_query, '\'');
+
+ for (ptr = priv->title; ptr != NULL; ptr = ptr_end) {
+ /* Escape any "'" and "\" found in the title with a "\" */
+ ptr_end = strpbrk (ptr, "\'\\");
+ if (ptr_end == NULL) {
+ g_string_append (title_query, ptr);
+ } else {
+ g_string_append_len (title_query, ptr, ptr_end - ptr);
+ g_string_append_c (title_query, '\\');
+ g_string_append_c (title_query, *ptr_end);
+ }
+ }
+
+ g_string_append_c (title_query, '\'');
+ _gdata_query_add_q_internal (self, title_query->str);
+ g_string_free (title_query, TRUE);
+ }
+
+ /* Chain up to the parent class */
+ GDATA_QUERY_CLASS (gdata_documents_query_parent_class)->get_query_uri (self, feed_uri, query_uri, params_started);
+
+ /* https://developers.google.com/drive/v2/reference/files/list */
+ max_results = gdata_query_get_max_results (self);
+ if (max_results > 0) {
+ APPEND_SEP
+ max_results = max_results > 1000 ? 1000 : max_results;
+ g_string_append_printf (query_uri, "maxResults=%u", max_results);
+ }
+}
+
+/**
+ * gdata_documents_query_new:
+ * @q: (allow-none): a query string, or %NULL
+ *
+ * Creates a new #GDataDocumentsQuery with its #GDataQuery:q property set to @q.
+ *
+ * Return value: a new #GDataDocumentsQuery
+ *
+ * Since: 0.4.0
+ */
+GDataDocumentsQuery *
+gdata_documents_query_new (const gchar *q)
+{
+ return g_object_new (GDATA_TYPE_DOCUMENTS_QUERY, "q", q, NULL);
+}
+
+/**
+ * gdata_documents_query_new_with_limits:
+ * @q: (allow-none): a query string, or %NULL
+ * @start_index: a one-based start index for the results, or <code class="literal">0</code>
+ * @max_results: the maximum number of results to return, or <code class="literal">0</code>
+ *
+ * Creates a new #GDataDocumentsQuery with its #GDataQuery:q property set to @q, and the limits @start_index and @max_results
+ * applied.
+ *
+ * Return value: a new #GDataDocumentsQuery
+ *
+ * Since: 0.4.0
+ */
+GDataDocumentsQuery *
+gdata_documents_query_new_with_limits (const gchar *q, guint start_index, guint max_results)
+{
+ return g_object_new (GDATA_TYPE_DOCUMENTS_QUERY,
+ "q", q,
+ "start-index", start_index,
+ "max-results", max_results,
+ NULL);
+}
+
+/**
+ * gdata_documents_query_show_deleted:
+ * @self: a #GDataDocumentsQuery
+ *
+ * Gets the #GDataDocumentsQuery:show_deleted property.
+ *
+ * Return value: %TRUE if the request should return deleted entries, %FALSE otherwise
+ *
+ * Since: 0.4.0
+ */
+gboolean
+gdata_documents_query_show_deleted (GDataDocumentsQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_QUERY (self), FALSE);
+ return self->priv->show_deleted;
+}
+
+/**
+ * gdata_documents_query_set_show_deleted:
+ * @self: a #GDataDocumentsQuery
+ * @show_deleted: %TRUE if the request should return deleted entries, %FALSE otherwise
+ *
+ * Sets the #GDataDocumentsQuery:show_deleted property to @show_deleted.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_documents_query_set_show_deleted (GDataDocumentsQuery *self, gboolean show_deleted)
+{
+ g_return_if_fail (GDATA_IS_DOCUMENTS_QUERY (self));
+ self->priv->show_deleted = show_deleted;
+ g_object_notify (G_OBJECT (self), "show-deleted");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_documents_query_show_folders:
+ * @self: a #GDataDocumentsQuery
+ *
+ * Gets the #GDataDocumentsQuery:show-folders property.
+ *
+ * Return value: %TRUE if the request should return folders, %FALSE otherwise
+ *
+ * Since: 0.4.0
+ */
+gboolean
+gdata_documents_query_show_folders (GDataDocumentsQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_QUERY (self), FALSE);
+ return self->priv->show_folders;
+}
+
+/**
+ * gdata_documents_query_set_show_folders:
+ * @self: a #GDataDocumentsQuery
+ * @show_folders: %TRUE if the request should return folders, %FALSE otherwise
+ *
+ * Sets the #GDataDocumentsQuery:show-folders property to show_folders.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_documents_query_set_show_folders (GDataDocumentsQuery *self, gboolean show_folders)
+{
+ g_return_if_fail (GDATA_IS_DOCUMENTS_QUERY (self));
+ self->priv->show_folders = show_folders;
+ g_object_notify (G_OBJECT (self), "show-folders");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_documents_query_get_folder_id:
+ * @self: a #GDataDocumentsQuery
+ *
+ * Gets the #GDataDocumentsQuery:folder-id property.
+ *
+ * Return value: the ID of the folder to be queried, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_documents_query_get_folder_id (GDataDocumentsQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_QUERY (self), NULL);
+ return self->priv->folder_id;
+}
+
+/**
+ * gdata_documents_query_set_folder_id:
+ * @self: a #GDataDocumentsQuery
+ * @folder_id: (allow-none): the ID of the folder to be queried, or %NULL
+ *
+ * Sets the #GDataDocumentsQuery:folder-id property to @folder_id.
+ *
+ * Set @folder_id to %NULL to unset the property in the query URI.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_documents_query_set_folder_id (GDataDocumentsQuery *self, const gchar *folder_id)
+{
+ g_return_if_fail (GDATA_IS_DOCUMENTS_QUERY (self));
+
+ g_free (self->priv->folder_id);
+ self->priv->folder_id = g_strdup (folder_id);
+ g_object_notify (G_OBJECT (self), "folder-id");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_documents_query_get_title:
+ * @self: a #GDataDocumentsQuery
+ *
+ * Gets the #GDataDocumentsQuery:title property.
+ *
+ * Return value: the title (or title fragment) being queried for, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_documents_query_get_title (GDataDocumentsQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_QUERY (self), NULL);
+ return self->priv->title;
+}
+
+/**
+ * gdata_documents_query_get_exact_title:
+ * @self: a #GDataDocumentsQuery
+ *
+ * Gets the #GDataDocumentsQuery:exact-title property.
+ *
+ * Return value: %TRUE if the query matches the exact title of documents with #GDataDocumentsQuery:title, %FALSE otherwise
+ *
+ * Since: 0.4.0
+ */
+gboolean
+gdata_documents_query_get_exact_title (GDataDocumentsQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_QUERY (self), FALSE);
+ return self->priv->exact_title;
+}
+
+/**
+ * gdata_documents_query_set_title:
+ * @self: a #GDataDocumentsQuery
+ * @title: (allow-none): the title (or title fragment) to query for, or %NULL
+ * @exact_title: %TRUE if the query should match the exact @title, %FALSE otherwise
+ *
+ * Sets the #GDataDocumentsQuery:title property to @title.
+ *
+ * Set @title to %NULL to unset the property in the query URI.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_documents_query_set_title (GDataDocumentsQuery *self, const gchar *title, gboolean exact_title)
+{
+ g_return_if_fail (GDATA_IS_DOCUMENTS_QUERY (self));
+
+ g_free (self->priv->title);
+ self->priv->title = g_strdup (title);
+ self->priv->exact_title = exact_title;
+
+ g_object_freeze_notify (G_OBJECT (self));
+ g_object_notify (G_OBJECT (self), "exact-title");
+ g_object_notify (G_OBJECT (self), "title");
+ g_object_thaw_notify (G_OBJECT (self));
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_documents_query_get_collaborator_addresses:
+ * @self: a #GDataDocumentsQuery
+ *
+ * Gets a list of #GDataGDEmailAddress<!-- -->es of the document collaborators whose documents will be queried.
+ *
+ * Return value: (element-type GData.GDEmailAddress) (transfer none): a list of #GDataGDEmailAddress<!-- -->es of the collaborators concerned by the
+ * query, or %NULL
+ *
+ * Since: 0.4.0
+ */
+GList *
+gdata_documents_query_get_collaborator_addresses (GDataDocumentsQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_QUERY (self), NULL);
+ return self->priv->collaborator_addresses;
+}
+
+/**
+ * gdata_documents_query_get_reader_addresses:
+ * @self: a #GDataDocumentsQuery
+ *
+ * Gets a list of #GDataGDEmailAddress<!-- -->es of the document readers whose documents will be queried.
+ *
+ * Return value: (element-type GData.GDEmailAddress) (transfer none): a list of #GDataGDEmailAddress<!-- -->es of the readers concerned by the query,
+ * or %NULL
+ *
+ * Since: 0.4.0
+ */
+GList *
+gdata_documents_query_get_reader_addresses (GDataDocumentsQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_QUERY (self), NULL);
+ return self->priv->reader_addresses;
+}
+
+/**
+ * gdata_documents_query_add_reader:
+ * @self: a #GDataDocumentsQuery
+ * @email_address: the e-mail address of the reader to add
+ *
+ * Add @email_address as a #GDataGDEmailAddress to the list of readers, the documents readable by whom will be queried.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_documents_query_add_reader (GDataDocumentsQuery *self, const gchar *email_address)
+{
+ GDataGDEmailAddress *address;
+
+ g_return_if_fail (GDATA_IS_DOCUMENTS_QUERY (self));
+ g_return_if_fail (email_address != NULL && *email_address != '\0');
+
+ address = gdata_gd_email_address_new (email_address, "reader", NULL, FALSE);
+ self->priv->reader_addresses = g_list_append (self->priv->reader_addresses, address);
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_documents_query_add_collaborator:
+ * @self: a #GDataDocumentsQuery
+ * @email_address: the e-mail address of the collaborator to add
+ *
+ * Add @email_address as a #GDataGDEmailAddress to the list of collaborators whose edited documents will be queried.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_documents_query_add_collaborator (GDataDocumentsQuery *self, const gchar *email_address)
+{
+ GDataGDEmailAddress *address;
+
+ g_return_if_fail (GDATA_IS_DOCUMENTS_QUERY (self));
+ g_return_if_fail (email_address != NULL && *email_address != '\0');
+
+ address = gdata_gd_email_address_new (email_address, "collaborator", NULL, FALSE);
+ self->priv->collaborator_addresses = g_list_append (self->priv->collaborator_addresses, address);
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Thibault Saunier 2009 <saunierthibault@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_DOCUMENTS_QUERY_H
+#define GDATA_DOCUMENTS_QUERY_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-types.h>
+#include <gdata/gdata-query.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_DOCUMENTS_QUERY (gdata_documents_query_get_type ())
+#define GDATA_DOCUMENTS_QUERY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_DOCUMENTS_QUERY, GDataDocumentsQuery))
+#define GDATA_DOCUMENTS_QUERY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_DOCUMENTS_QUERY, GDataDocumentsQueryClass))
+#define GDATA_IS_DOCUMENTS_QUERY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_DOCUMENTS_QUERY))
+#define GDATA_IS_DOCUMENTS_QUERY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_DOCUMENTS_QUERY))
+#define GDATA_DOCUMENTS_QUERY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_DOCUMENTS_QUERY, GDataDocumentsQueryClass))
+
+typedef struct _GDataDocumentsQueryPrivate GDataDocumentsQueryPrivate;
+
+/**
+ * GDataDocumentsQuery:
+ *
+ * All the fields in the #GDataDocumentsQuery structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ GDataQuery parent;
+ GDataDocumentsQueryPrivate *priv;
+} GDataDocumentsQuery;
+
+/**
+ * GDataDocumentsQueryClass:
+ *
+ * All the fields in the #GDataDocumentsQueryClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataQueryClass parent;
+ GDataDocumentsQueryPrivate *priv;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataDocumentsQueryClass;
+
+GType gdata_documents_query_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataDocumentsQuery, g_object_unref)
+
+GDataDocumentsQuery *gdata_documents_query_new (const gchar *q) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+GDataDocumentsQuery *gdata_documents_query_new_with_limits (const gchar *q,
+ guint start_index, guint max_results) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+gboolean gdata_documents_query_show_deleted (GDataDocumentsQuery *self) G_GNUC_PURE;
+void gdata_documents_query_set_show_deleted (GDataDocumentsQuery *self, gboolean show_deleted);
+gboolean gdata_documents_query_show_folders (GDataDocumentsQuery *self) G_GNUC_PURE;
+void gdata_documents_query_set_show_folders (GDataDocumentsQuery *self, gboolean show_folders);
+const gchar *gdata_documents_query_get_folder_id (GDataDocumentsQuery *self) G_GNUC_PURE;
+void gdata_documents_query_set_folder_id (GDataDocumentsQuery *self, const gchar *folder_id);
+const gchar *gdata_documents_query_get_title (GDataDocumentsQuery *self) G_GNUC_PURE;
+gboolean gdata_documents_query_get_exact_title (GDataDocumentsQuery *self) G_GNUC_PURE;
+void gdata_documents_query_set_title (GDataDocumentsQuery *self, const gchar *title, gboolean exact_title);
+GList *gdata_documents_query_get_collaborator_addresses (GDataDocumentsQuery *self) G_GNUC_PURE;
+GList *gdata_documents_query_get_reader_addresses (GDataDocumentsQuery *self) G_GNUC_PURE;
+void gdata_documents_query_add_reader (GDataDocumentsQuery *self, const gchar *email_address);
+void gdata_documents_query_add_collaborator (GDataDocumentsQuery *self, const gchar *email_address);
+
+G_END_DECLS
+
+#endif /* !GDATA_DOCUMENTS_QUERY_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Thibault Saunier 2009 <saunierthibault@gmail.com>
+ * Copyright (C) Philip Withnall 2010, 2014 <philip@tecnocode.co.uk>
+ * Copyright (C) Red Hat, Inc. 2015, 2016
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-documents-service
+ * @short_description: GData Documents service object
+ * @stability: Stable
+ * @include: gdata/services/documents/gdata-documents-service.h
+ *
+ * #GDataDocumentsService is a subclass of #GDataService for communicating with the GData API of Google Drive. It supports querying
+ * for, inserting, editing and deleting documents, as well as a folder hierarchy.
+ * The API is named ‘documents’ rather than ‘drive’ as it used to use the Google
+ * Documents API, which has since been deprecated.
+ *
+ * For more details of Google Drive's GData API, see the
+ * <ulink type="http" url="https://developers.google.com/drive/v2/web/about-sdk">
+ * online documentation</ulink>.
+ *
+ * Fore more details about the spreadsheet downloads handling, see the
+ * <ulink type="http" url="http://groups.google.com/group/Google-Docs-Data-APIs/browse_thread/thread/bfc50e94e303a29a?pli=1">
+ * online explanation about the problem</ulink>.
+ *
+ * <example>
+ * <title>Uploading a Document from Disk</title>
+ * <programlisting>
+ * GDataDocumentsService *service;
+ * GDataDocumentsDocument *document, *uploaded_document;
+ * GFile *document_file;
+ * GDataDocumentsFolder *destination_folder;
+ * GFileInfo *file_info;
+ * const gchar *slug, *content_type;
+ * GFileInputStream *file_stream;
+ * GDataUploadStream *upload_stream;
+ * GError *error = NULL;
+ *
+ * /<!-- -->* Create a service *<!-- -->/
+ * service = create_documents_service ();
+ *
+ * /<!-- -->* Get the document file to upload and the folder to upload it into *<!-- -->/
+ * document_file = g_file_new_for_path ("document.odt");
+ * destination_folder = query_user_for_destination_folder (service);
+ *
+ * /<!-- -->* Get the file's display name and content type *<!-- -->/
+ * file_info = g_file_query_info (document_file, G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME "," G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
+ * G_FILE_QUERY_INFO_NONE, NULL, &error);
+ *
+ * if (error != NULL) {
+ * g_error ("Error getting document file information: %s", error->message);
+ * g_error_free (error);
+ * g_object_unref (destination_folder);
+ * g_object_unref (document_file);
+ * g_object_unref (service);
+ * return;
+ * }
+ *
+ * slug = g_file_info_get_display_name (file_info);
+ * content_type = g_file_info_get_content_type (file_info);
+ *
+ * /<!-- -->* Get an input stream for the file *<!-- -->/
+ * file_stream = g_file_read (document_file, NULL, &error);
+ *
+ * g_object_unref (document_file);
+ *
+ * if (error != NULL) {
+ * g_error ("Error getting document file stream: %s", error->message);
+ * g_error_free (error);
+ * g_object_unref (file_info);
+ * g_object_unref (destination_folder);
+ * g_object_unref (service);
+ * return;
+ * }
+ *
+ * /<!-- -->* Create the document metadata to upload *<!-- -->/
+ * document = gdata_documents_text_new (NULL);
+ * gdata_entry_set_title (GDATA_ENTRY (document), "Document Title");
+ *
+ * /<!-- -->* Get an upload stream for the document *<!-- -->/
+ * upload_stream = gdata_documents_service_upload_document (service, document, slug, content_type, destination_folder, NULL, &error);
+ *
+ * g_object_unref (document);
+ * g_object_unref (file_info);
+ * g_object_unref (destination_folder);
+ *
+ * if (error != NULL) {
+ * g_error ("Error getting upload stream: %s", error->message);
+ * g_error_free (error);
+ * g_object_unref (file_stream);
+ * g_object_unref (service);
+ * return;
+ * }
+ *
+ * /<!-- -->* Upload the document. This is a blocking operation, and should normally be done asynchronously. *<!-- -->/
+ * g_output_stream_splice (G_OUTPUT_STREAM (upload_stream), G_INPUT_STREAM (file_stream),
+ * G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, NULL, &error);
+ *
+ * g_object_unref (file_stream);
+ *
+ * if (error != NULL) {
+ * g_error ("Error splicing streams: %s", error->message);
+ * g_error_free (error);
+ * g_object_unref (upload_stream);
+ * g_object_unref (service);
+ * return;
+ * }
+ *
+ * /<!-- -->* Finish off the upload by parsing the returned updated document metadata entry *<!-- -->/
+ * uploaded_document = gdata_documents_service_finish_upload (service, upload_stream, &error);
+ *
+ * g_object_unref (upload_stream);
+ * g_object_unref (service);
+ *
+ * if (error != NULL) {
+ * g_error ("Error uploading document: %s", error->message);
+ * g_error_free (error);
+ * return;
+ * }
+ *
+ * /<!-- -->* Do something with the uploaded document *<!-- -->/
+ *
+ * g_object_unref (uploaded_document);
+ * </programlisting>
+ * </example>
+ *
+ * The Drive service can be manipulated using batch operations, too. See the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#batching_acl_requests">online documentation on batch
+ * operations</ulink> for more information.
+ *
+ * <example>
+ * <title>Performing a Batch Operation on Documents</title>
+ * <programlisting>
+ * GDataDocumentsService *service;
+ * GDataBatchOperation *operation;
+ * GDataFeed *feed;
+ * GDataLink *batch_link;
+ * GList *i;
+ * GError *error = NULL;
+ *
+ * /<!-- -->* Create a service *<!-- -->/
+ * service = create_documents_service ();
+ *
+ * /<!-- -->* Create the batch operation; this requires that we have done a query first so that we can get the batch link *<!-- -->/
+ * feed = do_some_query (service);
+ * batch_link = gdata_feed_look_up_link (feed, GDATA_LINK_BATCH);
+ * operation = gdata_batchable_create_operation (GDATA_BATCHABLE (service), gdata_link_get_uri (batch_link));
+ * g_object_unref (feed);
+ *
+ * gdata_batch_operation_add_query (operation, presentation_entry_id_to_query, GDATA_TYPE_DOCUMENTS_PRESENTATION,
+ * (GDataBatchOperationCallback) batch_query_cb, user_data);
+ * gdata_batch_operation_add_insertion (operation, new_entry, (GDataBatchOperationCallback) batch_insertion_cb, user_data);
+ * gdata_batch_operation_add_update (operation, old_entry, (GDataBatchOperationCallback) batch_update_cb, user_data);
+ * gdata_batch_operation_add_deletion (operation, entry_to_delete, (GDataBatchOperationCallback) batch_deletion_cb, user_data);
+ *
+ * /<!-- -->* Run the batch operation and handle the results in the various callbacks *<!-- -->/
+ * gdata_test_batch_operation_run (operation, NULL, &error);
+ *
+ * g_object_unref (operation);
+ * g_object_unref (service);
+ *
+ * if (error != NULL) {
+ * g_error ("Error running batch operation: %s", error->message);
+ * g_error_free (error);
+ * return;
+ * }
+ *
+ * static void
+ * batch_query_cb (guint operation_id, GDataBatchOperationType operation_type, GDataEntry *entry, GError *error, gpointer user_data)
+ * {
+ * /<!-- -->* operation_type == GDATA_BATCH_OPERATION_QUERY *<!-- -->/
+ * /<!-- -->* Reference and do something with the returned entry. *<!-- -->/
+ * }
+ *
+ * static void
+ * batch_insertion_cb (guint operation_id, GDataBatchOperationType operation_type, GDataEntry *entry, GError *error, gpointer user_data)
+ * {
+ * /<!-- -->* operation_type == GDATA_BATCH_OPERATION_INSERTION *<!-- -->/
+ * /<!-- -->* Reference and do something with the returned entry. *<!-- -->/
+ * }
+ *
+ * static void
+ * batch_update_cb (guint operation_id, GDataBatchOperationType operation_type, GDataEntry *entry, GError *error, gpointer user_data)
+ * {
+ * /<!-- -->* operation_type == GDATA_BATCH_OPERATION_UPDATE *<!-- -->/
+ * /<!-- -->* Reference and do something with the returned entry. *<!-- -->/
+ * }
+ *
+ * static void
+ * batch_deletion_cb (guint operation_id, GDataBatchOperationType operation_type, GDataEntry *entry, GError *error, gpointer user_data)
+ * {
+ * /<!-- -->* operation_type == GDATA_BATCH_OPERATION_DELETION, entry == NULL *<!-- -->/
+ * }
+ * </programlisting>
+ * </example>
+ *
+ * Starred documents are denoted by being in the %GDATA_CATEGORY_SCHEMA_LABELS_STARRED category of the %GDATA_CATEGORY_SCHEMA_LABELS schema. Documents
+ * can be starred or unstarred simply by adding or removing this category from them and updating the document:
+ *
+ * <example>
+ * <title>Starring a Document</title>
+ * <programlisting>
+ * GDataDocumentsService *service;
+ * GDataDocumentsEntry *document, *updated_document;
+ * GDataCategory *starred_category;
+ * GError *error = NULL;
+ *
+ * /<!-- -->* Create a service and retrieve the document to be starred *<!-- -->/
+ * service = create_documents_service ();
+ * document = get_document_to_be_starred (service);
+ *
+ * /<!-- -->* Add the “starred” category to the document *<!-- -->/
+ * starred_category = gdata_category_new (GDATA_CATEGORY_SCHEMA_LABELS_STARRED, GDATA_CATEGORY_SCHEMA_LABELS, "starred");
+ * gdata_entry_add_category (GDATA_ENTRY (document), starred_category);
+ * g_object_unref (starred_category);
+ *
+ * /<!-- -->* Propagate the updated document to the server *<!-- -->/
+ * updated_document = GDATA_DOCUMENTS_ENTRY (gdata_service_update_entry (GDATA_SERVICE (service),
+ * gdata_documents_service_get_primary_authorization_domain (),
+ * GDATA_ENTRY (document), NULL, &error));
+ *
+ * g_object_unref (document);
+ * g_object_unref (service);
+ *
+ * if (error != NULL) {
+ * g_error ("Error starring document: %s", error->message);
+ * g_error_free (error);
+ * return;
+ * }
+ *
+ * /<!-- -->* Do something with the newly-starred document, like update it in the UI *<!-- -->/
+ *
+ * g_object_unref (updated_document);
+ * </programlisting>
+ * </example>
+ *
+ * Since: 0.4.0
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <libsoup/soup.h>
+#include <string.h>
+
+#include "gdata-documents-property.h"
+#include "gdata-documents-service.h"
+#include "gdata-documents-utils.h"
+#include "gdata-batchable.h"
+#include "gdata-service.h"
+#include "gdata-private.h"
+#include "gdata-upload-stream.h"
+
+GQuark
+gdata_documents_service_error_quark (void)
+{
+ return g_quark_from_static_string ("gdata-documents-service-error-quark");
+}
+
+static void append_query_headers (GDataService *self, GDataAuthorizationDomain *domain, SoupMessage *message);
+static GList *get_authorization_domains (void);
+static gchar *_get_upload_uri_for_query_and_folder (GDataDocumentsUploadQuery *query,
+ GDataDocumentsFolder *folder) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+_GDATA_DEFINE_AUTHORIZATION_DOMAIN (documents, "writely", "https://www.googleapis.com/auth/drive")
+_GDATA_DEFINE_AUTHORIZATION_DOMAIN (spreadsheets, "wise", "https://spreadsheets.google.com/feeds/")
+G_DEFINE_TYPE_WITH_CODE (GDataDocumentsService, gdata_documents_service, GDATA_TYPE_SERVICE, G_IMPLEMENT_INTERFACE (GDATA_TYPE_BATCHABLE, NULL))
+
+static void
+gdata_documents_service_class_init (GDataDocumentsServiceClass *klass)
+{
+ GDataServiceClass *service_class = GDATA_SERVICE_CLASS (klass);
+ service_class->feed_type = GDATA_TYPE_DOCUMENTS_FEED;
+
+ service_class->append_query_headers = append_query_headers;
+ service_class->get_authorization_domains = get_authorization_domains;
+
+ service_class->api_version = "3";
+}
+
+static void
+gdata_documents_service_init (GDataDocumentsService *self)
+{
+ /* Nothing to see here */
+}
+
+static void
+append_query_headers (GDataService *self, GDataAuthorizationDomain *domain, SoupMessage *message)
+{
+ g_assert (message != NULL);
+
+ if (message->method == SOUP_METHOD_POST && soup_message_headers_get_one (message->request_headers, "X-Upload-Content-Length") == NULL) {
+ gchar *upload_uri;
+ const gchar *v3_pos;
+
+ upload_uri = soup_uri_to_string (soup_message_get_uri (message), FALSE);
+ v3_pos = strstr (upload_uri, "://docs.google.com/feeds/upload/create-session/default/private/full");
+
+ if (v3_pos != NULL) {
+ gchar *v2_upload_uri;
+ SoupURI *_v2_upload_uri;
+
+ /* Content length header for resumable uploads. Only set it if this looks like the initial request of a resumable upload, and
+ * if no content length has been set previously.
+ * This allows methods like gdata_service_insert_entry() (which aren't resumable-upload-aware) to continue working for creating
+ * documents with metadata only, by simulating the initial request of a resumable upload as described here:
+ * https://developers.google.com/google-apps/documents-list/#creating_a_new_document_or_file_with_metadata_only */
+ soup_message_headers_replace (message->request_headers, "X-Upload-Content-Length", "0");
+
+ /* Also set the encoding to be content length encoding. */
+ soup_message_headers_set_encoding (message->request_headers, SOUP_ENCODING_CONTENT_LENGTH);
+
+ /* HACK: Work around http://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=3033 by changing the upload URI
+ * to the v2 API's upload URI. Grrr. */
+ v2_upload_uri = g_strconcat (_gdata_service_get_scheme (), "://docs.google.com/feeds/default/private/full",
+ v3_pos + strlen ("://docs.google.com/feeds/upload/create-session/default/private/full"), NULL);
+ _v2_upload_uri = soup_uri_new (v2_upload_uri);
+ soup_message_set_uri (message, _v2_upload_uri);
+ soup_uri_free (_v2_upload_uri);
+ g_free (v2_upload_uri);
+ }
+
+ g_free (upload_uri);
+ }
+
+ /* Chain up to the parent class */
+ GDATA_SERVICE_CLASS (gdata_documents_service_parent_class)->append_query_headers (self, domain, message);
+}
+
+static GList *
+get_authorization_domains (void)
+{
+ GList *authorization_domains = NULL;
+
+ authorization_domains = g_list_prepend (authorization_domains, get_documents_authorization_domain ());
+ authorization_domains = g_list_prepend (authorization_domains, get_spreadsheets_authorization_domain ());
+
+ return authorization_domains;
+}
+
+/**
+ * gdata_documents_service_new:
+ * @authorizer: (allow-none): a #GDataAuthorizer to authorize the service's requests, or %NULL
+ *
+ * Creates a new #GDataDocumentsService using the given #GDataAuthorizer. If @authorizer is %NULL, all requests are made as an unauthenticated user.
+ *
+ * Return value: a new #GDataDocumentsService, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.9.0
+ */
+GDataDocumentsService *
+gdata_documents_service_new (GDataAuthorizer *authorizer)
+{
+ g_return_val_if_fail (authorizer == NULL || GDATA_IS_AUTHORIZER (authorizer), NULL);
+
+ return g_object_new (GDATA_TYPE_DOCUMENTS_SERVICE,
+ "authorizer", authorizer,
+ NULL);
+}
+
+/**
+ * gdata_documents_service_get_primary_authorization_domain:
+ *
+ * The primary #GDataAuthorizationDomain for interacting with Google Documents. This will not normally need to be used, as it's used internally
+ * by the #GDataDocumentsService methods. However, if using the plain #GDataService methods to implement custom queries or requests which libgdata
+ * does not support natively, then this domain may be needed to authorize the requests.
+ *
+ * The domain never changes, and is interned so that pointer comparison can be used to differentiate it from other authorization domains.
+ *
+ * Return value: (transfer none): the service's authorization domain
+ *
+ * Since: 0.9.0
+ */
+GDataAuthorizationDomain *
+gdata_documents_service_get_primary_authorization_domain (void)
+{
+ return get_documents_authorization_domain ();
+}
+
+/**
+ * gdata_documents_service_get_spreadsheet_authorization_domain:
+ *
+ * The #GDataAuthorizationDomain for interacting with spreadsheet data. This will not normally need to be used, as it's automatically used internally
+ * by the #GDataDocumentsService methods. However, if using the plain #GDataService methods to implement custom queries or requests which libgdata
+ * does not support natively, then this domain may be needed to authorize the requests which pertain to the Google Spreadsheets Data API, such as
+ * requests to download or upload spreadsheet documents.
+ *
+ * The domain never changes, and is interned so that pointer comparison can be used to differentiate it from other authorization domains.
+ *
+ * Return value: (transfer none): the service's authorization domain
+ *
+ * Since: 0.9.0
+ */
+GDataAuthorizationDomain *
+gdata_documents_service_get_spreadsheet_authorization_domain (void)
+{
+ return get_spreadsheets_authorization_domain ();
+}
+
+/**
+ * gdata_documents_service_get_metadata:
+ * @self: a #GDataDocumentsService
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Gets a #GDataDocumentsMetadata object containing metadata about the documents
+ * service itself, like how large the user quota is.
+ *
+ * Return value: (transfer full): the service's metadata object; unref with g_object_unref()
+ *
+ * Since: 0.17.9
+ */
+GDataDocumentsMetadata *
+gdata_documents_service_get_metadata (GDataDocumentsService *self, GCancellable *cancellable, GError **error)
+{
+ GDataDocumentsMetadata *metadata;
+ const gchar *uri = "https://www.googleapis.com/drive/v2/about";
+ SoupMessage *message;
+ guint status;
+
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_SERVICE (self), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ message = _gdata_service_build_message (GDATA_SERVICE (self), get_documents_authorization_domain (), SOUP_METHOD_GET, uri, NULL, FALSE);
+
+ /* Send the message */
+ status = _gdata_service_send_message (GDATA_SERVICE (self), message, cancellable, error);
+
+ if (status == SOUP_STATUS_NONE || status == SOUP_STATUS_CANCELLED) {
+ /* Redirect error or cancelled */
+ g_object_unref (message);
+ return NULL;
+ } else if (status != SOUP_STATUS_OK) {
+ /* Error */
+ GDataServiceClass *klass = GDATA_SERVICE_GET_CLASS (self);
+ g_assert (klass->parse_error_response != NULL);
+ klass->parse_error_response (GDATA_SERVICE (self), GDATA_OPERATION_QUERY, status, message->reason_phrase, message->response_body->data,
+ message->response_body->length, error);
+ g_object_unref (message);
+ return NULL;
+ }
+
+ /* Parse the JSON; and update the entry */
+ g_assert (message->response_body->data != NULL);
+ metadata = GDATA_DOCUMENTS_METADATA (gdata_parsable_new_from_json (GDATA_TYPE_DOCUMENTS_METADATA, message->response_body->data, message->response_body->length,
+ error));
+ g_object_unref (message);
+
+ return metadata;
+}
+
+static void
+get_metadata_thread (GTask *task, gpointer source_object, gpointer task_data, GCancellable *cancellable)
+{
+ GDataDocumentsService *service = GDATA_DOCUMENTS_SERVICE (source_object);
+ g_autoptr(GDataDocumentsMetadata) metadata = NULL;
+ g_autoptr(GError) error = NULL;
+
+ /* Copy the metadata and return */
+ metadata = gdata_documents_service_get_metadata (service, cancellable, &error);
+ if (error != NULL)
+ g_task_return_error (task, g_steal_pointer (&error));
+ else
+ g_task_return_pointer (task, g_steal_pointer (&metadata), g_object_unref);
+}
+
+/**
+ * gdata_documents_service_get_metadata_async:
+ * @self: a #GDataDocumentsService
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when the operation is finished, or %NULL
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Gets a #GDataDocumentsMetadata object containing metadata about the documents
+ * service itself, like how large the user quota is.
+ *
+ * For more details, see gdata_documents_service_get_metadata(), which is the synchronous version of this function.
+ *
+ * When the operation is finished, @callback will be called. You can then call gdata_documents_service_get_metadata_finish() to get the results
+ * of the operation.
+ *
+ * Since: 0.17.9
+ */
+void
+gdata_documents_service_get_metadata_async (GDataDocumentsService *self, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_autoptr(GTask) task = NULL;
+
+ g_return_if_fail (GDATA_IS_DOCUMENTS_SERVICE (self));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_documents_service_get_metadata_async);
+ g_task_run_in_thread (task, get_metadata_thread);
+}
+
+/**
+ * gdata_documents_service_get_metadata_finish:
+ * @self: a #GDataDocumentsService
+ * @async_result: a #GAsyncResult
+ * @error: a #GError, or %NULL
+ *
+ * Finish an asynchronous operation to get a #GDataDocumentsMetadata started with gdata_documents_service_get_metadata_async().
+ *
+ * Return value: (transfer full): the service's metadata object; unref with g_object_unref()
+ *
+ * Since: 0.17.9
+ */
+GDataDocumentsMetadata *
+gdata_documents_service_get_metadata_finish (GDataDocumentsService *self, GAsyncResult *async_result, GError **error)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_SERVICE (self), NULL);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (async_result), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+ g_return_val_if_fail (g_task_is_valid (async_result, self), NULL);
+ g_return_val_if_fail (g_async_result_is_tagged (async_result, gdata_documents_service_get_metadata_async), NULL);
+
+ return g_task_propagate_pointer (G_TASK (async_result), error);
+}
+
+static gchar *
+_query_documents_build_request_uri (GDataDocumentsQuery *query)
+{
+ /* If we want to query for documents contained in a folder, the URI is different.
+ * The "/[folder:id]" suffix is added by the GDataQuery later. */
+ return g_strdup ("https://www.googleapis.com/drive/v2/files");
+}
+
+/**
+ * gdata_documents_service_query_documents:
+ * @self: a #GDataDocumentsService
+ * @query: (allow-none): a #GDataDocumentsQuery with the query parameters, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (scope call) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @error: a #GError, or %NULL
+ *
+ * Queries the service to return a list of documents matching the given @query. Note that @query has to be a #GDataDocumentsQuery, rather than just
+ * a #GDataQuery, as it uses the folder ID specified in #GDataDocumentsQuery:folder-id.
+ *
+ * For more details, see gdata_service_query().
+ *
+ * Return value: (transfer full): a #GDataDocumentsFeed of query results; unref with g_object_unref()
+ *
+ * Since: 0.4.0
+ */
+GDataDocumentsFeed *
+gdata_documents_service_query_documents (GDataDocumentsService *self, GDataDocumentsQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GError **error)
+{
+ GDataFeed *feed;
+ gchar *request_uri;
+
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_SERVICE (self), NULL);
+ g_return_val_if_fail (query == NULL || GDATA_IS_DOCUMENTS_QUERY (query), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ /* Ensure we're authenticated first */
+ if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (self)),
+ get_documents_authorization_domain ()) == FALSE) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED,
+ _("You must be authenticated to query documents."));
+ return NULL;
+ }
+
+ request_uri = _query_documents_build_request_uri (query);
+ feed = gdata_service_query (GDATA_SERVICE (self), get_documents_authorization_domain (), request_uri, GDATA_QUERY (query),
+ GDATA_TYPE_DOCUMENTS_ENTRY, cancellable, progress_callback, progress_user_data, error);
+ g_free (request_uri);
+
+ return GDATA_DOCUMENTS_FEED (feed);
+}
+
+/**
+ * gdata_documents_service_query_documents_async:
+ * @self: a #GDataDocumentsService
+ * @query: (allow-none): a #GDataDocumentsQuery with the query parameters, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @destroy_progress_user_data: (allow-none): the function to call when @progress_callback will not be called any more, or %NULL. This function will be
+ * called with @progress_user_data as a parameter and can be used to free any memory allocated for it.
+ * @callback: a #GAsyncReadyCallback to call when authentication is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Queries the service to return a list of documents matching the given @query. @self and
+ * @query are both reffed when this function is called, so can safely be unreffed after this function returns.
+ *
+ * For more details, see gdata_documents_service_query_documents(), which is the synchronous version of this function,
+ * and gdata_service_query_async(), which is the base asynchronous query function.
+ *
+ * Since: 0.9.1
+ */
+void
+gdata_documents_service_query_documents_async (GDataDocumentsService *self, GDataDocumentsQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ gchar *request_uri;
+
+ g_return_if_fail (GDATA_IS_DOCUMENTS_SERVICE (self));
+ g_return_if_fail (query == NULL || GDATA_IS_DOCUMENTS_QUERY (query));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+ g_return_if_fail (callback != NULL);
+
+ /* Ensure we're authenticated first */
+ if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (self)),
+ get_documents_authorization_domain ()) == FALSE) {
+ g_autoptr(GTask) task = NULL;
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_service_query_async);
+ g_task_return_new_error (task, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED, "%s",
+ _("You must be authenticated to query documents."));
+
+ return;
+ }
+
+ request_uri = _query_documents_build_request_uri (query);
+ gdata_service_query_async (GDATA_SERVICE (self), get_documents_authorization_domain (), request_uri, GDATA_QUERY (query),
+ GDATA_TYPE_DOCUMENTS_ENTRY, cancellable, progress_callback, progress_user_data,
+ destroy_progress_user_data, callback, user_data);
+ g_free (request_uri);
+}
+
+static void
+add_folder_link_to_entry (GDataDocumentsEntry *entry, GDataDocumentsFolder *folder)
+{
+ GDataLink *_link;
+ const gchar *id;
+ gchar *uri;
+
+ /* HACK: Build the GDataLink:uri from the ID by adding the prefix. */
+ id = gdata_entry_get_id (GDATA_ENTRY (folder));
+ uri = g_strconcat (GDATA_DOCUMENTS_URI_PREFIX, id, NULL);
+ _link = gdata_link_new (uri, GDATA_LINK_PARENT);
+ gdata_entry_add_link (GDATA_ENTRY (entry), _link);
+ g_object_unref (_link);
+ g_free (uri);
+}
+
+static GDataUploadStream *
+upload_update_document (GDataDocumentsService *self, GDataDocumentsDocument *document, const gchar *slug, const gchar *content_type,
+ GDataDocumentsFolder *folder, goffset content_length, const gchar *method, const gchar *upload_uri,
+ GCancellable *cancellable)
+{
+ /* HACK: Corrects a bug on spreadsheet content types handling
+ * The content type for ODF spreadsheets is "application/vnd.oasis.opendocument.spreadsheet" for my ODF spreadsheet;
+ * but Google Documents' spreadsheet service is waiting for "application/x-vnd.oasis.opendocument.spreadsheet"
+ * and nothing else.
+ * Bug filed with Google: http://code.google.com/p/gdata-issues/issues/detail?id=1127 */
+ if (strcmp (content_type, "application/vnd.oasis.opendocument.spreadsheet") == 0)
+ content_type = "application/x-vnd.oasis.opendocument.spreadsheet";
+
+ if (folder != NULL)
+ add_folder_link_to_entry (GDATA_DOCUMENTS_ENTRY (document), folder);
+
+ /* We need streaming file I/O: GDataUploadStream */
+ if (content_length == -1) {
+ /* Non-resumable upload. */
+ return GDATA_UPLOAD_STREAM (gdata_upload_stream_new (GDATA_SERVICE (self), get_documents_authorization_domain (), method, upload_uri,
+ GDATA_ENTRY (document), slug, content_type, cancellable));
+ } else {
+ /* Resumable upload. */
+ return GDATA_UPLOAD_STREAM (gdata_upload_stream_new_resumable (GDATA_SERVICE (self), get_documents_authorization_domain (), method,
+ upload_uri, GDATA_ENTRY (document), slug, content_type, content_length,
+ cancellable));
+ }
+}
+
+static gboolean
+_upload_checks (GDataDocumentsService *self, GDataDocumentsDocument *document, GError **error)
+{
+ if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (self)),
+ get_documents_authorization_domain ()) == FALSE) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED,
+ _("You must be authenticated to upload documents."));
+ return FALSE;
+ }
+
+ if (document != NULL && gdata_entry_is_inserted (GDATA_ENTRY (document)) == TRUE) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_ENTRY_ALREADY_INSERTED,
+ _("The document has already been uploaded."));
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/**
+ * gdata_documents_service_upload_document:
+ * @self: an authenticated #GDataDocumentsService
+ * @document: (allow-none): the #GDataDocumentsDocument to insert, or %NULL
+ * @slug: the filename to give to the uploaded document
+ * @content_type: the content type of the uploaded data
+ * @folder: (allow-none): the folder to which the document should be uploaded, or %NULL
+ * @cancellable: (allow-none): a #GCancellable for the entire upload stream, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Uploads a document to Google Documents, using the properties from @document and the document data written to the resulting #GDataUploadStream. If
+ * the document data does not need to be provided at the moment, just the metadata, use gdata_service_insert_entry() instead (e.g. in the case of
+ * creating a new, empty file to be edited at a later date).
+ *
+ * This performs a non-resumable upload, unlike gdata_documents_service_upload_document(). This means that errors during transmission will cause the
+ * upload to fail, and the entire document will have to be re-uploaded. It is recommended that gdata_documents_service_upload_document_resumable()
+ * be used instead.
+ *
+ * If @document is %NULL, only the document data will be uploaded. The new document entry will be named using @slug, and will have default metadata.
+ *
+ * The stream returned by this function should be written to using the standard #GOutputStream methods, asynchronously or synchronously. Once the stream
+ * is closed (using g_output_stream_close()), gdata_documents_service_finish_upload() should be called on it to parse and return the updated
+ * #GDataDocumentsDocument for the document. This must be done, as @document isn't updated in-place.
+ *
+ * In order to cancel the upload, a #GCancellable passed in to @cancellable must be cancelled using g_cancellable_cancel(). Cancelling the individual
+ * #GOutputStream operations on the #GDataUploadStream will not cancel the entire upload; merely the write or close operation in question. See the
+ * #GDataUploadStream:cancellable for more details.
+ *
+ * Any upload errors will be thrown by the stream methods, and may come from the #GDataServiceError domain.
+ *
+ * Return value: (transfer full): a #GDataUploadStream to write the document data to, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.8.0
+ */
+GDataUploadStream *
+gdata_documents_service_upload_document (GDataDocumentsService *self, GDataDocumentsDocument *document, const gchar *slug, const gchar *content_type,
+ GDataDocumentsFolder *folder, GCancellable *cancellable, GError **error)
+{
+ GDataUploadStream *upload_stream;
+ gchar *upload_uri;
+ gchar *upload_uri_prefix;
+
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_SERVICE (self), NULL);
+ g_return_val_if_fail (document == NULL || GDATA_IS_DOCUMENTS_DOCUMENT (document), NULL);
+ g_return_val_if_fail (slug != NULL && *slug != '\0', NULL);
+ g_return_val_if_fail (content_type != NULL && *content_type != '\0', NULL);
+ g_return_val_if_fail (folder == NULL || GDATA_IS_DOCUMENTS_FOLDER (folder), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ if (_upload_checks (self, document, error) == FALSE) {
+ return NULL;
+ }
+
+ upload_uri_prefix = gdata_documents_service_get_upload_uri (folder);
+ upload_uri = g_strconcat (upload_uri_prefix, "?uploadType=multipart", NULL);
+ upload_stream = upload_update_document (self, document, slug, content_type, folder, -1, SOUP_METHOD_POST, upload_uri, cancellable);
+ g_free (upload_uri);
+ g_free (upload_uri_prefix);
+
+ return upload_stream;
+}
+
+/**
+ * gdata_documents_service_upload_document_resumable:
+ * @self: an authenticated #GDataDocumentsService
+ * @document: (allow-none): the #GDataDocumentsDocument to insert, or %NULL
+ * @slug: the filename to give to the uploaded document
+ * @content_type: the content type of the uploaded data
+ * @content_length: the size (in bytes) of the file being uploaded
+ * @query: (allow-none): a query specifying parameters for the upload, or %NULL
+ * @cancellable: (allow-none): a #GCancellable for the entire upload stream, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Uploads a document to Google Documents, using the properties from @document and the document data written to the resulting #GDataUploadStream. If
+ * the document data does not need to be provided at the moment, just the metadata, use gdata_service_insert_entry() instead (e.g. in the case of
+ * creating a new, empty file to be edited at a later date).
+ *
+ * Unlike gdata_documents_service_upload_document(), this method performs a
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/resumable_upload.html">resumable upload</ulink> which allows for correction of
+ * transmission errors without re-uploading the entire file. Use of this method is preferred over gdata_documents_service_upload_document().
+ *
+ * If @document is %NULL, only the document data will be uploaded. The new document entry will be named using @slug, and will have default metadata.
+ *
+ * If non-%NULL, the @query specifies parameters for the upload, such as a #GDataDocumentsFolder to upload the document into; and whether to treat
+ * the document as an opaque file, or convert it to a standard format. If @query is %NULL, the document will be uploaded into the root folder, and
+ * automatically converted to a standard format. No OCR or automatic language translation will be performed by default.
+ *
+ * If @query is non-%NULL and #GDataDocumentsUploadQuery:convert is %FALSE, @document must be an instance of #GDataDocumentsDocument. Otherwise,
+ * @document must be a subclass of it, such as #GDataDocumentsPresentation.
+ *
+ * The stream returned by this function should be written to using the standard #GOutputStream methods, asynchronously or synchronously. Once the stream
+ * is closed (using g_output_stream_close()), gdata_documents_service_finish_upload() should be called on it to parse and return the updated
+ * #GDataDocumentsDocument for the document. This must be done, as @document isn't updated in-place.
+ *
+ * In order to cancel the upload, a #GCancellable passed in to @cancellable must be cancelled using g_cancellable_cancel(). Cancelling the individual
+ * #GOutputStream operations on the #GDataUploadStream will not cancel the entire upload; merely the write or close operation in question. See the
+ * #GDataUploadStream:cancellable for more details.
+ *
+ * Any upload errors will be thrown by the stream methods, and may come from the #GDataServiceError domain.
+ *
+ * Return value: (transfer full): a #GDataUploadStream to write the document data to, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.13.0
+ */
+GDataUploadStream *
+gdata_documents_service_upload_document_resumable (GDataDocumentsService *self, GDataDocumentsDocument *document, const gchar *slug,
+ const gchar *content_type, goffset content_length, GDataDocumentsUploadQuery *query,
+ GCancellable *cancellable, GError **error)
+{
+ GDataUploadStream *upload_stream;
+ gchar *upload_uri;
+
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_SERVICE (self), NULL);
+ g_return_val_if_fail (document == NULL || GDATA_IS_DOCUMENTS_DOCUMENT (document), NULL);
+ g_return_val_if_fail (slug != NULL && *slug != '\0', NULL);
+ g_return_val_if_fail (content_type != NULL && *content_type != '\0', NULL);
+ g_return_val_if_fail (query == NULL || GDATA_IS_DOCUMENTS_UPLOAD_QUERY (query), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ if (_upload_checks (self, document, error) == FALSE) {
+ return NULL;
+ }
+
+ upload_uri = _get_upload_uri_for_query_and_folder (query, NULL);
+ upload_stream = upload_update_document (self, document, slug, content_type, NULL, content_length, SOUP_METHOD_POST, upload_uri, cancellable);
+ g_free (upload_uri);
+
+ return upload_stream;
+}
+
+static gboolean
+_update_checks (GDataDocumentsService *self, GError **error)
+{
+ if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (self)),
+ get_documents_authorization_domain ()) == FALSE) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED,
+ _("You must be authenticated to update documents."));
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/**
+ * gdata_documents_service_update_document:
+ * @self: a #GDataDocumentsService
+ * @document: the #GDataDocumentsDocument to update
+ * @slug: the filename to give to the uploaded document
+ * @content_type: the content type of the uploaded data
+ * @cancellable: (allow-none): a #GCancellable for the entire upload stream, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Update the document using the properties from @document and the document data written to the resulting #GDataUploadStream. If the document data does
+ * not need to be changed, just the metadata, use gdata_service_update_entry() instead.
+ *
+ * This performs a non-resumable upload, unlike gdata_documents_service_update_document(). This means that errors during transmission will cause the
+ * upload to fail, and the entire document will have to be re-uploaded. It is recommended that gdata_documents_service_update_document_resumable()
+ * be used instead.
+ *
+ * The stream returned by this function should be written to using the standard #GOutputStream methods, asynchronously or synchronously. Once the stream
+ * is closed (using g_output_stream_close()), gdata_documents_service_finish_upload() should be called on it to parse and return the updated
+ * #GDataDocumentsDocument for the document. This must be done, as @document isn't updated in-place.
+ *
+ * In order to cancel the update, a #GCancellable passed in to @cancellable must be cancelled using g_cancellable_cancel(). Cancelling the individual
+ * #GOutputStream operations on the #GDataUploadStream will not cancel the entire update; merely the write or close operation in question. See the
+ * #GDataUploadStream:cancellable for more details.
+ *
+ * Any upload errors will be thrown by the stream methods, and may come from the #GDataServiceError domain.
+ *
+ * For more information, see gdata_service_update_entry().
+ *
+ * Return value: (transfer full): a #GDataUploadStream to write the document data to; unref with g_object_unref()
+ *
+ * Since: 0.8.0
+ */
+GDataUploadStream *
+gdata_documents_service_update_document (GDataDocumentsService *self, GDataDocumentsDocument *document, const gchar *slug, const gchar *content_type,
+ GCancellable *cancellable, GError **error)
+{
+ GDataUploadStream *update_stream;
+ const gchar *id;
+ gchar *update_uri;
+ gchar *update_uri_prefix;
+
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_SERVICE (self), NULL);
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_DOCUMENT (document), NULL);
+ g_return_val_if_fail (slug != NULL && *slug != '\0', NULL);
+ g_return_val_if_fail (content_type != NULL && *content_type != '\0', NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ if (_update_checks (self, error) == FALSE) {
+ return NULL;
+ }
+
+ update_uri_prefix = gdata_documents_service_get_upload_uri (NULL);
+ id = gdata_entry_get_id (GDATA_ENTRY (document));
+ update_uri = g_strconcat (update_uri_prefix, "/", id, "?uploadType=multipart", NULL);
+ update_stream = upload_update_document (self, document, slug, content_type, NULL, -1, SOUP_METHOD_PUT, update_uri, cancellable);
+ g_free (update_uri);
+ g_free (update_uri_prefix);
+
+ return update_stream;
+}
+
+/**
+ * gdata_documents_service_update_document_resumable:
+ * @self: a #GDataDocumentsService
+ * @document: the #GDataDocumentsDocument to update
+ * @slug: the filename to give to the uploaded document
+ * @content_type: the content type of the uploaded data
+ * @content_length: the size (in bytes) of the file being uploaded
+ * @cancellable: (allow-none): a #GCancellable for the entire upload stream, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Update the document using the properties from @document and the document data written to the resulting #GDataUploadStream. If the document data does
+ * not need to be changed, just the metadata, use gdata_service_update_entry() instead.
+ *
+ * Unlike gdata_documents_service_update_document(), this method performs a
+ * <ulink type="http" url="http://code.google.com/apis/gdata/docs/resumable_upload.html">resumable upload</ulink> which allows for correction of
+ * transmission errors without re-uploading the entire file. Use of this method is preferred over gdata_documents_service_update_document().
+ *
+ * The stream returned by this function should be written to using the standard #GOutputStream methods, asynchronously or synchronously. Once the stream
+ * is closed (using g_output_stream_close()), gdata_documents_service_finish_upload() should be called on it to parse and return the updated
+ * #GDataDocumentsDocument for the document. This must be done, as @document isn't updated in-place.
+ *
+ * In order to cancel the update, a #GCancellable passed in to @cancellable must be cancelled using g_cancellable_cancel(). Cancelling the individual
+ * #GOutputStream operations on the #GDataUploadStream will not cancel the entire update; merely the write or close operation in question. See the
+ * #GDataUploadStream:cancellable for more details.
+ *
+ * Any upload errors will be thrown by the stream methods, and may come from the #GDataServiceError domain.
+ *
+ * For more information, see gdata_service_update_entry().
+ *
+ * Return value: (transfer full): a #GDataUploadStream to write the document data to; unref with g_object_unref()
+ *
+ * Since: 0.13.0
+ */
+GDataUploadStream *
+gdata_documents_service_update_document_resumable (GDataDocumentsService *self, GDataDocumentsDocument *document, const gchar *slug,
+ const gchar *content_type, goffset content_length, GCancellable *cancellable, GError **error)
+{
+ GDataLink *update_link;
+
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_SERVICE (self), NULL);
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_DOCUMENT (document), NULL);
+ g_return_val_if_fail (slug != NULL && *slug != '\0', NULL);
+ g_return_val_if_fail (content_type != NULL && *content_type != '\0', NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ if (_update_checks (self, error) == FALSE) {
+ return NULL;
+ }
+
+ update_link = gdata_entry_look_up_link (GDATA_ENTRY (document), GDATA_LINK_RESUMABLE_EDIT_MEDIA);
+ g_assert (update_link != NULL);
+
+ return upload_update_document (self, document, slug, content_type, NULL, content_length, SOUP_METHOD_PUT, gdata_link_get_uri (update_link),
+ cancellable);
+}
+
+/**
+ * gdata_documents_service_finish_upload:
+ * @self: a #GDataDocumentsService
+ * @upload_stream: the #GDataUploadStream from the operation
+ * @error: a #GError, or %NULL
+ *
+ * Finish off a document upload or update operation started by gdata_documents_service_upload_document() or gdata_documents_service_update_document(),
+ * parsing the result and returning the new or updated #GDataDocumentsDocument.
+ *
+ * If an error occurred during the upload or update operation, it will have been returned during the operation (e.g. by g_output_stream_splice() or one
+ * of the other stream methods). In such a case, %NULL will be returned but @error will remain unset. @error is only set in the case that the server
+ * indicates that the operation was successful, but an error is encountered in parsing the result sent by the server.
+ *
+ * In the case that no #GDataDocumentsDocument was passed (to gdata_documents_service_upload_document() or gdata_documents_service_update_document())
+ * when starting the operation, %GDATA_DOCUMENTS_SERVICE_ERROR_INVALID_CONTENT_TYPE will be thrown in @error if the content type of the uploaded data
+ * could not be mapped to a document type with which to interpret the response from the server.
+ *
+ * Return value: (transfer full): the new or updated #GDataDocumentsDocument, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.8.0
+ */
+GDataDocumentsDocument *
+gdata_documents_service_finish_upload (GDataDocumentsService *self, GDataUploadStream *upload_stream, GError **error)
+{
+ const gchar *content_type;
+ const gchar *response_body;
+ gssize response_length;
+ GType new_document_type = G_TYPE_INVALID;
+
+ /* Get and parse the response from the server */
+ response_body = gdata_upload_stream_get_response (upload_stream, &response_length);
+ if (response_body == NULL || response_length == 0) {
+ /* Error will have been set by the upload stream. */
+ return NULL;
+ }
+
+ content_type = gdata_upload_stream_get_content_type (upload_stream);
+ new_document_type = gdata_documents_utils_get_type_from_content_type (content_type);
+
+ if (g_type_is_a (new_document_type, GDATA_TYPE_DOCUMENTS_DOCUMENT) == FALSE) {
+ g_set_error (error, GDATA_DOCUMENTS_SERVICE_ERROR, GDATA_DOCUMENTS_SERVICE_ERROR_INVALID_CONTENT_TYPE,
+ _("The content type of the supplied document (‘%s’) could not be recognized."),
+ content_type);
+ return NULL;
+ }
+
+ return GDATA_DOCUMENTS_DOCUMENT (gdata_parsable_new_from_json (new_document_type, response_body, (gint) response_length, error));
+}
+
+/**
+ * gdata_documents_service_copy_document:
+ * @self: an authenticated #GDataDocumentsService
+ * @document: the #GDataDocumentsDocument to copy
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Copy the given @document, producing a duplicate document in the same folder and returning its #GDataDocumentsDocument.
+ *
+ * Errors from #GDataServiceError can be returned for exceptional conditions, as determined by the server.
+ *
+ * Return value: (transfer full): the duplicate #GDataDocumentsDocument, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.13.1
+ */
+GDataDocumentsDocument *
+gdata_documents_service_copy_document (GDataDocumentsService *self, GDataDocumentsDocument *document, GCancellable *cancellable, GError **error)
+{
+ GDataDocumentsDocument *new_document;
+ GDataEntry *parent = NULL;
+ GList *i;
+ GList *parent_folders_list;
+ const gchar *parent_id = NULL;
+
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_SERVICE (self), NULL);
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_DOCUMENT (document), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (self)),
+ get_documents_authorization_domain ()) == FALSE) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED,
+ _("You must be authenticated to copy documents."));
+ return NULL;
+ }
+
+ parent_folders_list = gdata_entry_look_up_links (GDATA_ENTRY (document), GDATA_LINK_PARENT);
+ for (i = parent_folders_list; i != NULL; i = i->next) {
+ GDataLink *_link = GDATA_LINK (i->data);
+ const gchar *id;
+
+ id = gdata_documents_utils_get_id_from_link (_link);
+ if (id != NULL) {
+ parent_id = id;
+ break;
+ }
+ }
+
+ g_list_free (parent_folders_list);
+
+ if (parent_id == NULL) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_NOT_FOUND, _("Parent folder not found"));
+ return NULL;
+ }
+
+ parent = gdata_service_query_single_entry (GDATA_SERVICE (self), get_documents_authorization_domain (), parent_id, NULL, GDATA_TYPE_DOCUMENTS_FOLDER, cancellable, error);
+ if (parent == NULL)
+ return NULL;
+
+ new_document = GDATA_DOCUMENTS_DOCUMENT (gdata_documents_service_add_entry_to_folder (self, GDATA_DOCUMENTS_ENTRY (document), GDATA_DOCUMENTS_FOLDER (parent), cancellable, error));
+ g_object_unref (parent);
+
+ return new_document;
+}
+
+static void
+copy_document_thread (GTask *task, gpointer source_object, gpointer task_data, GCancellable *cancellable)
+{
+ GDataDocumentsService *service = GDATA_DOCUMENTS_SERVICE (source_object);
+ GDataDocumentsDocument *document = task_data;
+ g_autoptr(GDataDocumentsDocument) new_document = NULL;
+ g_autoptr(GError) error = NULL;
+
+ /* Copy the document and return */
+ new_document = gdata_documents_service_copy_document (service, document, cancellable, &error);
+ if (error != NULL)
+ g_task_return_error (task, g_steal_pointer (&error));
+ else
+ g_task_return_pointer (task, g_steal_pointer (&new_document), g_object_unref);
+}
+
+/**
+ * gdata_documents_service_copy_document_async:
+ * @self: a #GDataDocumentsService
+ * @document: the #GDataDocumentsDocument to copy
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when the operation is finished, or %NULL
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Copy the given @document, producing a duplicate document in the same folder and returning its #GDataDocumentsDocument. @self and @document are
+ * both reffed when this function is called, so can safely be unreffed after this function returns.
+ *
+ * For more details, see gdata_documents_service_copy_document(), which is the synchronous version of this function.
+ *
+ * When the operation is finished, @callback will be called. You can then call gdata_documents_service_copy_document_finish() to get the results
+ * of the operation.
+ *
+ * Since: 0.13.1
+ */
+void
+gdata_documents_service_copy_document_async (GDataDocumentsService *self, GDataDocumentsDocument *document, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_autoptr(GTask) task = NULL;
+
+ g_return_if_fail (GDATA_IS_DOCUMENTS_SERVICE (self));
+ g_return_if_fail (GDATA_IS_DOCUMENTS_DOCUMENT (document));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_documents_service_copy_document_async);
+ g_task_set_task_data (task, g_object_ref (document), (GDestroyNotify) g_object_unref);
+ g_task_run_in_thread (task, copy_document_thread);
+}
+
+/**
+ * gdata_documents_service_copy_document_finish:
+ * @self: a #GDataDocumentsService
+ * @async_result: a #GAsyncResult
+ * @error: a #GError, or %NULL
+ *
+ * Finish an asynchronous operation to copy a #GDataDocumentsDocument started with gdata_documents_service_copy_document_async().
+ *
+ * Return value: (transfer full): the duplicate #GDataDocumentsDocument, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.13.1
+ */
+GDataDocumentsDocument *
+gdata_documents_service_copy_document_finish (GDataDocumentsService *self, GAsyncResult *async_result, GError **error)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_SERVICE (self), NULL);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (async_result), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+ g_return_val_if_fail (g_task_is_valid (async_result, self), NULL);
+ g_return_val_if_fail (g_async_result_is_tagged (async_result, gdata_documents_service_copy_document_async), NULL);
+
+ return g_task_propagate_pointer (G_TASK (async_result), error);
+}
+
+/**
+ * gdata_documents_service_add_entry_to_folder:
+ * @self: an authenticated #GDataDocumentsService
+ * @entry: the #GDataDocumentsEntry to copy
+ * @folder: the #GDataDocumentsFolder to copy @entry into
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Add the given @entry to the specified @folder, and return an updated #GDataDocumentsEntry for @entry. If the @entry is already in another folder,
+ * a copy will be added to the new folder. The copy and original will have different IDs. Note that @entry can't be a #GDataDocumentsFolder that
+ * already exists on the server. It can be a new #GDataDocumentsFolder, or a #GDataDocumentsDocument that is either new or already present on the
+ * server.
+ *
+ * Errors from #GDataServiceError can be returned for exceptional conditions, as determined by the server.
+ *
+ * Return value: (transfer full): an updated #GDataDocumentsEntry, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.8.0
+ */
+GDataDocumentsEntry *
+gdata_documents_service_add_entry_to_folder (GDataDocumentsService *self, GDataDocumentsEntry *entry, GDataDocumentsFolder *folder,
+ GCancellable *cancellable, GError **error)
+{
+ GDataDocumentsEntry *new_entry;
+ GDataDocumentsEntry *local_entry;
+ GDataOperationType operation_type;
+ GType entry_type;
+ const gchar *content_type;
+ const gchar *etag;
+ const gchar *title;
+ const gchar *uri_prefix = "https://www.googleapis.com/drive/v2/files";
+ gchar *upload_data;
+ gchar *uri;
+ SoupMessage *message;
+ guint status;
+ GList *l;
+
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_SERVICE (self), NULL);
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_ENTRY (entry), NULL);
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_FOLDER (folder), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (self)),
+ get_documents_authorization_domain ()) == FALSE) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED,
+ _("You must be authenticated to insert or move documents and folders."));
+ return NULL;
+ }
+
+ if (gdata_entry_is_inserted (GDATA_ENTRY (entry)) == TRUE) {
+ const gchar *id;
+
+ id = gdata_entry_get_id (GDATA_ENTRY (entry));
+ uri = g_strconcat (uri_prefix, "/", id, "/copy", NULL);
+ operation_type = GDATA_OPERATION_UPDATE;
+ } else {
+ uri = g_strdup (uri_prefix);
+ operation_type = GDATA_OPERATION_INSERTION;
+ }
+
+ entry_type = G_OBJECT_TYPE (entry);
+ content_type = gdata_documents_utils_get_content_type (entry);
+ etag = gdata_entry_get_etag (GDATA_ENTRY (entry));
+ title = gdata_entry_get_title (GDATA_ENTRY (entry));
+ local_entry = g_object_new (entry_type, "etag", etag, "title", title, NULL);
+ gdata_documents_utils_add_content_type (local_entry, content_type);
+ add_folder_link_to_entry (local_entry, folder);
+
+ for (l = gdata_documents_entry_get_document_properties (entry); l != NULL; l = l->next) {
+ GDataDocumentsProperty *old_prop;
+ g_autoptr(GDataDocumentsProperty) new_prop = NULL;
+
+ old_prop = GDATA_DOCUMENTS_PROPERTY (l->data);
+
+ new_prop = gdata_documents_property_new (gdata_documents_property_get_key (old_prop));
+ gdata_documents_property_set_value (new_prop, gdata_documents_property_get_value (old_prop));
+ gdata_documents_property_set_visibility (new_prop, gdata_documents_property_get_visibility (old_prop));
+ gdata_documents_entry_add_documents_property (local_entry, new_prop);
+ }
+
+ message = _gdata_service_build_message (GDATA_SERVICE (self), get_documents_authorization_domain (), SOUP_METHOD_POST, uri, NULL, FALSE);
+ g_free (uri);
+
+ /* Append the data */
+ upload_data = gdata_parsable_get_json (GDATA_PARSABLE (local_entry));
+ soup_message_set_request (message, "application/json", SOUP_MEMORY_TAKE, upload_data, strlen (upload_data));
+ g_object_unref (local_entry);
+
+ /* Send the message */
+ status = _gdata_service_send_message (GDATA_SERVICE (self), message, cancellable, error);
+
+ if (status == SOUP_STATUS_NONE || status == SOUP_STATUS_CANCELLED) {
+ /* Redirect error or cancelled */
+ g_object_unref (message);
+ return NULL;
+ } else if (status != SOUP_STATUS_OK) {
+ /* Error */
+ GDataServiceClass *klass = GDATA_SERVICE_GET_CLASS (self);
+ g_assert (klass->parse_error_response != NULL);
+ klass->parse_error_response (GDATA_SERVICE (self), operation_type, status, message->reason_phrase, message->response_body->data,
+ message->response_body->length, error);
+ g_object_unref (message);
+ return NULL;
+ }
+
+ /* Parse the JSON; and update the entry */
+ g_assert (message->response_body->data != NULL);
+ new_entry = GDATA_DOCUMENTS_ENTRY (gdata_parsable_new_from_json (entry_type, message->response_body->data, message->response_body->length,
+ error));
+ g_object_unref (message);
+
+ return new_entry;
+}
+
+typedef struct {
+ GDataDocumentsEntry *entry;
+ GDataDocumentsFolder *folder;
+} AddEntryToFolderData;
+
+static void
+add_entry_to_folder_data_free (AddEntryToFolderData *data)
+{
+ g_object_unref (data->entry);
+ g_object_unref (data->folder);
+ g_slice_free (AddEntryToFolderData, data);
+}
+
+static void
+add_entry_to_folder_thread (GTask *task, gpointer source_object, gpointer task_data, GCancellable *cancellable)
+{
+ GDataDocumentsService *service = GDATA_DOCUMENTS_SERVICE (source_object);
+ g_autoptr(GDataDocumentsEntry) updated_entry = NULL;
+ AddEntryToFolderData *data = task_data;
+ g_autoptr(GError) error = NULL;
+
+ /* Add the entry to the folder and return */
+ updated_entry = gdata_documents_service_add_entry_to_folder (service, data->entry, data->folder, cancellable, &error);
+ if (error != NULL)
+ g_task_return_error (task, g_steal_pointer (&error));
+ else
+ g_task_return_pointer (task, g_steal_pointer (&updated_entry), (GDestroyNotify) g_object_unref);
+}
+
+/**
+ * gdata_documents_service_add_entry_to_folder_async:
+ * @self: a #GDataDocumentsService
+ * @entry: the #GDataDocumentsEntry to add to @folder
+ * @folder: the #GDataDocumentsFolder to add @entry to
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when the operation is finished, or %NULL
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Add the given @entry to the specified @folder. @self, @entry and @folder are all reffed when this function is called, so can safely be unreffed
+ * after this function returns.
+ *
+ * For more details, see gdata_documents_service_add_entry_to_folder(), which is the synchronous version of this function.
+ *
+ * When the operation is finished, @callback will be called. You can then call gdata_documents_service_add_entry_to_folder_finish() to get the results
+ * of the operation.
+ *
+ * Since: 0.8.0
+ */
+void
+gdata_documents_service_add_entry_to_folder_async (GDataDocumentsService *self, GDataDocumentsEntry *entry, GDataDocumentsFolder *folder,
+ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_autoptr(GTask) task = NULL;
+ AddEntryToFolderData *data;
+
+ g_return_if_fail (GDATA_IS_DOCUMENTS_SERVICE (self));
+ g_return_if_fail (GDATA_IS_DOCUMENTS_ENTRY (entry));
+ g_return_if_fail (GDATA_IS_DOCUMENTS_FOLDER (folder));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+
+ data = g_slice_new (AddEntryToFolderData);
+ data->entry = g_object_ref (entry);
+ data->folder = g_object_ref (folder);
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_documents_service_add_entry_to_folder_async);
+ g_task_set_task_data (task, g_steal_pointer (&data), (GDestroyNotify) add_entry_to_folder_data_free);
+ g_task_run_in_thread (task, add_entry_to_folder_thread);
+}
+
+/**
+ * gdata_documents_service_add_entry_to_folder_finish:
+ * @self: a #GDataDocumentsService
+ * @async_result: a #GAsyncResult
+ * @error: a #GError, or %NULL
+ *
+ * Finish an asynchronous operation to add a #GDataDocumentsEntry to a folder started with gdata_documents_service_add_entry_to_folder_async().
+ *
+ * Return value: (transfer full): an updated #GDataDocumentsEntry, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.8.0
+ */
+GDataDocumentsEntry *
+gdata_documents_service_add_entry_to_folder_finish (GDataDocumentsService *self, GAsyncResult *async_result, GError **error)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_SERVICE (self), NULL);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (async_result), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+ g_return_val_if_fail (g_task_is_valid (async_result, self), NULL);
+ g_return_val_if_fail (g_async_result_is_tagged (async_result, gdata_documents_service_add_entry_to_folder_async), NULL);
+
+ return g_task_propagate_pointer (G_TASK (async_result), error);
+}
+
+/**
+ * gdata_documents_service_remove_entry_from_folder:
+ * @self: a #GDataDocumentsService
+ * @entry: the #GDataDocumentsEntry to remove
+ * @folder: the #GDataDocumentsFolder from which we should remove @entry
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Remove the given @entry from @folder, and return an updated #GDataDocumentsEntry for @entry. @entry will remain a member of any other folders it's
+ * currently in. Note that @entry can be either a #GDataDocumentsDocument or a #GDataDocumentsFolder.
+ *
+ * Errors from #GDataServiceError can be returned for exceptional conditions, as determined by the server.
+ *
+ * Return value: (transfer full): an updated #GDataDocumentsEntry, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.8.0
+ */
+GDataDocumentsEntry *
+gdata_documents_service_remove_entry_from_folder (GDataDocumentsService *self, GDataDocumentsEntry *entry, GDataDocumentsFolder *folder,
+ GCancellable *cancellable, GError **error)
+{
+ const gchar *folder_id;
+ GList *i;
+ GList *parent_folders_list;
+ GDataLink *folder_link = NULL, *file_link = NULL;
+ GDataParsableClass *klass;
+ GDataAuthorizationDomain *domain;
+ gchar *fixed_uri, *modified_uri;
+ guint status;
+ gboolean req_status = TRUE;
+ SoupMessage *message;
+
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_SERVICE (self), NULL);
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_ENTRY (entry), NULL);
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_FOLDER (folder), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (self)),
+ get_documents_authorization_domain ()) == FALSE) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED,
+ _("You must be authenticated to move documents and folders."));
+ return NULL;
+ }
+
+ domain = gdata_documents_service_get_primary_authorization_domain();
+
+ folder_id = gdata_entry_get_id (GDATA_ENTRY (folder));
+ g_assert (folder_id != NULL);
+
+ parent_folders_list = gdata_entry_look_up_links (GDATA_ENTRY (entry), GDATA_LINK_PARENT);
+ for (i = parent_folders_list; i != NULL; i = i->next) {
+ GDataLink *_link = GDATA_LINK (i->data);
+ const gchar *id;
+
+ id = gdata_documents_utils_get_id_from_link (_link);
+ if (g_strcmp0 (folder_id, id) == 0) {
+ folder_link = _link;
+ break;
+ }
+ }
+
+ g_list_free (parent_folders_list);
+
+ if (folder_link == NULL) {
+ g_set_error_literal (error,
+ GDATA_SERVICE_ERROR,
+ GDATA_SERVICE_ERROR_NOT_FOUND,
+ _("Parent folder not found"));
+ return NULL;
+ }
+
+ klass = GDATA_PARSABLE_GET_CLASS (entry);
+
+ g_assert (klass->get_content_type != NULL);
+ if (g_strcmp0 (klass->get_content_type (), "application/json") == 0) {
+ file_link = gdata_entry_look_up_link (GDATA_ENTRY (entry), GDATA_LINK_SELF);
+ } else {
+ file_link = gdata_entry_look_up_link (GDATA_ENTRY (entry), GDATA_LINK_EDIT);
+ }
+ g_debug ("Link = %s", gdata_link_get_uri(file_link));
+ g_assert (file_link != NULL);
+
+ fixed_uri = _gdata_service_fix_uri_scheme (gdata_link_get_uri (file_link));
+ modified_uri = g_strconcat (fixed_uri, "/parents/", folder_id, NULL);
+
+ message = _gdata_service_build_message (GDATA_SERVICE (self),
+ domain,
+ SOUP_METHOD_DELETE,
+ modified_uri,
+ gdata_entry_get_etag (GDATA_ENTRY (entry)),
+ TRUE);
+ g_free (fixed_uri);
+ g_free (modified_uri);
+
+ /* Send the message */
+ status = _gdata_service_send_message (GDATA_SERVICE (self), message, cancellable, error);
+
+ if (status == SOUP_STATUS_NONE || status == SOUP_STATUS_CANCELLED) {
+ /* Redirect error or cancelled */
+ g_object_unref (message);
+ return NULL;
+ } else if (status != SOUP_STATUS_OK && status != SOUP_STATUS_NO_CONTENT) {
+ /* Error */
+ GDataServiceClass *service_klass = GDATA_SERVICE_GET_CLASS (self);
+ g_assert (service_klass->parse_error_response != NULL);
+ service_klass->parse_error_response (GDATA_SERVICE (self),
+ GDATA_OPERATION_DELETION,
+ status,
+ message->reason_phrase,
+ message->response_body->data,
+ message->response_body->length,
+ error);
+ req_status = FALSE;
+ }
+
+ g_object_unref (message);
+
+ if (req_status) {
+ /* Remove parent link from File's Data Entry */
+ gdata_entry_remove_link (GDATA_ENTRY (entry), folder_link);
+ g_object_ref (entry);
+ return entry;
+ } else {
+ return NULL;
+ }
+}
+
+typedef struct {
+ GDataDocumentsEntry *entry;
+ GDataDocumentsFolder *folder;
+} RemoveEntryFromFolderData;
+
+static void
+remove_entry_from_folder_data_free (RemoveEntryFromFolderData *data)
+{
+ g_object_unref (data->entry);
+ g_object_unref (data->folder);
+ g_slice_free (RemoveEntryFromFolderData, data);
+}
+
+static void
+remove_entry_from_folder_thread (GTask *task, gpointer source_object, gpointer task_data, GCancellable *cancellable)
+{
+ GDataDocumentsService *service = GDATA_DOCUMENTS_SERVICE (source_object);
+ g_autoptr(GDataDocumentsEntry) updated_entry = NULL;
+ RemoveEntryFromFolderData *data = task_data;
+ g_autoptr(GError) error = NULL;
+
+ /* Remove the entry from the folder and return */
+ updated_entry = gdata_documents_service_remove_entry_from_folder (service, data->entry, data->folder, cancellable, &error);
+ if (error != NULL)
+ g_task_return_error (task, g_steal_pointer (&error));
+ else
+ g_task_return_pointer (task, g_steal_pointer (&updated_entry), g_object_unref);
+}
+
+/**
+ * gdata_documents_service_remove_entry_from_folder_async:
+ * @self: a #GDataDocumentsService
+ * @entry: the #GDataDocumentsEntry to remove from @folder
+ * @folder: the #GDataDocumentsFolder to remove @entry from
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when the operation is finished, or %NULL
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Remove the given @entry from the specified @folder. @self, @entry and @folder are all reffed when this function is called, so can safely be unreffed
+ * after this function returns.
+ *
+ * For more details, see gdata_documents_service_remove_entry_from_folder(), which is the synchronous version of this function.
+ *
+ * When the operation is finished, @callback will be called. You can then call gdata_documents_service_remove_entry_from_folder_finish() to get the
+ * results of the operation.
+ *
+ * Since: 0.8.0
+ */
+void
+gdata_documents_service_remove_entry_from_folder_async (GDataDocumentsService *self, GDataDocumentsEntry *entry, GDataDocumentsFolder *folder,
+ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_autoptr(GTask) task = NULL;
+ RemoveEntryFromFolderData *data;
+
+ g_return_if_fail (GDATA_IS_DOCUMENTS_SERVICE (self));
+ g_return_if_fail (GDATA_IS_DOCUMENTS_ENTRY (entry));
+ g_return_if_fail (GDATA_IS_DOCUMENTS_FOLDER (folder));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+
+ data = g_slice_new (RemoveEntryFromFolderData);
+ data->entry = g_object_ref (entry);
+ data->folder = g_object_ref (folder);
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_documents_service_remove_entry_from_folder_async);
+ g_task_set_task_data (task, g_steal_pointer (&data), (GDestroyNotify) remove_entry_from_folder_data_free);
+ g_task_run_in_thread (task, remove_entry_from_folder_thread);
+}
+
+/**
+ * gdata_documents_service_remove_entry_from_folder_finish:
+ * @self: a #GDataDocumentsService
+ * @async_result: a #GAsyncResult
+ * @error: a #GError, or %NULL
+ *
+ * Finish an asynchronous operation to remove a #GDataDocumentsEntry from a folder started with
+ * gdata_documents_service_remove_entry_from_folder_async().
+ *
+ * Return value: (transfer full): an updated #GDataDocumentsEntry, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.8.0
+ */
+GDataDocumentsEntry *
+gdata_documents_service_remove_entry_from_folder_finish (GDataDocumentsService *self, GAsyncResult *async_result, GError **error)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_SERVICE (self), NULL);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (async_result), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+ g_return_val_if_fail (g_task_is_valid (async_result, self), NULL);
+ g_return_val_if_fail (g_async_result_is_tagged (async_result, gdata_documents_service_remove_entry_from_folder_async), NULL);
+
+ return g_task_propagate_pointer (G_TASK (async_result), error);
+}
+
+/* NOTE: query may be NULL. */
+static gchar *
+_get_upload_uri_for_query_and_folder (GDataDocumentsUploadQuery *query, GDataDocumentsFolder *folder)
+{
+ if (query == NULL) {
+ query = gdata_documents_upload_query_new ();
+ }
+
+ if (folder != NULL) {
+ gdata_documents_upload_query_set_folder (query, folder);
+ }
+
+ return gdata_documents_upload_query_build_uri (query);
+}
+
+/**
+ * gdata_documents_service_get_upload_uri:
+ * @folder: (allow-none): the #GDataDocumentsFolder into which to upload the document, or %NULL
+ *
+ * Gets the upload URI for documents for the service.
+ *
+ * If @folder is %NULL, the URI will be the one to upload documents to the "root" folder.
+ *
+ * Return value: the URI permitting the upload of documents to @folder, or %NULL; free with g_free()
+ *
+ * Since: 0.5.0
+ */
+gchar *
+gdata_documents_service_get_upload_uri (GDataDocumentsFolder *folder)
+{
+ g_return_val_if_fail (folder == NULL || GDATA_IS_DOCUMENTS_FOLDER (folder), NULL);
+
+ /* Upload URI: https://developers.google.com/drive/web/manage-uploads */
+ return g_strdup ("https://www.googleapis.com/upload/drive/v2/files");
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Thibault Saunier 2009 <saunierthibault@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_DOCUMENTS_SERVICE_H
+#define GDATA_DOCUMENTS_SERVICE_H
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gio/gio.h>
+#include <gdata/gdata-service.h>
+#include <gdata/gdata-upload-stream.h>
+#include <gdata/services/documents/gdata-documents-query.h>
+#include <gdata/services/documents/gdata-documents-feed.h>
+#include <gdata/services/documents/gdata-documents-metadata.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDataDocumentsServiceError:
+ * @GDATA_DOCUMENTS_SERVICE_ERROR_INVALID_CONTENT_TYPE: the content type of a provided file was invalid
+ *
+ * Error codes for #GDataDocumentsService operations.
+ *
+ * Since: 0.4.0
+ */
+typedef enum {
+ GDATA_DOCUMENTS_SERVICE_ERROR_INVALID_CONTENT_TYPE
+} GDataDocumentsServiceError;
+
+#define GDATA_TYPE_DOCUMENTS_SERVICE (gdata_documents_service_get_type ())
+#define GDATA_DOCUMENTS_SERVICE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_DOCUMENTS_SERVICE, GDataDocumentsService))
+#define GDATA_DOCUMENTS_SERVICE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_DOCUMENTS_SERVICE, GDataDocumentsServiceClass))
+#define GDATA_IS_DOCUMENTS_SERVICE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_DOCUMENTS_SERVICE))
+#define GDATA_IS_DOCUMENTS_SERVICE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_DOCUMENTS_SERVICE))
+#define GDATA_DOCUMENTS_SERVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_DOCUMENTS_SERVICE, GDataDocumentsServiceClass))
+
+#define GDATA_DOCUMENTS_SERVICE_ERROR gdata_documents_service_error_quark ()
+
+typedef struct _GDataDocumentsServicePrivate GDataDocumentsServicePrivate;
+
+/**
+ * GDataDocumentsService:
+ *
+ * All the fields in the #GDataDocumentsService structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ GDataService parent;
+ GDataDocumentsServicePrivate *priv;
+} GDataDocumentsService;
+
+/**
+ * GDataDocumentsServiceClass:
+ *
+ * All the fields in the #GDataDocumentsServiceClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataServiceClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+ void (*_g_reserved2) (void);
+ void (*_g_reserved3) (void);
+ void (*_g_reserved4) (void);
+ void (*_g_reserved5) (void);
+} GDataDocumentsServiceClass;
+
+GType gdata_documents_service_get_type (void) G_GNUC_CONST;
+GQuark gdata_documents_service_error_quark (void) G_GNUC_CONST;
+
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataDocumentsService, g_object_unref)
+
+GDataDocumentsService *gdata_documents_service_new (GDataAuthorizer *authorizer) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+GDataAuthorizationDomain *gdata_documents_service_get_primary_authorization_domain (void) G_GNUC_CONST;
+GDataAuthorizationDomain *gdata_documents_service_get_spreadsheet_authorization_domain (void) G_GNUC_CONST;
+
+GDataDocumentsMetadata *gdata_documents_service_get_metadata (GDataDocumentsService *self, GCancellable *cancellable,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_documents_service_get_metadata_async (GDataDocumentsService *self, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data);
+GDataDocumentsMetadata *gdata_documents_service_get_metadata_finish (GDataDocumentsService *self, GAsyncResult *async_result,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+GDataDocumentsFeed *gdata_documents_service_query_documents (GDataDocumentsService *self, GDataDocumentsQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_documents_service_query_documents_async (GDataDocumentsService *self, GDataDocumentsQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
+ GAsyncReadyCallback callback, gpointer user_data);
+
+#include <gdata/services/documents/gdata-documents-document.h>
+#include <gdata/services/documents/gdata-documents-folder.h>
+#include <gdata/services/documents/gdata-documents-upload-query.h>
+
+GDataUploadStream *gdata_documents_service_upload_document (GDataDocumentsService *self, GDataDocumentsDocument *document, const gchar *slug,
+ const gchar *content_type, GDataDocumentsFolder *folder,
+ GCancellable *cancellable, GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+GDataUploadStream *gdata_documents_service_upload_document_resumable (GDataDocumentsService *self, GDataDocumentsDocument *document, const gchar *slug,
+ const gchar *content_type, goffset content_length,
+ GDataDocumentsUploadQuery *query,
+ GCancellable *cancellable, GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+GDataUploadStream *gdata_documents_service_update_document (GDataDocumentsService *self, GDataDocumentsDocument *document, const gchar *slug,
+ const gchar *content_type, GCancellable *cancellable,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+GDataUploadStream *gdata_documents_service_update_document_resumable (GDataDocumentsService *self, GDataDocumentsDocument *document, const gchar *slug,
+ const gchar *content_type, goffset content_length, GCancellable *cancellable,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+GDataDocumentsDocument *gdata_documents_service_finish_upload (GDataDocumentsService *self, GDataUploadStream *upload_stream,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+GDataDocumentsDocument *gdata_documents_service_copy_document (GDataDocumentsService *self, GDataDocumentsDocument *document,
+ GCancellable *cancellable, GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_documents_service_copy_document_async (GDataDocumentsService *self, GDataDocumentsDocument *document, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data);
+GDataDocumentsDocument *gdata_documents_service_copy_document_finish (GDataDocumentsService *self, GAsyncResult *async_result,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+GDataDocumentsEntry *gdata_documents_service_add_entry_to_folder (GDataDocumentsService *self, GDataDocumentsEntry *entry,
+ GDataDocumentsFolder *folder, GCancellable *cancellable,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_documents_service_add_entry_to_folder_async (GDataDocumentsService *self, GDataDocumentsEntry *entry, GDataDocumentsFolder *folder,
+ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
+GDataDocumentsEntry *gdata_documents_service_add_entry_to_folder_finish (GDataDocumentsService *self, GAsyncResult *async_result,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+GDataDocumentsEntry *gdata_documents_service_remove_entry_from_folder (GDataDocumentsService *self, GDataDocumentsEntry *entry,
+ GDataDocumentsFolder *folder, GCancellable *cancellable,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_documents_service_remove_entry_from_folder_async (GDataDocumentsService *self, GDataDocumentsEntry *entry, GDataDocumentsFolder *folder,
+ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
+GDataDocumentsEntry *gdata_documents_service_remove_entry_from_folder_finish (GDataDocumentsService *self, GAsyncResult *async_result,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+gchar *gdata_documents_service_get_upload_uri (GDataDocumentsFolder *folder) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+G_END_DECLS
+#endif /* !GDATA_DOCUMENTS_SERVICE_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Thibault Saunier 2009 <saunierthibault@gmail.com>
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ * Copyright (C) Red Hat, Inc. 2016
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-documents-spreadsheet
+ * @short_description: GData Documents spreadsheet object
+ * @stability: Stable
+ * @include: gdata/services/documents/gdata-documents-spreadsheet.h
+ *
+ * #GDataDocumentsSpreadsheet is a subclass of #GDataDocumentsDocument to represent a spreadsheet from Google Documents.
+ *
+ * For more details of Google Drive's GData API, see the
+ * <ulink type="http" url="https://developers.google.com/drive/v2/web/about-sdk">online documentation</ulink>.
+ *
+ * <example>
+ * <title>Downloading a Specific Sheet of a Spreadsheet</title>
+ * <programlisting>
+ * GDataDocumentsService *service;
+ * GDataDocumentsSpreadsheet *spreadsheet;
+ * GFile *destination_file;
+ * guint gid;
+ * gchar *download_uri;
+ * GDataDownloadStream *download_stream;
+ * GFileOutputStream *output_stream;
+ * GError *error = NULL;
+ *
+ * /<!-- -->* Create a service and retrieve the spreadsheet and sheet index (GID) to download and the file to save the download in *<!-- -->/
+ * service = create_youtube_service ();
+ * spreadsheet = get_document_to_download (service);
+ * destination_file = query_user_for_destination_file (spreadsheet);
+ * gid = query_user_for_gid (spreadsheet);
+ *
+ * /<!-- -->* Create the download stream *<!-- -->/
+ * download_uri = gdata_documents_spreadsheet_get_download_uri (spreadsheet, GDATA_DOCUMENTS_SPREADSHEET_CSV, gid);
+ * download_stream = GDATA_DOWNLOAD_STREAM (gdata_download_stream_new (service, gdata_documents_service_get_spreadsheet_authorization_domain (),
+ * download_uri, NULL));
+ * g_free (download_uri);
+ *
+ * g_object_unref (spreadsheet);
+ * g_object_unref (service);
+ *
+ * /<!-- -->* Create the file output stream *<!-- -->/
+ * output_stream = g_file_replace (destination_file, NULL, FALSE, G_FILE_CREATE_REPLACE_DESTINATION, NULL, &error);
+ *
+ * g_object_unref (destination_file);
+ *
+ * if (error != NULL) {
+ * g_error ("Error creating destination file: %s", error->message);
+ * g_error_free (error);
+ * g_object_unref (download_stream);
+ * return;
+ * }
+ *
+ * /<!-- -->* Download the document. This should almost always be done asynchronously. *<!-- -->/
+ * g_output_stream_splice (G_OUTPUT_STREAM (output_stream), G_INPUT_STREAM (download_stream),
+ * G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, NULL, &error);
+ *
+ * g_object_unref (output_stream);
+ * g_object_unref (download_stream);
+ *
+ * if (error != NULL) {
+ * g_error ("Error downloading spreadsheet: %s", error->message);
+ * g_error_free (error);
+ * return;
+ * }
+ * </programlisting>
+ * </example>
+ *
+ * Since: 0.4.0
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <libxml/parser.h>
+#include <string.h>
+
+#include "gdata-documents-spreadsheet.h"
+#include "gdata-documents-utils.h"
+#include "gdata-parser.h"
+#include "gdata-private.h"
+
+static void gdata_documents_spreadsheet_constructed (GObject *object);
+
+G_DEFINE_TYPE (GDataDocumentsSpreadsheet, gdata_documents_spreadsheet, GDATA_TYPE_DOCUMENTS_DOCUMENT)
+
+static void
+gdata_documents_spreadsheet_class_init (GDataDocumentsSpreadsheetClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
+
+ gobject_class->constructed = gdata_documents_spreadsheet_constructed;
+ entry_class->kind_term = "http://schemas.google.com/docs/2007#spreadsheet";
+}
+
+static void
+gdata_documents_spreadsheet_init (GDataDocumentsSpreadsheet *self)
+{
+ /* Why am I writing it? */
+}
+
+static void
+gdata_documents_spreadsheet_constructed (GObject *object)
+{
+ G_OBJECT_CLASS (gdata_documents_spreadsheet_parent_class)->constructed (object);
+
+ if (!_gdata_parsable_is_constructed_from_xml (GDATA_PARSABLE (object)))
+ gdata_documents_utils_add_content_type (GDATA_DOCUMENTS_ENTRY (object), "application/vnd.google-apps.spreadsheet");
+}
+
+/**
+ * gdata_documents_spreadsheet_new:
+ * @id: (allow-none): the entry's ID (not the document ID of the spreadsheet), or %NULL
+ *
+ * Creates a new #GDataDocumentsSpreadsheet with the given entry ID (#GDataEntry:id).
+ *
+ * Return value: (transfer full): a new #GDataDocumentsSpreadsheet, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.4.0
+ */
+GDataDocumentsSpreadsheet *
+gdata_documents_spreadsheet_new (const gchar *id)
+{
+ return GDATA_DOCUMENTS_SPREADSHEET (g_object_new (GDATA_TYPE_DOCUMENTS_SPREADSHEET, "id", id, NULL));
+}
+
+/**
+ * gdata_documents_spreadsheet_get_download_uri:
+ * @self: a #GDataDocumentsSpreadsheet
+ * @export_format: the format in which the spreadsheet should be exported when downloaded
+ * @gid: the <code class="literal">0</code>-based sheet ID to download, or <code class="literal">-1</code>
+ *
+ * Builds and returns the download URI for the given #GDataDocumentsSpreadsheet in the desired format. Note that directly downloading
+ * the document using this URI isn't possible, as authentication is required. You should instead use gdata_download_stream_new() with
+ * the URI, and use the resulting #GInputStream.
+ *
+ * When requesting a <code class="literal">"csv"</code>, <code class="literal">"tsv"</code>, <code class="literal">"pdf"</code> or
+ * <code class="literal">"html"</code> file you may specify an additional parameter called @gid which indicates which grid, or sheet, you wish to get
+ * (the index is <code class="literal">0</code>-based, so GID <code class="literal">1</code> actually refers to the second sheet on a given
+ * spreadsheet).
+ *
+ * Return value: the download URI; free with g_free()
+ *
+ * Since: 0.5.0
+ */
+gchar *
+gdata_documents_spreadsheet_get_download_uri (GDataDocumentsSpreadsheet *self, const gchar *export_format, gint gid)
+{
+ const gchar *resource_id, *document_id;
+
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_SPREADSHEET (self), NULL);
+ g_return_val_if_fail (export_format != NULL && *export_format != '\0', NULL);
+ g_return_val_if_fail (gid >= -1, NULL);
+
+ /* Extract the document ID from the resource ID. */
+ resource_id = gdata_documents_entry_get_resource_id (GDATA_DOCUMENTS_ENTRY (self));
+ g_assert (resource_id != NULL);
+
+ document_id = g_utf8_strchr (resource_id, -1, ':');
+ g_assert (document_id != NULL);
+ document_id++; /* skip over the colon */
+
+ if (gid != -1) {
+ return _gdata_service_build_uri ("http://spreadsheets.google.com/feeds/download/spreadsheets/Export?key=%s&exportFormat=%s&gid=%d",
+ document_id, export_format, gid);
+ } else {
+ return _gdata_service_build_uri ("http://spreadsheets.google.com/feeds/download/spreadsheets/Export?key=%s&exportFormat=%s",
+ document_id, export_format);
+ }
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Thibault Saunier 2009 <saunierthibault@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_DOCUMENTS_SPREADSHEET_H
+#define GDATA_DOCUMENTS_SPREADSHEET_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/services/documents/gdata-documents-document.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_DOCUMENTS_SPREADSHEET_CSV:
+ *
+ * The export format for Comma-Separated Values (CSV) format.
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#valid_formats_for_spreadsheets">
+ * GData protocol specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_DOCUMENTS_SPREADSHEET_CSV "csv"
+
+/**
+ * GDATA_DOCUMENTS_SPREADSHEET_ODS:
+ *
+ * The export format for OpenDocument Spreadsheet (ODS) format.
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#valid_formats_for_spreadsheets">
+ * GData protocol specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_DOCUMENTS_SPREADSHEET_ODS "ods"
+
+/**
+ * GDATA_DOCUMENTS_SPREADSHEET_PDF:
+ *
+ * The export format for Portable Document Format (PDF).
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#valid_formats_for_spreadsheets">
+ * GData protocol specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_DOCUMENTS_SPREADSHEET_PDF "pdf"
+
+/**
+ * GDATA_DOCUMENTS_SPREADSHEET_TSV:
+ *
+ * The export format for Tab-Separated Values (TSV) format.
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#valid_formats_for_spreadsheets">
+ * GData protocol specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_DOCUMENTS_SPREADSHEET_TSV "tsv"
+
+/**
+ * GDATA_DOCUMENTS_SPREADSHEET_XLS:
+ *
+ * The export format for Microsoft Excel spreadsheet (XLS) format.
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#valid_formats_for_spreadsheets">
+ * GData protocol specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_DOCUMENTS_SPREADSHEET_XLS "xls"
+
+/**
+ * GDATA_DOCUMENTS_SPREADSHEET_HTML:
+ *
+ * The export format for HyperText Markup Language (HTML) format.
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#valid_formats_for_spreadsheets">
+ * GData protocol specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_DOCUMENTS_SPREADSHEET_HTML "html"
+
+#define GDATA_TYPE_DOCUMENTS_SPREADSHEET (gdata_documents_spreadsheet_get_type ())
+#define GDATA_DOCUMENTS_SPREADSHEET(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_DOCUMENTS_SPREADSHEET, \
+ GDataDocumentsSpreadsheet))
+#define GDATA_DOCUMENTS_SPREADSHEET_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_DOCUMENTS_SPREADSHEET, \
+ GDataDocumentsSpreadsheetClass))
+#define GDATA_IS_DOCUMENTS_SPREADSHEET(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_DOCUMENTS_SPREADSHEET))
+#define GDATA_IS_DOCUMENTS_SPREADSHEET_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_DOCUMENTS_SPREADSHEET))
+#define GDATA_DOCUMENTS_SPREADSHEET_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_DOCUMENTS_SPREADSHEET, \
+ GDataDocumentsSpreadsheetClass))
+
+typedef struct _GDataDocumentsSpreadsheetPrivate GDataDocumentsSpreadsheetPrivate;
+
+/**
+ * GDataDocumentsSpreadsheet:
+ *
+ * All the fields in the #GDataDocumentsSpreadsheet structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ GDataDocumentsDocument parent;
+ GDataDocumentsSpreadsheetPrivate *priv;
+} GDataDocumentsSpreadsheet;
+
+/**
+ * GDataDocumentsSpreadsheetClass:
+ *
+ * All the fields in the #GDataDocumentsSpreadsheetClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataDocumentsDocumentClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataDocumentsSpreadsheetClass;
+
+GType gdata_documents_spreadsheet_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataDocumentsSpreadsheet, g_object_unref)
+
+GDataDocumentsSpreadsheet *gdata_documents_spreadsheet_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+gchar *gdata_documents_spreadsheet_get_download_uri (GDataDocumentsSpreadsheet *self, const gchar *export_format,
+ gint gid) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+G_END_DECLS
+
+#endif /* !GDATA_DOCUMENTS_SPREADSHEET_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Thibault Saunier 2009 <saunierthibault@gmail.com>
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ * Copyright (C) Red Hat, Inc. 2016
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-documents-text
+ * @short_description: GData Documents text object
+ * @stability: Stable
+ * @include: gdata/services/documents/gdata-documents-text.h
+ *
+ * #GDataDocumentsText is a subclass of #GDataDocumentsDocument to represent a text document from Google Documents.
+ *
+ * For more details of Google Drive's GData API, see the
+ * <ulink type="http" url="https://developers.google.com/drive/v2/web/about-sdk">online documentation</ulink>.
+ *
+ * Since: 0.4.0
+ */
+
+#include <config.h>
+#include <glib.h>
+
+#include "gdata-documents-text.h"
+#include "gdata-documents-utils.h"
+#include "gdata-parser.h"
+#include "gdata-private.h"
+
+static void gdata_documents_text_constructed (GObject *object);
+
+G_DEFINE_TYPE (GDataDocumentsText, gdata_documents_text, GDATA_TYPE_DOCUMENTS_DOCUMENT)
+
+static void
+gdata_documents_text_class_init (GDataDocumentsTextClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
+
+ gobject_class->constructed = gdata_documents_text_constructed;
+ entry_class->kind_term = "http://schemas.google.com/docs/2007#document";
+}
+
+static void
+gdata_documents_text_init (GDataDocumentsText *self)
+{
+ /* Why am I writing it? */
+}
+
+static void
+gdata_documents_text_constructed (GObject *object)
+{
+ G_OBJECT_CLASS (gdata_documents_text_parent_class)->constructed (object);
+
+ if (!_gdata_parsable_is_constructed_from_xml (GDATA_PARSABLE (object)))
+ gdata_documents_utils_add_content_type (GDATA_DOCUMENTS_ENTRY (object), "application/vnd.google-apps.document");
+}
+
+/**
+ * gdata_documents_text_new:
+ * @id: (allow-none): the entry's ID (not the document ID of the text document), or %NULL
+ *
+ * Creates a new #GDataDocumentsText with the given entry ID (#GDataEntry:id).
+ *
+ * Return value: (transfer full): a new #GDataDocumentsText, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.4.0
+ */
+GDataDocumentsText *
+gdata_documents_text_new (const gchar *id)
+{
+ return GDATA_DOCUMENTS_TEXT (g_object_new (GDATA_TYPE_DOCUMENTS_TEXT, "id", id, NULL));
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Thibault Saunier 2009 <saunierthibault@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_DOCUMENTS_TEXT_H
+#define GDATA_DOCUMENTS_TEXT_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/services/documents/gdata-documents-document.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_DOCUMENTS_TEXT_DOC:
+ *
+ * The export format for Microsoft Word (DOC) format.
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#valid_download_formats_for_text_documents">
+ * GData protocol specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_DOCUMENTS_TEXT_DOC "doc"
+
+/**
+ * GDATA_DOCUMENTS_TEXT_HTML:
+ *
+ * The export format for HyperText Markup Language (HTML) format.
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#valid_download_formats_for_text_documents">
+ * GData protocol specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_DOCUMENTS_TEXT_HTML "html"
+
+/**
+ * GDATA_DOCUMENTS_TEXT_JPEG:
+ *
+ * The export format for JPEG image format.
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#valid_download_formats_for_text_documents">
+ * GData protocol specification</ulink>.
+ *
+ * Since: 0.13.0
+ */
+#define GDATA_DOCUMENTS_TEXT_JPEG "jpeg"
+
+/**
+ * GDATA_DOCUMENTS_TEXT_ODT:
+ *
+ * The export format for OpenDocument Text (ODT) format.
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#valid_download_formats_for_text_documents">
+ * GData protocol specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_DOCUMENTS_TEXT_ODT "odt"
+
+/**
+ * GDATA_DOCUMENTS_TEXT_PDF:
+ *
+ * The export format for Portable Document Format (PDF).
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#valid_download_formats_for_text_documents">
+ * GData protocol specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_DOCUMENTS_TEXT_PDF "pdf"
+
+/**
+ * GDATA_DOCUMENTS_TEXT_PNG:
+ *
+ * The export format for Portable Network Graphics (PNG) image format.
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#valid_download_formats_for_text_documents">
+ * GData protocol specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_DOCUMENTS_TEXT_PNG "png"
+
+/**
+ * GDATA_DOCUMENTS_TEXT_RTF:
+ *
+ * The export format for Rich Text Format (RTF).
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#valid_download_formats_for_text_documents">
+ * GData protocol specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_DOCUMENTS_TEXT_RTF "rtf"
+
+/**
+ * GDATA_DOCUMENTS_TEXT_TXT:
+ *
+ * The export format for plain text format.
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#valid_download_formats_for_text_documents">
+ * GData protocol specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_DOCUMENTS_TEXT_TXT "txt"
+
+/**
+ * GDATA_DOCUMENTS_TEXT_ZIP:
+ *
+ * The export format for a ZIP archive containing images and exported HTML.
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#valid_download_formats_for_text_documents">
+ * GData protocol specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_DOCUMENTS_TEXT_ZIP "zip"
+
+#define GDATA_TYPE_DOCUMENTS_TEXT (gdata_documents_text_get_type ())
+#define GDATA_DOCUMENTS_TEXT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_DOCUMENTS_TEXT, GDataDocumentsText))
+#define GDATA_DOCUMENTS_TEXT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_DOCUMENTS_TEXT, GDataDocumentsTextClass))
+#define GDATA_IS_DOCUMENTS_TEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_DOCUMENTS_TEXT))
+#define GDATA_IS_DOCUMENTS_TEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_DOCUMENTS_TEXT))
+#define GDATA_DOCUMENTS_TEXT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_DOCUMENTS_TEXT, GDataDocumentsTextClass))
+
+typedef struct _GDataDocumentsTextPrivate GDataDocumentsTextPrivate;
+
+/**
+ * GDataDocumentsText:
+ *
+ * All the fields in the #GDataDocumentsText structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ GDataDocumentsDocument parent;
+ GDataDocumentsTextPrivate *priv;
+} GDataDocumentsText;
+
+/**
+ * GDataDocumentsTextClass:
+ *
+ * All the fields in the #GDataDocumentsTextClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataDocumentsDocumentClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataDocumentsTextClass;
+
+GType gdata_documents_text_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataDocumentsText, g_object_unref)
+
+GDataDocumentsText *gdata_documents_text_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+G_END_DECLS
+
+#endif /* !GDATA_DOCUMENTS_TEXT_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2012 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-documents-upload-query
+ * @short_description: GData Documents upload query object
+ * @stability: Stable
+ * @include: gdata/services/documents/gdata-documents-upload-query.h
+ *
+ * #GDataDocumentsUploadQuery is a collection of parameters for document uploads to Google Documents, allowing various options to be set when uploading
+ * a document for the first time. For example, the destination folder for the uploaded document may be specified; or whether to automatically convert
+ * the document to a common format.
+ *
+ * #GDataDocumentsUploadQuery is designed as an object (rather than a fixed struct or set of function arguments) to allow for easy additions of new
+ * Google Documents features in the future.
+ *
+ * <example>
+ * <title>Uploading an Arbitrary File from Disk</title>
+ * <programlisting>
+ * GDataDocumentsService *service;
+ * GDataDocumentsDocument *document, *uploaded_document;
+ * GFile *arbitrary_file;
+ * GFileInfo *file_info;
+ * const gchar *slug, *content_type;
+ * goffset file_size;
+ * GDataDocumentsUploadQuery *upload_query;
+ * GFileInputStream *file_stream;
+ * GDataUploadStream *upload_stream;
+ * GError *error = NULL;
+ *
+ * /<!-- -->* Create a service. *<!-- -->/
+ * service = create_documents_service ();
+ *
+ * /<!-- -->* Get the file to upload. *<!-- -->/
+ * arbitrary_file = g_file_new_for_path ("arbitrary-file.bin");
+ *
+ * /<!-- -->* Get the file's display name, content type and size. *<!-- -->/
+ * file_info = g_file_query_info (arbitrary_file, G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME "," G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE ","
+ * G_FILE_ATTRIBUTE_STANDARD_SIZE, G_FILE_QUERY_INFO_NONE, NULL, &error);
+ *
+ * if (error != NULL) {
+ * g_error ("Error getting arbitrary file information: %s", error->message);
+ * g_error_free (error);
+ * g_object_unref (arbitrary_file);
+ * g_object_unref (service);
+ * return;
+ * }
+ *
+ * slug = g_file_info_get_display_name (file_info);
+ * content_type = g_file_info_get_content_type (file_info);
+ * file_size = g_file_info_get_size (file_info);
+ *
+ * /<!-- -->* Get an input stream for the file. *<!-- -->/
+ * file_stream = g_file_read (arbitrary_file, NULL, &error);
+ *
+ * g_object_unref (arbitrary_file);
+ *
+ * if (error != NULL) {
+ * g_error ("Error getting arbitrary file stream: %s", error->message);
+ * g_error_free (error);
+ * g_object_unref (file_info);
+ * g_object_unref (service);
+ * return;
+ * }
+ *
+ * /<!-- -->* Create the file metadata to upload. *<!-- -->/
+ * document = gdata_documents_document_new (NULL);
+ * gdata_entry_set_title (GDATA_ENTRY (document), "Title for My Arbitrary File");
+ *
+ * /<!-- -->* Build the upload query and set the upload to not be converted to a standard format. *<!-- -->/
+ * upload_query = gdata_documents_upload_query_new ();
+ * gdata_documents_upload_query_set_convert (upload_query, FALSE);
+ *
+ * /<!-- -->* Get an upload stream for the file. *<!-- -->/
+ * upload_stream = gdata_documents_service_upload_document_resumable (service, document, slug, content_type, file_size, upload_query, NULL, &error);
+ *
+ * g_object_unref (upload_query);
+ * g_object_unref (document);
+ * g_object_unref (file_info);
+ *
+ * if (error != NULL) {
+ * g_error ("Error getting upload stream: %s", error->message);
+ * g_error_free (error);
+ * g_object_unref (file_stream);
+ * g_object_unref (service);
+ * return;
+ * }
+ *
+ * /<!-- -->* Upload the document. This is a blocking operation, and should normally be done asynchronously. *<!-- -->/
+ * g_output_stream_splice (G_OUTPUT_STREAM (upload_stream), G_INPUT_STREAM (file_stream),
+ * G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, NULL, &error);
+ *
+ * g_object_unref (file_stream);
+ *
+ * if (error != NULL) {
+ * g_error ("Error splicing streams: %s", error->message);
+ * g_error_free (error);
+ * g_object_unref (upload_stream);
+ * g_object_unref (service);
+ * return;
+ * }
+ *
+ * /<!-- -->* Finish off the upload by parsing the returned updated document metadata entry. *<!-- -->/
+ * uploaded_document = gdata_documents_service_finish_upload (service, upload_stream, &error);
+ *
+ * g_object_unref (upload_stream);
+ * g_object_unref (service);
+ *
+ * if (error != NULL) {
+ * g_error ("Error uploading file: %s", error->message);
+ * g_error_free (error);
+ * return;
+ * }
+ *
+ * /<!-- -->* Do something with the uploaded document. *<!-- -->/
+ *
+ * g_object_unref (uploaded_document);
+ * </programlisting>
+ * </example>
+ *
+ * Since: 0.13.0
+ */
+
+#include <glib.h>
+
+#include "gdata-documents-upload-query.h"
+#include "gdata-private.h"
+#include "gdata-upload-stream.h"
+
+static void gdata_documents_upload_query_dispose (GObject *object);
+static void gdata_documents_upload_query_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_documents_upload_query_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+
+struct _GDataDocumentsUploadQueryPrivate {
+ GDataDocumentsFolder *folder;
+ gboolean convert;
+};
+
+enum {
+ PROP_FOLDER = 1,
+ PROP_CONVERT,
+};
+
+G_DEFINE_TYPE (GDataDocumentsUploadQuery, gdata_documents_upload_query, G_TYPE_OBJECT)
+
+static void
+gdata_documents_upload_query_class_init (GDataDocumentsUploadQueryClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataDocumentsUploadQueryPrivate));
+
+ gobject_class->get_property = gdata_documents_upload_query_get_property;
+ gobject_class->set_property = gdata_documents_upload_query_set_property;
+ gobject_class->dispose = gdata_documents_upload_query_dispose;
+
+ /**
+ * GDataDocumentsUploadQuery:folder:
+ *
+ * Folder to upload the document into. If this is %NULL, the document will be uploaded into the root folder.
+ *
+ * Since: 0.13.0
+ */
+ g_object_class_install_property (gobject_class, PROP_FOLDER,
+ g_param_spec_object ("folder",
+ "Folder", "Folder to upload the document into.",
+ GDATA_TYPE_DOCUMENTS_FOLDER,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataDocumentsUploadQuery:convert:
+ *
+ * %TRUE to automatically convert the uploaded document into a standard format (such as a text document, spreadsheet, presentation, etc.).
+ * %FALSE to upload the document without converting it; this allows for arbitrary files to be uploaded to Google Documents.
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#creating_or_uploading_files">online documentation</ulink>.
+ *
+ * Note that uploading with this property set to %FALSE will only have an effect when using gdata_documents_service_update_document_resumable()
+ * and not gdata_documents_service_update_document(). Additionally, the #GDataDocumentsDocument passed to
+ * gdata_documents_service_update_document_resumable() must be a #GDataDocumentsDocument if this property is %FALSE, and a subclass of it
+ * otherwise.
+ *
+ * Since: 0.13.0
+ */
+ g_object_class_install_property (gobject_class, PROP_CONVERT,
+ g_param_spec_boolean ("convert",
+ "Convert?", "Whether to automatically convert uploaded documents into a standard format.",
+ TRUE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_documents_upload_query_init (GDataDocumentsUploadQuery *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_DOCUMENTS_UPLOAD_QUERY, GDataDocumentsUploadQueryPrivate);
+ self->priv->convert = TRUE;
+}
+
+static void
+gdata_documents_upload_query_dispose (GObject *object)
+{
+ GDataDocumentsUploadQueryPrivate *priv = GDATA_DOCUMENTS_UPLOAD_QUERY (object)->priv;
+
+ g_clear_object (&priv->folder);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_documents_upload_query_parent_class)->dispose (object);
+}
+
+static void
+gdata_documents_upload_query_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataDocumentsUploadQueryPrivate *priv = GDATA_DOCUMENTS_UPLOAD_QUERY (object)->priv;
+
+ switch (property_id) {
+ case PROP_FOLDER:
+ g_value_set_object (value, priv->folder);
+ break;
+ case PROP_CONVERT:
+ g_value_set_boolean (value, priv->convert);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_documents_upload_query_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataDocumentsUploadQuery *self = GDATA_DOCUMENTS_UPLOAD_QUERY (object);
+
+ switch (property_id) {
+ case PROP_FOLDER:
+ gdata_documents_upload_query_set_folder (self, g_value_get_object (value));
+ break;
+ case PROP_CONVERT:
+ gdata_documents_upload_query_set_convert (self, g_value_get_boolean (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+/**
+ * gdata_documents_upload_query_new:
+ *
+ * Constructs a new empty #GDataDocumentsUploadQuery.
+ *
+ * Return value: (transfer full): a new #GDataDocumentsUploadQuery; unref with g_object_unref()
+ *
+ * Since: 0.13.0
+ */
+GDataDocumentsUploadQuery *
+gdata_documents_upload_query_new (void)
+{
+ return g_object_new (GDATA_TYPE_DOCUMENTS_UPLOAD_QUERY, NULL);
+}
+
+/**
+ * gdata_documents_upload_query_build_uri:
+ * @self: a #GDataDocumentsUploadQuery
+ *
+ * Builds an upload URI suitable for passing to gdata_upload_stream_new_resumable() in order to upload a document to Google Documents as described in
+ * the
+ * <ulink type="http" url="https://developers.google.com/google-apps/documents-list/#uploading_a_new_document_or_file_with_both_metadata_and_content">
+ * online documentation</ulink>.
+ *
+ * Return value: (transfer full): a complete upload URI; free with g_free()
+ *
+ * Since: 0.13.0
+ */
+gchar *
+gdata_documents_upload_query_build_uri (GDataDocumentsUploadQuery *self)
+{
+ gchar *base_uri;
+ GString *upload_uri;
+ GDataDocumentsUploadQueryPrivate *priv;
+
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_UPLOAD_QUERY (self), NULL);
+
+ priv = self->priv;
+
+ /* Construct the base URI. */
+ if (priv->folder != NULL) {
+ GDataLink *upload_link;
+
+ /* Get the folder's upload URI. */
+ upload_link = gdata_entry_look_up_link (GDATA_ENTRY (priv->folder), GDATA_LINK_RESUMABLE_CREATE_MEDIA);
+
+ if (upload_link == NULL) {
+ /* Fall back to building a URI manually. */
+ base_uri = _gdata_service_build_uri ("%s://docs.google.com/feeds/upload/create-session/default/private/full/%s/contents",
+ _gdata_service_get_scheme (),
+ gdata_documents_entry_get_resource_id (GDATA_DOCUMENTS_ENTRY (priv->folder)));
+ } else {
+ base_uri = g_strdup (gdata_link_get_uri (upload_link));
+ }
+ } else {
+ base_uri = g_strconcat (_gdata_service_get_scheme (), "://docs.google.com/feeds/upload/create-session/default/private/full", NULL);
+ }
+
+ /* Document format conversion. See: https://developers.google.com/google-apps/documents-list/#creating_or_uploading_files */
+ upload_uri = g_string_new (base_uri);
+ g_free (base_uri);
+
+ if (priv->convert == TRUE) {
+ /* Convert documents to standard formats on upload. */
+ g_string_append (upload_uri, "?convert=true");
+ } else {
+ /* Don't convert them — this permits uploading of arbitrary files. */
+ g_string_append (upload_uri, "?convert=false");
+ }
+
+ return g_string_free (upload_uri, FALSE);
+}
+
+/**
+ * gdata_documents_upload_query_get_folder:
+ * @self: a #GDataDocumentsUploadQuery
+ *
+ * Gets #GDataDocumentsUploadQuery:folder.
+ *
+ * Return value: (allow-none) (transfer none): the folder to upload into, or %NULL
+ *
+ * Since: 0.13.0
+ */
+GDataDocumentsFolder *
+gdata_documents_upload_query_get_folder (GDataDocumentsUploadQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_UPLOAD_QUERY (self), NULL);
+
+ return self->priv->folder;
+}
+
+/**
+ * gdata_documents_upload_query_set_folder:
+ * @self: a #GDataDocumentsUploadQuery
+ * @folder: (allow-none) (transfer none): a new folder to upload into, or %NULL
+ *
+ * Sets #GDataDocumentsUploadQuery:folder to @folder.
+ *
+ * Since: 0.13.0
+ */
+void
+gdata_documents_upload_query_set_folder (GDataDocumentsUploadQuery *self, GDataDocumentsFolder *folder)
+{
+ g_return_if_fail (GDATA_IS_DOCUMENTS_UPLOAD_QUERY (self));
+ g_return_if_fail (folder == NULL || GDATA_IS_DOCUMENTS_FOLDER (folder));
+
+ if (folder == self->priv->folder) {
+ return;
+ }
+
+ if (folder != NULL) {
+ g_object_ref (folder);
+ }
+
+ g_clear_object (&self->priv->folder);
+ self->priv->folder = folder;
+
+ g_object_notify (G_OBJECT (self), "folder");
+}
+
+/**
+ * gdata_documents_upload_query_get_convert:
+ * @self: a #GDataDocumentsUploadQuery
+ *
+ * Gets #GDataDocumentsUploadQuery:convert.
+ *
+ * Return value: %TRUE to convert documents to common formats, %FALSE to upload them unmodified
+ *
+ * Since: 0.13.0
+ */
+gboolean
+gdata_documents_upload_query_get_convert (GDataDocumentsUploadQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_DOCUMENTS_UPLOAD_QUERY (self), TRUE);
+
+ return self->priv->convert;
+}
+
+/**
+ * gdata_documents_upload_query_set_convert:
+ * @self: a #GDataDocumentsUploadQuery
+ * @convert: %TRUE to convert documents to common formats, %FALSE to upload them unmodified
+ *
+ * Sets #GDataDocumentsUploadQuery:convert to @convert.
+ *
+ * Since: 0.13.0
+ */
+void
+gdata_documents_upload_query_set_convert (GDataDocumentsUploadQuery *self, gboolean convert)
+{
+ g_return_if_fail (GDATA_IS_DOCUMENTS_UPLOAD_QUERY (self));
+
+ if (convert == self->priv->convert) {
+ return;
+ }
+
+ self->priv->convert = convert;
+ g_object_notify (G_OBJECT (self), "convert");
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2012 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_DOCUMENTS_UPLOAD_QUERY_H
+#define GDATA_DOCUMENTS_UPLOAD_QUERY_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/services/documents/gdata-documents-folder.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_DOCUMENTS_UPLOAD_QUERY (gdata_documents_upload_query_get_type ())
+#define GDATA_DOCUMENTS_UPLOAD_QUERY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_DOCUMENTS_UPLOAD_QUERY, GDataDocumentsUploadQuery))
+#define GDATA_DOCUMENTS_UPLOAD_QUERY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_DOCUMENTS_UPLOAD_QUERY, GDataDocumentsUploadQueryClass))
+#define GDATA_IS_DOCUMENTS_UPLOAD_QUERY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_DOCUMENTS_UPLOAD_QUERY))
+#define GDATA_IS_DOCUMENTS_UPLOAD_QUERY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_DOCUMENTS_UPLOAD_QUERY))
+#define GDATA_DOCUMENTS_UPLOAD_QUERY_GET_CLASS(o) \
+ (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_DOCUMENTS_UPLOAD_QUERY, GDataDocumentsUploadQueryClass))
+
+typedef struct _GDataDocumentsUploadQueryPrivate GDataDocumentsUploadQueryPrivate;
+
+/**
+ * GDataDocumentsUploadQuery:
+ *
+ * All the fields in the #GDataDocumentsUploadQuery structure are private and should never be accessed directly.
+ *
+ * Since: 0.13.0
+ */
+typedef struct {
+ GObject parent;
+ GDataDocumentsUploadQueryPrivate *priv;
+} GDataDocumentsUploadQuery;
+
+/**
+ * GDataDocumentsUploadQueryClass:
+ *
+ * All the fields in the #GDataDocumentsUploadQueryClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.13.0
+ */
+typedef struct {
+ /*< private >*/
+ GObjectClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataDocumentsUploadQueryClass;
+
+GType gdata_documents_upload_query_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataDocumentsUploadQuery, g_object_unref)
+
+GDataDocumentsUploadQuery *gdata_documents_upload_query_new (void) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+gchar *gdata_documents_upload_query_build_uri (GDataDocumentsUploadQuery *self) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+GDataDocumentsFolder *gdata_documents_upload_query_get_folder (GDataDocumentsUploadQuery *self) G_GNUC_PURE;
+void gdata_documents_upload_query_set_folder (GDataDocumentsUploadQuery *self, GDataDocumentsFolder *folder);
+
+gboolean gdata_documents_upload_query_get_convert (GDataDocumentsUploadQuery *self) G_GNUC_PURE;
+void gdata_documents_upload_query_set_convert (GDataDocumentsUploadQuery *self, gboolean convert);
+
+G_END_DECLS
+
+#endif /* !GDATA_DOCUMENTS_UPLOAD_QUERY_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Red Hat, Inc. 2015, 2016
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <string.h>
+
+#include "gdata-documents-spreadsheet.h"
+#include "gdata-documents-text.h"
+#include "gdata-documents-presentation.h"
+#include "gdata-documents-folder.h"
+#include "gdata-documents-drawing.h"
+#include "gdata-documents-pdf.h"
+#include "gdata-documents-utils.h"
+
+/*
+ * gdata_documents_utils_add_content_type:
+ * @entry: a #GDataDocumentsEntry
+ * @content_type: the new entry content-type
+ *
+ * Adds a #GDataCategory representing @content_type to @entry.
+ *
+ * Since: 0.17.7
+ */
+void
+gdata_documents_utils_add_content_type (GDataDocumentsEntry *entry, const gchar *content_type)
+{
+ GDataCategory *category;
+ GDataEntryClass *klass = GDATA_ENTRY_GET_CLASS (entry);
+
+ if (content_type == NULL || content_type[0] == '\0')
+ return;
+
+ category = gdata_category_new (klass->kind_term, "http://schemas.google.com/g/2005#kind", content_type);
+ gdata_entry_add_category (GDATA_ENTRY (entry), category);
+ g_object_unref (category);
+}
+
+/*
+ * gdata_documents_utils_get_type_from_content_type:
+ * @content_type: the content type
+ *
+ * Maps @content_type to a #GType representing a #GDataDocumentsEntry
+ * sub-class.
+ *
+ * Return value: a #GType corresponding to @content_type
+ *
+ * Since: 0.17.2
+ */
+GType
+gdata_documents_utils_get_type_from_content_type (const gchar *content_type)
+{
+ GType retval;
+
+ /* MIME types: https://developers.google.com/drive/web/mime-types */
+
+ if (g_strcmp0 (content_type, "application/vnd.google-apps.folder") == 0) {
+ retval = GDATA_TYPE_DOCUMENTS_FOLDER;
+ } else if (g_strcmp0 (content_type, "application/pdf") == 0) {
+ retval = GDATA_TYPE_DOCUMENTS_PDF;
+ } else if (g_strcmp0 (content_type, "application/vnd.google-apps.document") == 0) {
+ retval = GDATA_TYPE_DOCUMENTS_TEXT;
+ } else if (g_strcmp0 (content_type, "application/vnd.google-apps.drawing") == 0) {
+ retval = GDATA_TYPE_DOCUMENTS_DRAWING;
+ } else if (g_strcmp0 (content_type, "application/vnd.google-apps.presentation") == 0) {
+ retval = GDATA_TYPE_DOCUMENTS_PRESENTATION;
+ } else if (g_strcmp0 (content_type, "application/vnd.google-apps.spreadsheet") == 0) {
+ retval = GDATA_TYPE_DOCUMENTS_SPREADSHEET;
+ } else {
+ retval = GDATA_TYPE_DOCUMENTS_DOCUMENT;
+ }
+
+ return retval;
+}
+
+/*
+ * gdata_documents_utils_get_content_type:
+ * @entry: a #GDataDocumentsEntry
+ *
+ * Returns the content type of @entry, if any.
+ *
+ * Return value: (nullable): content type of @entry, %NULL otherwise
+ *
+ * Since: 0.17.5
+ */
+const gchar *
+gdata_documents_utils_get_content_type (GDataDocumentsEntry *entry)
+{
+ GList *categories;
+ GList *i;
+ const gchar *retval = NULL;
+
+ categories = gdata_entry_get_categories (GDATA_ENTRY (entry));
+ for (i = categories; i != NULL; i = i->next) {
+ GDataCategory *category = GDATA_CATEGORY (i->data);
+ const gchar *label;
+ const gchar *scheme;
+
+ label = gdata_category_get_label (category);
+ scheme = gdata_category_get_scheme (category);
+ if (label != NULL && label[0] != '\0' && g_strcmp0 (scheme, "http://schemas.google.com/g/2005#kind") == 0) {
+ retval = label;
+ break;
+ }
+ }
+
+ return retval;
+}
+
+/*
+ * gdata_documents_utils_get_id_from_link:
+ * @_link: a #GDataLink
+ *
+ * Returns the ID, if any, of the #GDataEntry pointed to by @_link.
+ *
+ * Return value: (nullable): ID of @_link, %NULL otherwise
+ *
+ * Since: 0.17.9
+ */
+const gchar *
+gdata_documents_utils_get_id_from_link (GDataLink *_link)
+{
+ const gchar *retval = NULL;
+ const gchar *uri;
+
+ /* HACK: Extract the ID from the GDataLink:uri by removing the prefix. Ignore links which
+ * don't have the prefix. */
+ uri = gdata_link_get_uri (_link);
+ if (g_str_has_prefix (uri, GDATA_DOCUMENTS_URI_PREFIX)) {
+ const gchar *id;
+ gsize uri_prefix_len;
+
+ uri_prefix_len = strlen (GDATA_DOCUMENTS_URI_PREFIX);
+ id = uri + uri_prefix_len;
+ if (id[0] != '\0')
+ retval = id;
+ }
+
+ return retval;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Red Hat, Inc. 2015, 2016
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_DOCUMENTS_UTILS_H
+#define GDATA_DOCUMENTS_UTILS_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/services/documents/gdata-documents-entry.h>
+
+G_BEGIN_DECLS
+
+/* HACK: Used to convert GDataLink:uri to ID and vice-versa. */
+#define GDATA_DOCUMENTS_URI_PREFIX "https://www.googleapis.com/drive/v2/files/"
+
+G_GNUC_INTERNAL void gdata_documents_utils_add_content_type (GDataDocumentsEntry *entry, const gchar *content_type);
+
+G_GNUC_INTERNAL GType gdata_documents_utils_get_type_from_content_type (const gchar *content_type);
+
+G_GNUC_INTERNAL const gchar *gdata_documents_utils_get_content_type (GDataDocumentsEntry *entry);
+
+G_GNUC_INTERNAL const gchar *gdata_documents_utils_get_id_from_link (GDataLink *_link);
+
+G_END_DECLS
+
+#endif /* !GDATA_DOCUMENTS_UTILS_H */
--- /dev/null
+incs += include_directories('.')
+
+include_subdir = gdata_include_subdir / 'services/documents'
+
+headers = files(
+ 'gdata-documents-access-rule.h',
+ 'gdata-documents-document.h',
+ 'gdata-documents-drawing.h',
+ 'gdata-documents-entry.h',
+ 'gdata-documents-feed.h',
+ 'gdata-documents-folder.h',
+ 'gdata-documents-metadata.h',
+ 'gdata-documents-pdf.h',
+ 'gdata-documents-presentation.h',
+ 'gdata-documents-property.h',
+ 'gdata-documents-query.h',
+ 'gdata-documents-service.h',
+ 'gdata-documents-spreadsheet.h',
+ 'gdata-documents-text.h',
+ 'gdata-documents-upload-query.h',
+)
+
+install_headers(
+ headers,
+ subdir: include_subdir,
+)
+
+gir_headers += headers
+
+sources += files(
+ 'gdata-documents-access-rule.c',
+ 'gdata-documents-document.c',
+ 'gdata-documents-drawing.c',
+ 'gdata-documents-entry.c',
+ 'gdata-documents-feed.c',
+ 'gdata-documents-folder.c',
+ 'gdata-documents-metadata.c',
+ 'gdata-documents-pdf.c',
+ 'gdata-documents-presentation.c',
+ 'gdata-documents-property.c',
+ 'gdata-documents-query.c',
+ 'gdata-documents-service.c',
+ 'gdata-documents-spreadsheet.c',
+ 'gdata-documents-text.c',
+ 'gdata-documents-upload-query.c',
+ 'gdata-documents-utils.c',
+)
+
+enums = 'gdata-documents-enums'
+
+# FIXME: Work around the namespace being incorrectly detected
+# by glib-mkenums. This needs to be fixed by changing the
+# namespace in libgdata. See !6.
+enums_in = gnome.mkenums_simple(
+ enums + '-in',
+ sources: headers,
+)
+
+sources += custom_target(
+ enums + '.c',
+ input: enums_in[0],
+ output: enums + '.c',
+ command: enum_source_cmd,
+ capture: true,
+)
+
+enum_headers += custom_target(
+ enums + '.h',
+ input: enums_in[1],
+ output: enums + '.h',
+ command: enum_header_cmd,
+ capture: true,
+ install: true,
+ install_dir: gdata_includedir / include_subdir,
+)
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) 2014 Carlos Garnacho <carlosg@gnome.org>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-freebase-query
+ * @short_description: GData Freebase query object
+ * @stability: Stable
+ * @include: gdata/services/freebase/gdata-freebase-query.h
+ *
+ * #GDataFreebaseQuery represents a MQL query specific to the Google Freebase service.
+ *
+ * This implementation of #GDataQuery respects the gdata_query_set_max_results() call.
+ *
+ * For more details of Google Freebase API, see the <ulink type="http" url="https://developers.google.com/freebase/v1/">
+ * online documentation</ulink>.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+#include <json-glib/json-glib.h>
+
+#include "gdata-freebase-query.h"
+#include "gdata-query.h"
+#include "gdata-parser.h"
+#include "gdata-private.h"
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
+static void gdata_freebase_query_finalize (GObject *self);
+static void gdata_freebase_query_set_property (GObject *self, guint prop_id, const GValue *value, GParamSpec *pspec);
+static void gdata_freebase_query_get_property (GObject *self, guint prop_id, GValue *value, GParamSpec *pspec);
+static void get_query_uri (GDataQuery *self, const gchar *feed_uri, GString *query_uri, gboolean *params_started);
+
+struct _GDataFreebaseQueryPrivate {
+ /* These params are here not in GDataQuery due of differently named query params for JSON protocols therefore need for different parse_uri */
+ GVariant *variant;
+ JsonNode *query_node;
+};
+
+enum {
+ PROP_VARIANT = 1,
+};
+
+G_DEFINE_TYPE (GDataFreebaseQuery, gdata_freebase_query, GDATA_TYPE_QUERY)
+
+static void
+gdata_freebase_query_class_init (GDataFreebaseQueryClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataQueryClass *query_class = GDATA_QUERY_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataFreebaseQueryPrivate));
+
+ gobject_class->finalize = gdata_freebase_query_finalize;
+ gobject_class->set_property = gdata_freebase_query_set_property;
+ gobject_class->get_property = gdata_freebase_query_get_property;
+
+ query_class->get_query_uri = get_query_uri;
+
+ /**
+ * GDataFreebaseQuery:variant:
+ *
+ * Variant containing the MQL query. The variant is a very generic container of type "a{smv}",
+ * containing (possibly nested) Freebase schema types and values.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+ g_object_class_install_property (gobject_class, PROP_VARIANT,
+ g_param_spec_variant ("variant",
+ "Variant",
+ "Variant to construct the query from.",
+ G_VARIANT_TYPE ("a{smv}"), NULL,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+ G_PARAM_DEPRECATED));
+}
+
+static void
+gdata_freebase_query_init (GDataFreebaseQuery *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_FREEBASE_QUERY, GDataFreebaseQueryPrivate);
+
+ /* https://developers.google.com/freebase/v1/search#cursor */
+ _gdata_query_set_pagination_type (GDATA_QUERY (self),
+ GDATA_QUERY_PAGINATION_INDEXED);
+}
+
+static void
+gdata_freebase_query_finalize (GObject *self)
+{
+ GDataFreebaseQueryPrivate *priv = GDATA_FREEBASE_QUERY (self)->priv;
+
+ if (priv->variant != NULL)
+ g_variant_unref (priv->variant);
+ if (priv->query_node != NULL)
+ json_node_free (priv->query_node);
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_freebase_query_parent_class)->finalize (self);
+}
+
+static void
+gdata_freebase_query_set_property (GObject *self, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataFreebaseQueryPrivate *priv = GDATA_FREEBASE_QUERY (self)->priv;
+
+ switch (prop_id) {
+ case PROP_VARIANT:
+ priv->variant = g_value_get_variant (value);
+ if (priv->variant)
+ priv->query_node = json_gvariant_serialize (priv->variant);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_freebase_query_get_property (GObject *self, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ GDataFreebaseQueryPrivate *priv = GDATA_FREEBASE_QUERY (self)->priv;
+
+ switch (prop_id) {
+ case PROP_VARIANT:
+ g_value_set_variant (value, priv->variant);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+get_query_uri (GDataQuery *self, const gchar *feed_uri, GString *query_uri, gboolean *params_started)
+{
+ GDataFreebaseQueryPrivate *priv = GDATA_FREEBASE_QUERY (self)->priv;
+ const gchar *query;
+
+#define APPEND_SEP g_string_append_c (query_uri, (*params_started == FALSE) ? '?' : '&'); *params_started = TRUE;
+
+ query = gdata_query_get_q (self);
+
+ if (query != NULL) {
+ APPEND_SEP;
+ g_string_append (query_uri, "query=");
+ g_string_append (query_uri, query);
+ } else if (priv->query_node != NULL) {
+ JsonGenerator *generator;
+ JsonNode *copy;
+ gchar *json;
+ guint limit;
+
+ copy = json_node_copy (priv->query_node);
+
+ limit = gdata_query_get_max_results (self);
+
+ if (limit > 0) {
+ JsonNode *limit_node;
+ JsonObject *object;
+
+ limit_node = json_node_new (JSON_NODE_VALUE);
+ json_node_set_int (limit_node, limit);
+
+ object = json_node_get_object (copy);
+ json_object_set_member (object, "limit", limit_node);
+ }
+
+ generator = json_generator_new ();
+ json_generator_set_root (generator, copy);
+ json = json_generator_to_data (generator, NULL);
+ g_object_unref (generator);
+
+ APPEND_SEP;
+ g_string_append (query_uri, "query=");
+ g_string_append (query_uri, json);
+ g_free (json);
+ }
+
+ /* We don't chain up with parent class get_query_uri because it uses
+ * GData protocol parameters and they aren't compatible with newest API family
+ */
+#undef APPEND_SEP
+}
+
+/**
+ * gdata_freebase_query_new:
+ * @mql: a MQL query string
+ *
+ * Creates a new #GDataFreebaseQuery with the MQL query provided in @mql. MQL
+ * is a JSON-based query language, analogous to SPARQL. To learn more about MQL,
+ * see the <ulink type="http" url="https://developers.google.com/freebase/v1/mql-overview">
+ * MQL overview</ulink> and <ulink type="http" url="https://developers.google.com/freebase/v1/mql-cookbook">
+ * cookbook</ulink>.
+ *
+ * For detailed information on Freebase schemas, The <ulink type="http" url="http://www.freebase.com/schema">"Schema"
+ * section</ulink> on the main site allows for natural search and navigation through the multiple data properties and domains.
+ *
+ * Return value: (transfer full): a new #GDataFreebaseQuery
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+GDataFreebaseQuery *
+gdata_freebase_query_new (const gchar *mql)
+{
+ g_return_val_if_fail (mql != NULL, NULL);
+
+ return g_object_new (GDATA_TYPE_FREEBASE_QUERY, "q", mql, NULL);
+}
+
+/**
+ * gdata_freebase_query_new_from_variant:
+ * @variant: a variant containing the MQL query structure
+ *
+ * Creates a new #GDataFreebaseQuery with the MQL query provided in a serialized form as @variant
+ * of type "a{smv}" containing the JSON data tree of a MQL query. One convenient way
+ * to build the variant is using json_gvariant_serialize() from a #JsonNode. For more information
+ * about MQL, see gdata_freebase_query_new().
+ *
+ * #GDataFreebaseQuery takes ownership on @variant, if it has a floating reference, it will be sunk.
+ * Otherwise an extra reference will be added.
+ *
+ * Return value: (transfer full): a new #GDataFreebaseQuery
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+GDataFreebaseQuery *
+gdata_freebase_query_new_from_variant (GVariant *variant)
+{
+ g_return_val_if_fail (variant != NULL, NULL);
+
+ return g_object_new (GDATA_TYPE_FREEBASE_QUERY,
+ "variant", g_variant_ref_sink (variant),
+ NULL);
+}
+
+G_GNUC_END_IGNORE_DEPRECATIONS
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) 2014 Carlos Garnacho <carlosg@gnome.org>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_FREEBASE_QUERY_H
+#define GDATA_FREEBASE_QUERY_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-query.h>
+#include <gdata/gdata-types.h>
+
+G_BEGIN_DECLS
+
+#ifndef LIBGDATA_DISABLE_DEPRECATED
+
+#define GDATA_TYPE_FREEBASE_QUERY (gdata_freebase_query_get_type ())
+#define GDATA_FREEBASE_QUERY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_FREEBASE_QUERY, GDataFreebaseQuery))
+#define GDATA_FREEBASE_QUERY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_FREEBASE_QUERY, GDataFreebaseQueryClass))
+#define GDATA_IS_FREEBASE_QUERY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_FREEBASE_QUERY))
+#define GDATA_IS_FREEBASE_QUERY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_FREEBASE_QUERY))
+#define GDATA_FREEBASE_QUERY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_FREEBASE_QUERY, GDataFreebaseQueryClass))
+
+typedef struct _GDataFreebaseQueryPrivate GDataFreebaseQueryPrivate;
+
+/**
+ * GDataFreebaseQuery:
+ *
+ * All the fields in the #GDataFreebaseQuery structure are private and should never be accessed directly.
+ *
+ * Since: 0.15.1
+ */
+typedef struct {
+ GDataQuery parent;
+ /*< private >*/
+ GDataFreebaseQueryPrivate *priv;
+} GDataFreebaseQuery;
+
+/**
+ * GDataFreebaseQueryClass:
+ *
+ * All the fields in the #GDataFreebaseQueryClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.15.1
+ */
+typedef struct {
+ /*< private >*/
+ GDataQueryClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataFreebaseQueryClass;
+
+GType gdata_freebase_query_get_type (void) G_GNUC_CONST G_GNUC_DEPRECATED;
+
+GDataFreebaseQuery *gdata_freebase_query_new (const gchar *mql) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC G_GNUC_DEPRECATED;
+GDataFreebaseQuery *gdata_freebase_query_new_from_variant (GVariant *variant) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC G_GNUC_DEPRECATED;
+
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
+
+G_END_DECLS
+
+#endif /* !GDATA_FREEBASE_QUERY_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) 2014 Carlos Garnacho <carlosg@gnome.org>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-freebase-result
+ * @short_description: GData Freebase result object
+ * @stability: Stable
+ * @include: gdata/services/freebase/gdata-freebase-result.h
+ *
+ * #GDataFreebaseResult is a subclass of #GDataEntry to represent the result of a Google Freebase MQL query.
+ *
+ * For more details of Google Freebase API, see the <ulink type="http" url="https://developers.google.com/freebase/v1/">
+ * online documentation</ulink>.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+
+#include "gdata-freebase-result.h"
+#include "gdata-private.h"
+#include "gdata-types.h"
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
+#define URLBASE "https://www.googleapis.com/freebase/v1/"
+
+enum {
+ PROP_VARIANT = 1
+};
+
+struct _GDataFreebaseResultPrivate {
+ GVariant *result;
+};
+
+static void gdata_freebase_result_finalize (GObject *self);
+static void gdata_freebase_result_get_property (GObject *self, guint prop_id, GValue *value, GParamSpec *pspec);
+static gboolean parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error);
+static const gchar *get_content_type (void);
+static gchar *get_entry_uri (const gchar *id);
+
+G_DEFINE_TYPE (GDataFreebaseResult, gdata_freebase_result, GDATA_TYPE_ENTRY)
+
+static void
+gdata_freebase_result_class_init (GDataFreebaseResultClass *klass)
+{
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+ GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataFreebaseResultPrivate));
+
+ gobject_class->finalize = gdata_freebase_result_finalize;
+ gobject_class->get_property = gdata_freebase_result_get_property;
+
+ parsable_class->parse_json = parse_json;
+ parsable_class->get_content_type = get_content_type;
+ entry_class->get_entry_uri = get_entry_uri;
+
+ /**
+ * GDataFreebaseResult:variant:
+ *
+ * Variant containing the MQL result. The variant is a very generic container of type "a{smv}",
+ * containing (possibly nested) Freebase schema types and values.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+ g_object_class_install_property (gobject_class, PROP_VARIANT,
+ g_param_spec_variant ("variant",
+ "Variant", "Variant holding the raw result.",
+ G_VARIANT_TYPE ("a{smv}"), NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS |
+ G_PARAM_DEPRECATED));
+}
+
+static void
+gdata_freebase_result_init (GDataFreebaseResult *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_FREEBASE_RESULT, GDataFreebaseResultPrivate);
+}
+
+static void
+gdata_freebase_result_finalize (GObject *self)
+{
+ GDataFreebaseResultPrivate *priv = GDATA_FREEBASE_RESULT (self)->priv;
+
+ if (priv->result != NULL)
+ g_variant_unref (priv->result);
+
+ G_OBJECT_CLASS (gdata_freebase_result_parent_class)->finalize (self);
+}
+
+static void
+gdata_freebase_result_get_property (GObject *self, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ GDataFreebaseResultPrivate *priv = GDATA_FREEBASE_RESULT (self)->priv;
+
+ switch (prop_id) {
+ case PROP_VARIANT:
+ g_value_set_variant (value, priv->result);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error)
+{
+ GDataFreebaseResultPrivate *priv = GDATA_FREEBASE_RESULT (parsable)->priv;
+ JsonNode *root, *node;
+ JsonObject *object;
+
+ if (g_strcmp0 (json_reader_get_member_name (reader), "result") != 0)
+ return TRUE;
+
+ g_object_get (reader, "root", &root, NULL);
+ object = json_node_get_object (root);
+ node = json_object_get_member (object, "result");
+
+ priv->result = g_variant_ref_sink (json_gvariant_deserialize (node, NULL, error));
+ json_node_free (root);
+
+ return (priv->result != NULL);
+}
+
+static const gchar *
+get_content_type (void)
+{
+ return "application/json";
+}
+
+static gchar *
+get_entry_uri (const gchar *id)
+{
+ /* https://www.googleapis.com/freebase/v1/mqlread interface */
+ return g_strconcat (URLBASE, id, NULL);
+}
+
+/**
+ * gdata_freebase_result_new:
+ *
+ * Creates a new #GDataFreebaseResult.
+ *
+ * Return value: (transfer full): a new #GDataFreebaseResult; unref with g_object_unref()
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+GDataFreebaseResult *
+gdata_freebase_result_new (void)
+{
+ return g_object_new (GDATA_TYPE_FREEBASE_RESULT, NULL);
+}
+
+/**
+ * gdata_freebase_result_dup_variant:
+ * @self: a #GDataFreebaseResult
+ *
+ * Gets the result serialized as a #GVariant of type "a{smv}", containing the JSON
+ * data tree. This variant can be alternatively processed through json_gvariant_serialize().
+ *
+ * Returns: (allow-none) (transfer full): the serialized result, or %NULL; unref with g_variant_unref()
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+GVariant *
+gdata_freebase_result_dup_variant (GDataFreebaseResult *self)
+{
+ GDataFreebaseResultPrivate *priv;
+
+ g_return_val_if_fail (GDATA_IS_FREEBASE_RESULT (self), NULL);
+
+ priv = self->priv;
+
+ if (priv->result == NULL)
+ return NULL;
+
+ return g_variant_ref (priv->result);
+}
+
+G_GNUC_END_IGNORE_DEPRECATIONS
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) 2014 Carlos Garnacho <carlosg@gnome.org>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_FREEBASE_RESULT_H
+#define GDATA_FREEBASE_RESULT_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-entry.h>
+#include <gdata/gdata-types.h>
+
+G_BEGIN_DECLS
+
+#ifndef LIBGDATA_DISABLE_DEPRECATED
+
+#define GDATA_TYPE_FREEBASE_RESULT (gdata_freebase_result_get_type ())
+#define GDATA_FREEBASE_RESULT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_FREEBASE_RESULT, GDataFreebaseResult))
+#define GDATA_FREEBASE_RESULT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_FREEBASE_RESULT, GDataFreebaseResultClass))
+#define GDATA_IS_FREEBASE_RESULT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_FREEBASE_RESULT))
+#define GDATA_IS_FREEBASE_RESULT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_FREEBASE_RESULT))
+#define GDATA_FREEBASE_RESULT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_FREEBASE_RESULT, GDataFreebaseResultClass))
+
+typedef struct _GDataFreebaseResultPrivate GDataFreebaseResultPrivate;
+
+/**
+ * GDataFreebaseResult:
+ *
+ * All the fields in the #GDataFreebaseResult structure are private and should never be accessed directly.
+ *
+ * Since: 0.15.1
+ */
+typedef struct {
+ GDataEntry parent;
+ GDataFreebaseResultPrivate *priv;
+} GDataFreebaseResult;
+
+/**
+ * GDataFreebaseResultClass:
+ *
+ * All the fields in the #GDataFreebaseResultClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.15.1
+ */
+
+typedef struct {
+ /*< private >*/
+ GDataEntryClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataFreebaseResultClass;
+
+GType gdata_freebase_result_get_type (void) G_GNUC_CONST G_GNUC_DEPRECATED;
+
+GDataFreebaseResult *gdata_freebase_result_new (void) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC G_GNUC_DEPRECATED;
+GVariant *gdata_freebase_result_dup_variant (GDataFreebaseResult *self) G_GNUC_WARN_UNUSED_RESULT G_GNUC_DEPRECATED;
+
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
+
+G_END_DECLS
+
+#endif /* !GDATA_FREEBASE_RESULT_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) 2014 Carlos Garnacho <carlosg@gnome.org>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-freebase-search-query
+ * @short_description: GData Freebase query object
+ * @stability: Stable
+ * @include: gdata/services/freebase/gdata-freebase-query.h
+ *
+ * #GDataFreebaseQuery represents a collection of query parameters specific to the Google Freebase service.
+ * a #GDataFreebaseQuery is built on top of a search term, further filters can be set on the search query
+ * through gdata_freebase_search_query_add_filter() or gdata_freebase_search_query_add_location(). The filters
+ * can be nested in sublevels, created through gdata_freebase_search_query_open_filter()
+ * and gdata_freebase_search_query_close_filter().
+ *
+ * For more details of Google Freebase API, see the <ulink type="http" url="https://developers.google.com/freebase/v1/">
+ * online documentation</ulink>.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+#include <json-glib/json-glib.h>
+
+#include "gdata-freebase-search-query.h"
+#include "gdata-query.h"
+#include "gdata-parser.h"
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
+static void gdata_freebase_search_query_finalize (GObject *self);
+static void gdata_freebase_search_query_set_property (GObject *self, guint prop_id, const GValue *value, GParamSpec *pspec);
+static void gdata_freebase_search_query_get_property (GObject *self, guint prop_id, GValue *value, GParamSpec *pspec);
+static void get_query_uri (GDataQuery *self, const gchar *feed_uri, GString *query_uri, gboolean *params_started);
+
+typedef enum {
+ NODE_CONTAINER,
+ NODE_VALUE,
+ NODE_LOCATION
+} FilterNodeType;
+
+typedef union {
+ FilterNodeType type;
+
+ struct {
+ FilterNodeType type;
+ GDataFreebaseSearchFilterType filter_type;
+ GPtrArray *child_nodes; /* Contains owned FilterNode structs */
+ } container;
+
+ struct {
+ FilterNodeType type;
+ gchar *property;
+ gchar *value;
+ } value;
+
+ struct {
+ FilterNodeType type;
+ guint64 radius;
+ gdouble lat;
+ gdouble lon;
+ } location;
+} FilterNode;
+
+struct _GDataFreebaseSearchQueryPrivate {
+ FilterNode *filter;
+ GList *filter_stack; /* Contains unowned FilterNode structs */
+
+ gchar *lang;
+ guint stemmed : 1;
+};
+
+enum {
+ PROP_LANGUAGE = 1,
+ PROP_STEMMED
+};
+
+G_DEFINE_TYPE (GDataFreebaseSearchQuery, gdata_freebase_search_query, GDATA_TYPE_QUERY)
+
+static void
+gdata_freebase_search_query_class_init (GDataFreebaseSearchQueryClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataQueryClass *query_class = GDATA_QUERY_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataFreebaseSearchQueryPrivate));
+
+ gobject_class->finalize = gdata_freebase_search_query_finalize;
+ gobject_class->set_property = gdata_freebase_search_query_set_property;
+ gobject_class->get_property = gdata_freebase_search_query_get_property;
+
+ query_class->get_query_uri = get_query_uri;
+
+ /**
+ * GDataFreebaseSearchQuery:language:
+ *
+ * Language used for search results, in ISO-639-1 format.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+ g_object_class_install_property (gobject_class, PROP_LANGUAGE,
+ g_param_spec_string ("language",
+ "Language used for results",
+ "Language in ISO-639-1 format.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+ G_PARAM_DEPRECATED));
+ /**
+ * GDataFreebaseSearchQuery:stemmed:
+ *
+ * Whether word stemming should happen on the search terms. If this property is enabled,
+ * words like eg. "natural", "naturally" or "nature" would be all reduced to the root "natur"
+ * for search purposes.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+ g_object_class_install_property (gobject_class, PROP_STEMMED,
+ g_param_spec_boolean ("stemmed",
+ "Stem search terms",
+ "Whether the search terms should be stemmed",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+ G_PARAM_DEPRECATED));
+}
+
+static void
+gdata_freebase_search_query_init (GDataFreebaseSearchQuery *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_FREEBASE_SEARCH_QUERY, GDataFreebaseSearchQueryPrivate);
+}
+
+static void
+_free_filter_node (FilterNode *node)
+{
+ switch (node->type) {
+ case NODE_CONTAINER:
+ g_ptr_array_unref (node->container.child_nodes);
+ break;
+ case NODE_VALUE:
+ g_free (node->value.property);
+ g_free (node->value.value);
+ break;
+ case NODE_LOCATION:
+ default:
+ break;
+ }
+
+ g_slice_free (FilterNode, node);
+}
+
+static void
+gdata_freebase_search_query_finalize (GObject *self)
+{
+ GDataFreebaseSearchQueryPrivate *priv = GDATA_FREEBASE_SEARCH_QUERY (self)->priv;
+
+ g_free (priv->lang);
+ g_list_free (priv->filter_stack);
+
+ if (priv->filter != NULL)
+ _free_filter_node (priv->filter);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_freebase_search_query_parent_class)->finalize (self);
+}
+
+static void
+gdata_freebase_search_query_set_property (GObject *self, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataFreebaseSearchQuery *query = GDATA_FREEBASE_SEARCH_QUERY (self);
+
+ switch (prop_id) {
+ case PROP_LANGUAGE:
+ gdata_freebase_search_query_set_language (query, g_value_get_string (value));
+ break;
+ case PROP_STEMMED:
+ gdata_freebase_search_query_set_stemmed (query, g_value_get_boolean (value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_freebase_search_query_get_property (GObject *self, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ GDataFreebaseSearchQueryPrivate *priv = GDATA_FREEBASE_SEARCH_QUERY (self)->priv;
+
+ switch (prop_id) {
+ case PROP_LANGUAGE:
+ g_value_set_string (value, priv->lang);
+ break;
+ case PROP_STEMMED:
+ g_value_set_boolean (value, priv->stemmed);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+build_filter_string (FilterNode *node,
+ GString *str)
+{
+ switch (node->type) {
+ case NODE_CONTAINER:
+ {
+ /* Array matches GDataFreebaseSearchFilterType */
+ const gchar *type_str[] = { "all", "any", "not" };
+ guint i;
+
+ g_assert (/* node->container.filter_type >= 0 && */
+ node->container.filter_type < G_N_ELEMENTS (type_str));
+
+ g_string_append_printf (str, "(%s", type_str[node->container.filter_type]);
+
+ for (i = 0; i < node->container.child_nodes->len; i++)
+ build_filter_string (g_ptr_array_index (node->container.child_nodes, i), str);
+
+ g_string_append (str, ")");
+ break;
+ }
+ case NODE_VALUE:
+ {
+ gchar *escaped;
+
+ escaped = g_strescape (node->value.value, NULL);
+ g_string_append_printf (str, " %s:\"%s\"", node->value.property, escaped);
+ g_free (escaped);
+ break;
+ }
+ case NODE_LOCATION:
+ {
+ gchar lon_str[G_ASCII_DTOSTR_BUF_SIZE], lat_str[G_ASCII_DTOSTR_BUF_SIZE];
+
+ g_ascii_formatd (lon_str, G_ASCII_DTOSTR_BUF_SIZE, "%.4f", node->location.lon);
+ g_ascii_formatd (lat_str, G_ASCII_DTOSTR_BUF_SIZE, "%.4f", node->location.lat);
+ g_string_append_printf (str, "(within radius:%" G_GUINT64_FORMAT "m lon:%s lat:%s)",
+ node->location.radius, lon_str, lat_str);
+ break;
+ }
+ default:
+ g_assert_not_reached ();
+ break;
+ }
+}
+
+static void
+get_query_uri (GDataQuery *self, const gchar *feed_uri, GString *query_uri, gboolean *params_started)
+{
+ GDataFreebaseSearchQueryPrivate *priv = GDATA_FREEBASE_SEARCH_QUERY (self)->priv;
+ const gchar *query, *lang = NULL;
+ gint64 updated_max;
+ guint cur, limit;
+
+#define APPEND_SEP g_string_append_c (query_uri, (*params_started == FALSE) ? '?' : '&'); *params_started = TRUE;
+
+ query = gdata_query_get_q (self);
+
+ if (query != NULL) {
+ APPEND_SEP;
+ g_string_append (query_uri, "query=");
+ g_string_append (query_uri, query);
+ }
+
+ if (priv->filter != NULL) {
+ GString *str = g_string_new (NULL);
+
+ build_filter_string (priv->filter, str);
+
+ APPEND_SEP;
+ g_string_append (query_uri, "filter=");
+ g_string_append (query_uri, str->str);
+ g_string_free (str, TRUE);
+ }
+
+ updated_max = gdata_query_get_updated_max (self);
+
+ if (updated_max != -1) {
+ gchar *date_str;
+
+ date_str = gdata_parser_int64_to_iso8601 (updated_max);
+
+ APPEND_SEP;
+ g_string_append (query_uri, "as_of_time=");
+ g_string_append (query_uri, date_str);
+ g_free (date_str);
+ }
+
+ if (priv->lang != NULL) {
+ lang = priv->lang;
+ } else {
+ const gchar * const *user_languages;
+ GString *lang_str = NULL;
+ gint i;
+
+ user_languages = g_get_language_names ();
+
+ for (i = 0; user_languages[i] != NULL; i++) {
+ if (strlen (user_languages[i]) != 2)
+ continue;
+
+ if (!lang_str)
+ lang_str = g_string_new (user_languages[i]);
+ else
+ g_string_append_printf (lang_str, ",%s", user_languages[i]);
+ }
+
+ lang = g_string_free (lang_str, FALSE);
+ }
+
+ APPEND_SEP;
+ g_string_append (query_uri, "lang=");
+ g_string_append (query_uri, lang);
+
+ if (priv->stemmed) {
+ APPEND_SEP;
+ g_string_append (query_uri, "stemmed=true");
+ }
+
+ cur = gdata_query_get_start_index (self);
+
+ if (cur > 0) {
+ APPEND_SEP;
+ g_string_append_printf (query_uri, "cursor=%d", cur);
+ }
+
+ limit = gdata_query_get_max_results (self);
+
+ if (limit > 0) {
+ APPEND_SEP;
+ g_string_append_printf (query_uri, "limit=%d", limit);
+ }
+
+ /* We don't chain up with parent class get_query_uri because it uses
+ * GData protocol parameters and they aren't compatible with newest API family
+ */
+#undef APPEND_SEP
+}
+
+/**
+ * gdata_freebase_search_query_new:
+ * @search_terms: string to search for
+ *
+ * Creates a new #GDataFreebaseSearchQuery prepared to search for Freebase elements that
+ * match the given @search_terms. Further filters on the query can be set through
+ * gdata_freebase_search_query_add_filter() or gdata_freebase_search_query_add_location().
+ *
+ * Return value: (transfer full): a new #GDataFreebaseSearchQuery; unref with g_object_unref()
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+GDataFreebaseSearchQuery *
+gdata_freebase_search_query_new (const gchar *search_terms)
+{
+ g_return_val_if_fail (search_terms != NULL, NULL);
+ return g_object_new (GDATA_TYPE_FREEBASE_SEARCH_QUERY, "q", search_terms, NULL);
+}
+
+/**
+ * gdata_freebase_search_query_open_filter:
+ * @self: a #GDataFreebaseSearchQuery
+ * @filter_type: filter type
+ *
+ * Opens a container of filter rules, those are applied according to the behavior specified by @filter_type.
+ * Every call to this function must be paired by a call to gdata_freebase_search_query_close_filter().
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+void
+gdata_freebase_search_query_open_filter (GDataFreebaseSearchQuery *self, GDataFreebaseSearchFilterType filter_type)
+{
+ GDataFreebaseSearchQueryPrivate *priv;
+ FilterNode *current_node, *node;
+
+ g_return_if_fail (GDATA_IS_FREEBASE_SEARCH_QUERY (self));
+
+ priv = GDATA_FREEBASE_SEARCH_QUERY (self)->priv;
+
+ node = g_slice_new0 (FilterNode);
+ node->type = NODE_CONTAINER;
+ node->container.filter_type = filter_type;
+ node->container.child_nodes = g_ptr_array_new_with_free_func ((GDestroyNotify) _free_filter_node);
+
+ if (priv->filter_stack != NULL) {
+ current_node = priv->filter_stack->data;
+ g_ptr_array_add (current_node->container.child_nodes, node);
+ } else if (priv->filter == NULL) {
+ priv->filter = node;
+ } else {
+ g_assert_not_reached ();
+ }
+
+ priv->filter_stack = g_list_prepend (priv->filter_stack, node);
+}
+
+/**
+ * gdata_freebase_search_query_close_filter:
+ * @self: a #GDataFreebaseSearchQuery
+ *
+ * Closes a filter level.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+void
+gdata_freebase_search_query_close_filter (GDataFreebaseSearchQuery *self)
+{
+ GDataFreebaseSearchQueryPrivate *priv;
+
+ g_return_if_fail (GDATA_IS_FREEBASE_SEARCH_QUERY (self));
+
+ priv = GDATA_FREEBASE_SEARCH_QUERY (self)->priv;
+
+ if (priv->filter_stack == NULL)
+ g_assert_not_reached ();
+
+ priv->filter_stack = g_list_delete_link (priv->filter_stack, priv->filter_stack);
+}
+
+/**
+ * gdata_freebase_search_query_add_filter:
+ * @self: a #GDataFreebaseSearchQuery
+ * @property: Freebase property ID
+ * @value: match string
+ *
+ * Adds a property filter to the query. property filters are always nested in
+ * containers, opened and closed through gdata_freebase_search_query_open_filter()
+ * and gdata_freebase_search_query_close_filter().
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+void
+gdata_freebase_search_query_add_filter (GDataFreebaseSearchQuery *self, const gchar *property, const gchar *value)
+{
+ GDataFreebaseSearchQueryPrivate *priv;
+ FilterNode *current_node, *node;
+
+ g_return_if_fail (GDATA_IS_FREEBASE_SEARCH_QUERY (self));
+ g_return_if_fail (property != NULL && value != NULL);
+
+ priv = GDATA_FREEBASE_SEARCH_QUERY (self)->priv;
+
+ if (priv->filter_stack == NULL) {
+ g_critical ("A filter container must be opened before through "
+ "gdata_freebase_search_query_open_filter()");
+ g_assert_not_reached ();
+ }
+
+ node = g_slice_new0 (FilterNode);
+ node->type = NODE_VALUE;
+ node->value.property = g_strdup (property);
+ node->value.value = g_strdup (value);
+
+ current_node = priv->filter_stack->data;
+ g_ptr_array_add (current_node->container.child_nodes, node);
+}
+
+/**
+ * gdata_freebase_search_query_add_location:
+ * @self: a #GDataFreebaseSearchQuery
+ * @radius: radius in meters
+ * @lat: latitude
+ * @lon: longitude
+ *
+ * Adds a geolocation filter to the query. location filters are always nested in
+ * containers, opened and closed through gdata_freebase_search_query_open_filter()
+ * and gdata_freebase_search_query_close_filter().
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+void
+gdata_freebase_search_query_add_location (GDataFreebaseSearchQuery *self, guint64 radius, gdouble lat, gdouble lon)
+{
+ GDataFreebaseSearchQueryPrivate *priv = GDATA_FREEBASE_SEARCH_QUERY (self)->priv;
+ FilterNode *current_node, *node;
+
+ g_return_if_fail (GDATA_IS_FREEBASE_SEARCH_QUERY (self));
+
+ if (priv->filter_stack == NULL) {
+ g_critical ("A filter container must be opened before through "
+ "gdata_freebase_search_query_open_filter()");
+ g_assert_not_reached ();
+ }
+
+ node = g_slice_new0 (FilterNode);
+ node->type = NODE_LOCATION;
+ node->location.radius = radius;
+ node->location.lat = lat;
+ node->location.lon = lon;
+
+ current_node = priv->filter_stack->data;
+ g_ptr_array_add (current_node->container.child_nodes, node);
+}
+
+/**
+ * gdata_freebase_search_query_set_language:
+ * @self: a #GDataFreebaseSearchQuery
+ * @lang: (allow-none): Language used on the search terms and results, in ISO-639-1 format, or %NULL to unset.
+ *
+ * Sets the language used, both on the search terms and the results. If unset,
+ * the locale preferences will be respected.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+void
+gdata_freebase_search_query_set_language (GDataFreebaseSearchQuery *self,
+ const gchar *lang)
+{
+ GDataFreebaseSearchQueryPrivate *priv;
+
+ g_return_if_fail (GDATA_IS_FREEBASE_SEARCH_QUERY (self));
+ g_return_if_fail (!lang || strlen (lang) == 2);
+
+ priv = self->priv;
+
+ if (g_strcmp0 (priv->lang, lang) == 0)
+ return;
+
+ g_free (priv->lang);
+ priv->lang = g_strdup (lang);
+ g_object_notify (G_OBJECT (self), "language");
+}
+
+/**
+ * gdata_freebase_search_query_get_language:
+ * @self: a #GDataFreebaseSearchQuery
+ *
+ * Gets the language set on the search query, or %NULL if unset.
+ *
+ * Return value: (allow-none): The language used on the query.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+const gchar *
+gdata_freebase_search_query_get_language (GDataFreebaseSearchQuery *self)
+{
+ GDataFreebaseSearchQueryPrivate *priv;
+
+ g_return_val_if_fail (GDATA_IS_FREEBASE_SEARCH_QUERY (self), NULL);
+
+ priv = self->priv;
+ return priv->lang;
+}
+
+/**
+ * gdata_freebase_search_query_set_stemmed:
+ * @self: a #GDataFreebaseSearchQuery
+ * @stemmed: %TRUE to perform stemming on the search results
+ *
+ * Sets whether stemming is performed on the provided search terms. If @stemmed is %TRUE,
+ * words like eg. "natural", "naturally" or "nature" would be all reduced to the root "natur"
+ * for search purposes.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+void
+gdata_freebase_search_query_set_stemmed (GDataFreebaseSearchQuery *self,
+ gboolean stemmed)
+{
+ GDataFreebaseSearchQueryPrivate *priv;
+
+ g_return_if_fail (GDATA_IS_FREEBASE_SEARCH_QUERY (self));
+
+ priv = self->priv;
+
+ if (priv->stemmed == stemmed)
+ return;
+
+ priv->stemmed = stemmed;
+ g_object_notify (G_OBJECT (self), "stemmed");
+}
+
+/**
+ * gdata_freebase_search_query_get_stemmed:
+ * @self: a #GDataFreebaseSearchQuery
+ *
+ * Returns whether the #GDataFreebaseSearchQuery will perform stemming on the search terms.
+ *
+ * Return value: %TRUE if the #GDataFreebaseSearchQuery performs stemming
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+gboolean
+gdata_freebase_search_query_get_stemmed (GDataFreebaseSearchQuery *self)
+{
+ GDataFreebaseSearchQueryPrivate *priv;
+
+ g_return_val_if_fail (GDATA_IS_FREEBASE_SEARCH_QUERY (self), FALSE);
+
+ priv = self->priv;
+ return priv->stemmed;
+}
+
+G_GNUC_END_IGNORE_DEPRECATIONS
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) 2014 Carlos Garnacho <carlosg@gnome.org>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_FREEBASE_SEARCH_QUERY_H
+#define GDATA_FREEBASE_SEARCH_QUERY_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-query.h>
+#include <gdata/gdata-types.h>
+
+G_BEGIN_DECLS
+
+#ifndef LIBGDATA_DISABLE_DEPRECATED
+
+#define GDATA_TYPE_FREEBASE_SEARCH_QUERY (gdata_freebase_search_query_get_type ())
+#define GDATA_FREEBASE_SEARCH_QUERY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_FREEBASE_SEARCH_QUERY, GDataFreebaseSearchQuery))
+#define GDATA_FREEBASE_SEARCH_QUERY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_FREEBASE_SEARCH_QUERY, GDataFreebaseSearchQueryClass))
+#define GDATA_IS_FREEBASE_SEARCH_QUERY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_FREEBASE_SEARCH_QUERY))
+#define GDATA_IS_FREEBASE_SEARCH_QUERY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_FREEBASE_SEARCH_QUERY))
+#define GDATA_FREEBASE_SEARCH_QUERY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_FREEBASE_SEARCH_QUERY, GDataFreebaseSearchQueryClass))
+
+typedef struct _GDataFreebaseSearchQueryPrivate GDataFreebaseSearchQueryPrivate;
+
+/**
+ * GDataFreebaseSearchFilterType:
+ * @GDATA_FREEBASE_SEARCH_FILTER_ALL: all enclosed elements must match, logically an AND
+ * @GDATA_FREEBASE_SEARCH_FILTER_ANY: any of the enclosed elements must match, logically an OR
+ * @GDATA_FREEBASE_SEARCH_FILTER_NOT: the match is inverted.
+ *
+ * Search filter container types.
+ *
+ * Since: 0.15.1
+ */
+typedef enum {
+ GDATA_FREEBASE_SEARCH_FILTER_ALL,
+ GDATA_FREEBASE_SEARCH_FILTER_ANY,
+ GDATA_FREEBASE_SEARCH_FILTER_NOT
+} GDataFreebaseSearchFilterType;
+
+/**
+ * GDataFreebaseSearchQuery:
+ *
+ * All the fields in the #GDataFreebaseSearchQuery structure are private and should never be accessed directly.
+ *
+ * Since: 0.15.1
+ */
+typedef struct {
+ GDataQuery parent;
+ GDataFreebaseSearchQueryPrivate *priv;
+} GDataFreebaseSearchQuery;
+
+/**
+ * GDataFreebaseSearchQueryClass:
+ *
+ * All the fields in the #GDataFreebaseSearchQueryClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.15.1
+ */
+typedef struct {
+ /*< private >*/
+ GDataQueryClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataFreebaseSearchQueryClass;
+
+GType gdata_freebase_search_query_get_type (void) G_GNUC_CONST G_GNUC_DEPRECATED;
+
+GDataFreebaseSearchQuery *gdata_freebase_search_query_new (const gchar *search_terms) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC G_GNUC_DEPRECATED;
+
+void gdata_freebase_search_query_open_filter (GDataFreebaseSearchQuery *self, GDataFreebaseSearchFilterType filter_type) G_GNUC_DEPRECATED;
+void gdata_freebase_search_query_close_filter (GDataFreebaseSearchQuery *self) G_GNUC_DEPRECATED;
+void gdata_freebase_search_query_add_filter (GDataFreebaseSearchQuery *self, const gchar *property, const gchar *value) G_GNUC_DEPRECATED;
+void gdata_freebase_search_query_add_location (GDataFreebaseSearchQuery *self, guint64 radius, gdouble lat, gdouble lon) G_GNUC_DEPRECATED;
+
+void gdata_freebase_search_query_set_language (GDataFreebaseSearchQuery *self, const gchar *lang) G_GNUC_DEPRECATED;
+const gchar * gdata_freebase_search_query_get_language (GDataFreebaseSearchQuery *self) G_GNUC_DEPRECATED;
+
+void gdata_freebase_search_query_set_stemmed (GDataFreebaseSearchQuery *self, gboolean stemmed) G_GNUC_DEPRECATED;
+gboolean gdata_freebase_search_query_get_stemmed (GDataFreebaseSearchQuery *self) G_GNUC_DEPRECATED;
+
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
+
+G_END_DECLS
+
+#endif /* !GDATA_FREEBASE_SEARCH_QUERY_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) 2014 Carlos Garnacho <carlosg@gnome.org>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-freebase-search-result
+ * @short_description: GData Freebase search result object
+ * @stability: Stable
+ * @include: gdata/services/freebase/gdata-freebase-result.h
+ *
+ * #GDataFreebaseSearchResult is a subclass of #GDataEntry to represent the result of a Freebase search query.
+ *
+ * For more details of Google Freebase API, see the <ulink type="http" url="https://developers.google.com/freebase/v1/">
+ * online documentation</ulink>.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+
+#include "gdata-freebase-search-result.h"
+#include "gdata-private.h"
+#include "gdata-types.h"
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
+#define URLBASE "https://www.googleapis.com/freebase/v1"
+
+struct _GDataFreebaseSearchResultItem {
+ gchar *mid;
+ gchar *id;
+ gchar *name;
+ gchar *lang;
+ gchar *notable_id;
+ gchar *notable_name;
+ gdouble score;
+};
+
+struct _GDataFreebaseSearchResultPrivate {
+ GPtrArray *items; /* contains owned GDataFreebaseSearchResultItem structs */
+ guint total_hits;
+};
+
+static void gdata_freebase_search_result_finalize (GObject *self);
+static gboolean parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error);
+static GDataFreebaseSearchResultItem * item_copy (const GDataFreebaseSearchResultItem *item);
+static void item_free (GDataFreebaseSearchResultItem *item);
+
+G_DEFINE_BOXED_TYPE (GDataFreebaseSearchResultItem, gdata_freebase_search_result_item, item_copy, item_free)
+
+G_DEFINE_TYPE (GDataFreebaseSearchResult, gdata_freebase_search_result, GDATA_TYPE_FREEBASE_RESULT)
+
+static void
+gdata_freebase_search_result_class_init (GDataFreebaseSearchResultClass *klass)
+{
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataFreebaseSearchResultPrivate));
+
+ gobject_class->finalize = gdata_freebase_search_result_finalize;
+ parsable_class->parse_json = parse_json;
+}
+
+static GDataFreebaseSearchResultItem *
+item_new (void)
+{
+ return g_slice_new0 (GDataFreebaseSearchResultItem);
+}
+
+static void
+item_free (GDataFreebaseSearchResultItem *item)
+{
+ g_free (item->mid);
+ g_free (item->id);
+ g_free (item->name);
+ g_free (item->lang);
+ g_free (item->notable_id);
+ g_free (item->notable_name);
+ g_slice_free (GDataFreebaseSearchResultItem, item);
+}
+
+static GDataFreebaseSearchResultItem *
+item_copy (const GDataFreebaseSearchResultItem *item)
+{
+ GDataFreebaseSearchResultItem *copy;
+
+ copy = item_new ();
+ copy->mid = g_strdup (item->mid);
+ copy->id = g_strdup (item->id);
+ copy->name = g_strdup (item->name);
+ copy->lang = g_strdup (item->lang);
+ copy->notable_id = g_strdup (item->notable_id);
+ copy->notable_name = g_strdup (item->notable_name);
+ copy->score = item->score;
+
+ return copy;
+}
+
+static void
+gdata_freebase_search_result_init (GDataFreebaseSearchResult *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_FREEBASE_SEARCH_RESULT, GDataFreebaseSearchResultPrivate);
+ self->priv->items = g_ptr_array_new_with_free_func ((GDestroyNotify) item_free);
+}
+
+static void
+gdata_freebase_search_result_finalize (GObject *self)
+{
+ GDataFreebaseSearchResultPrivate *priv = GDATA_FREEBASE_SEARCH_RESULT (self)->priv;
+
+ g_ptr_array_unref (priv->items);
+
+ G_OBJECT_CLASS (gdata_freebase_search_result_parent_class)->finalize (self);
+}
+
+static gboolean
+parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error)
+{
+ GDataFreebaseSearchResultPrivate *priv = GDATA_FREEBASE_SEARCH_RESULT (parsable)->priv;
+ const GError *inner_error = NULL;
+ const gchar *member_name;
+ gint count, i;
+
+ GDATA_PARSABLE_CLASS (gdata_freebase_search_result_parent_class)->parse_json (parsable, reader, user_data, error);
+
+#define ITEM_SET_STRING(id,field,mandatory) \
+ json_reader_read_member (reader, #id); \
+ item->field = g_strdup (json_reader_get_string_value (reader)); \
+ if (mandatory) { \
+ inner_error = json_reader_get_error (reader); \
+ if (inner_error != NULL) goto item_error; \
+ } \
+ json_reader_end_member (reader);
+
+#define ITEM_SET_DOUBLE(id,field) \
+ json_reader_read_member (reader, #id); \
+ item->field = json_reader_get_double_value (reader); \
+ inner_error = json_reader_get_error (reader); \
+ if (inner_error != NULL) goto item_error; \
+ json_reader_end_member (reader);
+
+ member_name = json_reader_get_member_name (reader);
+
+ if (member_name == NULL)
+ return FALSE;
+
+ if (strcmp (member_name, "hits") == 0) {
+ priv->total_hits = json_reader_get_int_value (reader);
+ return TRUE;
+ } else if (strcmp (member_name, "result") != 0) {
+ /* Avoid anything else besides hits/result */
+ return TRUE;
+ }
+
+ if (!json_reader_is_array (reader))
+ return FALSE;
+
+ count = json_reader_count_elements (reader);
+
+ for (i = 0; i < count; i++) {
+ GDataFreebaseSearchResultItem *item;
+
+ item = item_new ();
+ json_reader_read_element (reader, i);
+
+ ITEM_SET_STRING (mid, mid, TRUE);
+ ITEM_SET_STRING (id, id, FALSE);
+ ITEM_SET_STRING (name, name, TRUE);
+ ITEM_SET_STRING (lang, lang, FALSE);
+ ITEM_SET_DOUBLE (score, score);
+
+ /* Read "notable" */
+ json_reader_read_member (reader, "notable");
+
+ if (json_reader_get_error (reader) == NULL) {
+ ITEM_SET_STRING (id, notable_id, TRUE);
+ ITEM_SET_STRING (name, notable_name, TRUE);
+ }
+
+ json_reader_end_member (reader);
+ json_reader_end_element (reader);
+
+ g_ptr_array_add (priv->items, item);
+ continue;
+
+ item_error:
+ item_free (item);
+ gdata_parser_error_required_json_content_missing (reader, error);
+ return FALSE;
+ }
+
+#undef ITEM_SET_DOUBLE
+#undef ITEM_SET_STRING
+
+ return TRUE;
+}
+
+/**
+ * gdata_freebase_search_result_new:
+ *
+ * Creates a new #GDataFreebaseSearchResult with the given ID and default properties.
+ *
+ * Return value: (transfer full): a new #GDataFreebaseSearchResult; unref with g_object_unref()
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+GDataFreebaseSearchResult *
+gdata_freebase_search_result_new (void)
+{
+ return g_object_new (GDATA_TYPE_FREEBASE_SEARCH_RESULT, NULL);
+}
+
+/**
+ * gdata_freebase_search_result_get_num_items:
+ * @self: a #GDataFreebaseSearchResult
+ *
+ * Returns the number of items contained in this result.
+ *
+ * Returns: The number of items
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+guint
+gdata_freebase_search_result_get_num_items (GDataFreebaseSearchResult *self)
+{
+ g_return_val_if_fail (GDATA_IS_FREEBASE_SEARCH_RESULT (self), 0);
+
+ return self->priv->items->len;
+}
+
+/**
+ * gdata_freebase_search_result_get_total_hits:
+ * @self: a #GDataFreebaseSearchResult
+ *
+ * Returns the total number of hits found for the search query.
+ *
+ * Returns: the total number of hits.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+guint
+gdata_freebase_search_result_get_total_hits (GDataFreebaseSearchResult *self)
+{
+ g_return_val_if_fail (GDATA_IS_FREEBASE_SEARCH_RESULT (self), 0);
+
+ return self->priv->total_hits;
+}
+
+/**
+ * gdata_freebase_search_result_get_item:
+ * @self: a #GDataFreebaseSearchResult
+ * @i: number of item to retrieve
+ *
+ * Gets an item from the search result.
+ *
+ * Returns: (transfer none) (allow-none): a search result item, or %NULL on invalid item.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+const GDataFreebaseSearchResultItem *
+gdata_freebase_search_result_get_item (GDataFreebaseSearchResult *self, guint i)
+{
+ GDataFreebaseSearchResultPrivate *priv;
+
+ g_return_val_if_fail (GDATA_IS_FREEBASE_SEARCH_RESULT (self), NULL);
+
+ priv = self->priv;
+ g_return_val_if_fail (i < priv->items->len, NULL);
+
+ return g_ptr_array_index (priv->items, i);
+}
+
+/**
+ * gdata_freebase_search_result_item_get_mid:
+ * @item: a #GDataFreebaseSearchResultItem
+ *
+ * Returns the machine-encoded ID (MID) of the search result item. Elements may
+ * have a single MID, as opposed to the potentially multiple Freebase IDs that
+ * may point to it. MIDs are usable interchangeably with Freebase IDs.
+ *
+ * Returns: (transfer none): The result item MID.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+const gchar *
+gdata_freebase_search_result_item_get_mid (const GDataFreebaseSearchResultItem *item)
+{
+ g_return_val_if_fail (item != NULL, NULL);
+ return item->mid;
+}
+
+/**
+ * gdata_freebase_search_result_item_get_id:
+ * @item: a #GDataFreebaseSearchResultItem
+ *
+ * Returns the Freebase ID of the search result item.
+ *
+ * Returns: (transfer none): The search result item Freebase ID.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+const gchar *
+gdata_freebase_search_result_item_get_id (const GDataFreebaseSearchResultItem *item)
+{
+ g_return_val_if_fail (item != NULL, NULL);
+
+ if (item->id != NULL)
+ return item->id;
+
+ return item->mid;
+}
+
+/**
+ * gdata_freebase_search_result_item_get_name:
+ * @item: a #GDataFreebaseSearchResultItem
+ *
+ * Returns the human readable name of the search result item.
+ *
+ * Returns: (transfer none): The human readable name of the item.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+const gchar *
+gdata_freebase_search_result_item_get_name (const GDataFreebaseSearchResultItem *item)
+{
+ g_return_val_if_fail (item != NULL, NULL);
+ return item->name;
+}
+
+/**
+ * gdata_freebase_search_result_item_get_language:
+ * @item: a #GDataFreebaseSearchResultItem
+ *
+ * Gets the language of this search result item, in ISO-639-1 format.
+ *
+ * Returns: (transfer none): The language of the search result item.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+const gchar *
+gdata_freebase_search_result_item_get_language (const GDataFreebaseSearchResultItem *item)
+{
+ g_return_val_if_fail (item != NULL, NULL);
+ return item->lang;
+}
+
+/**
+ * gdata_freebase_search_result_item_get_notable_id:
+ * @item: a #GDataFreebaseSearchResultItem
+ *
+ * If this search result item is notable in an specific topic, this function
+ * returns the Freebase ID of this topic.
+ *
+ * Returns: (transfer none) (allow-none): The topic the result item is most notable of, or %NULL.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+const gchar *
+gdata_freebase_search_result_item_get_notable_id (const GDataFreebaseSearchResultItem *item)
+{
+ g_return_val_if_fail (item != NULL, NULL);
+ return item->notable_id;
+}
+
+/**
+ * gdata_freebase_search_result_item_get_notable_name:
+ * @item: a #GDataFreebaseSearchResultItem
+ *
+ * If this search result item is notable in an specific topic, this function
+ * returns the human readable name of this topic.
+ *
+ * Returns: (transfer none) (allow-none): The human readable topic name, or %NULL
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+const gchar *
+gdata_freebase_search_result_item_get_notable_name (const GDataFreebaseSearchResultItem *item)
+{
+ g_return_val_if_fail (item != NULL, NULL);
+ return item->notable_name;
+}
+
+/**
+ * gdata_freebase_search_result_item_get_score:
+ * @item: a #GDataFreebaseSearchResultItem
+ *
+ * Returns the score of this search result item. The higher, the more relevant this
+ * item seems, given the search terms.
+ *
+ * Returns: the result item score.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+gdouble
+gdata_freebase_search_result_item_get_score (const GDataFreebaseSearchResultItem *item)
+{
+ g_return_val_if_fail (item != NULL, 0.0);
+ return item->score;
+}
+
+G_GNUC_END_IGNORE_DEPRECATIONS
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) 2014 Carlos Garnacho <carlosg@gnome.org>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_FREEBASE_SEARCH_RESULT_H
+#define GDATA_FREEBASE_SEARCH_RESULT_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-types.h>
+#include "gdata-freebase-result.h"
+
+G_BEGIN_DECLS
+
+#ifndef LIBGDATA_DISABLE_DEPRECATED
+
+#define GDATA_TYPE_FREEBASE_SEARCH_RESULT_ITEM (gdata_freebase_search_result_item_get_type ())
+#define GDATA_TYPE_FREEBASE_SEARCH_RESULT (gdata_freebase_search_result_get_type ())
+#define GDATA_FREEBASE_SEARCH_RESULT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_FREEBASE_SEARCH_RESULT, GDataFreebaseSearchResult))
+#define GDATA_FREEBASE_SEARCH_RESULT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_FREEBASE_SEARCH_RESULT, GDataFreebaseSearchResultClass))
+#define GDATA_IS_FREEBASE_SEARCH_RESULT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_FREEBASE_SEARCH_RESULT))
+#define GDATA_IS_FREEBASE_SEARCH_RESULT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_FREEBASE_SEARCH_RESULT))
+#define GDATA_FREEBASE_SEARCH_RESULT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_FREEBASE_SEARCH_RESULT, GDataFreebaseSearchResultClass))
+
+typedef struct _GDataFreebaseSearchResultPrivate GDataFreebaseSearchResultPrivate;
+
+/**
+ * GDataFreebaseSearchResultItem:
+ *
+ * Opaque struct holding data for a single search result item.
+ *
+ * Since: 0.15.1
+ */
+typedef struct _GDataFreebaseSearchResultItem GDataFreebaseSearchResultItem;
+
+/**
+ * GDataFreebaseSearchResult:
+ *
+ * All the fields in the #GDataFreebaseSearchResult structure are private and should never be accessed directly.
+ *
+ * Since: 0.15.1
+ */
+typedef struct {
+ GDataFreebaseResult parent;
+ GDataFreebaseSearchResultPrivate *priv;
+} GDataFreebaseSearchResult;
+
+/**
+ * GDataFreebaseSearchResultClass:
+ *
+ * All the fields in the #GDataFreebaseSearchResultClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.15.1
+ */
+
+typedef struct {
+ /*< private >*/
+ GDataFreebaseResultClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataFreebaseSearchResultClass;
+
+GType gdata_freebase_search_result_item_get_type (void) G_GNUC_CONST G_GNUC_DEPRECATED;
+GType gdata_freebase_search_result_get_type (void) G_GNUC_CONST G_GNUC_DEPRECATED;
+
+GDataFreebaseSearchResult *gdata_freebase_search_result_new (void) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC G_GNUC_DEPRECATED;
+
+guint gdata_freebase_search_result_get_num_items (GDataFreebaseSearchResult *self) G_GNUC_DEPRECATED;
+guint gdata_freebase_search_result_get_total_hits (GDataFreebaseSearchResult *self) G_GNUC_DEPRECATED;
+
+const GDataFreebaseSearchResultItem *gdata_freebase_search_result_get_item (GDataFreebaseSearchResult *self, guint i) G_GNUC_DEPRECATED;
+
+const gchar *gdata_freebase_search_result_item_get_mid (const GDataFreebaseSearchResultItem *item) G_GNUC_DEPRECATED;
+const gchar *gdata_freebase_search_result_item_get_id (const GDataFreebaseSearchResultItem *item) G_GNUC_DEPRECATED;
+const gchar *gdata_freebase_search_result_item_get_name (const GDataFreebaseSearchResultItem *item) G_GNUC_DEPRECATED;
+const gchar *gdata_freebase_search_result_item_get_language (const GDataFreebaseSearchResultItem *item) G_GNUC_DEPRECATED;
+const gchar *gdata_freebase_search_result_item_get_notable_id (const GDataFreebaseSearchResultItem *item) G_GNUC_DEPRECATED;
+const gchar *gdata_freebase_search_result_item_get_notable_name (const GDataFreebaseSearchResultItem *item) G_GNUC_DEPRECATED;
+gdouble gdata_freebase_search_result_item_get_score (const GDataFreebaseSearchResultItem *item) G_GNUC_DEPRECATED;
+
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
+
+G_END_DECLS
+
+#endif /* !GDATA_FREEBASE_SEARCH_RESULT_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) 2014 Carlos Garnacho <carlosg@gnome.org>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-freebase-service
+ * @short_description: GData Freebase service object
+ * @stability: Stable
+ * @include: gdata/services/freebase/gdata-freebase-service.h
+ *
+ * #GDataFreebaseService is a subclass of #GDataService for communicating with the Google Freebase API. It supports queries
+ * in MQL format, that allows highly flexible queries on any topic. MQL is a JSON based query language, MQL requests consist
+ * of a mix of defined and empty values for types in the Freebase schema, those "placeholder" values will be filled in on the
+ * reply. For more information and examples, see the <ulink type="http" url="https://developers.google.com/freebase/v1/mql-overview">
+ * MQL overview page</ulink>.
+ *
+ * For more details of Google Freebase API, see the <ulink type="http" url="https://developers.google.com/freebase/v1/">
+ * online documentation</ulink>.
+ *
+ * Since August 2016, [Google has retired Freebase](https://developers.google.com/freebase/),
+ * so all of these APIs will return an error if used; and should be considered
+ * deprecated.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+
+#include "gdata-freebase-service.h"
+#include "gdata-freebase-result.h"
+#include "gdata-freebase-search-result.h"
+#include "gdata-service.h"
+#include "gdata-private.h"
+#include "gdata-query.h"
+#include "gdata-feed.h"
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
+/* Standards reference at https://developers.google.com/freebase/v1/ */
+
+#define URLBASE "://www.googleapis.com/freebase/v1"
+#define IMAGE_URI_PREFIX "https://usercontent.googleapis.com/freebase/v1/image"
+
+enum {
+ PROP_DEVELOPER_KEY = 1
+};
+
+struct _GDataFreebaseServicePrivate {
+ gchar *developer_key;
+};
+
+static void gdata_freebase_service_set_property (GObject *self, guint prop_id, const GValue *value, GParamSpec *pspec);
+static void gdata_freebase_service_get_property (GObject *self, guint prop_id, GValue *value, GParamSpec *pspec);
+static void gdata_freebase_service_finalize (GObject *self);
+static void append_query_headers (GDataService *self, GDataAuthorizationDomain *domain, SoupMessage *message);
+static GList *get_authorization_domains (void);
+
+_GDATA_DEFINE_AUTHORIZATION_DOMAIN (freebase, "freebase", "https://www.googleapis.com/auth/freebase.readonly")
+
+G_DEFINE_TYPE (GDataFreebaseService, gdata_freebase_service, GDATA_TYPE_SERVICE)
+
+static void
+gdata_freebase_service_class_init (GDataFreebaseServiceClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataServiceClass *service_class = GDATA_SERVICE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataFreebaseServicePrivate));
+
+ gobject_class->set_property = gdata_freebase_service_set_property;
+ gobject_class->get_property = gdata_freebase_service_get_property;
+ gobject_class->finalize = gdata_freebase_service_finalize;
+
+ service_class->append_query_headers = append_query_headers;
+ service_class->get_authorization_domains = get_authorization_domains;
+
+ /**
+ * GDataFreebaseService:developer-key:
+ *
+ * The developer key your application has registered with the Freebase API. For more information, see the <ulink type="http"
+ * url="https://developers.google.com/freebase/v1/how-tos/authorizing">online documentation</ulink>.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+ g_object_class_install_property (gobject_class, PROP_DEVELOPER_KEY,
+ g_param_spec_string ("developer-key",
+ "Developer key", "Your Freebase developer API key.",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+ G_PARAM_DEPRECATED));
+}
+
+static void
+gdata_freebase_service_init (GDataFreebaseService *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_FREEBASE_SERVICE, GDataFreebaseServicePrivate);
+}
+
+static void
+append_query_headers (GDataService *self, GDataAuthorizationDomain *domain, SoupMessage *message)
+{
+ GDataFreebaseServicePrivate *priv = GDATA_FREEBASE_SERVICE (self)->priv;
+ const gchar *query;
+ GString *new_query;
+ SoupURI *uri;
+
+ g_assert (message != NULL);
+
+ if (priv->developer_key) {
+ uri = soup_message_get_uri (message);
+ query = soup_uri_get_query (uri);
+
+ /* Set the key on every request, as per
+ * https://developers.google.com/freebase/v1/parameters
+ */
+ if (query) {
+ new_query = g_string_new (query);
+
+ g_string_append (new_query, "&key=");
+ g_string_append_uri_escaped (new_query, priv->developer_key, NULL, FALSE);
+
+ soup_uri_set_query (uri, new_query->str);
+ g_string_free (new_query, TRUE);
+ }
+ }
+
+ /* Chain up to the parent class */
+ GDATA_SERVICE_CLASS (gdata_freebase_service_parent_class)->append_query_headers (self, domain, message);
+}
+
+static GList *
+get_authorization_domains (void)
+{
+ return g_list_prepend (NULL, get_freebase_authorization_domain ());
+}
+
+static void
+gdata_freebase_service_set_property (GObject *self, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataFreebaseServicePrivate *priv = GDATA_FREEBASE_SERVICE (self)->priv;
+
+ switch (prop_id) {
+ case PROP_DEVELOPER_KEY:
+ priv->developer_key = g_value_dup_string (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_freebase_service_get_property (GObject *self, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ GDataFreebaseServicePrivate *priv = GDATA_FREEBASE_SERVICE (self)->priv;
+
+ switch (prop_id) {
+ case PROP_DEVELOPER_KEY:
+ g_value_set_string (value, priv->developer_key);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_freebase_service_finalize (GObject *self)
+{
+ GDataFreebaseServicePrivate *priv = GDATA_FREEBASE_SERVICE (self)->priv;
+
+ g_free (priv->developer_key);
+
+ G_OBJECT_CLASS (gdata_freebase_service_parent_class)->finalize (self);
+}
+
+/**
+ * gdata_freebase_service_new:
+ * @developer_key: (allow-none): developer key to use the API, or %NULL
+ * @authorizer: (allow-none): a #GDataAuthorizer to authorize the service's requests, or %NULL
+ *
+ * Creates a new #GDataFreebaseService using the given #GDataAuthorizer. If @authorizer is %NULL, all requests are made as an unauthenticated user.
+ * Having both @developer_key and @authorizer set to %NULL is allowed, but this should be reserved for debugging situations, as there is a certain
+ * key-less quota for those purposes. If this service is used on any code intended to be deployed, one or both of @developer_key and @authorizer
+ * should be non-%NULL and valid.
+ *
+ * Return value: (transfer full): a new #GDataFreebaseService; unref with g_object_unref()
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+GDataFreebaseService *
+gdata_freebase_service_new (const gchar *developer_key, GDataAuthorizer *authorizer)
+{
+ g_return_val_if_fail (authorizer == NULL || GDATA_IS_AUTHORIZER (authorizer), NULL);
+
+ return g_object_new (GDATA_TYPE_FREEBASE_SERVICE,
+ "developer-key", developer_key,
+ "authorizer", authorizer,
+ NULL);
+}
+
+/**
+ * gdata_freebase_service_get_primary_authorization_domain:
+ *
+ * The primary #GDataAuthorizationDomain for interacting with Freebase. This will not normally need to be used, as it's used internally
+ * by the #GDataFreebaseService methods. However, if using the plain #GDataService methods to implement custom queries or requests which libgdata
+ * does not support natively, then this domain may be needed to authorize the requests.
+ *
+ * The domain never changes, and is interned so that pointer comparison can be used to differentiate it from other authorization domains.
+ *
+ * Return value: (transfer none): the service's authorization domain
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+GDataAuthorizationDomain *
+gdata_freebase_service_get_primary_authorization_domain (void)
+{
+ return get_freebase_authorization_domain ();
+}
+
+/**
+ * gdata_freebase_service_query:
+ * @self: a #GDataFreebaseService
+ * @query: a #GDataFreebaseQuery with the MQL query
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: (allow-none): a #GError, or %NULL
+ *
+ * Performs a MQL query on the service, you can find out more about MQL in the <ulink type="http" url="http://mql.freebaseapps.com/index.html">online MQL documentation</ulink>.
+ *
+ * Return value: (transfer full): a #GDataFreebaseResult containing the query result; unref with g_object_unref()
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+GDataFreebaseResult *
+gdata_freebase_service_query (GDataFreebaseService *self, GDataFreebaseQuery *query,
+ GCancellable *cancellable, GError **error)
+{
+ GDataEntry *entry;
+
+ g_return_val_if_fail (GDATA_IS_FREEBASE_SERVICE (self), NULL);
+ g_return_val_if_fail (GDATA_IS_FREEBASE_QUERY (query), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ entry = gdata_service_query_single_entry (GDATA_SERVICE (self), get_freebase_authorization_domain (), "mqlread",
+ GDATA_QUERY (query), GDATA_TYPE_FREEBASE_RESULT, cancellable, error);
+ if (entry == NULL)
+ return NULL;
+
+ return GDATA_FREEBASE_RESULT (entry);
+}
+
+/**
+ * gdata_freebase_service_query_async:
+ * @self: a #GDataFreebaseService
+ * @query: a #GDataFreebaseQuery with the MQL query
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when authentication is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Performs a MQL query on the service. @self and @query are all reffed when this function is called, so can safely
+ * be unreffed after this function returns. When the query is replied, or fails, @callback will be executed, and
+ * the result can be obtained through gdata_service_query_single_entry_finish().
+ *
+ * For more details, see gdata_freebase_service_query(), which is the synchronous version of
+ * this function.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+void
+gdata_freebase_service_query_async (GDataFreebaseService *self, GDataFreebaseQuery *query, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_return_if_fail (GDATA_IS_FREEBASE_SERVICE (self));
+ g_return_if_fail (GDATA_IS_FREEBASE_QUERY (query));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+ g_return_if_fail (callback != NULL);
+
+ gdata_service_query_single_entry_async (GDATA_SERVICE (self), get_freebase_authorization_domain (), "mqlread",
+ GDATA_QUERY (query), GDATA_TYPE_FREEBASE_RESULT, cancellable, callback, user_data);
+}
+
+/**
+ * gdata_freebase_service_get_topic:
+ * @self: a #GDataFreebaseService
+ * @query: a #GDataFreebaseTopicQuery containing the topic ID
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: (allow-none): a #GError, or %NULL
+ *
+ * Queries information about a topic, identified through a Freebase ID. You can find out more about topic queries in the
+ * <ulink type="http" url="https://developers.google.com/freebase/v1/topic-response">online documentation</ulink>.
+ *
+ * Return value: (transfer full): a #GDataFreebaseTopicResult containing information about the topic; unref with g_object_unref()
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+GDataFreebaseTopicResult *
+gdata_freebase_service_get_topic (GDataFreebaseService *self, GDataFreebaseTopicQuery *query, GCancellable *cancellable, GError **error)
+{
+ GDataEntry *entry;
+
+ g_return_val_if_fail (GDATA_IS_FREEBASE_SERVICE (self), NULL);
+ g_return_val_if_fail (GDATA_IS_FREEBASE_TOPIC_QUERY (query), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ entry = gdata_service_query_single_entry (GDATA_SERVICE (self), get_freebase_authorization_domain (), "topic",
+ GDATA_QUERY (query), GDATA_TYPE_FREEBASE_TOPIC_RESULT, cancellable, error);
+ if (entry == NULL)
+ return NULL;
+
+ return GDATA_FREEBASE_TOPIC_RESULT (entry);
+}
+
+/**
+ * gdata_freebase_service_get_topic_async:
+ * @self: a #GDataFreebaseService
+ * @query: a #GDataFreebaseQuery with the MQL query
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when authentication is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Queries information about a topic, identified through a Freebase ID. @self and @query are all reffed when this
+ * function is called, so can safely be unreffed after this function returns. When the query is replied, or fails,
+ * @callback will be executed, and the result can be obtained through gdata_service_query_single_entry_finish().
+ *
+ * For more details, see gdata_freebase_service_get_topic(), which is the synchronous version of
+ * this function.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+void
+gdata_freebase_service_get_topic_async (GDataFreebaseService *self, GDataFreebaseTopicQuery *query,
+ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_return_if_fail (GDATA_IS_FREEBASE_SERVICE (self));
+ g_return_if_fail (GDATA_IS_FREEBASE_TOPIC_QUERY (query));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+ g_return_if_fail (callback != NULL);
+
+ gdata_service_query_single_entry_async (GDATA_SERVICE (self), get_freebase_authorization_domain (), "topic",
+ GDATA_QUERY (query), GDATA_TYPE_FREEBASE_TOPIC_RESULT, cancellable, callback, user_data);
+}
+
+/**
+ * gdata_freebase_service_search:
+ * @self: a #GDataFreebaseService
+ * @query: a #GDataFreebaseSearchQuery containing the topic ID
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: (allow-none): a #GError, or %NULL
+ *
+ * Performs a search for any given search term, filters can be set on @query to narrow down the results. The results returned
+ * are ordered by relevance. You can find out more about topic queries in the
+ * <ulink type="http" url="https://developers.google.com/freebase/v1/search-cookbook">online documentation</ulink>.
+ *
+ * Return value: (transfer full): a #GDataFreebaseSearchResult containing the results for the given search query; unref with g_object_unref()
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+GDataFreebaseSearchResult *
+gdata_freebase_service_search (GDataFreebaseService *self, GDataFreebaseSearchQuery *query, GCancellable *cancellable, GError **error)
+{
+ GDataEntry *entry;
+
+ g_return_val_if_fail (GDATA_IS_FREEBASE_SERVICE (self), NULL);
+ g_return_val_if_fail (GDATA_IS_FREEBASE_SEARCH_QUERY (query), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ entry = gdata_service_query_single_entry (GDATA_SERVICE (self), get_freebase_authorization_domain (), "search",
+ GDATA_QUERY (query), GDATA_TYPE_FREEBASE_SEARCH_RESULT, cancellable, error);
+ if (entry == NULL)
+ return NULL;
+
+ return GDATA_FREEBASE_SEARCH_RESULT (entry);
+}
+
+/**
+ * gdata_freebase_service_search_async:
+ * @self: a #GDataFreebaseService
+ * @query: a #GDataFreebaseQuery with the MQL query
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when authentication is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Performs a search for any given search term. @self and @query are all reffed when this
+ * function is called, so can safely be unreffed after this function returns.
+ *
+ * For more details, see gdata_freebase_service_search(), which is the synchronous version of
+ * this function.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+void
+gdata_freebase_service_search_async (GDataFreebaseService *self, GDataFreebaseSearchQuery *query,
+ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_return_if_fail (GDATA_IS_FREEBASE_SERVICE (self));
+ g_return_if_fail (GDATA_IS_FREEBASE_SEARCH_QUERY (query));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+ g_return_if_fail (callback != NULL);
+
+ gdata_service_query_single_entry_async (GDATA_SERVICE (self), get_freebase_authorization_domain (), "search",
+ GDATA_QUERY (query), GDATA_TYPE_FREEBASE_SEARCH_RESULT, cancellable, callback, user_data);
+}
+
+static gchar *
+compose_image_uri (GDataFreebaseTopicValue *value, guint max_width, guint max_height)
+{
+ GString *uri = g_string_new (IMAGE_URI_PREFIX);
+ const GDataFreebaseTopicObject *object;
+ gboolean first = TRUE;
+
+ object = gdata_freebase_topic_value_get_object (value);
+ g_assert (object != NULL);
+
+ g_string_append (uri, gdata_freebase_topic_object_get_id (object));
+
+#define APPEND_SEP g_string_append_c (uri, first ? '?' : '&'); first = FALSE;
+
+ if (max_width > 0) {
+ APPEND_SEP;
+ g_string_append_printf (uri, "maxwidth=%d", max_width);
+ }
+
+ if (max_height > 0) {
+ APPEND_SEP;
+ g_string_append_printf (uri, "maxheight=%d", max_height);
+ }
+#undef APPEND_SEP
+
+ return g_string_free (uri, FALSE);
+}
+
+/**
+ * gdata_freebase_service_get_image:
+ * @self: a #GDataFreebaseService
+ * @value: a #GDataFreebaseTopicValue from a topic result
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @max_width: maximum width of the image returned, or 0
+ * @max_height: maximum height of the image returned, or 0
+ * @error: (allow-none): a #GError, or %NULL
+ *
+ * Creates an input stream to an image object returned in a topic query. If @max_width and @max_height
+ * are unspecified (i.e. set to 0), the image returned will be the smallest available.
+ *
+ * Return value: (transfer full): a #GInputStream opened to the image; unref with g_object_unref()
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+GInputStream *
+gdata_freebase_service_get_image (GDataFreebaseService *self, GDataFreebaseTopicValue *value,
+ GCancellable *cancellable, guint max_width, guint max_height, GError **error)
+{
+ GInputStream *stream;
+ gchar *uri;
+
+ g_return_val_if_fail (GDATA_IS_FREEBASE_SERVICE (self), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (value != NULL, NULL);
+ g_return_val_if_fail (!error || !*error, NULL);
+ g_return_val_if_fail (max_width < 4096 && max_height < 4096, NULL);
+
+ if (!gdata_freebase_topic_value_is_image (value)) {
+ g_set_error (error,
+ GDATA_SERVICE_ERROR,
+ GDATA_SERVICE_ERROR_BAD_QUERY_PARAMETER,
+ _("Property ‘%s’ does not hold an image"),
+ gdata_freebase_topic_value_get_property (value));
+ return NULL;
+ }
+
+ uri = compose_image_uri (value, max_width, max_height);
+ stream = gdata_download_stream_new (GDATA_SERVICE (self), get_freebase_authorization_domain (), uri, cancellable);
+ g_free (uri);
+
+ return stream;
+}
+
+G_GNUC_END_IGNORE_DEPRECATIONS
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) 2014 Carlos Garnacho <carlosg@gnome.org>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_FREEBASE_SERVICE_H
+#define GDATA_FREEBASE_SERVICE_H
+
+#include <glib.h>
+#include <glib-object.h>
+#include <libsoup/soup.h>
+
+#include <gdata/gdata-service.h>
+#include <gdata/gdata-download-stream.h>
+#include "gdata-freebase-query.h"
+#include "gdata-freebase-result.h"
+#include "gdata-freebase-search-query.h"
+#include "gdata-freebase-search-result.h"
+#include "gdata-freebase-topic-query.h"
+#include "gdata-freebase-topic-result.h"
+
+G_BEGIN_DECLS
+
+#ifndef LIBGDATA_DISABLE_DEPRECATED
+
+#define GDATA_TYPE_FREEBASE_SERVICE (gdata_freebase_service_get_type ())
+#define GDATA_FREEBASE_SERVICE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_FREEBASE_SERVICE, GDataFreebaseService))
+#define GDATA_FREEBASE_SERVICE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_FREEBASE_SERVICE, GDataFreebaseServiceClass))
+#define GDATA_IS_FREEBASE_SERVICE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_FREEBASE_SERVICE))
+#define GDATA_IS_FREEBASE_SERVICE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_FREEBASE_SERVICE))
+#define GDATA_FREEBASE_SERVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_FREEBASE_SERVICE, GDataFreebaseServiceClass))
+
+typedef struct _GDataFreebaseServicePrivate GDataFreebaseServicePrivate;
+
+/**
+ * GDataFreebaseService:
+ *
+ * All the fields in the #GDataFreebaseService structure are private and should never be accessed directly.
+ *
+ * Since: 0.15.1
+ */
+typedef struct {
+ GDataService parent;
+ /*< private >*/
+ GDataFreebaseServicePrivate *priv;
+} GDataFreebaseService;
+
+/**
+ * GDataFreebaseServiceClass:
+ *
+ * All the fields in the #GDataFreebaseServiceClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.15.1
+ */
+typedef struct {
+ /*< private >*/
+ GDataServiceClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+ void (*_g_reserved2) (void);
+ void (*_g_reserved3) (void);
+ void (*_g_reserved4) (void);
+ void (*_g_reserved5) (void);
+} GDataFreebaseServiceClass;
+
+GType gdata_freebase_service_get_type (void) G_GNUC_CONST G_GNUC_DEPRECATED;
+
+GDataFreebaseService *gdata_freebase_service_new (const gchar *developer_key, GDataAuthorizer *authorizer) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC G_GNUC_DEPRECATED;
+
+GDataAuthorizationDomain *gdata_freebase_service_get_primary_authorization_domain (void) G_GNUC_CONST G_GNUC_DEPRECATED;
+
+GDataFreebaseResult *gdata_freebase_service_query (GDataFreebaseService *self, GDataFreebaseQuery *query,
+ GCancellable *cancellable, GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC G_GNUC_DEPRECATED;
+void gdata_freebase_service_query_async (GDataFreebaseService *self, GDataFreebaseQuery *query,
+ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) G_GNUC_DEPRECATED;
+
+GDataFreebaseTopicResult *gdata_freebase_service_get_topic (GDataFreebaseService *self, GDataFreebaseTopicQuery *query,
+ GCancellable *cancellable, GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC G_GNUC_DEPRECATED;
+void gdata_freebase_service_get_topic_async (GDataFreebaseService *self, GDataFreebaseTopicQuery *query,
+ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) G_GNUC_DEPRECATED;
+
+GDataFreebaseSearchResult *gdata_freebase_service_search (GDataFreebaseService *self, GDataFreebaseSearchQuery *query,
+ GCancellable *cancellable, GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC G_GNUC_DEPRECATED;
+void gdata_freebase_service_search_async (GDataFreebaseService *self, GDataFreebaseSearchQuery *query,
+ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) G_GNUC_DEPRECATED;
+
+GInputStream *gdata_freebase_service_get_image (GDataFreebaseService *self, GDataFreebaseTopicValue *value,
+ GCancellable *cancellable, guint max_width, guint max_height, GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC G_GNUC_DEPRECATED;
+
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
+
+G_END_DECLS
+
+#endif /* !GDATA_FREEBASE_SERVICE_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) 2014 Carlos Garnacho <carlosg@gnome.org>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-freebase-topic-query
+ * @short_description: GData Freebase topic query object
+ * @stability: Stable
+ * @include: gdata/services/freebase/gdata-freebase-topic-query.h
+ *
+ * #GDataFreebaseTopicQuery represents a Freebase topic query. The topic query happens on a single Freebase ID,
+ * given in gdata_freebase_topic_query_new(), the reply returns all known information in Freebase for that given ID.
+ * For more documentation and examples, see the <ulink type="http" url="https://developers.google.com/freebase/v1/topic-response">
+ * Topic response API documentation</ulink>
+ *
+ * This implementation of #GDataQuery respects the gdata_query_set_max_results() and gdata_query_set_updated_max() calls.
+ *
+ * For more details of Google Freebase API, see the <ulink type="http" url="https://developers.google.com/freebase/v1/">
+ * online documentation</ulink>.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+#include <json-glib/json-glib.h>
+
+#include "gdata-freebase-topic-query.h"
+#include "gdata-query.h"
+#include "gdata-parser.h"
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
+static void gdata_freebase_topic_query_finalize (GObject *self);
+static void gdata_freebase_topic_query_set_property (GObject *self, guint prop_id, const GValue *value, GParamSpec *pspec);
+static void gdata_freebase_topic_query_get_property (GObject *self, guint prop_id, GValue *value, GParamSpec *pspec);
+static void get_query_uri (GDataQuery *self, const gchar *feed_uri, GString *query_uri, gboolean *params_started);
+
+struct _GDataFreebaseTopicQueryPrivate {
+ gchar *lang;
+ gchar **filter;
+};
+
+enum {
+ PROP_LANGUAGE = 1,
+ PROP_FILTER
+};
+
+G_DEFINE_TYPE (GDataFreebaseTopicQuery, gdata_freebase_topic_query, GDATA_TYPE_QUERY)
+
+static void
+gdata_freebase_topic_query_class_init (GDataFreebaseTopicQueryClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataQueryClass *query_class = GDATA_QUERY_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataFreebaseTopicQueryPrivate));
+
+ gobject_class->finalize = gdata_freebase_topic_query_finalize;
+ gobject_class->set_property = gdata_freebase_topic_query_set_property;
+ gobject_class->get_property = gdata_freebase_topic_query_get_property;
+
+ query_class->get_query_uri = get_query_uri;
+
+ /**
+ * GDataFreebaseTopicQuery:language:
+ *
+ * Language used for topic values in the result, in ISO-639-1 format.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+ g_object_class_install_property (gobject_class, PROP_LANGUAGE,
+ g_param_spec_string ("language",
+ "Language used for results",
+ "Language in ISO-639-1 format.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+ G_PARAM_DEPRECATED));
+
+ /**
+ * GDataFreebaseTopicQuery:filter:
+ *
+ * Array of properties (eg. "/common/topic/description", or "/computer/software/first_released"), or property
+ * domains (eg. "/common/topic", or "/computer") to be used as filter.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+ g_object_class_install_property (gobject_class, PROP_FILTER,
+ g_param_spec_boxed ("filter",
+ "Filter",
+ "Property domain to be used as filter",
+ G_TYPE_STRV,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_freebase_topic_query_init (GDataFreebaseTopicQuery *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_FREEBASE_TOPIC_QUERY, GDataFreebaseTopicQueryPrivate);
+}
+
+static void
+gdata_freebase_topic_query_finalize (GObject *self)
+{
+ GDataFreebaseTopicQueryPrivate *priv = GDATA_FREEBASE_TOPIC_QUERY (self)->priv;
+
+ g_free (priv->lang);
+ g_free (priv->filter);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_freebase_topic_query_parent_class)->finalize (self);
+}
+
+static void
+gdata_freebase_topic_query_set_property (GObject *self, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataFreebaseTopicQuery *query = GDATA_FREEBASE_TOPIC_QUERY (self);
+
+ switch (prop_id) {
+ case PROP_LANGUAGE:
+ gdata_freebase_topic_query_set_language (query, g_value_get_string (value));
+ break;
+ case PROP_FILTER:
+ gdata_freebase_topic_query_set_filter (query, g_value_get_boxed (value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_freebase_topic_query_get_property (GObject *self, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ GDataFreebaseTopicQueryPrivate *priv = GDATA_FREEBASE_TOPIC_QUERY (self)->priv;
+
+ switch (prop_id) {
+ case PROP_LANGUAGE:
+ g_value_set_string (value, priv->lang);
+ break;
+ case PROP_FILTER:
+ g_value_set_boxed (value, priv->filter);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+get_query_uri (GDataQuery *self, const gchar *feed_uri, GString *query_uri, gboolean *params_started)
+{
+ GDataFreebaseTopicQueryPrivate *priv = GDATA_FREEBASE_TOPIC_QUERY (self)->priv;
+ const gchar *lang = NULL;
+ gint64 updated_max;
+ guint limit;
+
+ g_string_append (query_uri, gdata_query_get_q (self));
+
+#define APPEND_SEP g_string_append_c (query_uri, (*params_started == FALSE) ? '?' : '&'); *params_started = TRUE;
+
+ if (priv->lang != NULL) {
+ lang = priv->lang;
+ } else {
+ const gchar * const *user_languages;
+ guint i;
+
+ user_languages = g_get_language_names ();
+
+ /* Pick the first user language */
+ for (i = 0; user_languages[i] != NULL; i++) {
+ if (strlen (user_languages[i]) == 2) {
+ lang = user_languages[i];
+ break;
+ }
+ }
+ }
+
+ APPEND_SEP;
+ g_string_append (query_uri, "lang=");
+ g_string_append (query_uri, lang);
+
+ if (priv->filter) {
+ guint i;
+
+ for (i = 0; priv->filter[i] != NULL; i++) {
+ APPEND_SEP;
+ g_string_append (query_uri, "filter=");
+ g_string_append (query_uri, priv->filter[i]);
+ }
+ }
+
+ updated_max = gdata_query_get_updated_max (self);
+
+ if (updated_max > -1) {
+ APPEND_SEP;
+ g_string_append_printf (query_uri, "dateline=%" G_GINT64_FORMAT, updated_max);
+ }
+
+ limit = gdata_query_get_max_results (self);
+
+ if (limit > 0) {
+ APPEND_SEP;
+ g_string_append_printf (query_uri, "limit=%d", limit);
+ }
+
+ /* We don't chain up with parent class get_query_uri because it uses
+ * GData protocol parameters and they aren't compatible with newest API family
+ */
+#undef APPEND_SEP
+}
+
+/**
+ * gdata_freebase_topic_query_new:
+ * @id: a Freebase ID or MID
+ *
+ * Creates a new #GDataFreebaseTopicQuery for the given Freebase ID. Those can be
+ * obtained programmatically through gdata_freebase_search_result_item_get_id() or
+ * embedded in the result of a gdata_freebase_service_query() call.
+ *
+ * Return value: (transfer full): a new #GDataFreebaseTopicQuery
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+GDataFreebaseTopicQuery *
+gdata_freebase_topic_query_new (const gchar *id)
+{
+ g_return_val_if_fail (id != NULL, NULL);
+ return g_object_new (GDATA_TYPE_FREEBASE_TOPIC_QUERY, "q", id, NULL);
+}
+
+/**
+ * gdata_freebase_topic_query_set_language:
+ * @self: a #GDataFreebaseTopicQuery
+ * @lang: (allow-none): language used on the topic query, in ISO-639-1 format, or %NULL to unset the language
+ *
+ * Sets the language used in the topic query. If unset,
+ * the locale preferences will be respected.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+void
+gdata_freebase_topic_query_set_language (GDataFreebaseTopicQuery *self,
+ const gchar *lang)
+{
+ GDataFreebaseTopicQueryPrivate *priv;
+
+ g_return_if_fail (GDATA_IS_FREEBASE_TOPIC_QUERY (self));
+ g_return_if_fail (lang == NULL || strlen (lang) == 2);
+
+ priv = self->priv;
+
+ if (g_strcmp0 (priv->lang, lang) == 0)
+ return;
+
+ g_free (priv->lang);
+ priv->lang = g_strdup (lang);
+ g_object_notify (G_OBJECT (self), "language");
+}
+
+/**
+ * gdata_freebase_topic_query_get_language:
+ * @self: a #GDataFreebaseTopicQuery
+ *
+ * Gets the language set on the topic query, or %NULL if unset.
+ *
+ * Return value: (allow-none): The language used on the query.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+const gchar *
+gdata_freebase_topic_query_get_language (GDataFreebaseTopicQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_FREEBASE_TOPIC_QUERY (self), NULL);
+
+ return self->priv->lang;
+}
+
+/**
+ * gdata_freebase_topic_query_set_filter:
+ * @self: a #GDataFreebaseTopicQuery
+ * @filter: (array zero-terminated=1) (allow-none): %NULL-terminated array of filter strings, or %NULL to unset
+ *
+ * Sets a filter on the properties to be returned by the #GDataFreebaseTopicQuery, a filter string usually contains either
+ * a specific property (eg. "/common/topic/description", or "/computer/software/first_released"), or a property domain
+ * (eg. "/common/topic", or "/computer"), all properties pertaining to the domain will be returned through the
+ * #GDataFreebaseTopicResult in the latter case. Other special strings can be passed as filter strings, those are documented
+ * in the <ulink type="http" url="https://developers.google.com/freebase/v1/topic-overview#filter">Topic API overview</ulink>
+ *
+ * If multiple filter strings are set, the result will contain all information necessary to satisfy each of those individually.
+ * If no filter is set, the "commons" special value will be implicitly assumed, which returns a reasonably complete data set.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+void
+gdata_freebase_topic_query_set_filter (GDataFreebaseTopicQuery *self, const gchar * const *filter)
+{
+ GDataFreebaseTopicQueryPrivate *priv;
+
+ g_return_if_fail (GDATA_IS_FREEBASE_TOPIC_QUERY (self));
+ priv = self->priv;
+
+ g_strfreev (priv->filter);
+ priv->filter = g_strdupv ((gchar **) filter);
+ g_object_notify (G_OBJECT (self), "filter");
+}
+
+/**
+ * gdata_freebase_topic_query_get_filter:
+ * @self: a #GDataFreebaseTopicQuery
+ *
+ * Gets the filter set on the topic query, or %NULL if unset.
+ *
+ * Return value: (array zero-terminated=1) (transfer none) (allow-none): The filter used on the query.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+const gchar * const *
+gdata_freebase_topic_query_get_filter (GDataFreebaseTopicQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_FREEBASE_TOPIC_QUERY (self), NULL);
+
+ return (const gchar * const *) self->priv->filter;
+}
+
+G_GNUC_END_IGNORE_DEPRECATIONS
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) 2014 Carlos Garnacho <carlosg@gnome.org>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_FREEBASE_TOPIC_QUERY_H
+#define GDATA_FREEBASE_TOPIC_QUERY_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-query.h>
+#include <gdata/gdata-types.h>
+
+G_BEGIN_DECLS
+
+#ifndef LIBGDATA_DISABLE_DEPRECATED
+
+#define GDATA_TYPE_FREEBASE_TOPIC_QUERY (gdata_freebase_topic_query_get_type ())
+#define GDATA_FREEBASE_TOPIC_QUERY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_FREEBASE_TOPIC_QUERY, GDataFreebaseTopicQuery))
+#define GDATA_FREEBASE_TOPIC_QUERY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_FREEBASE_TOPIC_QUERY, GDataFreebaseTopicQueryClass))
+#define GDATA_IS_FREEBASE_TOPIC_QUERY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_FREEBASE_TOPIC_QUERY))
+#define GDATA_IS_FREEBASE_TOPIC_QUERY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_FREEBASE_TOPIC_QUERY))
+#define GDATA_FREEBASE_TOPIC_QUERY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_FREEBASE_TOPIC_QUERY, GDataFreebaseTopicQueryClass))
+
+typedef struct _GDataFreebaseTopicQueryPrivate GDataFreebaseTopicQueryPrivate;
+
+/**
+ * GDataFreebaseTopicQuery:
+ *
+ * All the fields in the #GDataFreebaseTopicQuery structure are private and should never be accessed directly.
+ *
+ * Since: 0.15.1
+ */
+typedef struct {
+ GDataQuery parent;
+ GDataFreebaseTopicQueryPrivate *priv;
+} GDataFreebaseTopicQuery;
+
+/**
+ * GDataFreebaseTopicQueryClass:
+ *
+ * All the fields in the #GDataFreebaseTopicQueryClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.15.1
+ */
+typedef struct {
+ /*< private >*/
+ GDataQueryClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataFreebaseTopicQueryClass;
+
+GType gdata_freebase_topic_query_get_type (void) G_GNUC_CONST G_GNUC_DEPRECATED;
+
+GDataFreebaseTopicQuery *gdata_freebase_topic_query_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC G_GNUC_DEPRECATED;
+void gdata_freebase_topic_query_set_language (GDataFreebaseTopicQuery *self, const gchar *lang) G_GNUC_DEPRECATED;
+const gchar *gdata_freebase_topic_query_get_language (GDataFreebaseTopicQuery *self) G_GNUC_DEPRECATED;
+
+void gdata_freebase_topic_query_set_filter (GDataFreebaseTopicQuery *self, const gchar * const *filter) G_GNUC_DEPRECATED;
+const gchar * const *gdata_freebase_topic_query_get_filter (GDataFreebaseTopicQuery *self) G_GNUC_DEPRECATED;
+
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
+
+G_END_DECLS
+
+#endif /* !GDATA_FREEBASE_TOPIC_QUERY_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) 2014 Carlos Garnacho <carlosg@gnome.org>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-freebase-topic-result
+ * @short_description: GData Freebase topic result object
+ * @stability: Stable
+ * @include: gdata/services/freebase/gdata-freebase-topic-result.h
+ *
+ * #GDataFreebaseTopicResult is a subclass of #GDataFreebaseResult that contains all or a subset of the information
+ * contained in Freebase about the Freebase ID given to the #GDataFreebaseTopicQuery.
+ *
+ * For more details of Google Freebase API, see the <ulink type="http" url="https://developers.google.com/freebase/v1/">
+ * online documentation</ulink>.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+
+typedef struct _GDataFreebaseTopicValueArray GDataFreebaseTopicValueArray;
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+
+#include "gdata-freebase-topic-result.h"
+#include "gdata-download-stream.h"
+#include "gdata-private.h"
+#include "gdata-types.h"
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
+typedef enum {
+ TYPE_NONE,
+ TYPE_BOOL,
+ TYPE_INT,
+ TYPE_DOUBLE,
+ TYPE_STRING,
+ TYPE_DATETIME,
+ TYPE_COMPOUND,
+ TYPE_OBJECT,
+ TYPE_KEY,
+ TYPE_URI
+} TopicValueType;
+
+/* Wraps a compound object, either the main object returned by the result, or a
+ * complex object within the result values (events are at least composed of
+ * location and time at least, for example).
+ */
+struct _GDataFreebaseTopicObject {
+ gchar *id;
+ GHashTable *values; /* Hashtable of property->GDataFreebaseTopicValueArray */
+ volatile gint ref_count;
+};
+
+/* Wraps an array of values, single-valued properties will contain an array with a single value here */
+struct _GDataFreebaseTopicValueArray {
+ TopicValueType type;
+ GPtrArray *values;
+ guint64 hits; /* Total number of hits, as opposed to values->len */
+};
+
+/* Wraps a single value in the topic result, may be either simple (numbers, strings, Freebase IDs...),
+ * or nested compound types (contained by a GDataFreebaseTopicObject, which is what the value would
+ * contain in that case).
+ */
+struct _GDataFreebaseTopicValue {
+ gchar *property;
+ gchar *text;
+ gchar *lang;
+ gchar *creator;
+ gint64 timestamp;
+ GValue value;
+ volatile gint ref_count;
+};
+
+struct _GDataFreebaseTopicResultPrivate {
+ GDataFreebaseTopicObject *object;
+};
+
+static void gdata_freebase_topic_result_finalize (GObject *self);
+static gboolean parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error);
+static GDataFreebaseTopicObject *object_new (const gchar *id);
+static void value_free (GDataFreebaseTopicValue *object);
+static gboolean reader_get_properties (JsonReader *reader, GDataFreebaseTopicObject *object, GError **error);
+
+G_DEFINE_BOXED_TYPE (GDataFreebaseTopicObject, gdata_freebase_topic_object, gdata_freebase_topic_object_ref, gdata_freebase_topic_object_unref)
+G_DEFINE_BOXED_TYPE (GDataFreebaseTopicValue, gdata_freebase_topic_value, gdata_freebase_topic_value_ref, gdata_freebase_topic_value_unref)
+G_DEFINE_TYPE (GDataFreebaseTopicResult, gdata_freebase_topic_result, GDATA_TYPE_FREEBASE_RESULT)
+
+static void
+gdata_freebase_topic_result_class_init (GDataFreebaseTopicResultClass *klass)
+{
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataFreebaseTopicResultPrivate));
+
+ gobject_class->finalize = gdata_freebase_topic_result_finalize;
+ parsable_class->parse_json = parse_json;
+}
+
+static void
+gdata_freebase_topic_result_init (GDataFreebaseTopicResult *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_FREEBASE_TOPIC_RESULT, GDataFreebaseTopicResultPrivate);
+}
+
+static void
+gdata_freebase_topic_result_finalize (GObject *self)
+{
+ GDataFreebaseTopicResultPrivate *priv = GDATA_FREEBASE_TOPIC_RESULT (self)->priv;
+
+ gdata_freebase_topic_object_unref (priv->object);
+
+ G_OBJECT_CLASS (gdata_freebase_topic_result_parent_class)->finalize (self);
+}
+
+static GDataFreebaseTopicValueArray *
+value_array_new (TopicValueType type, guint64 hits)
+{
+ GDataFreebaseTopicValueArray *array;
+
+ array = g_slice_new0 (GDataFreebaseTopicValueArray);
+ array->values = g_ptr_array_new_with_free_func ((GDestroyNotify) gdata_freebase_topic_value_unref);
+ array->type = type;
+ array->hits = hits;
+
+ return array;
+}
+
+/* Takes ownership on @value */
+static void
+value_array_add (GDataFreebaseTopicValueArray *array, GDataFreebaseTopicValue *value)
+{
+ g_ptr_array_add (array->values, value);
+}
+
+static void
+value_array_free (GDataFreebaseTopicValueArray *array)
+{
+ g_ptr_array_unref (array->values);
+ g_slice_free (GDataFreebaseTopicValueArray, array);
+}
+
+static guint64
+reader_get_item_count (JsonReader *reader)
+{
+ gint64 count;
+
+ json_reader_read_member (reader, "count");
+ count = json_reader_get_int_value (reader);
+ json_reader_end_member (reader);
+
+ return (guint64) count;
+}
+
+static guint
+reader_get_value_type (JsonReader *reader, const gchar *property, GError **error)
+{
+ TopicValueType type = TYPE_NONE;
+ const GError *reader_error;
+ const gchar *valuestr;
+
+ json_reader_read_member (reader, "valuetype");
+ valuestr = json_reader_get_string_value (reader);
+
+ reader_error = json_reader_get_error (reader);
+
+ if (reader_error != NULL) {
+ if (error != NULL && *error == NULL)
+ *error = g_error_copy (reader_error);
+ } else {
+ if (strcmp (valuestr, "key") == 0)
+ type = TYPE_KEY;
+ else if (strcmp (valuestr, "uri") == 0)
+ type = TYPE_URI;
+ else if (strcmp (valuestr, "compound") == 0)
+ type = TYPE_COMPOUND;
+ else if (strcmp (valuestr, "object") == 0)
+ type = TYPE_OBJECT;
+ else if (strcmp (valuestr, "float") == 0)
+ type = TYPE_DOUBLE;
+ else if (strcmp (valuestr, "string") == 0)
+ type = TYPE_STRING;
+ else if (strcmp (valuestr, "int") == 0)
+ type = TYPE_INT;
+ else if (strcmp (valuestr, "bool") == 0)
+ type = TYPE_BOOL;
+ else if (strcmp (valuestr, "datetime") == 0)
+ type = TYPE_DATETIME;
+ else
+ gdata_parser_error_required_json_content_missing (reader, error);
+ }
+
+ json_reader_end_member (reader);
+ return type;
+}
+
+static void
+value_free (GDataFreebaseTopicValue *value)
+{
+ if (G_IS_VALUE (&value->value))
+ g_value_unset (&value->value);
+ g_free (value->text);
+ g_free (value->lang);
+ g_free (value->creator);
+ g_free (value->property);
+ g_slice_free (GDataFreebaseTopicValue, value);
+}
+
+/* Parsing functions to create GDataFreebaseTopicValues, and arrays of those */
+static gchar *
+reader_dup_member_string (JsonReader *reader, const gchar *member, GError **error)
+{
+ const GError *reader_error;
+ gchar *str;
+
+ if (error != NULL && *error != NULL)
+ return NULL;
+
+ json_reader_read_member (reader, member);
+ str = g_strdup (json_reader_get_string_value (reader));
+ reader_error = json_reader_get_error (reader);
+
+ if (reader_error != NULL) {
+ g_free (str);
+ str = NULL;
+
+ if (error != NULL)
+ *error = g_error_copy (reader_error);
+ }
+
+ json_reader_end_member (reader);
+
+ return str;
+}
+
+static gint64
+reader_parse_timestamp (JsonReader *reader, const gchar *member, GError **error)
+{
+ const GError *reader_error;
+ const gchar *date_str;
+ gint64 timestamp = -1;
+
+ if (error != NULL && *error != NULL)
+ return -1;
+
+ json_reader_read_member (reader, member);
+ date_str = json_reader_get_string_value (reader);
+ reader_error = json_reader_get_error (reader);
+
+ if (reader_error != NULL) {
+ if (error != NULL)
+ *error = g_error_copy (reader_error);
+ } else if (date_str) {
+ if (!gdata_parser_int64_from_iso8601 (date_str, ×tamp))
+ timestamp = -1;
+ }
+
+ json_reader_end_member (reader);
+
+ return timestamp;
+}
+
+static gboolean
+reader_fill_simple_gvalue (JsonReader *reader, TopicValueType type, GValue *value)
+{
+ gboolean retval = TRUE;
+ gint64 datetime;
+
+ json_reader_read_member (reader, "value");
+
+ if (json_reader_get_error (reader) != NULL) {
+ json_reader_end_member (reader);
+ return FALSE;
+ }
+
+ switch (type) {
+ case TYPE_BOOL:
+ case TYPE_INT:
+ case TYPE_DOUBLE:
+ case TYPE_STRING:
+ json_node_get_value (json_reader_get_value (reader), value);
+ break;
+ case TYPE_DATETIME:
+ if (gdata_parser_int64_from_iso8601 (json_reader_get_string_value (reader), &datetime) ||
+ gdata_parser_int64_from_date (json_reader_get_string_value (reader), &datetime)) {
+ g_value_init (value, G_TYPE_INT64);
+ g_value_set_int64 (value, datetime);
+ } else {
+ retval = FALSE;
+ }
+
+ break;
+ case TYPE_NONE:
+ case TYPE_COMPOUND:
+ case TYPE_OBJECT:
+ case TYPE_KEY:
+ case TYPE_URI:
+ default:
+ retval = FALSE;
+ }
+
+ json_reader_end_member (reader);
+ return retval;
+}
+
+static GDataFreebaseTopicObject *
+reader_create_object (JsonReader *reader, TopicValueType type)
+{
+ GDataFreebaseTopicObject *object;
+
+ if (type != TYPE_OBJECT && type != TYPE_COMPOUND)
+ return NULL;
+
+ json_reader_read_member (reader, "id");
+
+ if (json_reader_get_error (reader) != NULL) {
+ json_reader_end_member (reader);
+ return NULL;
+ }
+
+ object = object_new (json_reader_get_string_value (reader));
+ json_reader_end_member (reader);
+
+ return object;
+}
+
+static gboolean
+reader_fill_object_gvalue (JsonReader *reader, TopicValueType type, GValue *value)
+{
+ GDataFreebaseTopicObject *object;
+
+ if (type != TYPE_OBJECT)
+ return FALSE;
+
+ object = reader_create_object (reader, type);
+
+ if (object != NULL) {
+ g_value_init (value, GDATA_TYPE_FREEBASE_TOPIC_OBJECT);
+ g_value_take_boxed (value, object);
+ }
+
+ return (object != NULL);
+}
+
+static gboolean
+reader_fill_compound_gvalue (JsonReader *reader, TopicValueType type, GValue *value, GError **error)
+{
+ GDataFreebaseTopicObject *object;
+
+ if (type != TYPE_COMPOUND)
+ return FALSE;
+
+ object = reader_create_object (reader, type);
+
+ if (object == NULL)
+ return FALSE;
+
+ json_reader_read_member (reader, "property");
+
+ if (json_reader_get_error (reader) != NULL) {
+ json_reader_end_member (reader);
+ gdata_freebase_topic_object_unref (object);
+ return FALSE;
+ }
+
+ reader_get_properties (reader, object, error);
+ json_reader_end_member (reader);
+
+ g_value_init (value, GDATA_TYPE_FREEBASE_TOPIC_OBJECT);
+ g_value_take_boxed (value, object);
+ return TRUE;
+}
+
+static GDataFreebaseTopicValue *
+reader_create_value (JsonReader *reader, const gchar *property, TopicValueType type, GError **error)
+{
+ GDataFreebaseTopicValue *value;
+
+ value = g_slice_new0 (GDataFreebaseTopicValue);
+
+ value->ref_count = 1;
+ value->property = g_strdup (property);
+ value->text = reader_dup_member_string (reader, "text", error);
+ value->lang = reader_dup_member_string (reader, "lang", error);
+
+ /* Not all parsed nodes are meant to contain creator/timestamp tags,
+ * do not pass error to those, so parsing continues.
+ */
+ value->creator = reader_dup_member_string (reader, "creator", NULL);
+ value->timestamp = reader_parse_timestamp (reader, "timestamp", NULL);
+
+ if (reader_fill_simple_gvalue (reader, type, &value->value) ||
+ reader_fill_object_gvalue (reader, type, &value->value) ||
+ reader_fill_compound_gvalue (reader, type, &value->value, error))
+ return value;
+
+ value_free (value);
+ return NULL;
+}
+
+static GDataFreebaseTopicValueArray *
+reader_create_value_array (JsonReader *reader, const gchar *property, GError **error)
+{
+ GDataFreebaseTopicValueArray *array;
+ GDataFreebaseTopicValue *value;
+ TopicValueType type;
+ guint64 count, i;
+
+ count = reader_get_item_count (reader);
+
+ if (count <= 0)
+ return NULL;
+
+ type = reader_get_value_type (reader, property, error);
+
+ if (type == TYPE_NONE || type == TYPE_URI || type == TYPE_KEY)
+ return NULL;
+
+ array = value_array_new (type, count);
+
+ json_reader_read_member (reader, "values");
+ count = json_reader_count_elements (reader);
+
+ for (i = 0; i < count; i++) {
+ json_reader_read_element (reader, i);
+ value = reader_create_value (reader, property, type, error);
+ json_reader_end_element (reader);
+
+ if (value != NULL)
+ value_array_add (array, value);
+ }
+
+ json_reader_end_member (reader);
+
+ return array;
+}
+
+static GDataFreebaseTopicObject *
+object_new (const gchar *id)
+{
+ GDataFreebaseTopicObject *object;
+
+ object = g_slice_new0 (GDataFreebaseTopicObject);
+ object->id = g_strdup (id);
+ object->ref_count = 1;
+ object->values = g_hash_table_new_full (g_str_hash, g_str_equal,
+ (GDestroyNotify) g_free,
+ (GDestroyNotify) value_array_free);
+ return object;
+}
+
+/* Takes ownership on @array */
+static void
+object_add_value (GDataFreebaseTopicObject *object, const gchar *property, GDataFreebaseTopicValueArray *array)
+{
+ g_return_if_fail (object != NULL);
+ g_return_if_fail (property != NULL);
+ g_return_if_fail (array != NULL);
+ g_hash_table_replace (object->values, g_strdup (property), array);
+}
+
+static gboolean
+reader_get_properties (JsonReader *reader, GDataFreebaseTopicObject *object, GError **error)
+{
+ GDataFreebaseTopicValueArray *array;
+ gboolean retval = TRUE;
+ gint count, i;
+
+ count = json_reader_count_members (reader);
+
+ for (i = 0; i < count; i++) {
+ GError *inner_error = NULL;
+ const gchar *name;
+ gchar *property;
+
+ json_reader_read_element (reader, i);
+ property = g_strdup (json_reader_get_member_name (reader));
+ name = property;
+
+ /* Reverse properties start with !, display those as
+ * regular properties, and skip that char
+ */
+ if (name[0] == '!')
+ name++;
+
+ /* All Freebase properties and IDs start with '/' */
+ if (name[0] != '/')
+ continue;
+
+ /* Parse the value for this property, possibly with nested contents */
+ array = reader_create_value_array (reader, name, &inner_error);
+ json_reader_end_element (reader);
+
+ if (inner_error != NULL) {
+ g_propagate_error (error, inner_error);
+ retval = FALSE;
+ break;
+ } else if (array != NULL) {
+ /* Takes ownership of array */
+ object_add_value (object, name, array);
+ }
+
+ g_free (property);
+ }
+
+ return retval;
+}
+
+static gboolean
+parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error)
+{
+ GDataFreebaseTopicResultPrivate *priv = GDATA_FREEBASE_TOPIC_RESULT (parsable)->priv;
+ const gchar *member_name;
+
+ GDATA_PARSABLE_CLASS (gdata_freebase_topic_result_parent_class)->parse_json (parsable, reader, user_data, error);
+
+ member_name = json_reader_get_member_name (reader);
+
+ if (member_name == NULL)
+ return FALSE;
+
+ if (strcmp (member_name, "id") == 0) {
+ /* We only expect one member containing information */
+ g_assert (priv->object == NULL);
+ priv->object = object_new (json_reader_get_string_value (reader));
+ } else if (strcmp (member_name, "property") == 0) {
+ reader_get_properties (reader, priv->object, error);
+ } else {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/**
+ * gdata_freebase_topic_result_new:
+ *
+ * Creates a new #GDataFreebaseTopicResult with the given ID and default properties.
+ *
+ * Return value: (transfer full): a new #GDataFreebaseTopicResult; unref with g_object_unref()
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+GDataFreebaseTopicResult *
+gdata_freebase_topic_result_new (void)
+{
+ return g_object_new (GDATA_TYPE_FREEBASE_TOPIC_RESULT, NULL);
+}
+
+/**
+ * gdata_freebase_topic_result_dup_object:
+ * @self: a #GDataFreebaseTopicResult
+ *
+ * Returns a reference to the root #GDataFreebaseTopicObject containing the
+ * topic query results.
+ *
+ * Returns: (transfer full): A new reference on the result object, unref with
+ * gdata_freebase_topic_object_unref()
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+GDataFreebaseTopicObject *
+gdata_freebase_topic_result_dup_object (GDataFreebaseTopicResult *self)
+{
+ g_return_val_if_fail (GDATA_IS_FREEBASE_TOPIC_RESULT (self), NULL);
+
+ return gdata_freebase_topic_object_ref (self->priv->object);
+}
+
+/**
+ * gdata_freebase_topic_object_ref:
+ * @object: a #GDataFreebaseTopicObject
+ *
+ * Creates and returns a new reference on @object.
+ *
+ * Returns: (transfer full): @object, with an extra reference.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+GDataFreebaseTopicObject *
+gdata_freebase_topic_object_ref (GDataFreebaseTopicObject *object)
+{
+ g_return_val_if_fail (object != NULL, NULL);
+
+ g_atomic_int_inc (&object->ref_count);
+ return object;
+}
+
+/**
+ * gdata_freebase_topic_object_unref:
+ * @object: (transfer full): a #GDataFreebaseTopicResult
+ *
+ * Removes a reference from @object. If the reference count drops to 0,
+ * the object is freed.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+void
+gdata_freebase_topic_object_unref (GDataFreebaseTopicObject *object)
+{
+ g_return_if_fail (object != NULL);
+
+ if (g_atomic_int_dec_and_test (&object->ref_count)) {
+ g_hash_table_unref (object->values);
+ g_free (object->id);
+ g_slice_free (GDataFreebaseTopicObject, object);
+ }
+}
+
+/**
+ * gdata_freebase_topic_object_list_properties:
+ * @object: a #GDataFreebaseTopicObject
+ *
+ * Returns the list of Freebase properties described by @object.
+ *
+ * Returns: (transfer container) (element-type gchar*): An array of property names, free with g_ptr_array_unref().
+ *
+ * Since: 0.15.1
+Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+GPtrArray *
+gdata_freebase_topic_object_list_properties (const GDataFreebaseTopicObject *object)
+{
+ GPtrArray *properties;
+ GHashTableIter iter;
+ gchar *property;
+
+ g_return_val_if_fail (object != NULL, NULL);
+
+ properties = g_ptr_array_new ();
+ g_hash_table_iter_init (&iter, object->values);
+
+ while (g_hash_table_iter_next (&iter, (gpointer *) &property, NULL))
+ g_ptr_array_add (properties, property);
+
+ return properties;
+}
+
+/**
+ * gdata_freebase_topic_object_get_property_count:
+ * @object: a #GDataFreebaseTopicObject
+ * @property: a property name contained in @object
+ *
+ * Returns the number of values that @object holds for the given @property. If @object
+ * contains no information about @property, 0 is returned.
+ *
+ * Returns: The number of values contained for @property
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+guint64
+gdata_freebase_topic_object_get_property_count (const GDataFreebaseTopicObject *object, const gchar *property)
+{
+ GDataFreebaseTopicValueArray *array;
+
+ g_return_val_if_fail (object != NULL, 0);
+ g_return_val_if_fail (property != NULL, 0);
+ array = g_hash_table_lookup (object->values, property);
+
+ if (array == NULL)
+ return 0;
+
+ return array->values->len;
+}
+
+/**
+ * gdata_freebase_topic_object_get_property_hits:
+ * @object: a #GDataFreebaseTopicObject
+ * @property: a property name contained in @object
+ *
+ * Returns the total number of hits that the Freebase database stores
+ * for this object, this number either equals or is greater than
+ * gdata_freebase_topic_object_get_property_count(), the query limit
+ * can be controlled through gdata_query_set_max_results() on the topic
+ * query.
+ *
+ * If @object contains no information about @property, 0 is returned.
+ *
+ * Returns: the total number of hits for this property
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+guint64
+gdata_freebase_topic_object_get_property_hits (const GDataFreebaseTopicObject *object, const gchar *property)
+{
+ GDataFreebaseTopicValueArray *array;
+
+ g_return_val_if_fail (object != NULL, 0);
+ g_return_val_if_fail (property != NULL, 0);
+ array = g_hash_table_lookup (object->values, property);
+
+ if (array == NULL)
+ return 0;
+
+ return array->hits;
+}
+
+/**
+ * gdata_freebase_topic_object_get_property_value:
+ * @object: a #GDataFreebaseTopicObject
+ * @property: a property name contained in @object
+ * @item: item number to retrieve from @property
+ *
+ * Gets the value that @object stores for this @property/@item pair, as a generic
+ * #GDataFreebaseTopicValue. If @object contains no information about @property,
+ * or @item is outside the [0..gdata_freebase_topic_object_get_property_count() - 1]
+ * range, %NULL is returned.
+ *
+ * Returns: (allow-none) (transfer none): the value for this property/item
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+GDataFreebaseTopicValue *
+gdata_freebase_topic_object_get_property_value (const GDataFreebaseTopicObject *object, const gchar *property, gint64 item)
+{
+ GDataFreebaseTopicValueArray *array;
+
+ g_return_val_if_fail (object != NULL, NULL);
+ g_return_val_if_fail (property != NULL, NULL);
+ array = g_hash_table_lookup (object->values, property);
+
+ if (array == NULL)
+ return NULL;
+
+ if (item < 0 || item >= array->values->len)
+ return NULL;
+
+ return g_ptr_array_index (array->values, item);
+}
+
+/**
+ * gdata_freebase_topic_object_get_id:
+ * @object: a #GDataFreebaseTopicObject
+ *
+ * Gets the Freebase ID for this specific object.
+ *
+ * Returns: (transfer none): the Freebase ID of this object
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+const gchar *
+gdata_freebase_topic_object_get_id (const GDataFreebaseTopicObject *object)
+{
+ g_return_val_if_fail (object != NULL, NULL);
+ return object->id;
+}
+
+/**
+ * gdata_freebase_topic_value_ref:
+ * @value: a #GDataFreebaseTopicValue
+ *
+ * Creates and returns a new reference on @value.
+ *
+ * Returns: (transfer full): @value, with an extra reference.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+GDataFreebaseTopicValue *
+gdata_freebase_topic_value_ref (GDataFreebaseTopicValue *value)
+{
+ g_return_val_if_fail (value != NULL, NULL);
+
+ g_atomic_int_inc (&value->ref_count);
+ return value;
+}
+
+/**
+ * gdata_freebase_topic_value_unref:
+ * @value: (transfer full): a #GDataFreebaseTopicValue
+ *
+ * Removes a reference from @value. If the reference count drops to 0,
+ * the object is freed.
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+void
+gdata_freebase_topic_value_unref (GDataFreebaseTopicValue *value)
+{
+ g_return_if_fail (value != NULL);
+
+ if (g_atomic_int_dec_and_test (&value->ref_count))
+ value_free (value);
+}
+
+/**
+ * gdata_freebase_topic_value_get_property:
+ * @value: a #GDataFreebaseTopicValue
+ *
+ * Returns the property name that this value describes
+ *
+ * Returns: the property name of @value
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+const gchar *
+gdata_freebase_topic_value_get_property (GDataFreebaseTopicValue *value)
+{
+ g_return_val_if_fail (value != NULL, NULL);
+ return value->property;
+}
+
+/**
+ * gdata_freebase_topic_value_get_text:
+ * @value: a #GDataFreebaseTopicValue
+ *
+ * Returns a textual representation of this value, this is either
+ * the value contained transformed to a string, or a concatenation
+ * of subvalues for compound types.
+ *
+ * Returns: a textual representation of @value
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+const gchar *
+gdata_freebase_topic_value_get_text (GDataFreebaseTopicValue *value)
+{
+ g_return_val_if_fail (value != NULL, NULL);
+ return value->text;
+}
+
+/**
+ * gdata_freebase_topic_value_get_language:
+ * @value: a #GDataFreebaseTopicValue
+ *
+ * Returns the language used in the content of @value
+ *
+ * Returns: the language @value is written in
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+const gchar *
+gdata_freebase_topic_value_get_language (GDataFreebaseTopicValue *value)
+{
+ g_return_val_if_fail (value != NULL, NULL);
+ return value->lang;
+}
+
+/**
+ * gdata_freebase_topic_value_get_creator:
+ * @value: a #GDataFreebaseTopicValue
+ *
+ * Returns the Freebase ID of the user that created this value.
+ *
+ * Returns: the creator of this value, as a Freebase ID
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+const gchar *
+gdata_freebase_topic_value_get_creator (GDataFreebaseTopicValue *value)
+{
+ g_return_val_if_fail (value != NULL, NULL);
+ return value->creator;
+}
+
+/**
+ * gdata_freebase_topic_value_get_timestamp:
+ * @value: #GDataFreebaseTopicValue
+ *
+ * Returns the time at which this value was created in the Freebase database.
+ * It's a UNIX timestamp in seconds since the epoch. If @value has no timestamp,
+ * -1 will be returned.
+ *
+ * Returns: The creation time of @value, or -1
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+gint64
+gdata_freebase_topic_value_get_timestamp (GDataFreebaseTopicValue *value)
+{
+ g_return_val_if_fail (value != NULL, 0);
+ return value->timestamp;
+}
+
+/**
+ * gdata_freebase_topic_value_get_value_type:
+ * @value: a #GDataFreebaseTopicValue
+ *
+ * Returns the #GType of the real value held in @value.
+ *
+ * Returns: the #GType of the contained value
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+GType
+gdata_freebase_topic_value_get_value_type (GDataFreebaseTopicValue *value)
+{
+ g_return_val_if_fail (value != NULL, G_TYPE_INVALID);
+ return G_VALUE_TYPE (&value->value);
+}
+
+/**
+ * gdata_freebase_topic_value_copy_value:
+ * @value: a #GDataFreebaseTopicValue
+ * @gvalue: (out caller-allocates) (transfer full): an empty #GValue
+ *
+ * Copies in @gvalue the value held in @value. the #GValue must be later freed through g_value_unset()
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+void
+gdata_freebase_topic_value_copy_value (GDataFreebaseTopicValue *value, GValue *gvalue)
+{
+ g_return_if_fail (value != NULL);
+
+ g_value_copy (&value->value, gvalue);
+}
+
+/**
+ * gdata_freebase_topic_value_get_int:
+ * @value: a #GDataFreebaseTopicValue
+ *
+ * Returns a #gint64 value held in @value. It is only valid to call this if the #GType is a %G_TYPE_INT64
+ *
+ * Returns: the #gint64 value
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+gint64
+gdata_freebase_topic_value_get_int (GDataFreebaseTopicValue *value)
+{
+ g_return_val_if_fail (value != NULL, 0);
+ g_return_val_if_fail (G_VALUE_HOLDS_INT64 (&value->value), 0);
+
+ return g_value_get_int64 (&value->value);
+}
+
+/**
+ * gdata_freebase_topic_value_get_double:
+ * @value: a #GDataFreebaseTopicValue
+ *
+ * Returns a #gdouble value held in @value. It is only valid to call this if the #GType is a %G_TYPE_DOUBLE
+ *
+ * Returns: the #gdouble value
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+gdouble
+gdata_freebase_topic_value_get_double (GDataFreebaseTopicValue *value)
+{
+ g_return_val_if_fail (value != NULL, 0);
+ g_return_val_if_fail (G_VALUE_HOLDS_DOUBLE (&value->value), 0);
+
+ return g_value_get_double (&value->value);
+}
+
+/**
+ * gdata_freebase_topic_value_get_string:
+ * @value: a #GDataFreebaseTopicValue
+ *
+ * Returns a string value held in @value. It is only valid to call this if the #GType is a %G_TYPE_STRING
+ *
+ * Returns: the string value
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+const gchar *
+gdata_freebase_topic_value_get_string (GDataFreebaseTopicValue *value)
+{
+ g_return_val_if_fail (value != NULL, NULL);
+ g_return_val_if_fail (G_VALUE_HOLDS_STRING (&value->value), NULL);
+
+ return g_value_get_string (&value->value);
+}
+
+/**
+ * gdata_freebase_topic_value_get_object:
+ * @value: a #GDataFreebaseTopicValue
+ *
+ * Returns a compound/complex object held in @value. It is only valid to call this if the #GType is a
+ * %GDATA_TYPE_FREEBASE_TOPIC_OBJECT.
+ *
+ * Returns: (transfer none): the compound value as a #GDataFreebaseTopicObject
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+const GDataFreebaseTopicObject *
+gdata_freebase_topic_value_get_object (GDataFreebaseTopicValue *value)
+{
+ g_return_val_if_fail (value != NULL, NULL);
+ g_return_val_if_fail (G_VALUE_HOLDS (&value->value, GDATA_TYPE_FREEBASE_TOPIC_OBJECT), NULL);
+
+ return g_value_get_boxed (&value->value);
+}
+
+/**
+ * gdata_freebase_topic_value_is_image:
+ * @value: a #GDataFreebaseTopicValue
+ *
+ * Returns true if @value holds a freebase image object, on such values it
+ * will be valid to call gdata_freebase_service_get_image() to get a stream
+ * to the image itself.
+ *
+ * Returns: Whether @value holds a Freebase image object
+ *
+ * Since: 0.15.1
+ * Deprecated: 0.17.7: Google Freebase has been permanently shut down.
+ */
+gboolean
+gdata_freebase_topic_value_is_image (GDataFreebaseTopicValue *value)
+{
+ g_return_val_if_fail (value != NULL, FALSE);
+
+ return (strcmp (value->property, "/common/topic/image") == 0);
+}
+
+G_GNUC_END_IGNORE_DEPRECATIONS
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) 2014 Carlos Garnacho <carlosg@gnome.org>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_FREEBASE_TOPIC_RESULT_H
+#define GDATA_FREEBASE_TOPIC_RESULT_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-types.h>
+#include "gdata-freebase-result.h"
+
+G_BEGIN_DECLS
+
+#ifndef LIBGDATA_DISABLE_DEPRECATED
+
+#define GDATA_TYPE_FREEBASE_TOPIC_OBJECT (gdata_freebase_topic_object_get_type ())
+#define GDATA_TYPE_FREEBASE_TOPIC_VALUE (gdata_freebase_topic_value_get_type ())
+#define GDATA_TYPE_FREEBASE_TOPIC_RESULT (gdata_freebase_topic_result_get_type ())
+#define GDATA_FREEBASE_TOPIC_RESULT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_FREEBASE_TOPIC_RESULT, GDataFreebaseTopicResult))
+#define GDATA_FREEBASE_TOPIC_RESULT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_FREEBASE_TOPIC_RESULT, GDataFreebaseTopicResultClass))
+#define GDATA_IS_FREEBASE_TOPIC_RESULT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_FREEBASE_TOPIC_RESULT))
+#define GDATA_IS_FREEBASE_TOPIC_RESULT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_FREEBASE_TOPIC_RESULT))
+#define GDATA_FREEBASE_TOPIC_RESULT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_FREEBASE_TOPIC_RESULT, GDataFreebaseTopicResultClass))
+
+typedef struct _GDataFreebaseTopicResultPrivate GDataFreebaseTopicResultPrivate;
+
+/**
+ * GDataFreebaseTopicObject:
+ *
+ * Opaque struct containing a Freebase topic object. This object may contain one or more
+ * #GDataFreebaseTopicValue structs, which may in turn contain nested #GDataFreebaseTopicObject
+ * structs to express complex data.
+ *
+ * Since: 0.15.1
+ */
+typedef struct _GDataFreebaseTopicObject GDataFreebaseTopicObject;
+
+/**
+ * GDataFreebaseTopicValue:
+ *
+ * Opaque struct containing a value of a Freebase topic object. This struct may contain a simple
+ * value (integers, doubles, strings...) or complex values, expressed through a #GDataFreebaseTopicObject.
+ *
+ * Since: 0.15.1
+ */
+typedef struct _GDataFreebaseTopicValue GDataFreebaseTopicValue;
+
+/**
+ * GDataFreebaseTopicResult:
+ *
+ * All the fields in the #GDataFreebaseTopicResult structure are private and should never be accessed directly.
+ *
+ * Since: 0.15.1
+ */
+typedef struct {
+ GDataFreebaseResult parent;
+ GDataFreebaseTopicResultPrivate *priv;
+} GDataFreebaseTopicResult;
+
+/**
+ * GDataFreebaseTopicResultClass:
+ *
+ * All the fields in the #GDataFreebaseTopicResultClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.15.1
+ */
+typedef struct {
+ /*< private >*/
+ GDataFreebaseResultClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataFreebaseTopicResultClass;
+
+GType gdata_freebase_topic_object_get_type (void) G_GNUC_CONST G_GNUC_DEPRECATED;
+GType gdata_freebase_topic_value_get_type (void) G_GNUC_CONST G_GNUC_DEPRECATED;
+GType gdata_freebase_topic_result_get_type (void) G_GNUC_CONST G_GNUC_DEPRECATED;
+
+GDataFreebaseTopicResult *gdata_freebase_topic_result_new (void) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC G_GNUC_DEPRECATED;
+
+GDataFreebaseTopicObject *gdata_freebase_topic_result_dup_object (GDataFreebaseTopicResult *self) G_GNUC_DEPRECATED;
+
+GDataFreebaseTopicObject *gdata_freebase_topic_object_ref (GDataFreebaseTopicObject *object) G_GNUC_DEPRECATED;
+void gdata_freebase_topic_object_unref (GDataFreebaseTopicObject *object) G_GNUC_DEPRECATED;
+
+GPtrArray *gdata_freebase_topic_object_list_properties (const GDataFreebaseTopicObject *object) G_GNUC_DEPRECATED;
+
+const gchar *gdata_freebase_topic_object_get_id (const GDataFreebaseTopicObject *object) G_GNUC_DEPRECATED;
+guint64 gdata_freebase_topic_object_get_property_count (const GDataFreebaseTopicObject *object, const gchar *property) G_GNUC_DEPRECATED;
+guint64 gdata_freebase_topic_object_get_property_hits (const GDataFreebaseTopicObject *object, const gchar *property) G_GNUC_DEPRECATED;
+GDataFreebaseTopicValue *gdata_freebase_topic_object_get_property_value (const GDataFreebaseTopicObject *object, const gchar *property, gint64 item) G_GNUC_DEPRECATED;
+
+GDataFreebaseTopicValue *gdata_freebase_topic_value_ref (GDataFreebaseTopicValue *value) G_GNUC_DEPRECATED;
+void gdata_freebase_topic_value_unref (GDataFreebaseTopicValue *value) G_GNUC_DEPRECATED;
+
+const gchar *gdata_freebase_topic_value_get_property (GDataFreebaseTopicValue *value) G_GNUC_DEPRECATED;
+
+const gchar *gdata_freebase_topic_value_get_text (GDataFreebaseTopicValue *value) G_GNUC_DEPRECATED;
+const gchar *gdata_freebase_topic_value_get_language (GDataFreebaseTopicValue *value) G_GNUC_DEPRECATED;
+const gchar *gdata_freebase_topic_value_get_creator (GDataFreebaseTopicValue *value) G_GNUC_DEPRECATED;
+gint64 gdata_freebase_topic_value_get_timestamp (GDataFreebaseTopicValue *value) G_GNUC_DEPRECATED;
+GType gdata_freebase_topic_value_get_value_type (GDataFreebaseTopicValue *value) G_GNUC_DEPRECATED;
+void gdata_freebase_topic_value_copy_value (GDataFreebaseTopicValue *value, GValue *gvalue) G_GNUC_DEPRECATED;
+
+gint64 gdata_freebase_topic_value_get_int (GDataFreebaseTopicValue *value) G_GNUC_DEPRECATED;
+gdouble gdata_freebase_topic_value_get_double (GDataFreebaseTopicValue *value) G_GNUC_DEPRECATED;
+const gchar *gdata_freebase_topic_value_get_string (GDataFreebaseTopicValue *value) G_GNUC_DEPRECATED;
+const GDataFreebaseTopicObject *gdata_freebase_topic_value_get_object (GDataFreebaseTopicValue *value) G_GNUC_DEPRECATED;
+
+gboolean gdata_freebase_topic_value_is_image (GDataFreebaseTopicValue *value) G_GNUC_DEPRECATED;
+
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
+
+G_END_DECLS
+
+#endif /* !GDATA_FREEBASE_TOPIC_RESULT_H */
--- /dev/null
+incs += include_directories('.')
+
+include_subdir = gdata_include_subdir / 'services/freebase'
+
+headers = files(
+ 'gdata-freebase-query.h',
+ 'gdata-freebase-result.h',
+ 'gdata-freebase-search-query.h',
+ 'gdata-freebase-search-result.h',
+ 'gdata-freebase-service.h',
+ 'gdata-freebase-topic-query.h',
+ 'gdata-freebase-topic-result.h',
+)
+
+install_headers(
+ headers,
+ subdir: include_subdir,
+)
+
+gir_headers += headers
+
+sources += files(
+ 'gdata-freebase-query.c',
+ 'gdata-freebase-result.c',
+ 'gdata-freebase-search-query.c',
+ 'gdata-freebase-search-result.c',
+ 'gdata-freebase-service.c',
+ 'gdata-freebase-topic-query.c',
+ 'gdata-freebase-topic-result.c',
+)
+
+enums = 'gdata-freebase-enums'
+
+enums_in = gnome.mkenums_simple(
+ enums + '-in',
+ sources: headers,
+)
+
+# FIXME: Work around the namespace being incorrectly detected
+# by glib-mkenums. This needs to be fixed by changing the
+# namespace in libgdata. See !6.
+sources += custom_target(
+ enums + '.c',
+ input: enums_in[0],
+ output: enums + '.c',
+ command: enum_source_cmd,
+ capture: true,
+)
+
+enum_headers += custom_target(
+ enums + '.h',
+ input: enums_in[1],
+ output: enums + '.h',
+ command: enum_header_cmd,
+ capture: true,
+ install: true,
+ install_dir: gdata_includedir / include_subdir,
+)
--- /dev/null
+subdir('calendar')
+subdir('contacts')
+subdir('documents')
+subdir('freebase')
+subdir('picasaweb')
+subdir('tasks')
+subdir('youtube')
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Richard Schwarting 2009 <aquarichy@gmail.com>
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-picasaweb-album
+ * @short_description: GData PicasaWeb album object
+ * @stability: Stable
+ * @include: gdata/services/picasaweb/gdata-picasaweb-album.h
+ *
+ * #GDataPicasaWebAlbum is a subclass of #GDataEntry to represent an album from Google PicasaWeb.
+ *
+ * For more details of Google PicasaWeb's GData API, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html">
+ * online documentation</ulink>.
+ *
+ * <example>
+ * <title>Getting Basic Album Data</title>
+ * <programlisting>
+ * GDataFeed *album_feed;
+ * GList *album_entries;
+ *
+ * /<!-- -->* Query for a feed of GDataPicasaWebAlbums owned by user "libgdata.picasaweb" *<!-- -->/
+ * album_feed = gdata_picasaweb_service_query_all_albums (service, NULL, "libgdata.picasaweb", NULL, NULL, NULL, NULL);
+ *
+ * /<!-- -->* Get a list of GDataPicasaWebAlbums from the query's feed *<!-- -->/
+ * for (album_entries = gdata_feed_get_entries (album_feed); album_entries != NULL; album_entries = album_entries->next) {
+ * GDataPicasaWebAlbum *album;
+ * guint num_photos;
+ * const gchar *owner_nickname, *title, *summary;
+ * gint64 timestamp;
+ * GList *thumbnails;
+ *
+ * album = GDATA_PICASAWEB_ALBUM (album_entries->data);
+ *
+ * /<!-- -->* Get various bits of information about the album *<!-- -->/
+ * num_photos = gdata_picasaweb_album_get_num_photos (album);
+ * owner_nickname = gdata_picasaweb_album_get_nickname (album);
+ * title = gdata_entry_get_title (GDATA_ENTRY (album));
+ * summary = gdata_entry_get_summary (GDATA_ENTRY (album));
+ * /<!-- -->* Get the day the album was shot on or, if not set, when it was uploaded. This is in milliseconds since the epoch. *<!-- -->/
+ * timestamp = gdata_picasaweb_album_get_timestamp (album);
+ *
+ * for (thumbnails = gdata_picasaweb_album_get_thumbnails (album); thumbnails != NULL; thumbnails = thumbnails->next) {
+ * GDataMediaThumbnail *thumbnail;
+ * GDataDownloadStream *download_stream;
+ * GdkPixbuf *pixbuf;
+ *
+ * thumbnail = GDATA_MEDIA_THUMBNAIL (thumbnails->data);
+ * /<!-- -->* Do something fun with the thumbnails, like download and display them. We could just as easily download them into
+ * * files using g_file_create() and g_output_stream_splice(), rather than create GdkPixbufs directly from them.
+ * * Note that this is a blocking operation. *<!-- -->/
+ * download_stream = gdata_media_thumbnail_download (thumbnail, GDATA_SERVICE (service), NULL, NULL);
+ * pixbuf = gdk_pixbuf_new_from_stream (G_INPUT_STREAM (download_stream), NULL, NULL);
+ * g_object_unref (download_stream);
+ * /<!-- -->* ... *<!-- -->/
+ * g_object_unref (pixbuf);
+ * }
+ *
+ * /<!-- -->* Do something worthwhile with your album data *<!-- -->/
+ * }
+ *
+ * g_object_unref (album_feed);
+ * </programlisting>
+ * </example>
+ *
+ * Since: 0.4.0
+ */
+
+/* TODO: support the album cover/icon ? I think this is already done with the thumbnails, but we don't set it yet :( */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <libxml/parser.h>
+#include <string.h>
+
+#include "gdata-picasaweb-album.h"
+#include "gdata-private.h"
+#include "gdata-service.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-types.h"
+#include "media/gdata-media-group.h"
+#include "gdata-picasaweb-enums.h"
+#include "georss/gdata-georss-where.h"
+
+static GObject *gdata_picasaweb_album_constructor (GType type, guint n_construct_params, GObjectConstructParam *construct_params);
+static void gdata_picasaweb_album_dispose (GObject *object);
+static void gdata_picasaweb_album_finalize (GObject *object);
+static void gdata_picasaweb_album_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_picasaweb_album_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void get_xml (GDataParsable *parsable, GString *xml_string);
+static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataPicasaWebAlbumPrivate {
+ gchar *album_id;
+ gchar *user;
+ gchar *nickname;
+ gint64 edited;
+ gchar *location;
+ GDataPicasaWebVisibility visibility;
+ gint64 timestamp; /* in milliseconds! */
+ guint num_photos;
+ guint num_photos_remaining;
+ glong bytes_used;
+ gboolean is_commenting_enabled;
+ guint comment_count;
+
+ /* media:group */
+ GDataMediaGroup *media_group;
+ /* georss:where */
+ GDataGeoRSSWhere *georss_where;
+};
+
+enum {
+ PROP_USER = 1,
+ PROP_NICKNAME,
+ PROP_EDITED,
+ PROP_LOCATION,
+ PROP_VISIBILITY,
+ PROP_TIMESTAMP,
+ PROP_NUM_PHOTOS,
+ PROP_NUM_PHOTOS_REMAINING,
+ PROP_BYTES_USED,
+ PROP_IS_COMMENTING_ENABLED,
+ PROP_COMMENT_COUNT,
+ PROP_TAGS,
+ PROP_LATITUDE,
+ PROP_LONGITUDE,
+ PROP_ALBUM_ID
+};
+
+G_DEFINE_TYPE (GDataPicasaWebAlbum, gdata_picasaweb_album, GDATA_TYPE_ENTRY)
+
+static void
+gdata_picasaweb_album_class_init (GDataPicasaWebAlbumClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+ GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataPicasaWebAlbumPrivate));
+
+ gobject_class->constructor = gdata_picasaweb_album_constructor;
+ gobject_class->get_property = gdata_picasaweb_album_get_property;
+ gobject_class->set_property = gdata_picasaweb_album_set_property;
+ gobject_class->dispose = gdata_picasaweb_album_dispose;
+ gobject_class->finalize = gdata_picasaweb_album_finalize;
+
+ parsable_class->parse_xml = parse_xml;
+ parsable_class->get_xml = get_xml;
+ parsable_class->get_namespaces = get_namespaces;
+
+ entry_class->kind_term = "http://schemas.google.com/photos/2007#album";
+
+ /**
+ * GDataPicasaWebAlbum:album-id:
+ *
+ * The ID of the album. This is a substring of the ID returned by gdata_entry_get_id() for #GDataPicasaWebAlbums; for example,
+ * if gdata_entry_get_id() returned "http://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5328889949261497249" for a
+ * particular #GDataPicasaWebAlbum, the #GDataPicasaWebAlbum:album-id property would be "5328889949261497249".
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#gphoto_id">
+ * gphoto specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_ALBUM_ID,
+ g_param_spec_string ("album-id",
+ "Album ID", "The ID of the album.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebAlbum:user:
+ *
+ * The username of the album owner.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#gphoto_user">
+ * gphoto specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_USER,
+ g_param_spec_string ("user",
+ "User", "The username of the album owner.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebAlbum:nickname:
+ *
+ * The user's nickname. This is a user-specified value that should be used when referring to the user by name.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#gphoto_nickname">
+ * gphoto specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_NICKNAME,
+ g_param_spec_string ("nickname",
+ "Nickname", "The user's nickname.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebAlbum:edited:
+ *
+ * The time this album was last edited. If the album has not been edited yet, the content indicates the time it was created.
+ *
+ * For more information, see the <ulink type="http" url="http://www.atomenabled.org/developers/protocol/#appEdited">
+ * Atom Publishing Protocol specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_EDITED,
+ g_param_spec_int64 ("edited",
+ "Edited", "The time this album was last edited.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebAlbum:location:
+ *
+ * The user-specified location associated with the album. A place name.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#gphoto_location">
+ * gphoto specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LOCATION,
+ g_param_spec_string ("location",
+ "Location", "The user-specified location associated with the album.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebAlbum:visibility:
+ *
+ * The visibility (or access rights) of the album.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#gphoto_access">
+ * gphoto specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_VISIBILITY,
+ g_param_spec_enum ("visibility",
+ "Visibility", "The visibility (or access rights) of the album.",
+ GDATA_TYPE_PICASAWEB_VISIBILITY, GDATA_PICASAWEB_PRIVATE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebAlbum:timestamp:
+ *
+ * The timestamp of when the album occurred, settable by the user. This a UNIX timestamp in milliseconds (not seconds) since the epoch.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#gphoto_timestamp">
+ * gphoto specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_TIMESTAMP,
+ g_param_spec_int64 ("timestamp",
+ "Timestamp", "The timestamp of when the album occurred, settable by the user.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /* TODO: Change to photo-count? */
+ /**
+ * GDataPicasaWebAlbum:num-photos:
+ *
+ * The number of photos and videos in the album.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#gphoto_numphotos">
+ * gphoto specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_NUM_PHOTOS,
+ g_param_spec_uint ("num-photos",
+ "Number of photos", "The number of photos and videos in the album.",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /* TODO: Change to remaining-photos-count? */
+ /**
+ * GDataPicasaWebAlbum:num-photos-remaining:
+ *
+ * The number of photos and videos that can still be uploaded to this album.
+ * This doesn't account for quota, just a hardcoded maximum number per album set by Google.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#gphoto_numphotosremaining">
+ * gphoto specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_NUM_PHOTOS_REMAINING,
+ g_param_spec_uint ("num-photos-remaining",
+ "Number of photo spaces remaining", "The number of files spaces still free for uploads.",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebAlbum:bytes-used:
+ *
+ * The number of bytes consumed by this album and its contents. Note that this is only set if the authenticated user is the owner of the
+ * album; it's otherwise <code class="literal">-1</code>.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#gphoto_bytesUsed">
+ * gphoto specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_BYTES_USED,
+ g_param_spec_long ("bytes-used",
+ "Number of bytes used", "The number of bytes consumed by this album and its contents.",
+ -1, G_MAXLONG, -1,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebAlbum:commenting-enabled:
+ *
+ * Whether commenting is enabled for this album.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_IS_COMMENTING_ENABLED,
+ g_param_spec_boolean ("is-commenting-enabled",
+ "Commenting enabled?", "Whether commenting is enabled for this album.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebAlbum:comment-count:
+ *
+ * The number of comments on the album.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#gphoto_commentCount">
+ * gphoto specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_COMMENT_COUNT,
+ g_param_spec_uint ("comment-count",
+ "Comment count", "The number of comments on the album.",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebAlbum:tags:
+ *
+ * A %NULL-terminated array of tags associated with the album; all the tags associated with the individual photos in the album.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#media_keywords">
+ * Media RSS specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_TAGS,
+ g_param_spec_boxed ("tags",
+ "Tags", "A NULL-terminated array of tags associated with the album",
+ G_TYPE_STRV,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebAlbum:latitude:
+ *
+ * The location as a latitude coordinate associated with this album. Valid latitudes range from <code class="literal">-90.0</code>
+ * to <code class="literal">90.0</code> inclusive.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/docs/2.0/reference.html#georss_where">
+ * GeoRSS specification</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LATITUDE,
+ g_param_spec_double ("latitude",
+ "Latitude", "The location as a latitude coordinate associated with this album.",
+ -90.0, 90.0, 0.0,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebAlbum:longitude:
+ *
+ * The location as a longitude coordinate associated with this album. Valid longitudes range from <code class="literal">-180.0</code>
+ * to <code class="literal">180.0</code> inclusive.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/docs/2.0/reference.html#georss_where">
+ * GeoRSS specification</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LONGITUDE,
+ g_param_spec_double ("longitude",
+ "Longitude", "The location as a longitude coordinate associated with this album.",
+ -180.0, 180.0, 0.0,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+notify_title_cb (GDataPicasaWebAlbum *self, GParamSpec *pspec, gpointer user_data)
+{
+ /* Update our media:group title */
+ if (self->priv->media_group != NULL)
+ gdata_media_group_set_title (self->priv->media_group, gdata_entry_get_title (GDATA_ENTRY (self)));
+}
+
+static void
+notify_summary_cb (GDataPicasaWebAlbum *self, GParamSpec *pspec, gpointer user_data)
+{
+ /* Update our media:group description */
+ if (self->priv->media_group != NULL)
+ gdata_media_group_set_description (self->priv->media_group, gdata_entry_get_summary (GDATA_ENTRY (self)));
+}
+
+static void notify_visibility_cb (GDataPicasaWebAlbum *self, GParamSpec *pspec, gpointer user_data);
+
+static void
+notify_rights_cb (GDataPicasaWebAlbum *self, GParamSpec *pspec, gpointer user_data)
+{
+ const gchar *rights = gdata_entry_get_rights (GDATA_ENTRY (self));
+
+ /* Update our gphoto:visibility */
+ g_signal_handlers_block_by_func (self, notify_visibility_cb, NULL);
+
+ if (rights == NULL || strcmp (rights, "public") == 0) {
+ gdata_picasaweb_album_set_visibility (self, GDATA_PICASAWEB_PUBLIC);
+ } else if (strcmp (rights, "private") == 0) {
+ gdata_picasaweb_album_set_visibility (self, GDATA_PICASAWEB_PRIVATE);
+ } else {
+ /* Print out a warning and leave the visibility as it is */
+ g_warning ("Unknown <rights> or <gd:access> value: %s", rights);
+ }
+
+ g_signal_handlers_unblock_by_func (self, notify_visibility_cb, NULL);
+}
+
+static void
+notify_visibility_cb (GDataPicasaWebAlbum *self, GParamSpec *pspec, gpointer user_data)
+{
+ /* Update our GDataEntry's atom:rights */
+ g_signal_handlers_block_by_func (self, notify_rights_cb, NULL);
+
+ switch (self->priv->visibility) {
+ case GDATA_PICASAWEB_PUBLIC:
+ gdata_entry_set_rights (GDATA_ENTRY (self), "public");
+ break;
+ case GDATA_PICASAWEB_PRIVATE:
+ gdata_entry_set_rights (GDATA_ENTRY (self), "private");
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ g_signal_handlers_unblock_by_func (self, notify_rights_cb, NULL);
+}
+
+static void
+gdata_picasaweb_album_init (GDataPicasaWebAlbum *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_PICASAWEB_ALBUM, GDataPicasaWebAlbumPrivate);
+ self->priv->media_group = g_object_new (GDATA_TYPE_MEDIA_GROUP, NULL);
+ self->priv->georss_where = g_object_new (GDATA_TYPE_GEORSS_WHERE, NULL);
+ self->priv->edited = -1;
+ self->priv->timestamp = -1;
+
+ /* Set the initial visibility */
+ self->priv->visibility = GDATA_PICASAWEB_PRIVATE;
+ gdata_entry_set_rights (GDATA_ENTRY (self), "private");
+
+ /* Connect to the notify::title signal from GDataEntry so our media:group title can be kept in sync
+ * (the title of an album is duplicated in atom:title and media:group/media:title) */
+ g_signal_connect (GDATA_ENTRY (self), "notify::title", G_CALLBACK (notify_title_cb), NULL);
+ /* Connect to the notify::description signal from GDataEntry so our media:group description can be kept in sync
+ * (the description of an album is duplicated in atom:summary and media:group/media:description) */
+ g_signal_connect (GDATA_ENTRY (self), "notify::summary", G_CALLBACK (notify_summary_cb), NULL);
+ /* Connect to the notify::rights signal from GDataEntry so our gphoto:visibility can be kept in sync (and vice-versa)
+ * (visibility settings are duplicated in atom:rights and gphoto:visibility) */
+ g_signal_connect (GDATA_ENTRY (self), "notify::rights", G_CALLBACK (notify_rights_cb), NULL);
+ g_signal_connect (self, "notify::visibility", G_CALLBACK (notify_visibility_cb), NULL);
+}
+
+static GObject *
+gdata_picasaweb_album_constructor (GType type, guint n_construct_params, GObjectConstructParam *construct_params)
+{
+ GObject *object;
+
+ /* Chain up to the parent class */
+ object = G_OBJECT_CLASS (gdata_picasaweb_album_parent_class)->constructor (type, n_construct_params, construct_params);
+
+ if (_gdata_parsable_is_constructed_from_xml (GDATA_PARSABLE (object)) == FALSE) {
+ GDataPicasaWebAlbumPrivate *priv = GDATA_PICASAWEB_ALBUM (object)->priv;
+ GTimeVal time_val;
+
+ /* Set the edited and timestamp properties to the current time (creation time). bgo#599140
+ * We don't do this in *_init() since that would cause setting it from parse_xml() to fail (duplicate element). */
+ g_get_current_time (&time_val);
+ priv->timestamp = (gint64) time_val.tv_sec * 1000;
+ priv->edited = time_val.tv_sec;
+ }
+
+ return object;
+}
+
+static void
+gdata_picasaweb_album_dispose (GObject *object)
+{
+ GDataPicasaWebAlbumPrivate *priv = GDATA_PICASAWEB_ALBUM (object)->priv;
+
+ if (priv->media_group != NULL)
+ g_object_unref (priv->media_group);
+ priv->media_group = NULL;
+
+ if (priv->georss_where != NULL)
+ g_object_unref (priv->georss_where);
+ priv->georss_where = NULL;
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_picasaweb_album_parent_class)->dispose (object);
+}
+
+static void
+gdata_picasaweb_album_finalize (GObject *object)
+{
+ GDataPicasaWebAlbumPrivate *priv = GDATA_PICASAWEB_ALBUM (object)->priv;
+
+ g_free (priv->album_id);
+ g_free (priv->user);
+ g_free (priv->nickname);
+ g_free (priv->location);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_picasaweb_album_parent_class)->finalize (object);
+}
+
+static void
+gdata_picasaweb_album_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataPicasaWebAlbumPrivate *priv = GDATA_PICASAWEB_ALBUM (object)->priv;
+
+ switch (property_id) {
+ case PROP_ALBUM_ID:
+ g_value_set_string (value, priv->album_id);
+ break;
+ case PROP_USER:
+ g_value_set_string (value, priv->user);
+ break;
+ case PROP_NICKNAME:
+ g_value_set_string (value, priv->nickname);
+ break;
+ case PROP_EDITED:
+ g_value_set_int64 (value, priv->edited);
+ break;
+ case PROP_LOCATION:
+ g_value_set_string (value, priv->location);
+ break;
+ case PROP_VISIBILITY:
+ g_value_set_enum (value, priv->visibility);
+ break;
+ case PROP_TIMESTAMP:
+ g_value_set_int64 (value, priv->timestamp);
+ break;
+ case PROP_NUM_PHOTOS:
+ g_value_set_uint (value, priv->num_photos);
+ break;
+ case PROP_NUM_PHOTOS_REMAINING:
+ g_value_set_uint (value, priv->num_photos_remaining);
+ break;
+ case PROP_BYTES_USED:
+ g_value_set_long (value, priv->bytes_used);
+ break;
+ case PROP_IS_COMMENTING_ENABLED:
+ g_value_set_boolean (value, priv->is_commenting_enabled);
+ break;
+ case PROP_COMMENT_COUNT:
+ g_value_set_uint (value, priv->comment_count);
+ break;
+ case PROP_TAGS:
+ g_value_set_boxed (value, gdata_media_group_get_keywords (priv->media_group));
+ break;
+ case PROP_LATITUDE:
+ g_value_set_double (value, gdata_georss_where_get_latitude (priv->georss_where));
+ break;
+ case PROP_LONGITUDE:
+ g_value_set_double (value, gdata_georss_where_get_longitude (priv->georss_where));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_picasaweb_album_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataPicasaWebAlbum *self = GDATA_PICASAWEB_ALBUM (object);
+
+ switch (property_id) {
+ case PROP_ALBUM_ID:
+ /* Construct only */
+ g_free (self->priv->album_id);
+ self->priv->album_id = g_value_dup_string (value);
+ break;
+ case PROP_LOCATION:
+ gdata_picasaweb_album_set_location (self, g_value_get_string (value));
+ break;
+ case PROP_VISIBILITY:
+ gdata_picasaweb_album_set_visibility (self, g_value_get_enum (value));
+ break;
+ case PROP_TIMESTAMP:
+ gdata_picasaweb_album_set_timestamp (self, g_value_get_int64 (value));
+ break;
+ case PROP_IS_COMMENTING_ENABLED:
+ gdata_picasaweb_album_set_is_commenting_enabled (self, g_value_get_boolean (value));
+ break;
+ case PROP_TAGS:
+ gdata_picasaweb_album_set_tags (self, g_value_get_boxed (value));
+ break;
+ case PROP_LATITUDE:
+ gdata_picasaweb_album_set_coordinates (self, g_value_get_double (value),
+ gdata_georss_where_get_longitude (self->priv->georss_where));
+ break;
+ case PROP_LONGITUDE:
+ gdata_picasaweb_album_set_coordinates (self, gdata_georss_where_get_latitude (self->priv->georss_where),
+ g_value_get_double (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ gboolean success;
+ GDataPicasaWebAlbum *self = GDATA_PICASAWEB_ALBUM (parsable);
+
+ /* TODO: media:group should also be P_NO_DUPES, but we can't, as priv->media_group has to be pre-populated
+ * in order for things like gdata_picasaweb_album_get_tags() to work. */
+ if (gdata_parser_is_namespace (node, "http://www.w3.org/2007/app") == TRUE &&
+ gdata_parser_int64_time_from_element (node, "edited", P_REQUIRED | P_NO_DUPES, &(self->priv->edited), &success, error) == TRUE) {
+ return success;
+ } else if (gdata_parser_is_namespace (node, "http://search.yahoo.com/mrss/") == TRUE &&
+ gdata_parser_object_from_element (node, "group", P_REQUIRED, GDATA_TYPE_MEDIA_GROUP,
+ &(self->priv->media_group), &success, error) == TRUE) {
+ return success;
+ } else if (gdata_parser_is_namespace (node, "http://www.georss.org/georss") == TRUE &&
+ gdata_parser_object_from_element (node, "where", P_REQUIRED, GDATA_TYPE_GEORSS_WHERE,
+ &(self->priv->georss_where), &success, error) == TRUE) {
+ return success;
+ } else if (gdata_parser_is_namespace (node, "http://schemas.google.com/photos/2007") == TRUE) {
+ if (gdata_parser_string_from_element (node, "user", P_REQUIRED | P_NON_EMPTY, &(self->priv->user), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "nickname", P_REQUIRED | P_NON_EMPTY, &(self->priv->nickname), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "location", P_NONE, &(self->priv->location), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "id", P_REQUIRED | P_NON_EMPTY | P_NO_DUPES,
+ &(self->priv->album_id), &success, error) == TRUE) {
+ return success;
+ } else if (xmlStrcmp (node->name, (xmlChar*) "access") == 0) {
+ /* gphoto:access */
+ xmlChar *access_level = xmlNodeListGetString (doc, node->children, TRUE);
+ if (xmlStrcmp (access_level, (xmlChar*) "public") == 0) {
+ gdata_picasaweb_album_set_visibility (self, GDATA_PICASAWEB_PUBLIC);
+ } else if (xmlStrcmp (access_level, (xmlChar*) "private") == 0 ||
+ xmlStrcmp (access_level, (xmlChar*) "protected") == 0) {
+ gdata_picasaweb_album_set_visibility (self, GDATA_PICASAWEB_PRIVATE);
+ } else {
+ gdata_parser_error_unknown_content (node, (gchar*) access_level, error);
+ xmlFree (access_level);
+ return FALSE;
+ }
+ xmlFree (access_level);
+ } else if (xmlStrcmp (node->name, (xmlChar*) "timestamp") == 0) {
+ /* gphoto:timestamp */
+ xmlChar *timestamp_str;
+ guint64 milliseconds;
+
+ timestamp_str = xmlNodeListGetString (doc, node->children, TRUE);
+ milliseconds = g_ascii_strtoull ((gchar*) timestamp_str, NULL, 10);
+ xmlFree (timestamp_str);
+
+ gdata_picasaweb_album_set_timestamp (self, (gint64) milliseconds);
+ } else if (xmlStrcmp (node->name, (xmlChar*) "numphotos") == 0) {
+ /* gphoto:numphotos */
+ xmlChar *num_photos = xmlNodeListGetString (doc, node->children, TRUE);
+ if (num_photos == NULL || *num_photos == '\0') {
+ xmlFree (num_photos);
+ return gdata_parser_error_required_content_missing (node, error);
+ }
+
+ self->priv->num_photos = g_ascii_strtoull ((char*) num_photos, NULL, 10);
+ xmlFree (num_photos);
+ } else if (xmlStrcmp (node->name, (xmlChar*) "numphotosremaining") == 0) {
+ /* gphoto:numphotosremaining */
+ xmlChar *num_photos_remaining = xmlNodeListGetString (doc, node->children, TRUE);
+ if (num_photos_remaining == NULL || *num_photos_remaining == '\0') {
+ xmlFree (num_photos_remaining);
+ return gdata_parser_error_required_content_missing (node, error);
+ }
+
+ self->priv->num_photos_remaining = g_ascii_strtoull ((char*) num_photos_remaining, NULL, 10);
+ xmlFree (num_photos_remaining);
+ } else if (xmlStrcmp (node->name, (xmlChar*) "bytesUsed") == 0) {
+ /* gphoto:bytesUsed */
+ xmlChar *bytes_used = xmlNodeListGetString (doc, node->children, TRUE);
+ if (bytes_used == NULL || *bytes_used == '\0') {
+ xmlFree (bytes_used);
+ return gdata_parser_error_required_content_missing (node, error);
+ }
+
+ self->priv->bytes_used = g_ascii_strtoll ((char*) bytes_used, NULL, 10);
+ xmlFree (bytes_used);
+ } else if (xmlStrcmp (node->name, (xmlChar*) "commentingEnabled") == 0) {
+ /* gphoto:commentingEnabled */
+ xmlChar *commenting_enabled = xmlNodeListGetString (doc, node->children, TRUE);
+ if (commenting_enabled == NULL || *commenting_enabled == '\0') {
+ xmlFree (commenting_enabled);
+ return gdata_parser_error_required_content_missing (node, error);
+ }
+
+ gdata_picasaweb_album_set_is_commenting_enabled (self,
+ (xmlStrcmp (commenting_enabled, (xmlChar*) "true") == 0) ? TRUE : FALSE);
+ xmlFree (commenting_enabled);
+ } else if (xmlStrcmp (node->name, (xmlChar*) "commentCount") == 0) {
+ /* gphoto:commentCount */
+ xmlChar *comment_count = xmlNodeListGetString (doc, node->children, TRUE);
+ if (comment_count == NULL || *comment_count == '\0') {
+ xmlFree (comment_count);
+ return gdata_parser_error_required_content_missing (node, error);
+ }
+
+ self->priv->comment_count = g_ascii_strtoull ((char*) comment_count, NULL, 10);
+ xmlFree (comment_count);
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_picasaweb_album_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ }
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_picasaweb_album_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ }
+
+ return TRUE;
+}
+
+static void
+get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataPicasaWebAlbumPrivate *priv = GDATA_PICASAWEB_ALBUM (parsable)->priv;
+
+ /* Chain up to the parent class */
+ GDATA_PARSABLE_CLASS (gdata_picasaweb_album_parent_class)->get_xml (parsable, xml_string);
+
+ /* Add all the album-specific XML */
+ if (priv->album_id != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<gphoto:id>", priv->album_id, "</gphoto:id>");
+
+ if (priv->location != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<gphoto:location>", priv->location, "</gphoto:location>");
+
+ switch (priv->visibility) {
+ case GDATA_PICASAWEB_PUBLIC:
+ g_string_append (xml_string, "<gphoto:access>public</gphoto:access>");
+ break;
+ case GDATA_PICASAWEB_PRIVATE:
+ g_string_append (xml_string, "<gphoto:access>private</gphoto:access>");
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ if (priv->timestamp != -1) {
+ /* in milliseconds */
+ g_string_append_printf (xml_string, "<gphoto:timestamp>%" G_GINT64_FORMAT "</gphoto:timestamp>", priv->timestamp);
+ }
+
+ if (priv->is_commenting_enabled == FALSE)
+ g_string_append (xml_string, "<gphoto:commentingEnabled>false</gphoto:commentingEnabled>");
+ else
+ g_string_append (xml_string, "<gphoto:commentingEnabled>true</gphoto:commentingEnabled>");
+
+ /* media:group */
+ _gdata_parsable_get_xml (GDATA_PARSABLE (priv->media_group), xml_string, FALSE);
+
+ /* georss:where */
+ if (priv->georss_where != NULL && gdata_georss_where_get_latitude (priv->georss_where) != G_MAXDOUBLE &&
+ gdata_georss_where_get_longitude (priv->georss_where) != G_MAXDOUBLE) {
+ _gdata_parsable_get_xml (GDATA_PARSABLE (priv->georss_where), xml_string, FALSE);
+ }
+
+ /* TODO:
+ * - Finish supporting all tags
+ * - Check all tags here are valid for insertions and updates
+ */
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ GDataPicasaWebAlbumPrivate *priv = GDATA_PICASAWEB_ALBUM (parsable)->priv;
+
+ /* Chain up to the parent class */
+ GDATA_PARSABLE_CLASS (gdata_picasaweb_album_parent_class)->get_namespaces (parsable, namespaces);
+
+ g_hash_table_insert (namespaces, (gchar*) "gphoto", (gchar*) "http://schemas.google.com/photos/2007");
+ g_hash_table_insert (namespaces, (gchar*) "app", (gchar*) "http://www.w3.org/2007/app");
+
+ /* Add the media:group namespaces */
+ GDATA_PARSABLE_GET_CLASS (priv->media_group)->get_namespaces (GDATA_PARSABLE (priv->media_group), namespaces);
+ /* Add the georss:where namespaces */
+ GDATA_PARSABLE_GET_CLASS (priv->georss_where)->get_namespaces (GDATA_PARSABLE (priv->georss_where), namespaces);
+}
+
+/**
+ * gdata_picasaweb_album_new:
+ * @id: (allow-none): the album's entry ID, or %NULL
+ *
+ * Creates a new #GDataPicasaWebAlbum with the given ID and default properties. @id is the ID which would be returned by gdata_entry_get_id(),
+ * not gdata_picasaweb_album_get_id().
+ *
+ * If @id is not %NULL and can't be parsed to extract an album ID, %NULL will be returned.
+ *
+ * Return value: a new #GDataPicasaWebAlbum, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.4.0
+ */
+GDataPicasaWebAlbum *
+gdata_picasaweb_album_new (const gchar *id)
+{
+ const gchar *album_id = NULL, *i;
+
+ if (id != NULL) {
+ album_id = g_strrstr (id, "/");
+ if (album_id == NULL)
+ return NULL;
+ album_id++; /* skip the slash */
+
+ /* Ensure the @album_id is entirely numeric */
+ for (i = album_id; *i != '\0'; i = g_utf8_next_char (i)) {
+ if (g_unichar_isdigit (g_utf8_get_char (i)) == FALSE)
+ return NULL;
+ }
+ }
+
+ return GDATA_PICASAWEB_ALBUM (g_object_new (GDATA_TYPE_PICASAWEB_ALBUM, "id", id, "album-id", album_id, NULL));
+}
+
+/**
+ * gdata_picasaweb_album_get_id:
+ * @self: a #GDataPicasaWebAlbum
+ *
+ * Gets the #GDataPicasaWebAlbum:album-id property.
+ *
+ * Return value: the album's ID
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_picasaweb_album_get_id (GDataPicasaWebAlbum *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_ALBUM (self), NULL);
+ return self->priv->album_id;
+}
+
+/**
+ * gdata_picasaweb_album_get_user:
+ * @self: a #GDataPicasaWebAlbum
+ *
+ * Gets the #GDataPicasaWebAlbum:user property.
+ *
+ * Return value: the album owner's username
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_picasaweb_album_get_user (GDataPicasaWebAlbum *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_ALBUM (self), NULL);
+ return self->priv->user;
+}
+
+/**
+ * gdata_picasaweb_album_get_nickname:
+ * @self: a #GDataPicasaWebAlbum
+ *
+ * Gets the #GDataPicasaWebAlbum:nickname property.
+ *
+ * Return value: the album owner's nickname
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_picasaweb_album_get_nickname (GDataPicasaWebAlbum *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_ALBUM (self), NULL);
+ return self->priv->nickname;
+}
+
+/**
+ * gdata_picasaweb_album_get_edited:
+ * @self: a #GDataPicasaWebAlbum
+ *
+ * Gets the #GDataPicasaWebAlbum:edited property. If the property is unset, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the UNIX timestamp for the time the album was last edited, or <code class="literal">-1</code>
+ *
+ * Since: 0.4.0
+ */
+gint64
+gdata_picasaweb_album_get_edited (GDataPicasaWebAlbum *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_ALBUM (self), -1);
+ return self->priv->edited;
+}
+
+/**
+ * gdata_picasaweb_album_get_location:
+ * @self: a #GDataPicasaWebAlbum
+ *
+ * Gets the #GDataPicasaWebAlbum:location property.
+ *
+ * Return value: the album's location, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_picasaweb_album_get_location (GDataPicasaWebAlbum *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_ALBUM (self), NULL);
+ return self->priv->location;
+}
+
+/**
+ * gdata_picasaweb_album_set_location:
+ * @self: a #GDataPicasaWebAlbum
+ * @location: (allow-none): the new album location, or %NULL
+ *
+ * Sets the #GDataPicasaWebAlbum:location property to @location.
+ *
+ * Set @location to %NULL to unset the property.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_picasaweb_album_set_location (GDataPicasaWebAlbum *self, const gchar *location)
+{
+ g_return_if_fail (GDATA_IS_PICASAWEB_ALBUM (self));
+
+ g_free (self->priv->location);
+ self->priv->location = g_strdup (location);
+ g_object_notify (G_OBJECT (self), "location");
+}
+
+/**
+ * gdata_picasaweb_album_get_visibility:
+ * @self: a #GDataPicasaWebAlbum
+ *
+ * Gets the #GDataPicasaWebAlbum:visibility property.
+ *
+ * Return value: the album's visibility level
+ *
+ * Since: 0.4.0
+ */
+GDataPicasaWebVisibility
+gdata_picasaweb_album_get_visibility (GDataPicasaWebAlbum *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_ALBUM (self), GDATA_PICASAWEB_PUBLIC);
+ return self->priv->visibility;
+}
+
+/**
+ * gdata_picasaweb_album_set_visibility:
+ * @self: a #GDataPicasaWebAlbum
+ * @visibility: the new album visibility level
+ *
+ * Sets the #GDataPicasaWebAlbum:visibility property to @visibility.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_picasaweb_album_set_visibility (GDataPicasaWebAlbum *self, GDataPicasaWebVisibility visibility)
+{
+ g_return_if_fail (GDATA_IS_PICASAWEB_ALBUM (self));
+
+ self->priv->visibility = visibility;
+ g_object_notify (G_OBJECT (self), "visibility");
+}
+
+/**
+ * gdata_picasaweb_album_get_timestamp:
+ * @self: a #GDataPicasaWebAlbum
+ *
+ * Gets the #GDataPicasaWebAlbum:timestamp property. This value usually holds either the date that best corresponds to the album of photos, or to the
+ * day it was uploaded. It's a UNIX timestamp in milliseconds (not seconds) since the epoch. If the property is unset, <code class="literal">-1</code>
+ * will be returned.
+ *
+ * Return value: the UNIX timestamp for the timestamp property in milliseconds, or <code class="literal">-1</code>
+ *
+ * Since: 0.4.0
+ */
+gint64
+gdata_picasaweb_album_get_timestamp (GDataPicasaWebAlbum *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_ALBUM (self), -1);
+ return self->priv->timestamp;
+}
+
+/**
+ * gdata_picasaweb_album_set_timestamp:
+ * @self: a #GDataPicasaWebAlbum
+ * @timestamp: a UNIX timestamp, or <code class="literal">-1</code>
+ *
+ * Sets the #GDataPicasaWebAlbum:timestamp property from @timestamp. This should be a UNIX timestamp in milliseconds (not seconds) since the epoch.
+ *
+ * Set @timestamp to <code class="literal">-1</code> to unset the property.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_picasaweb_album_set_timestamp (GDataPicasaWebAlbum *self, gint64 timestamp)
+{
+ g_return_if_fail (GDATA_IS_PICASAWEB_ALBUM (self));
+ g_return_if_fail (timestamp >= -1);
+
+ self->priv->timestamp = timestamp;
+ g_object_notify (G_OBJECT (self), "timestamp");
+}
+
+/**
+ * gdata_picasaweb_album_get_num_photos:
+ * @self: a #GDataPicasaWebAlbum
+ *
+ * Gets the #GDataPicasaWebAlbum:num-photos property.
+ *
+ * Return value: the number of photos currently in the album
+ *
+ * Since: 0.4.0
+ */
+guint
+gdata_picasaweb_album_get_num_photos (GDataPicasaWebAlbum *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_ALBUM (self), 0);
+ return self->priv->num_photos;
+}
+
+/**
+ * gdata_picasaweb_album_get_num_photos_remaining:
+ * @self: a #GDataPicasaWebAlbum
+ *
+ * Gets the #GDataPicasaWebAlbum:num-photos-remaining property.
+ *
+ * Return value: the number of photos that can still be uploaded to the album
+ *
+ * Since: 0.4.0
+ */
+guint
+gdata_picasaweb_album_get_num_photos_remaining (GDataPicasaWebAlbum *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_ALBUM (self), 0);
+ return self->priv->num_photos_remaining;
+}
+
+/**
+ * gdata_picasaweb_album_get_bytes_used:
+ * @self: a #GDataPicasaWebAlbum
+ *
+ * Gets the #GDataPicasaWebAlbum:bytes-used property. It will return <code class="literal">-1</code> if the current authenticated
+ * user is not the owner of the album.
+ *
+ * Return value: the number of bytes used by the album and its contents, or <code class="literal">-1</code>
+ *
+ * Since: 0.4.0
+ */
+glong
+gdata_picasaweb_album_get_bytes_used (GDataPicasaWebAlbum *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_ALBUM (self), -1);
+ return self->priv->bytes_used;
+}
+
+/**
+ * gdata_picasaweb_album_is_commenting_enabled:
+ * @self: a #GDataPicasaWebAlbum
+ *
+ * Gets the #GDataPicasaWebAlbum:is-commenting-enabled property.
+ *
+ * Return value: %TRUE if commenting is enabled for the album, %FALSE otherwise
+ *
+ * Since: 0.4.0
+ */
+gboolean
+gdata_picasaweb_album_is_commenting_enabled (GDataPicasaWebAlbum *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_ALBUM (self), FALSE);
+ return self->priv->is_commenting_enabled;
+}
+
+/**
+ * gdata_picasaweb_album_set_is_commenting_enabled:
+ * @self: a #GDataPicasaWebAlbum
+ * @is_commenting_enabled: %TRUE if commenting should be enabled for the album, %FALSE otherwise
+ *
+ * Sets the #GDataPicasaWebAlbum:is-commenting-enabled property to @is_commenting_enabled.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_picasaweb_album_set_is_commenting_enabled (GDataPicasaWebAlbum *self, gboolean is_commenting_enabled)
+{
+ g_return_if_fail (GDATA_IS_PICASAWEB_ALBUM (self));
+ self->priv->is_commenting_enabled = is_commenting_enabled;
+ g_object_notify (G_OBJECT (self), "is-commenting-enabled");
+}
+
+/**
+ * gdata_picasaweb_album_get_comment_count:
+ * @self: a #GDataPicasaWebAlbum
+ *
+ * Gets the #GDataPicasaWebAlbum:comment-count property.
+ *
+ * Return value: the number of comments on the album
+ *
+ * Since: 0.4.0
+ */
+guint
+gdata_picasaweb_album_get_comment_count (GDataPicasaWebAlbum *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_ALBUM (self), 0);
+ return self->priv->comment_count;
+}
+
+/**
+ * gdata_picasaweb_album_get_tags:
+ * @self: a #GDataPicasaWebAlbum
+ *
+ * Gets the #GDataPicasaWebAlbum:tags property.
+ *
+ * Return value: (array zero-terminated=1) (transfer none): a %NULL-terminated array of tags associated with all the photos in the album, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar * const *
+gdata_picasaweb_album_get_tags (GDataPicasaWebAlbum *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_ALBUM (self), NULL);
+ return gdata_media_group_get_keywords (self->priv->media_group);
+}
+
+/**
+ * gdata_picasaweb_album_set_tags:
+ * @self: a #GDataPicasaWebAlbum
+ * @tags: (array zero-terminated=1) (allow-none): the new %NULL-terminated array of tags, or %NULL
+ *
+ * Sets the #GDataPicasaWebAlbum:tags property to @tags.
+ *
+ * Set @tags to %NULL to unset the album's tag list.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_picasaweb_album_set_tags (GDataPicasaWebAlbum *self, const gchar * const *tags)
+{
+ g_return_if_fail (GDATA_IS_PICASAWEB_ALBUM (self));
+
+ gdata_media_group_set_keywords (self->priv->media_group, tags);
+ g_object_notify (G_OBJECT (self), "tags");
+}
+
+/**
+ * gdata_picasaweb_album_get_contents:
+ * @self: a #GDataPicasaWebAlbum
+ *
+ * Returns a list of media content, such as the cover image for the album.
+ *
+ * Return value: (element-type GData.MediaContent) (transfer none): a #GList of #GDataMediaContent items
+ *
+ * Since: 0.4.0
+ */
+GList *
+gdata_picasaweb_album_get_contents (GDataPicasaWebAlbum *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_ALBUM (self), NULL);
+ return gdata_media_group_get_contents (self->priv->media_group);
+}
+
+/**
+ * gdata_picasaweb_album_get_thumbnails:
+ * @self: a #GDataPicasaWebAlbum
+ *
+ * Returns a list of thumbnails, often at different sizes, for this album.
+ *
+ * Return value: (element-type GData.MediaThumbnail) (transfer none): a #GList of #GDataMediaThumbnails, or %NULL
+ *
+ * Since: 0.4.0
+ */
+GList *
+gdata_picasaweb_album_get_thumbnails (GDataPicasaWebAlbum *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_ALBUM (self), NULL);
+ return gdata_media_group_get_thumbnails (self->priv->media_group);
+}
+
+/**
+ * gdata_picasaweb_album_get_coordinates:
+ * @self: a #GDataPicasaWebAlbum
+ * @latitude: (out caller-allocates) (allow-none): return location for the latitude, or %NULL
+ * @longitude: (out caller-allocates) (allow-none): return location for the longitude, or %NULL
+ *
+ * Gets the #GDataPicasaWebAlbum:latitude and #GDataPicasaWebAlbum:longitude properties,
+ * setting the out parameters to them. If either latitude or longitude is %NULL, that parameter will not be set.
+ * If the coordinates are unset, @latitude and @longitude will be set to %G_MAXDOUBLE.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_picasaweb_album_get_coordinates (GDataPicasaWebAlbum *self, gdouble *latitude, gdouble *longitude)
+{
+ g_return_if_fail (GDATA_IS_PICASAWEB_ALBUM (self));
+
+ if (latitude != NULL)
+ *latitude = gdata_georss_where_get_latitude (self->priv->georss_where);
+ if (longitude != NULL)
+ *longitude = gdata_georss_where_get_longitude (self->priv->georss_where);
+}
+
+/**
+ * gdata_picasaweb_album_set_coordinates:
+ * @self: a #GDataPicasaWebAlbum
+ * @latitude: the album's new latitude coordinate, or %G_MAXDOUBLE
+ * @longitude: the album's new longitude coordinate, or %G_MAXDOUBLE
+ *
+ * Sets the #GDataPicasaWebAlbum:latitude and #GDataPicasaWebAlbum:longitude properties to
+ * @latitude and @longitude respectively.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_picasaweb_album_set_coordinates (GDataPicasaWebAlbum *self, gdouble latitude, gdouble longitude)
+{
+ g_return_if_fail (GDATA_IS_PICASAWEB_ALBUM (self));
+
+ gdata_georss_where_set_latitude (self->priv->georss_where, latitude);
+ gdata_georss_where_set_longitude (self->priv->georss_where, longitude);
+
+ g_object_freeze_notify (G_OBJECT (self));
+ g_object_notify (G_OBJECT (self), "latitude");
+ g_object_notify (G_OBJECT (self), "longitude");
+ g_object_thaw_notify (G_OBJECT (self));
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Richard Schwarting 2009 <aquarichy@gmail.com>
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_PICASWEB_ALBUM_H
+#define GDATA_PICASWEB_ALBUM_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-entry.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDataPicasaWebVisibility:
+ * @GDATA_PICASAWEB_PUBLIC: the album is visible to everyone, regardless of whether they're authenticated
+ * @GDATA_PICASAWEB_PRIVATE: the album is visible only to authenticated users in an allowlist
+ *
+ * Visibility statuses available for albums on PicasaWeb. For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#Visibility">online documentation</ulink>.
+ *
+ * Since: 0.4.0
+ */
+typedef enum {
+ GDATA_PICASAWEB_PUBLIC = 1,
+ GDATA_PICASAWEB_PRIVATE
+} GDataPicasaWebVisibility;
+
+#define GDATA_TYPE_PICASAWEB_ALBUM (gdata_picasaweb_album_get_type ())
+#define GDATA_PICASAWEB_ALBUM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_PICASAWEB_ALBUM, GDataPicasaWebAlbum))
+#define GDATA_PICASAWEB_ALBUM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_PICASAWEB_ALBUM, GDataPicasaWebAlbumClass))
+#define GDATA_IS_PICASAWEB_ALBUM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_PICASAWEB_ALBUM))
+#define GDATA_IS_PICASAWEB_ALBUM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_PICASAWEB_ALBUM))
+#define GDATA_PICASAWEB_ALBUM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_PICASAWEB_ALBUM, GDataPicasaWebAlbumClass))
+
+typedef struct _GDataPicasaWebAlbumPrivate GDataPicasaWebAlbumPrivate;
+
+/**
+ * GDataPicasaWebAlbum:
+ *
+ * All the fields in the #GDataPicasaWebAlbum structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ GDataEntry parent;
+ GDataPicasaWebAlbumPrivate *priv;
+} GDataPicasaWebAlbum;
+
+/**
+ * GDataPicasaWebAlbumClass:
+ *
+ * All the fields in the #GDataPicasaWebAlbumClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataEntryClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataPicasaWebAlbumClass;
+
+GType gdata_picasaweb_album_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataPicasaWebAlbum, g_object_unref)
+
+GDataPicasaWebAlbum *gdata_picasaweb_album_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_picasaweb_album_get_id (GDataPicasaWebAlbum *self) G_GNUC_PURE;
+const gchar *gdata_picasaweb_album_get_user (GDataPicasaWebAlbum *self) G_GNUC_PURE;
+const gchar *gdata_picasaweb_album_get_nickname (GDataPicasaWebAlbum *self) G_GNUC_PURE;
+gint64 gdata_picasaweb_album_get_edited (GDataPicasaWebAlbum *self);
+const gchar *gdata_picasaweb_album_get_location (GDataPicasaWebAlbum *self) G_GNUC_PURE;
+void gdata_picasaweb_album_set_location (GDataPicasaWebAlbum *self, const gchar *location);
+GDataPicasaWebVisibility gdata_picasaweb_album_get_visibility (GDataPicasaWebAlbum *self) G_GNUC_PURE;
+void gdata_picasaweb_album_set_visibility (GDataPicasaWebAlbum *self, GDataPicasaWebVisibility visibility);
+gint64 gdata_picasaweb_album_get_timestamp (GDataPicasaWebAlbum *self);
+void gdata_picasaweb_album_set_timestamp (GDataPicasaWebAlbum *self, gint64 timestamp);
+guint gdata_picasaweb_album_get_num_photos (GDataPicasaWebAlbum *self) G_GNUC_PURE;
+guint gdata_picasaweb_album_get_num_photos_remaining (GDataPicasaWebAlbum *self) G_GNUC_PURE;
+glong gdata_picasaweb_album_get_bytes_used (GDataPicasaWebAlbum *self) G_GNUC_PURE;
+gboolean gdata_picasaweb_album_is_commenting_enabled (GDataPicasaWebAlbum *self) G_GNUC_PURE;
+void gdata_picasaweb_album_set_is_commenting_enabled (GDataPicasaWebAlbum *self, gboolean is_commenting_enabled);
+guint gdata_picasaweb_album_get_comment_count (GDataPicasaWebAlbum *self) G_GNUC_PURE;
+const gchar * const *gdata_picasaweb_album_get_tags (GDataPicasaWebAlbum *self) G_GNUC_PURE;
+void gdata_picasaweb_album_set_tags (GDataPicasaWebAlbum *self, const gchar * const *tags);
+GList *gdata_picasaweb_album_get_contents (GDataPicasaWebAlbum *self) G_GNUC_PURE;
+GList *gdata_picasaweb_album_get_thumbnails (GDataPicasaWebAlbum *self) G_GNUC_PURE;
+void gdata_picasaweb_album_get_coordinates (GDataPicasaWebAlbum *self, gdouble *latitude, gdouble *longitude);
+void gdata_picasaweb_album_set_coordinates (GDataPicasaWebAlbum *self, gdouble latitude, gdouble longitude);
+
+G_END_DECLS
+
+#endif /* !GDATA_PICASAWEB_ALBUM_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2011 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-picasaweb-comment
+ * @short_description: GData PicasaWeb comment object
+ * @stability: Stable
+ * @include: gdata/services/picasaweb/gdata-picasaweb-comment.h
+ *
+ * #GDataPicasaWebComment is a subclass of #GDataComment to represent a comment on a #GDataPicasaWebFile. It is returned by the #GDataCommentable
+ * interface implementation on #GDataPicasaWebFile.
+ *
+ * It's possible to query for, add and delete #GDataPicasaWebComments from #GDataPicasaWebFiles.
+ *
+ * Since: 0.10.0
+ */
+
+#include <config.h>
+#include <glib.h>
+
+#include "gdata-picasaweb-comment.h"
+
+static void gdata_picasaweb_comment_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_picasaweb_comment_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+
+enum {
+ PROP_ETAG = 1,
+};
+
+G_DEFINE_TYPE (GDataPicasaWebComment, gdata_picasaweb_comment, GDATA_TYPE_COMMENT)
+
+static void
+gdata_picasaweb_comment_class_init (GDataPicasaWebCommentClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
+
+ gobject_class->get_property = gdata_picasaweb_comment_get_property;
+ gobject_class->set_property = gdata_picasaweb_comment_set_property;
+
+ entry_class->kind_term = "http://schemas.google.com/photos/2007#comment";
+
+ /* Override the ETag property since ETags don't seem to be supported for PicasaWeb comments. */
+ g_object_class_override_property (gobject_class, PROP_ETAG, "etag");
+}
+
+static void
+gdata_picasaweb_comment_init (GDataPicasaWebComment *self)
+{
+ /* Nothing to see here. */
+}
+
+static void
+gdata_picasaweb_comment_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ switch (property_id) {
+ case PROP_ETAG:
+ /* Never return an ETag */
+ g_value_set_string (value, NULL);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_picasaweb_comment_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ switch (property_id) {
+ case PROP_ETAG:
+ /* Never set an ETag (note that this doesn't stop it being set in GDataEntry due to XML parsing) */
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+/**
+ * gdata_picasaweb_comment_new:
+ * @id: the comment's ID, or %NULL
+ *
+ * Creates a new #GDataPicasaWebComment with the given ID and default properties.
+ *
+ * Return value: a new #GDataPicasaWebComment; unref with g_object_unref()
+ *
+ * Since: 0.10.0
+ */
+GDataPicasaWebComment *
+gdata_picasaweb_comment_new (const gchar *id)
+{
+ return GDATA_PICASAWEB_COMMENT (g_object_new (GDATA_TYPE_PICASAWEB_COMMENT,
+ "id", id,
+ NULL));
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2011 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_PICASAWEB_COMMENT_H
+#define GDATA_PICASAWEB_COMMENT_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-comment.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_PICASAWEB_COMMENT (gdata_picasaweb_comment_get_type ())
+#define GDATA_PICASAWEB_COMMENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_PICASAWEB_COMMENT, GDataPicasaWebComment))
+#define GDATA_PICASAWEB_COMMENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_PICASAWEB_COMMENT, GDataPicasaWebCommentClass))
+#define GDATA_IS_PICASAWEB_COMMENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_PICASAWEB_COMMENT))
+#define GDATA_IS_PICASAWEB_COMMENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_PICASAWEB_COMMENT))
+#define GDATA_PICASAWEB_COMMENT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_PICASAWEB_COMMENT, GDataPicasaWebCommentClass))
+
+typedef struct _GDataPicasaWebCommentPrivate GDataPicasaWebCommentPrivate;
+
+/**
+ * GDataPicasaWebComment:
+ *
+ * All the fields in the #GDataPicasaWebComment structure are private and should never be accessed directly.
+ *
+ * Since: 0.10.0
+ */
+typedef struct {
+ GDataComment parent;
+ GDataPicasaWebCommentPrivate *priv;
+} GDataPicasaWebComment;
+
+/**
+ * GDataPicasaWebCommentClass:
+ *
+ * All the fields in the #GDataPicasaWebCommentClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.10.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataCommentClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataPicasaWebCommentClass;
+
+GType gdata_picasaweb_comment_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataPicasaWebComment, g_object_unref)
+
+GDataPicasaWebComment *gdata_picasaweb_comment_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+G_END_DECLS
+
+#endif /* !GDATA_PICASAWEB_COMMENT_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ * Copyright (C) Richard Schwarting 2009–2010 <aquarichy@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-picasaweb-feed
+ * @short_description: GData PicasaWeb Feed object
+ * @stability: Stable
+ * @include: gdata/services/picasaweb/gdata-picasaweb-feed.h
+ *
+ * #GDataPicasaWebFeed is a subclass of #GDataFeed to represent properties for a PicasaWeb feed. It adds a couple of
+ * properties which are specific to the Google PicasaWeb API.
+ *
+ * Since: 0.6.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+
+#include "gdata-picasaweb-feed.h"
+#include "gdata-feed.h"
+#include "gdata-private.h"
+
+static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error);
+
+G_DEFINE_TYPE (GDataPicasaWebFeed, gdata_picasaweb_feed, GDATA_TYPE_FEED)
+
+static void
+gdata_picasaweb_feed_class_init (GDataPicasaWebFeedClass *klass)
+{
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+ parsable_class->parse_xml = parse_xml;
+}
+
+static void
+gdata_picasaweb_feed_init (GDataPicasaWebFeed *self)
+{
+ /* Nothing to see here */
+}
+
+static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ if (gdata_parser_is_namespace (node, "http://schemas.google.com/photos/2007") == TRUE) {
+ if (xmlStrcmp (node->name, (xmlChar*) "user") == 0 ||
+ xmlStrcmp (node->name, (xmlChar*) "nickname") == 0 ||
+ xmlStrcmp (node->name, (xmlChar*) "quotacurrent") == 0 ||
+ xmlStrcmp (node->name, (xmlChar*) "quotalimit") == 0 ||
+ xmlStrcmp (node->name, (xmlChar*) "maxPhotosPerAlbum") == 0 ||
+ xmlStrcmp (node->name, (xmlChar*) "thumbnail") == 0 ||
+ xmlStrcmp (node->name, (xmlChar*) "allowDownloads") == 0 ||
+ xmlStrcmp (node->name, (xmlChar*) "allowPrints") == 0 ||
+ xmlStrcmp (node->name, (xmlChar*) "id") == 0 ||
+ xmlStrcmp (node->name, (xmlChar*) "rights") == 0 ||
+ xmlStrcmp (node->name, (xmlChar*) "location") == 0 ||
+ xmlStrcmp (node->name, (xmlChar*) "access") == 0 ||
+ xmlStrcmp (node->name, (xmlChar*) "timestamp") == 0 ||
+ xmlStrcmp (node->name, (xmlChar*) "numphotos") == 0 ||
+ xmlStrcmp (node->name, (xmlChar*) "numphotosremaining") == 0 ||
+ xmlStrcmp (node->name, (xmlChar*) "bytesUsed") == 0) {
+ /* From user's feed of album entries. Redundant with user entry represented by #GDataPicasaWebUser.
+ * Capturing and ignoring. See bgo #589858. */
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_picasaweb_feed_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ }
+ } else if (gdata_parser_is_namespace (node, "http://www.georss.org/georss") == TRUE && xmlStrcmp (node->name, (xmlChar*) "where") == 0) {
+ /* From user's feed of album entries. Redundant with user entry represented by #GDataPicasaWebUser.
+ * Capturing and ignoring. See bgo #589858. */
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_picasaweb_feed_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ }
+
+ return TRUE;
+}
+
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ * Copyright (C) Richard Schwarting 2009 <aquarichy@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_PICASAWEB_FEED_H
+#define GDATA_PICASAWEB_FEED_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-feed.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_PICASAWEB_FEED (gdata_picasaweb_feed_get_type ())
+#define GDATA_PICASAWEB_FEED(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_PICASAWEB_FEED, GDataPicasaWebFeed))
+#define GDATA_PICASAWEB_FEED_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_PICASAWEB_FEED, GDataPicasaWebFeedClass))
+#define GDATA_IS_PICASAWEB_FEED(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_PICASAWEB_FEED))
+#define GDATA_IS_PICASAWEB_FEED_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_PICASAWEB_FEED))
+#define GDATA_PICASAWEB_FEED_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_PICASAWEB_FEED, GDataPicasaWebFeedClass))
+
+/**
+ * GDataPicasaWebFeed:
+ *
+ * All the fields in the #GDataPicasaWebFeed structure are private and should never be accessed directly.
+ *
+ * Since: 0.6.0
+ */
+typedef struct {
+ GDataFeed parent;
+ /*< private >*/
+ gpointer padding1; /* reserved for private struct */
+} GDataPicasaWebFeed;
+
+/**
+ * GDataPicasaWebFeedClass:
+ *
+ * All the fields in the #GDataPicasaWebFeedClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.6.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataFeedClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataPicasaWebFeedClass;
+
+GType gdata_picasaweb_feed_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataPicasaWebFeed, g_object_unref)
+
+G_END_DECLS
+
+#endif /* !GDATA_PICASAWEB_FEED_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Richard Schwarting 2009 <aquarichy@gmail.com>
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-picasaweb-file
+ * @short_description: GData PicasaWeb file object
+ * @stability: Stable
+ * @include: gdata/services/picasaweb/gdata-picasaweb-file.h
+ *
+ * #GDataPicasaWebFile is a subclass of #GDataEntry to represent a file (photo or video) in an album on Google PicasaWeb.
+ *
+ * #GDataPicasaWebFile implements #GDataCommentable, allowing comments on files to be queried using gdata_commentable_query_comments(), new
+ * comments to be added to files using gdata_commentable_insert_comment() and existing comments to be deleted from files using
+ * gdata_commentable_delete_comment().
+ *
+ * For more details of Google PicasaWeb's GData API, see the
+ * <ulink type="http" url="http://code.google.com/apis/picasaweb/developers_guide_protocol.html">online documentation</ulink>.
+ *
+ * <example>
+ * <title>Getting Basic Photo Data</title>
+ * <programlisting>
+ * GDataFeed *photo_feed;
+ * GList *photo_entries;
+ *
+ * /<!-- -->* Query for a feed of GDataPicasaWebFiles belonging to the given GDataPicasaWebAlbum album *<!-- -->/
+ * photo_feed = gdata_picasaweb_service_query_files (service, album, NULL, NULL, NULL, NULL, NULL);
+ *
+ * /<!-- -->* Get a list of GDataPicasaWebFiles from the query's feed *<!-- -->/
+ * for (photo_entries = gdata_feed_get_entries (photo_feed); photo_entries != NULL; photo_entries = photo_entries->next) {
+ * GDataPicasaWebFile *photo;
+ * guint height, width;
+ * gsize file_size;
+ * gint64 timestamp;
+ * const gchar *title, *summary;
+ * GList *contents;
+ *
+ * photo = GDATA_PICASAWEB_FILE (photo_entries->data);
+ *
+ * /<!-- -->* Get various bits of information about the photo *<!-- -->/
+ * height = gdata_picasaweb_file_get_height (photo);
+ * width = gdata_picasaweb_file_get_width (photo);
+ * file_size = gdata_picasaweb_file_get_size (photo);
+ * timestamp = gdata_picasaweb_file_get_timestamp (photo);
+ * title = gdata_entry_get_title (GDATA_ENTRY (photo));
+ * summary = gdata_entry_get_summary (GDATA_ENTRY (photo));
+ *
+ * /<!-- -->* Obtain the image data at various sizes *<!-- -->/
+ * for (contents = gdata_picasaweb_file_get_contents (photo); contents != NULL; contents = contents->next) {
+ * GDataMediaContent *content;
+ * GDataDownloadStream *download_stream;
+ * GFileOutputStream *file_stream;
+ * GFile *new_file;
+ *
+ * content = GDATA_MEDIA_CONTENT (contents->data);
+ * /<!-- -->* Do something fun with the actual images, like download them to a file.
+ * * Note that this is a blocking operation. *<!-- -->/
+ * download_stream = gdata_media_content_download (content, GDATA_SERVICE (service), NULL, NULL);
+ * new_file = g_file_new_for_path (file_path);
+ * file_stream = g_file_create (new_file, G_FILE_CREATE_NONE, NULL, NULL);
+ * g_output_stream_splice (G_OUTPUT_STREAM (file_stream), G_INPUT_STREAM (download_stream),
+ * G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, NULL, NULL);
+ * g_object_unref (file_stream);
+ * g_object_unref (download_stream);
+ * /<!-- -->* ... *<!-- -->/
+ * g_object_unref (new_file);
+ * }
+ *
+ * /<!-- -->* Do something worthwhile with your image data *<!-- -->/
+ * }
+ *
+ * g_object_unref (photo_feed);
+ * </programlisting>
+ * </example>
+ *
+ * Since: 0.4.0
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <libxml/parser.h>
+#include <string.h>
+
+#include "gdata-picasaweb-file.h"
+#include "gdata-private.h"
+#include "gdata-service.h"
+#include "gdata-parser.h"
+#include "gdata-types.h"
+#include "media/gdata-media-group.h"
+#include "exif/gdata-exif-tags.h"
+#include "georss/gdata-georss-where.h"
+#include "gd/gdata-gd-feed-link.h"
+#include "gdata-commentable.h"
+#include "gdata-picasaweb-comment.h"
+#include "gdata-picasaweb-service.h"
+
+static GObject *gdata_picasaweb_file_constructor (GType type, guint n_construct_params, GObjectConstructParam *construct_params);
+static void gdata_picasaweb_file_dispose (GObject *object);
+static void gdata_picasaweb_file_finalize (GObject *object);
+static void gdata_picasaweb_file_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_picasaweb_file_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void get_xml (GDataParsable *parsable, GString *xml_string);
+static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+static gchar *get_entry_uri (const gchar *id) G_GNUC_WARN_UNUSED_RESULT;
+GDataAuthorizationDomain *get_authorization_domain (GDataCommentable *self) G_GNUC_CONST;
+static gchar *get_query_comments_uri (GDataCommentable *self) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
+static gchar *get_insert_comment_uri (GDataCommentable *self, GDataComment *comment_) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
+static gboolean is_comment_deletable (GDataCommentable *self, GDataComment *comment_);
+static void gdata_picasaweb_file_commentable_init (GDataCommentableInterface *iface);
+
+struct _GDataPicasaWebFilePrivate {
+ gchar *file_id;
+ gint64 edited;
+ gchar *version;
+ gchar *album_id;
+ guint width;
+ guint height;
+ gsize size;
+ gchar *checksum;
+ gint64 timestamp; /* in milliseconds! */
+ gboolean is_commenting_enabled;
+ guint comment_count;
+ guint rotation;
+ gchar *video_status;
+
+ /* media:group */
+ GDataMediaGroup *media_group;
+ /* exif:tags */
+ GDataExifTags *exif_tags;
+ /* georss:where */
+ GDataGeoRSSWhere *georss_where;
+};
+
+enum {
+ PROP_EDITED = 1,
+ PROP_VERSION,
+ PROP_ALBUM_ID,
+ PROP_WIDTH,
+ PROP_HEIGHT,
+ PROP_SIZE,
+ PROP_CHECKSUM,
+ PROP_TIMESTAMP,
+ PROP_IS_COMMENTING_ENABLED,
+ PROP_COMMENT_COUNT,
+ PROP_ROTATION,
+ PROP_VIDEO_STATUS,
+ PROP_CREDIT,
+ PROP_CAPTION,
+ PROP_TAGS,
+ PROP_DISTANCE,
+ PROP_EXPOSURE,
+ PROP_FLASH,
+ PROP_FOCAL_LENGTH,
+ PROP_FSTOP,
+ PROP_IMAGE_UNIQUE_ID,
+ PROP_ISO,
+ PROP_MAKE,
+ PROP_MODEL,
+ PROP_LATITUDE,
+ PROP_LONGITUDE,
+ PROP_FILE_ID
+};
+
+G_DEFINE_TYPE_WITH_CODE (GDataPicasaWebFile, gdata_picasaweb_file, GDATA_TYPE_ENTRY,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMMENTABLE, gdata_picasaweb_file_commentable_init))
+
+static void
+gdata_picasaweb_file_class_init (GDataPicasaWebFileClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+ GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataPicasaWebFilePrivate));
+
+ gobject_class->constructor = gdata_picasaweb_file_constructor;
+ gobject_class->get_property = gdata_picasaweb_file_get_property;
+ gobject_class->set_property = gdata_picasaweb_file_set_property;
+ gobject_class->dispose = gdata_picasaweb_file_dispose;
+ gobject_class->finalize = gdata_picasaweb_file_finalize;
+
+ parsable_class->get_xml = get_xml;
+ parsable_class->parse_xml = parse_xml;
+ parsable_class->get_namespaces = get_namespaces;
+
+ entry_class->get_entry_uri = get_entry_uri;
+ entry_class->kind_term = "http://schemas.google.com/photos/2007#photo";
+
+ /**
+ * GDataPicasaWebFile:file-id:
+ *
+ * The ID of the file. This is a substring of the ID returned by gdata_entry_get_id() for #GDataPicasaWebFiles; for example,
+ * if gdata_entry_get_id() returned
+ * "http://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5328889949261497249/photoid/5328890138794566386" for a
+ * particular #GDataPicasaWebFile, the #GDataPicasaWebFile:file-id property would be "5328890138794566386".
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#gphoto_id">
+ * gphoto specification</ulink>.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_FILE_ID,
+ g_param_spec_string ("file-id",
+ "File ID", "The ID of the file.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebFile:version:
+ *
+ * The version number of the file. Version numbers are based on modification time, so they don't increment linearly.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#gphoto_version">
+ * gphoto specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_VERSION,
+ g_param_spec_string ("version",
+ "Version", "The version number of the file.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebFile:album-id:
+ *
+ * The ID for the file's album. This is in the same form as returned by gdata_picasaweb_album_get_id().
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#gphoto_albumid">
+ * gphoto specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_ALBUM_ID,
+ g_param_spec_string ("album-id",
+ "Album ID", "The ID for the file's album.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebFile:checksum:
+ *
+ * A checksum of the file, useful for duplicate detection.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#gphoto_checksum">
+ * gphoto specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_CHECKSUM,
+ g_param_spec_string ("checksum",
+ "Checksum", "A checksum of the file, useful for duplicate detection.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebFile:video-status:
+ *
+ * The status of the file, if it is a video. For example: %GDATA_PICASAWEB_VIDEO_STATUS_PENDING or %GDATA_PICASAWEB_VIDEO_STATUS_FAILED.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#gphoto_videostatus">
+ * gphoto specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_VIDEO_STATUS,
+ g_param_spec_string ("video-status",
+ "Video Status", "The status of the file, if it is a video.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebFile:width:
+ *
+ * The width of the photo or video, in pixels.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#gphoto_width">
+ * gphoto specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_WIDTH,
+ g_param_spec_uint ("width",
+ "Width", "The width of the photo or video, in pixels.",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebFile:height:
+ *
+ * The height of the photo or video, in pixels.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#gphoto_height">
+ * gphoto specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_HEIGHT,
+ g_param_spec_uint ("height",
+ "Height", "The height of the photo or video, in pixels.",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebFile:size:
+ *
+ * The size of the file, in bytes.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#gphoto_size">
+ * gphoto specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SIZE,
+ g_param_spec_ulong ("size",
+ "Size", "The size of the file, in bytes.",
+ 0, G_MAXULONG, 0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebFile:edited:
+ *
+ * The time this file was last edited. If the file has not been edited yet, the content indicates the time it was created.
+ *
+ * For more information, see the <ulink type="http" url="http://www.atomenabled.org/developers/protocol/#appEdited">
+ * Atom Publishing Protocol specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_EDITED,
+ g_param_spec_int64 ("edited",
+ "Edited", "The time this file was last edited.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebFile:timestamp:
+ *
+ * The time the file was purportedly taken. This a UNIX timestamp in milliseconds (not seconds) since the epoch.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#gphoto_timestamp">
+ * gphoto specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_TIMESTAMP,
+ g_param_spec_int64 ("timestamp",
+ "Timestamp", "The time the file was purportedly taken.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebFile:comment-count:
+ *
+ * The number of comments on the file.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#gphoto_commentCount">
+ * gphoto specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_COMMENT_COUNT,
+ g_param_spec_uint ("comment-count",
+ "Comment Count", "The number of comments on the file.",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebFile:rotation:
+ *
+ * The rotation of the photo, in degrees. This will only be non-zero for files which are pending rotation, and haven't yet been
+ * permanently modified. For files which have already been rotated, this will be <code class="literal">0</code>.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#gphoto_rotation">
+ * gphoto specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_ROTATION,
+ g_param_spec_uint ("rotation",
+ "Rotation", "The rotation of the photo, in degrees.",
+ 0, 359, 0,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebFile:is-commenting-enabled:
+ *
+ * Whether commenting is enabled for this file.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_IS_COMMENTING_ENABLED,
+ g_param_spec_boolean ("is-commenting-enabled",
+ "Commenting enabled?", "Indicates whether comments are enabled.",
+ TRUE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebFile:credit:
+ *
+ * The nickname of the user credited with this file.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#media_credit">Media RSS
+ * specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_CREDIT,
+ g_param_spec_string ("credit",
+ "Credit", "The nickname of the user credited with this file.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebFile:caption:
+ *
+ * The file's descriptive caption.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_CAPTION,
+ g_param_spec_string ("caption",
+ "Caption", "The file's descriptive caption.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebFile:tags:
+ *
+ * A %NULL-terminated array of tags associated with the file.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#media_keywords">
+ * Media RSS specification</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_TAGS,
+ g_param_spec_boxed ("tags",
+ "Tags", "A NULL-terminated array of tags associated with the file.",
+ G_TYPE_STRV,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebFile:distance:
+ *
+ * The distance to the subject reported in the image's EXIF.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#exif_reference">
+ * EXIF element reference</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_DISTANCE,
+ g_param_spec_double ("distance",
+ "Distance", "The distance to the subject.",
+ -1.0, G_MAXDOUBLE, -1.0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebFile:exposure:
+ *
+ * The exposure time.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#exif_reference">
+ * EXIF element reference</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_EXPOSURE,
+ g_param_spec_double ("exposure",
+ "Exposure", "The exposure time.",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebFile:flash:
+ *
+ * Indicates whether the flash was used.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#exif_reference">
+ * EXIF element reference</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_FLASH,
+ g_param_spec_boolean ("flash",
+ "Flash", "Indicates whether the flash was used.",
+ FALSE,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebFile:focal-length:
+ *
+ * The focal length for the shot.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#exif_reference">
+ * EXIF element reference</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_FOCAL_LENGTH,
+ g_param_spec_double ("focal-length",
+ "Focal Length", "The focal length used in the shot.",
+ -1.0, G_MAXDOUBLE, -1.0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /* TODO: Rename to f-stop */
+ /**
+ * GDataPicasaWebFile:fstop:
+ *
+ * The F-stop value.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#exif_reference">
+ * EXIF element reference</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_FSTOP,
+ g_param_spec_double ("fstop",
+ "F-stop", "The F-stop used.",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebFile:image-unique-id:
+ *
+ * An unique ID for the image found in the EXIF.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#exif_reference">
+ * EXIF element reference</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_IMAGE_UNIQUE_ID,
+ g_param_spec_string ("image-unique-id",
+ "Image Unique ID", "An unique ID for the image.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebFile:iso:
+ *
+ * The ISO speed.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#exif_reference">
+ * EXIF element reference</ulink> and ISO 5800:1987.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_ISO,
+ g_param_spec_long ("iso",
+ "ISO", "The ISO speed.",
+ -1, G_MAXLONG, -1,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebFile:make:
+ *
+ * The name of the manufacturer of the camera.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#exif_reference">
+ * EXIF element reference</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_MAKE,
+ g_param_spec_string ("make",
+ "Make", "The name of the manufacturer.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebFile:model:
+ *
+ * The model of the camera.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#exif_reference">
+ * EXIF element reference</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_MODEL,
+ g_param_spec_string ("model",
+ "Model", "The model of the camera.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebFile:latitude:
+ *
+ * The location as a latitude coordinate associated with this file. Valid latitudes range from <code class="literal">-90.0</code>
+ * to <code class="literal">90.0</code> inclusive.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/docs/2.0/reference.html#georss_where">
+ * GeoRSS specification</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LATITUDE,
+ g_param_spec_double ("latitude",
+ "Latitude", "The location as a latitude coordinate associated with this file.",
+ -90.0, 90.0, 0.0,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebFile:longitude:
+ *
+ * The location as a longitude coordinate associated with this file. Valid longitudes range from <code class="literal">-180.0</code>
+ * to <code class="literal">180.0</code> inclusive.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/docs/2.0/reference.html#georss_where">
+ * GeoRSS specification</ulink>.
+ *
+ * Since: 0.5.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LONGITUDE,
+ g_param_spec_double ("longitude",
+ "Longitude", "The location as a longitude coordinate associated with this file.",
+ -180.0, 180.0, 0.0,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_picasaweb_file_commentable_init (GDataCommentableInterface *iface)
+{
+ iface->comment_type = GDATA_TYPE_PICASAWEB_COMMENT;
+ iface->get_authorization_domain = get_authorization_domain;
+ iface->get_query_comments_uri = get_query_comments_uri;
+ iface->get_insert_comment_uri = get_insert_comment_uri;
+ iface->is_comment_deletable = is_comment_deletable;
+}
+
+static void
+notify_title_cb (GDataPicasaWebFile *self, GParamSpec *pspec, gpointer user_data)
+{
+ /* Keep the atom:title and media:group/media:title in sync */
+ if (self->priv->media_group != NULL)
+ gdata_media_group_set_title (self->priv->media_group, gdata_entry_get_title (GDATA_ENTRY (self)));
+}
+
+static void
+notify_summary_cb (GDataPicasaWebFile *self, GParamSpec *pspec, gpointer user_data)
+{
+ /* Keep the atom:summary and media:group/media:description in sync */
+ if (self->priv->media_group != NULL)
+ gdata_media_group_set_description (self->priv->media_group, gdata_entry_get_summary (GDATA_ENTRY (self)));
+}
+
+static void
+gdata_picasaweb_file_init (GDataPicasaWebFile *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_PICASAWEB_FILE, GDataPicasaWebFilePrivate);
+ self->priv->media_group = g_object_new (GDATA_TYPE_MEDIA_GROUP, NULL);
+ self->priv->exif_tags = g_object_new (GDATA_TYPE_EXIF_TAGS, NULL);
+ self->priv->georss_where = g_object_new (GDATA_TYPE_GEORSS_WHERE, NULL);
+ self->priv->is_commenting_enabled = TRUE;
+ self->priv->edited = -1;
+ self->priv->timestamp = -1;
+
+ /* We need to keep atom:title (the canonical title for the file) in sync with media:group/media:title */
+ g_signal_connect (self, "notify::title", G_CALLBACK (notify_title_cb), NULL);
+ /* atom:summary (the canonical summary/caption for the file) in sync with media:group/media:description */
+ g_signal_connect (self, "notify::summary", G_CALLBACK (notify_summary_cb), NULL);
+}
+
+static GObject *
+gdata_picasaweb_file_constructor (GType type, guint n_construct_params, GObjectConstructParam *construct_params)
+{
+ GObject *object;
+
+ /* Chain up to the parent class */
+ object = G_OBJECT_CLASS (gdata_picasaweb_file_parent_class)->constructor (type, n_construct_params, construct_params);
+
+ if (_gdata_parsable_is_constructed_from_xml (GDATA_PARSABLE (object)) == FALSE) {
+ GDataPicasaWebFilePrivate *priv = GDATA_PICASAWEB_FILE (object)->priv;
+ GTimeVal time_val;
+
+ /* Set the edited and timestamp properties to the current time (creation time). bgo#599140
+ * We don't do this in *_init() since that would cause setting it from parse_xml() to fail (duplicate element). */
+ g_get_current_time (&time_val);
+ priv->timestamp = (gint64) time_val.tv_sec * 1000;
+ priv->edited = time_val.tv_sec;
+ }
+
+ return object;
+}
+
+static void
+gdata_picasaweb_file_dispose (GObject *object)
+{
+ GDataPicasaWebFilePrivate *priv = GDATA_PICASAWEB_FILE (object)->priv;
+
+ if (priv->media_group != NULL)
+ g_object_unref (priv->media_group);
+ priv->media_group = NULL;
+
+ if (priv->exif_tags != NULL)
+ g_object_unref (priv->exif_tags);
+ priv->exif_tags = NULL;
+
+ if (priv->georss_where != NULL)
+ g_object_unref (priv->georss_where);
+ priv->georss_where = NULL;
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_picasaweb_file_parent_class)->dispose (object);
+}
+
+static void
+gdata_picasaweb_file_finalize (GObject *object)
+{
+ GDataPicasaWebFilePrivate *priv = GDATA_PICASAWEB_FILE (object)->priv;
+
+ g_free (priv->file_id);
+ g_free (priv->version);
+ g_free (priv->album_id);
+ g_free (priv->checksum);
+ g_free (priv->video_status);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_picasaweb_file_parent_class)->finalize (object);
+}
+
+static void
+gdata_picasaweb_file_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataPicasaWebFilePrivate *priv = GDATA_PICASAWEB_FILE (object)->priv;
+
+ switch (property_id) {
+ case PROP_FILE_ID:
+ g_value_set_string (value, priv->file_id);
+ break;
+ case PROP_EDITED:
+ g_value_set_int64 (value, priv->edited);
+ break;
+ case PROP_VERSION:
+ g_value_set_string (value, priv->version);
+ break;
+ case PROP_ALBUM_ID:
+ g_value_set_string (value, priv->album_id);
+ break;
+ case PROP_WIDTH:
+ g_value_set_uint (value, priv->width);
+ break;
+ case PROP_HEIGHT:
+ g_value_set_uint (value, priv->height);
+ break;
+ case PROP_SIZE:
+ g_value_set_ulong (value, priv->size);
+ break;
+ case PROP_CHECKSUM:
+ g_value_set_string (value, priv->checksum);
+ break;
+ case PROP_TIMESTAMP:
+ g_value_set_int64 (value, priv->timestamp);
+ break;
+ case PROP_IS_COMMENTING_ENABLED:
+ g_value_set_boolean (value, priv->is_commenting_enabled);
+ break;
+ case PROP_COMMENT_COUNT:
+ g_value_set_uint (value, priv->comment_count);
+ break;
+ case PROP_ROTATION:
+ g_value_set_uint (value, priv->rotation);
+ break;
+ case PROP_VIDEO_STATUS:
+ g_value_set_string (value, priv->video_status);
+ break;
+ case PROP_CREDIT: {
+ GDataMediaCredit *credit = gdata_media_group_get_credit (priv->media_group);
+ g_value_set_string (value, gdata_media_credit_get_credit (credit));
+ break; }
+ case PROP_CAPTION:
+ g_value_set_string (value, gdata_entry_get_summary (GDATA_ENTRY (object)));
+ break;
+ case PROP_TAGS:
+ g_value_set_boxed (value, gdata_media_group_get_keywords (priv->media_group));
+ break;
+ case PROP_DISTANCE:
+ g_value_set_double (value, gdata_exif_tags_get_distance (priv->exif_tags));
+ break;
+ case PROP_EXPOSURE:
+ g_value_set_double (value, gdata_exif_tags_get_exposure (priv->exif_tags));
+ break;
+ case PROP_FLASH:
+ g_value_set_boolean (value, gdata_exif_tags_get_flash (priv->exif_tags));
+ break;
+ case PROP_FOCAL_LENGTH:
+ g_value_set_double (value, gdata_exif_tags_get_focal_length (priv->exif_tags));
+ break;
+ case PROP_FSTOP:
+ g_value_set_double (value, gdata_exif_tags_get_fstop (priv->exif_tags));
+ break;
+ case PROP_IMAGE_UNIQUE_ID:
+ g_value_set_string (value, gdata_exif_tags_get_image_unique_id (priv->exif_tags));
+ break;
+ case PROP_ISO:
+ g_value_set_long (value, gdata_exif_tags_get_iso (priv->exif_tags));
+ break;
+ case PROP_MAKE:
+ g_value_set_string (value, gdata_exif_tags_get_make (priv->exif_tags));
+ break;
+ case PROP_MODEL:
+ g_value_set_string (value, gdata_exif_tags_get_model (priv->exif_tags));
+ break;
+ case PROP_LATITUDE:
+ g_value_set_double (value, gdata_georss_where_get_latitude (priv->georss_where));
+ break;
+ case PROP_LONGITUDE:
+ g_value_set_double (value, gdata_georss_where_get_longitude (priv->georss_where));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_picasaweb_file_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataPicasaWebFile *self = GDATA_PICASAWEB_FILE (object);
+
+ switch (property_id) {
+ case PROP_FILE_ID:
+ /* Construct only */
+ g_free (self->priv->file_id);
+ self->priv->file_id = g_value_dup_string (value);
+ break;
+ case PROP_VERSION:
+ /* Construct only */
+ g_free (self->priv->version);
+ self->priv->version = g_value_dup_string (value);
+ break;
+ case PROP_ALBUM_ID:
+ /* TODO: do we allow this to change albums? I think that's how pictures are moved. */
+ gdata_picasaweb_file_set_album_id (self, g_value_get_string (value));
+ break;
+ case PROP_CHECKSUM:
+ gdata_picasaweb_file_set_checksum (self, g_value_get_string (value));
+ break;
+ case PROP_TIMESTAMP:
+ gdata_picasaweb_file_set_timestamp (self, g_value_get_int64 (value));
+ break;
+ case PROP_IS_COMMENTING_ENABLED: /* TODO I don't think we can change this on a per file basis */
+ gdata_picasaweb_file_set_is_commenting_enabled (self, g_value_get_boolean (value));
+ break;
+ case PROP_ROTATION:
+ gdata_picasaweb_file_set_rotation (self, g_value_get_uint (value));
+ break;
+ case PROP_CAPTION:
+ gdata_picasaweb_file_set_caption (self, g_value_get_string (value));
+ break;
+ case PROP_TAGS:
+ gdata_picasaweb_file_set_tags (self, g_value_get_boxed (value));
+ break;
+ case PROP_LATITUDE:
+ gdata_picasaweb_file_set_coordinates (self, g_value_get_double (value),
+ gdata_georss_where_get_longitude (self->priv->georss_where));
+ break;
+ case PROP_LONGITUDE:
+ gdata_picasaweb_file_set_coordinates (self, gdata_georss_where_get_latitude (self->priv->georss_where),
+ g_value_get_double (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ gboolean success;
+ GDataPicasaWebFile *self = GDATA_PICASAWEB_FILE (parsable);
+
+ /* TODO: media:group should also be P_NO_DUPES, but we can't, as priv->media_group has to be pre-populated
+ * in order for things like gdata_picasaweb_file_set_description() to work. */
+ if (gdata_parser_is_namespace (node, "http://www.w3.org/2007/app") == TRUE &&
+ gdata_parser_int64_time_from_element (node, "edited", P_REQUIRED | P_NO_DUPES, &(self->priv->edited), &success, error) == TRUE) {
+ return success;
+ } else if (gdata_parser_is_namespace (node, "http://search.yahoo.com/mrss/") == TRUE &&
+ gdata_parser_object_from_element (node, "group", P_REQUIRED, GDATA_TYPE_MEDIA_GROUP,
+ &(self->priv->media_group), &success, error) == TRUE) {
+ return success;
+ } else if (gdata_parser_is_namespace (node, "http://www.georss.org/georss") == TRUE &&
+ gdata_parser_object_from_element (node, "where", P_REQUIRED, GDATA_TYPE_GEORSS_WHERE,
+ &(self->priv->georss_where), &success, error) == TRUE) {
+ return success;
+ } else if (gdata_parser_is_namespace (node, "http://schemas.google.com/photos/exif/2007") == TRUE &&
+ gdata_parser_object_from_element (node, "tags", P_REQUIRED, GDATA_TYPE_EXIF_TAGS,
+ &(self->priv->exif_tags), &success, error) == TRUE) {
+ return success;
+ } else if (gdata_parser_is_namespace (node, "http://schemas.google.com/photos/2007") == TRUE) {
+ if (gdata_parser_string_from_element (node, "videostatus", P_NO_DUPES, &(self->priv->video_status), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "imageVersion", P_NONE, &(self->priv->version), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "albumid", P_NONE, &(self->priv->album_id), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "checksum", P_NONE, &(self->priv->checksum), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "id", P_REQUIRED | P_NON_EMPTY | P_NO_DUPES,
+ &(self->priv->file_id), &success, error) == TRUE) {
+ return success;
+ } else if (xmlStrcmp (node->name, (xmlChar*) "width") == 0) {
+ /* gphoto:width */
+ xmlChar *width = xmlNodeListGetString (doc, node->children, TRUE);
+ self->priv->width = g_ascii_strtoull ((gchar*) width, NULL, 10);
+ xmlFree (width);
+ } else if (xmlStrcmp (node->name, (xmlChar*) "height") == 0) {
+ /* gphoto:height */
+ xmlChar *height = xmlNodeListGetString (doc, node->children, TRUE);
+ self->priv->height = g_ascii_strtoull ((gchar*) height, NULL, 10);
+ xmlFree (height);
+ } else if (xmlStrcmp (node->name, (xmlChar*) "size") == 0) {
+ /* gphoto:size */
+ xmlChar *size = xmlNodeListGetString (doc, node->children, TRUE);
+ self->priv->size = g_ascii_strtoull ((gchar*) size, NULL, 10);
+ xmlFree (size);
+ } else if (xmlStrcmp (node->name, (xmlChar*) "timestamp") == 0) {
+ /* gphoto:timestamp */
+ xmlChar *timestamp_str;
+ guint64 milliseconds;
+
+ timestamp_str = xmlNodeListGetString (doc, node->children, TRUE);
+ milliseconds = g_ascii_strtoull ((gchar*) timestamp_str, NULL, 10);
+ xmlFree (timestamp_str);
+
+ gdata_picasaweb_file_set_timestamp (self, (gint64) milliseconds);
+ } else if (xmlStrcmp (node->name, (xmlChar*) "commentingEnabled") == 0) {
+ /* gphoto:commentingEnabled */
+ xmlChar *is_commenting_enabled = xmlNodeListGetString (doc, node->children, TRUE);
+ if (is_commenting_enabled == NULL)
+ return gdata_parser_error_required_content_missing (node, error);
+ self->priv->is_commenting_enabled = (xmlStrcmp (is_commenting_enabled, (xmlChar*) "true") == 0 ? TRUE : FALSE);
+ xmlFree (is_commenting_enabled);
+ } else if (xmlStrcmp (node->name, (xmlChar*) "commentCount") == 0) {
+ /* gphoto:commentCount */
+ xmlChar *comment_count = xmlNodeListGetString (doc, node->children, TRUE);
+ self->priv->comment_count = g_ascii_strtoull ((gchar*) comment_count, NULL, 10);
+ xmlFree (comment_count);
+ } else if (xmlStrcmp (node->name, (xmlChar*) "access") == 0) {
+ /* gphoto:access */
+ /* Visibility is already obtained through the album. When PicasaWeb supports per-file access restrictions,
+ * we'll expose this property. Until then, we'll catch this to suppress the Unhandled XML warning.
+ * See https://bugzilla.gnome.org/show_bug.cgi?id=589858 */
+ } else if (xmlStrcmp (node->name, (xmlChar*) "rotation") == 0) {
+ /* gphoto:rotation */
+ xmlChar *rotation = xmlNodeListGetString (doc, node->children, TRUE);
+ gdata_picasaweb_file_set_rotation (self, g_ascii_strtoull ((gchar*) rotation, NULL, 10));
+ xmlFree (rotation);
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_picasaweb_file_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ }
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_picasaweb_file_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ }
+
+ return TRUE;
+}
+
+static void
+get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataPicasaWebFilePrivate *priv = GDATA_PICASAWEB_FILE (parsable)->priv;
+
+ /* Chain up to the parent class */
+ GDATA_PARSABLE_CLASS (gdata_picasaweb_file_parent_class)->get_xml (parsable, xml_string);
+
+ /* Add all the PicasaWeb-specific XML */
+ if (priv->file_id != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<gphoto:id>", priv->file_id, "</gphoto:id>");
+
+ if (priv->version != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<gphoto:imageVersion>", priv->version, "</gphoto:imageVersion>");
+
+ if (priv->album_id != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<gphoto:albumid>", priv->album_id, "</gphoto:albumid>");
+
+ if (priv->checksum != NULL)
+ gdata_parser_string_append_escaped (xml_string, "<gphoto:checksum>", priv->checksum, "</gphoto:checksum>");
+
+ if (priv->timestamp != -1) {
+ /* timestamp is in milliseconds */
+ g_string_append_printf (xml_string, "<gphoto:timestamp>%" G_GINT64_FORMAT "</gphoto:timestamp>", priv->timestamp);
+ }
+
+ if (priv->is_commenting_enabled == TRUE)
+ g_string_append (xml_string, "<gphoto:commentingEnabled>true</gphoto:commentingEnabled>");
+ else
+ g_string_append (xml_string, "<gphoto:commentingEnabled>false</gphoto:commentingEnabled>");
+
+ if (priv->rotation > 0)
+ g_string_append_printf (xml_string, "<gphoto:rotation>%u</gphoto:rotation>", priv->rotation);
+
+ /* media:group */
+ _gdata_parsable_get_xml (GDATA_PARSABLE (priv->media_group), xml_string, FALSE);
+
+ /* georss:where */
+ if (priv->georss_where != NULL && gdata_georss_where_get_latitude (priv->georss_where) != G_MAXDOUBLE &&
+ gdata_georss_where_get_longitude (priv->georss_where) != G_MAXDOUBLE) {
+ _gdata_parsable_get_xml (GDATA_PARSABLE (priv->georss_where), xml_string, FALSE);
+ }
+
+ /* TODO:
+ * - Finish supporting all tags
+ * - Check all tags here are valid for insertions and updates
+ */
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ GDataPicasaWebFilePrivate *priv = GDATA_PICASAWEB_FILE (parsable)->priv;
+
+ /* Chain up to the parent class */
+ GDATA_PARSABLE_CLASS (gdata_picasaweb_file_parent_class)->get_namespaces (parsable, namespaces);
+
+ g_hash_table_insert (namespaces, (gchar*) "gphoto", (gchar*) "http://schemas.google.com/photos/2007");
+ g_hash_table_insert (namespaces, (gchar*) "app", (gchar*) "http://www.w3.org/2007/app");
+
+ /* Add the media:group namespaces */
+ GDATA_PARSABLE_GET_CLASS (priv->media_group)->get_namespaces (GDATA_PARSABLE (priv->media_group), namespaces);
+ /* Add the exif:tags namespaces */
+ GDATA_PARSABLE_GET_CLASS (priv->exif_tags)->get_namespaces (GDATA_PARSABLE (priv->exif_tags), namespaces);
+ /* Add the georss:where namespaces */
+ GDATA_PARSABLE_GET_CLASS (priv->georss_where)->get_namespaces (GDATA_PARSABLE (priv->georss_where), namespaces);
+}
+
+static gchar *
+get_entry_uri (const gchar *id)
+{
+ /* For files, the ID is of the form: "http://picasaweb.google.com/data/entry/user/liz/albumid/albumID/photoid/photoID"
+ * whereas the URI is of the form: "http://picasaweb.google.com/data/entry/api/user/liz/albumid/albumID/photoid/photoID" */
+ gchar **parts, *uri;
+
+ parts = g_strsplit (id, "/entry/user/", 2);
+ g_assert (parts[0] != NULL && parts[1] != NULL && parts[2] == NULL);
+ uri = g_strconcat (parts[0], "/entry/api/user/", parts[1], NULL);
+ g_strfreev (parts);
+
+ return uri;
+}
+
+GDataAuthorizationDomain *
+get_authorization_domain (GDataCommentable *self)
+{
+ return gdata_picasaweb_service_get_primary_authorization_domain ();
+}
+
+static gchar *
+get_query_comments_uri (GDataCommentable *self)
+{
+ GDataLink *_link;
+ SoupURI *uri;
+ GHashTable *query;
+ gchar *output_uri;
+
+ /* Get the feed link of the form: https://picasaweb.google.com/data/feed/api/user/[userID]/albumid/[albumID]/photoid/[photoID] */
+ _link = gdata_entry_look_up_link (GDATA_ENTRY (self), "http://schemas.google.com/g/2005#feed");
+ g_assert (_link != NULL);
+
+ /* We're going to query the comments belonging to the photo, so add the comment kind. This link isn't available as a normal <link> on
+ * photos. It's of the form: https://picasaweb.google.com/data/feed/api/user/[userID]/albumid/[albumID]/photoid/[photoID]?kind=comment */
+ uri = soup_uri_new (gdata_link_get_uri (_link));
+ query = soup_form_decode (uri->query);
+
+ g_hash_table_replace (query, g_strdup ("kind"), (gchar*) "comment"); /* libsoup only specifies a destruction function for the key */
+ soup_uri_set_query_from_form (uri, query);
+ output_uri = soup_uri_to_string (uri, FALSE);
+
+ g_hash_table_destroy (query);
+ soup_uri_free (uri);
+
+ return output_uri;
+}
+
+static gchar *
+get_insert_comment_uri (GDataCommentable *self, GDataComment *comment_)
+{
+ GDataLink *_link;
+
+ _link = gdata_entry_look_up_link (GDATA_ENTRY (self), "http://schemas.google.com/g/2005#feed");
+ g_assert (_link != NULL);
+
+ return g_strdup (gdata_link_get_uri (_link));
+}
+
+static gboolean
+is_comment_deletable (GDataCommentable *self, GDataComment *comment_)
+{
+ return (gdata_entry_look_up_link (GDATA_ENTRY (comment_), GDATA_LINK_EDIT) != NULL) ? TRUE : FALSE;
+}
+
+/**
+ * gdata_picasaweb_file_new:
+ * @id: (allow-none): the file's ID, or %NULL
+ *
+ * Creates a new #GDataPicasaWebFile with the given ID and default properties.
+ *
+ * Return value: a new #GDataPicasaWebFile; unref with g_object_unref()
+ *
+ * Since: 0.4.0
+ */
+GDataPicasaWebFile *
+gdata_picasaweb_file_new (const gchar *id)
+{
+ const gchar *file_id = NULL, *i;
+
+ if (id != NULL) {
+ file_id = g_strrstr (id, "/");
+ if (file_id == NULL)
+ return NULL;
+ file_id++; /* skip the slash */
+
+ /* Ensure the @file_id is entirely numeric */
+ for (i = file_id; *i != '\0'; i = g_utf8_next_char (i)) {
+ if (g_unichar_isdigit (g_utf8_get_char (i)) == FALSE)
+ return NULL;
+ }
+ }
+
+ return GDATA_PICASAWEB_FILE (g_object_new (GDATA_TYPE_PICASAWEB_FILE, "id", id, "file-id", file_id, NULL));
+}
+
+/**
+ * gdata_picasaweb_file_get_id:
+ * @self: a #GDataPicasaWebFile
+ *
+ * Gets the #GDataPicasaWebFile:file-id property.
+ *
+ * Return value: the file's ID
+ *
+ * Since: 0.7.0
+ */
+const gchar *
+gdata_picasaweb_file_get_id (GDataPicasaWebFile *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), NULL);
+ return self->priv->file_id;
+}
+
+/**
+ * gdata_picasaweb_file_get_edited:
+ * @self: a #GDataPicasaWebFile
+ *
+ * Gets the #GDataPicasaWebFile:edited property. If the property is unset, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the UNIX timestamp for the time the file was last edited, or <code class="literal">-1</code>
+ *
+ * Since: 0.4.0
+ */
+gint64
+gdata_picasaweb_file_get_edited (GDataPicasaWebFile *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), -1);
+ return self->priv->edited;
+}
+
+/**
+ * gdata_picasaweb_file_get_version:
+ * @self: a #GDataPicasaWebFile
+ *
+ * Gets the #GDataPicasaWebFile:version property.
+ *
+ * Return value: the file's version number, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_picasaweb_file_get_version (GDataPicasaWebFile *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), NULL);
+ return self->priv->version;
+}
+
+/**
+ * gdata_picasaweb_file_get_album_id:
+ * @self: a #GDataPicasaWebFile
+ *
+ * Gets the #GDataPicasaWebFile:album-id property. This is in the same form as returned by gdata_picasaweb_album_get_id().
+ *
+ * Return value: the ID of the album containing the #GDataPicasaWebFile
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_picasaweb_file_get_album_id (GDataPicasaWebFile *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), NULL);
+ return self->priv->album_id;
+}
+
+/**
+ * gdata_picasaweb_file_set_album_id:
+ * @self: a #GDataPicasaWebFile
+ * @album_id: the ID of the new album for this file
+ *
+ * Sets the #GDataPicasaWebFile:album-id property, effectively moving the file to the album.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_picasaweb_file_set_album_id (GDataPicasaWebFile *self, const gchar *album_id)
+{
+ g_return_if_fail (GDATA_IS_PICASAWEB_FILE (self));
+ g_return_if_fail (album_id != NULL && *album_id != '\0');
+
+ g_free (self->priv->album_id);
+ self->priv->album_id = g_strdup (album_id);
+ g_object_notify (G_OBJECT (self), "album-id");
+}
+
+/**
+ * gdata_picasaweb_file_get_width:
+ * @self: a #GDataPicasaWebFile
+ *
+ * Gets the #GDataPicasaWebFile:width property.
+ *
+ * Return value: the width of the image or video, in pixels
+ *
+ * Since: 0.4.0
+ */
+guint
+gdata_picasaweb_file_get_width (GDataPicasaWebFile *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), 0);
+ return self->priv->width;
+}
+
+/**
+ * gdata_picasaweb_file_get_height:
+ * @self: a #GDataPicasaWebFile
+ *
+ * Gets the #GDataPicasaWebFile:height property.
+ *
+ * Return value: the height of the image or video, in pixels
+ *
+ * Since: 0.4.0
+ */
+guint
+gdata_picasaweb_file_get_height (GDataPicasaWebFile *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), 0);
+ return self->priv->height;
+}
+
+/**
+ * gdata_picasaweb_file_get_size:
+ * @self: a #GDataPicasaWebFile
+ *
+ * Gets the #GDataPicasaWebFile:size property.
+ *
+ * Return value: the size of the file, in bytes
+ *
+ * Since: 0.4.0
+ */
+gsize
+gdata_picasaweb_file_get_size (GDataPicasaWebFile *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), 0);
+ return self->priv->size;
+}
+
+/**
+ * gdata_picasaweb_file_get_checksum:
+ * @self: a #GDataPicasaWebFile
+ *
+ * Gets the #GDataPicasaWebFile:checksum property.
+ *
+ * Return value: the checksum assigned to this file, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_picasaweb_file_get_checksum (GDataPicasaWebFile *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), NULL);
+ return self->priv->checksum;
+}
+
+/**
+ * gdata_picasaweb_file_set_checksum:
+ * @self: a #GDataPicasaWebFile
+ * @checksum: (allow-none): the new checksum for this file, or %NULL
+ *
+ * Sets the #GDataPicasaWebFile:checksum property to @checksum.
+ *
+ * Set @checksum to %NULL to unset the property.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_picasaweb_file_set_checksum (GDataPicasaWebFile *self, const gchar *checksum)
+{
+ g_return_if_fail (GDATA_IS_PICASAWEB_FILE (self));
+
+ g_free (self->priv->checksum);
+ self->priv->checksum = g_strdup (checksum);
+ g_object_notify (G_OBJECT (self), "checksum");
+}
+
+/**
+ * gdata_picasaweb_file_get_timestamp:
+ * @self: a #GDataPicasaWebFile
+ *
+ * Gets the #GDataPicasaWebFile:timestamp property. It's a UNIX timestamp in milliseconds (not seconds) since the epoch. If the property is unset,
+ * <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the UNIX timestamp for the timestamp property in milliseconds, or <code class="literal">-1</code>
+ *
+ * Since: 0.4.0
+ */
+gint64
+gdata_picasaweb_file_get_timestamp (GDataPicasaWebFile *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), -1);
+ return self->priv->timestamp;
+}
+
+/**
+ * gdata_picasaweb_file_set_timestamp:
+ * @self: a #GDataPicasaWebFile
+ * @timestamp: a UNIX timestamp, or <code class="literal">-1</code>
+ *
+ * Sets the #GDataPicasaWebFile:timestamp property from @timestamp. This should be a UNIX timestamp in milliseconds (not seconds) since the epoch. If
+ * @timestamp is <code class="literal">-1</code>, the property will be unset.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_picasaweb_file_set_timestamp (GDataPicasaWebFile *self, gint64 timestamp)
+{
+ /* RHSTODO: I think the timestamp value is just being
+ over-ridden by the file's actual EXIF time value; unless
+ we're setting this incorrectly here or in get_xml(); test that */
+ /* RHSTODO: improve testing of setters in tests/picasa.c */
+
+ g_return_if_fail (GDATA_IS_PICASAWEB_FILE (self));
+ g_return_if_fail (timestamp >= -1);
+
+ self->priv->timestamp = timestamp;
+ g_object_notify (G_OBJECT (self), "timestamp");
+}
+
+/**
+ * gdata_picasaweb_file_is_commenting_enabled:
+ * @self: a #GDataPicasaWebFile
+ *
+ * Gets the #GDataPicasaWebFile:is-commenting-enabled property.
+ *
+ * Return value: %TRUE if commenting is enabled, %FALSE otherwise
+ *
+ * Since: 0.4.0
+ */
+gboolean
+gdata_picasaweb_file_is_commenting_enabled (GDataPicasaWebFile *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), FALSE);
+ return self->priv->is_commenting_enabled;
+}
+
+/**
+ * gdata_picasaweb_file_set_is_commenting_enabled:
+ * @self: a #GDataPicasaWebFile
+ * @is_commenting_enabled: %TRUE if commenting should be enabled for the file, %FALSE otherwise
+ *
+ * Sets the #GDataPicasaWebFile:is-commenting-enabled property to @is_commenting_enabled.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_picasaweb_file_set_is_commenting_enabled (GDataPicasaWebFile *self, gboolean is_commenting_enabled)
+{
+ g_return_if_fail (GDATA_IS_PICASAWEB_FILE (self));
+ self->priv->is_commenting_enabled = is_commenting_enabled;
+ g_object_notify (G_OBJECT (self), "is-commenting-enabled");
+}
+
+/**
+ * gdata_picasaweb_file_get_comment_count:
+ * @self: a #GDataPicasaWebFile
+ *
+ * Gets the #GDataPicasaWebFile:comment-count property.
+ *
+ * Return value: the number of comments on the file
+ *
+ * Since: 0.4.0
+ */
+guint
+gdata_picasaweb_file_get_comment_count (GDataPicasaWebFile *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), 0);
+ return self->priv->comment_count;
+}
+
+/**
+ * gdata_picasaweb_file_get_rotation:
+ * @self: a #GDataPicasaWebFile
+ *
+ * Gets the #GDataPicasaWebFile:rotation property.
+ *
+ * Return value: the image's rotation, in degrees
+ *
+ * Since: 0.4.0
+ */
+guint
+gdata_picasaweb_file_get_rotation (GDataPicasaWebFile *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), 0);
+ return self->priv->rotation;
+}
+
+/**
+ * gdata_picasaweb_file_set_rotation:
+ * @self: a #GDataPicasaWebFile
+ * @rotation: the new rotation for the image, in degrees
+ *
+ * Sets the #GDataPicasaWebFile:rotation property to @rotation.
+ *
+ * The rotation is absolute, rather than cumulative, through successive calls to gdata_picasaweb_file_set_rotation(),
+ * so calling it with 90° then 20° will result in a final rotation of 20°.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_picasaweb_file_set_rotation (GDataPicasaWebFile *self, guint rotation)
+{
+ g_return_if_fail (GDATA_IS_PICASAWEB_FILE (self));
+ self->priv->rotation = rotation % 360;
+ g_object_notify (G_OBJECT (self), "rotation");
+}
+
+
+/**
+ * gdata_picasaweb_file_get_video_status:
+ * @self: a #GDataPicasaWebFile
+ *
+ * Gets the #GDataPicasaWebFile:video-status property.
+ *
+ * Return value: the status of this video ("pending", "ready", "final" or "failed"), or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_picasaweb_file_get_video_status (GDataPicasaWebFile *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), NULL);
+ return self->priv->video_status;
+}
+
+/**
+ * gdata_picasaweb_file_get_tags:
+ * @self: a #GDataPicasaWebFile
+ *
+ * Gets the #GDataPicasaWebFile:tags property.
+ *
+ * Return value: (array zero-terminated=1) (transfer none): a %NULL-terminated array of tags associated with the file, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar * const *
+gdata_picasaweb_file_get_tags (GDataPicasaWebFile *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), NULL);
+ return gdata_media_group_get_keywords (self->priv->media_group);
+}
+
+/**
+ * gdata_picasaweb_file_set_tags:
+ * @self: a #GDataPicasaWebFile
+ * @tags: (array zero-terminated=1) (allow-none): a new %NULL-terminated array of tags, or %NULL
+ *
+ * Sets the #GDataPicasaWebFile:tags property to @tags.
+ *
+ * Set @tags to %NULL to unset the property.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_picasaweb_file_set_tags (GDataPicasaWebFile *self, const gchar * const *tags)
+{
+ g_return_if_fail (GDATA_IS_PICASAWEB_FILE (self));
+
+ gdata_media_group_set_keywords (self->priv->media_group, tags);
+ g_object_notify (G_OBJECT (self), "tags");
+}
+
+/**
+ * gdata_picasaweb_file_get_credit:
+ * @self: a #GDataPicasaWebFile
+ *
+ * Gets the #GDataPicasaWebFile:credit property.
+ *
+ * Return value: the nickname of the user credited with this file
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_picasaweb_file_get_credit (GDataPicasaWebFile *self)
+{
+ GDataMediaCredit *credit;
+
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), NULL);
+
+ credit = gdata_media_group_get_credit (self->priv->media_group);
+ return (credit == NULL) ? NULL : gdata_media_credit_get_credit (credit);
+}
+
+/**
+ * gdata_picasaweb_file_get_caption:
+ * @self: a #GDataPicasaWebFile
+ *
+ * Gets the #GDataPicasaWebFile:caption property.
+ *
+ * Return value: the file's descriptive caption, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_picasaweb_file_get_caption (GDataPicasaWebFile *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), NULL);
+ return gdata_entry_get_summary (GDATA_ENTRY (self));
+}
+
+/**
+ * gdata_picasaweb_file_set_caption:
+ * @self: a #GDataPicasaWebFile
+ * @caption: (allow-none): the file's new caption, or %NULL
+ *
+ * Sets the #GDataPicasaWebFile:caption property to @caption.
+ *
+ * Set @caption to %NULL to unset the file's caption.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_picasaweb_file_set_caption (GDataPicasaWebFile *self, const gchar *caption)
+{
+ g_return_if_fail (GDATA_IS_PICASAWEB_FILE (self));
+
+ gdata_entry_set_summary (GDATA_ENTRY (self), caption);
+ gdata_media_group_set_description (self->priv->media_group, caption);
+ g_object_notify (G_OBJECT (self), "caption");
+}
+
+/**
+ * gdata_picasaweb_file_get_contents:
+ * @self: a #GDataPicasaWebFile
+ *
+ * Returns a list of media content, e.g. the actual photo or video.
+ *
+ * Return value: (element-type GData.MediaContent) (transfer none): a #GList of #GDataMediaContent items
+ *
+ * Since: 0.4.0
+ */
+GList *
+gdata_picasaweb_file_get_contents (GDataPicasaWebFile *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), NULL);
+ return gdata_media_group_get_contents (self->priv->media_group);
+}
+
+/**
+ * gdata_picasaweb_file_get_thumbnails:
+ * @self: a #GDataPicasaWebFile
+ *
+ * Returns a list of thumbnails, often at different sizes, for this
+ * file. Currently, PicasaWeb usually returns three thumbnails, with
+ * widths in pixels of 72, 144, and 288. However, the thumbnail will
+ * not be larger than the actual image, so thumbnails may be smaller
+ * than the widths listed above.
+ *
+ * Return value: (element-type GData.MediaThumbnail) (transfer none): a #GList of #GDataMediaThumbnails, or %NULL
+ *
+ * Since: 0.4.0
+ */
+GList *
+gdata_picasaweb_file_get_thumbnails (GDataPicasaWebFile *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), NULL);
+ return gdata_media_group_get_thumbnails (self->priv->media_group);
+}
+
+/**
+ * gdata_picasaweb_file_get_distance:
+ * @self: a #GDataPicasaWebFile
+ *
+ * Gets the #GDataPicasaWebFile:distance property.
+ *
+ * Return value: the distance recorded in the photo's EXIF, or <code class="literal">-1</code> if unknown
+ *
+ * Since: 0.5.0
+ */
+gdouble
+gdata_picasaweb_file_get_distance (GDataPicasaWebFile *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), -1);
+ return gdata_exif_tags_get_distance (self->priv->exif_tags);
+}
+
+/**
+ * gdata_picasaweb_file_get_exposure:
+ * @self: a #GDataPicasaWebFile
+ *
+ * Gets the #GDataPicasaWebFile:exposure property.
+ *
+ * Return value: the exposure value, or <code class="literal">0</code> if unknown
+ *
+ * Since: 0.5.0
+ */
+gdouble
+gdata_picasaweb_file_get_exposure (GDataPicasaWebFile *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), 0);
+ return gdata_exif_tags_get_exposure (self->priv->exif_tags);
+}
+
+/**
+ * gdata_picasaweb_file_get_flash:
+ * @self: a #GDataPicasaWebFile
+ *
+ * Gets the #GDataPicasaWebFile:flash property.
+ *
+ * Return value: %TRUE if flash was used, %FALSE otherwise
+ *
+ * Since: 0.5.0
+ */
+gboolean
+gdata_picasaweb_file_get_flash (GDataPicasaWebFile *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), FALSE);
+ return gdata_exif_tags_get_flash (self->priv->exif_tags);
+}
+
+/**
+ * gdata_picasaweb_file_get_focal_length:
+ * @self: a #GDataPicasaWebFile
+ *
+ * Gets the #GDataPicasaWebFile:focal-length property.
+ *
+ * Return value: the focal-length value, or <code class="literal">-1</code> if unknown
+ *
+ * Since: 0.5.0
+ */
+gdouble
+gdata_picasaweb_file_get_focal_length (GDataPicasaWebFile *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), -1);
+ return gdata_exif_tags_get_focal_length (self->priv->exif_tags);
+}
+
+/**
+ * gdata_picasaweb_file_get_fstop:
+ * @self: a #GDataPicasaWebFile
+ *
+ * Gets the #GDataPicasaWebFile:fstop property.
+ *
+ * Return value: the F-stop value, or <code class="literal">0</code> if unknown
+ *
+ * Since: 0.5.0
+ */
+gdouble
+gdata_picasaweb_file_get_fstop (GDataPicasaWebFile *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), 0);
+ return gdata_exif_tags_get_fstop (self->priv->exif_tags);
+}
+
+/**
+ * gdata_picasaweb_file_get_image_unique_id:
+ * @self: a #GDataPicasaWebFile
+ *
+ * Gets the #GDataPicasaWebFile:image-unique-id property.
+ *
+ * Return value: the photo's unique EXIF identifier, or %NULL
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_picasaweb_file_get_image_unique_id (GDataPicasaWebFile *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), NULL);
+ return gdata_exif_tags_get_image_unique_id (self->priv->exif_tags);
+}
+
+/**
+ * gdata_picasaweb_file_get_iso:
+ * @self: a #GDataPicasaWebFile
+ *
+ * Gets the #GDataPicasaWebFile:iso property.
+ *
+ * Return value: the ISO speed, or <code class="literal">-1</code> if unknown
+ *
+ * Since: 0.5.0
+ */
+gint
+gdata_picasaweb_file_get_iso (GDataPicasaWebFile *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), -1);
+ return gdata_exif_tags_get_iso (self->priv->exif_tags);
+}
+
+/**
+ * gdata_picasaweb_file_get_make:
+ * @self: a #GDataPicasaWebFile
+ *
+ * Gets the #GDataPicasaWebFile:make property.
+ *
+ * Return value: the name of the manufacturer of the camera, or %NULL if unknown
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_picasaweb_file_get_make (GDataPicasaWebFile *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), NULL);
+ return gdata_exif_tags_get_make (self->priv->exif_tags);
+}
+
+/**
+ * gdata_picasaweb_file_get_model:
+ * @self: a #GDataPicasaWebFile
+ *
+ * Gets the #GDataPicasaWebFile:model property.
+ *
+ * Return value: the model name of the camera, or %NULL if unknown
+ *
+ * Since: 0.5.0
+ */
+const gchar *
+gdata_picasaweb_file_get_model (GDataPicasaWebFile *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), NULL);
+ return gdata_exif_tags_get_model (self->priv->exif_tags);
+}
+
+/**
+ * gdata_picasaweb_file_get_coordinates:
+ * @self: a #GDataPicasaWebFile
+ * @latitude: (out caller-allocates) (allow-none): return location for the latitude, or %NULL
+ * @longitude: (out caller-allocates) (allow-none): return location for the longitude, or %NULL
+ *
+ * Gets the #GDataPicasaWebFile:latitude and #GDataPicasaWebFile:longitude properties, setting the out parameters to them.
+ * If either latitude or longitude is %NULL, that parameter will not be set. If the coordinates are unset,
+ * @latitude and @longitude will be set to %G_MAXDOUBLE.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_picasaweb_file_get_coordinates (GDataPicasaWebFile *self, gdouble *latitude, gdouble *longitude)
+{
+ g_return_if_fail (GDATA_IS_PICASAWEB_FILE (self));
+
+ if (latitude != NULL)
+ *latitude = gdata_georss_where_get_latitude (self->priv->georss_where);
+ if (longitude != NULL)
+ *longitude = gdata_georss_where_get_longitude (self->priv->georss_where);
+}
+
+/**
+ * gdata_picasaweb_file_set_coordinates:
+ * @self: a #GDataPicasaWebFile
+ * @latitude: the file's new latitude coordinate, or %G_MAXDOUBLE
+ * @longitude: the file's new longitude coordinate, or %G_MAXDOUBLE
+ *
+ * Sets the #GDataPicasaWebFile:latitude and #GDataPicasaWebFile:longitude properties to
+ * @latitude and @longitude respectively.
+ *
+ * Since: 0.5.0
+ */
+void
+gdata_picasaweb_file_set_coordinates (GDataPicasaWebFile *self, gdouble latitude, gdouble longitude)
+{
+ g_return_if_fail (GDATA_IS_PICASAWEB_FILE (self));
+
+ gdata_georss_where_set_latitude (self->priv->georss_where, latitude);
+ gdata_georss_where_set_longitude (self->priv->georss_where, longitude);
+
+ g_object_freeze_notify (G_OBJECT (self));
+ g_object_notify (G_OBJECT (self), "latitude");
+ g_object_notify (G_OBJECT (self), "longitude");
+ g_object_thaw_notify (G_OBJECT (self));
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Richard Schwarting 2009 <aquarichy@gmail.com>
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_PICASAWEB_FILE_H
+#define GDATA_PICASAWEB_FILE_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-entry.h>
+#include <gdata/gdata-types.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_PICASAWEB_VIDEO_STATUS_PENDING:
+ *
+ * The video is still being processed.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_PICASAWEB_VIDEO_STATUS_PENDING "pending"
+
+/**
+ * GDATA_PICASAWEB_VIDEO_STATUS_READY:
+ *
+ * The video has been processed, but still needs thumbnailing.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_PICASAWEB_VIDEO_STATUS_READY "ready"
+
+/**
+ * GDATA_PICASAWEB_VIDEO_STATUS_FINAL:
+ *
+ * The video has been processed and thumbnailed.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_PICASAWEB_VIDEO_STATUS_FINAL "final"
+
+/**
+ * GDATA_PICASAWEB_VIDEO_STATUS_FAILED:
+ *
+ * There was an error while processing or thumbnailing the video and it should be deleted.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_PICASAWEB_VIDEO_STATUS_FAILED "failed"
+
+#define GDATA_TYPE_PICASAWEB_FILE (gdata_picasaweb_file_get_type ())
+#define GDATA_PICASAWEB_FILE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_PICASAWEB_FILE, GDataPicasaWebFile))
+#define GDATA_PICASAWEB_FILE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_PICASAWEB_FILE, GDataPicasaWebFileClass))
+#define GDATA_IS_PICASAWEB_FILE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_PICASAWEB_FILE))
+#define GDATA_IS_PICASAWEB_FILE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_PICASAWEB_FILE))
+#define GDATA_PICASAWEB_FILE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_PICASAWEB_FILE, GDataPicasaWebFileClass))
+
+typedef struct _GDataPicasaWebFilePrivate GDataPicasaWebFilePrivate;
+
+/**
+ * GDataPicasaWebFile:
+ *
+ * All the fields in the #GDataPicasaWebFile structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ GDataEntry parent;
+ GDataPicasaWebFilePrivate *priv;
+} GDataPicasaWebFile;
+
+/**
+ * GDataPicasaWebFileClass:
+ *
+ * All the fields in the #GDataPicasaWebFileClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataEntryClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataPicasaWebFileClass;
+
+GType gdata_picasaweb_file_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataPicasaWebFile, g_object_unref)
+
+GDataPicasaWebFile *gdata_picasaweb_file_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_picasaweb_file_get_id (GDataPicasaWebFile *self) G_GNUC_PURE;
+gint64 gdata_picasaweb_file_get_edited (GDataPicasaWebFile *self);
+const gchar *gdata_picasaweb_file_get_version (GDataPicasaWebFile *self) G_GNUC_PURE;
+const gchar *gdata_picasaweb_file_get_album_id (GDataPicasaWebFile *self) G_GNUC_PURE;
+/* TODO should we have a more obvious _move() API too? nah */
+void gdata_picasaweb_file_set_album_id (GDataPicasaWebFile *self, const gchar *album_id);
+guint gdata_picasaweb_file_get_width (GDataPicasaWebFile *self) G_GNUC_PURE;
+guint gdata_picasaweb_file_get_height (GDataPicasaWebFile *self) G_GNUC_PURE;
+gsize gdata_picasaweb_file_get_size (GDataPicasaWebFile *self) G_GNUC_PURE;
+const gchar *gdata_picasaweb_file_get_checksum (GDataPicasaWebFile *self) G_GNUC_PURE;
+void gdata_picasaweb_file_set_checksum (GDataPicasaWebFile *self, const gchar *checksum);
+gint64 gdata_picasaweb_file_get_timestamp (GDataPicasaWebFile *self);
+void gdata_picasaweb_file_set_timestamp (GDataPicasaWebFile *self, gint64 timestamp);
+gboolean gdata_picasaweb_file_is_commenting_enabled (GDataPicasaWebFile *self) G_GNUC_PURE;
+void gdata_picasaweb_file_set_is_commenting_enabled (GDataPicasaWebFile *self, gboolean is_commenting_enabled);
+guint gdata_picasaweb_file_get_comment_count (GDataPicasaWebFile *self) G_GNUC_PURE;
+guint gdata_picasaweb_file_get_rotation (GDataPicasaWebFile *self) G_GNUC_PURE;
+void gdata_picasaweb_file_set_rotation (GDataPicasaWebFile *self, guint rotation);
+const gchar *gdata_picasaweb_file_get_video_status (GDataPicasaWebFile *self) G_GNUC_PURE;
+const gchar * const *gdata_picasaweb_file_get_tags (GDataPicasaWebFile *self) G_GNUC_PURE;
+void gdata_picasaweb_file_set_tags (GDataPicasaWebFile *self, const gchar * const *tags);
+const gchar *gdata_picasaweb_file_get_credit (GDataPicasaWebFile *self) G_GNUC_PURE;
+const gchar *gdata_picasaweb_file_get_caption (GDataPicasaWebFile *self) G_GNUC_PURE;
+void gdata_picasaweb_file_set_caption (GDataPicasaWebFile *self, const gchar *caption);
+GList *gdata_picasaweb_file_get_contents (GDataPicasaWebFile *self) G_GNUC_PURE;
+GList *gdata_picasaweb_file_get_thumbnails (GDataPicasaWebFile *self) G_GNUC_PURE;
+gdouble gdata_picasaweb_file_get_distance (GDataPicasaWebFile *self) G_GNUC_PURE;
+gdouble gdata_picasaweb_file_get_exposure (GDataPicasaWebFile *self) G_GNUC_PURE;
+gboolean gdata_picasaweb_file_get_flash (GDataPicasaWebFile *self) G_GNUC_PURE;
+gdouble gdata_picasaweb_file_get_focal_length (GDataPicasaWebFile *self) G_GNUC_PURE;
+gdouble gdata_picasaweb_file_get_fstop (GDataPicasaWebFile *self) G_GNUC_PURE;
+const gchar *gdata_picasaweb_file_get_image_unique_id (GDataPicasaWebFile *self) G_GNUC_PURE;
+gint gdata_picasaweb_file_get_iso (GDataPicasaWebFile *self) G_GNUC_PURE;
+const gchar *gdata_picasaweb_file_get_make (GDataPicasaWebFile *self) G_GNUC_PURE;
+const gchar *gdata_picasaweb_file_get_model (GDataPicasaWebFile *self) G_GNUC_PURE;
+void gdata_picasaweb_file_get_coordinates (GDataPicasaWebFile *self, gdouble *latitude, gdouble *longitude);
+void gdata_picasaweb_file_set_coordinates (GDataPicasaWebFile *self, gdouble latitude, gdouble longitude);
+
+/* TODO implement is video */
+/* TODO implement get comments */
+
+G_END_DECLS
+
+#endif /* !GDATA_PICASAWEB_FILE_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Richard Schwarting 2009 <aquarichy@gmail.com>
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-picasaweb-query
+ * @short_description: GData PicasaWeb query object
+ * @stability: Stable
+ * @include: gdata/services/picasaweb/gdata-picasaweb-query.h
+ *
+ * #GDataPicasaWebQuery represents a collection of query parameters specific to the Google PicasaWeb service, which go above and beyond
+ * those catered for by #GDataQuery.
+ *
+ * For more information on the custom GData query parameters supported by #GDataPicasaWebQuery, see the <ulink type="http"
+ * url="http://code.google.com/apis/picasaweb/reference.html#Parameters">online documentation</ulink>.
+ *
+ * Since: 0.4.0
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+
+#include "gdata-picasaweb-query.h"
+#include "gdata-query.h"
+#include "gdata-picasaweb-enums.h"
+#include "gdata-private.h"
+
+static void gdata_picasaweb_query_finalize (GObject *object);
+static void gdata_picasaweb_query_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_picasaweb_query_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void get_query_uri (GDataQuery *self, const gchar *feed_uri, GString *query_uri, gboolean *params_started);
+
+struct _GDataPicasaWebQueryPrivate {
+ GDataPicasaWebVisibility visibility;
+ gchar *thumbnail_size;
+ gchar *image_size;
+ gchar *tag;
+ gchar *location;
+
+ struct {
+ gdouble north;
+ gdouble east;
+ gdouble south;
+ gdouble west;
+ } bounding_box;
+};
+
+enum {
+ PROP_VISIBILITY = 1,
+ PROP_THUMBNAIL_SIZE,
+ PROP_IMAGE_SIZE,
+ PROP_TAG,
+ PROP_LOCATION
+};
+
+G_DEFINE_TYPE (GDataPicasaWebQuery, gdata_picasaweb_query, GDATA_TYPE_QUERY)
+
+static void
+gdata_picasaweb_query_class_init (GDataPicasaWebQueryClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataQueryClass *query_class = GDATA_QUERY_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataPicasaWebQueryPrivate));
+
+ gobject_class->get_property = gdata_picasaweb_query_get_property;
+ gobject_class->set_property = gdata_picasaweb_query_set_property;
+ gobject_class->finalize = gdata_picasaweb_query_finalize;
+
+ query_class->get_query_uri = get_query_uri;
+
+ /**
+ * GDataPicasaWebQuery:visibility:
+ *
+ * Specifies which albums should be listed, in terms of their visibility (#GDataPicasaWebAlbum:visibility).
+ *
+ * Set the property to <code class="literal">0</code> to list all albums, regardless of their visibility. Otherwise, use values
+ * from #GDataPicasaWebVisibility.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#Visibility">
+ * online documentation</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_VISIBILITY,
+ g_param_spec_int ("visibility",
+ "Visibility", "Specifies which albums should be listed, in terms of their visibility.",
+ 0, GDATA_PICASAWEB_PRIVATE, 0,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebQuery:thumbnail-size:
+ *
+ * A comma-separated list of thumbnail widths (in pixels) to return. Only certain sizes are allowed, and whether the thumbnail should be
+ * cropped or scaled can be specified; for more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#Parameters">online documentation</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_THUMBNAIL_SIZE,
+ g_param_spec_string ("thumbnail-size",
+ "Thumbnail size", "A comma-separated list of thumbnail width (in pixels) to return.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebQuery:image-size:
+ *
+ * A comma-separated list of image sizes (width in pixels) to return. Only certain sizes are allowed, and whether the image should be
+ * cropped or scaled can be specified; for more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#Parameters">online documentation</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_IMAGE_SIZE,
+ g_param_spec_string ("image-size",
+ "Image size", "A comma-separated list of image sizes (width in pixels) to return.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebQuery:tag:
+ *
+ * A tag which returned results must contain.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_TAG,
+ g_param_spec_string ("tag",
+ "Tag", "A tag which returned results must contain.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebQuery:location:
+ *
+ * A location to search for photos, e.g. "London".
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LOCATION,
+ g_param_spec_string ("location",
+ "Location", "A location to search for photos, e.g. \"London\".",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_picasaweb_query_init (GDataPicasaWebQuery *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_PICASAWEB_QUERY, GDataPicasaWebQueryPrivate);
+
+ /* https://developers.google.com/picasa-web/docs/3.0/reference#Parameters */
+ _gdata_query_set_pagination_type (GDATA_QUERY (self),
+ GDATA_QUERY_PAGINATION_INDEXED);
+}
+
+static void
+gdata_picasaweb_query_finalize (GObject *object)
+{
+ GDataPicasaWebQueryPrivate *priv = GDATA_PICASAWEB_QUERY (object)->priv;
+
+ g_free (priv->thumbnail_size);
+ g_free (priv->image_size);
+ g_free (priv->tag);
+ g_free (priv->location);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_picasaweb_query_parent_class)->finalize (object);
+}
+
+static void
+gdata_picasaweb_query_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataPicasaWebQueryPrivate *priv = GDATA_PICASAWEB_QUERY (object)->priv;
+
+ switch (property_id) {
+ case PROP_VISIBILITY:
+ g_value_set_int (value, priv->visibility);
+ break;
+ case PROP_THUMBNAIL_SIZE:
+ g_value_set_string (value, priv->thumbnail_size);
+ break;
+ case PROP_IMAGE_SIZE:
+ g_value_set_string (value, priv->image_size);
+ break;
+ case PROP_TAG:
+ g_value_set_string (value, priv->tag);
+ break;
+ case PROP_LOCATION:
+ g_value_set_string (value, priv->location);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_picasaweb_query_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataPicasaWebQuery *self = GDATA_PICASAWEB_QUERY (object);
+
+ switch (property_id) {
+ case PROP_VISIBILITY:
+ gdata_picasaweb_query_set_visibility (self, g_value_get_int (value));
+ break;
+ case PROP_THUMBNAIL_SIZE:
+ gdata_picasaweb_query_set_thumbnail_size (self, g_value_get_string (value));
+ break;
+ case PROP_IMAGE_SIZE:
+ gdata_picasaweb_query_set_image_size (self, g_value_get_string (value));
+ break;
+ case PROP_TAG:
+ gdata_picasaweb_query_set_tag (self, g_value_get_string (value));
+ break;
+ case PROP_LOCATION:
+ gdata_picasaweb_query_set_location (self, g_value_get_string (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+get_query_uri (GDataQuery *self, const gchar *feed_uri, GString *query_uri, gboolean *params_started)
+{
+ GDataPicasaWebQueryPrivate *priv = GDATA_PICASAWEB_QUERY (self)->priv;
+
+ #define APPEND_SEP g_string_append_c (query_uri, (*params_started == FALSE) ? '?' : '&'); *params_started = TRUE;
+
+ /* Chain up to the parent class */
+ GDATA_QUERY_CLASS (gdata_picasaweb_query_parent_class)->get_query_uri (self, feed_uri, query_uri, params_started);
+
+ APPEND_SEP
+ if (priv->visibility == 0)
+ ; // Appending nothing to retrieve all for authenticated users and just public albums for unauthenticated
+ else if (priv->visibility == GDATA_PICASAWEB_PUBLIC)
+ g_string_append (query_uri, "access=public");
+ else if (priv->visibility == GDATA_PICASAWEB_PRIVATE)
+ g_string_append (query_uri, "access=private");
+ else
+ g_assert_not_reached ();
+
+ if (priv->thumbnail_size != NULL) {
+ APPEND_SEP
+ g_string_append (query_uri, "thumbsize=");
+ g_string_append_uri_escaped (query_uri, priv->thumbnail_size, NULL, FALSE);
+ }
+
+ if (priv->image_size != NULL) {
+ APPEND_SEP
+ g_string_append (query_uri, "imgmax=");
+ g_string_append_uri_escaped (query_uri, priv->image_size, NULL, FALSE);
+ }
+
+ if (priv->tag != NULL) {
+ APPEND_SEP
+ g_string_append (query_uri, "tag=");
+ g_string_append_uri_escaped (query_uri, priv->tag, NULL, FALSE);
+ }
+
+ if (priv->bounding_box.north != priv->bounding_box.south && priv->bounding_box.east != priv->bounding_box.west) {
+ gchar west[G_ASCII_DTOSTR_BUF_SIZE], south[G_ASCII_DTOSTR_BUF_SIZE], east[G_ASCII_DTOSTR_BUF_SIZE], north[G_ASCII_DTOSTR_BUF_SIZE];
+
+ APPEND_SEP
+ g_string_append_printf (query_uri, "bbox=%s,%s,%s,%s",
+ g_ascii_dtostr (west, sizeof (west), priv->bounding_box.west),
+ g_ascii_dtostr (south, sizeof (south), priv->bounding_box.south),
+ g_ascii_dtostr (east, sizeof (east), priv->bounding_box.east),
+ g_ascii_dtostr (north, sizeof (north), priv->bounding_box.north));
+ }
+
+ if (priv->location != NULL) {
+ APPEND_SEP
+ g_string_append (query_uri, "l=");
+ g_string_append_uri_escaped (query_uri, priv->location, NULL, FALSE);
+ }
+}
+
+/**
+ * gdata_picasaweb_query_new:
+ * @q: (allow-none): a query string, or %NULL
+ *
+ * Creates a new #GDataPicasaWebQuery with its #GDataQuery:q property set to @q.
+ *
+ * Note that when querying for albums with gdata_picasaweb_service_query_all_albums(), the @q parameter cannot be used.
+ *
+ * Return value: a new #GDataPicasaWebQuery
+ *
+ * Since: 0.4.0
+ */
+GDataPicasaWebQuery *
+gdata_picasaweb_query_new (const gchar *q)
+{
+ return g_object_new (GDATA_TYPE_PICASAWEB_QUERY, "q", q, NULL);
+}
+
+/**
+ * gdata_picasaweb_query_new_with_limits:
+ * @q: (allow-none): a query string, or %NULL
+ * @start_index: the index of the first result to include, or <code class="literal">0</code>
+ * @max_results: the maximum number of results to include, or <code class="literal">0</code>
+ *
+ * Creates a #GDataPicasaWebQuery with its #GDataQuery:q property set to @q, returning @max_results starting from the @start_index<!-- -->th result.
+ *
+ * Note that when querying for albums with gdata_picasaweb_service_query_all_albums(), the @q parameter cannot be used.
+ *
+ * This is useful for paging through results, but the result set between separate queries may change. So, if you use this to
+ * request the next ten results after a previous query, it may include some of the previously returned results if their order changed, or
+ * omit ones that would have otherwise been found in a earlier but larger query.
+ *
+ * Return value: a new #GDataPicasaWebQuery
+ *
+ * Since: 0.6.0
+ */
+GDataPicasaWebQuery *
+gdata_picasaweb_query_new_with_limits (const gchar *q, guint start_index, guint max_results)
+{
+ return g_object_new (GDATA_TYPE_PICASAWEB_QUERY,
+ "q", q,
+ "start-index", start_index,
+ "max-results", max_results,
+ NULL);
+}
+
+/**
+ * gdata_picasaweb_query_get_visibility:
+ * @self: a #GDataPicasaWebQuery
+ *
+ * Gets the #GDataPicasaWebQuery:visibility property.
+ *
+ * Return value: the visibility of the objects to retrieve, or <code class="literal">0</code> to retrieve all objects
+ *
+ * Since: 0.4.0
+ */
+GDataPicasaWebVisibility
+gdata_picasaweb_query_get_visibility (GDataPicasaWebQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_QUERY (self), 0);
+ return self->priv->visibility;
+}
+
+/**
+ * gdata_picasaweb_query_set_visibility:
+ * @self: a #GDataPicasaWebQuery
+ * @visibility: the visibility of the objects to retrieve, or <code class="literal">0</code> to retrieve all objects
+ *
+ * Sets the #GDataPicasaWebQuery:visibility property to @visibility.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_picasaweb_query_set_visibility (GDataPicasaWebQuery *self, GDataPicasaWebVisibility visibility)
+{
+ g_return_if_fail (GDATA_IS_PICASAWEB_QUERY (self));
+ self->priv->visibility = visibility;
+ g_object_notify (G_OBJECT (self), "visibility");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_picasaweb_query_get_thumbnail_size:
+ * @self: a #GDataPicasaWebQuery
+ *
+ * Gets the #GDataPicasaWebQuery:thumbnail-size property.
+ *
+ * Return value: a comma-separated list of thumbnail sizes to retrieve, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_picasaweb_query_get_thumbnail_size (GDataPicasaWebQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_QUERY (self), NULL);
+ return self->priv->thumbnail_size;
+}
+
+/**
+ * gdata_picasaweb_query_set_thumbnail_size:
+ * @self: a #GDataPicasaWebQuery
+ * @thumbnail_size: (allow-none): a comma-separated list of thumbnail sizes to retrieve, or %NULL
+ *
+ * Sets the #GDataPicasaWebQuery:thumbnail-size property to @thumbnail_size.
+ *
+ * Set @thumbnail_size to %NULL to unset the property.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_picasaweb_query_set_thumbnail_size (GDataPicasaWebQuery *self, const gchar *thumbnail_size)
+{
+ g_return_if_fail (GDATA_IS_PICASAWEB_QUERY (self));
+
+ g_free (self->priv->thumbnail_size);
+ self->priv->thumbnail_size = g_strdup (thumbnail_size);
+ g_object_notify (G_OBJECT (self), "thumbnail-size");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_picasaweb_query_get_image_size:
+ * @self: a #GDataPicasaWebQuery
+ *
+ * Gets the #GDataPicasaWebQuery:image-size property.
+ *
+ * Return value: the currently set desired image size for retrieval, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_picasaweb_query_get_image_size (GDataPicasaWebQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_QUERY (self), NULL);
+ return self->priv->image_size;
+}
+
+/**
+ * gdata_picasaweb_query_set_image_size:
+ * @self: a #GDataPicasaWebQuery
+ * @image_size: (allow-none): the desired size of the image to be retrieved, or %NULL
+ *
+ * Sets the #GDataPicasaWebQuery:image-size property to @image_size.
+ * Valid sizes are described in the
+ * <ulink type="http" url="http://code.google.com/apis/picasaweb/docs/2.0/reference.html#Parameters">online documentation</ulink>.
+ *
+ * Set @image_size to %NULL to unset the property.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_picasaweb_query_set_image_size (GDataPicasaWebQuery *self, const gchar *image_size)
+{
+ g_return_if_fail (GDATA_IS_PICASAWEB_QUERY (self));
+
+ g_free (self->priv->image_size);
+ self->priv->image_size = g_strdup (image_size);
+ g_object_notify (G_OBJECT (self), "image-size");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_picasaweb_query_get_tag:
+ * @self: a #GDataPicasaWebQuery
+ *
+ * Gets the #GDataPicasaWebQuery:tag property.
+ *
+ * Return value: a tag which retrieved objects must have, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_picasaweb_query_get_tag (GDataPicasaWebQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_QUERY (self), NULL);
+ return self->priv->tag;
+}
+
+/**
+ * gdata_picasaweb_query_set_tag:
+ * @self: a #GDataPicasaWebQuery
+ * @tag: (allow-none): a tag which retrieved objects must have, or %NULL
+ *
+ * Sets the #GDataPicasaWebQuery:tag property to @tag.
+ *
+ * Set @tag to %NULL to unset the property.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_picasaweb_query_set_tag (GDataPicasaWebQuery *self, const gchar *tag)
+{
+ g_return_if_fail (GDATA_IS_PICASAWEB_QUERY (self));
+
+ g_free (self->priv->tag);
+ self->priv->tag = g_strdup (tag);
+ g_object_notify (G_OBJECT (self), "tag");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_picasaweb_query_get_bounding_box:
+ * @self: a #GDataPicasaWebQuery
+ * @north: (out caller-allocates) (allow-none): return location for the latitude of the top of the box, or %NULL
+ * @east: (out caller-allocates) (allow-none): return location for the longitude of the right of the box, or %NULL
+ * @south: (out caller-allocates) (allow-none): return location for the latitude of the south of the box, or %NULL
+ * @west: (out caller-allocates) (allow-none): return location for the longitude of the left of the box, or %NULL
+ *
+ * Gets the latitudes and longitudes of a bounding box, inside which all the results must lie.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_picasaweb_query_get_bounding_box (GDataPicasaWebQuery *self, gdouble *north, gdouble *east, gdouble *south, gdouble *west)
+{
+ g_return_if_fail (GDATA_IS_PICASAWEB_QUERY (self));
+
+ if (north != NULL)
+ *north = self->priv->bounding_box.north;
+ if (east != NULL)
+ *east = self->priv->bounding_box.east;
+ if (south != NULL)
+ *south = self->priv->bounding_box.south;
+ if (west != NULL)
+ *west = self->priv->bounding_box.west;
+}
+
+/**
+ * gdata_picasaweb_query_set_bounding_box:
+ * @self: a #GDataPicasaWebQuery
+ * @north: latitude of the top of the box
+ * @east: longitude of the right of the box
+ * @south: latitude of the bottom of the box
+ * @west: longitude of the left of the box
+ *
+ * Sets a bounding box, inside which all the returned results must lie.
+ *
+ * Set @north, @east, @south and @west to <code class="literal">0</code> to unset the property.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_picasaweb_query_set_bounding_box (GDataPicasaWebQuery *self, gdouble north, gdouble east, gdouble south, gdouble west)
+{
+ g_return_if_fail (GDATA_IS_PICASAWEB_QUERY (self));
+ g_return_if_fail (north >= -90.0 && north <= 90.0);
+ g_return_if_fail (south >= -90.0 && south <= 90.0);
+ g_return_if_fail (east >= -180.0 && east <= 180.0);
+ g_return_if_fail (west >= -180.0 && west <= 180.0);
+
+ self->priv->bounding_box.north = north;
+ self->priv->bounding_box.east = east;
+ self->priv->bounding_box.south = south;
+ self->priv->bounding_box.west = west;
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_picasaweb_query_get_location:
+ * @self: a #GDataPicasaWebQuery
+ *
+ * Gets the #GDataPicasaWebQuery:location property.
+ *
+ * Return value: a location which returned objects must be near, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_picasaweb_query_get_location (GDataPicasaWebQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_QUERY (self), NULL);
+ return self->priv->location;
+}
+
+/**
+ * gdata_picasaweb_query_set_location:
+ * @self: a #GDataPicasaWebQuery
+ * @location: (allow-none): a location which returned objects must be near, or %NULL
+ *
+ * Sets the #GDataPicasaWebQuery:location property to @location.
+ *
+ * Set @location to %NULL to unset the property.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_picasaweb_query_set_location (GDataPicasaWebQuery *self, const gchar *location)
+{
+ g_return_if_fail (GDATA_IS_PICASAWEB_QUERY (self));
+
+ g_free (self->priv->location);
+ self->priv->location = g_strdup (location);
+ g_object_notify (G_OBJECT (self), "location");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Richard Schwarting 2009 <aquarichy@gmail.com>
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_PICASAWEB_QUERY_H
+#define GDATA_PICASAWEB_QUERY_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-query.h>
+#include <gdata/services/picasaweb/gdata-picasaweb-album.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_PICASAWEB_QUERY (gdata_picasaweb_query_get_type ())
+#define GDATA_PICASAWEB_QUERY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_PICASAWEB_QUERY, GDataPicasaWebQuery))
+#define GDATA_PICASAWEB_QUERY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_PICASAWEB_QUERY, GDataPicasawebQueryClass))
+#define GDATA_IS_PICASAWEB_QUERY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_PICASAWEB_QUERY))
+#define GDATA_IS_PICASAWEB_QUERY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_PICASAWEB_QUERY))
+#define GDATA_PICASAWEB_QUERY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_PICASAWEB_QUERY, GDataPicasawebQueryClass))
+
+typedef struct _GDataPicasaWebQueryPrivate GDataPicasaWebQueryPrivate;
+
+/**
+ * GDataPicasaWebQuery:
+ *
+ * All the fields in the #GDataPicasaWebQuery structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ GDataQuery parent;
+ GDataPicasaWebQueryPrivate *priv;
+} GDataPicasaWebQuery;
+
+/**
+ * GDataPicasaWebQueryClass:
+ *
+ * All the fields in the #GDataPicasaWebQueryClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataQueryClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataPicasaWebQueryClass;
+
+GType gdata_picasaweb_query_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataPicasaWebQuery, g_object_unref)
+
+GDataPicasaWebQuery *gdata_picasaweb_query_new (const gchar *q) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+GDataPicasaWebQuery *gdata_picasaweb_query_new_with_limits (const gchar *q,
+ guint start_index, guint max_results) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+GDataPicasaWebVisibility gdata_picasaweb_query_get_visibility (GDataPicasaWebQuery *self) G_GNUC_PURE;
+void gdata_picasaweb_query_set_visibility (GDataPicasaWebQuery *self, GDataPicasaWebVisibility visibility);
+const gchar *gdata_picasaweb_query_get_thumbnail_size (GDataPicasaWebQuery *self) G_GNUC_PURE;
+void gdata_picasaweb_query_set_thumbnail_size (GDataPicasaWebQuery *self, const gchar *thumbnail_size);
+const gchar *gdata_picasaweb_query_get_image_size (GDataPicasaWebQuery *self) G_GNUC_PURE;
+void gdata_picasaweb_query_set_image_size (GDataPicasaWebQuery *self, const gchar *image_size);
+const gchar *gdata_picasaweb_query_get_tag (GDataPicasaWebQuery *self) G_GNUC_PURE;
+void gdata_picasaweb_query_set_tag (GDataPicasaWebQuery *self, const gchar *tag);
+void gdata_picasaweb_query_get_bounding_box (GDataPicasaWebQuery *self, gdouble *north, gdouble *east, gdouble *south, gdouble *west);
+void gdata_picasaweb_query_set_bounding_box (GDataPicasaWebQuery *self, gdouble north, gdouble east, gdouble south, gdouble west);
+const gchar *gdata_picasaweb_query_get_location (GDataPicasaWebQuery *self) G_GNUC_PURE;
+void gdata_picasaweb_query_set_location (GDataPicasaWebQuery *self, const gchar *location);
+
+G_END_DECLS
+
+#endif /* !GDATA_PICASAWEB_QUERY_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Richard Schwarting 2009 <aquarichy@gmail.com>
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-picasaweb-service
+ * @short_description: GData PicasaWeb service object
+ * @stability: Stable
+ * @include: gdata/services/picasaweb/gdata-picasaweb-service.h
+ *
+ * #GDataPicasaWebService is a subclass of #GDataService for communicating with the GData API of Google PicasaWeb. It supports querying for files
+ * and albums, and uploading files.
+ *
+ * For more details of PicasaWeb's GData API, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/developers_guide_protocol.html">
+ * online documentation</ulink>.
+ *
+ * <example>
+ * <title>Authenticating and Creating a New Album</title>
+ * <programlisting>
+ * GDataClientLoginAuthorizer *authorizer;
+ * GDataPicasaWebService *service;
+ * GDataPicasaWebAlbum *album, *inserted_album;
+ *
+ * /<!-- -->* Create a service object and authorize against the PicasaWeb service *<!-- -->/
+ * authorizer = gdata_client_login_authorizer_new ("companyName-applicationName-versionID", GDATA_TYPE_PICASAWEB_SERVICE);
+ * gdata_client_login_authorizer_authenticate (authorizer, username, password, NULL, NULL);
+ * service = gdata_picasaweb_service_new (GDATA_AUTHORIZER (authorizer));
+ *
+ * /<!-- -->* Create a GDataPicasaWebAlbum entry for the new album, setting some information about it *<!-- -->/
+ * album = gdata_picasaweb_album_new (NULL);
+ * gdata_entry_set_title (GDATA_ENTRY (album), "Photos from the Rhine");
+ * gdata_entry_set_summary (GDATA_ENTRY (album), "An album of our adventures on the great river.");
+ * gdata_picasaweb_album_set_location (album, "The Rhine, Germany");
+ *
+ * /<!-- -->* Insert the new album on the server. Note that this is a blocking operation. *<!-- -->/
+ * inserted_album = gdata_picasaweb_service_insert_album (service, album, NULL, NULL);
+ *
+ * g_object_unref (album);
+ * g_object_unref (inserted_album);
+ * g_object_unref (service);
+ * g_object_unref (authorizer);
+ * </programlisting>
+ * </example>
+ *
+ * <example>
+ * <title>Uploading a Photo or Video</title>
+ * <programlisting>
+ * GDataPicasaWebFile *file_entry, *uploaded_file_entry;
+ * GDataUploadStream *upload_stream;
+ * GFile *file_data;
+ * GFileInfo *file_info;
+ * GFileInputStream *file_stream;
+ *
+ * /<!-- -->* Specify the GFile image on disk to upload *<!-- -->/
+ * file_data = g_file_new_for_path (path);
+ *
+ * /<!-- -->* Get the file information for the file being uploaded. If another data source was being used for the upload, it would have to
+ * * provide an appropriate slug and content type. Note that this is a blocking operation. *<!-- -->/
+ * file_info = g_file_query_info (file_data, G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME "," G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
+ * G_FILE_QUERY_INFO_NONE, NULL, NULL);
+ *
+ * /<!-- -->* Create a GDataPicasaWebFile entry for the image, setting a title and caption/summary *<!-- -->/
+ * file_entry = gdata_picasaweb_file_new (NULL);
+ * gdata_entry_set_title (GDATA_ENTRY (file_entry), "Black Cat");
+ * gdata_entry_set_summary (GDATA_ENTRY (file_entry), "Photo of the world's most beautiful cat.");
+ *
+ * /<!-- -->* Create an upload stream for the file. This is non-blocking. *<!-- -->/
+ * upload_stream = gdata_picasaweb_service_upload_file (service, album, file_entry, g_file_info_get_display_name (file_info),
+ * g_file_info_get_content_type (file_info), NULL, NULL);
+ * g_object_unref (file_info);
+ * g_object_unref (file_entry);
+ *
+ * /<!-- -->* Prepare a file stream for the file to be uploaded. This is a blocking operation. *<!-- -->/
+ * file_stream = g_file_read (file_data, NULL, NULL);
+ * g_object_unref (file_data);
+ *
+ * /<!-- -->* Upload the file to the server. Note that this is a blocking operation. *<!-- -->/
+ * g_output_stream_splice (G_OUTPUT_STREAM (upload_stream), G_INPUT_STREAM (file_stream),
+ * G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, NULL, NULL);
+ *
+ * /<!-- -->* Parse the resulting updated entry. This is a non-blocking operation. *<!-- -->/
+ * uploaded_file_entry = gdata_picasaweb_service_finish_file_upload (service, upload_stream, NULL);
+ * g_object_unref (file_stream);
+ * g_object_unref (upload_stream);
+ *
+ * /<!-- -->* ... *<!-- -->/
+ *
+ * g_object_unref (uploaded_file_entry);
+ * </programlisting>
+ * </example>
+ *
+ *
+ * Since: 0.4.0
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+
+#include "gdata-service.h"
+#include "gdata-picasaweb-service.h"
+#include "gdata-private.h"
+#include "gdata-parser.h"
+#include "atom/gdata-link.h"
+#include "gdata-upload-stream.h"
+#include "gdata-picasaweb-feed.h"
+
+static GList *get_authorization_domains (void);
+
+_GDATA_DEFINE_AUTHORIZATION_DOMAIN (picasaweb, "lh2", "http://picasaweb.google.com/data/")
+G_DEFINE_TYPE (GDataPicasaWebService, gdata_picasaweb_service, GDATA_TYPE_SERVICE)
+
+static void
+gdata_picasaweb_service_class_init (GDataPicasaWebServiceClass *klass)
+{
+ GDataServiceClass *service_class = GDATA_SERVICE_CLASS (klass);
+ service_class->feed_type = GDATA_TYPE_PICASAWEB_FEED;
+ service_class->get_authorization_domains = get_authorization_domains;
+}
+
+static void
+gdata_picasaweb_service_init (GDataPicasaWebService *self)
+{
+ /* Nothing to see here */
+}
+
+static GList *
+get_authorization_domains (void)
+{
+ return g_list_prepend (NULL, get_picasaweb_authorization_domain ());
+}
+
+/**
+ * gdata_picasaweb_service_new:
+ * @authorizer: (allow-none): a #GDataAuthorizer to authorize the service's requests, or %NULL
+ *
+ * Creates a new #GDataPicasaWebService using the given #GDataAuthorizer. If @authorizer is %NULL, all requests are made as an unauthenticated user.
+ *
+ * Return value: a new #GDataPicasaWebService, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.9.0
+ */
+GDataPicasaWebService *
+gdata_picasaweb_service_new (GDataAuthorizer *authorizer)
+{
+ g_return_val_if_fail (authorizer == NULL || GDATA_IS_AUTHORIZER (authorizer), NULL);
+
+ return g_object_new (GDATA_TYPE_PICASAWEB_SERVICE,
+ "authorizer", authorizer,
+ NULL);
+}
+
+/**
+ * gdata_picasaweb_service_get_primary_authorization_domain:
+ *
+ * The primary #GDataAuthorizationDomain for interacting with PicasaWeb. This will not normally need to be used, as it's used internally
+ * by the #GDataPicasaWebService methods. However, if using the plain #GDataService methods to implement custom queries or requests which libgdata
+ * does not support natively, then this domain may be needed to authorize the requests.
+ *
+ * The domain never changes, and is interned so that pointer comparison can be used to differentiate it from other authorization domains.
+ *
+ * Return value: (transfer none): the service's authorization domain
+ *
+ * Since: 0.9.0
+ */
+GDataAuthorizationDomain *
+gdata_picasaweb_service_get_primary_authorization_domain (void)
+{
+ return get_picasaweb_authorization_domain ();
+}
+
+/*
+ * create_uri:
+ * @self: a #GDataPicasaWebService
+ * @username: (allow-none): the username to use, or %NULL to use the currently logged in user
+ * @type: the type of object to access: "entry" for a user, or "feed" for an album
+ *
+ * Builds a URI to use when querying for albums or a user.
+ *
+ * Return value: a constructed URI; free with g_free()
+ *
+ * Since: 0.4.0
+ */
+static gchar *
+create_uri (GDataPicasaWebService *self, const gchar *username, const gchar *type)
+{
+ if (username == NULL) {
+ /* Ensure we're authorized first */
+ if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (self)),
+ get_picasaweb_authorization_domain ()) == FALSE) {
+ return NULL;
+ }
+
+ /* Querying Picasa albums for the "default" user when logged in returns the albums for the authenticated user */
+ username = "default";
+ }
+
+ return _gdata_service_build_uri ("https://picasaweb.google.com/data/%s/api/user/%s", type, username);
+}
+
+/**
+ * gdata_picasaweb_service_get_user:
+ * @self: a #GDataPicasaWebService
+ * @username: (allow-none): the username of the user whose information you wish to retrieve, or %NULL for the currently authenticated user.
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Queries the service to return the user specified by @username.
+ *
+ * Return value: (transfer full): a #GDataPicasaWebUser; unref with g_object_unref()
+ *
+ * Since: 0.6.0
+ */
+GDataPicasaWebUser *
+gdata_picasaweb_service_get_user (GDataPicasaWebService *self, const gchar *username, GCancellable *cancellable, GError **error)
+{
+ gchar *uri;
+ GDataParsable *user;
+ SoupMessage *message;
+
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_SERVICE (self), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ uri = create_uri (self, username, "entry");
+ if (uri == NULL) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED,
+ _("You must specify a username or be authenticated to query a user."));
+ return NULL;
+ }
+
+ message = _gdata_service_query (GDATA_SERVICE (self), get_picasaweb_authorization_domain (), uri, NULL, cancellable, error);
+ g_free (uri);
+
+ if (message == NULL)
+ return NULL;
+
+ g_assert (message->response_body->data != NULL);
+ user = gdata_parsable_new_from_xml (GDATA_TYPE_PICASAWEB_USER, message->response_body->data, message->response_body->length, error);
+ g_object_unref (message);
+
+ return GDATA_PICASAWEB_USER (user);
+}
+
+static void
+get_user_thread (GTask *task, gpointer source_object, gpointer task_data, GCancellable *cancellable)
+{
+ GDataPicasaWebService *service = GDATA_PICASAWEB_SERVICE (source_object);
+ const gchar *username = task_data;
+ g_autoptr(GDataPicasaWebUser) user = NULL;
+ g_autoptr(GError) error = NULL;
+
+ /* Get the user and return */
+ user = gdata_picasaweb_service_get_user (service, username, cancellable, &error);
+
+ if (error != NULL)
+ g_task_return_error (task, g_steal_pointer (&error));
+ else
+ g_task_return_pointer (task, g_steal_pointer (&user), g_object_unref);
+}
+
+/**
+ * gdata_picasaweb_service_get_user_async:
+ * @self: a #GDataPicasaWebService
+ * @username: (allow-none): the username of the user whose information you wish to retrieve, or %NULL for the currently authenticated user
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when the query is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Queries the service to return the user specified by @username.
+ *
+ * For more details, see gdata_picasaweb_service_get_user() which is the synchronous version of this method.
+ *
+ * When the operation is finished, @callback will be called. You can then call gdata_picasaweb_service_get_user_finish() to get the results of the
+ * operation.
+ *
+ * Since: 0.9.1
+ */
+void
+gdata_picasaweb_service_get_user_async (GDataPicasaWebService *self, const gchar *username, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_autoptr(GTask) task = NULL;
+
+ g_return_if_fail (GDATA_IS_PICASAWEB_SERVICE (self));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+ g_return_if_fail (callback != NULL);
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_picasaweb_service_get_user_async);
+ g_task_set_task_data (task, g_strdup (username), (GDestroyNotify) g_free);
+ g_task_run_in_thread (task, get_user_thread);
+}
+
+/**
+ * gdata_picasaweb_service_get_user_finish:
+ * @self: a #GDataPicasaWebService
+ * @result: a #GAsyncResult
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous user retrieval operation started with gdata_picasaweb_service_get_user_async().
+ *
+ * Return value: (transfer full): a #GDataPicasaWebUser; unref with g_object_unref()
+ *
+ * Since: 0.9.1
+ */
+GDataPicasaWebUser *
+gdata_picasaweb_service_get_user_finish (GDataPicasaWebService *self, GAsyncResult *async_result, GError **error)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_SERVICE (self), NULL);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (async_result), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+ g_return_val_if_fail (g_task_is_valid (async_result, self), NULL);
+ g_return_val_if_fail (g_async_result_is_tagged (async_result, gdata_picasaweb_service_get_user_async), NULL);
+
+ return g_task_propagate_pointer (G_TASK (async_result), error);
+}
+
+/**
+ * gdata_picasaweb_service_query_all_albums:
+ * @self: a #GDataPicasaWebService
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @username: (allow-none): the username of the user whose albums you wish to retrieve, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (scope call) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @error: a #GError, or %NULL
+ *
+ * Queries the service to return a list of all albums belonging to the specified @username which match the given
+ * @query. If a user is authenticated with the service, @username can be set as %NULL to return a list of albums belonging
+ * to the currently-authenticated user.
+ *
+ * Note that the #GDataQuery:q query parameter cannot be set on @query for album queries.
+ *
+ * For more details, see gdata_service_query().
+ *
+ * Return value: (transfer full): a #GDataFeed of query results; unref with g_object_unref()
+ *
+ * Since: 0.4.0
+ */
+GDataFeed *
+gdata_picasaweb_service_query_all_albums (GDataPicasaWebService *self, GDataQuery *query, const gchar *username, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error)
+{
+ gchar *uri;
+ GDataFeed *album_feed;
+
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_SERVICE (self), NULL);
+ g_return_val_if_fail (query == NULL || GDATA_IS_QUERY (query), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ if (query != NULL && gdata_query_get_q (query) != NULL) {
+ /* Bug #593336 — Query parameter "q=..." isn't valid for album kinds */
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_BAD_QUERY_PARAMETER,
+ _("Query parameter not allowed for albums."));
+ return NULL;
+ }
+
+ uri = create_uri (self, username, "feed");
+ if (uri == NULL) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED,
+ _("You must specify a username or be authenticated to query all albums."));
+ return NULL;
+ }
+
+ /* Execute the query */
+ album_feed = gdata_service_query (GDATA_SERVICE (self), get_picasaweb_authorization_domain (), uri, query, GDATA_TYPE_PICASAWEB_ALBUM,
+ cancellable, progress_callback, progress_user_data, error);
+ g_free (uri);
+
+ return album_feed;
+}
+
+/**
+ * gdata_picasaweb_service_query_all_albums_async:
+ * @self: a #GDataPicasaWebService
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @username: (allow-none): the username of the user whose albums you wish to retrieve, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @destroy_progress_user_data: (allow-none): the function to call when @progress_callback will not be called any more, or %NULL. This function will be
+ * called with @progress_user_data as a parameter and can be used to free any memory allocated for it.
+ * @callback: a #GAsyncReadyCallback to call when authentication is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Queries the service to return a list of all albums belonging to the specified @username which match the given
+ * @query. @self, @query and @username are all reffed/copied when this function is called, so can safely be unreffed/freed after
+ * this function returns.
+ *
+ * For more details, see gdata_picasaweb_service_query_all_albums(), which is the synchronous version of
+ * this function, and gdata_service_query_async(), which is the base asynchronous query function.
+ *
+ * Since: 0.9.1
+ */
+void
+gdata_picasaweb_service_query_all_albums_async (GDataPicasaWebService *self, GDataQuery *query, const gchar *username,
+ GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data, GAsyncReadyCallback callback, gpointer user_data)
+{
+ gchar *uri;
+
+ g_return_if_fail (GDATA_IS_PICASAWEB_SERVICE (self));
+ g_return_if_fail (query == NULL || GDATA_IS_QUERY (query));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+ g_return_if_fail (callback != NULL);
+
+ if (query != NULL && gdata_query_get_q (query) != NULL) {
+ /* Bug #593336 — Query parameter "q=..." isn't valid for album kinds */
+ g_autoptr(GTask) task = NULL;
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_service_query_async);
+ g_task_return_new_error (task, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_BAD_QUERY_PARAMETER, "%s",
+ _("Query parameter not allowed for albums."));
+
+ return;
+ }
+
+ uri = create_uri (self, username, "feed");
+ if (uri == NULL) {
+ g_autoptr(GTask) task = NULL;
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_service_query_async);
+ g_task_return_new_error (task, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED, "%s",
+ _("You must specify a username or be authenticated to query all albums."));
+
+ return;
+ }
+
+ /* Schedule the async query */
+ gdata_service_query_async (GDATA_SERVICE (self), get_picasaweb_authorization_domain (), uri, query, GDATA_TYPE_PICASAWEB_ALBUM, cancellable,
+ progress_callback, progress_user_data, destroy_progress_user_data, callback, user_data);
+ g_free (uri);
+}
+
+static const gchar *
+get_query_files_uri (GDataPicasaWebAlbum *album, GError **error)
+{
+ if (album != NULL) {
+ GDataLink *_link = gdata_entry_look_up_link (GDATA_ENTRY (album), "http://schemas.google.com/g/2005#feed");
+ if (_link == NULL) {
+ /* Error */
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
+ _("The album did not have a feed link."));
+ return NULL;
+ }
+
+ return gdata_link_get_uri (_link);
+ } else {
+ /* Default URI */
+ return "https://picasaweb.google.com/data/feed/api/user/default/albumid/default";
+ }
+}
+
+/**
+ * gdata_picasaweb_service_query_files:
+ * @self: a #GDataPicasaWebService
+ * @album: (allow-none): a #GDataPicasaWebAlbum from which to retrieve the files, or %NULL
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (scope call) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @error: a #GError, or %NULL
+ *
+ * Queries the specified @album for a list of the files which match the given @query. If @album is %NULL and a user is
+ * authenticated with the service, the user's default album will be queried.
+ *
+ * For more details, see gdata_service_query().
+ *
+ * Return value: (transfer full): a #GDataFeed of query results; unref with g_object_unref()
+ *
+ * Since: 0.4.0
+ */
+GDataFeed *
+gdata_picasaweb_service_query_files (GDataPicasaWebService *self, GDataPicasaWebAlbum *album, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error)
+{
+ const gchar *uri;
+
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_SERVICE (self), NULL);
+ g_return_val_if_fail (album == NULL || GDATA_IS_PICASAWEB_ALBUM (album), NULL);
+ g_return_val_if_fail (query == NULL || GDATA_IS_QUERY (query), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ uri = get_query_files_uri (album, error);
+ if (uri == NULL)
+ return NULL;
+
+ /* Execute the query */
+ return gdata_service_query (GDATA_SERVICE (self), get_picasaweb_authorization_domain (), uri, GDATA_QUERY (query), GDATA_TYPE_PICASAWEB_FILE,
+ cancellable, progress_callback, progress_user_data, error);
+}
+
+/**
+ * gdata_picasaweb_service_query_files_async:
+ * @self: a #GDataPicasaWebService
+ * @album: (allow-none): a #GDataPicasaWebAlbum from which to retrieve the files, or %NULL
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @destroy_progress_user_data: (allow-none): the function to call when @progress_callback will not be called any more, or %NULL. This function will be
+ * called with @progress_user_data as a parameter and can be used to free any memory allocated for it.
+ * @callback: a #GAsyncReadyCallback to call when the query is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Queries the specified @album for a list of the files which match the given @query. If @album is %NULL and a user is authenticated with the service,
+ * the user's default album will be queried. @self, @album and @query are all reffed when this function is called, so can safely be unreffed after
+ * this function returns.
+ *
+ * For more details, see gdata_picasaweb_service_query_files(), which is the synchronous version of this function, and gdata_service_query_async(),
+ * which is the base asynchronous query function.
+ *
+ * Since: 0.9.1
+ */
+void
+gdata_picasaweb_service_query_files_async (GDataPicasaWebService *self, GDataPicasaWebAlbum *album, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data, GAsyncReadyCallback callback, gpointer user_data)
+{
+ const gchar *request_uri;
+ GError *child_error = NULL;
+
+ g_return_if_fail (GDATA_IS_PICASAWEB_SERVICE (self));
+ g_return_if_fail (album == NULL || GDATA_IS_PICASAWEB_ALBUM (album));
+ g_return_if_fail (query == NULL || GDATA_IS_QUERY (query));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+ g_return_if_fail (callback != NULL);
+
+ request_uri = get_query_files_uri (album, &child_error);
+ if (request_uri == NULL) {
+ g_task_report_error (self, callback, user_data, gdata_service_query_async, g_steal_pointer (&child_error));
+ return;
+ }
+
+ gdata_service_query_async (GDATA_SERVICE (self), get_picasaweb_authorization_domain (), request_uri, GDATA_QUERY (query),
+ GDATA_TYPE_PICASAWEB_FILE, cancellable, progress_callback, progress_user_data, destroy_progress_user_data,
+ callback, user_data);
+}
+
+/**
+ * gdata_picasaweb_service_upload_file:
+ * @self: a #GDataPicasaWebService
+ * @album: (allow-none): a #GDataPicasaWebAlbum into which to insert the file, or %NULL
+ * @file_entry: a #GDataPicasaWebFile to insert
+ * @slug: the filename to give to the uploaded file
+ * @content_type: the content type of the uploaded data
+ * @cancellable: (allow-none): a #GCancellable for the entire upload stream, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Uploads a file (photo or video) to the given PicasaWeb @album, using the metadata from @file and the file data written to the resulting
+ * #GDataUploadStream. If @album is %NULL, the file will be uploaded to the currently-authenticated user's "Drop Box" album. A user must be
+ * authenticated to use this function.
+ *
+ * If @file has already been inserted, a %GDATA_SERVICE_ERROR_ENTRY_ALREADY_INSERTED error will be returned.
+ *
+ * If no user is authenticated with the service, %GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED will be returned. It is recommended to retry the
+ * upload after refreshing the authorization tokens held by the associated #GDataAuthorizer using gdata_authorizer_refresh_authorization().
+ *
+ * The stream returned by this function should be written to using the standard #GOutputStream methods, asynchronously or synchronously. Once the stream
+ * is closed (using g_output_stream_close()), gdata_picasaweb_service_finish_file_upload() should be called on it to parse and return the updated
+ * #GDataPicasaWebFile for the uploaded file. This must be done, as @file_entry isn't updated in-place.
+ *
+ * In order to cancel the upload, a #GCancellable passed in to @cancellable must be cancelled using g_cancellable_cancel(). Cancelling the individual
+ * #GOutputStream operations on the #GDataUploadStream will not cancel the entire upload; merely the write or close operation in question. See the
+ * #GDataUploadStream:cancellable for more details.
+ *
+ * Any upload errors will be thrown by the stream methods, and may come from the #GDataServiceError domain.
+ *
+ * Return value: (transfer full): a #GDataUploadStream to write the file data to, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.8.0
+ */
+GDataUploadStream *
+gdata_picasaweb_service_upload_file (GDataPicasaWebService *self, GDataPicasaWebAlbum *album, GDataPicasaWebFile *file_entry, const gchar *slug,
+ const gchar *content_type, GCancellable *cancellable, GError **error)
+{
+ const gchar *album_id = NULL;
+ GDataUploadStream *upload_stream;
+ gchar *upload_uri;
+
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_SERVICE (self), NULL);
+ g_return_val_if_fail (album == NULL || GDATA_IS_PICASAWEB_ALBUM (album), NULL);
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (file_entry), NULL);
+ g_return_val_if_fail (slug != NULL && *slug != '\0', NULL);
+ g_return_val_if_fail (content_type != NULL && *content_type != '\0', NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ if (gdata_entry_is_inserted (GDATA_ENTRY (file_entry)) == TRUE) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_ENTRY_ALREADY_INSERTED,
+ _("The entry has already been inserted."));
+ return NULL;
+ }
+
+ if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (self)),
+ get_picasaweb_authorization_domain ()) == FALSE) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED,
+ _("You must be authenticated to upload a file."));
+ return NULL;
+ }
+
+ /* PicasaWeb allows you to post to a default Dropbox */
+ album_id = (album != NULL) ? gdata_picasaweb_album_get_id (album) : "default";
+
+ /* Build the upload URI and upload stream */
+ upload_uri = _gdata_service_build_uri ("https://picasaweb.google.com/data/feed/api/user/default/albumid/%s", album_id);
+ upload_stream = GDATA_UPLOAD_STREAM (gdata_upload_stream_new (GDATA_SERVICE (self), get_picasaweb_authorization_domain (), SOUP_METHOD_POST,
+ upload_uri, GDATA_ENTRY (file_entry), slug, content_type, cancellable));
+ g_free (upload_uri);
+
+ return upload_stream;
+}
+
+/**
+ * gdata_picasaweb_service_finish_file_upload:
+ * @self: a #GDataPicasaWebService
+ * @upload_stream: the #GDataUploadStream from the operation
+ * @error: a #GError, or %NULL
+ *
+ * Finish off a file upload operation started by gdata_picasaweb_service_upload_file(), parsing the result and returning the new #GDataPicasaWebFile.
+ *
+ * If an error occurred during the upload operation, it will have been returned during the operation (e.g. by g_output_stream_splice() or one
+ * of the other stream methods). In such a case, %NULL will be returned but @error will remain unset. @error is only set in the case that the server
+ * indicates that the operation was successful, but an error is encountered in parsing the result sent by the server.
+ *
+ * Return value: (transfer full): the new #GDataPicasaWebFile, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.8.0
+ */
+GDataPicasaWebFile *
+gdata_picasaweb_service_finish_file_upload (GDataPicasaWebService *self, GDataUploadStream *upload_stream, GError **error)
+{
+ const gchar *response_body;
+ gssize response_length;
+
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_SERVICE (self), NULL);
+ g_return_val_if_fail (GDATA_IS_UPLOAD_STREAM (upload_stream), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ /* Get the response from the server */
+ response_body = gdata_upload_stream_get_response (upload_stream, &response_length);
+ if (response_body == NULL || response_length == 0)
+ return NULL;
+
+ /* Parse the response to produce a GDataPicasaWebFile */
+ return GDATA_PICASAWEB_FILE (gdata_parsable_new_from_xml (GDATA_TYPE_PICASAWEB_FILE, response_body, (gint) response_length, error));
+}
+
+/**
+ * gdata_picasaweb_service_insert_album:
+ * @self: a #GDataPicasaWebService
+ * @album: a #GDataPicasaWebAlbum to create on the server
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Inserts a new album described by @album. A user must be
+ * authenticated to use this function.
+ *
+ * Return value: (transfer full): the inserted #GDataPicasaWebAlbum; unref with
+ * g_object_unref()
+ *
+ * Since: 0.6.0
+ */
+GDataPicasaWebAlbum *
+gdata_picasaweb_service_insert_album (GDataPicasaWebService *self, GDataPicasaWebAlbum *album, GCancellable *cancellable, GError **error)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_SERVICE (self), NULL);
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_ALBUM (album), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ if (gdata_entry_is_inserted (GDATA_ENTRY (album)) == TRUE) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_ENTRY_ALREADY_INSERTED,
+ _("The album has already been inserted."));
+ return NULL;
+ }
+
+ if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (self)),
+ get_picasaweb_authorization_domain ()) == FALSE) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED,
+ _("You must be authenticated to insert an album."));
+ return NULL;
+ }
+
+ return GDATA_PICASAWEB_ALBUM (gdata_service_insert_entry (GDATA_SERVICE (self), get_picasaweb_authorization_domain (),
+ "https://picasaweb.google.com/data/feed/api/user/default",
+ GDATA_ENTRY (album), cancellable, error));
+}
+
+/**
+ * gdata_picasaweb_service_insert_album_async:
+ * @self: a #GDataPicasaWebService
+ * @album: a #GDataPicasaWebAlbum to create on the server
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when insertion is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Inserts a new album described by @album. The user must be authenticated to use this function. @self and @album are both reffed when this function
+ * is called, so can safely be unreffed after this function returns.
+ *
+ * @callback should call gdata_service_insert_entry_finish() to obtain a #GDataPicasaWebAlbum representing the inserted album and to check for
+ * possible errors.
+ *
+ * For more details, see gdata_picasaweb_service_insert_album(), which is the synchronous version of this function, and
+ * gdata_service_insert_entry_async(), which is the base asynchronous insertion function.
+ *
+ * Since: 0.8.0
+ */
+void
+gdata_picasaweb_service_insert_album_async (GDataPicasaWebService *self, GDataPicasaWebAlbum *album, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_return_if_fail (GDATA_IS_PICASAWEB_SERVICE (self));
+ g_return_if_fail (GDATA_IS_PICASAWEB_ALBUM (album));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+
+ gdata_service_insert_entry_async (GDATA_SERVICE (self), get_picasaweb_authorization_domain (),
+ "https://picasaweb.google.com/data/feed/api/user/default", GDATA_ENTRY (album), cancellable, callback,
+ user_data);
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Richard Schwarting 2009 <aquarichy@gmail.com>
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_PICASAWEB_SERVICE_H
+#define GDATA_PICASAWEB_SERVICE_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-service.h>
+#include <gdata/gdata-upload-stream.h>
+#include <gdata/services/picasaweb/gdata-picasaweb-album.h>
+#include <gdata/services/picasaweb/gdata-picasaweb-user.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_PICASAWEB_SERVICE (gdata_picasaweb_service_get_type ())
+#define GDATA_PICASAWEB_SERVICE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_PICASAWEB_SERVICE, GDataPicasaWebService))
+#define GDATA_PICASAWEB_SERVICE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_PICASAWEB_SERVICE, GDataPicasaWebServiceClass))
+#define GDATA_IS_PICASAWEB_SERVICE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_PICASAWEB_SERVICE))
+#define GDATA_IS_PICASAWEB_SERVICE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_PICASAWEB_SERVICE))
+#define GDATA_PICASAWEB_SERVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_PICASAWEB_SERVICE, GDataPicasaWebServiceClass))
+
+/**
+ * GDataPicasaWebService:
+ *
+ * All the fields in the #GDataPicasaWebService structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ GDataService parent;
+} GDataPicasaWebService;
+
+/**
+ * GDataPicasaWebServiceClass:
+ *
+ * All the fields in the #GDataPicasaWebServiceClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataServiceClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+ void (*_g_reserved2) (void);
+ void (*_g_reserved3) (void);
+ void (*_g_reserved4) (void);
+ void (*_g_reserved5) (void);
+} GDataPicasaWebServiceClass;
+
+GType gdata_picasaweb_service_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataPicasaWebService, g_object_unref)
+
+GDataPicasaWebService *gdata_picasaweb_service_new (GDataAuthorizer *authorizer) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+GDataAuthorizationDomain *gdata_picasaweb_service_get_primary_authorization_domain (void) G_GNUC_CONST;
+
+#include <gdata/services/picasaweb/gdata-picasaweb-query.h>
+
+GDataPicasaWebUser *gdata_picasaweb_service_get_user (GDataPicasaWebService *self, const gchar *username,
+ GCancellable *cancellable, GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_picasaweb_service_get_user_async (GDataPicasaWebService *self, const gchar *username, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data);
+GDataPicasaWebUser *gdata_picasaweb_service_get_user_finish (GDataPicasaWebService *self, GAsyncResult *result,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+GDataFeed *gdata_picasaweb_service_query_all_albums (GDataPicasaWebService *self, GDataQuery *query, const gchar *username, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_picasaweb_service_query_all_albums_async (GDataPicasaWebService *self, GDataQuery *query, const gchar *username, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
+ GAsyncReadyCallback callback, gpointer user_data);
+
+GDataFeed *gdata_picasaweb_service_query_files (GDataPicasaWebService *self, GDataPicasaWebAlbum *album, GDataQuery *query,
+ GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_picasaweb_service_query_files_async (GDataPicasaWebService *self, GDataPicasaWebAlbum *album, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
+ GAsyncReadyCallback callback, gpointer user_data);
+
+#include <gdata/services/picasaweb/gdata-picasaweb-file.h>
+
+GDataUploadStream *gdata_picasaweb_service_upload_file (GDataPicasaWebService *self, GDataPicasaWebAlbum *album, GDataPicasaWebFile *file_entry,
+ const gchar *slug, const gchar *content_type, GCancellable *cancellable,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+GDataPicasaWebFile *gdata_picasaweb_service_finish_file_upload (GDataPicasaWebService *self, GDataUploadStream *upload_stream,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+GDataPicasaWebAlbum *gdata_picasaweb_service_insert_album (GDataPicasaWebService *self, GDataPicasaWebAlbum *album, GCancellable *cancellable,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_picasaweb_service_insert_album_async (GDataPicasaWebService *self, GDataPicasaWebAlbum *album, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data);
+
+G_END_DECLS
+
+#endif /* !GDATA_PICASAWEB_SERVICE_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ * Copyright (C) Richard Schwarting 2009 <aquarichy@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-picasaweb-user
+ * @short_description: GData PicasaWeb User object
+ * @stability: Stable
+ * @include: gdata/services/picasaweb/gdata-picasaweb-user.h
+ *
+ * #GDataPicasaWebUser is a subclass of #GDataEntry to represent properties for a PicasaWeb user. It adds a couple of
+ * properties which are specific to the Google PicasaWeb API.
+ *
+ * Since: 0.6.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+
+#include "gdata-picasaweb-user.h"
+#include "gdata-entry.h"
+#include "gdata-private.h"
+
+static void gdata_picasaweb_user_finalize (GObject *object);
+static void gdata_picasaweb_user_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataPicasaWebUserPrivate {
+ gchar *user;
+ gchar *nickname;
+ gint64 quota_limit;
+ gint64 quota_current;
+ gint max_photos_per_album;
+ gchar *thumbnail_uri;
+};
+
+enum {
+ PROP_USER = 1,
+ PROP_NICKNAME,
+ PROP_QUOTA_LIMIT,
+ PROP_QUOTA_CURRENT,
+ PROP_MAX_PHOTOS_PER_ALBUM,
+ PROP_THUMBNAIL_URI
+};
+
+G_DEFINE_TYPE (GDataPicasaWebUser, gdata_picasaweb_user, GDATA_TYPE_ENTRY)
+
+static void
+gdata_picasaweb_user_class_init (GDataPicasaWebUserClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+ GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataPicasaWebUserPrivate));
+
+ gobject_class->get_property = gdata_picasaweb_user_get_property;
+ gobject_class->finalize = gdata_picasaweb_user_finalize;
+
+ parsable_class->parse_xml = parse_xml;
+ parsable_class->get_namespaces = get_namespaces;
+
+ entry_class->kind_term = "http://schemas.google.com/photos/2007#user";
+
+ /**
+ * GDataPicasaWebUser:user:
+ *
+ * The username of the user, as seen in feed URLs.
+ * http://code.google.com/apis/picasaweb/docs/2.0/reference.html#gphoto_user
+ *
+ * Since: 0.6.0
+ */
+ g_object_class_install_property (gobject_class, PROP_USER,
+ g_param_spec_string ("user",
+ "User", "The username of the user.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebUser:nickname:
+ *
+ * The user's nickname. This is a user-specified value that should be used when referring to the user by name.
+ * http://code.google.com/apis/picasaweb/docs/2.0/reference.html#gphoto_nickname
+ *
+ * Since: 0.6.0
+ */
+ g_object_class_install_property (gobject_class, PROP_NICKNAME,
+ g_param_spec_string ("nickname",
+ "Nickname", "The user's nickname.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebUser:quota-limit:
+ *
+ * The total amount of space, in bytes, available to the user.
+ * http://code.google.com/apis/picasaweb/docs/2.0/reference.html#gphoto_quotalimit
+ *
+ * If the #GDataPicasaWebUser does not represent the currently authenticated user, this will be <code class="literal">-1</code>.
+ *
+ * Since: 0.6.0
+ */
+ g_object_class_install_property (gobject_class, PROP_QUOTA_LIMIT,
+ g_param_spec_int64 ("quota-limit",
+ "Quota Limit", "The total amount of space, in bytes, available to the user.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebUser:quota-current:
+ *
+ * The current amount of space, in bytes, already used by the user.
+ * http://code.google.com/apis/picasaweb/docs/2.0/reference.html#gphoto_quotacurrent
+ *
+ * If the #GDataPicasaWebUser does not represent the currently authenticated user, this will be <code class="literal">-1</code>.
+ *
+ * Since: 0.6.0
+ */
+ g_object_class_install_property (gobject_class, PROP_QUOTA_CURRENT,
+ g_param_spec_int64 ("quota-current",
+ "Quota Current", "The current amount of space, in bytes, already used by the user.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebUser:max-photos-per-album:
+ *
+ * The maximum number of photos allowed in an album.
+ * http://code.google.com/apis/picasaweb/docs/2.0/reference.html#gphoto_maxPhotosPerAlbum
+ *
+ * If the #GDataPicasaWebUser does not represent the currently authenticated user, this will be <code class="literal">-1</code>.
+ *
+ * Since: 0.6.0
+ */
+ g_object_class_install_property (gobject_class, PROP_MAX_PHOTOS_PER_ALBUM,
+ g_param_spec_int ("max-photos-per-album",
+ "Max Photos Per Album", "The maximum number of photos allowed in an album.",
+ -1, G_MAXINT, -1,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataPicasaWebUser:thumbnail-uri:
+ *
+ * The URI of a thumbnail-sized portrait of the user.
+ * http://code.google.com/apis/picasaweb/docs/2.0/reference.html#gphoto_thumbnail
+ *
+ * Since: 0.6.0
+ */
+ g_object_class_install_property (gobject_class, PROP_THUMBNAIL_URI,
+ g_param_spec_string ("thumbnail-uri",
+ "Thumbnail URI", "The URI of a thumbnail-sized portrait of the user.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_picasaweb_user_init (GDataPicasaWebUser *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_PICASAWEB_USER, GDataPicasaWebUserPrivate);
+
+ /* Initialise the properties whose values we can theoretically not know */
+ self->priv->quota_limit = self->priv->quota_current = self->priv->max_photos_per_album = -1;
+}
+
+static void
+gdata_picasaweb_user_finalize (GObject *object)
+{
+ GDataPicasaWebUserPrivate *priv = GDATA_PICASAWEB_USER (object)->priv;
+
+ g_free (priv->user);
+ g_free (priv->nickname);
+ g_free (priv->thumbnail_uri);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_picasaweb_user_parent_class)->finalize (object);
+}
+
+static void
+gdata_picasaweb_user_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataPicasaWebUserPrivate *priv = GDATA_PICASAWEB_USER (object)->priv;
+
+ switch (property_id) {
+ case PROP_USER:
+ g_value_set_string (value, priv->user);
+ break;
+ case PROP_NICKNAME:
+ g_value_set_string (value, priv->nickname);
+ break;
+ case PROP_QUOTA_LIMIT:
+ g_value_set_int64 (value, priv->quota_limit);
+ break;
+ case PROP_QUOTA_CURRENT:
+ g_value_set_int64 (value, priv->quota_current);
+ break;
+ case PROP_MAX_PHOTOS_PER_ALBUM:
+ g_value_set_int (value, priv->max_photos_per_album);
+ break;
+ case PROP_THUMBNAIL_URI:
+ g_value_set_string (value, priv->thumbnail_uri);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ gboolean success;
+ GDataPicasaWebUser *self = GDATA_PICASAWEB_USER (parsable);
+
+ if (gdata_parser_is_namespace (node, "http://schemas.google.com/photos/2007") == FALSE)
+ return GDATA_PARSABLE_CLASS (gdata_picasaweb_user_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+
+ if (gdata_parser_string_from_element (node, "user", P_REQUIRED | P_NON_EMPTY, &(self->priv->user), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "nickname", P_REQUIRED | P_NON_EMPTY, &(self->priv->nickname), &success, error) == TRUE ||
+ gdata_parser_string_from_element (node, "thumbnail", P_REQUIRED | P_NON_EMPTY, &(self->priv->thumbnail_uri), &success, error) == TRUE ||
+ gdata_parser_int64_from_element (node, "quotacurrent", P_REQUIRED | P_NO_DUPES, &(self->priv->quota_current), -1, &success, error) == TRUE ||
+ gdata_parser_int64_from_element (node, "quotalimit", P_REQUIRED | P_NO_DUPES, &(self->priv->quota_limit), -1, &success, error) == TRUE) {
+ return success;
+ } else if (xmlStrcmp (node->name, (xmlChar*) "maxPhotosPerAlbum") == 0) {
+ /* gphoto:max-photos-per-album */
+ xmlChar *max_photos_per_album = xmlNodeListGetString (doc, node->children, TRUE);
+ self->priv->max_photos_per_album = g_ascii_strtoll ((char*) max_photos_per_album, NULL, 10);
+ xmlFree (max_photos_per_album);
+ } else if (xmlStrcmp (node->name, (xmlChar*) "x-allowDownloads") == 0) { /* RHSTODO: see if this comes with the user */
+ /* gphoto:allowDownloads */
+ /* TODO: Not part of public API so we're capturing and ignoring for now. See bgo #589858. */
+ } else if (xmlStrcmp (node->name, (xmlChar*) "x-allowPrints") == 0) { /* RHSTODO: see if this comes with the user */
+ /* gphoto:allowPrints */
+ /* TODO: Not part of public API so we're capturing and ignoring for now. See bgo #589858. */
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_picasaweb_user_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ }
+
+ return TRUE;
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ /* Chain up to the parent class */
+ GDATA_PARSABLE_CLASS (gdata_picasaweb_user_parent_class)->get_namespaces (parsable, namespaces);
+
+ g_hash_table_insert (namespaces, (gchar*) "gphoto", (gchar*) "http://schemas.google.com/photos/2007");
+}
+
+/**
+ * gdata_picasaweb_user_get_user:
+ * @self: a #GDataPicasaWebUser
+ *
+ * Gets the #GDataPicasaWebUser:user property.
+ *
+ * Return value: the feed's user, or %NULL
+ *
+ * Since: 0.6.0
+ */
+const gchar *
+gdata_picasaweb_user_get_user (GDataPicasaWebUser *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_USER (self), NULL);
+ return self->priv->user;
+}
+
+/**
+ * gdata_picasaweb_user_get_nickname:
+ * @self: a #GDataPicasaWebUser
+ *
+ * Gets the #GDataPicasaWebUser:nickname property.
+ *
+ * Return value: the nickname of the feed's user's nickname, or %NULL
+ *
+ * Since: 0.6.0
+ */
+const gchar *
+gdata_picasaweb_user_get_nickname (GDataPicasaWebUser *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_USER (self), NULL);
+ return self->priv->nickname;
+}
+
+/**
+ * gdata_picasaweb_user_get_quota_limit:
+ * @self: a #GDataPicasaWebUser
+ *
+ * Gets the #GDataPicasaWebUser:quota-limit property. Note that
+ * this information is not available when accessing feeds which we
+ * haven't authenticated, and <code class="literal">0</code> is returned.
+ *
+ * Return value: the maximum capacity in bytes for this feed's account, or <code class="literal">-1</code>
+ *
+ * Since: 0.6.0
+ */
+gint64
+gdata_picasaweb_user_get_quota_limit (GDataPicasaWebUser *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_USER (self), -1);
+ return self->priv->quota_limit;
+}
+
+/**
+ * gdata_picasaweb_user_get_quota_current:
+ * @self: a #GDataPicasaWebUser
+ *
+ * Gets the #GDataPicasaWebUser:quota-current property. Note that
+ * this information is not available when accessing feeds which we
+ * haven't authenticated, and <code class="literal">0</code> is returned.
+ *
+ * Return value: the current number of bytes in use by this feed's account, or <code class="literal">-1</code>
+ *
+ * Since: 0.6.0
+ */
+gint64
+gdata_picasaweb_user_get_quota_current (GDataPicasaWebUser *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_USER (self), -1);
+ return self->priv->quota_current;
+}
+
+/**
+ * gdata_picasaweb_user_get_max_photos_per_album:
+ * @self: a #GDataPicasaWebUser
+ *
+ * Gets the #GDataPicasaWebUser:max-photos-per-album property. Note that
+ * this information is not available when accessing feeds which we
+ * haven't authenticated, and <code class="literal">0</code> is returned.
+ *
+ * Return value: the maximum number of photos an album for this account can hold, or <code class="literal">-1</code>
+ *
+ * Since: 0.6.0
+ */
+gint
+gdata_picasaweb_user_get_max_photos_per_album (GDataPicasaWebUser *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_USER (self), -1);
+ return self->priv->max_photos_per_album;
+}
+
+/**
+ * gdata_picasaweb_user_get_thumbnail_uri:
+ * @self: a #GDataPicasaWebUser
+ *
+ * Gets the #GDataPicasaWebUser:thumbnail-uri property.
+ *
+ * Return value: the URI for the thumbnail of the account, or %NULL
+ *
+ * Since: 0.6.0
+ */
+const gchar *
+gdata_picasaweb_user_get_thumbnail_uri (GDataPicasaWebUser *self)
+{
+ g_return_val_if_fail (GDATA_IS_PICASAWEB_USER (self), NULL);
+ return self->priv->thumbnail_uri;
+}
+
+/* TODO: in the future, see if we can change things like the user's nickname and thumbnail/avatar */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ * Copyright (C) Richard Schwarting 2009 <aquarichy@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_PICASAWEB_USER_H
+#define GDATA_PICASAWEB_USER_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+#include <gdata/gdata-entry.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_PICASAWEB_USER (gdata_picasaweb_user_get_type ())
+#define GDATA_PICASAWEB_USER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_PICASAWEB_USER, GDataPicasaWebUser))
+#define GDATA_PICASAWEB_USER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_PICASAWEB_USER, GDataPicasaWebUserClass))
+#define GDATA_IS_PICASAWEB_USER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_PICASAWEB_USER))
+#define GDATA_IS_PICASAWEB_USER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_PICASAWEB_USER))
+#define GDATA_PICASAWEB_USER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_PICASAWEB_USER, GDataPicasaWebUserClass))
+
+typedef struct _GDataPicasaWebUserPrivate GDataPicasaWebUserPrivate;
+
+/**
+ * GDataPicasaWebUser:
+ *
+ * All the fields in the #GDataPicasaWebUser structure are private and should never be accessed directly.
+ *
+ * Since: 0.6.0
+ */
+typedef struct {
+ GDataEntry parent;
+ GDataPicasaWebUserPrivate *priv;
+} GDataPicasaWebUser;
+
+/**
+ * GDataPicasaWebUserClass:
+ *
+ * All the fields in the #GDataPicasaWebUserClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.6.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataEntryClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataPicasaWebUserClass;
+
+GType gdata_picasaweb_user_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataPicasaWebUser, g_object_unref)
+
+const gchar *gdata_picasaweb_user_get_user (GDataPicasaWebUser *self) G_GNUC_PURE;
+const gchar *gdata_picasaweb_user_get_nickname (GDataPicasaWebUser *self) G_GNUC_PURE;
+gint64 gdata_picasaweb_user_get_quota_limit (GDataPicasaWebUser *self) G_GNUC_PURE;
+gint64 gdata_picasaweb_user_get_quota_current (GDataPicasaWebUser *self) G_GNUC_PURE;
+gint gdata_picasaweb_user_get_max_photos_per_album (GDataPicasaWebUser *self) G_GNUC_PURE;
+const gchar *gdata_picasaweb_user_get_thumbnail_uri (GDataPicasaWebUser *self) G_GNUC_PURE;
+
+G_END_DECLS
+
+#endif /* !GDATA_PICASAWEB_USER_H */
--- /dev/null
+incs += include_directories('.')
+
+include_subdir = gdata_include_subdir / 'services/picasaweb'
+
+headers = files(
+ 'gdata-picasaweb-album.h',
+ 'gdata-picasaweb-comment.h',
+ 'gdata-picasaweb-feed.h',
+ 'gdata-picasaweb-file.h',
+ 'gdata-picasaweb-query.h',
+ 'gdata-picasaweb-service.h',
+ 'gdata-picasaweb-user.h',
+)
+
+install_headers(
+ headers,
+ subdir: include_subdir,
+)
+
+gir_headers += headers
+
+sources += files(
+ 'gdata-picasaweb-album.c',
+ 'gdata-picasaweb-comment.c',
+ 'gdata-picasaweb-feed.c',
+ 'gdata-picasaweb-file.c',
+ 'gdata-picasaweb-query.c',
+ 'gdata-picasaweb-service.c',
+ 'gdata-picasaweb-user.c',
+)
+
+enums = 'gdata-picasaweb-enums'
+
+enums_in = gnome.mkenums_simple(
+ enums + '-in',
+ sources: headers,
+)
+
+# FIXME: Work around the namespace being incorrectly detected
+# by glib-mkenums. This needs to be fixed by changing the
+# namespace in libgdata. See !6.
+sources += custom_target(
+ enums + '.c',
+ input: enums_in[0],
+ output: enums + '.c',
+ command: [sed, '-e', 's/-in//', '-e', 's/g_data_picasa_web/gdata_picasaweb/', build_root / '@INPUT@'],
+ capture: true,
+)
+
+enum_headers += custom_target(
+ enums + '.h',
+ input: enums_in[1],
+ output: enums + '.h',
+ command: [sed, '-e', 's/g_data_picasa_web/gdata_picasaweb/', '-e', 's/G_TYPE_DATA_PICASA_WEB/GDATA_TYPE_PICASAWEB/', build_root / '@INPUT@'],
+ capture: true,
+ install: true,
+ install_dir: gdata_includedir / include_subdir,
+)
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Peteris Krisjanis 2013 <pecisk@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-tasks-query
+ * @short_description: GData Tasks query object
+ * @stability: Stable
+ * @include: gdata/services/tasks/gdata-tasks-query.h
+ *
+ * #GDataTasksQuery represents a collection of query parameters specific to the Google Tasks service, which go above and beyond
+ * those catered for by #GDataQuery.
+ *
+ * For more details of Google Tasks API, see the <ulink type="http" url="https://developers.google.com/google-apps/tasks/v1/reference/">
+ * online documentation</ulink>.
+ *
+ * Since: 0.15.0
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+
+#include "gdata-tasks-query.h"
+#include "gdata-query.h"
+#include "gdata-parser.h"
+#include "gdata-private.h"
+
+static void gdata_tasks_query_finalize (GObject *object);
+static void gdata_tasks_query_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_tasks_query_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void get_query_uri (GDataQuery *self, const gchar *feed_uri, GString *query_uri, gboolean *params_started);
+
+struct _GDataTasksQueryPrivate {
+ gint64 completed_max;
+ gint64 completed_min;
+ gint64 due_max;
+ gint64 due_min;
+ gboolean show_completed;
+ gboolean show_deleted;
+ gboolean show_hidden;
+};
+
+enum {
+ PROP_COMPLETED_MAX = 1,
+ PROP_COMPLETED_MIN,
+ PROP_DUE_MAX,
+ PROP_DUE_MIN,
+ PROP_SHOW_COMPLETED,
+ PROP_SHOW_DELETED,
+ PROP_SHOW_HIDDEN,
+};
+
+G_DEFINE_TYPE (GDataTasksQuery, gdata_tasks_query, GDATA_TYPE_QUERY)
+
+static void
+gdata_tasks_query_class_init (GDataTasksQueryClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataQueryClass *query_class = GDATA_QUERY_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataTasksQueryPrivate));
+
+ gobject_class->set_property = gdata_tasks_query_set_property;
+ gobject_class->get_property = gdata_tasks_query_get_property;
+ gobject_class->finalize = gdata_tasks_query_finalize;
+
+ query_class->get_query_uri = get_query_uri;
+
+ /**
+ * GDataTasksQuery:completed-max:
+ *
+ * Upper bound for a task's completion date (as a RFC 3339 timestamp) to filter by. Optional.
+ * The default is not to filter by completion date.
+ *
+ * Since: 0.15.0
+ */
+ g_object_class_install_property (gobject_class, PROP_COMPLETED_MAX,
+ g_param_spec_int64 ("completed-max",
+ "Max task completion date", "Upper bound for a task's completion date to filter by.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataTasksQuery:completed-min:
+ *
+ * Lower bound for a task's completion date (as a RFC 3339 timestamp) to filter by. Optional.
+ * The default is not to filter by completion date.
+ *
+ * Since: 0.15.0
+ */
+ g_object_class_install_property (gobject_class, PROP_COMPLETED_MIN,
+ g_param_spec_int64 ("completed-min",
+ "Min task completion date", "Lower bound for a task's completion date to filter by.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataTasksQuery:due-max:
+ *
+ * Upper bound for a task's due date (as a RFC 3339 timestamp) to filter by. Optional.
+ * The default is not to filter by completion date.
+ *
+ * Since: 0.15.0
+ */
+ g_object_class_install_property (gobject_class, PROP_DUE_MAX,
+ g_param_spec_int64 ("due-max",
+ "Max task completion date", "Upper bound for a task's completion date to filter by.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataTasksQuery:due-min:
+ *
+ * Lower bound for a task's due date (as a RFC 3339 timestamp) to filter by. Optional.
+ * The default is not to filter by completion date.
+ * Since: 0.15.0
+ */
+ g_object_class_install_property (gobject_class, PROP_DUE_MIN,
+ g_param_spec_int64 ("due-min",
+ "Min task completion date", "Lower bound for a task's completion date to filter by.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataTasksQuery:show-completed:
+ *
+ * Flag indicating whether completed tasks are returned in the result. Optional. The default is %FALSE.
+ *
+ * Since: 0.15.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SHOW_COMPLETED,
+ g_param_spec_boolean ("show-completed",
+ "Show completed tasks?", "Indicated whatever completed tasks are returned in the result.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataTasksQuery:show-deleted:
+ *
+ * Flag indicating whether deleted tasks are returned in the result. Optional. The default is %FALSE.
+ *
+ * Since: 0.15.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SHOW_DELETED,
+ g_param_spec_boolean ("show-deleted",
+ "Show deleted tasks?", "Indicated whatever deleted tasks are returned in the result.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataTasksQuery:show-hidden:
+ *
+ * Flag indicating whether hidden tasks are returned in the result. Optional. The default is %FALSE.
+ *
+ * Since: 0.15.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SHOW_HIDDEN,
+ g_param_spec_boolean ("show-hidden",
+ "Show hidden tasks?", "Indicated whatever hidden tasks are returned in the result.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_tasks_query_init (GDataTasksQuery *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_TASKS_QUERY, GDataTasksQueryPrivate);
+ self->priv->completed_min = -1;
+ self->priv->completed_max = -1;
+ self->priv->due_min = -1;
+ self->priv->due_max = -1;
+
+ _gdata_query_set_pagination_type (GDATA_QUERY (self),
+ GDATA_QUERY_PAGINATION_TOKENS);
+}
+
+static void
+gdata_tasks_query_finalize (GObject *object)
+{
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_tasks_query_parent_class)->finalize (object);
+}
+
+static void
+gdata_tasks_query_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataTasksQueryPrivate *priv = GDATA_TASKS_QUERY (object)->priv;
+
+ switch (property_id) {
+ case PROP_COMPLETED_MAX:
+ g_value_set_int64 (value, priv->completed_max);
+ break;
+ case PROP_COMPLETED_MIN:
+ g_value_set_int64 (value, priv->completed_min);
+ break;
+ case PROP_DUE_MAX:
+ g_value_set_int64 (value, priv->due_max);
+ break;
+ case PROP_DUE_MIN:
+ g_value_set_int64 (value, priv->due_min);
+ break;
+ case PROP_SHOW_COMPLETED:
+ g_value_set_boolean (value, priv->show_completed);
+ break;
+ case PROP_SHOW_DELETED:
+ g_value_set_boolean (value, priv->show_deleted);
+ break;
+ case PROP_SHOW_HIDDEN:
+ g_value_set_boolean (value, priv->show_hidden);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_tasks_query_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataTasksQuery *self = GDATA_TASKS_QUERY (object);
+
+ switch (property_id) {
+ case PROP_COMPLETED_MAX:
+ gdata_tasks_query_set_completed_max (self, g_value_get_int64 (value));
+ break;
+ case PROP_COMPLETED_MIN:
+ gdata_tasks_query_set_completed_min (self, g_value_get_int64 (value));
+ break;
+ case PROP_DUE_MAX:
+ gdata_tasks_query_set_due_max (self, g_value_get_int64 (value));
+ break;
+ case PROP_DUE_MIN:
+ gdata_tasks_query_set_due_min (self, g_value_get_int64 (value));
+ break;
+ case PROP_SHOW_COMPLETED:
+ gdata_tasks_query_set_show_completed (self, g_value_get_boolean (value));
+ break;
+ case PROP_SHOW_DELETED:
+ gdata_tasks_query_set_show_deleted (self, g_value_get_boolean (value));
+ break;
+ case PROP_SHOW_HIDDEN:
+ gdata_tasks_query_set_show_hidden (self, g_value_get_boolean (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+get_query_uri (GDataQuery *self, const gchar *feed_uri, GString *query_uri, gboolean *params_started)
+{
+ GDataTasksQueryPrivate *priv = GDATA_TASKS_QUERY (self)->priv;
+
+ /* Chain up to the parent class. This adds a load of irrelevant query
+ * parameters, but they’re harmless. Importantly, it adds pagination
+ * support. */
+ GDATA_QUERY_CLASS (gdata_tasks_query_parent_class)->get_query_uri (self, feed_uri, query_uri, params_started);
+
+ #define APPEND_SEP g_string_append_c (query_uri, (*params_started == FALSE) ? '?' : '&'); *params_started = TRUE;
+
+ if (gdata_query_get_max_results (GDATA_QUERY (self)) > 0) {
+ APPEND_SEP
+ g_string_append_printf (query_uri, "maxResults=%u", gdata_query_get_max_results (GDATA_QUERY (self)));
+ }
+
+ if (gdata_query_get_updated_min (GDATA_QUERY (self)) != -1) {
+ gchar *updated_min;
+
+ APPEND_SEP
+ g_string_append (query_uri, "updatedMin=");
+ updated_min = gdata_parser_int64_to_iso8601 (gdata_query_get_updated_min (GDATA_QUERY (self)));
+ g_string_append (query_uri, updated_min);
+ g_free (updated_min);
+ }
+
+ if (priv->completed_min != -1) {
+ gchar *completed_min;
+
+ APPEND_SEP
+ g_string_append (query_uri, "completedMin=");
+ completed_min = gdata_parser_int64_to_iso8601 (priv->completed_min);
+ g_string_append (query_uri, completed_min);
+ g_free (completed_min);
+ }
+
+ if (priv->completed_max != -1) {
+ gchar *completed_max;
+
+ APPEND_SEP
+ g_string_append (query_uri, "completedMax=");
+ completed_max = gdata_parser_int64_to_iso8601 (priv->completed_max);
+ g_string_append (query_uri, completed_max);
+ g_free (completed_max);
+ }
+
+ if (priv->due_min != -1) {
+ gchar *due_min;
+
+ APPEND_SEP
+ g_string_append (query_uri, "dueMin=");
+ due_min = gdata_parser_int64_to_iso8601 (priv->due_min);
+ g_string_append (query_uri, due_min);
+ g_free (due_min);
+ }
+
+ if (priv->due_max != -1) {
+ gchar *due_max;
+
+ APPEND_SEP
+ g_string_append (query_uri, "dueMax=");
+ due_max = gdata_parser_int64_to_iso8601 (priv->due_max);
+ g_string_append (query_uri, due_max);
+ g_free (due_max);
+ }
+
+ APPEND_SEP
+ if (priv->show_completed == TRUE) {
+ g_string_append (query_uri, "showCompleted=true");
+ } else {
+ g_string_append (query_uri, "showCompleted=false");
+ }
+
+ APPEND_SEP
+ if (priv->show_deleted == TRUE) {
+ g_string_append (query_uri, "showDeleted=true");
+ } else {
+ g_string_append (query_uri, "showDeleted=false");
+ }
+
+ APPEND_SEP
+ if (priv->show_hidden == TRUE) {
+ g_string_append (query_uri, "showHidden=true");
+ } else {
+ g_string_append (query_uri, "showHidden=false");
+ }
+
+ #undef APPEND_SEP
+}
+
+/**
+ * gdata_tasks_query_new:
+ * @q: (allow-none): a query string, or %NULL
+ *
+ * Creates a new #GDataTasksQuery. @q is unused and must be set to %NULL.
+ *
+ * Return value: a new #GDataTasksQuery
+ *
+ * Since: 0.15.0
+ */
+GDataTasksQuery *
+gdata_tasks_query_new (const gchar *q)
+{
+ /* Ignore the q parameter, as it's not used in any of the queries and
+ * will cause errors. */
+ return g_object_new (GDATA_TYPE_TASKS_QUERY, NULL);
+}
+
+/**
+ * gdata_tasks_query_get_completed_max:
+ * @self: a #GDataTasksQuery
+ *
+ * Gets the #GDataTasksQuery:completed-max property. If the property is unset, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the UNIX timestamp for the completed-max property, or <code class="literal">-1</code>
+ *
+ * Since: 0.15.0
+ */
+gint64
+gdata_tasks_query_get_completed_max (GDataTasksQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_TASKS_QUERY (self), -1);
+ return self->priv->completed_max;
+}
+
+/**
+ * gdata_tasks_query_set_completed_max:
+ * @self: a #GDataTasksQuery
+ * @completed_max: upper bound for a task's completion date by UNIX timestamp, or <code class="literal">-1</code>
+ *
+ * Sets the #GDataTasksQuery:completed-max property of the #GDataTasksQuery
+ * to the new time/date, @completed_max.
+ *
+ * Set @completed_max to <code class="literal">-1</code> to unset the property in the query URI.
+ *
+ * Since: 0.15.0
+ */
+void
+gdata_tasks_query_set_completed_max (GDataTasksQuery *self, gint64 completed_max)
+{
+ g_return_if_fail (GDATA_IS_TASKS_QUERY (self));
+ g_return_if_fail (completed_max >= -1);
+
+ self->priv->completed_max = completed_max;
+ g_object_notify (G_OBJECT (self), "completed-max");
+
+ /* Our current ETag will no longer be relevant. */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_tasks_query_get_completed_min:
+ * @self: a #GDataTasksQuery
+ *
+ * Gets the #GDataTasksQuery:completed-min property. If the property is unset, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the UNIX timestamp for the completed-min property, or <code class="literal">-1</code>
+ *
+ * Since: 0.15.0
+ */
+gint64
+gdata_tasks_query_get_completed_min (GDataTasksQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_TASKS_QUERY (self), -1);
+ return self->priv->completed_min;
+}
+
+/**
+ * gdata_tasks_query_set_completed_min:
+ * @self: a #GDataTasksQuery
+ * @completed_min: lower bound for a task's completion date by UNIX timestamp, or <code class="literal">-1</code>
+ *
+ * Sets the #GDataTasksQuery:completed-min property of the #GDataTasksQuery
+ * to the new time/date, @completed_min.
+ *
+ * Set @completed_min to <code class="literal">-1</code> to unset the property in the query URI.
+ *
+ * Since: 0.15.0
+ */
+void
+gdata_tasks_query_set_completed_min (GDataTasksQuery *self, gint64 completed_min)
+{
+ g_return_if_fail (GDATA_IS_TASKS_QUERY (self));
+ g_return_if_fail (completed_min >= -1);
+
+ self->priv->completed_min = completed_min;
+ g_object_notify (G_OBJECT (self), "completed-min");
+
+ /* Our current ETag will no longer be relevant. */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_tasks_query_get_due_max:
+ * @self: a #GDataTasksQuery
+ *
+ * Gets the #GDataTasksQuery:due-max property. If the property is unset, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the UNIX timestamp for the due-max property, or <code class="literal">-1</code>
+ *
+ * Since: 0.15.0
+ */
+gint64
+gdata_tasks_query_get_due_max (GDataTasksQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_TASKS_QUERY (self), -1);
+ return self->priv->due_max;
+}
+
+/**
+ * gdata_tasks_query_set_due_max:
+ * @self: a #GDataTasksQuery
+ * @due_max: upper bound for a task's due date by UNIX timestamp, or <code class="literal">-1</code>
+ *
+ * Sets the #GDataTasksQuery:due-max property of the #GDataTasksQuery
+ * to the new time/date, @due_max.
+ *
+ * Set @due_max to <code class="literal">-1</code> to unset the property in the query URI.
+ *
+ * Since: 0.15.0
+ */
+void
+gdata_tasks_query_set_due_max (GDataTasksQuery *self, gint64 due_max)
+{
+ g_return_if_fail (GDATA_IS_TASKS_QUERY (self));
+ g_return_if_fail (due_max >= -1);
+
+ self->priv->due_max = due_max;
+ g_object_notify (G_OBJECT (self), "due-max");
+
+ /* Our current ETag will no longer be relevant. */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+
+/**
+ * gdata_tasks_query_get_due_min:
+ * @self: a #GDataTasksQuery
+ *
+ * Gets the #GDataTasksQuery:due-min property. If the property is unset, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the UNIX timestamp for the due-min property, or <code class="literal">-1</code>
+ *
+ * Since: 0.15.0
+ */
+gint64
+gdata_tasks_query_get_due_min (GDataTasksQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_TASKS_QUERY (self), -1);
+ return self->priv->due_min;
+}
+
+/**
+ * gdata_tasks_query_set_due_min:
+ * @self: a #GDataTasksQuery
+ * @due_min: lower bound for a task's due date by UNIX timestamp, or <code class="literal">-1</code>
+ *
+ * Sets the #GDataTasksQuery:due-min property of the #GDataTasksQuery
+ * to the new time/date, @due_min.
+ *
+ * Set @due_min to <code class="literal">-1</code> to unset the property in the query URI.
+ *
+ * Since: 0.15.0
+ */
+void
+gdata_tasks_query_set_due_min (GDataTasksQuery *self, gint64 due_min)
+{
+ g_return_if_fail (GDATA_IS_TASKS_QUERY (self));
+ g_return_if_fail (due_min >= -1);
+
+ self->priv->due_min = due_min;
+ g_object_notify (G_OBJECT (self), "due-min");
+
+ /* Our current ETag will no longer be relevant. */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_tasks_query_get_show_completed:
+ * @self: a #GDataTasksQuery
+ *
+ * Gets the #GDataTasksQuery:show-completed property.
+ *
+ * Return value: the show-completed property
+ *
+ * Since: 0.15.0
+ */
+gboolean
+gdata_tasks_query_get_show_completed (GDataTasksQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_TASKS_QUERY (self), FALSE);
+ return self->priv->show_completed;
+}
+
+/**
+ * gdata_tasks_query_set_show_completed:
+ * @self: a #GDataTasksQuery
+ * @show_completed: %TRUE to show completed tasks, %FALSE otherwise
+ *
+ * Sets the #GDataTasksQuery:show-completed property of the #GDataTasksQuery.
+ *
+ * Since: 0.15.0
+ */
+void
+gdata_tasks_query_set_show_completed (GDataTasksQuery *self, gboolean show_completed)
+{
+ g_return_if_fail (GDATA_IS_TASKS_QUERY (self));
+
+ self->priv->show_completed = show_completed;
+ g_object_notify (G_OBJECT (self), "show-completed");
+
+ /* Our current ETag will no longer be relevant. */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_tasks_query_get_show_deleted:
+ * @self: a #GDataTasksQuery
+ *
+ * Gets the #GDataTasksQuery:show-deleted property.
+ *
+ * Return value: the show-deleted property
+ *
+ * Since: 0.15.0
+ */
+gboolean
+gdata_tasks_query_get_show_deleted (GDataTasksQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_TASKS_QUERY (self), FALSE);
+ return self->priv->show_deleted;
+}
+
+/**
+ * gdata_tasks_query_set_show_deleted:
+ * @self: a #GDataTasksQuery
+ * @show_deleted: %TRUE to show deleted tasks, %FALSE otherwise
+ *
+ * Sets the #GDataTasksQuery:show-deleted property of the #GDataTasksQuery.
+ *
+ * Since: 0.15.0
+ */
+void
+gdata_tasks_query_set_show_deleted (GDataTasksQuery *self, gboolean show_deleted)
+{
+ g_return_if_fail (GDATA_IS_TASKS_QUERY (self));
+
+ self->priv->show_deleted = show_deleted;
+ g_object_notify (G_OBJECT (self), "show-deleted");
+
+ /* Our current ETag will no longer be relevant. */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_tasks_query_get_show_hidden:
+ * @self: a #GDataTasksQuery
+ *
+ * Gets the #GDataTasksQuery:show-hidden property.
+ *
+ * Return value: the show-hidden property
+ *
+ * Since: 0.15.0
+ */
+gboolean
+gdata_tasks_query_get_show_hidden (GDataTasksQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_TASKS_QUERY (self), FALSE);
+ return self->priv->show_hidden;
+}
+
+/**
+ * gdata_tasks_query_set_show_hidden:
+ * @self: a #GDataTasksQuery
+ * @show_hidden: %TRUE to show hidden tasks, %FALSE otherwise
+ *
+ * Sets the #GDataTasksQuery:show-hidden property of the #GDataTasksQuery.
+ *
+ * Since: 0.15.0
+ */
+void
+gdata_tasks_query_set_show_hidden (GDataTasksQuery *self, gboolean show_hidden)
+{
+ g_return_if_fail (GDATA_IS_TASKS_QUERY (self));
+
+ self->priv->show_hidden = show_hidden;
+ g_object_notify (G_OBJECT (self), "show-hidden");
+
+ /* Our current ETag will no longer be relevant. */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Peteris Krisjanis 2013 <pecisk@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_TASKS_QUERY_H
+#define GDATA_TASKS_QUERY_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-query.h>
+#include <gdata/gdata-types.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_TASKS_QUERY (gdata_tasks_query_get_type ())
+#define GDATA_TASKS_QUERY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_TASKS_QUERY, GDataTasksQuery))
+#define GDATA_TASKS_QUERY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_TASKS_QUERY, GDataTasksQueryClass))
+#define GDATA_IS_TASKS_QUERY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_TASKS_QUERY))
+#define GDATA_IS_TASKS_QUERY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_TASKS_QUERY))
+#define GDATA_TASKS_QUERY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_TASKS_QUERY, GDataTasksQueryClass))
+
+typedef struct _GDataTasksQueryPrivate GDataTasksQueryPrivate;
+
+/**
+ * GDataTasksQuery:
+ *
+ * All the fields in the #GDataTasksQuery structure are private and should never be accessed directly.
+ *
+ * Since: 0.15.0
+ */
+typedef struct {
+ GDataQuery parent;
+ GDataTasksQueryPrivate *priv;
+} GDataTasksQuery;
+
+/**
+ * GDataTasksQueryClass:
+ *
+ * All the fields in the #GDataTasksQueryClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.15.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataQueryClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataTasksQueryClass;
+
+GType gdata_tasks_query_get_type (void) G_GNUC_CONST;
+
+GDataTasksQuery *gdata_tasks_query_new (const gchar *q) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+gint64 gdata_tasks_query_get_completed_max (GDataTasksQuery *self) G_GNUC_PURE;
+void gdata_tasks_query_set_completed_max (GDataTasksQuery *self, gint64 completed_max);
+gint64 gdata_tasks_query_get_completed_min (GDataTasksQuery *self) G_GNUC_PURE;
+void gdata_tasks_query_set_completed_min (GDataTasksQuery *self, gint64 completed_min);
+gint64 gdata_tasks_query_get_due_max (GDataTasksQuery *self) G_GNUC_PURE;
+void gdata_tasks_query_set_due_max (GDataTasksQuery *self, gint64 due_max);
+gint64 gdata_tasks_query_get_due_min (GDataTasksQuery *self) G_GNUC_PURE;
+void gdata_tasks_query_set_due_min (GDataTasksQuery *self, gint64 due_min);
+gboolean gdata_tasks_query_get_show_completed (GDataTasksQuery *self) G_GNUC_PURE;
+void gdata_tasks_query_set_show_completed (GDataTasksQuery *self, gboolean show_completed);
+gboolean gdata_tasks_query_get_show_deleted (GDataTasksQuery *self) G_GNUC_PURE;
+void gdata_tasks_query_set_show_deleted (GDataTasksQuery *self, gboolean show_deleted);
+gboolean gdata_tasks_query_get_show_hidden (GDataTasksQuery *self) G_GNUC_PURE;
+void gdata_tasks_query_set_show_hidden (GDataTasksQuery *self, gboolean show_hidden);
+
+G_END_DECLS
+
+#endif /* !GDATA_TASKS_QUERY_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Peteris Krisjanis 2013 <pecisk@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-tasks-service
+ * @short_description: GData Tasks service object
+ * @stability: Stable
+ * @include: gdata/services/tasks/gdata-tasks-service.h
+ *
+ * #GDataTasksService is a subclass of #GDataService for communicating with the API of Google Tasks. It supports querying
+ * for, inserting, editing and deleting tasks from tasklists, as well as operations on the tasklists themselves.
+ *
+ * For more details of Google Tasks API, see the <ulink type="http" url="https://developers.google.com/google-apps/tasks/v1/reference/">
+ * online documentation</ulink>.
+ *
+ * Since: 0.15.0
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+
+#include "gdata-tasks-service.h"
+#include "gdata-service.h"
+#include "gdata-private.h"
+#include "gdata-query.h"
+#include "gdata-feed.h"
+
+/* Standards reference here: https://developers.google.com/google-apps/tasks/v1/reference/ */
+
+static void parse_error_response (GDataService *self,
+ GDataOperationType operation_type,
+ guint status, const gchar *reason_phrase,
+ const gchar *response_body, gint length,
+ GError **error);
+static GList *get_authorization_domains (void);
+
+_GDATA_DEFINE_AUTHORIZATION_DOMAIN (tasks, "tasks", "https://www.googleapis.com/auth/tasks")
+G_DEFINE_TYPE (GDataTasksService, gdata_tasks_service, GDATA_TYPE_SERVICE)
+
+static void
+gdata_tasks_service_class_init (GDataTasksServiceClass *klass)
+{
+ GDataServiceClass *service_class = GDATA_SERVICE_CLASS (klass);
+
+ service_class->feed_type = GDATA_TYPE_FEED;
+
+ service_class->parse_error_response = parse_error_response;
+ service_class->get_authorization_domains = get_authorization_domains;
+}
+
+static void
+gdata_tasks_service_init (GDataTasksService *self)
+{
+ /* Nothing to see here */
+}
+
+/* The error format used by the Google Tasks API doesn’t seem to be documented
+ * anywhere, which is a little frustrating. Here’s an example of it:
+ * {
+ * "error": {
+ * "errors": [
+ * {
+ * "domain": "usageLimits",
+ * "reason": "dailyLimitExceededUnreg",
+ * "message": "Daily Limit for Unauthenticated Use Exceeded.",
+ * "extendedHelp": "https://code.google.com/apis/console"
+ * }
+ * ],
+ * "code": 403,
+ * "message": "Daily Limit for Unauthenticated Use Exceeded."
+ * }
+ * }
+ * or:
+ * {
+ * "error": {
+ * "errors": [
+ * {
+ * "domain": "global",
+ * "reason": "authError",
+ * "message": "Invalid Credentials",
+ * "locationType": "header",
+ * "location": "Authorization"
+ * }
+ * ],
+ * "code": 401,
+ * "message": "Invalid Credentials"
+ * }
+ * }
+ */
+static void
+parse_error_response (GDataService *self, GDataOperationType operation_type,
+ guint status, const gchar *reason_phrase,
+ const gchar *response_body, gint length, GError **error)
+{
+ JsonParser *parser = NULL; /* owned */
+ JsonReader *reader = NULL; /* owned */
+ gint i;
+ GError *child_error = NULL;
+
+ if (response_body == NULL) {
+ goto parent;
+ }
+
+ if (length == -1) {
+ length = strlen (response_body);
+ }
+
+ parser = json_parser_new ();
+ if (!json_parser_load_from_data (parser, response_body, length,
+ &child_error)) {
+ goto parent;
+ }
+
+ reader = json_reader_new (json_parser_get_root (parser));
+
+ /* Check that the outermost node is an object. */
+ if (!json_reader_is_object (reader)) {
+ goto parent;
+ }
+
+ /* Grab the ‘error’ member, then its ‘errors’ member. */
+ if (!json_reader_read_member (reader, "error") ||
+ !json_reader_is_object (reader) ||
+ !json_reader_read_member (reader, "errors") ||
+ !json_reader_is_array (reader)) {
+ goto parent;
+ }
+
+ /* Parse each of the errors. Return the first one, and print out any
+ * others. */
+ for (i = 0; i < json_reader_count_elements (reader); i++) {
+ const gchar *domain, *reason, *message, *extended_help;
+ const gchar *location_type, *location;
+
+ /* Parse the error. */
+ if (!json_reader_read_element (reader, i) ||
+ !json_reader_is_object (reader)) {
+ goto parent;
+ }
+
+ json_reader_read_member (reader, "domain");
+ domain = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "reason");
+ reason = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "message");
+ message = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "extendedHelp");
+ extended_help = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "locationType");
+ location_type = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "location");
+ location = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ /* End the error element. */
+ json_reader_end_element (reader);
+
+ /* Create an error message, but only for the first error */
+ if (error == NULL || *error == NULL) {
+ if (g_strcmp0 (domain, "usageLimits") == 0 &&
+ g_strcmp0 (reason,
+ "dailyLimitExceededUnreg") == 0) {
+ /* Daily Limit for Unauthenticated Use
+ * Exceeded. */
+ g_set_error (error, GDATA_SERVICE_ERROR,
+ GDATA_SERVICE_ERROR_API_QUOTA_EXCEEDED,
+ _("You have made too many API "
+ "calls recently. Please wait a "
+ "few minutes and try again."));
+ } else if (g_strcmp0 (domain, "global") == 0 &&
+ (g_strcmp0 (reason, "authError") == 0 ||
+ g_strcmp0 (reason, "required") == 0)) {
+ /* Authentication problem */
+ g_set_error (error, GDATA_SERVICE_ERROR,
+ GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED,
+ _("You must be authenticated to "
+ "do this."));
+ } else {
+ /* Unknown or validation (protocol) error. Fall
+ * back to working off the HTTP status code. */
+ g_warning ("Unknown error code ‘%s’ in domain "
+ "‘%s’ received with location type "
+ "‘%s’, location ‘%s’, extended help "
+ "‘%s’ and message ‘%s’.",
+ reason, domain, location_type,
+ location, extended_help, message);
+
+ goto parent;
+ }
+ } else {
+ /* For all errors after the first, log the error in the
+ * terminal. */
+ g_debug ("Error message received in response: domain "
+ "‘%s’, reason ‘%s’, extended help ‘%s’, "
+ "message ‘%s’, location type ‘%s’, location "
+ "‘%s’.",
+ domain, reason, extended_help, message,
+ location_type, location);
+ }
+ }
+
+ /* End the ‘errors’ and ‘error’ members. */
+ json_reader_end_element (reader);
+ json_reader_end_element (reader);
+
+ g_clear_object (&reader);
+ g_clear_object (&parser);
+
+ /* Ensure we’ve actually set an error message. */
+ g_assert (error == NULL || *error != NULL);
+
+ return;
+
+parent:
+ g_clear_object (&reader);
+ g_clear_object (&parser);
+
+ /* Chain up to the parent class */
+ GDATA_SERVICE_CLASS (gdata_tasks_service_parent_class)->parse_error_response (self, operation_type, status, reason_phrase,
+ response_body, length, error);
+}
+
+static GList *
+get_authorization_domains (void)
+{
+ return g_list_prepend (NULL, get_tasks_authorization_domain ());
+}
+
+/**
+ * gdata_tasks_service_new:
+ * @authorizer: (allow-none): a #GDataAuthorizer to authorize the service's requests, or %NULL
+ *
+ * Creates a new #GDataTasksService using the given #GDataAuthorizer. If @authorizer is %NULL, all requests are made as an unauthenticated user.
+ *
+ * Return value: a new #GDataTasksService, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.15.0
+ */
+GDataTasksService *
+gdata_tasks_service_new (GDataAuthorizer *authorizer)
+{
+ g_return_val_if_fail (authorizer == NULL || GDATA_IS_AUTHORIZER (authorizer), NULL);
+
+ return g_object_new (GDATA_TYPE_TASKS_SERVICE,
+ "authorizer", authorizer,
+ NULL);
+}
+
+/**
+ * gdata_tasks_service_get_primary_authorization_domain:
+ *
+ * The primary #GDataAuthorizationDomain for interacting with Google Tasks. This will not normally need to be used, as it's used internally
+ * by the #GDataTasksService methods. However, if using the plain #GDataService methods to implement custom queries or requests which libgdata
+ * does not support natively, then this domain may be needed to authorize the requests.
+ *
+ * The domain never changes, and is interned so that pointer comparison can be used to differentiate it from other authorization domains.
+ *
+ * Return value: (transfer none): the service's authorization domain
+ *
+ * Since: 0.15.0
+ */
+GDataAuthorizationDomain *
+gdata_tasks_service_get_primary_authorization_domain (void)
+{
+ return get_tasks_authorization_domain ();
+}
+
+/**
+ * gdata_tasks_service_query_all_tasklists:
+ * @self: a #GDataTasksService
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (scope call) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @error: (allow-none): a #GError, or %NULL
+ *
+ * Queries the service to return a list of all tasklists from the authenticated account which match the given
+ * @query. It will return all tasklists the user has read access to.
+ *
+ * For more details, see gdata_service_query().
+ *
+ * Return value: (transfer full): a #GDataFeed of query results; unref with g_object_unref()
+ *
+ * Since: 0.15.0
+ */
+GDataFeed *
+gdata_tasks_service_query_all_tasklists (GDataTasksService *self, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error)
+{
+ GDataFeed *feed;
+ gchar *request_uri;
+
+ g_return_val_if_fail (GDATA_IS_TASKS_SERVICE (self), NULL);
+ g_return_val_if_fail (query == NULL || GDATA_IS_QUERY (query), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ /* Ensure we're authenticated first */
+ if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (self)),
+ get_tasks_authorization_domain ()) == FALSE) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED,
+ _("You must be authenticated to query all tasklists."));
+ return NULL;
+ }
+
+ request_uri = g_strconcat (_gdata_service_get_scheme (), "://www.googleapis.com/tasks/v1/users/@me/lists", NULL);
+ feed = gdata_service_query (GDATA_SERVICE (self), get_tasks_authorization_domain (), request_uri, query, GDATA_TYPE_TASKS_TASKLIST,
+ cancellable, progress_callback, progress_user_data, error);
+ g_free (request_uri);
+
+ return feed;
+}
+
+/**
+ * gdata_tasks_service_query_all_tasklists_async:
+ * @self: a #GDataTasksService
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @destroy_progress_user_data: (allow-none): the function to call when @progress_callback will not be called any more, or %NULL. This function will be
+ * called with @progress_user_data as a parameter and can be used to free any memory allocated for it.
+ * @callback: a #GAsyncReadyCallback to call when authentication is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Queries the service to return a list of all tasklists from the authenticated account which match the given
+ * @query. @self and @query are all reffed when this function is called, so can safely be unreffed after
+ * this function returns.
+ *
+ * For more details, see gdata_tasks_service_query_all_tasklists(), which is the synchronous version of
+ * this function, and gdata_service_query_async(), which is the base asynchronous query function.
+ *
+ * Since: 0.15.0
+ */
+void
+gdata_tasks_service_query_all_tasklists_async (GDataTasksService *self, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ gchar *request_uri;
+
+ g_return_if_fail (GDATA_IS_TASKS_SERVICE (self));
+ g_return_if_fail (query == NULL || GDATA_IS_QUERY (query));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+ g_return_if_fail (callback != NULL);
+
+ /* Ensure we're authenticated first */
+ if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (self)),
+ get_tasks_authorization_domain ()) == FALSE) {
+ g_autoptr(GTask) task = NULL;
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_service_query_async);
+ g_task_return_new_error (task, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED, "%s",
+ _("You must be authenticated to query all tasklists."));
+
+ return;
+ }
+
+ request_uri = g_strconcat (_gdata_service_get_scheme (), "://www.googleapis.com/tasks/v1/users/@me/lists", NULL);
+ gdata_service_query_async (GDATA_SERVICE (self), get_tasks_authorization_domain (), request_uri, query, GDATA_TYPE_TASKS_TASKLIST,
+ cancellable, progress_callback, progress_user_data, destroy_progress_user_data, callback, user_data);
+ g_free (request_uri);
+}
+
+/**
+ * gdata_tasks_service_query_tasks:
+ * @self: a #GDataTasksService
+ * @tasklist: a #GDataTasksTasklist
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (scope call) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @error: (allow-none): a #GError, or %NULL
+ *
+ * Queries the service to return a list of tasks in the given @tasklist, which match @query.
+ *
+ * For more details, see gdata_service_query().
+ *
+ * Return value: (transfer full): a #GDataFeed of query results; unref with g_object_unref()
+ *
+ * Since: 0.15.0
+ */
+GDataFeed *
+gdata_tasks_service_query_tasks (GDataTasksService *self, GDataTasksTasklist *tasklist, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error)
+{
+ gchar* request_uri;
+ GDataFeed *feed;
+
+ g_return_val_if_fail (GDATA_IS_TASKS_SERVICE (self), NULL);
+ g_return_val_if_fail (GDATA_IS_TASKS_TASKLIST (tasklist), NULL);
+ g_return_val_if_fail (gdata_entry_get_id (GDATA_ENTRY (tasklist)) != NULL, NULL);
+ g_return_val_if_fail (query == NULL || GDATA_IS_QUERY (query), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ /* Ensure we're authenticated first */
+ if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (self)),
+ get_tasks_authorization_domain ()) == FALSE) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED,
+ _("You must be authenticated to query your own tasks."));
+ return NULL;
+ }
+
+ /* Should add /tasks as requested by API */
+ request_uri = g_strconcat (_gdata_service_get_scheme (), "://www.googleapis.com/tasks/v1/lists/", gdata_entry_get_id (GDATA_ENTRY (tasklist)), "/tasks", NULL);
+ /* Execute the query */
+ feed = gdata_service_query (GDATA_SERVICE (self), get_tasks_authorization_domain (), request_uri, query, GDATA_TYPE_TASKS_TASK, cancellable,
+ progress_callback, progress_user_data, error);
+ g_free (request_uri);
+
+ return feed;
+}
+
+/**
+ * gdata_tasks_service_query_tasks_async:
+ * @self: a #GDataTasksService
+ * @tasklist: a #GDataTasksTasklist
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @destroy_progress_user_data: (allow-none): the function to call when @progress_callback will not be called any more, or %NULL. This function will be
+ * called with @progress_user_data as a parameter and can be used to free any memory allocated for it.
+ * @callback: a #GAsyncReadyCallback to call when the query is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Queries the service to return a list of tasks in the given @tasklist, which match @query. @self, @tasklist and @query are all reffed when this
+ * function is called, so can safely be unreffed after this function returns.
+ *
+ * Get the results of the query using gdata_service_query_finish() in the @callback.
+ *
+ * For more details, see gdata_tasks_service_query_tasks(), which is the synchronous version of this function, and gdata_service_query_async(),
+ * which is the base asynchronous query function.
+ *
+ * Since: 0.15.0
+ */
+void
+gdata_tasks_service_query_tasks_async (GDataTasksService *self, GDataTasksTasklist *tasklist, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ gchar *request_uri;
+
+ g_return_if_fail (GDATA_IS_TASKS_SERVICE (self));
+ g_return_if_fail (GDATA_IS_TASKS_TASKLIST (tasklist));
+ g_return_if_fail (gdata_entry_get_id (GDATA_ENTRY (tasklist)) != NULL);
+ g_return_if_fail (query == NULL || GDATA_IS_QUERY (query));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+ g_return_if_fail (callback != NULL);
+
+ /* Ensure we're authenticated first */
+ if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (self)),
+ get_tasks_authorization_domain ()) == FALSE) {
+ g_autoptr(GTask) task = NULL;
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_service_query_async);
+ g_task_return_new_error (task, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED, "%s",
+ _("You must be authenticated to query your own tasks."));
+
+ return;
+ }
+
+ /* Should add /tasks as requested by API */
+ request_uri = g_strconcat (_gdata_service_get_scheme (), "://www.googleapis.com/tasks/v1/lists/", gdata_entry_get_id (GDATA_ENTRY (tasklist)), "/tasks", NULL);
+ /* Execute the query */
+ gdata_service_query_async (GDATA_SERVICE (self), get_tasks_authorization_domain (), request_uri, query, GDATA_TYPE_TASKS_TASK, cancellable,
+ progress_callback, progress_user_data, destroy_progress_user_data, callback, user_data);
+ g_free (request_uri);
+}
+
+/**
+ * gdata_tasks_service_insert_task:
+ * @self: a #GDataTasksService
+ * @task: the #GDataTasksTask to insert
+ * @tasklist: #GDataTasksTasklist to insert into
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: (allow-none): a #GError, or %NULL
+ *
+ * Inserts @task by uploading it to the online tasks service into tasklist @tasklist. It is safe to unref @tasklist after function returns.
+ *
+ * For more details, see gdata_service_insert_entry().
+ *
+ * Return value: (transfer full): an updated #GDataTasksTask, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.15.0
+ */
+GDataTasksTask *
+gdata_tasks_service_insert_task (GDataTasksService *self, GDataTasksTask *task, GDataTasksTasklist *tasklist, GCancellable *cancellable, GError **error)
+{
+ gchar *request_uri;
+ GDataEntry *entry;
+
+ g_return_val_if_fail (GDATA_IS_TASKS_SERVICE (self), NULL);
+ g_return_val_if_fail (GDATA_IS_TASKS_TASK (task), NULL);
+ g_return_val_if_fail (GDATA_IS_TASKS_TASKLIST (tasklist), NULL);
+ g_return_val_if_fail (gdata_entry_get_id (GDATA_ENTRY (tasklist)) != NULL, NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ request_uri = g_strconcat (_gdata_service_get_scheme (), "://www.googleapis.com/tasks/v1/lists/", gdata_entry_get_id (GDATA_ENTRY (tasklist)), "/tasks", NULL);
+ entry = gdata_service_insert_entry (GDATA_SERVICE (self), get_tasks_authorization_domain (), request_uri, GDATA_ENTRY (task), cancellable, error);
+ g_free (request_uri);
+
+ return GDATA_TASKS_TASK (entry);
+}
+
+/**
+ * gdata_tasks_service_insert_task_async:
+ * @self: a #GDataTasksService
+ * @task: the #GDataTasksTask to insert
+ * @tasklist: #GDataTasksTasklist to insert into
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when insertion is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Inserts @task by uploading it to the online tasks service into tasklist @tasklist. @self, @task and @tasklist are all reffed when this function is called, so can safely be
+ * unreffed after this function returns.
+ *
+ * @callback should call gdata_service_insert_entry_finish() to obtain a #GDataTasksTask representing the inserted task and to check for possible
+ * errors.
+ *
+ * For more details, see gdata_tasks_service_insert_task(), which is the synchronous version of this function, and
+ * gdata_service_insert_entry_async(), which is the base asynchronous insertion function.
+ *
+ * Since: 0.15.0
+ */
+void
+gdata_tasks_service_insert_task_async (GDataTasksService *self, GDataTasksTask *task, GDataTasksTasklist *tasklist, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ gchar *request_uri;
+
+ g_return_if_fail (GDATA_IS_TASKS_SERVICE (self));
+ g_return_if_fail (GDATA_IS_TASKS_TASK (task));
+ g_return_if_fail (GDATA_IS_TASKS_TASKLIST (tasklist));
+ g_return_if_fail (gdata_entry_get_id (GDATA_ENTRY (tasklist)) != NULL);
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+
+ request_uri = g_strconcat (_gdata_service_get_scheme (), "://www.googleapis.com/tasks/v1/lists/", gdata_entry_get_id (GDATA_ENTRY (tasklist)), "/tasks", NULL);
+ gdata_service_insert_entry_async (GDATA_SERVICE (self), get_tasks_authorization_domain (), request_uri, GDATA_ENTRY (task), cancellable,
+ callback, user_data);
+ g_free (request_uri);
+}
+
+/**
+ * gdata_tasks_service_insert_tasklist:
+ * @self: a #GDataTasksService
+ * @tasklist: #GDataTasksTasklist to insert
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: (allow-none): a #GError, or %NULL
+ *
+ * Inserts @tasklist by uploading it to the online tasks service.
+ *
+ * For more details, see gdata_service_insert_entry().
+ *
+ * Return value: (transfer full): an updated #GDataTasksTasklist, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.15.0
+ */
+GDataTasksTasklist *
+gdata_tasks_service_insert_tasklist (GDataTasksService *self, GDataTasksTasklist *tasklist, GCancellable *cancellable, GError **error)
+{
+ gchar *request_uri;
+ GDataEntry *entry;
+
+ g_return_val_if_fail (GDATA_IS_TASKS_SERVICE (self), NULL);
+ g_return_val_if_fail (GDATA_IS_TASKS_TASKLIST (tasklist), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ request_uri = g_strconcat (_gdata_service_get_scheme (), "://www.googleapis.com/tasks/v1/users/@me/lists", NULL);
+ entry = gdata_service_insert_entry (GDATA_SERVICE (self), get_tasks_authorization_domain (), request_uri, GDATA_ENTRY (tasklist), cancellable, error);
+ g_free (request_uri);
+
+ return GDATA_TASKS_TASKLIST (entry);
+}
+
+/**
+ * gdata_tasks_service_insert_tasklist_async:
+ * @self: a #GDataTasksService
+ * @tasklist: #GDataTasksTasklist to insert
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when insertion is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Inserts @tasklist by uploading it to the online tasks service. @self and @tasklist are both reffed when this function is called, so can safely be
+ * unreffed after this function returns.
+ *
+ * @callback should call gdata_service_insert_entry_finish() to obtain a #GDataTasksTasklist representing the inserted tasklist and to check for possible
+ * errors.
+ *
+ * For more details, see gdata_tasks_service_insert_tasklist(), which is the synchronous version of this function, and
+ * gdata_service_insert_entry_async(), which is the base asynchronous insertion function.
+ *
+ * Since: 0.15.0
+ */
+void
+gdata_tasks_service_insert_tasklist_async (GDataTasksService *self, GDataTasksTasklist *tasklist, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ gchar *request_uri;
+
+ g_return_if_fail (GDATA_IS_TASKS_SERVICE (self));
+ g_return_if_fail (GDATA_IS_TASKS_TASKLIST (tasklist));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+
+ request_uri = g_strconcat (_gdata_service_get_scheme (), "://www.googleapis.com/tasks/v1/users/@me/lists", NULL);
+ gdata_service_insert_entry_async (GDATA_SERVICE (self), get_tasks_authorization_domain (), request_uri, GDATA_ENTRY (tasklist), cancellable,
+ callback, user_data);
+ g_free (request_uri);
+}
+
+/**
+ * gdata_tasks_service_delete_task:
+ * @self: a #GDataTasksService
+ * @task: the #GDataTasksTask to delete
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: (allow-none): a #GError, or %NULL
+ *
+ * Delete @task from online tasks service.
+ *
+ * For more details, see gdata_service_delete_entry().
+ *
+ * Return value: %TRUE on success, %FALSE otherwise
+ *
+ * Since: 0.15.0
+ */
+gboolean
+gdata_tasks_service_delete_task (GDataTasksService *self, GDataTasksTask *task, GCancellable *cancellable, GError **error)
+{
+ g_return_val_if_fail (GDATA_IS_TASKS_SERVICE (self), FALSE);
+ g_return_val_if_fail (GDATA_IS_TASKS_TASK (task), FALSE);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
+ return gdata_service_delete_entry (GDATA_SERVICE (self), get_tasks_authorization_domain (), GDATA_ENTRY (task), cancellable, error);
+}
+
+/**
+ * gdata_tasks_service_delete_task_async:
+ * @self: a #GDataTasksService
+ * @task: #GDataTasksTask to delete
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when insertion is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Deletes @task from online tasks service. @self and @task are both reffed when this function is called, so can safely be
+ * unreffed after this function returns.
+ *
+ * @callback should call gdata_service_delete_entry_finish() to finish deleting task and to check for possible
+ * errors.
+ *
+ * For more details, see gdata_tasks_service_delete_task(), which is the synchronous version of this function, and
+ * gdata_service_delete_entry_async(), which is the base asynchronous insertion function.
+ *
+ * Since: 0.15.0
+ */
+void
+gdata_tasks_service_delete_task_async (GDataTasksService *self, GDataTasksTask *task, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_return_if_fail (GDATA_IS_TASKS_SERVICE (self));
+ g_return_if_fail (GDATA_IS_TASKS_TASK (task));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+
+ gdata_service_delete_entry_async (GDATA_SERVICE (self), get_tasks_authorization_domain (), GDATA_ENTRY (task), cancellable,
+ callback, user_data);
+}
+
+/**
+ * gdata_tasks_service_delete_tasklist:
+ * @self: a #GDataTasksService
+ * @tasklist: the #GDataTasksTasklist to delete
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: (allow-none): a #GError, or %NULL
+ *
+ * Delete @tasklist from online tasks service.
+ *
+ * For more details, see gdata_service_delete_entry().
+ *
+ * Return value: %TRUE on success, %FALSE otherwise
+ *
+ * Since: 0.15.0
+ */
+gboolean
+gdata_tasks_service_delete_tasklist (GDataTasksService *self, GDataTasksTasklist *tasklist, GCancellable *cancellable, GError **error)
+{
+ g_return_val_if_fail (GDATA_IS_TASKS_SERVICE (self), FALSE);
+ g_return_val_if_fail (GDATA_IS_TASKS_TASKLIST (tasklist), FALSE);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
+ return gdata_service_delete_entry (GDATA_SERVICE (self), get_tasks_authorization_domain (), GDATA_ENTRY (tasklist), cancellable, error);
+}
+
+/**
+ * gdata_tasks_service_delete_tasklist_async:
+ * @self: a #GDataTasksService
+ * @tasklist: #GDataTasksTasklist to delete
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when insertion is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Deletes @tasklist from online tasks service. @self and @tasklist are both reffed when this function is called, so can safely be
+ * unreffed after this function returns.
+ *
+ * @callback should call gdata_service_delete_entry_finish() to finish deleting tasklist and to check for possible
+ * errors.
+ *
+ * For more details, see gdata_tasks_service_delete_tasklist(), which is the synchronous version of this function, and
+ * gdata_service_delete_entry_async(), which is the base asynchronous insertion function.
+ *
+ * Since: 0.15.0
+ */
+void
+gdata_tasks_service_delete_tasklist_async (GDataTasksService *self, GDataTasksTasklist *tasklist, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_return_if_fail (GDATA_IS_TASKS_SERVICE (self));
+ g_return_if_fail (GDATA_IS_TASKS_TASKLIST (tasklist));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+
+ gdata_service_delete_entry_async (GDATA_SERVICE (self), get_tasks_authorization_domain (), GDATA_ENTRY (tasklist), cancellable,
+ callback, user_data);
+}
+
+/**
+ * gdata_tasks_service_update_task:
+ * @self: a #GDataTasksService
+ * @task: the #GDataTasksTask to update
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: (allow-none): a #GError, or %NULL
+ *
+ * Update @task in online tasks service.
+ *
+ * For more details, see gdata_service_update_entry().
+ *
+ * Return value: (transfer full): an updated #GDataTasksTask, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.15.0
+ */
+GDataTasksTask *
+gdata_tasks_service_update_task (GDataTasksService *self, GDataTasksTask *task, GCancellable *cancellable, GError **error)
+{
+ g_return_val_if_fail (GDATA_IS_TASKS_SERVICE (self), NULL);
+ g_return_val_if_fail (GDATA_IS_TASKS_TASK (task), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ return GDATA_TASKS_TASK (gdata_service_update_entry (GDATA_SERVICE (self), get_tasks_authorization_domain (), GDATA_ENTRY (task), cancellable, error));
+}
+
+/**
+ * gdata_tasks_service_update_task_async:
+ * @self: a #GDataTasksService
+ * @task: #GDataTasksTask to update
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when insertion is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Updates @task to online tasks service. @self and @task are both reffed when this function is called, so can safely be
+ * unreffed after this function returns.
+ *
+ * @callback should call gdata_service_update_entry_finish() to obtain a #GDataTasksTask representing the updated task and to check for possible
+ * errors.
+ *
+ * For more details, see gdata_tasks_service_update_task(), which is the synchronous version of this function, and
+ * gdata_service_update_entry_async(), which is the base asynchronous insertion function.
+ *
+ * Since: 0.15.0
+ */
+void
+gdata_tasks_service_update_task_async (GDataTasksService *self, GDataTasksTask *task, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_return_if_fail (GDATA_IS_TASKS_SERVICE (self));
+ g_return_if_fail (GDATA_IS_TASKS_TASK (task));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+
+ gdata_service_update_entry_async (GDATA_SERVICE (self), get_tasks_authorization_domain (), GDATA_ENTRY (task), cancellable,
+ callback, user_data);
+}
+
+/**
+ * gdata_tasks_service_update_tasklist:
+ * @self: a #GDataTasksService
+ * @tasklist: the #GDataTasksTasklist to update
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: (allow-none): a #GError, or %NULL
+ *
+ * Update @tasklist in online tasks service.
+ *
+ * For more details, see gdata_service_update_entry().
+ *
+ * Return value: (transfer full): an updated #GDataTasksTasklist, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.15.0
+ */
+GDataTasksTasklist *
+gdata_tasks_service_update_tasklist (GDataTasksService *self, GDataTasksTasklist *tasklist, GCancellable *cancellable, GError **error)
+{
+ g_return_val_if_fail (GDATA_IS_TASKS_SERVICE (self), NULL);
+ g_return_val_if_fail (GDATA_IS_TASKS_TASKLIST (tasklist), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ return GDATA_TASKS_TASKLIST (gdata_service_update_entry (GDATA_SERVICE (self), get_tasks_authorization_domain (), GDATA_ENTRY (tasklist), cancellable, error));
+}
+
+/**
+ * gdata_tasks_service_update_tasklist_async:
+ * @self: a #GDataTasksService
+ * @tasklist: #GDataTasksTasklist to update
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when insertion is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Updates @tasklist from online tasks service. @self and @tasklist are both reffed when this function is called, so can safely be
+ * unreffed after this function returns.
+ *
+ * @callback should call gdata_service_update_entry_finish() to obtain a #GDataTasksTasklist representing the updated task and to check for possible
+ * errors.
+ *
+ * For more details, see gdata_tasks_service_update_tasklist(), which is the synchronous version of this function, and
+ * gdata_service_update_entry_async(), which is the base asynchronous insertion function.
+ *
+ * Since: 0.15.0
+ */
+void
+gdata_tasks_service_update_tasklist_async (GDataTasksService *self, GDataTasksTasklist *tasklist, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_return_if_fail (GDATA_IS_TASKS_SERVICE (self));
+ g_return_if_fail (GDATA_IS_TASKS_TASKLIST (tasklist));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+
+ gdata_service_update_entry_async (GDATA_SERVICE (self), get_tasks_authorization_domain (), GDATA_ENTRY (tasklist), cancellable,
+ callback, user_data);
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Peteris Krisjanis 2013 <pecisk@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_TASKS_SERVICE_H
+#define GDATA_TASKS_SERVICE_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-service.h>
+#include <gdata/gdata-query.h>
+#include <gdata/services/tasks/gdata-tasks-tasklist.h>
+#include <gdata/services/tasks/gdata-tasks-task.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_TASKS_SERVICE (gdata_tasks_service_get_type ())
+#define GDATA_TASKS_SERVICE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_TASKS_SERVICE, GDataTasksService))
+#define GDATA_TASKS_SERVICE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_TASKS_SERVICE, GDataTasksServiceClass))
+#define GDATA_IS_TASKS_SERVICE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_TASKS_SERVICE))
+#define GDATA_IS_TASKS_SERVICE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_TASKS_SERVICE))
+#define GDATA_TASKS_SERVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_TASKS_SERVICE, GDataTasksServiceClass))
+
+/**
+ * GDataTasksService:
+ *
+ * All the fields in the #GDataTasksService structure are private and should never be accessed directly.
+ *
+ * Since: 0.15.0
+ */
+typedef struct {
+ GDataService parent;
+} GDataTasksService;
+
+/**
+ * GDataTasksServiceClass:
+ *
+ * All the fields in the #GDataTasksServiceClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.15.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataServiceClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataTasksServiceClass;
+
+GType gdata_tasks_service_get_type (void) G_GNUC_CONST;
+
+GDataTasksService *gdata_tasks_service_new (GDataAuthorizer *authorizer) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+GDataAuthorizationDomain *gdata_tasks_service_get_primary_authorization_domain (void) G_GNUC_CONST;
+
+GDataFeed *gdata_tasks_service_query_all_tasklists (GDataTasksService *self, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_tasks_service_query_all_tasklists_async (GDataTasksService *self, GDataQuery *query, GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data, GAsyncReadyCallback callback, gpointer user_data);
+
+GDataFeed *gdata_tasks_service_query_tasks (GDataTasksService *self, GDataTasksTasklist *tasklist, GDataQuery *query,
+ GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_tasks_service_query_tasks_async (GDataTasksService *self, GDataTasksTasklist *tasklist, GDataQuery *query,
+ GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data, GAsyncReadyCallback callback, gpointer user_data);
+
+GDataTasksTask *gdata_tasks_service_insert_task (GDataTasksService *self, GDataTasksTask *task, GDataTasksTasklist *tasklist,
+ GCancellable *cancellable, GError **error) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
+void gdata_tasks_service_insert_task_async (GDataTasksService *self, GDataTasksTask *task, GDataTasksTasklist *tasklist,
+ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
+GDataTasksTasklist *gdata_tasks_service_insert_tasklist (GDataTasksService *self, GDataTasksTasklist *tasklist,
+ GCancellable *cancellable, GError **error) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
+void gdata_tasks_service_insert_tasklist_async (GDataTasksService *self, GDataTasksTasklist *tasklist,
+ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
+gboolean gdata_tasks_service_delete_task (GDataTasksService *self, GDataTasksTask *task,
+ GCancellable *cancellable, GError **error);
+void gdata_tasks_service_delete_task_async (GDataTasksService *self, GDataTasksTask *task,
+ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
+gboolean gdata_tasks_service_delete_tasklist (GDataTasksService *self, GDataTasksTasklist *tasklist,
+ GCancellable *cancellable, GError **error);
+void gdata_tasks_service_delete_tasklist_async (GDataTasksService *self, GDataTasksTasklist *tasklist,
+ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
+GDataTasksTask *gdata_tasks_service_update_task (GDataTasksService *self, GDataTasksTask *task,
+ GCancellable *cancellable, GError **error) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
+void gdata_tasks_service_update_task_async (GDataTasksService *self, GDataTasksTask *task,
+ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
+GDataTasksTasklist *gdata_tasks_service_update_tasklist (GDataTasksService *self, GDataTasksTasklist *tasklist,
+ GCancellable *cancellable, GError **error) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
+void gdata_tasks_service_update_tasklist_async (GDataTasksService *self, GDataTasksTasklist *tasklist,
+ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
+
+G_END_DECLS
+
+#endif /* !GDATA_TASKS_SERVICE_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Peteris Krisjanis 2013 <pecisk@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-tasks-task
+ * @short_description: GData Tasks task object
+ * @stability: Stable
+ * @include: gdata/services/tasks/gdata-tasks-task.h
+ *
+ * #GDataTasksTask is a subclass of #GDataEntry to represent a task in a tasklist from Google Tasks.
+ *
+ * All functionality of Tasks is currently supported except
+ * <ulink type="http" url="https://developers.google.com/google-apps/tasks/v1/reference/tasks#links">links</ulink>.
+ *
+ * For more details of Google Tasks API, see the <ulink type="http" url="https://developers.google.com/google-apps/tasks/v1/reference/">
+ * online documentation</ulink>.
+ *
+ * Since: 0.15.0
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+
+#include "gdata-tasks-task.h"
+#include "gdata-private.h"
+#include "gdata-service.h"
+#include "gdata-parser.h"
+#include "gdata-types.h"
+#include "gdata-comparable.h"
+
+static void gdata_tasks_task_finalize (GObject *object);
+static void gdata_tasks_task_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_tasks_task_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void get_json (GDataParsable *parsable, JsonBuilder *builder);
+static gboolean parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error);
+static const gchar *get_content_type (void);
+
+struct _GDataTasksTaskPrivate {
+ gchar *parent;
+ gchar *position;
+ gchar *notes;
+ gchar *status;
+ gint64 due;
+ gint64 completed;
+ gboolean deleted;
+ gboolean hidden;
+};
+
+enum {
+ PROP_PARENT = 1,
+ PROP_POSITION,
+ PROP_NOTES,
+ PROP_STATUS,
+ PROP_DUE,
+ PROP_COMPLETED,
+ PROP_DELETED,
+ PROP_HIDDEN,
+};
+
+G_DEFINE_TYPE (GDataTasksTask, gdata_tasks_task, GDATA_TYPE_ENTRY)
+
+static void
+gdata_tasks_task_class_init (GDataTasksTaskClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+ GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataTasksTaskPrivate));
+
+ gobject_class->get_property = gdata_tasks_task_get_property;
+ gobject_class->set_property = gdata_tasks_task_set_property;
+ gobject_class->finalize = gdata_tasks_task_finalize;
+
+ parsable_class->parse_json = parse_json;
+ parsable_class->get_json = get_json;
+ parsable_class->get_content_type = get_content_type;
+
+ entry_class->kind_term = "tasks#task";
+
+ /**
+ * GDataTasksTask:parent:
+ *
+ * Parent task identifier. This field is omitted if it is a top-level task.
+ *
+ * Since 0.17.10, this property is writable.
+ *
+ * Since: 0.15.0
+ */
+ g_object_class_install_property (gobject_class, PROP_PARENT,
+ g_param_spec_string ("parent",
+ "Parent of task", "Identifier of parent task.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataTasksTask:position:
+ *
+ * String indicating the position of the task among its sibling tasks under the same parent task
+ * or at the top level. If this string is greater than another task's corresponding position string
+ * according to lexicographical ordering, the task is positioned after the other task under the same
+ * parent task (or at the top level).
+ *
+ * Since 0.17.10, this property is writable.
+ *
+ * Since: 0.15.0
+ */
+ g_object_class_install_property (gobject_class, PROP_POSITION,
+ g_param_spec_string ("position",
+ "Position of task", "Position of the task among sibling tasks using lexicographical order.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataTasksTask:notes:
+ *
+ * This is where the description of what needs to be done in the task is stored.
+ *
+ * Since: 0.15.0
+ */
+ g_object_class_install_property (gobject_class, PROP_NOTES,
+ g_param_spec_string ("notes",
+ "Notes of task", "Notes describing the task.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataTasksTask:status:
+ *
+ * Status of the task. This is either %GDATA_TASKS_STATUS_NEEDS_ACTION
+ * or %GDATA_TASKS_STATUS_COMPLETED.
+ *
+ * Since: 0.15.0
+ */
+ g_object_class_install_property (gobject_class, PROP_STATUS,
+ g_param_spec_string ("status",
+ "Status of task", "Status of the task.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataTasksTask:due:
+ *
+ * Due date of the task (as a RFC 3339 timestamp; seconds since the UNIX
+ * epoch).
+ *
+ * This field is <code class="literal">-1</code> if the task has no due
+ * date assigned.
+ *
+ * Since: 0.15.0
+ */
+ g_object_class_install_property (gobject_class, PROP_DUE,
+ g_param_spec_int64 ("due",
+ "Due date of the task", "Due date of the task.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataTasksTask:completed:
+ *
+ * Completion date of the task (as a RFC 3339 timestamp; seconds since
+ * the UNIX epoch).
+ *
+ * This field is <code class="literal">-1</code> if the task has not
+ * been completed.
+ *
+ * Since: 0.15.0
+ */
+ g_object_class_install_property (gobject_class, PROP_COMPLETED,
+ g_param_spec_int64 ("completed",
+ "Completion date of task", "Completion date of the task.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataTasksTask:is-deleted:
+ *
+ * Flag indicating whether the task has been deleted. The default is %FALSE.
+ *
+ * Since: 0.15.0
+ */
+ g_object_class_install_property (gobject_class, PROP_DELETED,
+ g_param_spec_boolean ("is-deleted",
+ "Deleted?", "Indicated whatever task is deleted.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataTasksTask:is-hidden:
+ *
+ * Flag indicating whether the task is hidden. This is the case if the task
+ * had been marked completed when the task list was last cleared.
+ * The default is %FALSE. This field is read-only.
+ *
+ * Since: 0.15.0
+ */
+ g_object_class_install_property (gobject_class, PROP_HIDDEN,
+ g_param_spec_boolean ("is-hidden",
+ "Hidden?", "Indicated whatever task is hidden.",
+ FALSE,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_tasks_task_init (GDataTasksTask *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_TASKS_TASK, GDataTasksTaskPrivate);
+ self->priv->due = -1;
+ self->priv->completed = -1;
+}
+
+static void
+gdata_tasks_task_finalize (GObject *object)
+{
+ GDataTasksTaskPrivate *priv = GDATA_TASKS_TASK (object)->priv;
+
+ g_free (priv->parent);
+ g_free (priv->position);
+ g_free (priv->notes);
+ g_free (priv->status);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_tasks_task_parent_class)->finalize (object);
+}
+
+static void
+gdata_tasks_task_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataTasksTaskPrivate *priv = GDATA_TASKS_TASK (object)->priv;
+
+ switch (property_id) {
+ case PROP_PARENT:
+ g_value_set_string (value, priv->parent);
+ break;
+ case PROP_POSITION:
+ g_value_set_string (value, priv->position);
+ break;
+ case PROP_NOTES:
+ g_value_set_string (value, priv->notes);
+ break;
+ case PROP_STATUS:
+ g_value_set_string (value, priv->status);
+ break;
+ case PROP_DUE:
+ g_value_set_int64 (value, priv->due);
+ break;
+ case PROP_COMPLETED:
+ g_value_set_int64 (value, priv->completed);
+ break;
+ case PROP_DELETED:
+ g_value_set_boolean (value, priv->deleted);
+ break;
+ case PROP_HIDDEN:
+ g_value_set_boolean (value, priv->hidden);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_tasks_task_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataTasksTask *self = GDATA_TASKS_TASK (object);
+
+ switch (property_id) {
+ case PROP_NOTES:
+ gdata_tasks_task_set_notes (self, g_value_get_string (value));
+ break;
+ case PROP_STATUS:
+ gdata_tasks_task_set_status (self, g_value_get_string (value));
+ break;
+ case PROP_DUE:
+ gdata_tasks_task_set_due (self, g_value_get_int64 (value));
+ break;
+ case PROP_COMPLETED:
+ gdata_tasks_task_set_completed (self, g_value_get_int64 (value));
+ break;
+ case PROP_DELETED:
+ gdata_tasks_task_set_is_deleted (self, g_value_get_boolean (value));
+ break;
+ case PROP_PARENT:
+ gdata_tasks_task_set_parent (self, g_value_get_string (value));
+ break;
+ case PROP_POSITION:
+ gdata_tasks_task_set_position (self, g_value_get_string (value));
+ break;
+ case PROP_HIDDEN:
+ /* Read-only */
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error)
+{
+ gboolean success;
+ GDataTasksTask *self = GDATA_TASKS_TASK (parsable);
+
+ if (gdata_parser_string_from_json_member (reader, "parent", P_DEFAULT, &(self->priv->parent), &success, error) == TRUE ||
+ gdata_parser_string_from_json_member (reader, "position", P_DEFAULT, &(self->priv->position), &success, error) == TRUE ||
+ gdata_parser_string_from_json_member (reader, "notes", P_DEFAULT, &(self->priv->notes), &success, error) == TRUE ||
+ gdata_parser_string_from_json_member (reader, "status", P_DEFAULT, &(self->priv->status), &success, error) == TRUE ||
+ gdata_parser_int64_time_from_json_member (reader, "due", P_DEFAULT, &(self->priv->due), &success, error) == TRUE ||
+ gdata_parser_int64_time_from_json_member (reader, "completed", P_DEFAULT, &(self->priv->completed), &success, error) == TRUE ||
+ gdata_parser_boolean_from_json_member (reader, "deleted", P_DEFAULT, &(self->priv->deleted), &success, error) == TRUE ||
+ gdata_parser_boolean_from_json_member (reader, "hidden", P_DEFAULT, &(self->priv->hidden), &success, error) == TRUE) {
+ return success;
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_tasks_task_parent_class)->parse_json (parsable, reader, user_data, error);
+ }
+
+ return TRUE;
+}
+
+static void
+get_json (GDataParsable *parsable, JsonBuilder *builder)
+{
+ gchar *due;
+ gchar *completed;
+
+ GDataTasksTaskPrivate *priv = GDATA_TASKS_TASK (parsable)->priv;
+
+ /* Chain up to the parent class */
+ GDATA_PARSABLE_CLASS (gdata_tasks_task_parent_class)->get_json (parsable, builder);
+
+ /* Add all the task specific JSON */
+
+ if (priv->parent != NULL) {
+ json_builder_set_member_name (builder, "parent");
+ json_builder_add_string_value (builder, priv->parent);
+ }
+ if (priv->position != NULL) {
+ json_builder_set_member_name (builder, "position");
+ json_builder_add_string_value (builder, priv->position);
+ }
+ if (priv->notes != NULL) {
+ json_builder_set_member_name (builder, "notes");
+ json_builder_add_string_value (builder, priv->notes);
+ }
+ if (priv->status != NULL) {
+ json_builder_set_member_name (builder, "status");
+ json_builder_add_string_value (builder, priv->status);
+ }
+ if (priv->due != -1) {
+ due = gdata_parser_int64_to_iso8601 (priv->due);
+ json_builder_set_member_name (builder, "due");
+ json_builder_add_string_value (builder, due);
+ g_free (due);
+ }
+ if (priv->completed != -1) {
+ completed = gdata_parser_int64_to_iso8601 (priv->completed);
+ json_builder_set_member_name (builder, "completed");
+ json_builder_add_string_value (builder, completed);
+ g_free (completed);
+ }
+
+ json_builder_set_member_name (builder, "deleted");
+ json_builder_add_boolean_value (builder, priv->deleted);
+
+ json_builder_set_member_name (builder, "hidden");
+ json_builder_add_boolean_value (builder, priv->hidden);
+}
+
+static const gchar *
+get_content_type (void)
+{
+ return "application/json";
+}
+
+/**
+ * gdata_tasks_task_new:
+ * @id: (allow-none): the task's ID, or %NULL
+ *
+ * Creates a new #GDataTasksTask with the given ID and default properties.
+ *
+ * Return value: a new #GDataTasksTask; unref with g_object_unref()
+ *
+ * Since: 0.15.0
+ */
+GDataTasksTask *
+gdata_tasks_task_new (const gchar *id)
+{
+ return GDATA_TASKS_TASK (g_object_new (GDATA_TYPE_TASKS_TASK, "id", id, NULL));
+}
+
+/**
+ * gdata_tasks_task_get_parent:
+ * @self: a #GDataTasksTask
+ *
+ * Gets the #GDataTasksTask:parent property.
+ *
+ * Return value: (allow-none): the parent of the task, or %NULL
+ *
+ * Since: 0.15.0
+ */
+const gchar *
+gdata_tasks_task_get_parent (GDataTasksTask *self)
+{
+ g_return_val_if_fail (GDATA_IS_TASKS_TASK (self), NULL);
+ return self->priv->parent;
+}
+
+/**
+ * gdata_tasks_task_set_parent:
+ * @self: a #GDataTasksTask
+ * @parent: (nullable): parent of the task
+ *
+ * Sets the #GDataTasksTask:parent property.
+ *
+ * Since: 0.17.10
+ */
+void
+gdata_tasks_task_set_parent (GDataTasksTask *self, const gchar *parent)
+{
+ gchar *local_parent;
+ g_return_if_fail (GDATA_IS_TASKS_TASK (self));
+
+ if (g_strcmp0 (self->priv->parent, parent) == 0)
+ return;
+
+ local_parent = self->priv->parent;
+ self->priv->parent = g_strdup (parent);
+ g_free (local_parent);
+ g_object_notify (G_OBJECT (self), "parent");
+}
+
+/**
+ * gdata_tasks_task_get_position:
+ * @self: a #GDataTasksTask
+ *
+ * Gets the #GDataTasksTask:position property.
+ *
+ * Return value: (allow-none): the position of the task, or %NULL
+ *
+ * Since: 0.15.0
+ */
+const gchar *
+gdata_tasks_task_get_position (GDataTasksTask *self)
+{
+ g_return_val_if_fail (GDATA_IS_TASKS_TASK (self), NULL);
+ return self->priv->position;
+}
+
+/**
+ * gdata_tasks_task_set_position:
+ * @self: a #GDataTasksTask
+ * @position: position of the task in the list
+ *
+ * Sets the #GDataTasksTask:position property.
+ *
+ * Since: 0.17.10
+ */
+void
+gdata_tasks_task_set_position (GDataTasksTask *self, const gchar *position)
+{
+ gchar *local_position;
+ g_return_if_fail (GDATA_IS_TASKS_TASK (self));
+
+ if (g_strcmp0 (self->priv->position, position) == 0)
+ return;
+
+ local_position = self->priv->position;
+ self->priv->position = g_strdup (position);
+ g_free (local_position);
+ g_object_notify (G_OBJECT (self), "position");
+}
+
+/**
+ * gdata_tasks_task_get_notes:
+ * @self: a #GDataTasksTask
+ *
+ * Gets the #GDataTasksTask:notes property.
+ *
+ * Return value: (allow-none): notes of the task, or %NULL
+ *
+ * Since: 0.15.0
+ */
+const gchar *
+gdata_tasks_task_get_notes (GDataTasksTask *self)
+{
+ g_return_val_if_fail (GDATA_IS_TASKS_TASK (self), NULL);
+ return self->priv->notes;
+}
+
+/**
+ * gdata_tasks_task_set_notes:
+ * @self: a #GDataTasksTask
+ * @notes: (allow-none): a new notes of the task, or %NULL
+ *
+ * Sets the #GDataTasksTask:notes property to the new notes, @notes.
+ *
+ * Set @notes to %NULL to unset the property in the task.
+ *
+ * Since: 0.15.0
+ */
+void
+gdata_tasks_task_set_notes (GDataTasksTask *self, const gchar *notes)
+{
+ gchar *local_notes;
+ g_return_if_fail (GDATA_IS_TASKS_TASK (self));
+
+ local_notes = self->priv->notes;
+ self->priv->notes = g_strdup (notes);
+ g_free (local_notes);
+ g_object_notify (G_OBJECT (self), "notes");
+}
+
+/**
+ * gdata_tasks_task_get_status:
+ * @self: a #GDataTasksTask
+ *
+ * Gets the #GDataTasksTask:status property.
+ *
+ * Return value: (allow-none): the status of the task, or %NULL
+ *
+ * Since: 0.15.0
+ */
+const gchar *
+gdata_tasks_task_get_status (GDataTasksTask *self)
+{
+ g_return_val_if_fail (GDATA_IS_TASKS_TASK (self), NULL);
+ return self->priv->status;
+}
+
+/**
+ * gdata_tasks_task_set_status:
+ * @self: a #GDataTasksTask
+ * @status: (allow-none): a new status of the task, or %NULL
+ *
+ * Sets the #GDataTasksTask:status property to the new status, @status.
+ *
+ * Set @status to %NULL to unset the property in the task.
+ *
+ * Since: 0.15.0
+ */
+void
+gdata_tasks_task_set_status (GDataTasksTask *self, const gchar *status)
+{
+ gchar *local_status;
+ g_return_if_fail (GDATA_IS_TASKS_TASK (self));
+
+ local_status = self->priv->status;
+ self->priv->status = g_strdup (status);
+ g_free (local_status);
+ g_object_notify (G_OBJECT (self), "status");
+}
+
+/**
+ * gdata_tasks_task_get_due:
+ * @self: a #GDataTasksTask
+ *
+ * Gets the #GDataTasksTask:due property. If the property is unset, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the due property, or <code class="literal">-1</code>
+ *
+ * Since: 0.15.0
+ */
+gint64
+gdata_tasks_task_get_due (GDataTasksTask *self)
+{
+ g_return_val_if_fail (GDATA_IS_TASKS_TASK (self), -1);
+ return self->priv->due;
+}
+
+/**
+ * gdata_tasks_task_set_due:
+ * @self: a #GDataTasksTask
+ * @due: due time of the task, or <code class="literal">-1</code>
+ *
+ * Sets the #GDataTasksTask:due property of the #GDataTasksTask to the new due time of the task, @due.
+ *
+ * Set @due to <code class="literal">-1</code> to unset the property in the due time of the task
+ *
+ * Since: 0.15.0
+ */
+void
+gdata_tasks_task_set_due (GDataTasksTask *self, gint64 due)
+{
+ g_return_if_fail (GDATA_IS_TASKS_TASK (self));
+ g_return_if_fail (due >= -1);
+
+ self->priv->due = due;
+ g_object_notify (G_OBJECT (self), "due");
+}
+
+/**
+ * gdata_tasks_task_get_completed:
+ * @self: a #GDataTasksTask
+ *
+ * Gets the #GDataTasksTask:completed property. If the property is unset, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the completed property, or <code class="literal">-1</code>
+ *
+ * Since: 0.15.0
+ */
+gint64
+gdata_tasks_task_get_completed (GDataTasksTask *self)
+{
+ g_return_val_if_fail (GDATA_IS_TASKS_TASK (self), -1);
+ return self->priv->completed;
+}
+
+/**
+ * gdata_tasks_task_set_completed:
+ * @self: a #GDataTasksTask
+ * @completed: completion time of the task, or <code class="literal">-1</code>
+ *
+ * Sets the #GDataTasksTask:completed property of the #GDataTasksTask to the new completion time of the task, @completed.
+ *
+ * Set @completed to <code class="literal">-1</code> to unset the property in the completion time of the task
+ *
+ * Since: 0.15.0
+ */
+void
+gdata_tasks_task_set_completed (GDataTasksTask *self, gint64 completed)
+{
+ g_return_if_fail (GDATA_IS_TASKS_TASK (self));
+ g_return_if_fail (completed >= -1);
+
+ self->priv->completed = completed;
+ g_object_notify (G_OBJECT (self), "completed");
+}
+
+/**
+ * gdata_tasks_task_is_deleted:
+ * @self: a #GDataTasksTask
+ *
+ * Gets the #GDataTasksTask:is-deleted property.
+ *
+ * Return value: %TRUE if task is deleted, %FALSE otherwise
+ *
+ * Since: 0.15.0
+ */
+gboolean
+gdata_tasks_task_is_deleted (GDataTasksTask *self)
+{
+ g_return_val_if_fail (GDATA_IS_TASKS_TASK (self), FALSE);
+ return self->priv->deleted;
+}
+
+/**
+ * gdata_tasks_task_set_is_deleted:
+ * @self: a #GDataTasksTask
+ * @deleted: %TRUE if task is deleted, %FALSE otherwise
+ *
+ * Sets the #GDataTasksTask:is-deleted property to @deleted.
+ *
+ * Since: 0.15.0
+ */
+void
+gdata_tasks_task_set_is_deleted (GDataTasksTask *self, gboolean deleted)
+{
+ g_return_if_fail (GDATA_IS_TASKS_TASK (self));
+ self->priv->deleted = deleted;
+ g_object_notify (G_OBJECT (self), "is-deleted");
+}
+
+/**
+ * gdata_tasks_task_is_hidden:
+ * @self: a #GDataTasksTask
+ *
+ * Gets the #GDataTasksTask:is-hidden property.
+ *
+ * Return value: %TRUE if task is hidden, %FALSE otherwise
+ *
+ * Since: 0.15.0
+ */
+gboolean
+gdata_tasks_task_is_hidden (GDataTasksTask *self)
+{
+ g_return_val_if_fail (GDATA_IS_TASKS_TASK (self), FALSE);
+ return self->priv->hidden;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Peteris Krisjanis 2013 <pecisk@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_TASKS_TASK_H
+#define GDATA_TASKS_TASK_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-entry.h>
+#include <gdata/gdata-types.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_TASKS_STATUS_NEEDS_ACTION:
+ *
+ * A value for #GDataTasksTask:status indicating the task still needs action
+ * before it is complete.
+ *
+ * Reference:
+ * <ulink type="http" url="https://developers.google.com/google-apps/tasks/v1/reference/tasks#status">
+ * Google Tasks documentation</ulink>.
+ *
+ * Since: 0.16.0
+ */
+#define GDATA_TASKS_STATUS_NEEDS_ACTION "needsAction"
+
+/**
+ * GDATA_TASKS_STATUS_COMPLETED:
+ *
+ * A value for #GDataTasksTask:status indicating the task has been completed.
+ *
+ * Reference:
+ * <ulink type="http" url="https://developers.google.com/google-apps/tasks/v1/reference/tasks#status">
+ * Google Tasks documentation</ulink>.
+ *
+ * Since: 0.16.0
+ */
+#define GDATA_TASKS_STATUS_COMPLETED "completed"
+
+#define GDATA_TYPE_TASKS_TASK (gdata_tasks_task_get_type ())
+#define GDATA_TASKS_TASK(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_TASKS_TASK, GDataTasksTask))
+#define GDATA_TASKS_TASK_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_TASKS_TASK, GDataTasksTaskClass))
+#define GDATA_IS_TASKS_TASK(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_TASKS_TASK))
+#define GDATA_IS_TASKS_TASK_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_TASKS_TASK))
+#define GDATA_TASKS_TASK_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_TASKS_TASK, GDataTasksTaskClass))
+
+typedef struct _GDataTasksTaskPrivate GDataTasksTaskPrivate;
+
+/**
+ * GDataTasksTask:
+ *
+ * All the fields in the #GDataTasksTask structure are private and should never be accessed directly.
+ *
+ * Since: 0.15.0
+ */
+typedef struct {
+ GDataEntry parent;
+ GDataTasksTaskPrivate *priv;
+} GDataTasksTask;
+
+/**
+ * GDataTasksTaskClass:
+ *
+ * All the fields in the #GDataTasksTaskClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.15.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataEntryClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataTasksTaskClass;
+
+GType gdata_tasks_task_get_type (void) G_GNUC_CONST;
+
+GDataTasksTask *gdata_tasks_task_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_tasks_task_get_parent (GDataTasksTask *self) G_GNUC_PURE;
+void gdata_tasks_task_set_parent (GDataTasksTask *self, const gchar *parent);
+const gchar *gdata_tasks_task_get_position (GDataTasksTask *self) G_GNUC_PURE;
+void gdata_tasks_task_set_position (GDataTasksTask *self, const gchar *position);
+const gchar *gdata_tasks_task_get_notes (GDataTasksTask *self) G_GNUC_PURE;
+void gdata_tasks_task_set_notes (GDataTasksTask *self, const gchar *notes);
+const gchar *gdata_tasks_task_get_status (GDataTasksTask *self) G_GNUC_PURE;
+void gdata_tasks_task_set_status (GDataTasksTask *self, const gchar *status);
+gint64 gdata_tasks_task_get_due (GDataTasksTask *self) G_GNUC_PURE;
+void gdata_tasks_task_set_due (GDataTasksTask *self, gint64 due);
+gint64 gdata_tasks_task_get_completed (GDataTasksTask *self) G_GNUC_PURE;
+void gdata_tasks_task_set_completed (GDataTasksTask *self, gint64 completed);
+gboolean gdata_tasks_task_is_deleted (GDataTasksTask *self) G_GNUC_PURE;
+void gdata_tasks_task_set_is_deleted (GDataTasksTask *self, gboolean deleted);
+gboolean gdata_tasks_task_is_hidden (GDataTasksTask *self) G_GNUC_PURE;
+
+G_END_DECLS
+
+#endif /* !GDATA_TASKS_TASK_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Peteris Krisjanis 2013 <pecisk@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-tasks-tasklist
+ * @short_description: GData Tasks tasklist object
+ * @stability: Stable
+ * @include: gdata/services/tasks/gdata-tasks-tasklist.h
+ *
+ * #GDataTasksTasklist is a subclass of #GDataEntry to represent a tasklist from Google Tasks.
+ *
+ * For more details of Google Tasks API, see the <ulink type="http" url="https://developers.google.com/google-apps/tasks/v1/reference/">
+ * online documentation</ulink>.
+ *
+ * Since: 0.15.0
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+
+#include "gdata-tasks-tasklist.h"
+#include "gdata-private.h"
+#include "gdata-types.h"
+
+static const gchar *get_content_type (void);
+
+G_DEFINE_TYPE (GDataTasksTasklist, gdata_tasks_tasklist, GDATA_TYPE_ENTRY)
+
+static void
+gdata_tasks_tasklist_class_init (GDataTasksTasklistClass *klass)
+{
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+ GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
+
+ parsable_class->get_content_type = get_content_type;
+
+ entry_class->kind_term = "tasks#taskList";
+}
+
+static void
+gdata_tasks_tasklist_init (GDataTasksTasklist *self)
+{
+ /* Empty */
+}
+
+static const gchar *
+get_content_type (void)
+{
+ return "application/json";
+}
+
+/**
+ * gdata_tasks_tasklist_new:
+ * @id: (allow-none): the tasklist's ID, or %NULL
+ *
+ * Creates a new #GDataTasksTasklist with the given ID and default properties.
+ *
+ * Return value: (transfer full): a new #GDataTasksTasklist; unref with g_object_unref()
+ *
+ * Since: 0.15.0
+ */
+GDataTasksTasklist *
+gdata_tasks_tasklist_new (const gchar *id)
+{
+ return GDATA_TASKS_TASKLIST (g_object_new (GDATA_TYPE_TASKS_TASKLIST, "id", id, NULL));
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Peteris Krisjanis 2013 <pecisk@gmail.com>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_TASKS_TASKLIST_H
+#define GDATA_TASKS_TASKLIST_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-entry.h>
+#include <gdata/gdata-types.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_TASKS_TASKLIST (gdata_tasks_tasklist_get_type ())
+#define GDATA_TASKS_TASKLIST(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_TASKS_TASKLIST, GDataTasksTasklist))
+#define GDATA_TASKS_TASKLIST_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_TASKS_TASKLIST, GDataTasksTasklistClass))
+#define GDATA_IS_TASKS_TASKLIST(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_TASKS_TASKLIST))
+#define GDATA_IS_TASKS_TASKLIST_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_TASKS_TASKLIST))
+#define GDATA_TASKS_TASKLIST_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_TASKS_TASKLIST, GDataTasksTasklistClass))
+
+/**
+ * GDataTasksTasklist:
+ *
+ * All the fields in the #GDataTasksTasklist structure are private and should never be accessed directly.
+ *
+ * Since: 0.15.0
+ */
+typedef struct {
+ GDataEntry parent;
+} GDataTasksTasklist;
+
+/**
+ * GDataTasksTasklistClass:
+ *
+ * All the fields in the #GDataTasksTasklistClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.15.0
+ */
+
+typedef struct {
+ /*< private >*/
+ GDataEntryClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataTasksTasklistClass;
+
+GType gdata_tasks_tasklist_get_type (void) G_GNUC_CONST;
+
+GDataTasksTasklist *gdata_tasks_tasklist_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+G_END_DECLS
+
+#endif /* !GDATA_TASKS_TASKLIST_H */
--- /dev/null
+headers = files(
+ 'gdata-tasks-query.h',
+ 'gdata-tasks-service.h',
+ 'gdata-tasks-task.h',
+ 'gdata-tasks-tasklist.h',
+)
+
+install_headers(
+ headers,
+ subdir: gdata_include_subdir / 'services/tasks',
+)
+
+gir_headers += headers
+
+sources += files(
+ 'gdata-tasks-query.c',
+ 'gdata-tasks-service.c',
+ 'gdata-tasks-task.c',
+ 'gdata-tasks-tasklist.c',
+)
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-youtube-category
+ * @short_description: YouTube category element
+ * @stability: Stable
+ * @include: gdata/services/youtube/gdata-youtube-category.h
+ *
+ * #GDataYouTubeCategory represents the YouTube-specific customizations to #GDataCategory. For more information,
+ * see the <ulink type="http" url="http://code.google.com/apis/youtube/2.0/reference.html#YouTube_Category_List">
+ * online documentation</ulink>.
+ *
+ * Since: 0.7.0
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+#include <string.h>
+
+#include "gdata-youtube-category.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+
+static void gdata_youtube_category_finalize (GObject *object);
+static void gdata_youtube_category_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataYouTubeCategoryPrivate {
+ gboolean assignable;
+ gchar **browsable_regions;
+ /*gboolean deprecated; --- "Categories that are neither assignable or browsable are deprecated and are identified as such using the
+ * <yt:deprecated> tag." */
+};
+
+enum {
+ PROP_IS_ASSIGNABLE = 1,
+ PROP_IS_DEPRECATED
+};
+
+G_DEFINE_TYPE (GDataYouTubeCategory, gdata_youtube_category, GDATA_TYPE_CATEGORY)
+
+static void
+gdata_youtube_category_class_init (GDataYouTubeCategoryClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataYouTubeCategoryPrivate));
+
+ gobject_class->get_property = gdata_youtube_category_get_property;
+ gobject_class->finalize = gdata_youtube_category_finalize;
+
+ parsable_class->parse_xml = parse_xml;
+ parsable_class->get_namespaces = get_namespaces;
+
+ /**
+ * GDataYouTubeCategory:is-assignable:
+ *
+ * Whether new videos can be added to the category.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_IS_ASSIGNABLE,
+ g_param_spec_boolean ("is-assignable",
+ "Assignable?", "Whether new videos can be added to the category.",
+ FALSE,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeCategory:is-deprecated:
+ *
+ * Whether the category is deprecated.
+ *
+ * Since: 0.7.0
+ */
+ g_object_class_install_property (gobject_class, PROP_IS_DEPRECATED,
+ g_param_spec_boolean ("is-deprecated",
+ "Deprecated?", "Whether the category is deprecated.",
+ TRUE,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_youtube_category_init (GDataYouTubeCategory *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_YOUTUBE_CATEGORY, GDataYouTubeCategoryPrivate);
+}
+
+static void
+gdata_youtube_category_finalize (GObject *object)
+{
+ GDataYouTubeCategoryPrivate *priv = GDATA_YOUTUBE_CATEGORY (object)->priv;
+
+ g_strfreev (priv->browsable_regions);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_youtube_category_parent_class)->finalize (object);
+}
+
+static void
+gdata_youtube_category_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataYouTubeCategoryPrivate *priv = GDATA_YOUTUBE_CATEGORY (object)->priv;
+
+ switch (property_id) {
+ case PROP_IS_ASSIGNABLE:
+ g_value_set_boolean (value, priv->assignable);
+ break;
+ case PROP_IS_DEPRECATED:
+ g_value_set_boolean (value, (priv->assignable == FALSE && priv->browsable_regions == NULL) ? TRUE : FALSE);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+ GDataYouTubeCategory *self = GDATA_YOUTUBE_CATEGORY (parsable);
+
+ if (gdata_parser_is_namespace (node, "http://gdata.youtube.com/schemas/2007") == TRUE) {
+ if (xmlStrcmp (node->name, (xmlChar*) "assignable") == 0) {
+ /* yt:assignable */
+ self->priv->assignable = TRUE;
+ } else if (xmlStrcmp (node->name, (xmlChar*) "deprecated") == 0) {
+ /* yt:deprecated */
+ self->priv->assignable = FALSE;
+ g_strfreev (self->priv->browsable_regions);
+ self->priv->browsable_regions = NULL;
+ } else if (xmlStrcmp (node->name, (xmlChar*) "browsable") == 0) {
+ /* yt:browsable */
+ xmlChar *regions;
+
+ regions = xmlGetProp (node, (xmlChar*) "regions");
+ if (regions == NULL)
+ return gdata_parser_error_required_property_missing (node, "regions", error);
+
+ self->priv->browsable_regions = g_strsplit ((gchar*) regions, " ", -1);
+ xmlFree (regions);
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_youtube_category_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ }
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_youtube_category_parent_class)->parse_xml (parsable, doc, node, user_data, error);
+ }
+
+ return TRUE;
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ /* Chain up to the parent class */
+ GDATA_PARSABLE_CLASS (gdata_youtube_category_parent_class)->get_namespaces (parsable, namespaces);
+
+ g_hash_table_insert (namespaces, (gchar*) "youtube", (gchar*) "http://gdata.youtube.com/schemas/2007");
+}
+
+/**
+ * gdata_youtube_category_is_assignable:
+ * @self: a #GDataYouTubeCategory
+ *
+ * Gets the #GDataYouTubeCategory:is-assignable property.
+ *
+ * Return value: whether new videos can be assigned to the category
+ *
+ * Since: 0.7.0
+ */
+gboolean
+gdata_youtube_category_is_assignable (GDataYouTubeCategory *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_CATEGORY (self), FALSE);
+ return self->priv->assignable;
+}
+
+/**
+ * gdata_youtube_category_is_browsable:
+ * @self: a #GDataYouTubeCategory
+ * @region: a two-letter region ID
+ *
+ * Returns whether the category is browsable in the given @region. The list of supported region IDs is
+ * <ulink type="http" url="http://code.google.com/apis/youtube/2.0/reference.html#Region_specific_feeds">available online</ulink>.
+ *
+ * Return value: whether the category is browsable in @region
+ *
+ * Since: 0.7.0
+ */
+gboolean
+gdata_youtube_category_is_browsable (GDataYouTubeCategory *self, const gchar *region)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_CATEGORY (self), FALSE);
+ g_return_val_if_fail (region != NULL && *region != '\0', FALSE);
+
+ if (self->priv->browsable_regions != NULL) {
+ guint i;
+
+ for (i = 0; self->priv->browsable_regions[i] != NULL; i++) {
+ if (strcmp (self->priv->browsable_regions[i], region) == 0)
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
+/**
+ * gdata_youtube_category_is_deprecated:
+ * @self: a #GDataYouTubeCategory
+ *
+ * Gets the #GDataYouTubeCategory:is-deprecated property.
+ *
+ * Return value: whether the category is deprecated
+ *
+ * Since: 0.7.0
+ */
+gboolean
+gdata_youtube_category_is_deprecated (GDataYouTubeCategory *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_CATEGORY (self), TRUE);
+ return (self->priv->assignable == FALSE && self->priv->browsable_regions == NULL) ? TRUE : FALSE;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_YOUTUBE_CATEGORY_H
+#define GDATA_YOUTUBE_CATEGORY_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+#include <gdata/atom/gdata-category.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_YOUTUBE_CATEGORY (gdata_youtube_category_get_type ())
+#define GDATA_YOUTUBE_CATEGORY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_YOUTUBE_CATEGORY, GDataYouTubeCategory))
+#define GDATA_YOUTUBE_CATEGORY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_YOUTUBE_CATEGORY, GDataYouTubeCategoryClass))
+#define GDATA_IS_YOUTUBE_CATEGORY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_YOUTUBE_CATEGORY))
+#define GDATA_IS_YOUTUBE_CATEGORY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_YOUTUBE_CATEGORY))
+#define GDATA_YOUTUBE_CATEGORY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_YOUTUBE_CATEGORY, GDataYouTubeCategoryClass))
+
+typedef struct _GDataYouTubeCategoryPrivate GDataYouTubeCategoryPrivate;
+
+/**
+ * GDataYouTubeCategory:
+ *
+ * All the fields in the #GDataYouTubeCategory structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ GDataCategory parent;
+ GDataYouTubeCategoryPrivate *priv;
+} GDataYouTubeCategory;
+
+/**
+ * GDataYouTubeCategoryClass:
+ *
+ * All the fields in the #GDataYouTubeCategoryClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.7.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataCategoryClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataYouTubeCategoryClass;
+
+GType gdata_youtube_category_get_type (void) G_GNUC_CONST;
+
+gboolean gdata_youtube_category_is_assignable (GDataYouTubeCategory *self) G_GNUC_PURE;
+gboolean gdata_youtube_category_is_browsable (GDataYouTubeCategory *self, const gchar *region) G_GNUC_PURE;
+gboolean gdata_youtube_category_is_deprecated (GDataYouTubeCategory *self) G_GNUC_PURE;
+
+G_END_DECLS
+
+#endif /* !GDATA_YOUTUBE_CATEGORY_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2011, 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-youtube-comment
+ * @short_description: GData YouTube comment object
+ * @stability: Stable
+ * @include: gdata/services/youtube/gdata-youtube-comment.h
+ *
+ * #GDataYouTubeComment is a subclass of #GDataComment to represent a comment on a #GDataYouTubeVideo. It is returned by the #GDataCommentable
+ * interface implementation on #GDataYouTubeVideo.
+ *
+ * It's possible to query for and add #GDataYouTubeComments, but it is not possible to delete #GDataYouTubeComments from any video
+ * using the GData API.
+ *
+ * Comments on YouTube videos can be arranged in a hierarchy by their #GDataYouTubeComment:parent-comment-uris. If a
+ * #GDataYouTubeComment<!-- -->'s parent comment URI is non-%NULL, it should match the %GDATA_LINK_SELF #GDataLink of another #GDataYouTubeComment on
+ * the same video (as retrieved using gdata_entry_look_up_link() on the comments). Comments with #GDataYouTubeComment:parent-comment-uri set to %NULL
+ * are top-level comments.
+ *
+ * Since: 0.10.0
+ */
+
+#include <config.h>
+#include <glib.h>
+
+#include "gdata-parser.h"
+#include "gdata-private.h"
+#include "gdata-youtube-comment.h"
+
+#define GDATA_LINK_PARENT_COMMENT_URI "http://gdata.youtube.com/schemas/2007#in-reply-to"
+
+static void gdata_youtube_comment_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void gdata_youtube_comment_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_youtube_comment_finalize (GObject *object);
+static gboolean parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error);
+static void get_json (GDataParsable *parsable, JsonBuilder *builder);
+static const gchar *get_content_type (void);
+
+struct _GDataYouTubeCommentPrivate {
+ gchar *channel_id; /* owned */
+ gchar *video_id; /* owned */
+ gboolean can_reply;
+};
+
+enum {
+ PROP_PARENT_COMMENT_URI = 1,
+};
+
+G_DEFINE_TYPE (GDataYouTubeComment, gdata_youtube_comment, GDATA_TYPE_COMMENT)
+
+static void
+gdata_youtube_comment_class_init (GDataYouTubeCommentClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+ GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataYouTubeCommentPrivate));
+
+ gobject_class->get_property = gdata_youtube_comment_get_property;
+ gobject_class->set_property = gdata_youtube_comment_set_property;
+ gobject_class->finalize = gdata_youtube_comment_finalize;
+
+ parsable_class->parse_json = parse_json;
+ parsable_class->get_json = get_json;
+ parsable_class->get_content_type = get_content_type;
+
+ entry_class->kind_term = "youtube#commentThread";
+
+ /**
+ * GDataYouTubeComment:parent-comment-uri:
+ *
+ * The URI of the parent comment to this one, or %NULL if this comment is a top-level comment.
+ *
+ * See the documentation for #GDataYouTubeComment for an explanation of the semantics of parent comment URIs.
+ *
+ * Since: 0.10.0
+ */
+ g_object_class_install_property (gobject_class, PROP_PARENT_COMMENT_URI,
+ g_param_spec_string ("parent-comment-uri",
+ "Parent comment URI", "The URI of the parent comment to this one.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_youtube_comment_init (GDataYouTubeComment *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_YOUTUBE_COMMENT, GDataYouTubeCommentPrivate);
+}
+
+static void
+gdata_youtube_comment_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataYouTubeComment *self = GDATA_YOUTUBE_COMMENT (object);
+
+ switch (property_id) {
+ case PROP_PARENT_COMMENT_URI:
+ g_value_set_string (value, gdata_youtube_comment_get_parent_comment_uri (self));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_youtube_comment_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataYouTubeComment *self = GDATA_YOUTUBE_COMMENT (object);
+
+ switch (property_id) {
+ case PROP_PARENT_COMMENT_URI:
+ gdata_youtube_comment_set_parent_comment_uri (self, g_value_get_string (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_youtube_comment_finalize (GObject *object)
+{
+ GDataYouTubeCommentPrivate *priv = GDATA_YOUTUBE_COMMENT (object)->priv;
+
+ g_free (priv->channel_id);
+ g_free (priv->video_id);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_youtube_comment_parent_class)->finalize (object);
+}
+
+/* Reference: https://developers.google.com/youtube/v3/docs/comments#resource */
+static gboolean
+parse_comment (GDataParsable *parsable, JsonReader *reader, GError **error)
+{
+ GDataYouTubeComment *self = GDATA_YOUTUBE_COMMENT (parsable);
+ const gchar *id, *etag, *parent_id, *author_name, *author_uri;
+ const gchar *published_at, *updated_at;
+ gint64 published, updated;
+
+ /* Check this is an object. */
+ if (!json_reader_is_object (reader)) {
+ return gdata_parser_error_required_json_content_missing (reader, error);
+ }
+
+ /* id */
+ json_reader_read_member (reader, "id");
+ id = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ /* Empty ID? */
+ if (id == NULL || *id == '\0') {
+ return gdata_parser_error_required_json_content_missing (reader, error);
+ }
+
+ _gdata_entry_set_id (GDATA_ENTRY (parsable), id);
+
+ /* etag */
+ json_reader_read_member (reader, "etag");
+ etag = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ /* Empty ETag? */
+ if (etag != NULL && *id == '\0') {
+ return gdata_parser_error_required_json_content_missing (reader, error);
+ }
+
+ _gdata_entry_set_etag (GDATA_ENTRY (parsable), etag);
+
+ /* snippet */
+ json_reader_read_member (reader, "snippet");
+
+ if (!json_reader_is_object (reader)) {
+ json_reader_end_member (reader);
+ return gdata_parser_error_required_json_content_missing (reader, error);
+ }
+
+ json_reader_read_member (reader, "textDisplay");
+ gdata_entry_set_content (GDATA_ENTRY (self),
+ json_reader_get_string_value (reader));
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "parentId");
+ parent_id = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ if (parent_id != NULL) {
+ gchar *uri = NULL;
+
+ uri = _gdata_service_build_uri ("https://www.googleapis.com"
+ "/youtube/v3/comments"
+ "?part=snippet"
+ "&id=%s", parent_id);
+ gdata_youtube_comment_set_parent_comment_uri (self, uri);
+ g_free (uri);
+ }
+
+ json_reader_read_member (reader, "authorDisplayName");
+ author_name = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "authorChannelUrl");
+ author_uri = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ if (author_name != NULL && *author_name != '\0') {
+ GDataAuthor *author = NULL;
+
+ author = gdata_author_new (author_name, author_uri, NULL);
+ gdata_entry_add_author (GDATA_ENTRY (self), author);
+ }
+
+ json_reader_read_member (reader, "publishedAt");
+ published_at = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ if (published_at != NULL &&
+ gdata_parser_int64_from_iso8601 (published_at, &published)) {
+ _gdata_entry_set_published (GDATA_ENTRY (self), published);
+ } else if (published_at != NULL) {
+ /* Error */
+ gdata_parser_error_not_iso8601_format_json (reader,
+ published_at,
+ error);
+ json_reader_end_member (reader);
+ return FALSE;
+ }
+
+ json_reader_read_member (reader, "updatedAt");
+ updated_at = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ if (updated_at != NULL &&
+ gdata_parser_int64_from_iso8601 (updated_at, &updated)) {
+ _gdata_entry_set_updated (GDATA_ENTRY (self), updated);
+ } else if (updated_at != NULL) {
+ /* Error */
+ gdata_parser_error_not_iso8601_format_json (reader,
+ updated_at,
+ error);
+ json_reader_end_member (reader);
+ return FALSE;
+ }
+
+ /* FIXME: Implement:
+ * - channelId
+ * - videoId
+ * - textOriginal
+ * - canRate
+ * - viewerRating
+ * - likeCount
+ * - moderationStatus
+ * - authorProfileImageUrl
+ * - authorChannelId
+ * - authorGoogleplusProfileUrl
+ */
+
+ json_reader_end_member (reader);
+
+ return TRUE;
+}
+
+/* Reference: https://developers.google.com/youtube/v3/docs/commentThreads#resource */
+static gboolean
+parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error)
+{
+ gboolean success;
+ GDataYouTubeComment *self = GDATA_YOUTUBE_COMMENT (parsable);
+ GDataYouTubeCommentPrivate *priv = self->priv;
+
+ if (g_strcmp0 (json_reader_get_member_name (reader), "snippet") == 0) {
+ guint i;
+
+ /* Check this is an object. */
+ if (!json_reader_is_object (reader)) {
+ return gdata_parser_error_required_json_content_missing (reader, error);
+ }
+
+ for (i = 0; i < (guint) json_reader_count_members (reader); i++) {
+ json_reader_read_element (reader, i);
+
+ if (gdata_parser_string_from_json_member (reader, "channelId", P_DEFAULT, &priv->channel_id, &success, error) ||
+ gdata_parser_string_from_json_member (reader, "videoId", P_DEFAULT, &priv->video_id, &success, error) ||
+ gdata_parser_boolean_from_json_member (reader, "canReply", P_DEFAULT, &priv->can_reply, &success, error)) {
+ /* Fall through. */
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "topLevelComment") == 0) {
+ success = parse_comment (parsable, reader, error);
+ }
+
+ json_reader_end_element (reader);
+
+ if (!success) {
+ return FALSE;
+ }
+ }
+
+ return TRUE;
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_youtube_comment_parent_class)->parse_json (parsable, reader, user_data, error);
+ }
+
+ return TRUE;
+}
+
+/* Reference: https://developers.google.com/youtube/v3/docs/comments#resource */
+static void
+get_comment (GDataParsable *parsable, JsonBuilder *builder)
+{
+ GDataYouTubeComment *self = GDATA_YOUTUBE_COMMENT (parsable);
+ GDataEntry *entry = GDATA_ENTRY (parsable);
+ GDataYouTubeCommentPrivate *priv = GDATA_YOUTUBE_COMMENT (parsable)->priv;
+
+ json_builder_set_member_name (builder, "kind");
+ json_builder_add_string_value (builder, "youtube#comment");
+
+ if (gdata_entry_get_etag (entry) != NULL) {
+ json_builder_set_member_name (builder, "etag");
+ json_builder_add_string_value (builder,
+ gdata_entry_get_etag (entry));
+ }
+
+ if (gdata_entry_get_id (entry) != NULL) {
+ json_builder_set_member_name (builder, "id");
+ json_builder_add_string_value (builder,
+ gdata_entry_get_id (entry));
+ }
+
+ json_builder_set_member_name (builder, "snippet");
+ json_builder_begin_object (builder);
+
+ if (priv->channel_id != NULL) {
+ json_builder_set_member_name (builder, "channelId");
+ json_builder_add_string_value (builder, priv->channel_id);
+ }
+
+ if (priv->video_id != NULL) {
+ json_builder_set_member_name (builder, "videoId");
+ json_builder_add_string_value (builder, priv->video_id);
+ }
+
+ /* Note we build textOriginal and parse textDisplay. */
+ if (gdata_entry_get_content (entry) != NULL) {
+ json_builder_set_member_name (builder, "textOriginal");
+ json_builder_add_string_value (builder,
+ gdata_entry_get_content (entry));
+ }
+
+ if (gdata_youtube_comment_get_parent_comment_uri (self) != NULL) {
+ json_builder_set_member_name (builder, "parentId");
+ json_builder_add_string_value (builder,
+ gdata_youtube_comment_get_parent_comment_uri (self));
+ }
+
+ json_builder_end_object (builder);
+}
+
+/* Reference: https://developers.google.com/youtube/v3/docs/commentThreads#resource
+ *
+ * Sort of. If creating a new top-level comment, we need to create a
+ * commentThread; otherwise we need to create a comment. */
+static void
+get_json (GDataParsable *parsable, JsonBuilder *builder)
+{
+ GDataEntry *entry = GDATA_ENTRY (parsable);
+ GDataYouTubeCommentPrivate *priv = GDATA_YOUTUBE_COMMENT (parsable)->priv;
+
+ /* Don’t chain up because it’s mostly irrelevant. */
+ json_builder_set_member_name (builder, "kind");
+ json_builder_add_string_value (builder, "youtube#commentThread");
+
+ if (gdata_entry_get_etag (entry) != NULL) {
+ json_builder_set_member_name (builder, "etag");
+ json_builder_add_string_value (builder,
+ gdata_entry_get_etag (entry));
+ }
+
+ if (gdata_entry_get_id (entry) != NULL) {
+ json_builder_set_member_name (builder, "id");
+ json_builder_add_string_value (builder,
+ gdata_entry_get_id (entry));
+ }
+
+ /* snippet object. */
+ json_builder_set_member_name (builder, "snippet");
+ json_builder_begin_object (builder);
+
+ if (priv->channel_id != NULL) {
+ json_builder_set_member_name (builder, "channelId");
+ json_builder_add_string_value (builder, priv->channel_id);
+ }
+
+ if (priv->video_id != NULL) {
+ json_builder_set_member_name (builder, "videoId");
+ json_builder_add_string_value (builder, priv->video_id);
+ }
+
+ json_builder_set_member_name (builder, "topLevelComment");
+ json_builder_begin_object (builder);
+ get_comment (parsable, builder);
+ json_builder_end_object (builder);
+
+ json_builder_end_object (builder);
+}
+
+static const gchar *
+get_content_type (void)
+{
+ return "application/json";
+}
+
+/**
+ * gdata_youtube_comment_new:
+ * @id: the comment's ID, or %NULL
+ *
+ * Creates a new #GDataYouTubeComment with the given ID and default properties.
+ *
+ * Return value: a new #GDataYouTubeComment; unref with g_object_unref()
+ *
+ * Since: 0.10.0
+ */
+GDataYouTubeComment *
+gdata_youtube_comment_new (const gchar *id)
+{
+ return GDATA_YOUTUBE_COMMENT (g_object_new (GDATA_TYPE_YOUTUBE_COMMENT,
+ "id", id,
+ NULL));
+}
+
+/**
+ * gdata_youtube_comment_get_parent_comment_uri:
+ * @self: a #GDataYouTubeComment
+ *
+ * Gets the #GDataYouTubeComment:parent-comment-uri property.
+ *
+ * Return value: the parent comment URI, or %NULL
+ *
+ * Since: 0.10.0
+ */
+const gchar *
+gdata_youtube_comment_get_parent_comment_uri (GDataYouTubeComment *self)
+{
+ GDataLink *link_;
+
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_COMMENT (self), NULL);
+
+ link_ = gdata_entry_look_up_link (GDATA_ENTRY (self), GDATA_LINK_PARENT_COMMENT_URI);
+ if (link_ == NULL) {
+ return NULL;
+ }
+
+ return gdata_link_get_uri (link_);
+}
+
+/**
+ * gdata_youtube_comment_set_parent_comment_uri:
+ * @self: a #GDataYouTubeComment
+ * @parent_comment_uri: a new parent comment URI, or %NULL
+ *
+ * Sets the #GDataYouTubeComment:parent-comment-uri property to @parent_comment_uri.
+ *
+ * Set @parent_comment_uri to %NULL to unset the #GDataYouTubeComment:parent-comment-uri property in the comment (i.e. make the comment a top-level
+ * comment).
+ *
+ * See the <ulink type="http" url="http://code.google.com/apis/youtube/2.0/developers_guide_protocol_comments.html#Retrieve_comments">online
+ * documentation</ulink> for more information.
+ *
+ * Since: 0.10.0
+ */
+void
+gdata_youtube_comment_set_parent_comment_uri (GDataYouTubeComment *self, const gchar *parent_comment_uri)
+{
+ GDataLink *link_;
+
+ g_return_if_fail (GDATA_IS_YOUTUBE_COMMENT (self));
+ g_return_if_fail (parent_comment_uri == NULL || *parent_comment_uri != '\0');
+
+ link_ = gdata_entry_look_up_link (GDATA_ENTRY (self), GDATA_LINK_PARENT_COMMENT_URI);
+
+ if ((link_ == NULL && parent_comment_uri == NULL) ||
+ (link_ != NULL && parent_comment_uri != NULL && g_strcmp0 (gdata_link_get_uri (link_), parent_comment_uri) == 0)) {
+ /* Nothing to do. */
+ return;
+ } else if (link_ == NULL && parent_comment_uri != NULL) {
+ /* Add the new link. */
+ link_ = gdata_link_new (parent_comment_uri, GDATA_LINK_PARENT_COMMENT_URI);
+ gdata_entry_add_link (GDATA_ENTRY (self), link_);
+ g_object_unref (link_);
+ } else if (link_ != NULL && parent_comment_uri == NULL) {
+ /* Remove the old link. */
+ gdata_entry_remove_link (GDATA_ENTRY (self), link_);
+ } else if (link_ != NULL && parent_comment_uri != NULL) {
+ /* Update the existing link. */
+ gdata_link_set_uri (link_, parent_comment_uri);
+ }
+
+ g_object_notify (G_OBJECT (self), "parent-comment-uri");
+}
+
+G_GNUC_INTERNAL void
+_gdata_youtube_comment_set_video_id (GDataYouTubeComment *self,
+ const gchar *video_id);
+G_GNUC_INTERNAL void
+_gdata_youtube_comment_set_channel_id (GDataYouTubeComment *self,
+ const gchar *channel_id);
+
+/**
+ * _gdata_youtube_comment_set_video_id:
+ * @self: a #GDataYouTubeComment
+ * @video_id: (nullable): the comment’s video ID, or %NULL
+ *
+ * Set the ID of the video the comment is attached to. This may be %NULL if the
+ * comment has not yet been inserted, or if it is just attached to a channel
+ * rather than a video.
+ *
+ * Since: 0.17.2
+ */
+void
+_gdata_youtube_comment_set_video_id (GDataYouTubeComment *self,
+ const gchar *video_id)
+{
+ GDataYouTubeCommentPrivate *priv;
+
+ g_return_if_fail (GDATA_IS_YOUTUBE_COMMENT (self));
+ g_return_if_fail (video_id == NULL || *video_id != '\0');
+
+ priv = self->priv;
+
+ g_free (priv->video_id);
+ priv->video_id = g_strdup (video_id);
+}
+
+/**
+ * _gdata_youtube_comment_set_channel_id:
+ * @self: a #GDataYouTubeComment
+ * @channel_id: (nullable): the comment’s channel ID, or %NULL
+ *
+ * Set the ID of the channel the comment is attached to. This may be %NULL if
+ * the comment has not yet been inserted, but must be set otherwise.
+ *
+ * Since: 0.17.2
+ */
+void
+_gdata_youtube_comment_set_channel_id (GDataYouTubeComment *self,
+ const gchar *channel_id)
+{
+ GDataYouTubeCommentPrivate *priv;
+
+ g_return_if_fail (GDATA_IS_YOUTUBE_COMMENT (self));
+ g_return_if_fail (channel_id == NULL || *channel_id != '\0');
+
+ priv = self->priv;
+
+ g_free (priv->channel_id);
+ priv->channel_id = g_strdup (channel_id);
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2011 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_YOUTUBE_COMMENT_H
+#define GDATA_YOUTUBE_COMMENT_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-comment.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_YOUTUBE_COMMENT (gdata_youtube_comment_get_type ())
+#define GDATA_YOUTUBE_COMMENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_YOUTUBE_COMMENT, GDataYouTubeComment))
+#define GDATA_YOUTUBE_COMMENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_YOUTUBE_COMMENT, GDataYouTubeCommentClass))
+#define GDATA_IS_YOUTUBE_COMMENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_YOUTUBE_COMMENT))
+#define GDATA_IS_YOUTUBE_COMMENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_YOUTUBE_COMMENT))
+#define GDATA_YOUTUBE_COMMENT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_YOUTUBE_COMMENT, GDataYouTubeCommentClass))
+
+typedef struct _GDataYouTubeCommentPrivate GDataYouTubeCommentPrivate;
+
+/**
+ * GDataYouTubeComment:
+ *
+ * All the fields in the #GDataYouTubeComment structure are private and should never be accessed directly.
+ *
+ * Since: 0.10.0
+ */
+typedef struct {
+ GDataComment parent;
+ GDataYouTubeCommentPrivate *priv;
+} GDataYouTubeComment;
+
+/**
+ * GDataYouTubeCommentClass:
+ *
+ * All the fields in the #GDataYouTubeCommentClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.10.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataCommentClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataYouTubeCommentClass;
+
+GType gdata_youtube_comment_get_type (void) G_GNUC_CONST;
+
+GDataYouTubeComment *gdata_youtube_comment_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_youtube_comment_get_parent_comment_uri (GDataYouTubeComment *self) G_GNUC_PURE;
+void gdata_youtube_comment_set_parent_comment_uri (GDataYouTubeComment *self, const gchar *parent_comment_uri);
+
+G_END_DECLS
+
+#endif /* !GDATA_YOUTUBE_COMMENT_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010, 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-youtube-content
+ * @short_description: YouTube content element
+ * @stability: Stable
+ * @include: gdata/services/youtube/gdata-youtube-content.h
+ *
+ * #GDataYouTubeContent represents the YouTube-specific customizations to #GDataMediaContent. For more information,
+ * see the <ulink type="http" url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_media:content">
+ * online documentation</ulink>.
+ *
+ * Since: 0.4.0
+ * Deprecated: 0.17.0: Accessing YouTube video content directly is no longer
+ * supported by Google. There is no replacement.
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+
+#include "gdata-youtube-content.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+#include "gdata-youtube-enums.h"
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
+static void gdata_youtube_content_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataYouTubeContentPrivate {
+ GDataYouTubeFormat format;
+};
+
+enum {
+ PROP_FORMAT = 1
+};
+
+G_DEFINE_TYPE (GDataYouTubeContent, gdata_youtube_content, GDATA_TYPE_MEDIA_CONTENT)
+
+static void
+gdata_youtube_content_class_init (GDataYouTubeContentClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataYouTubeContentPrivate));
+
+ gobject_class->get_property = gdata_youtube_content_get_property;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ parsable_class->get_namespaces = get_namespaces;
+
+ /**
+ * GDataYouTubeContent:format:
+ *
+ * The video format of the video object.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_media:content">
+ * YouTube documentation</ulink>.
+ *
+ * Since: 0.4.0
+ * Deprecated: 0.17.0: Accessing YouTube video content directly is
+ * no longer supported by Google. There is no replacement.
+ */
+ g_object_class_install_property (gobject_class, PROP_FORMAT,
+ g_param_spec_enum ("format",
+ "Format", "The video format of the video object.",
+ GDATA_TYPE_YOUTUBE_FORMAT, GDATA_YOUTUBE_FORMAT_UNKNOWN,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS |
+ G_PARAM_DEPRECATED));
+}
+
+static void
+gdata_youtube_content_init (GDataYouTubeContent *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_YOUTUBE_CONTENT, GDataYouTubeContentPrivate);
+}
+
+static void
+gdata_youtube_content_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataYouTubeContentPrivate *priv = GDATA_YOUTUBE_CONTENT (object)->priv;
+
+ switch (property_id) {
+ case PROP_FORMAT:
+ g_value_set_enum (value, priv->format);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ xmlChar *format;
+
+ /* Chain up to the parent class */
+ GDATA_PARSABLE_CLASS (gdata_youtube_content_parent_class)->pre_parse_xml (parsable, doc, root_node, user_data, error);
+
+ format = xmlGetProp (root_node, (xmlChar*) "format");
+ GDATA_YOUTUBE_CONTENT (parsable)->priv->format = (format == NULL) ? GDATA_YOUTUBE_FORMAT_UNKNOWN : g_ascii_strtoull ((gchar*) format, NULL, 10);
+
+ return TRUE;
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ /* Chain up to the parent class */
+ GDATA_PARSABLE_CLASS (gdata_youtube_content_parent_class)->get_namespaces (parsable, namespaces);
+
+ g_hash_table_insert (namespaces, (gchar*) "youtube", (gchar*) "http://gdata.youtube.com/schemas/2007");
+}
+
+/**
+ * gdata_youtube_content_get_format:
+ * @self: a #GDataYouTubeContent
+ *
+ * Gets the #GDataYouTubeContent:format property.
+ *
+ * Return value: the video format, or %GDATA_YOUTUBE_FORMAT_UNKNOWN
+ *
+ * Since: 0.4.0
+ * Deprecated: 0.17.0: Accessing YouTube video content directly is no longer
+ * supported by Google. There is no replacement.
+ */
+GDataYouTubeFormat
+gdata_youtube_content_get_format (GDataYouTubeContent *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_CONTENT (self), GDATA_YOUTUBE_FORMAT_UNKNOWN);
+ return self->priv->format;
+}
+
+G_GNUC_END_IGNORE_DEPRECATIONS
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010, 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_YOUTUBE_CONTENT_H
+#define GDATA_YOUTUBE_CONTENT_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+#include <gdata/media/gdata-media-content.h>
+
+G_BEGIN_DECLS
+
+#ifndef LIBGDATA_DISABLE_DEPRECATED
+
+/**
+ * GDataYouTubeFormat:
+ * @GDATA_YOUTUBE_FORMAT_UNKNOWN: retrieve videos in all formats when querying the service
+ * @GDATA_YOUTUBE_FORMAT_RTSP_H263_AMR: RTSP streaming URI for mobile video playback; H.263 video (up to 176×144) and AMR audio
+ * @GDATA_YOUTUBE_FORMAT_HTTP_SWF: HTTP URI to the embeddable player (SWF) for this video
+ * @GDATA_YOUTUBE_FORMAT_RTSP_MPEG4_AAC: RTSP streaming URI for mobile video playback; MPEG-4 SP video (up to 176×144) and AAC audio
+ *
+ * Video formats available on YouTube. For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/youtube/2.0/reference.html#formatsp">online documentation</ulink>.
+ *
+ * Since: 0.3.0
+ * Deprecated: 0.17.0: Accessing YouTube video content directly is no longer
+ * supported by Google. There is no replacement.
+ */
+typedef enum {
+ GDATA_YOUTUBE_FORMAT_UNKNOWN = 0,
+ GDATA_YOUTUBE_FORMAT_RTSP_H263_AMR = 1,
+ GDATA_YOUTUBE_FORMAT_HTTP_SWF = 5,
+ GDATA_YOUTUBE_FORMAT_RTSP_MPEG4_AAC = 6
+} GDataYouTubeFormat;
+
+#define GDATA_TYPE_YOUTUBE_CONTENT (gdata_youtube_content_get_type ())
+#define GDATA_YOUTUBE_CONTENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_YOUTUBE_CONTENT, GDataYouTubeContent))
+#define GDATA_YOUTUBE_CONTENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_YOUTUBE_CONTENT, GDataYouTubeContentClass))
+#define GDATA_IS_YOUTUBE_CONTENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_YOUTUBE_CONTENT))
+#define GDATA_IS_YOUTUBE_CONTENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_YOUTUBE_CONTENT))
+#define GDATA_YOUTUBE_CONTENT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_YOUTUBE_CONTENT, GDataYouTubeContentClass))
+
+typedef struct _GDataYouTubeContentPrivate GDataYouTubeContentPrivate G_GNUC_DEPRECATED;
+
+/**
+ * GDataYouTubeContent:
+ *
+ * All the fields in the #GDataYouTubeContent structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ * Deprecated: 0.17.0: Accessing YouTube video content directly is no longer
+ * supported by Google. There is no replacement.
+ */
+typedef struct {
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ GDataMediaContent parent;
+ GDataYouTubeContentPrivate *priv;
+ G_GNUC_END_IGNORE_DEPRECATIONS
+} GDataYouTubeContent;
+
+/**
+ * GDataYouTubeContentClass:
+ *
+ * All the fields in the #GDataYouTubeContentClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ * Deprecated: 0.17.0: Accessing YouTube video content directly is no longer
+ * supported by Google. There is no replacement.
+ */
+typedef struct {
+ /*< private >*/
+ GDataMediaContentClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataYouTubeContentClass;
+
+GType gdata_youtube_content_get_type (void) G_GNUC_CONST G_GNUC_DEPRECATED;
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+GDataYouTubeFormat gdata_youtube_content_get_format (GDataYouTubeContent *self) G_GNUC_PURE G_GNUC_DEPRECATED;
+G_GNUC_END_IGNORE_DEPRECATIONS
+
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
+
+G_END_DECLS
+
+#endif /* !GDATA_YOUTUBE_CONTENT_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010, 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-youtube-credit
+ * @short_description: YouTube credit element
+ * @stability: Stable
+ * @include: gdata/services/youtube/gdata-youtube-credit.h
+ *
+ * #GDataYouTubeCredit represents the YouTube-specific customizations to #GDataMediaCredit. For more information,
+ * see the <ulink type="http" url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_media:credit">
+ * online documentation</ulink>.
+ *
+ * Since: 0.4.0
+ * Deprecated: 0.17.0: This is no longer supported by Google. There is no
+ * replacement.
+ */
+
+#include <glib.h>
+#include <libxml/parser.h>
+
+#include "gdata-youtube-credit.h"
+#include "gdata-parsable.h"
+#include "gdata-parser.h"
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
+static void gdata_youtube_credit_finalize (GObject *object);
+static void gdata_youtube_credit_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
+static void pre_get_xml (GDataParsable *parsable, GString *xml_string);
+static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
+
+struct _GDataYouTubeCreditPrivate {
+ gchar *entity_type;
+};
+
+enum {
+ PROP_ENTITY_TYPE = 1
+};
+
+G_DEFINE_TYPE (GDataYouTubeCredit, gdata_youtube_credit, GDATA_TYPE_MEDIA_CREDIT)
+
+static void
+gdata_youtube_credit_class_init (GDataYouTubeCreditClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataYouTubeCreditPrivate));
+
+ gobject_class->get_property = gdata_youtube_credit_get_property;
+ gobject_class->finalize = gdata_youtube_credit_finalize;
+
+ parsable_class->pre_parse_xml = pre_parse_xml;
+ parsable_class->pre_get_xml = pre_get_xml;
+ parsable_class->get_namespaces = get_namespaces;
+
+ /**
+ * GDataYouTubeCredit:entity-type:
+ *
+ * The type of entity who is credited. Currently this can only be %GDATA_YOUTUBE_CREDIT_ENTITY_PARTNER, for a YouTube partner.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_media:credit">
+ * YouTube documentation</ulink>.
+ *
+ * Since: 0.4.0
+ * Deprecated: 0.17.0: This is no longer supported by Google. There
+ * is no replacement.
+ */
+ g_object_class_install_property (gobject_class, PROP_ENTITY_TYPE,
+ g_param_spec_string ("entity-type",
+ "Entity type", "The type of entity who is credited.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED));
+}
+
+static void
+gdata_youtube_credit_init (GDataYouTubeCredit *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_YOUTUBE_CREDIT, GDataYouTubeCreditPrivate);
+}
+
+static void
+gdata_youtube_credit_finalize (GObject *object)
+{
+ GDataYouTubeCreditPrivate *priv = GDATA_YOUTUBE_CREDIT (object)->priv;
+
+ g_free (priv->entity_type);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_youtube_credit_parent_class)->finalize (object);
+}
+
+static void
+gdata_youtube_credit_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataYouTubeCreditPrivate *priv = GDATA_YOUTUBE_CREDIT (object)->priv;
+
+ switch (property_id) {
+ case PROP_ENTITY_TYPE:
+ g_value_set_string (value, priv->entity_type);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
+{
+ /* Chain up to the parent class */
+ GDATA_PARSABLE_CLASS (gdata_youtube_credit_parent_class)->pre_parse_xml (parsable, doc, root_node, user_data, error);
+
+ GDATA_YOUTUBE_CREDIT (parsable)->priv->entity_type = (gchar*) xmlGetProp (root_node, (xmlChar*) "type");
+
+ return TRUE;
+}
+
+static void
+pre_get_xml (GDataParsable *parsable, GString *xml_string)
+{
+ GDataYouTubeCreditPrivate *priv = GDATA_YOUTUBE_CREDIT (parsable)->priv;
+
+ /* Chain up to the parent class */
+ GDATA_PARSABLE_CLASS (gdata_youtube_credit_parent_class)->pre_get_xml (parsable, xml_string);
+
+ if (priv->entity_type != NULL)
+ gdata_parser_string_append_escaped (xml_string, " type='", priv->entity_type, "'");
+}
+
+static void
+get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
+{
+ /* Chain up to the parent class */
+ GDATA_PARSABLE_CLASS (gdata_youtube_credit_parent_class)->get_namespaces (parsable, namespaces);
+
+ g_hash_table_insert (namespaces, (gchar*) "youtube", (gchar*) "http://gdata.youtube.com/schemas/2007");
+}
+
+/**
+ * gdata_youtube_credit_get_entity_type:
+ * @self: a #GDataYouTubeCredit
+ *
+ * Gets the #GDataYouTubeCredit:entity-type property.
+ *
+ * Return value: the type of the credited user (e.g. %GDATA_YOUTUBE_CREDIT_ENTITY_PARTNER), or %NULL
+ *
+ * Since: 0.4.0
+ * Deprecated: 0.17.0: This is no longer supported by Google. There is no
+ * replacement.
+ */
+const gchar *
+gdata_youtube_credit_get_entity_type (GDataYouTubeCredit *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_CREDIT (self), NULL);
+ return self->priv->entity_type;
+}
+
+G_GNUC_END_IGNORE_DEPRECATIONS
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010, 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_YOUTUBE_CREDIT_H
+#define GDATA_YOUTUBE_CREDIT_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+#include <gdata/media/gdata-media-credit.h>
+
+G_BEGIN_DECLS
+
+#ifndef LIBGDATA_DISABLE_DEPRECATED
+
+/**
+ * GDATA_YOUTUBE_CREDIT_ENTITY_PARTNER:
+ *
+ * The credited entity is a YouTube partner.
+ *
+ * Since: 0.7.0
+ * Deprecated: 0.17.0: This is no longer supported by Google. There is no
+ * replacement.
+ */
+#define GDATA_YOUTUBE_CREDIT_ENTITY_PARTNER "partner"
+
+#define GDATA_TYPE_YOUTUBE_CREDIT (gdata_youtube_credit_get_type ())
+#define GDATA_YOUTUBE_CREDIT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_YOUTUBE_CREDIT, GDataYouTubeCredit))
+#define GDATA_YOUTUBE_CREDIT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_YOUTUBE_CREDIT, GDataYouTubeCreditClass))
+#define GDATA_IS_YOUTUBE_CREDIT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_YOUTUBE_CREDIT))
+#define GDATA_IS_YOUTUBE_CREDIT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_YOUTUBE_CREDIT))
+#define GDATA_YOUTUBE_CREDIT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_YOUTUBE_CREDIT, GDataYouTubeCreditClass))
+
+typedef struct _GDataYouTubeCreditPrivate GDataYouTubeCreditPrivate G_GNUC_DEPRECATED;
+
+/**
+ * GDataYouTubeCredit:
+ *
+ * All the fields in the #GDataYouTubeCredit structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ * Deprecated: 0.17.0: This is no longer supported by Google. There is no
+ * replacement.
+ */
+typedef struct {
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ GDataMediaCredit parent;
+ GDataYouTubeCreditPrivate *priv;
+ G_GNUC_END_IGNORE_DEPRECATIONS
+} GDataYouTubeCredit;
+
+/**
+ * GDataYouTubeCreditClass:
+ *
+ * All the fields in the #GDataYouTubeCreditClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ * Deprecated: 0.17.0: This is no longer supported by Google. There is no
+ * replacement.
+ */
+typedef struct {
+ /*< private >*/
+ GDataMediaCreditClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataYouTubeCreditClass;
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+GType gdata_youtube_credit_get_type (void) G_GNUC_CONST G_GNUC_DEPRECATED;
+const gchar *gdata_youtube_credit_get_entity_type (GDataYouTubeCredit *self) G_GNUC_PURE G_GNUC_DEPRECATED;
+G_GNUC_END_IGNORE_DEPRECATIONS
+
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
+
+G_END_DECLS
+
+#endif /* !GDATA_YOUTUBE_CREDIT_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-youtube-feed
+ * @short_description: GData YouTube feed object
+ * @stability: Stable
+ * @include: gdata/services/youtube/gdata-youtube-feed.h
+ *
+ * #GDataYouTubeFeed is a list of entries (#GDataYouTubeVideo subclasses)
+ * returned as the result of a query to a #GDataYouTubeService, or given as the
+ * input to another operation on the online service.
+ *
+ * Each #GDataYouTubeVideo represents a single video on YouTube, and the
+ * #GDataYouTubeFeed represents a collection of those objects.
+ *
+ * Since: 0.17.0
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+
+#include "gdata-youtube-feed.h"
+#include "gdata-youtube-video.h"
+#include "gdata-types.h"
+#include "gdata-private.h"
+#include "gdata-service.h"
+
+static gboolean
+parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data,
+ GError **error);
+
+G_DEFINE_TYPE (GDataYouTubeFeed, gdata_youtube_feed, GDATA_TYPE_FEED)
+
+static void
+gdata_youtube_feed_class_init (GDataYouTubeFeedClass *klass)
+{
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+ parsable_class->parse_json = parse_json;
+}
+
+static void
+gdata_youtube_feed_init (GDataYouTubeFeed *self)
+{
+ /* Move along now. */
+}
+
+static gboolean
+parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data,
+ GError **error)
+{
+ if (g_strcmp0 (json_reader_get_member_name (reader), "pageInfo") == 0) {
+ guint total_results, items_per_page;
+ const GError *child_error = NULL;
+
+ /* Check this is an object. */
+ if (!json_reader_is_object (reader)) {
+ return gdata_parser_error_required_json_content_missing (reader, error);
+ }
+
+ /* https://developers.google.com/youtube/v3/docs/playlists/list/ */
+ json_reader_read_member (reader, "totalResults");
+ total_results = json_reader_get_int_value (reader);
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "resultsPerPage");
+ items_per_page = json_reader_get_int_value (reader);
+ json_reader_end_member (reader);
+
+ child_error = json_reader_get_error (reader);
+ if (child_error != NULL) {
+ return gdata_parser_error_from_json_error (reader,
+ child_error,
+ error);
+ }
+
+ _gdata_feed_set_page_info (GDATA_FEED (parsable), total_results,
+ items_per_page);
+
+ return TRUE;
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_youtube_feed_parent_class)->parse_json (parsable, reader, user_data, error);
+ }
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_YOUTUBE_FEED_H
+#define GDATA_YOUTUBE_FEED_H
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gdata/gdata-feed.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_YOUTUBE_FEED (gdata_youtube_feed_get_type ())
+#define GDATA_YOUTUBE_FEED(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_YOUTUBE_FEED, GDataYouTubeFeed))
+#define GDATA_YOUTUBE_FEED_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_YOUTUBE_FEED, GDataYouTubeFeedClass))
+#define GDATA_IS_YOUTUBE_FEED(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_YOUTUBE_FEED))
+#define GDATA_IS_YOUTUBE_FEED_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_YOUTUBE_FEED))
+#define GDATA_YOUTUBE_FEED_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_YOUTUBE_FEED, GDataYouTubeFeedClass))
+
+typedef struct _GDataYouTubeFeedPrivate GDataYouTubeFeedPrivate;
+
+/**
+ * GDataYouTubeFeed:
+ *
+ * All the fields in the #GDataYouTubeFeed structure are private and should
+ * never be accessed directly.
+ *
+ * Since: 0.17.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataFeed parent;
+ GDataYouTubeFeedPrivate *priv;
+} GDataYouTubeFeed;
+
+/**
+ * GDataYouTubeFeedClass:
+ *
+ * All the fields in the #GDataYouTubeFeedClass structure are private and should
+ * never be accessed directly.
+ *
+ * Since: 0.17.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataFeedClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataYouTubeFeedClass;
+
+GType gdata_youtube_feed_get_type (void) G_GNUC_CONST;
+
+G_END_DECLS
+
+#endif /* !GDATA_YOUTUBE_FEED_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-youtube-query
+ * @short_description: GData YouTube query object
+ * @stability: Stable
+ * @include: gdata/services/youtube/gdata-youtube-query.h
+ *
+ * #GDataYouTubeQuery represents a collection of query parameters specific to the YouTube service, which go above and beyond
+ * those catered for by #GDataQuery.
+ *
+ * With the transition to version 3 of the YouTube, the #GDataQuery:author and
+ * #GDataQuery:start-index properties are no longer supported, and their values
+ * will be ignored. Use gdata_query_next_page() instead of the
+ * #GDataQuery:start-index API.
+ *
+ * For more information on the custom GData query parameters supported by #GDataYouTubeQuery, see the <ulink type="http"
+ * url="https://developers.google.com/youtube/v3/docs/search/list#parameters">online documentation</ulink>.
+ *
+ * Since: 0.3.0
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <string.h>
+
+#include "gdata-youtube-query.h"
+#include "gdata-query.h"
+#include "gdata-youtube-content.h"
+#include "gdata-private.h"
+
+static void gdata_youtube_query_finalize (GObject *object);
+static void gdata_youtube_query_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_youtube_query_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void get_query_uri (GDataQuery *self, const gchar *feed_uri, GString *query_uri, gboolean *params_started);
+
+struct _GDataYouTubeQueryPrivate {
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ GDataYouTubeFormat format;
+ GDataYouTubeSortOrder sort_order;
+ GDataYouTubeUploader uploader;
+ G_GNUC_END_IGNORE_DEPRECATIONS
+
+ gdouble latitude;
+ gdouble longitude;
+ gdouble location_radius;
+ gboolean has_location;
+ gchar *language;
+ gchar *order_by;
+ gchar *restriction;
+ GDataYouTubeSafeSearch safe_search;
+ GDataYouTubeAge age;
+ gchar *license;
+};
+
+enum {
+ PROP_FORMAT = 1,
+ PROP_LATITUDE,
+ PROP_LONGITUDE,
+ PROP_LOCATION_RADIUS,
+ PROP_HAS_LOCATION,
+ PROP_LANGUAGE,
+ PROP_ORDER_BY,
+ PROP_RESTRICTION,
+ PROP_SAFE_SEARCH,
+ PROP_SORT_ORDER,
+ PROP_AGE,
+ PROP_UPLOADER,
+ PROP_LICENSE,
+};
+
+G_DEFINE_TYPE (GDataYouTubeQuery, gdata_youtube_query, GDATA_TYPE_QUERY)
+
+static void
+gdata_youtube_query_class_init (GDataYouTubeQueryClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataQueryClass *query_class = GDATA_QUERY_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataYouTubeQueryPrivate));
+
+ gobject_class->set_property = gdata_youtube_query_set_property;
+ gobject_class->get_property = gdata_youtube_query_get_property;
+ gobject_class->finalize = gdata_youtube_query_finalize;
+
+ query_class->get_query_uri = get_query_uri;
+
+ /**
+ * GDataYouTubeQuery:format:
+ *
+ * Specifies that videos must be available in a particular video format. Use %GDATA_YOUTUBE_FORMAT_UNKNOWN to
+ * retrieve videos irrespective of their format availability.
+ *
+ * Since: 0.3.0
+ * Deprecated: 0.17.0: No longer supported by Google. The value of
+ * this property will be unused in queries. There is no replacement.
+ */
+ g_object_class_install_property (gobject_class, PROP_FORMAT,
+ g_param_spec_enum ("format",
+ "Format", "Specifies that videos must be available in a particular video format.",
+ GDATA_TYPE_YOUTUBE_FORMAT, GDATA_YOUTUBE_FORMAT_UNKNOWN,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+ G_PARAM_DEPRECATED));
+
+ /**
+ * GDataYouTubeQuery:latitude:
+ *
+ * The latitude of a particular location of which videos should be found. This should be used in conjunction with
+ * #GDataYouTubeQuery:longitude; if either property is outside the valid range, neither will be used. Valid latitudes
+ * are between <code class="literal">-90</code> and <code class="literal">90</code>0 degrees; any values of this property outside that range
+ * will unset the property in the query URI.
+ *
+ * If #GDataYouTubeQuery:location-radius is a non-<code class="literal">0</code> value, this will define a circle from which videos should be
+ * found.
+ *
+ * As it is deprecated, the value of #GDataYouTubeQuery:has-location is
+ * ignored.
+ *
+ * For more information, see the <ulink type="http"
+ * url="https://developers.google.com/youtube/v3/docs/search/list#location">online documentation</ulink>.
+ *
+ * Since: 0.3.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LATITUDE,
+ g_param_spec_double ("latitude",
+ "Latitude", "The latitude of a particular location of which videos should be found.",
+ -G_MAXDOUBLE, G_MAXDOUBLE, G_MAXDOUBLE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeQuery:longitude:
+ *
+ * The longitude of a particular location of which videos should be found. This should be used in conjunction with
+ * #GDataYouTubeQuery:latitude; if either property is outside the valid range, neither will be used. Valid longitudes
+ * are between <code class="literal">-180</code> and <code class="literal">180</code> degrees; any values of this property outside that
+ * range will unset the property in the query URI.
+ *
+ * For more information, see the documentation for #GDataYouTubeQuery:latitude.
+ *
+ * Since: 0.3.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LONGITUDE,
+ g_param_spec_double ("longitude",
+ "Longitude", "The longitude of a particular location of which videos should be found.",
+ -G_MAXDOUBLE, G_MAXDOUBLE, G_MAXDOUBLE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeQuery:location-radius:
+ *
+ * The radius, in metres, of a circle from within which videos should be returned. The circle is centred on the latitude and
+ * longitude given in #GDataYouTubeQuery:latitude and #GDataYouTubeQuery:longitude.
+ *
+ * Set this property to <code class="literal">0</code> to search for specific coordinates, rather than within a given radius.
+ *
+ * For more information, see the documentation for #GDataYouTubeQuery:latitude.
+ *
+ * Since: 0.3.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LOCATION_RADIUS,
+ g_param_spec_double ("location-radius",
+ "Location radius", "The radius, in metres, of a circle to search within.",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeQuery:has-location:
+ *
+ * Whether to restrict search results to videos with specific coordinates associated with them. If used with a given
+ * #GDataYouTubeQuery:latitude and #GDataYouTubeQuery:longitude, only videos with specific coordinates (not those with merely
+ * a descriptive address) will be returned. If used without a latitude and longitude set, only videos with specific coordinates
+ * (regardless of those coordinates) will be returned.
+ *
+ * For more information, see the documentation for #GDataYouTubeQuery:latitude.
+ *
+ * Since: 0.3.0
+ * Deprecated: 0.17.0: No longer supported by Google. The value of
+ * this property will be unused in queries.
+ */
+ g_object_class_install_property (gobject_class, PROP_HAS_LOCATION,
+ g_param_spec_boolean ("has-location",
+ "Has location?", "Whether to restrict results to videos with specific coordinates.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+ G_PARAM_DEPRECATED));
+
+ /**
+ * GDataYouTubeQuery:language:
+ *
+ * Restricts the search to videos that have a title, description or keywords in a specified language. The language code should
+ * be a two-letter ISO 639-1 code; or you can use <literal>zh-Hans</literal> for simplified Chinese and <literal>zh-Hant</literal>
+ * for traditional Chinese.
+ *
+ * For more information, see the <ulink type="http"
+ * url="http://code.google.com/apis/youtube/2.0/reference.html#lrsp">online documentation</ulink>.
+ *
+ * Since: 0.3.0
+ * Deprecated: 0.17.0: No longer supported by Google. The value of
+ * this property will be unused in queries. There is no replacement.
+ */
+ g_object_class_install_property (gobject_class, PROP_LANGUAGE,
+ g_param_spec_string ("language",
+ "Language", "Restricts the search to videos described in the given language.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+ G_PARAM_DEPRECATED));
+
+ /**
+ * GDataYouTubeQuery:order-by:
+ *
+ * Specifies the order of entries in a feed. Supported values are <literal>relevance</literal>,
+ * <literal>published</literal>, <literal>viewCount</literal> and <literal>rating</literal>.
+ *
+ * Additionally, results most relevant to a specific language can be returned by setting the property
+ * to <literal>relevance_lang_<replaceable>languageCode</replaceable></literal>, where
+ * <replaceable>languageCode</replaceable> is an ISO 639-1 language code, as used in #GDataYouTubeQuery:language.
+ *
+ * For more information, see the <ulink type="http"
+ * url="https://developers.google.com/youtube/v3/docs/search/list#order">online documentation</ulink>.
+ *
+ * Since: 0.3.0
+ */
+ g_object_class_install_property (gobject_class, PROP_ORDER_BY,
+ g_param_spec_string ("order-by",
+ "Order by", "Specifies the order of entries in a feed.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeQuery:restriction:
+ *
+ * An ISO 3166 two-letter country code that should be used to filter
+ * videos playable only in specific countries.
+ *
+ * Previously, this property could also accept the client’s IP address
+ * for country lookup. This feature is no longer supported by Google,
+ * and will result in an error from the server if used. Use a country
+ * code instead.
+ *
+ * For more information, see the <ulink type="http"
+ * url="https://developers.google.com/youtube/v3/docs/search/list#regionCode">online documentation</ulink>.
+ *
+ * Since: 0.3.0
+ */
+ g_object_class_install_property (gobject_class, PROP_RESTRICTION,
+ g_param_spec_string ("restriction",
+ "Restriction", "The country code to filter videos playable only in specific countries.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeQuery:safe-search:
+ *
+ * Whether the search results should include restricted content as well as standard content.
+ *
+ * For more information, see the <ulink type="http"
+ * url="https://developers.google.com/youtube/v3/docs/search/list#safeSearch">online documentation</ulink>.
+ *
+ * Since: 0.3.0
+ */
+ g_object_class_install_property (gobject_class, PROP_SAFE_SEARCH,
+ g_param_spec_enum ("safe-search",
+ "Safe search", "Whether the search results should include restricted content.",
+ GDATA_TYPE_YOUTUBE_SAFE_SEARCH, GDATA_YOUTUBE_SAFE_SEARCH_MODERATE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeQuery:sort-order:
+ *
+ * Specifies the direction of sorting. To use the default sort order, set the property to %GDATA_YOUTUBE_SORT_NONE.
+ *
+ * Since: 0.3.0
+ * Deprecated: 0.17.0: No longer supported by Google. The value of
+ * this property will be unused in queries. There is no replacement.
+ */
+ g_object_class_install_property (gobject_class, PROP_SORT_ORDER,
+ g_param_spec_enum ("sort-order",
+ "Sort order", "Specifies the direction of sorting.",
+ GDATA_TYPE_YOUTUBE_SORT_ORDER, GDATA_YOUTUBE_SORT_NONE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+ G_PARAM_DEPRECATED));
+
+ /**
+ * GDataYouTubeQuery:age:
+ *
+ * Restricts the search to videos uploaded within the specified time period. To retrieve videos irrespective of their
+ * age, set the property to %GDATA_YOUTUBE_AGE_ALL_TIME.
+ *
+ * Since: 0.3.0
+ */
+ g_object_class_install_property (gobject_class, PROP_AGE,
+ g_param_spec_enum ("age",
+ "Age", "Restricts the search to videos uploaded within the specified time period.",
+ GDATA_TYPE_YOUTUBE_AGE, GDATA_YOUTUBE_AGE_ALL_TIME,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeQuery:uploader:
+ *
+ * Restricts the search to videos from the specified type of uploader. Currently, this can only be used to restrict
+ * searches to videos from YouTube partners.
+ *
+ * Since: 0.3.0
+ * Deprecated: 0.17.0: No longer supported by Google. The value of
+ * this property will be unused in queries. There is no replacement.
+ */
+ g_object_class_install_property (gobject_class, PROP_UPLOADER,
+ g_param_spec_enum ("uploader",
+ "Uploader", "Restricts the search to videos from the specified type of uploader.",
+ GDATA_TYPE_YOUTUBE_UPLOADER, GDATA_YOUTUBE_UPLOADER_ALL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+ G_PARAM_DEPRECATED));
+
+ /**
+ * GDataYouTubeQuery:license:
+ *
+ * The content license which should be used to filter search results. If set to, for example, %GDATA_YOUTUBE_LICENSE_CC, only videos which
+ * are Creative Commons licensed will be returned in search results. Set this to %NULL to return videos under any license.
+ *
+ * For more information, see the <ulink type="http"
+ * url="https://developers.google.com/youtube/v3/docs/search/list#videoLicense">online documentation</ulink>.
+ *
+ * Since: 0.11.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LICENSE,
+ g_param_spec_string ("license",
+ "License", "The content license which should be used to filter search results.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+}
+
+static void
+gdata_youtube_query_init (GDataYouTubeQuery *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_YOUTUBE_QUERY, GDataYouTubeQueryPrivate);
+
+ self->priv->latitude = G_MAXDOUBLE;
+ self->priv->longitude = G_MAXDOUBLE;
+
+ /* https://developers.google.com/youtube/v3/docs/search/list#pageToken */
+ _gdata_query_set_pagination_type (GDATA_QUERY (self),
+ GDATA_QUERY_PAGINATION_TOKENS);
+}
+
+static void
+gdata_youtube_query_finalize (GObject *object)
+{
+ GDataYouTubeQueryPrivate *priv = GDATA_YOUTUBE_QUERY (object)->priv;
+
+ g_free (priv->language);
+ g_free (priv->order_by);
+ g_free (priv->restriction);
+ g_free (priv->license);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_youtube_query_parent_class)->finalize (object);
+}
+
+static void
+gdata_youtube_query_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataYouTubeQueryPrivate *priv = GDATA_YOUTUBE_QUERY (object)->priv;
+
+ switch (property_id) {
+ case PROP_FORMAT:
+ g_value_set_enum (value, priv->format);
+ break;
+ case PROP_LATITUDE:
+ g_value_set_double (value, priv->latitude);
+ break;
+ case PROP_LONGITUDE:
+ g_value_set_double (value, priv->longitude);
+ break;
+ case PROP_LOCATION_RADIUS:
+ g_value_set_double (value, priv->location_radius);
+ break;
+ case PROP_HAS_LOCATION:
+ g_value_set_boolean (value, priv->has_location);
+ break;
+ case PROP_LANGUAGE:
+ g_value_set_string (value, priv->language);
+ break;
+ case PROP_ORDER_BY:
+ g_value_set_string (value, priv->order_by);
+ break;
+ case PROP_RESTRICTION:
+ g_value_set_string (value, priv->restriction);
+ break;
+ case PROP_SAFE_SEARCH:
+ g_value_set_enum (value, priv->safe_search);
+ break;
+ case PROP_SORT_ORDER:
+ g_value_set_enum (value, priv->sort_order);
+ break;
+ case PROP_AGE:
+ g_value_set_enum (value, priv->age);
+ break;
+ case PROP_UPLOADER:
+ g_value_set_enum (value, priv->uploader);
+ break;
+ case PROP_LICENSE:
+ g_value_set_string (value, priv->license);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_youtube_query_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataYouTubeQuery *self = GDATA_YOUTUBE_QUERY (object);
+
+ switch (property_id) {
+ case PROP_FORMAT:
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ gdata_youtube_query_set_format (self, g_value_get_enum (value));
+ G_GNUC_END_IGNORE_DEPRECATIONS
+ break;
+ case PROP_LATITUDE:
+ self->priv->latitude = g_value_get_double (value);
+ break;
+ case PROP_LONGITUDE:
+ self->priv->longitude = g_value_get_double (value);
+ break;
+ case PROP_LOCATION_RADIUS:
+ self->priv->location_radius = g_value_get_double (value);
+ break;
+ case PROP_HAS_LOCATION:
+ self->priv->has_location = g_value_get_boolean (value);
+ break;
+ case PROP_LANGUAGE:
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ gdata_youtube_query_set_language (self, g_value_get_string (value));
+ G_GNUC_END_IGNORE_DEPRECATIONS
+ break;
+ case PROP_ORDER_BY:
+ gdata_youtube_query_set_order_by (self, g_value_get_string (value));
+ break;
+ case PROP_RESTRICTION:
+ gdata_youtube_query_set_restriction (self, g_value_get_string (value));
+ break;
+ case PROP_SAFE_SEARCH:
+ gdata_youtube_query_set_safe_search (self, g_value_get_enum (value));
+ break;
+ case PROP_SORT_ORDER:
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ gdata_youtube_query_set_sort_order (self, g_value_get_enum (value));
+ G_GNUC_END_IGNORE_DEPRECATIONS
+ break;
+ case PROP_AGE:
+ gdata_youtube_query_set_age (self, g_value_get_enum (value));
+ break;
+ case PROP_UPLOADER:
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ gdata_youtube_query_set_uploader (self, g_value_get_enum (value));
+ G_GNUC_END_IGNORE_DEPRECATIONS
+ break;
+ case PROP_LICENSE:
+ gdata_youtube_query_set_license (self, g_value_get_string (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+/* Convert from a v2 order-by parameter value to a v3 order parameter value.
+ * Reference:
+ * v2: https://developers.google.com/youtube/2.0/developers_guide_protocol_api_query_parameters#orderbysp
+ * v3: https://developers.google.com/youtube/v3/docs/search/list#order
+ */
+static const gchar *
+get_v3_order (const gchar *v2_order_by)
+{
+ const struct {
+ const gchar *v2_order_by;
+ const gchar *v3_order;
+ } mapping[] = {
+ { "relevance", "relevance" },
+ { "published", "date" },
+ { "viewCount", "viewCount" },
+ { "rating", "rating" },
+ };
+ guint i;
+
+ for (i = 0; i < G_N_ELEMENTS (mapping); i++) {
+ if (g_strcmp0 (v2_order_by, mapping[i].v2_order_by) == 0) {
+ return mapping[i].v3_order;
+ }
+ }
+
+ /* Special case for ‘relevance_lang_*’. */
+ if (g_str_has_prefix (v2_order_by, "relevance_lang_")) {
+ return "relevance";
+ }
+
+ return NULL;
+}
+
+/* Convert from a v2 license parameter value to a v3 videoLicense parameter
+ * value. Reference:
+ * v2: https://developers.google.com/youtube/2.0/developers_guide_protocol_api_query_parameters#licensesp
+ * v3: https://developers.google.com/youtube/v3/docs/search/list#videoLicense
+ */
+static const gchar *
+get_v3_video_license (const gchar *v2_license)
+{
+ if (g_strcmp0 (v2_license, "cc") == 0) {
+ return "creativeCommon";
+ } else if (g_strcmp0 (v2_license, "youtube") == 0) {
+ return "youtube";
+ } else {
+ return NULL;
+ }
+}
+
+static void
+get_query_uri (GDataQuery *self, const gchar *feed_uri, GString *query_uri, gboolean *params_started)
+{
+ GDataYouTubeQueryPrivate *priv = GDATA_YOUTUBE_QUERY (self)->priv;
+
+ #define APPEND_SEP g_string_append_c (query_uri, (*params_started == FALSE) ? '?' : '&'); *params_started = TRUE;
+
+ /* NOTE: We do not chain up because the parent class implements a lot
+ * of deprecated API. */
+
+ /* Categories */
+ if (gdata_query_get_categories (self) != NULL) {
+ APPEND_SEP
+ g_string_append (query_uri, "videoCategoryId=");
+ g_string_append_uri_escaped (query_uri,
+ gdata_query_get_categories (self),
+ NULL,
+ FALSE);
+ }
+
+ /* q param */
+ if (gdata_query_get_q (self) != NULL) {
+ APPEND_SEP
+ g_string_append (query_uri, "q=");
+ g_string_append_uri_escaped (query_uri,
+ gdata_query_get_q (self), NULL,
+ FALSE);
+ }
+
+ if (gdata_query_get_max_results (self) > 0) {
+ APPEND_SEP
+ g_string_append_printf (query_uri, "maxResults=%u",
+ gdata_query_get_max_results (self));
+ }
+
+ if (priv->age != GDATA_YOUTUBE_AGE_ALL_TIME) {
+ gchar *after;
+ GTimeVal tv = { 0, };
+
+ g_get_current_time (&tv);
+
+ /* Squash the microseconds; they’re not useful. */
+ tv.tv_usec = 0;
+
+ switch (priv->age) {
+ case GDATA_YOUTUBE_AGE_TODAY:
+ tv.tv_sec -= 24 * 60 * 60;
+ break;
+ case GDATA_YOUTUBE_AGE_THIS_WEEK:
+ tv.tv_sec -= 7 * 24 * 60 * 60;
+ break;
+ case GDATA_YOUTUBE_AGE_THIS_MONTH:
+ tv.tv_sec -= 31 * 24 * 60 * 60;
+ break;
+ case GDATA_YOUTUBE_AGE_ALL_TIME:
+ default:
+ g_assert_not_reached ();
+ }
+
+ APPEND_SEP
+
+ after = g_time_val_to_iso8601 (&tv);
+ g_string_append_printf (query_uri, "publishedAfter=%s", after);
+ g_free (after);
+ }
+
+ /* We don’t need to use APPEND_SEP below here, as this parameter is
+ * always included */
+ APPEND_SEP
+ switch (priv->safe_search) {
+ case GDATA_YOUTUBE_SAFE_SEARCH_NONE:
+ g_string_append (query_uri, "safeSearch=none");
+ break;
+ case GDATA_YOUTUBE_SAFE_SEARCH_MODERATE:
+ g_string_append (query_uri, "safeSearch=moderate");
+ break;
+ case GDATA_YOUTUBE_SAFE_SEARCH_STRICT:
+ g_string_append (query_uri, "safeSearch=strict");
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ if (priv->latitude >= -90.0 && priv->latitude <= 90.0 &&
+ priv->longitude >= -180.0 && priv->longitude <= 180.0) {
+ gchar latitude[G_ASCII_DTOSTR_BUF_SIZE];
+ gchar longitude[G_ASCII_DTOSTR_BUF_SIZE];
+
+ g_string_append_printf (query_uri, "&location=%s,%s",
+ g_ascii_dtostr (latitude,
+ sizeof (latitude),
+ priv->latitude),
+ g_ascii_dtostr (longitude,
+ sizeof (longitude),
+ priv->longitude));
+
+ if (priv->location_radius >= 0.0) {
+ gchar radius[G_ASCII_DTOSTR_BUF_SIZE];
+ g_string_append_printf (query_uri, "&locationRadius=%sm",
+ g_ascii_dtostr (radius,
+ sizeof (radius),
+ priv->location_radius));
+ }
+ }
+
+ if (priv->order_by != NULL) {
+ const gchar *v3_order_by = get_v3_order (priv->order_by);
+
+ if (v3_order_by != NULL) {
+ g_string_append (query_uri, "&order=");
+ g_string_append_uri_escaped (query_uri, v3_order_by,
+ NULL, FALSE);
+ }
+ }
+
+ if (priv->restriction != NULL) {
+ g_string_append (query_uri, "®ionCode=");
+ g_string_append_uri_escaped (query_uri, priv->restriction, NULL, FALSE);
+ }
+
+ if (priv->license != NULL) {
+ const gchar *v3_video_license;
+
+ v3_video_license = get_v3_video_license (priv->license);
+
+ if (v3_video_license != NULL) {
+ g_string_append (query_uri, "&videoLicense=");
+ g_string_append_uri_escaped (query_uri,
+ v3_video_license, NULL,
+ FALSE);
+ }
+ }
+}
+
+/**
+ * gdata_youtube_query_new:
+ * @q: (allow-none): a query string, or %NULL
+ *
+ * Creates a new #GDataYouTubeQuery with its #GDataQuery:q property set to @q.
+ *
+ * Return value: a new #GDataYouTubeQuery
+ *
+ * Since: 0.3.0
+ */
+GDataYouTubeQuery *
+gdata_youtube_query_new (const gchar *q)
+{
+ return g_object_new (GDATA_TYPE_YOUTUBE_QUERY, "q", q, NULL);
+}
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
+/**
+ * gdata_youtube_query_get_format:
+ * @self: a #GDataYouTubeQuery
+ *
+ * Gets the #GDataYouTubeQuery:format property.
+ *
+ * Return value: the format property
+ *
+ * Since: 0.3.0
+ * Deprecated: 0.17.0: No longer supported by Google. The value of
+ * this property will be unused in queries. There is no replacement.
+ */
+GDataYouTubeFormat
+gdata_youtube_query_get_format (GDataYouTubeQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_QUERY (self), GDATA_YOUTUBE_FORMAT_UNKNOWN);
+ return self->priv->format;
+}
+
+/**
+ * gdata_youtube_query_set_format:
+ * @self: a #GDataYouTubeQuery
+ * @format: the requested video format
+ *
+ * Sets the #GDataYouTubeQuery:format property of the #GDataYouTubeQuery to @format.
+ *
+ * Since: 0.3.0
+ * Deprecated: 0.17.0: No longer supported by Google. The value of
+ * this property will be unused in queries. There is no replacement.
+ */
+void
+gdata_youtube_query_set_format (GDataYouTubeQuery *self, GDataYouTubeFormat format)
+{
+ g_return_if_fail (GDATA_IS_YOUTUBE_QUERY (self));
+ self->priv->format = format;
+ g_object_notify (G_OBJECT (self), "format");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+G_GNUC_END_IGNORE_DEPRECATIONS
+
+/**
+ * gdata_youtube_query_get_location:
+ * @self: a #GDataYouTubeQuery
+ * @latitude: (out caller-allocates) (allow-none): a location in which to return the latitude, or %NULL
+ * @longitude: (out caller-allocates) (allow-none): a location in which to return the longitude, or %NULL
+ * @radius: (out caller-allocates) (allow-none): a location in which to return the location radius, or %NULL
+ * @has_location: (out caller-allocates) (allow-none): a location in which to return %TRUE if the query is searching for videos with a specific
+ * location, %FALSE otherwise, or %NULL
+ *
+ * Gets the location-based properties of the #GDataYouTubeQuery<!-- -->: #GDataYouTubeQuery:latitude, #GDataYouTubeQuery:longitude,
+ * #GDataYouTubeQuery:location-radius and #GDataYouTubeQuery:has-location.
+ *
+ * Since: 0.3.0
+ */
+void
+gdata_youtube_query_get_location (GDataYouTubeQuery *self, gdouble *latitude, gdouble *longitude, gdouble *radius, gboolean *has_location)
+{
+ g_return_if_fail (GDATA_IS_YOUTUBE_QUERY (self));
+
+ if (latitude != NULL)
+ *latitude = self->priv->latitude;
+ if (longitude != NULL)
+ *longitude = self->priv->longitude;
+ if (radius != NULL)
+ *radius = self->priv->location_radius;
+ if (has_location != NULL)
+ *has_location = self->priv->has_location;
+}
+
+/**
+ * gdata_youtube_query_set_location:
+ * @self: a #GDataYouTubeQuery
+ * @latitude: the new latitude, or %G_MAXDOUBLE
+ * @longitude: the new longitude, or %G_MAXDOUBLE
+ * @radius: the new location radius, or <code class="literal">0</code>
+ * @has_location: %TRUE if the query is for videos with a specific location, %FALSE otherwise
+ *
+ * Sets the location-based properties of the #GDataYouTubeQuery<!-- -->: #GDataYouTubeQuery:latitude, #GDataYouTubeQuery:longitude,
+ * #GDataYouTubeQuery:location-radius and #GDataYouTubeQuery:has-location.
+ *
+ * Since: 0.3.0
+ */
+void
+gdata_youtube_query_set_location (GDataYouTubeQuery *self, gdouble latitude, gdouble longitude, gdouble radius, gboolean has_location)
+{
+ g_return_if_fail (GDATA_IS_YOUTUBE_QUERY (self));
+
+ self->priv->latitude = latitude;
+ self->priv->longitude = longitude;
+ self->priv->location_radius = radius;
+ self->priv->has_location = has_location;
+
+ g_object_freeze_notify (G_OBJECT (self));
+ g_object_notify (G_OBJECT (self), "latitude");
+ g_object_notify (G_OBJECT (self), "longitude");
+ g_object_notify (G_OBJECT (self), "location-radius");
+ g_object_notify (G_OBJECT (self), "has-location");
+ g_object_thaw_notify (G_OBJECT (self));
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_youtube_query_get_language:
+ * @self: a #GDataYouTubeQuery
+ *
+ * Gets the #GDataYouTubeQuery:language property.
+ *
+ * Return value: the language property, or %NULL if it is unset
+ *
+ * Since: 0.3.0
+ * Deprecated: 0.17.0: No longer supported by Google. The value of
+ * this property will be unused in queries. There is no replacement.
+ */
+const gchar *
+gdata_youtube_query_get_language (GDataYouTubeQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_QUERY (self), NULL);
+ return self->priv->language;
+}
+
+/**
+ * gdata_youtube_query_set_language:
+ * @self: a #GDataYouTubeQuery
+ * @language: (allow-none): a new language name, or %NULL
+ *
+ * Sets the #GDataYouTubeQuery:language property of the #GDataYouTubeQuery to the new language, @language.
+ *
+ * Set @language to %NULL to unset the property in the query URI.
+ *
+ * Since: 0.3.0
+ * Deprecated: 0.17.0: No longer supported by Google. The value of
+ * this property will be unused in queries. There is no replacement.
+ */
+void
+gdata_youtube_query_set_language (GDataYouTubeQuery *self, const gchar *language)
+{
+ g_return_if_fail (GDATA_IS_YOUTUBE_QUERY (self));
+ g_free (self->priv->language);
+ self->priv->language = g_strdup (language);
+ g_object_notify (G_OBJECT (self), "language");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_youtube_query_get_order_by:
+ * @self: a #GDataYouTubeQuery
+ *
+ * Gets the #GDataYouTubeQuery:order-by property.
+ *
+ * Return value: the order by property, or %NULL if it is unset
+ *
+ * Since: 0.3.0
+ */
+const gchar *
+gdata_youtube_query_get_order_by (GDataYouTubeQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_QUERY (self), NULL);
+ return self->priv->order_by;
+}
+
+/**
+ * gdata_youtube_query_set_order_by:
+ * @self: a #GDataYouTubeQuery
+ * @order_by: (allow-none): a new order by string, or %NULL
+ *
+ * Sets the #GDataYouTubeQuery:order-by property of the #GDataYouTubeQuery to the new order by string, @order_by.
+ *
+ * Set @order_by to %NULL to unset the property in the query URI.
+ *
+ * Since: 0.3.0
+ */
+void
+gdata_youtube_query_set_order_by (GDataYouTubeQuery *self, const gchar *order_by)
+{
+ g_return_if_fail (GDATA_IS_YOUTUBE_QUERY (self));
+
+ g_free (self->priv->order_by);
+ self->priv->order_by = g_strdup (order_by);
+ g_object_notify (G_OBJECT (self), "order-by");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_youtube_query_get_restriction:
+ * @self: a #GDataYouTubeQuery
+ *
+ * Gets the #GDataYouTubeQuery:restriction property.
+ *
+ * Return value: the restriction property, or %NULL if it is unset
+ *
+ * Since: 0.3.0
+ */
+const gchar *
+gdata_youtube_query_get_restriction (GDataYouTubeQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_QUERY (self), NULL);
+ return self->priv->restriction;
+}
+
+/**
+ * gdata_youtube_query_set_restriction:
+ * @self: a #GDataYouTubeQuery
+ * @restriction: (allow-none): a new restriction string, or %NULL
+ *
+ * Sets the #GDataYouTubeQuery:restriction property of the #GDataYouTubeQuery to the new restriction string, @restriction.
+ *
+ * Set @restriction to %NULL to unset the property in the query URI.
+ *
+ * Since: 0.3.0
+ */
+void
+gdata_youtube_query_set_restriction (GDataYouTubeQuery *self, const gchar *restriction)
+{
+ g_return_if_fail (GDATA_IS_YOUTUBE_QUERY (self));
+ g_free (self->priv->restriction);
+ self->priv->restriction = g_strdup (restriction);
+ g_object_notify (G_OBJECT (self), "restriction");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+/**
+ * gdata_youtube_query_get_safe_search:
+ * @self: a #GDataYouTubeQuery
+ *
+ * Gets the #GDataYouTubeQuery:safe-search property.
+ *
+ * Return value: the safe search property
+ *
+ * Since: 0.3.0
+ */
+GDataYouTubeSafeSearch
+gdata_youtube_query_get_safe_search (GDataYouTubeQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_QUERY (self), GDATA_YOUTUBE_SAFE_SEARCH_MODERATE);
+ return self->priv->safe_search;
+}
+
+/**
+ * gdata_youtube_query_set_safe_search:
+ * @self: a #GDataYouTubeQuery
+ * @safe_search: a new safe search level
+ *
+ * Sets the #GDataYouTubeQuery:safe-search property of the #GDataYouTubeQuery to @safe_search.
+ *
+ * Since: 0.3.0
+ */
+void
+gdata_youtube_query_set_safe_search (GDataYouTubeQuery *self, GDataYouTubeSafeSearch safe_search)
+{
+ g_return_if_fail (GDATA_IS_YOUTUBE_QUERY (self));
+ self->priv->safe_search = safe_search;
+ g_object_notify (G_OBJECT (self), "safe-search");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
+/**
+ * gdata_youtube_query_get_sort_order:
+ * @self: a #GDataYouTubeQuery
+ *
+ * Gets the #GDataYouTubeQuery:sort-order property.
+ *
+ * Return value: the sort order property
+ *
+ * Since: 0.3.0
+ * Deprecated: 0.17.0: No longer supported by Google. The value of
+ * this property will be unused in queries. There is no replacement.
+ */
+GDataYouTubeSortOrder
+gdata_youtube_query_get_sort_order (GDataYouTubeQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_QUERY (self), GDATA_YOUTUBE_SORT_NONE);
+ return self->priv->sort_order;
+}
+
+/**
+ * gdata_youtube_query_set_sort_order:
+ * @self: a #GDataYouTubeQuery
+ * @sort_order: the new sort order
+ *
+ * Sets the #GDataYouTubeQuery:sort-order property of the #GDataYouTubeQuery to @sort_order.
+ *
+ * Set @sort_order to %GDATA_YOUTUBE_SORT_NONE to unset the property in the query URI.
+ *
+ * Since: 0.3.0
+ * Deprecated: 0.17.0: No longer supported by Google. The value of
+ * this property will be unused in queries. There is no replacement.
+ */
+void
+gdata_youtube_query_set_sort_order (GDataYouTubeQuery *self, GDataYouTubeSortOrder sort_order)
+{
+ g_return_if_fail (GDATA_IS_YOUTUBE_QUERY (self));
+ self->priv->sort_order = sort_order;
+ g_object_notify (G_OBJECT (self), "sort-order");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+G_GNUC_END_IGNORE_DEPRECATIONS
+
+/**
+ * gdata_youtube_query_get_age:
+ * @self: a #GDataYouTubeQuery
+ *
+ * Gets the #GDataYouTubeQuery:age property.
+ *
+ * Return value: the age property
+ *
+ * Since: 0.3.0
+ */
+GDataYouTubeAge
+gdata_youtube_query_get_age (GDataYouTubeQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_QUERY (self), GDATA_YOUTUBE_AGE_ALL_TIME);
+ return self->priv->age;
+}
+
+/**
+ * gdata_youtube_query_set_age:
+ * @self: a #GDataYouTubeQuery
+ * @age: the new age
+ *
+ * Sets the #GDataYouTubeQuery:age property of the #GDataYouTubeQuery to @age.
+ *
+ * Since: 0.3.0
+ */
+void
+gdata_youtube_query_set_age (GDataYouTubeQuery *self, GDataYouTubeAge age)
+{
+ g_return_if_fail (GDATA_IS_YOUTUBE_QUERY (self));
+ self->priv->age = age;
+ g_object_notify (G_OBJECT (self), "age");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
+/**
+ * gdata_youtube_query_get_uploader:
+ * @self: a #GDataYouTubeQuery
+ *
+ * Gets the #GDataYouTubeQuery:uploader property.
+ *
+ * Return value: the uploader property
+ *
+ * Since: 0.3.0
+ * Deprecated: 0.17.0: No longer supported by Google. The value of
+ * this property will be unused in queries. There is no replacement.
+ */
+GDataYouTubeUploader
+gdata_youtube_query_get_uploader (GDataYouTubeQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_QUERY (self), GDATA_YOUTUBE_UPLOADER_ALL);
+ return self->priv->uploader;
+}
+
+/**
+ * gdata_youtube_query_set_uploader:
+ * @self: a #GDataYouTubeQuery
+ * @uploader: the new uploader
+ *
+ * Sets the #GDataYouTubeQuery:uploader property of the #GDataYouTubeQuery to @uploader.
+ *
+ * Since: 0.3.0
+ * Deprecated: 0.17.0: No longer supported by Google. The value of
+ * this property will be unused in queries. There is no replacement.
+ */
+void
+gdata_youtube_query_set_uploader (GDataYouTubeQuery *self, GDataYouTubeUploader uploader)
+{
+ g_return_if_fail (GDATA_IS_YOUTUBE_QUERY (self));
+ self->priv->uploader = uploader;
+ g_object_notify (G_OBJECT (self), "uploader");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
+
+G_GNUC_END_IGNORE_DEPRECATIONS
+
+/**
+ * gdata_youtube_query_get_license:
+ * @self: a #GDataYouTubeQuery
+ *
+ * Gets the #GDataYouTubeQuery:license property.
+ *
+ * Return value: the license property, or %NULL if it is unset
+ *
+ * Since: 0.11.0
+ */
+const gchar *
+gdata_youtube_query_get_license (GDataYouTubeQuery *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_QUERY (self), NULL);
+ return self->priv->license;
+}
+
+/**
+ * gdata_youtube_query_set_license:
+ * @self: a #GDataYouTubeQuery
+ * @license: (allow-none): a new license value, or %NULL
+ *
+ * Sets the #GDataYouTubeQuery:license property of the #GDataYouTubeQuery to the new license value, @license.
+ *
+ * Set @license to %NULL to unset the property in the query URI.
+ *
+ * Since: 0.11.0
+ */
+void
+gdata_youtube_query_set_license (GDataYouTubeQuery *self, const gchar *license)
+{
+ g_return_if_fail (GDATA_IS_YOUTUBE_QUERY (self));
+ g_free (self->priv->license);
+ self->priv->license = g_strdup (license);
+ g_object_notify (G_OBJECT (self), "license");
+
+ /* Our current ETag will no longer be relevant */
+ gdata_query_set_etag (GDATA_QUERY (self), NULL);
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009, 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_YOUTUBE_QUERY_H
+#define GDATA_YOUTUBE_QUERY_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-query.h>
+#include <gdata/gdata-types.h>
+#include <gdata/services/youtube/gdata-youtube-enums.h>
+#include <gdata/services/youtube/gdata-youtube-content.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDataYouTubeSafeSearch:
+ * @GDATA_YOUTUBE_SAFE_SEARCH_NONE: YouTube will not perform any filtering on the search result set
+ * @GDATA_YOUTUBE_SAFE_SEARCH_MODERATE: YouTube will filter some content from search results and, at the least,
+ * will filter content that is restricted in your locale
+ * @GDATA_YOUTUBE_SAFE_SEARCH_STRICT: YouTube will try to exclude all restricted content from the search result set
+ *
+ * Safe search levels for removing restricted entries from query results. For more information, see the
+ * <ulink type="http" url="https://developers.google.com/youtube/v3/docs/search/list#safeSearch">online documentation</ulink>.
+ *
+ * Since: 0.3.0
+ */
+typedef enum {
+ GDATA_YOUTUBE_SAFE_SEARCH_NONE = 0,
+ GDATA_YOUTUBE_SAFE_SEARCH_MODERATE,
+ GDATA_YOUTUBE_SAFE_SEARCH_STRICT
+} GDataYouTubeSafeSearch;
+
+#ifndef LIBGDATA_DISABLE_DEPRECATED
+/**
+ * GDataYouTubeSortOrder:
+ * @GDATA_YOUTUBE_SORT_NONE: do not explicitly sort in any sense
+ * @GDATA_YOUTUBE_SORT_ASCENDING: sort results in ascending order of the order field
+ * @GDATA_YOUTUBE_SORT_DESCENDING: sort results in descending order of the order field
+ *
+ * Sort orders for the search results from queries. They specify the order of the designated order field.
+ *
+ * Since: 0.3.0
+ * Deprecated: 0.17.0: No longer supported by Google. There is no
+ * replacement.
+ */
+typedef enum {
+ GDATA_YOUTUBE_SORT_NONE = 0,
+ GDATA_YOUTUBE_SORT_ASCENDING,
+ GDATA_YOUTUBE_SORT_DESCENDING
+} GDataYouTubeSortOrder;
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
+
+/**
+ * GDataYouTubeAge:
+ * @GDATA_YOUTUBE_AGE_ALL_TIME: retrieve all videos, regardless of the date they were uploaded
+ * @GDATA_YOUTUBE_AGE_TODAY: retrieve only videos uploaded in the past day
+ * @GDATA_YOUTUBE_AGE_THIS_WEEK: retrieve only videos uploaded in the past week
+ * @GDATA_YOUTUBE_AGE_THIS_MONTH: retrieve only videos uploaded in the past month
+ *
+ * Video ages, allowing queries to be limited to videos uploaded in a recent time period.
+ *
+ * Since: 0.3.0
+ */
+typedef enum {
+ GDATA_YOUTUBE_AGE_ALL_TIME = 0,
+ GDATA_YOUTUBE_AGE_TODAY,
+ GDATA_YOUTUBE_AGE_THIS_WEEK,
+ GDATA_YOUTUBE_AGE_THIS_MONTH
+} GDataYouTubeAge;
+
+#ifndef LIBGDATA_DISABLE_DEPRECATED
+/**
+ * GDataYouTubeUploader:
+ * @GDATA_YOUTUBE_UPLOADER_ALL: retrieve all videos, regardless of who uploaded them
+ * @GDATA_YOUTUBE_UPLOADER_PARTNER: retrieve only videos uploaded by YouTube partners
+ *
+ * Video uploaders, allowing queries to be limited to returning videos uploaded by YouTube partners.
+ *
+ * Since: 0.3.0
+ * Deprecated: 0.17.0: No longer supported by Google. There is no
+ * replacement.
+ */
+typedef enum {
+ GDATA_YOUTUBE_UPLOADER_ALL = 0,
+ GDATA_YOUTUBE_UPLOADER_PARTNER
+} GDataYouTubeUploader;
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
+
+/**
+ * GDATA_YOUTUBE_LICENSE_CC:
+ *
+ * Value for #GDataYouTubeQuery:license to restrict search results to only videos which are Creative Commons licensed. Specifically, the license
+ * is the Creative Commons Attribution 3.0 Unported license; see the
+ * <ulink type="http" url="http://www.google.com/support/youtube/bin/answer.py?hl=en&answer=1284989">YouTube Help</ulink> for more information.
+ *
+ * Since: 0.11.0
+ */
+#define GDATA_YOUTUBE_LICENSE_CC "cc"
+
+/**
+ * GDATA_YOUTUBE_LICENSE_STANDARD:
+ *
+ * Value for #GDataYouTubeQuery:license to restrict search results to only videos which are under the standard YouTube license.
+ *
+ * Since: 0.11.0
+ */
+#define GDATA_YOUTUBE_LICENSE_STANDARD "youtube"
+
+#define GDATA_TYPE_YOUTUBE_QUERY (gdata_youtube_query_get_type ())
+#define GDATA_YOUTUBE_QUERY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_YOUTUBE_QUERY, GDataYouTubeQuery))
+#define GDATA_YOUTUBE_QUERY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_YOUTUBE_QUERY, GDataYouTubeQueryClass))
+#define GDATA_IS_YOUTUBE_QUERY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_YOUTUBE_QUERY))
+#define GDATA_IS_YOUTUBE_QUERY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_YOUTUBE_QUERY))
+#define GDATA_YOUTUBE_QUERY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_YOUTUBE_QUERY, GDataYouTubeQueryClass))
+
+typedef struct _GDataYouTubeQueryPrivate GDataYouTubeQueryPrivate;
+
+/**
+ * GDataYouTubeQuery:
+ *
+ * All the fields in the #GDataYouTubeQuery structure are private and should never be accessed directly.
+ *
+ * Since: 0.3.0
+ */
+typedef struct {
+ GDataQuery parent;
+ GDataYouTubeQueryPrivate *priv;
+} GDataYouTubeQuery;
+
+/**
+ * GDataYouTubeQueryClass:
+ *
+ * All the fields in the #GDataYouTubeQueryClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.3.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataQueryClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataYouTubeQueryClass;
+
+GType gdata_youtube_query_get_type (void) G_GNUC_CONST;
+
+GDataYouTubeQuery *gdata_youtube_query_new (const gchar *q) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+void gdata_youtube_query_get_location (GDataYouTubeQuery *self, gdouble *latitude, gdouble *longitude, gdouble *radius, gboolean *has_location);
+void gdata_youtube_query_set_location (GDataYouTubeQuery *self, gdouble latitude, gdouble longitude, gdouble radius, gboolean has_location);
+const gchar *gdata_youtube_query_get_order_by (GDataYouTubeQuery *self) G_GNUC_PURE;
+void gdata_youtube_query_set_order_by (GDataYouTubeQuery *self, const gchar *order_by);
+const gchar *gdata_youtube_query_get_restriction (GDataYouTubeQuery *self) G_GNUC_PURE;
+void gdata_youtube_query_set_restriction (GDataYouTubeQuery *self, const gchar *restriction);
+GDataYouTubeSafeSearch gdata_youtube_query_get_safe_search (GDataYouTubeQuery *self) G_GNUC_PURE;
+void gdata_youtube_query_set_safe_search (GDataYouTubeQuery *self, GDataYouTubeSafeSearch safe_search);
+GDataYouTubeAge gdata_youtube_query_get_age (GDataYouTubeQuery *self) G_GNUC_PURE;
+void gdata_youtube_query_set_age (GDataYouTubeQuery *self, GDataYouTubeAge age);
+const gchar *gdata_youtube_query_get_license (GDataYouTubeQuery *self) G_GNUC_PURE;
+void gdata_youtube_query_set_license (GDataYouTubeQuery *self, const gchar *license);
+
+#ifndef LIBGDATA_DISABLE_DEPRECATED
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+GDataYouTubeFormat gdata_youtube_query_get_format (GDataYouTubeQuery *self) G_GNUC_PURE G_GNUC_DEPRECATED;
+void gdata_youtube_query_set_format (GDataYouTubeQuery *self, GDataYouTubeFormat format) G_GNUC_DEPRECATED;
+const gchar *gdata_youtube_query_get_language (GDataYouTubeQuery *self) G_GNUC_PURE G_GNUC_DEPRECATED;
+void gdata_youtube_query_set_language (GDataYouTubeQuery *self, const gchar *language) G_GNUC_DEPRECATED;
+GDataYouTubeSortOrder gdata_youtube_query_get_sort_order (GDataYouTubeQuery *self) G_GNUC_PURE G_GNUC_DEPRECATED;
+void gdata_youtube_query_set_sort_order (GDataYouTubeQuery *self, GDataYouTubeSortOrder sort_order) G_GNUC_DEPRECATED;
+GDataYouTubeUploader gdata_youtube_query_get_uploader (GDataYouTubeQuery *self) G_GNUC_PURE G_GNUC_DEPRECATED;
+void gdata_youtube_query_set_uploader (GDataYouTubeQuery *self, GDataYouTubeUploader uploader) G_GNUC_DEPRECATED;
+G_GNUC_END_IGNORE_DEPRECATIONS
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
+
+G_END_DECLS
+
+#endif /* !GDATA_YOUTUBE_QUERY_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2008–2010, 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-youtube-service
+ * @short_description: GData YouTube service object
+ * @stability: Stable
+ * @include: gdata/services/youtube/gdata-youtube-service.h
+ *
+ * #GDataYouTubeService is a subclass of #GDataService for communicating with the GData API of YouTube. It supports querying for and
+ * uploading videos using version 3 of the API.
+ *
+ * The YouTube API supports returning different sets of properties for
+ * #GDataYouTubeVideos depending on the specific query. For search results, only
+ * ‘snippet’ properties are returned (including #GDataEntry:title,
+ * #GDataEntry:summary and the set of thumbnails). For querying single videos,
+ * a more complete set of properties are returned — so use
+ * gdata_service_query_single_entry_async() to get further details on a video.
+ *
+ * For more details of YouTube's GData API, see the <ulink type="http" url="https://developers.google.com/youtube/v3/docs/">
+ * online documentation</ulink>.
+ *
+ * <example>
+ * <title>Getting a Localized List of YouTube Categories</title>
+ * <programlisting>
+ * GDataYouTubeService *service;
+ * GDataAPPCategories *app_categories;
+ * GList *categories, *i;
+ *
+ * /<!-- -->* Create a service and set its locale to Italian, which localizes the categories to Italian *<!-- -->/
+ * service = create_youtube_service ();
+ * gdata_service_set_locale (GDATA_SERVICE (service), "it");
+ *
+ * /<!-- -->* Query the server for the current list of YouTube categories (in Italian) *<!-- -->/
+ * app_categories = gdata_youtube_service_get_categories (service, NULL, NULL);
+ * categories = gdata_app_categories_get_categories (app_categories);
+ *
+ * /<!-- -->* Iterate through the categories *<!-- -->/
+ * for (i = categories; i != NULL; i = i->next) {
+ * GDataYouTubeCategory *category = GDATA_YOUTUBE_CATEGORY (i->data);
+ *
+ * if (gdata_youtube_category_is_deprecated (category) == FALSE && gdata_youtube_category_is_browsable (category, "IT") == TRUE) {
+ * /<!-- -->* Do something with the category here, as it's not deprecated, and is browsable in the given region *<!-- -->/
+ * add_to_ui (gdata_category_get_term (GDATA_CATEGORY (category)), gdata_category_get_label (GDATA_CATEGORY (category)));
+ * }
+ * }
+ *
+ * g_object_unref (app_categories);
+ * g_object_unref (service);
+ * </programlisting>
+ * </example>
+ *
+ * <example>
+ * <title>Uploading a Video from Disk</title>
+ * <programlisting>
+ * GDataYouTubeService *service;
+ * GDataYouTubeVideo *video, *uploaded_video;
+ * GDataMediaCategory *category;
+ * const gchar * const tags[] = { "tag1", "tag2", NULL };
+ * GFile *video_file;
+ * GFileInfo *file_info;
+ * const gchar *slug, *content_type;
+ * GFileInputStream *file_stream;
+ * GDataUploadStream *upload_stream;
+ * GError *error = NULL;
+ *
+ * /<!-- -->* Create a service *<!-- -->/
+ * service = create_youtube_service ();
+ *
+ * /<!-- -->* Get the video file to upload *<!-- -->/
+ * video_file = g_file_new_for_path ("sample.ogg");
+ *
+ * /<!-- -->* Get the file's display name and content type *<!-- -->/
+ * file_info = g_file_query_info (video_file, G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME "," G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
+ * G_FILE_QUERY_INFO_NONE, NULL, &error);
+ *
+ * if (error != NULL) {
+ * g_error ("Error getting video file information: %s", error->message);
+ * g_error_free (error);
+ * g_object_unref (video_file);
+ * g_object_unref (service);
+ * return;
+ * }
+ *
+ * slug = g_file_info_get_display_name (file_info);
+ * content_type = g_file_info_get_content_type (file_info);
+ *
+ * /<!-- -->* Get an input stream for the file *<!-- -->/
+ * file_stream = g_file_read (video_file, NULL, &error);
+ *
+ * g_object_unref (video_file);
+ *
+ * if (error != NULL) {
+ * g_error ("Error getting video file stream: %s", error->message);
+ * g_error_free (error);
+ * g_object_unref (file_info);
+ * g_object_unref (service);
+ * return;
+ * }
+ *
+ * /<!-- -->* Create the video to upload *<!-- -->/
+ * video = gdata_youtube_video_new (NULL);
+ *
+ * gdata_entry_set_title (GDATA_ENTRY (video), "Video Title");
+ * gdata_youtube_video_set_description (video, "Video description.");
+ * gdata_youtube_video_set_keywords (video, video_tags);
+ *
+ * category = gdata_media_category_new ("People", "http://gdata.youtube.com/schemas/2007/categories.cat", NULL);
+ * gdata_youtube_video_set_category (video, category);
+ * g_object_unref (category);
+ *
+ * /<!-- -->* Get an upload stream for the video *<!-- -->/
+ * upload_stream = gdata_youtube_service_upload_video (service, video, slug, content_type, NULL, &error);
+ *
+ * g_object_unref (video);
+ * g_object_unref (file_info);
+ *
+ * if (error != NULL) {
+ * g_error ("Error getting upload stream: %s", error->message);
+ * g_error_free (error);
+ * g_object_unref (file_stream);
+ * g_object_unref (service);
+ * return;
+ * }
+ *
+ * /<!-- -->* Upload the video. This is a blocking operation, and should normally be done asynchronously. *<!-- -->/
+ * g_output_stream_splice (G_OUTPUT_STREAM (upload_stream), G_INPUT_STREAM (file_stream),
+ * G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, NULL, &error);
+ *
+ * g_object_unref (file_stream);
+ *
+ * if (error != NULL) {
+ * g_error ("Error splicing streams: %s", error->message);
+ * g_error_free (error);
+ * g_object_unref (upload_stream);
+ * g_object_unref (service);
+ * return;
+ * }
+ *
+ * /<!-- -->* Finish off the upload by parsing the returned updated video entry *<!-- -->/
+ * uploaded_video = gdata_youtube_service_finish_video_upload (service, upload_stream, &error);
+ *
+ * g_object_unref (upload_stream);
+ * g_object_unref (service);
+ *
+ * if (error != NULL) {
+ * g_error ("Error uploading video: %s", error->message);
+ * g_error_free (error);
+ * return;
+ * }
+ *
+ * /<!-- -->* Do something with the uploaded video *<!-- -->/
+ *
+ * g_object_unref (uploaded_video);
+ * </programlisting>
+ * </example>
+ *
+ * <example>
+ * <title>Querying for Videos from a Standard Feed</title>
+ * <programlisting>
+ * GDataYouTubeService *service;
+ * GDataFeed *feed;
+ * GList *i;
+ * GError *error = NULL;
+ *
+ * /<!-- -->* Create a service *<!-- -->/
+ * service = create_youtube_service ();
+ *
+ * /<!-- -->* Query for the top page of videos in the most popular feed *<!-- -->/
+ * feed = gdata_youtube_service_query_standard_feed (service, GDATA_YOUTUBE_MOST_POPULAR_FEED, NULL, NULL, NULL, NULL, &error);
+ *
+ * g_object_unref (service);
+ *
+ * if (error != NULL) {
+ * g_error ("Error querying for most popular videos: %s", error->message);
+ * g_error_free (error);
+ * return;
+ * }
+ *
+ * /<!-- -->* Iterate through the videos *<!-- -->/
+ * for (i = gdata_feed_get_entries (feed); i != NULL; i = i->next) {
+ * GDataYouTubeVideo *video = GDATA_YOUTUBE_VIDEO (i->data);
+ *
+ * /<!-- -->* Do something with the video, like insert it into the UI *<!-- -->/
+ * }
+ *
+ * g_object_unref (feed);
+ * </programlisting>
+ * </example>
+ *
+ * <example>
+ * <title>Querying for Videos using Search Terms</title>
+ * <programlisting>
+ * GDataYouTubeService *service;
+ * GDataYouTubeQuery *query;
+ * GDataFeed *feed;
+ * GList *i;
+ * GError *error = NULL;
+ *
+ * /<!-- -->* Create a service *<!-- -->/
+ * service = create_youtube_service ();
+ *
+ * /<!-- -->* Build a query with the given search terms, also matching only videos which are CC-licensed *<!-- -->/
+ * query = gdata_youtube_query_new (my_space_separated_search_terms);
+ * gdata_youtube_query_set_license (query, GDATA_YOUTUBE_LICENSE_CC);
+ *
+ * /<!-- -->* Query for the videos matching the query parameters *<!-- -->/
+ * feed = gdata_youtube_service_query_videos (service, query, NULL, NULL, NULL, &error);
+ *
+ * g_object_unref (query);
+ * g_object_unref (service);
+ *
+ * if (error != NULL) {
+ * g_error ("Error querying for videos matching search terms ‘%s’: %s", my_space_separated_search_terms, error->message);
+ * g_error_free (error);
+ * return;
+ * }
+ *
+ * /<!-- -->* Iterate through the videos *<!-- -->/
+ * for (i = gdata_feed_get_entries (feed); i != NULL; i = i->next) {
+ * GDataYouTubeVideo *video = GDATA_YOUTUBE_VIDEO (i->data);
+ *
+ * /<!-- -->* Do something with the video, like insert it into the UI *<!-- -->/
+ * }
+ *
+ * g_object_unref (feed);
+ * </programlisting>
+ * </example>
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <libsoup/soup.h>
+#include <string.h>
+
+#include "gdata-youtube-service.h"
+#include "gdata-youtube-feed.h"
+#include "gdata-service.h"
+#include "gdata-private.h"
+#include "gdata-parser.h"
+#include "atom/gdata-link.h"
+#include "gdata-upload-stream.h"
+#include "gdata-youtube-category.h"
+#include "gdata-batchable.h"
+
+/* Standards reference here: https://developers.google.com/youtube/v3/docs/ */
+
+GQuark
+gdata_youtube_service_error_quark (void)
+{
+ return g_quark_from_static_string ("gdata-youtube-service-error-quark");
+}
+
+static void gdata_youtube_service_batchable_init (GDataBatchableIface *iface);
+static void gdata_youtube_service_finalize (GObject *object);
+static void gdata_youtube_service_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_youtube_service_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void append_query_headers (GDataService *self, GDataAuthorizationDomain *domain, SoupMessage *message);
+static void parse_error_response (GDataService *self, GDataOperationType operation_type, guint status, const gchar *reason_phrase,
+ const gchar *response_body, gint length, GError **error);
+
+static GList *get_authorization_domains (void);
+
+struct _GDataYouTubeServicePrivate {
+ gchar *developer_key;
+};
+
+enum {
+ PROP_DEVELOPER_KEY = 1
+};
+
+/* Reference: https://developers.google.com/youtube/v3/guides/authentication */
+_GDATA_DEFINE_AUTHORIZATION_DOMAIN (youtube, "youtube",
+ "https://www.googleapis.com/auth/youtube")
+_GDATA_DEFINE_AUTHORIZATION_DOMAIN (youtube_force_ssl, "youtube-force-ssl",
+ "https://www.googleapis.com/auth/youtube.force-ssl")
+G_DEFINE_TYPE_WITH_CODE (GDataYouTubeService, gdata_youtube_service, GDATA_TYPE_SERVICE,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_BATCHABLE,
+ gdata_youtube_service_batchable_init))
+
+static void
+gdata_youtube_service_class_init (GDataYouTubeServiceClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataServiceClass *service_class = GDATA_SERVICE_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataYouTubeServicePrivate));
+
+ gobject_class->set_property = gdata_youtube_service_set_property;
+ gobject_class->get_property = gdata_youtube_service_get_property;
+ gobject_class->finalize = gdata_youtube_service_finalize;
+
+ service_class->feed_type = GDATA_TYPE_YOUTUBE_FEED;
+ service_class->append_query_headers = append_query_headers;
+ service_class->parse_error_response = parse_error_response;
+ service_class->get_authorization_domains = get_authorization_domains;
+
+ /**
+ * GDataYouTubeService:developer-key:
+ *
+ * The developer key your application has registered with the YouTube API. For more information, see the <ulink type="http"
+ * url="https://developers.google.com/youtube/registering_an_application">online documentation</ulink>.
+ *
+ * With the port from v2 to v3 of the YouTube API in libgdata
+ * 0.17.0, it might be necessary to update your application’s
+ * developer key.
+ */
+ g_object_class_install_property (gobject_class, PROP_DEVELOPER_KEY,
+ g_param_spec_string ("developer-key",
+ "Developer key", "Your YouTube developer API key.",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static gboolean
+gdata_youtube_service_batchable_is_supported (GDataBatchOperationType operation_type)
+{
+ /* Batch operation support was removed with v3 of the API:
+ * https://developers.google.com/youtube/v3/guides/implementation/deprecated#Batch_Processing */
+ return FALSE;
+}
+
+static void
+gdata_youtube_service_batchable_init (GDataBatchableIface *iface)
+{
+ iface->is_supported = gdata_youtube_service_batchable_is_supported;
+}
+
+static void
+gdata_youtube_service_init (GDataYouTubeService *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_YOUTUBE_SERVICE, GDataYouTubeServicePrivate);
+}
+
+static void
+gdata_youtube_service_finalize (GObject *object)
+{
+ GDataYouTubeServicePrivate *priv = GDATA_YOUTUBE_SERVICE (object)->priv;
+
+ g_free (priv->developer_key);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_youtube_service_parent_class)->finalize (object);
+}
+
+static void
+gdata_youtube_service_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataYouTubeServicePrivate *priv = GDATA_YOUTUBE_SERVICE (object)->priv;
+
+ switch (property_id) {
+ case PROP_DEVELOPER_KEY:
+ g_value_set_string (value, priv->developer_key);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_youtube_service_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataYouTubeServicePrivate *priv = GDATA_YOUTUBE_SERVICE (object)->priv;
+
+ switch (property_id) {
+ case PROP_DEVELOPER_KEY:
+ priv->developer_key = g_value_dup_string (value);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+append_query_headers (GDataService *self, GDataAuthorizationDomain *domain,
+ SoupMessage *message)
+{
+ GDataYouTubeServicePrivate *priv = GDATA_YOUTUBE_SERVICE (self)->priv;
+
+ g_assert (message != NULL);
+
+ if (priv->developer_key != NULL &&
+ !gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (self)),
+ get_youtube_authorization_domain ())) {
+ const gchar *query;
+ SoupURI *uri;
+
+ uri = soup_message_get_uri (message);
+ query = soup_uri_get_query (uri);
+
+ /* Set the key on every unauthorised request:
+ * https://developers.google.com/youtube/v3/docs/standard_parameters#key */
+ if (query != NULL) {
+ GString *new_query;
+
+ new_query = g_string_new (query);
+
+ g_string_append (new_query, "&key=");
+ g_string_append_uri_escaped (new_query,
+ priv->developer_key, NULL,
+ FALSE);
+
+ soup_uri_set_query (uri, new_query->str);
+ g_string_free (new_query, TRUE);
+ }
+ }
+
+ /* Chain up to the parent class */
+ GDATA_SERVICE_CLASS (gdata_youtube_service_parent_class)->append_query_headers (self, domain, message);
+}
+
+/* Reference: https://developers.google.com/youtube/v3/docs/errors
+ *
+ * Example response:
+ * {
+ * "error": {
+ * "errors": [
+ * {
+ * "domain": "youtube.parameter",
+ * "reason": "missingRequiredParameter",
+ * "message": "No filter selected.",
+ * "locationType": "parameter",
+ * "location": ""
+ * }
+ * ],
+ * "code": 400,
+ * "message": "No filter selected."
+ * }
+ * }
+ */
+/* FIXME: Factor this out into a common JSON error parser helper which simply
+ * takes a map of expected error codes. */
+static void
+parse_error_response (GDataService *self, GDataOperationType operation_type,
+ guint status, const gchar *reason_phrase,
+ const gchar *response_body, gint length, GError **error)
+{
+ JsonParser *parser = NULL; /* owned */
+ JsonReader *reader = NULL; /* owned */
+ gint i;
+ GError *child_error = NULL;
+
+ if (response_body == NULL) {
+ goto parent;
+ }
+
+ if (length == -1) {
+ length = strlen (response_body);
+ }
+
+ parser = json_parser_new ();
+ if (!json_parser_load_from_data (parser, response_body, length,
+ &child_error)) {
+ goto parent;
+ }
+
+ reader = json_reader_new (json_parser_get_root (parser));
+
+ /* Check that the outermost node is an object. */
+ if (!json_reader_is_object (reader)) {
+ goto parent;
+ }
+
+ /* Grab the ‘error’ member, then its ‘errors’ member. */
+ if (!json_reader_read_member (reader, "error") ||
+ !json_reader_is_object (reader) ||
+ !json_reader_read_member (reader, "errors") ||
+ !json_reader_is_array (reader)) {
+ goto parent;
+ }
+
+ /* Parse each of the errors. Return the first one, and print out any
+ * others. */
+ for (i = 0; i < json_reader_count_elements (reader); i++) {
+ const gchar *domain, *reason, *message, *extended_help;
+ const gchar *location_type, *location;
+
+ /* Parse the error. */
+ if (!json_reader_read_element (reader, i) ||
+ !json_reader_is_object (reader)) {
+ goto parent;
+ }
+
+ json_reader_read_member (reader, "domain");
+ domain = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "reason");
+ reason = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "message");
+ message = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "extendedHelp");
+ extended_help = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "locationType");
+ location_type = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "location");
+ location = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ /* End the error element. */
+ json_reader_end_element (reader);
+
+ /* Create an error message, but only for the first error */
+ if (error == NULL || *error == NULL) {
+ if (g_strcmp0 (domain, "usageLimits") == 0 &&
+ g_strcmp0 (reason,
+ "dailyLimitExceededUnreg") == 0) {
+ /* Daily Limit for Unauthenticated Use
+ * Exceeded. */
+ g_set_error (error, GDATA_SERVICE_ERROR,
+ GDATA_SERVICE_ERROR_API_QUOTA_EXCEEDED,
+ _("You have made too many API "
+ "calls recently. Please wait a "
+ "few minutes and try again."));
+ } else if (g_strcmp0 (reason,
+ "rateLimitExceeded") == 0) {
+ g_set_error (error, GDATA_YOUTUBE_SERVICE_ERROR,
+ GDATA_YOUTUBE_SERVICE_ERROR_ENTRY_QUOTA_EXCEEDED,
+ _("You have exceeded your entry "
+ "quota. Please delete some "
+ "entries and try again."));
+ } else if (g_strcmp0 (domain, "global") == 0 &&
+ (g_strcmp0 (reason, "authError") == 0 ||
+ g_strcmp0 (reason, "required") == 0)) {
+ /* Authentication problem */
+ g_set_error (error, GDATA_SERVICE_ERROR,
+ GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED,
+ _("You must be authenticated to "
+ "do this."));
+ } else if (g_strcmp0 (reason,
+ "youtubeSignupRequired") == 0) {
+ /* Tried to authenticate with a Google Account which hasn't yet had a YouTube channel created for it. */
+ g_set_error (error, GDATA_YOUTUBE_SERVICE_ERROR,
+ GDATA_YOUTUBE_SERVICE_ERROR_CHANNEL_REQUIRED,
+ /* Translators: the parameter is a URI. */
+ _("Your Google Account must be "
+ "associated with a YouTube "
+ "channel to do this. Visit %s "
+ "to create one."),
+ "https://www.youtube.com/create_channel");
+ } else {
+ /* Unknown or validation (protocol) error. Fall
+ * back to working off the HTTP status code. */
+ g_warning ("Unknown error code ‘%s’ in domain "
+ "‘%s’ received with location type "
+ "‘%s’, location ‘%s’, extended help "
+ "‘%s’ and message ‘%s’.",
+ reason, domain, location_type,
+ location, extended_help, message);
+
+ goto parent;
+ }
+ } else {
+ /* For all errors after the first, log the error in the
+ * terminal. */
+ g_debug ("Error message received in response: domain "
+ "‘%s’, reason ‘%s’, extended help ‘%s’, "
+ "message ‘%s’, location type ‘%s’, location "
+ "‘%s’.",
+ domain, reason, extended_help, message,
+ location_type, location);
+ }
+ }
+
+ /* End the ‘errors’ and ‘error’ members. */
+ json_reader_end_element (reader);
+ json_reader_end_element (reader);
+
+ g_clear_object (&reader);
+ g_clear_object (&parser);
+
+ /* Ensure we’ve actually set an error message. */
+ g_assert (error == NULL || *error != NULL);
+
+ return;
+
+parent:
+ g_clear_object (&reader);
+ g_clear_object (&parser);
+
+ /* Chain up to the parent class */
+ GDATA_SERVICE_CLASS (gdata_youtube_service_parent_class)->parse_error_response (self, operation_type, status, reason_phrase,
+ response_body, length, error);
+}
+
+static GList *
+get_authorization_domains (void)
+{
+ GList *authorization_domains = NULL;
+
+ authorization_domains = g_list_prepend (authorization_domains, get_youtube_authorization_domain ());
+ authorization_domains = g_list_prepend (authorization_domains, get_youtube_force_ssl_authorization_domain ());
+
+ return authorization_domains;
+}
+
+/**
+ * gdata_youtube_service_new:
+ * @developer_key: your application's developer API key
+ * @authorizer: (allow-none): a #GDataAuthorizer to authorize the service's requests, or %NULL
+ *
+ * Creates a new #GDataYouTubeService using the given #GDataAuthorizer. If @authorizer is %NULL, all requests are made as an unauthenticated user.
+ * The @developer_key must be unique for your application, and as
+ * <ulink type="http" url="https://developers.google.com/youtube/registering_an_application">registered with Google</ulink>.
+ *
+ * Return value: a new #GDataYouTubeService, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.9.0
+ */
+GDataYouTubeService *
+gdata_youtube_service_new (const gchar *developer_key, GDataAuthorizer *authorizer)
+{
+ g_return_val_if_fail (developer_key != NULL, NULL);
+ g_return_val_if_fail (authorizer == NULL || GDATA_IS_AUTHORIZER (authorizer), NULL);
+
+ return g_object_new (GDATA_TYPE_YOUTUBE_SERVICE,
+ "developer-key", developer_key,
+ "authorizer", authorizer,
+ NULL);
+}
+
+/**
+ * gdata_youtube_service_get_primary_authorization_domain:
+ *
+ * The primary #GDataAuthorizationDomain for interacting with YouTube. This will not normally need to be used, as it's used internally
+ * by the #GDataYouTubeService methods. However, if using the plain #GDataService methods to implement custom queries or requests which libgdata
+ * does not support natively, then this domain may be needed to authorize the requests.
+ *
+ * The domain never changes, and is interned so that pointer comparison can be used to differentiate it from other authorization domains.
+ *
+ * Return value: (transfer none): the service's authorization domain
+ *
+ * Since: 0.9.0
+ */
+GDataAuthorizationDomain *
+gdata_youtube_service_get_primary_authorization_domain (void)
+{
+ return get_youtube_authorization_domain ();
+}
+
+static gchar *
+standard_feed_type_to_feed_uri (GDataYouTubeStandardFeedType feed_type)
+{
+ switch (feed_type) {
+ case GDATA_YOUTUBE_MOST_POPULAR_FEED:
+ return _gdata_service_build_uri ("https://www.googleapis.com/youtube/v3/videos"
+ "?part=snippet"
+ "&chart=mostPopular");
+ case GDATA_YOUTUBE_TOP_RATED_FEED:
+ case GDATA_YOUTUBE_TOP_FAVORITES_FEED:
+ case GDATA_YOUTUBE_MOST_VIEWED_FEED:
+ case GDATA_YOUTUBE_MOST_RECENT_FEED:
+ case GDATA_YOUTUBE_MOST_DISCUSSED_FEED:
+ case GDATA_YOUTUBE_MOST_LINKED_FEED:
+ case GDATA_YOUTUBE_MOST_RESPONDED_FEED:
+ case GDATA_YOUTUBE_RECENTLY_FEATURED_FEED:
+ case GDATA_YOUTUBE_WATCH_ON_MOBILE_FEED: {
+ gchar *date, *out;
+ GTimeVal tv;
+
+ /* All feed types except MOST_POPULAR have been deprecated for
+ * a while, and fall back to MOST_POPULAR on the server anyway.
+ * See: https://developers.google.com/youtube/2.0/developers_guide_protocol_video_feeds#Standard_feeds */
+ g_get_current_time (&tv);
+ tv.tv_sec -= 24 * 60 * 60; /* 1 day ago */
+ date = g_time_val_to_iso8601 (&tv);
+ out = _gdata_service_build_uri ("https://www.googleapis.com/youtube/v3/videos"
+ "?part=snippet"
+ "&chart=mostPopular"
+ "&publishedAfter=%s", date);
+ g_free (date);
+
+ return out;
+ }
+ default:
+ g_assert_not_reached ();
+ }
+}
+
+/**
+ * gdata_youtube_service_query_standard_feed:
+ * @self: a #GDataYouTubeService
+ * @feed_type: the feed type to query, from #GDataYouTubeStandardFeedType
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (scope call) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @error: a #GError, or %NULL
+ *
+ * Queries the service's standard @feed_type feed to build a #GDataFeed.
+ *
+ * Note that with the port from v2 to v3 of the YouTube API in libgdata
+ * 0.17.0, all feed types except %GDATA_YOUTUBE_MOST_POPULAR_FEED have been
+ * deprecated. Other feed types will now transparently return
+ * %GDATA_YOUTUBE_MOST_POPULAR_FEED, limited to the past 24 hours.
+ *
+ * Parameters and errors are as for gdata_service_query().
+ *
+ * Return value: (transfer full): a #GDataFeed of query results, or %NULL; unref with g_object_unref()
+ */
+GDataFeed *
+gdata_youtube_service_query_standard_feed (GDataYouTubeService *self, GDataYouTubeStandardFeedType feed_type, GDataQuery *query,
+ GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GError **error)
+{
+ gchar *query_uri;
+ GDataFeed *feed;
+
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_SERVICE (self), NULL);
+ g_return_val_if_fail (query == NULL || GDATA_IS_QUERY (query), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ /* TODO: Support the "time" parameter, as well as category- and region-specific feeds */
+ query_uri = standard_feed_type_to_feed_uri (feed_type);
+ feed = gdata_service_query (GDATA_SERVICE (self),
+ get_youtube_authorization_domain (),
+ query_uri, query, GDATA_TYPE_YOUTUBE_VIDEO,
+ cancellable, progress_callback,
+ progress_user_data, error);
+ g_free (query_uri);
+
+ return feed;
+}
+
+/**
+ * gdata_youtube_service_query_standard_feed_async:
+ * @self: a #GDataService
+ * @feed_type: the feed type to query, from #GDataYouTubeStandardFeedType
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @destroy_progress_user_data: (allow-none): the function to call when @progress_callback will not be called any more, or %NULL. This function will be
+ * called with @progress_user_data as a parameter and can be used to free any memory allocated for it.
+ * @callback: a #GAsyncReadyCallback to call when authentication is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Queries the service's standard @feed_type feed to build a #GDataFeed. @self and
+ * @query are both reffed when this function is called, so can safely be freed after this function returns.
+ *
+ * For more details, see gdata_youtube_service_query_standard_feed(), which is the synchronous version of this function.
+ *
+ * When the operation is finished, @callback will be called. You can then call gdata_service_query_finish()
+ * to get the results of the operation.
+ *
+ * Since: 0.9.1
+ */
+void
+gdata_youtube_service_query_standard_feed_async (GDataYouTubeService *self, GDataYouTubeStandardFeedType feed_type, GDataQuery *query,
+ GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ gchar *query_uri;
+
+ g_return_if_fail (GDATA_IS_YOUTUBE_SERVICE (self));
+ g_return_if_fail (query == NULL || GDATA_IS_QUERY (query));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+ g_return_if_fail (callback != NULL);
+
+ query_uri = standard_feed_type_to_feed_uri (feed_type);
+ gdata_service_query_async (GDATA_SERVICE (self),
+ get_youtube_authorization_domain (),
+ query_uri, query, GDATA_TYPE_YOUTUBE_VIDEO,
+ cancellable, progress_callback,
+ progress_user_data,
+ destroy_progress_user_data, callback,
+ user_data);
+ g_free (query_uri);
+}
+
+/**
+ * gdata_youtube_service_query_videos:
+ * @self: a #GDataYouTubeService
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (scope call) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @error: a #GError, or %NULL
+ *
+ * Queries the service for videos matching the parameters set on the #GDataQuery. This searches site-wide, and imposes no other restrictions or
+ * parameters on the query.
+ *
+ * Parameters and errors are as for gdata_service_query().
+ *
+ * Return value: (transfer full): a #GDataFeed of query results, or %NULL; unref with g_object_unref()
+ */
+GDataFeed *
+gdata_youtube_service_query_videos (GDataYouTubeService *self, GDataQuery *query,
+ GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GError **error)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_SERVICE (self), NULL);
+ g_return_val_if_fail (query == NULL || GDATA_IS_QUERY (query), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ return gdata_service_query (GDATA_SERVICE (self),
+ get_youtube_authorization_domain (),
+ "https://www.googleapis.com/youtube/v3/search"
+ "?part=snippet"
+ "&type=video",
+ query, GDATA_TYPE_YOUTUBE_VIDEO,
+ cancellable, progress_callback,
+ progress_user_data, error);
+}
+
+/**
+ * gdata_youtube_service_query_videos_async:
+ * @self: a #GDataService
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @destroy_progress_user_data: (allow-none): the function to call when @progress_callback will not be called any more, or %NULL. This function will be
+ * called with @progress_user_data as a parameter and can be used to free any memory allocated for it.
+ * @callback: a #GAsyncReadyCallback to call when authentication is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Queries the service for videos matching the parameters set on the #GDataQuery. This searches site-wide, and imposes no other restrictions or
+ * parameters on the query. @self and @query are both reffed when this function is called, so can safely be freed after this function returns.
+ *
+ * For more details, see gdata_youtube_service_query_videos(), which is the synchronous version of this function.
+ *
+ * When the operation is finished, @callback will be called. You can then call gdata_service_query_finish()
+ * to get the results of the operation.
+ *
+ * Since: 0.9.1
+ */
+void
+gdata_youtube_service_query_videos_async (GDataYouTubeService *self, GDataQuery *query,
+ GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_return_if_fail (GDATA_IS_YOUTUBE_SERVICE (self));
+ g_return_if_fail (query == NULL || GDATA_IS_QUERY (query));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+ g_return_if_fail (callback != NULL);
+
+ gdata_service_query_async (GDATA_SERVICE (self),
+ get_youtube_authorization_domain (),
+ "https://www.googleapis.com/youtube/v3/search"
+ "?part=snippet"
+ "&type=video",
+ query, GDATA_TYPE_YOUTUBE_VIDEO, cancellable,
+ progress_callback, progress_user_data,
+ destroy_progress_user_data, callback,
+ user_data);
+}
+
+/**
+ * gdata_youtube_service_query_related:
+ * @self: a #GDataYouTubeService
+ * @video: a #GDataYouTubeVideo for which to find related videos
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (scope call) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @error: a #GError, or %NULL
+ *
+ * Queries the service for videos related to @video. The algorithm determining which videos are related is on the server side.
+ *
+ * Parameters and other errors are as for gdata_service_query().
+ *
+ * Return value: (transfer full): a #GDataFeed of query results; unref with g_object_unref()
+ */
+GDataFeed *
+gdata_youtube_service_query_related (GDataYouTubeService *self, GDataYouTubeVideo *video, GDataQuery *query,
+ GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GError **error)
+{
+ GDataFeed *feed;
+ gchar *uri;
+
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_SERVICE (self), NULL);
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (video), NULL);
+ g_return_val_if_fail (query == NULL || GDATA_IS_QUERY (query), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ /* Execute the query */
+ uri = _gdata_service_build_uri ("https://www.googleapis.com/youtube/v3/search"
+ "?part=snippet"
+ "&type=video"
+ "&relatedToVideoId=%s",
+ gdata_entry_get_id (GDATA_ENTRY (video)));
+ feed = gdata_service_query (GDATA_SERVICE (self),
+ get_youtube_authorization_domain (), uri,
+ query, GDATA_TYPE_YOUTUBE_VIDEO,
+ cancellable, progress_callback,
+ progress_user_data, error);
+ g_free (uri);
+
+ return feed;
+}
+
+/**
+ * gdata_youtube_service_query_related_async:
+ * @self: a #GDataService
+ * @video: a #GDataYouTubeVideo for which to find related videos
+ * @query: (allow-none): a #GDataQuery with the query parameters, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @progress_callback: (allow-none) (closure progress_user_data): a #GDataQueryProgressCallback to call when an entry is loaded, or %NULL
+ * @progress_user_data: (closure): data to pass to the @progress_callback function
+ * @destroy_progress_user_data: (allow-none): the function to call when @progress_callback will not be called any more, or %NULL. This function will be
+ * called with @progress_user_data as a parameter and can be used to free any memory allocated for it.
+ * @callback: a #GAsyncReadyCallback to call when authentication is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Queries the service for videos related to @video. The algorithm determining which videos are related is on the server side.
+ * @self and @query are both reffed when this function is called, so can safely be freed after this function returns.
+ *
+ * For more details, see gdata_youtube_service_query_related(), which is the synchronous version of this function.
+ *
+ * When the operation is finished, @callback will be called. You can then call gdata_service_query_finish()
+ * to get the results of the operation.
+ *
+ * Since: 0.9.1
+ */
+void
+gdata_youtube_service_query_related_async (GDataYouTubeService *self, GDataYouTubeVideo *video, GDataQuery *query,
+ GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ gchar *uri;
+
+ g_return_if_fail (GDATA_IS_YOUTUBE_SERVICE (self));
+ g_return_if_fail (GDATA_IS_YOUTUBE_VIDEO (video));
+ g_return_if_fail (query == NULL || GDATA_IS_QUERY (query));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+ g_return_if_fail (callback != NULL);
+
+ uri = _gdata_service_build_uri ("https://www.googleapis.com/youtube/v3/search"
+ "?part=snippet"
+ "&type=video"
+ "&relatedToVideoId=%s",
+ gdata_entry_get_id (GDATA_ENTRY (video)));
+ gdata_service_query_async (GDATA_SERVICE (self),
+ get_youtube_authorization_domain (), uri,
+ query, GDATA_TYPE_YOUTUBE_VIDEO, cancellable,
+ progress_callback, progress_user_data,
+ destroy_progress_user_data, callback,
+ user_data);
+ g_free (uri);
+}
+
+/**
+ * gdata_youtube_service_upload_video:
+ * @self: a #GDataYouTubeService
+ * @video: a #GDataYouTubeVideo to insert
+ * @slug: the filename to give to the uploaded file
+ * @content_type: the content type of the uploaded data
+ * @cancellable: (allow-none): a #GCancellable for the entire upload stream, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Uploads a video to YouTube, using the properties from @video and the file data written to the resulting #GDataUploadStream.
+ *
+ * If @video has already been inserted, a %GDATA_SERVICE_ERROR_ENTRY_ALREADY_INSERTED error will be returned. If no user is authenticated
+ * with the service, %GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED will be returned.
+ *
+ * The stream returned by this function should be written to using the standard #GOutputStream methods, asynchronously or synchronously. Once the stream
+ * is closed (using g_output_stream_close()), gdata_youtube_service_finish_video_upload() should be called on it to parse and return the updated
+ * #GDataYouTubeVideo for the uploaded video. This must be done, as @video isn't updated in-place.
+ *
+ * In order to cancel the upload, a #GCancellable passed in to @cancellable must be cancelled using g_cancellable_cancel(). Cancelling the individual
+ * #GOutputStream operations on the #GDataUploadStream will not cancel the entire upload; merely the write or close operation in question. See the
+ * #GDataUploadStream:cancellable for more details.
+ *
+ * Any upload errors will be thrown by the stream methods, and may come from the #GDataServiceError domain.
+ *
+ * Return value: (transfer full): a #GDataUploadStream to write the video data to, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.8.0
+ */
+GDataUploadStream *
+gdata_youtube_service_upload_video (GDataYouTubeService *self, GDataYouTubeVideo *video, const gchar *slug, const gchar *content_type,
+ GCancellable *cancellable, GError **error)
+{
+ GOutputStream *stream = NULL; /* owned */
+
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_SERVICE (self), NULL);
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (video), NULL);
+ g_return_val_if_fail (slug != NULL && *slug != '\0', NULL);
+ g_return_val_if_fail (content_type != NULL && *content_type != '\0', NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ if (gdata_entry_is_inserted (GDATA_ENTRY (video)) == TRUE) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_ENTRY_ALREADY_INSERTED,
+ _("The entry has already been inserted."));
+ return NULL;
+ }
+
+ /* FIXME: Could be more cunning about domains here; see scope on
+ * https://developers.google.com/youtube/v3/guides/authentication */
+ if (gdata_authorizer_is_authorized_for_domain (gdata_service_get_authorizer (GDATA_SERVICE (self)),
+ get_youtube_authorization_domain ()) == FALSE) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED,
+ _("You must be authenticated to upload a video."));
+ return NULL;
+ }
+
+ /* FIXME: Add support for resumable uploads. That means a new
+ * gdata_youtube_service_upload_video_resumable() method a la
+ * Documents. */
+ stream = gdata_upload_stream_new (GDATA_SERVICE (self),
+ get_youtube_authorization_domain (),
+ SOUP_METHOD_POST,
+ "https://www.googleapis.com/upload/youtube/v3/videos"
+ "?part=snippet,status,"
+ "recordingDetails",
+ GDATA_ENTRY (video), slug,
+ content_type,
+ cancellable);
+
+ return GDATA_UPLOAD_STREAM (stream);
+}
+
+/**
+ * gdata_youtube_service_finish_video_upload:
+ * @self: a #GDataYouTubeService
+ * @upload_stream: the #GDataUploadStream from the operation
+ * @error: a #GError, or %NULL
+ *
+ * Finish off a video upload operation started by gdata_youtube_service_upload_video(), parsing the result and returning the new #GDataYouTubeVideo.
+ *
+ * If an error occurred during the upload operation, it will have been returned during the operation (e.g. by g_output_stream_splice() or one
+ * of the other stream methods). In such a case, %NULL will be returned but @error will remain unset. @error is only set in the case that the server
+ * indicates that the operation was successful, but an error is encountered in parsing the result sent by the server.
+ *
+ * Return value: (transfer full): the new #GDataYouTubeVideo, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.8.0
+ */
+GDataYouTubeVideo *
+gdata_youtube_service_finish_video_upload (GDataYouTubeService *self, GDataUploadStream *upload_stream, GError **error)
+{
+ const gchar *response_body;
+ gssize response_length;
+
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_SERVICE (self), NULL);
+ g_return_val_if_fail (GDATA_IS_UPLOAD_STREAM (upload_stream), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ /* Get the response from the server */
+ response_body = gdata_upload_stream_get_response (upload_stream, &response_length);
+ if (response_body == NULL || response_length == 0)
+ return NULL;
+
+ /* Parse the response to produce a GDataYouTubeVideo */
+ return GDATA_YOUTUBE_VIDEO (gdata_parsable_new_from_json (GDATA_TYPE_YOUTUBE_VIDEO,
+ response_body,
+ (gint) response_length,
+ error));
+}
+
+/**
+ * gdata_youtube_service_get_developer_key:
+ * @self: a #GDataYouTubeService
+ *
+ * Gets the #GDataYouTubeService:developer-key property from the #GDataYouTubeService.
+ *
+ * Return value: the developer key property
+ */
+const gchar *
+gdata_youtube_service_get_developer_key (GDataYouTubeService *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_SERVICE (self), NULL);
+ return self->priv->developer_key;
+}
+
+/**
+ * gdata_youtube_service_get_categories:
+ * @self: a #GDataYouTubeService
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Gets a list of the categories currently in use on YouTube. The returned #GDataAPPCategories contains a list of #GDataYouTubeCategorys which
+ * enumerate the current YouTube categories.
+ *
+ * The category labels (#GDataCategory:label) are localised based on the value of #GDataService:locale.
+ *
+ * Return value: (transfer full): a #GDataAPPCategories, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.7.0
+ */
+GDataAPPCategories *
+gdata_youtube_service_get_categories (GDataYouTubeService *self, GCancellable *cancellable, GError **error)
+{
+ const gchar *locale;
+ gchar *uri;
+ SoupMessage *message;
+ GDataAPPCategories *categories;
+
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_SERVICE (self), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ /* Download the category list. Note that this is (service)
+ * locale-dependent, and a locale must always be specified. */
+ locale = gdata_service_get_locale (GDATA_SERVICE (self));
+ if (locale == NULL) {
+ locale = "US";
+ }
+
+ uri = _gdata_service_build_uri ("https://www.googleapis.com/youtube/v3/videoCategories"
+ "?part=snippet"
+ "®ionCode=%s",
+ locale);
+ message = _gdata_service_query (GDATA_SERVICE (self),
+ get_youtube_authorization_domain (),
+ uri, NULL, cancellable, error);
+ g_free (uri);
+
+ if (message == NULL)
+ return NULL;
+
+ g_assert (message->response_body->data != NULL);
+ categories = GDATA_APP_CATEGORIES (_gdata_parsable_new_from_json (GDATA_TYPE_APP_CATEGORIES,
+ message->response_body->data,
+ message->response_body->length,
+ GSIZE_TO_POINTER (GDATA_TYPE_YOUTUBE_CATEGORY),
+ error));
+ g_object_unref (message);
+
+ return categories;
+}
+
+static void
+get_categories_thread (GTask *task, gpointer source_object, gpointer task_data, GCancellable *cancellable)
+{
+ GDataYouTubeService *service = GDATA_YOUTUBE_SERVICE (source_object);
+ g_autoptr(GDataAPPCategories) categories = NULL;
+ g_autoptr(GError) error = NULL;
+
+ /* Get the categories and return */
+ categories = gdata_youtube_service_get_categories (service, cancellable, &error);
+ if (error != NULL)
+ g_task_return_error (task, g_steal_pointer (&error));
+ else
+ g_task_return_pointer (task, g_steal_pointer (&categories), g_object_unref);
+}
+
+/**
+ * gdata_youtube_service_get_categories_async:
+ * @self: a #GDataYouTubeService
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when the request is finished
+ * @user_data: (closure): data to pass to the @callback function
+ *
+ * Gets a list of the categories currently in use on YouTube. @self is reffed when this function is called, so can safely be unreffed after this
+ * function returns.
+ *
+ * For more details, see gdata_youtube_service_get_categories(), which is the synchronous version of this function.
+ *
+ * When the operation is finished, @callback will be called. You can then call gdata_youtube_service_get_categories_finish() to get the results of the
+ * operation.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_youtube_service_get_categories_async (GDataYouTubeService *self, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_autoptr(GTask) task = NULL;
+
+ g_return_if_fail (GDATA_IS_YOUTUBE_SERVICE (self));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+ g_return_if_fail (callback != NULL);
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, gdata_youtube_service_get_categories_async);
+ g_task_run_in_thread (task, get_categories_thread);
+}
+
+/**
+ * gdata_youtube_service_get_categories_finish:
+ * @self: a #GDataYouTubeService
+ * @async_result: a #GAsyncResult
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous request for a list of categories on YouTube, as started with gdata_youtube_service_get_categories_async().
+ *
+ * Return value: (transfer full): a #GDataAPPCategories, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.7.0
+ */
+GDataAPPCategories *
+gdata_youtube_service_get_categories_finish (GDataYouTubeService *self, GAsyncResult *async_result, GError **error)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_SERVICE (self), NULL);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (async_result), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+ g_return_val_if_fail (g_task_is_valid (async_result, self), NULL);
+ g_return_val_if_fail (g_async_result_is_tagged (async_result, gdata_youtube_service_get_categories_async), NULL);
+
+ return g_task_propagate_pointer (G_TASK (async_result), error);
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2008-2009, 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_YOUTUBE_SERVICE_H
+#define GDATA_YOUTUBE_SERVICE_H
+
+#include <glib.h>
+#include <glib-object.h>
+#include <libsoup/soup.h>
+
+#include <gdata/gdata-service.h>
+#include <gdata/gdata-upload-stream.h>
+#include <gdata/services/youtube/gdata-youtube-video.h>
+#include <gdata/app/gdata-app-categories.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDataYouTubeStandardFeedType:
+ * @GDATA_YOUTUBE_TOP_RATED_FEED: This feed contains the most highly rated
+ * YouTube videos. Deprecated: 0.17.0: Google no longer supports this feed
+ * type, and it will return results equivalent to
+ * %GDATA_YOUTUBE_MOST_POPULAR_FEED.
+ * @GDATA_YOUTUBE_TOP_FAVORITES_FEED: This feed contains videos most frequently
+ * flagged as favorite videos. Deprecated: 0.17.0: Google no longer
+ * supports this feed type, and it will return results equivalent to
+ * %GDATA_YOUTUBE_MOST_POPULAR_FEED.
+ * @GDATA_YOUTUBE_MOST_VIEWED_FEED: This feed contains the most frequently
+ * watched YouTube videos. Deprecated: 0.17.0: Google no longer supports
+ * this feed type, and it will return results equivalent to
+ * %GDATA_YOUTUBE_MOST_POPULAR_FEED.
+ * @GDATA_YOUTUBE_MOST_POPULAR_FEED: This feed contains the most popular YouTube
+ * videos, selected using an algorithm that combines many different signals to
+ * determine overall popularity. As of version 0.17.0, this is the only
+ * supported feed type.
+ * @GDATA_YOUTUBE_MOST_RECENT_FEED: This feed contains the videos most recently
+ * submitted to YouTube. Deprecated: 0.17.0: Google no longer supports
+ * this feed type, and it will return results equivalent to
+ * %GDATA_YOUTUBE_MOST_POPULAR_FEED.
+ * @GDATA_YOUTUBE_MOST_DISCUSSED_FEED: This feed contains the YouTube videos
+ * that have received the most comments. Deprecated: 0.17.0: Google no
+ * longer supports this feed type, and it will return results equivalent to
+ * %GDATA_YOUTUBE_MOST_POPULAR_FEED.
+ * @GDATA_YOUTUBE_MOST_LINKED_FEED: This feed contains the YouTube videos that
+ * receive the most links from other websites. Deprecated: 0.17.0: Google
+ * no longer supports this feed type, and it will return results equivalent to
+ * %GDATA_YOUTUBE_MOST_POPULAR_FEED.
+ * @GDATA_YOUTUBE_MOST_RESPONDED_FEED: This feed contains YouTube videos that
+ * receive the most video responses. Deprecated: 0.17.0: Google no longer
+ * supports this feed type, and it will return results equivalent to
+ * %GDATA_YOUTUBE_MOST_POPULAR_FEED.
+ * @GDATA_YOUTUBE_RECENTLY_FEATURED_FEED: This feed contains videos recently
+ * featured on the YouTube home page or featured videos tab. Deprecated:
+ * 0.17.0: Google no longer supports this feed type, and it will return
+ * results equivalent to %GDATA_YOUTUBE_MOST_POPULAR_FEED.
+ * @GDATA_YOUTUBE_WATCH_ON_MOBILE_FEED: This feed contains videos suitable for
+ * playback on mobile devices. Deprecated: 0.17.0: Google no longer
+ * supports this feed type, and it will return results equivalent to
+ * %GDATA_YOUTUBE_MOST_POPULAR_FEED.
+ *
+ * Standard feed types for standard feed queries with
+ * gdata_youtube_service_query_standard_feed(). For more information, see the
+ * <ulink type="http" url="https://developers.google.com/youtube/2.0/developers_guide_protocol_video_feeds#Standard_feeds">online
+ * documentation</ulink>.
+ */
+typedef enum {
+ GDATA_YOUTUBE_TOP_RATED_FEED,
+ GDATA_YOUTUBE_TOP_FAVORITES_FEED,
+ GDATA_YOUTUBE_MOST_VIEWED_FEED,
+ GDATA_YOUTUBE_MOST_POPULAR_FEED,
+ GDATA_YOUTUBE_MOST_RECENT_FEED,
+ GDATA_YOUTUBE_MOST_DISCUSSED_FEED,
+ GDATA_YOUTUBE_MOST_LINKED_FEED,
+ GDATA_YOUTUBE_MOST_RESPONDED_FEED,
+ GDATA_YOUTUBE_RECENTLY_FEATURED_FEED,
+ GDATA_YOUTUBE_WATCH_ON_MOBILE_FEED
+} GDataYouTubeStandardFeedType;
+
+/**
+ * GDataYouTubeServiceError:
+ * @GDATA_YOUTUBE_SERVICE_ERROR_API_QUOTA_EXCEEDED: the API request quota for this developer account has been exceeded
+ * @GDATA_YOUTUBE_SERVICE_ERROR_ENTRY_QUOTA_EXCEEDED: the entry (e.g. video) quota for this user account has been exceeded
+ * @GDATA_YOUTUBE_SERVICE_ERROR_CHANNEL_REQUIRED: the currently authenticated user doesn't have a YouTube channel, but the current action requires one;
+ * if this error is received, inform the user that they need a YouTube channel, and provide a link to
+ * <ulink type="http" url="https://www.youtube.com/create_channel">https://www.youtube.com/create_channel</ulink>
+ *
+ * Error codes for #GDataYouTubeService operations.
+ */
+typedef enum {
+ GDATA_YOUTUBE_SERVICE_ERROR_API_QUOTA_EXCEEDED,
+ GDATA_YOUTUBE_SERVICE_ERROR_ENTRY_QUOTA_EXCEEDED,
+ GDATA_YOUTUBE_SERVICE_ERROR_CHANNEL_REQUIRED,
+} GDataYouTubeServiceError;
+
+#define GDATA_TYPE_YOUTUBE_SERVICE (gdata_youtube_service_get_type ())
+#define GDATA_YOUTUBE_SERVICE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_YOUTUBE_SERVICE, GDataYouTubeService))
+#define GDATA_YOUTUBE_SERVICE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_YOUTUBE_SERVICE, GDataYouTubeServiceClass))
+#define GDATA_IS_YOUTUBE_SERVICE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_YOUTUBE_SERVICE))
+#define GDATA_IS_YOUTUBE_SERVICE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_YOUTUBE_SERVICE))
+#define GDATA_YOUTUBE_SERVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_YOUTUBE_SERVICE, GDataYouTubeServiceClass))
+
+#define GDATA_YOUTUBE_SERVICE_ERROR gdata_youtube_service_error_quark ()
+
+typedef struct _GDataYouTubeServicePrivate GDataYouTubeServicePrivate;
+
+/**
+ * GDataYouTubeService:
+ *
+ * All the fields in the #GDataYouTubeService structure are private and should never be accessed directly.
+ */
+typedef struct {
+ GDataService parent;
+ GDataYouTubeServicePrivate *priv;
+} GDataYouTubeService;
+
+/**
+ * GDataYouTubeServiceClass:
+ *
+ * All the fields in the #GDataYouTubeServiceClass structure are private and should never be accessed directly.
+ */
+typedef struct {
+ /*< private >*/
+ GDataServiceClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+ void (*_g_reserved2) (void);
+ void (*_g_reserved3) (void);
+ void (*_g_reserved4) (void);
+ void (*_g_reserved5) (void);
+} GDataYouTubeServiceClass;
+
+GType gdata_youtube_service_get_type (void) G_GNUC_CONST;
+GQuark gdata_youtube_service_error_quark (void) G_GNUC_CONST;
+
+GDataYouTubeService *gdata_youtube_service_new (const gchar *developer_key, GDataAuthorizer *authorizer) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+GDataAuthorizationDomain *gdata_youtube_service_get_primary_authorization_domain (void) G_GNUC_CONST;
+
+GDataFeed *gdata_youtube_service_query_standard_feed (GDataYouTubeService *self, GDataYouTubeStandardFeedType feed_type, GDataQuery *query,
+ GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_youtube_service_query_standard_feed_async (GDataYouTubeService *self, GDataYouTubeStandardFeedType feed_type, GDataQuery *query,
+ GCancellable *cancellable,
+ GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
+ GAsyncReadyCallback callback, gpointer user_data);
+
+GDataFeed *gdata_youtube_service_query_videos (GDataYouTubeService *self, GDataQuery *query,
+ GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_youtube_service_query_videos_async (GDataYouTubeService *self, GDataQuery *query,
+ GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
+ GAsyncReadyCallback callback, gpointer user_data);
+
+GDataFeed *gdata_youtube_service_query_related (GDataYouTubeService *self, GDataYouTubeVideo *video, GDataQuery *query,
+ GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_youtube_service_query_related_async (GDataYouTubeService *self, GDataYouTubeVideo *video, GDataQuery *query,
+ GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+ GDestroyNotify destroy_progress_user_data,
+ GAsyncReadyCallback callback, gpointer user_data);
+
+GDataUploadStream *gdata_youtube_service_upload_video (GDataYouTubeService *self, GDataYouTubeVideo *video, const gchar *slug,
+ const gchar *content_type, GCancellable *cancellable,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+GDataYouTubeVideo *gdata_youtube_service_finish_video_upload (GDataYouTubeService *self, GDataUploadStream *upload_stream,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+const gchar *gdata_youtube_service_get_developer_key (GDataYouTubeService *self) G_GNUC_PURE;
+
+GDataAPPCategories *gdata_youtube_service_get_categories (GDataYouTubeService *self, GCancellable *cancellable,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+void gdata_youtube_service_get_categories_async (GDataYouTubeService *self, GCancellable *cancellable, GAsyncReadyCallback callback,
+ gpointer user_data);
+GDataAPPCategories *gdata_youtube_service_get_categories_finish (GDataYouTubeService *self, GAsyncResult *async_result,
+ GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+G_END_DECLS
+
+#endif /* !GDATA_YOUTUBE_SERVICE_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009–2010, 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-youtube-state
+ * @short_description: YouTube state element
+ * @stability: Stable
+ * @include: gdata/services/youtube/gdata-youtube-state.h
+ *
+ * #GDataYouTubeState represents a "state" element from the
+ * <ulink type="http" url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_yt:state">YouTube namespace</ulink>.
+ *
+ * Since: 0.4.0
+ */
+
+#include <glib.h>
+
+#include "gdata-youtube-state.h"
+#include "gdata-parsable.h"
+
+static void gdata_youtube_state_finalize (GObject *object);
+static void gdata_youtube_state_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void
+gdata_youtube_state_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
+
+struct _GDataYouTubeStatePrivate {
+ gchar *name;
+ gchar *reason_code;
+ gchar *help_uri;
+ gchar *message;
+};
+
+enum {
+ PROP_NAME = 1,
+ PROP_REASON_CODE,
+ PROP_HELP_URI,
+ PROP_MESSAGE
+};
+
+G_DEFINE_TYPE (GDataYouTubeState, gdata_youtube_state, GDATA_TYPE_PARSABLE)
+
+static void
+gdata_youtube_state_class_init (GDataYouTubeStateClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataYouTubeStatePrivate));
+
+ gobject_class->get_property = gdata_youtube_state_get_property;
+ gobject_class->set_property = gdata_youtube_state_set_property;
+ gobject_class->finalize = gdata_youtube_state_finalize;
+
+ /**
+ * GDataYouTubeState:name:
+ *
+ * The name of the status of the unpublished video. Valid values are: "processing", "restricted", "deleted", "rejected" and "failed".
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_yt:state">online documentation</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_NAME,
+ g_param_spec_string ("name",
+ "Name", "The name of the status of the unpublished video.",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeState:reason-code:
+ *
+ * The reason code explaining why the video failed to upload.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_yt:state">online documentation</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_REASON_CODE,
+ g_param_spec_string ("reason-code",
+ "Reason code", "The reason code explaining why the video failed to upload.",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeState:help-uri:
+ *
+ * A URI for a YouTube Help Center page that may help the developer or the video owner to diagnose
+ * the reason that an upload failed or was rejected.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_yt:state">online documentation</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_HELP_URI,
+ g_param_spec_string ("help-uri",
+ "Help URI", "A URI for a YouTube Help Center page.",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeState:message:
+ *
+ * A human-readable description of why the video failed to upload.
+ *
+ * For more information, see the
+ * <ulink type="http" url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_yt:state">online documentation</ulink>.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_MESSAGE,
+ g_param_spec_string ("message",
+ "Message", "A human-readable description of why the video failed to upload.",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_youtube_state_init (GDataYouTubeState *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_YOUTUBE_STATE, GDataYouTubeStatePrivate);
+}
+
+static void
+gdata_youtube_state_finalize (GObject *object)
+{
+ GDataYouTubeStatePrivate *priv = GDATA_YOUTUBE_STATE (object)->priv;
+
+ g_free (priv->name);
+ g_free (priv->reason_code);
+ g_free (priv->help_uri);
+ g_free (priv->message);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_youtube_state_parent_class)->finalize (object);
+}
+
+static void
+gdata_youtube_state_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataYouTubeStatePrivate *priv = GDATA_YOUTUBE_STATE (object)->priv;
+
+ switch (property_id) {
+ case PROP_NAME:
+ g_value_set_string (value, priv->name);
+ break;
+ case PROP_REASON_CODE:
+ g_value_set_string (value, priv->reason_code);
+ break;
+ case PROP_HELP_URI:
+ g_value_set_string (value, priv->help_uri);
+ break;
+ case PROP_MESSAGE:
+ g_value_set_string (value, priv->message);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_youtube_state_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ GDataYouTubeStatePrivate *priv = GDATA_YOUTUBE_STATE (object)->priv;
+
+ switch (property_id) {
+ case PROP_NAME:
+ priv->name = g_value_dup_string (value);
+ break;
+ case PROP_REASON_CODE:
+ priv->reason_code = g_value_dup_string (value);
+ break;
+ case PROP_HELP_URI:
+ priv->help_uri = g_value_dup_string (value);
+ break;
+ case PROP_MESSAGE:
+ priv->message = g_value_dup_string (value);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+/**
+ * gdata_youtube_state_get_name:
+ * @self: a #GDataYouTubeState
+ *
+ * Gets the #GDataYouTubeState:name property.
+ *
+ * Return value: the status name
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_youtube_state_get_name (GDataYouTubeState *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_STATE (self), NULL);
+ return self->priv->name;
+}
+
+/**
+ * gdata_youtube_state_get_reason_code:
+ * @self: a #GDataYouTubeState
+ *
+ * Gets the #GDataYouTubeState:reason-code property.
+ *
+ * Return value: the status reason code, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_youtube_state_get_reason_code (GDataYouTubeState *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_STATE (self), NULL);
+ return self->priv->reason_code;
+}
+
+/**
+ * gdata_youtube_state_get_help_uri:
+ * @self: a #GDataYouTubeState
+ *
+ * Gets the #GDataYouTubeState:help-uri property.
+ *
+ * Return value: the help URI, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_youtube_state_get_help_uri (GDataYouTubeState *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_STATE (self), NULL);
+ return self->priv->help_uri;
+}
+
+/**
+ * gdata_youtube_state_get_message:
+ * @self: a #GDataYouTubeState
+ *
+ * Gets the #GDataYouTubeState:message property.
+ *
+ * Return value: the status message, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_youtube_state_get_message (GDataYouTubeState *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_STATE (self), NULL);
+ return self->priv->message;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_YOUTUBE_STATE_H
+#define GDATA_YOUTUBE_STATE_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-parsable.h>
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_YOUTUBE_STATE (gdata_youtube_state_get_type ())
+#define GDATA_YOUTUBE_STATE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_YOUTUBE_STATE, GDataYouTubeState))
+#define GDATA_YOUTUBE_STATE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_YOUTUBE_STATE, GDataYouTubeStateClass))
+#define GDATA_IS_YOUTUBE_STATE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_YOUTUBE_STATE))
+#define GDATA_IS_YOUTUBE_STATE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_YOUTUBE_STATE))
+#define GDATA_YOUTUBE_STATE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_YOUTUBE_STATE, GDataYouTubeStateClass))
+
+typedef struct _GDataYouTubeStatePrivate GDataYouTubeStatePrivate;
+
+/**
+ * GDataYouTubeState:
+ *
+ * All the fields in the #GDataYouTubeState structure are private and should never be accessed directly.
+ */
+typedef struct {
+ GDataParsable parent;
+ GDataYouTubeStatePrivate *priv;
+} GDataYouTubeState;
+
+/**
+ * GDataYouTubeStateClass:
+ *
+ * All the fields in the #GDataYouTubeStateClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.4.0
+ */
+typedef struct {
+ /*< private >*/
+ GDataParsableClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataYouTubeStateClass;
+
+GType gdata_youtube_state_get_type (void) G_GNUC_CONST;
+
+const gchar *gdata_youtube_state_get_name (GDataYouTubeState *self) G_GNUC_PURE;
+const gchar *gdata_youtube_state_get_reason_code (GDataYouTubeState *self) G_GNUC_PURE;
+const gchar *gdata_youtube_state_get_help_uri (GDataYouTubeState *self) G_GNUC_PURE;
+const gchar *gdata_youtube_state_get_message (GDataYouTubeState *self) G_GNUC_PURE;
+
+G_END_DECLS
+
+#endif /* !GDATA_YOUTUBE_STATE_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2008–2010, 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:gdata-youtube-video
+ * @short_description: GData YouTube video object
+ * @stability: Stable
+ * @include: gdata/services/youtube/gdata-youtube-video.h
+ *
+ * #GDataYouTubeVideo is a subclass of #GDataEntry to represent a single video on YouTube, either when uploading or querying.
+ *
+ * #GDataYouTubeVideo implements #GDataCommentable, allowing comments on videos
+ * to be queried and added.
+ *
+ * For more details of YouTube’s GData API, see the
+ * <ulink type="http" url="https://developers.google.com/youtube/v3/docs/">
+ * online documentation</ulink>.
+ *
+ * <example>
+ * <title>Getting Basic Video Data</title>
+ * <programlisting>
+ * GDataYouTubeVideo *video;
+ * const gchar *video_id, *title, *player_uri, *description, *video_uri = NULL;
+ * gint64 updated, published;
+ * GDataMediaContent *content;
+ * GList *thumbnails;
+ *
+ * video = gdata_youtube_service_query_single_video (service, NULL, "R-9gzmQHoe0", NULL, NULL);
+ *
+ * video_id = gdata_entry_get_id (GDATA_ENTRY (video)); /<!-- -->* e.g. "R-9gzmQHoe0" *<!-- -->/
+ * title = gdata_entry_get_title (GDATA_ENTRY (video)); /<!-- -->* e.g. "Korpiklaani Vodka (official video 2009)" *<!-- -->/
+ * player_uri = gdata_youtube_video_get_player_uri (video); /<!-- -->* e.g. "http://www.youtube.com/watch?v=ZTUVgYoeN_b" *<!-- -->/
+ * description = gdata_youtube_video_get_description (video); /<!-- -->* e.g. "Vodka is the first single from the album..." *<!-- -->/
+ * published = gdata_entry_get_published (GDATA_ENTRY (video)); /<!-- -->* Date and time the video was originally published *<!-- -->/
+ * updated = gdata_entry_get_updated (GDATA_ENTRY (video)); /<!-- -->* When the video was most recently updated by the author *<!-- -->/
+ *
+ * /<!-- -->* Get a list of GDataMediaThumbnails for the video *<!-- -->/
+ * for (thumbnails = gdata_youtube_video_get_thumbnails (video); thumbnails != NULL; thumbnails = thumbnails->next)
+ * download_and_do_something_with_thumbnail (gdata_media_thumbnail_get_uri (thumbnail));
+ *
+ * g_object_unref (video);
+ * </programlisting>
+ * </example>
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <json-glib/json-glib.h>
+#include <string.h>
+
+#include "gdata-youtube-video.h"
+#include "gdata-private.h"
+#include "gdata-service.h"
+#include "gdata-parser.h"
+#include "media/gdata-media-category.h"
+#include "media/gdata-media-thumbnail.h"
+#include "gdata-types.h"
+#include "gdata-youtube-enums.h"
+#include "gdata-commentable.h"
+#include "gdata-youtube-comment.h"
+#include "gdata-youtube-service.h"
+
+static void gdata_youtube_video_dispose (GObject *object);
+static void gdata_youtube_video_finalize (GObject *object);
+static void gdata_youtube_video_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void gdata_youtube_video_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static gboolean parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error);
+static gboolean post_parse_json (GDataParsable *parsable, gpointer user_data, GError **error);
+static void get_json (GDataParsable *parsable, JsonBuilder *builder);
+static const gchar *get_content_type (void);
+static gchar *get_entry_uri (const gchar *id) G_GNUC_WARN_UNUSED_RESULT;
+static void gdata_youtube_video_commentable_init (GDataCommentableInterface *iface);
+static GDataAuthorizationDomain *get_authorization_domain (GDataCommentable *self) G_GNUC_CONST;
+static gchar *get_query_comments_uri (GDataCommentable *self) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
+static gchar *get_insert_comment_uri (GDataCommentable *self, GDataComment *comment_) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
+static gboolean is_comment_deletable (GDataCommentable *self, GDataComment *comment_);
+
+struct _GDataYouTubeVideoPrivate {
+ guint view_count;
+ guint favorite_count;
+ gchar *location;
+ GHashTable/*<owned utf8, GDataYouTubePermission>*/ *access_controls;
+
+ /* gd:rating attributes */
+ struct {
+ guint min;
+ guint max;
+ guint count;
+ gdouble average;
+ } rating;
+
+ gchar **keywords;
+ gchar *player_uri;
+ gchar **region_restriction_allowed;
+ gchar **region_restriction_blocked;
+ GHashTable *content_ratings; /* owned string → owned string */
+ GList *thumbnails; /* GDataMediaThumbnail */
+ GDataMediaCategory *category;
+ guint duration;
+ gboolean is_private;
+ gchar *channel_id; /* owned */
+
+ /* Location. */
+ gdouble latitude;
+ gdouble longitude;
+
+ /* Other properties */
+ gchar *rejection_reason;
+ gchar *processing_status;
+ gchar *upload_status;
+ gchar *failure_reason;
+ GDataYouTubeState *upload_state; /* owned */
+
+ gint64 recorded;
+
+ /* State for parse_json(). */
+ gboolean parsing_in_video_list_response;
+};
+
+enum {
+ PROP_VIEW_COUNT = 1,
+ PROP_FAVORITE_COUNT,
+ PROP_LOCATION,
+ PROP_MIN_RATING,
+ PROP_MAX_RATING,
+ PROP_RATING_COUNT,
+ PROP_AVERAGE_RATING,
+ PROP_KEYWORDS,
+ PROP_PLAYER_URI,
+ PROP_CATEGORY,
+ PROP_CREDIT,
+ PROP_DESCRIPTION,
+ PROP_DURATION,
+ PROP_IS_PRIVATE,
+ PROP_UPLOADED,
+ PROP_VIDEO_ID,
+ PROP_IS_DRAFT,
+ PROP_STATE,
+ PROP_RECORDED,
+ PROP_ASPECT_RATIO,
+ PROP_LATITUDE,
+ PROP_LONGITUDE
+};
+
+G_DEFINE_TYPE_WITH_CODE (GDataYouTubeVideo, gdata_youtube_video, GDATA_TYPE_ENTRY,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMMENTABLE, gdata_youtube_video_commentable_init))
+
+static void
+gdata_youtube_video_class_init (GDataYouTubeVideoClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
+ GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataYouTubeVideoPrivate));
+
+ gobject_class->get_property = gdata_youtube_video_get_property;
+ gobject_class->set_property = gdata_youtube_video_set_property;
+ gobject_class->dispose = gdata_youtube_video_dispose;
+ gobject_class->finalize = gdata_youtube_video_finalize;
+
+ parsable_class->parse_json = parse_json;
+ parsable_class->post_parse_json = post_parse_json;
+ parsable_class->get_json = get_json;
+ parsable_class->get_content_type = get_content_type;
+
+ entry_class->get_entry_uri = get_entry_uri;
+ entry_class->kind_term = "youtube#video"; /* also: youtube#searchResult */
+
+ /**
+ * GDataYouTubeVideo:view-count:
+ *
+ * The number of times the video has been viewed.
+ *
+ * For more information, see the <ulink type="http"
+ * url="https://developers.google.com/youtube/v3/docs/videos#statistics.viewCount">online documentation</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_VIEW_COUNT,
+ g_param_spec_uint ("view-count",
+ "View count", "The number of times the video has been viewed.",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeVideo:favorite-count:
+ *
+ * The number of users who have added the video to their favorites.
+ *
+ * For more information, see the <ulink type="http"
+ * url="https://developers.google.com/youtube/v3/docs/videos#statistics.favoriteCount">online documentation</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_FAVORITE_COUNT,
+ g_param_spec_uint ("favorite-count",
+ "Favorite count", "The number of users who have added the video to their favorites.",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeVideo:location:
+ *
+ * Descriptive text about the location where the video was taken.
+ *
+ * For more information, see the <ulink type="http"
+ * url="https://developers.google.com/youtube/v3/docs/videos#recordingDetails.locationDescription">online documentation</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_LOCATION,
+ g_param_spec_string ("location",
+ "Location", "Descriptive text about the location where the video was taken.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeVideo:min-rating:
+ *
+ * The minimum allowed rating for the video.
+ *
+ * For more information, see the <ulink type="http"
+ * url="https://developers.google.com/youtube/v3/docs/videos#statistics.likeCount">online documentation</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_MIN_RATING,
+ g_param_spec_uint ("min-rating",
+ "Minimum rating", "The minimum allowed rating for the video.",
+ 0, G_MAXUINT, 1, /* defaults to 1 */
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeVideo:max-rating:
+ *
+ * The maximum allowed rating for the video.
+ *
+ * For more information, see the <ulink type="http"
+ * url="https://developers.google.com/youtube/v3/docs/videos#statistics.likeCount">online documentation</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_MAX_RATING,
+ g_param_spec_uint ("max-rating",
+ "Maximum rating", "The maximum allowed rating for the video.",
+ 0, G_MAXUINT, 5, /* defaults to 5 */
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeVideo:rating-count:
+ *
+ * The number of times the video has been rated.
+ *
+ * For more information, see the <ulink type="http"
+ * url="https://developers.google.com/youtube/v3/docs/videos#statistics.likeCount">online documentation</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_RATING_COUNT,
+ g_param_spec_uint ("rating-count",
+ "Rating count", "The number of times the video has been rated.",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeVideo:average-rating:
+ *
+ * The average rating of the video, over all the ratings it's received.
+ *
+ * For more information, see the <ulink type="http"
+ * url="https://developers.google.com/youtube/v3/docs/videos#statistics.likeCount">online documentation</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_AVERAGE_RATING,
+ g_param_spec_double ("average-rating",
+ "Average rating", "The average rating of the video.",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeVideo:keywords:
+ *
+ * A %NULL-terminated array of words associated with the video.
+ *
+ * For more information, see the <ulink type="http"
+ * url="https://developers.google.com/youtube/v3/docs/videos#snippet.tags[]">online documentation</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_KEYWORDS,
+ g_param_spec_boxed ("keywords",
+ "Keywords", "A NULL-terminated array of words associated with the video.",
+ G_TYPE_STRV,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeVideo:player-uri:
+ *
+ * A URI for a browser-based media player for the full-length video (i.e. the video's page on YouTube).
+ */
+ g_object_class_install_property (gobject_class, PROP_PLAYER_URI,
+ g_param_spec_string ("player-uri",
+ "Player URI", "A URI for a browser-based media player for the full-length video.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeVideo:category:
+ *
+ * Specifies a genre or developer tag that describes the video.
+ *
+ * For more information, see the <ulink type="http"
+ * url="https://developers.google.com/youtube/v3/docs/videos#snippet.categoryId">online documentation</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_CATEGORY,
+ g_param_spec_object ("category",
+ "Category", "Specifies a genre or developer tag that describes the video.",
+ GDATA_TYPE_MEDIA_CATEGORY,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
+ /**
+ * GDataYouTubeVideo:credit:
+ *
+ * Identifies the owner of the video.
+ *
+ * Deprecated: 0.17.0: This is no longer supported by Google, and
+ * will always be %NULL. There is no replacement.
+ */
+ g_object_class_install_property (gobject_class, PROP_CREDIT,
+ g_param_spec_object ("credit",
+ "Credit", "Identifies the owner of the video.",
+ GDATA_TYPE_YOUTUBE_CREDIT,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS |
+ G_PARAM_DEPRECATED));
+
+ G_GNUC_END_IGNORE_DEPRECATIONS
+
+ /**
+ * GDataYouTubeVideo:description:
+ *
+ * A summary or description of the video.
+ *
+ * For more information, see the <ulink type="http"
+ * url="https://developers.google.com/youtube/v3/docs/videos#snippet.description">online documentation</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_DESCRIPTION,
+ g_param_spec_string ("description",
+ "Description", "A summary or description of the video.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeVideo:duration:
+ *
+ * The duration of the video in seconds.
+ *
+ * For more information, see the <ulink type="http"
+ * url="https://developers.google.com/youtube/v3/docs/videos#contentDetails.duration">online documentation</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_DURATION,
+ g_param_spec_uint ("duration",
+ "Duration", "The duration of the video in seconds.",
+ 0, G_MAXINT, 0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeVideo:private:
+ *
+ * Indicates whether the video is private, meaning that it will not be publicly visible on YouTube's website.
+ *
+ * For more information, see the <ulink type="http"
+ * url="https://developers.google.com/youtube/v3/docs/videos#status.privacyStatus">online documentation</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_IS_PRIVATE,
+ g_param_spec_boolean ("is-private",
+ "Private?", "Indicates whether the video is private.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeVideo:uploaded:
+ *
+ * Specifies the time the video was originally uploaded to YouTube.
+ *
+ * For more information, see the <ulink type="http"
+ * url="https://developers.google.com/youtube/v3/docs/videos#snippet.publishedAt">online documentation</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_UPLOADED,
+ g_param_spec_int64 ("uploaded",
+ "Uploaded", "Specifies the time the video was originally uploaded to YouTube.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeVideo:video-id:
+ *
+ * Specifies a unique ID which YouTube uses to identify the video. For example: <literal>qz8EfkS4KK0</literal>.
+ *
+ * For more information, see the <ulink type="http"
+ * url="https://developers.google.com/youtube/v3/docs/videos#id">online documentation</ulink>.
+ *
+ * Deprecated: 0.17.0: This is now equal to #GDataEntry:id.
+ */
+ g_object_class_install_property (gobject_class, PROP_VIDEO_ID,
+ g_param_spec_string ("video-id",
+ "Video ID", "Specifies a unique ID which YouTube uses to identify the video.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS |
+ G_PARAM_DEPRECATED));
+
+ /**
+ * GDataYouTubeVideo:is-draft:
+ *
+ * Indicates whether the video is in draft, or unpublished, status.
+ *
+ * Deprecated: 0.17.0: This is now equal to
+ * #GDataYouTubeVideo:is-private.
+ */
+ g_object_class_install_property (gobject_class, PROP_IS_DRAFT,
+ g_param_spec_boolean ("is-draft",
+ "Draft?", "Indicates whether the video is in draft, or unpublished, status.",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+ G_PARAM_DEPRECATED));
+
+ /**
+ * GDataYouTubeVideo:state:
+ *
+ * Information describing the state of the video. If this is non-%NULL, the video is not playable.
+ * It points to a #GDataYouTubeState.
+ *
+ * For more information, see the <ulink type="http"
+ * url="https://developers.google.com/youtube/v3/docs/videos#status.uploadStatus">online documentation</ulink>.
+ */
+ g_object_class_install_property (gobject_class, PROP_STATE,
+ g_param_spec_object ("state",
+ "State", "Information describing the state of the video.",
+ GDATA_TYPE_YOUTUBE_STATE,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeVideo:recorded:
+ *
+ * Specifies the time the video was originally recorded.
+ *
+ * For more information, see the <ulink type="http"
+ * url="https://developers.google.com/youtube/v3/docs/videos#recordingDetails.recordingDate">online documentation</ulink>.
+ *
+ * Since: 0.3.0
+ */
+ g_object_class_install_property (gobject_class, PROP_RECORDED,
+ g_param_spec_int64 ("recorded",
+ "Recorded", "Specifies the time the video was originally recorded.",
+ -1, G_MAXINT64, -1,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeVideo:aspect-ratio:
+ *
+ * The aspect ratio of the video. A %NULL value means the aspect ratio is unknown (it could still be a widescreen video). A value of
+ * %GDATA_YOUTUBE_ASPECT_RATIO_WIDESCREEN means the video is definitely widescreen.
+ *
+ * Since: 0.4.0
+ */
+ g_object_class_install_property (gobject_class, PROP_ASPECT_RATIO,
+ g_param_spec_string ("aspect-ratio",
+ "Aspect Ratio", "The aspect ratio of the video.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeVideo:latitude:
+ *
+ * The location as a latitude coordinate associated with this video. Valid latitudes range from <code class="literal">-90.0</code>
+ * to <code class="literal">90.0</code> inclusive. Set to a value
+ * outside this range to unset the location.
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/youtube/v3/docs/videos#recordingDetails.location.latitude">
+ * online documentation</ulink>.
+ *
+ * Since: 0.8.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LATITUDE,
+ g_param_spec_double ("latitude",
+ "Latitude", "The location as a latitude coordinate associated with this video.",
+ G_MINDOUBLE, G_MAXDOUBLE, G_MAXDOUBLE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GDataYouTubeVideo:longitude:
+ *
+ * The location as a longitude coordinate associated with this video. Valid longitudes range from <code class="literal">-180.0</code>
+ * to <code class="literal">180.0</code> inclusive. Set to a value
+ * outside this range to unset the location.
+ *
+ * For more information, see the
+ * <ulink type="http" url="https://developers.google.com/youtube/v3/docs/videos#recordingDetails.location.longitude">
+ * online documentation</ulink>.
+ *
+ * Since: 0.8.0
+ */
+ g_object_class_install_property (gobject_class, PROP_LONGITUDE,
+ g_param_spec_double ("longitude",
+ "Longitude", "The location as a longitude coordinate associated with this video.",
+ G_MINDOUBLE, G_MAXDOUBLE, G_MAXDOUBLE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gdata_youtube_video_commentable_init (GDataCommentableInterface *iface)
+{
+ iface->comment_type = GDATA_TYPE_YOUTUBE_COMMENT;
+ iface->get_authorization_domain = get_authorization_domain;
+ iface->get_query_comments_uri = get_query_comments_uri;
+ iface->get_insert_comment_uri = get_insert_comment_uri;
+ iface->is_comment_deletable = is_comment_deletable;
+}
+
+static void
+gdata_youtube_video_init (GDataYouTubeVideo *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_YOUTUBE_VIDEO, GDataYouTubeVideoPrivate);
+ self->priv->recorded = -1;
+ self->priv->access_controls = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify) g_free, NULL);
+ self->priv->latitude = G_MAXDOUBLE;
+ self->priv->longitude = G_MAXDOUBLE;
+}
+
+static void
+gdata_youtube_video_dispose (GObject *object)
+{
+ GDataYouTubeVideoPrivate *priv = GDATA_YOUTUBE_VIDEO (object)->priv;
+
+ g_clear_object (&priv->category);
+ g_list_free_full (priv->thumbnails, (GDestroyNotify) g_object_unref);
+ g_clear_object (&priv->upload_state);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_youtube_video_parent_class)->dispose (object);
+}
+
+static void
+gdata_youtube_video_finalize (GObject *object)
+{
+ GDataYouTubeVideoPrivate *priv = GDATA_YOUTUBE_VIDEO (object)->priv;
+
+ g_free (priv->location);
+ g_hash_table_destroy (priv->access_controls);
+ g_strfreev (priv->keywords);
+ g_free (priv->channel_id);
+ g_free (priv->player_uri);
+ g_strfreev (priv->region_restriction_allowed);
+ g_strfreev (priv->region_restriction_blocked);
+ g_clear_pointer (&priv->content_ratings, g_hash_table_unref);
+ g_free (priv->rejection_reason);
+ g_free (priv->processing_status);
+ g_free (priv->upload_status);
+ g_free (priv->failure_reason);
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_youtube_video_parent_class)->finalize (object);
+}
+
+static void
+gdata_youtube_video_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GDataYouTubeVideoPrivate *priv = GDATA_YOUTUBE_VIDEO (object)->priv;
+
+ switch (property_id) {
+ case PROP_VIEW_COUNT:
+ g_value_set_uint (value, priv->view_count);
+ break;
+ case PROP_FAVORITE_COUNT:
+ g_value_set_uint (value, priv->favorite_count);
+ break;
+ case PROP_LOCATION:
+ g_value_set_string (value, priv->location);
+ break;
+ case PROP_MIN_RATING:
+ g_value_set_uint (value, priv->rating.min);
+ break;
+ case PROP_MAX_RATING:
+ g_value_set_uint (value, priv->rating.max);
+ break;
+ case PROP_RATING_COUNT:
+ g_value_set_uint (value, priv->rating.count);
+ break;
+ case PROP_AVERAGE_RATING:
+ g_value_set_double (value, priv->rating.average);
+ break;
+ case PROP_KEYWORDS:
+ g_value_set_boxed (value, priv->keywords);
+ break;
+ case PROP_PLAYER_URI:
+ g_value_set_string (value, gdata_youtube_video_get_player_uri (GDATA_YOUTUBE_VIDEO (object)));
+ break;
+ case PROP_CATEGORY:
+ g_value_set_object (value, priv->category);
+ break;
+ case PROP_CREDIT:
+ g_value_set_object (value, NULL);
+ break;
+ case PROP_DESCRIPTION:
+ g_value_set_string (value, gdata_entry_get_summary (GDATA_ENTRY (object)));
+ break;
+ case PROP_DURATION:
+ g_value_set_uint (value, priv->duration);
+ break;
+ case PROP_IS_PRIVATE:
+ g_value_set_boolean (value, priv->is_private);
+ break;
+ case PROP_UPLOADED:
+ g_value_set_int64 (value, gdata_entry_get_published (GDATA_ENTRY (object)));
+ break;
+ case PROP_VIDEO_ID:
+ g_value_set_string (value, gdata_entry_get_id (GDATA_ENTRY (object)));
+ break;
+ case PROP_IS_DRAFT:
+ g_value_set_boolean (value, gdata_youtube_video_is_private (GDATA_YOUTUBE_VIDEO (object)));
+ break;
+ case PROP_STATE:
+ g_value_set_object (value, gdata_youtube_video_get_state (GDATA_YOUTUBE_VIDEO (object)));
+ break;
+ case PROP_RECORDED:
+ g_value_set_int64 (value, priv->recorded);
+ break;
+ case PROP_ASPECT_RATIO:
+ g_value_set_string (value, gdata_youtube_video_get_aspect_ratio (GDATA_YOUTUBE_VIDEO (object)));
+ break;
+ case PROP_LATITUDE:
+ g_value_set_double (value, priv->latitude);
+ break;
+ case PROP_LONGITUDE:
+ g_value_set_double (value, priv->longitude);
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdata_youtube_video_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GDataYouTubeVideo *self = GDATA_YOUTUBE_VIDEO (object);
+
+ switch (property_id) {
+ case PROP_LOCATION:
+ gdata_youtube_video_set_location (self, g_value_get_string (value));
+ break;
+ case PROP_KEYWORDS:
+ gdata_youtube_video_set_keywords (self, g_value_get_boxed (value));
+ break;
+ case PROP_CATEGORY:
+ gdata_youtube_video_set_category (self, g_value_get_object (value));
+ break;
+ case PROP_DESCRIPTION:
+ gdata_youtube_video_set_description (self, g_value_get_string (value));
+ break;
+ case PROP_IS_PRIVATE:
+ gdata_youtube_video_set_is_private (self, g_value_get_boolean (value));
+ break;
+ case PROP_IS_DRAFT:
+ gdata_youtube_video_set_is_private (self, g_value_get_boolean (value));
+ break;
+ case PROP_RECORDED:
+ gdata_youtube_video_set_recorded (self, g_value_get_int64 (value));
+ break;
+ case PROP_ASPECT_RATIO:
+ gdata_youtube_video_set_aspect_ratio (self, g_value_get_string (value));
+ break;
+ case PROP_LATITUDE:
+ gdata_youtube_video_set_coordinates (self,
+ g_value_get_double (value),
+ self->priv->longitude);
+ break;
+ case PROP_LONGITUDE:
+ gdata_youtube_video_set_coordinates (self,
+ self->priv->latitude,
+ g_value_get_double (value));
+ break;
+ default:
+ /* We don't have any other property... */
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+/* https://developers.google.com/youtube/v3/docs/videos#contentDetails.duration
+ *
+ * Note that it can also include an ‘hours’ component, as specified in ISO 8601,
+ * but not in the Google documentation. */
+static gboolean
+duration_from_json_member (JsonReader *reader, const gchar *member_name,
+ GDataParserOptions options, guint *output,
+ gboolean *success, GError **error)
+{
+ gchar *duration_str = NULL, *i = NULL, *new_i = NULL;
+ guint64 seconds;
+ gboolean child_success = FALSE;
+
+ if (!gdata_parser_string_from_json_member (reader, member_name, options,
+ &duration_str,
+ &child_success, error)) {
+ return FALSE;
+ }
+
+ *success = child_success;
+ *output = 0;
+
+ if (!child_success) {
+ return TRUE;
+ }
+
+ /* Parse the string. Format: ‘PT(hH)?(mM)?(sS)?’, where ‘h’, ‘m’ and ‘s’
+ * are integer numbers of hours, minutes and seconds. Each element may
+ * not be present. */
+ i = duration_str;
+ if (strncmp (duration_str, "PT", 2) != 0) {
+ goto error;
+ }
+
+ i += 2; /* PT */
+
+ seconds = 0;
+
+ while (*i != '\0') {
+ guint64 element;
+ gchar designator;
+
+ element = g_ascii_strtoull (i, &new_i, 10);
+ if (new_i == i) {
+ goto error;
+ }
+
+ i = new_i;
+
+ designator = i[0];
+ if (designator == 'H') {
+ seconds += 60 * 60 * element;
+ } else if (designator == 'M') {
+ seconds += 60 * element;
+ } else if (designator == 'S') {
+ seconds += element;
+ } else {
+ goto error;
+ }
+
+ i += 1;
+ }
+
+ *output = seconds;
+ *success = child_success;
+
+ g_free (duration_str);
+
+ return TRUE;
+
+error:
+ gdata_parser_error_not_iso8601_format_json (reader, duration_str,
+ error);
+ g_free (duration_str);
+
+ return TRUE;
+}
+
+/* https://developers.google.com/youtube/v3/docs/videos#snippet.thumbnails */
+static gboolean
+thumbnails_from_json_member (JsonReader *reader, const gchar *member_name,
+ GDataParserOptions options, GList **output,
+ gboolean *success, GError **error)
+{
+ guint i, len;
+ GList *thumbnails = NULL;
+ const GError *child_error = NULL;
+
+ /* Check if there's such element */
+ if (g_strcmp0 (json_reader_get_member_name (reader),
+ member_name) != 0) {
+ return FALSE;
+ }
+
+ /* Check if the output string has already been set. The JSON parser
+ * guarantees this can't happen. */
+ g_assert (!(options & P_NO_DUPES) || *output == NULL);
+
+ len = json_reader_count_members (reader);
+ child_error = json_reader_get_error (reader);
+
+ if (child_error != NULL) {
+ *success = gdata_parser_error_from_json_error (reader,
+ child_error,
+ error);
+ goto done;
+ }
+
+ for (i = 0; i < len; i++) {
+ GDataParsable *thumbnail = NULL; /* GDataMediaThumbnail */
+
+ json_reader_read_element (reader, i);
+ thumbnail = _gdata_parsable_new_from_json_node (GDATA_TYPE_MEDIA_THUMBNAIL,
+ reader, NULL,
+ error);
+ json_reader_end_element (reader);
+
+ if (thumbnail == NULL) {
+ *success = FALSE;
+ goto done;
+ }
+
+ thumbnails = g_list_prepend (thumbnails, thumbnail);
+ }
+
+ /* Success! */
+ *output = thumbnails;
+ thumbnails = NULL;
+ *success = TRUE;
+
+done:
+ g_list_free_full (thumbnails, (GDestroyNotify) g_object_unref);
+
+ return TRUE;
+}
+
+/* https://developers.google.com/youtube/v3/docs/videos#contentDetails.regionRestriction */
+static gboolean
+restricted_countries_from_json_member (JsonReader *reader,
+ const gchar *member_name,
+ GDataParserOptions options,
+ gchar ***output_allowed,
+ gchar ***output_blocked,
+ gboolean *success, GError **error)
+{
+ guint i, len;
+ const GError *child_error = NULL;
+
+ /* Check if there's such element */
+ if (g_strcmp0 (json_reader_get_member_name (reader),
+ member_name) != 0) {
+ return FALSE;
+ }
+
+ /* Check if the output string has already been set. The JSON parser guarantees this can't happen. */
+ g_assert (!(options & P_NO_DUPES) ||
+ (*output_allowed == NULL && *output_blocked == NULL));
+
+ len = json_reader_count_members (reader);
+ child_error = json_reader_get_error (reader);
+
+ if (child_error != NULL) {
+ *success = gdata_parser_error_from_json_error (reader,
+ child_error,
+ error);
+ return TRUE;
+ }
+
+ for (i = 0; i < len; i++) {
+ json_reader_read_element (reader, i);
+
+ if (gdata_parser_strv_from_json_member (reader, "allowed",
+ P_DEFAULT,
+ output_allowed, success,
+ error) ||
+ gdata_parser_strv_from_json_member (reader, "blocked",
+ P_DEFAULT,
+ output_blocked, success,
+ error)) {
+ /* Nothing to do. */
+ }
+
+ json_reader_end_element (reader);
+ }
+
+ /* Success! */
+ *success = TRUE;
+
+ return TRUE;
+}
+
+/* https://developers.google.com/youtube/v3/docs/videos#contentDetails.contentRating */
+static gboolean
+content_rating_from_json_member (JsonReader *reader,
+ const gchar *member_name,
+ GDataParserOptions options,
+ GHashTable **output,
+ gboolean *success, GError **error)
+{
+ guint i, len;
+ const GError *child_error = NULL;
+
+ /* Check if there's such element */
+ if (g_strcmp0 (json_reader_get_member_name (reader),
+ member_name) != 0) {
+ return FALSE;
+ }
+
+ /* Check if the output string has already been set. The JSON parser
+ * guarantees this can't happen. */
+ g_assert (!(options & P_NO_DUPES) || *output == NULL);
+
+ len = json_reader_count_members (reader);
+ child_error = json_reader_get_error (reader);
+
+ if (child_error != NULL) {
+ *success = gdata_parser_error_from_json_error (reader,
+ child_error,
+ error);
+ return TRUE;
+ }
+
+ *output = g_hash_table_new_full (g_str_hash, g_str_equal,
+ g_free, g_free);
+
+ for (i = 0; i < len; i++) {
+ const gchar *scheme, *rating;
+
+ json_reader_read_element (reader, i);
+
+ scheme = json_reader_get_member_name (reader);
+ rating = json_reader_get_string_value (reader);
+
+ /* Ignore errors. */
+ if (rating != NULL) {
+ g_hash_table_insert (*output, g_strdup (scheme),
+ g_strdup (rating));
+ }
+
+ json_reader_end_element (reader);
+ }
+
+ /* Success! */
+ *success = TRUE;
+
+ return TRUE;
+}
+
+static guint64
+parse_uint64_from_json_string_member (JsonReader *reader,
+ const gchar *member_name,
+ GError **error)
+{
+ const gchar *str_val, *end_ptr;
+ guint64 out;
+ const GError *child_error = NULL;
+
+ /* Grab the string. */
+ json_reader_read_member (reader, member_name);
+
+ str_val = json_reader_get_string_value (reader);
+ child_error = json_reader_get_error (reader);
+
+ if (child_error != NULL) {
+ gdata_parser_error_from_json_error (reader, child_error, error);
+ out = 0;
+ goto done;
+ }
+
+ /* Try and parse it as an integer. */
+ out = g_ascii_strtoull (str_val, (gchar **) &end_ptr, 10);
+
+ if (*end_ptr != '\0') {
+ gdata_parser_error_required_json_content_missing (reader,
+ error);
+ out = 0;
+ goto done;
+ }
+
+done:
+ json_reader_end_member (reader);
+
+ return out;
+}
+
+static gboolean
+parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error)
+{
+ gboolean success;
+ GDataYouTubeVideo *self = GDATA_YOUTUBE_VIDEO (parsable);
+ GDataYouTubeVideoPrivate *priv = self->priv;
+
+ /* HACK: When called with gdata_service_query_single_entry(), the video
+ * list endpoint returns a 0–1 item list of results as a normal feed.
+ * (See: https://developers.google.com/youtube/v3/docs/videos/list)
+ * This differs from the v2 API, which returned just the entry.
+ *
+ * So, we need a hack to extract the single entry from the feed without
+ * being able to invoke the parsing machinery in GDataFeed, because
+ * gdata_service_query_single_entry() can’t do that. Do that by checking
+ * the kind, and then ignoring all subsequent members until we reach the
+ * items member. Recursively parse in there, then break out again.
+ * This all assumes that we see the kind member before items. */
+ if (g_strcmp0 (json_reader_get_member_name (reader), "kind") == 0 &&
+ g_strcmp0 (json_reader_get_string_value (reader),
+ "youtube#videoListResponse") == 0) {
+ priv->parsing_in_video_list_response = TRUE;
+ return TRUE;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "items") == 0 &&
+ priv->parsing_in_video_list_response) {
+ guint i;
+
+ /* Instead of a 404 when searching for an invalid ID, the server
+ * returns an empty results list. */
+ if (json_reader_count_elements (reader) != 1) {
+ g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_NOT_FOUND,
+ /* Translators: the parameter is an error message returned by the server. */
+ _("The requested resource was not found: %s"),
+ "items");
+ return TRUE;
+ }
+
+ /* Parse the first (and only) array element. */
+ json_reader_read_element (reader, 0);
+ priv->parsing_in_video_list_response = FALSE;
+
+ /* Parse all its properties. */
+ for (i = 0; i < (guint) json_reader_count_members (reader); i++) {
+ g_return_val_if_fail (json_reader_read_element (reader, i), FALSE);
+
+ if (GDATA_PARSABLE_GET_CLASS (self)->parse_json (GDATA_PARSABLE (self), reader, user_data, error) == FALSE) {
+ json_reader_end_element (reader);
+ break;
+ }
+
+ json_reader_end_element (reader);
+ }
+
+ priv->parsing_in_video_list_response = TRUE;
+ json_reader_end_element (reader);
+
+ return TRUE; /* handled */
+ } else if (priv->parsing_in_video_list_response) {
+ /* Ignore the member. */
+ return TRUE;
+ }
+
+ /* Actual video property parsing. */
+ if (g_strcmp0 (json_reader_get_member_name (reader), "id") == 0) {
+ const gchar *id = NULL;
+
+ /* If this is a youtube#searchResult, the id will be an object:
+ * https://developers.google.com/youtube/v3/docs/search#resource
+ * If it is a youtube#video, the id will be a string:
+ * https://developers.google.com/youtube/v3/docs/videos#resource
+ */
+
+ if (json_reader_is_value (reader)) {
+ id = json_reader_get_string_value (reader);
+ } else if (json_reader_is_object (reader)) {
+ json_reader_read_member (reader, "videoId");
+ id = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+ }
+
+ /* Empty ID? */
+ if (id == NULL || *id == '\0') {
+ return gdata_parser_error_required_json_content_missing (reader, error);
+ }
+
+ _gdata_entry_set_id (GDATA_ENTRY (parsable), id);
+
+ return TRUE;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader),
+ "snippet") == 0) {
+ guint i;
+
+ /* Check this is an object. */
+ if (!json_reader_is_object (reader)) {
+ return gdata_parser_error_required_json_content_missing (reader, error);
+ }
+
+ for (i = 0; i < (guint) json_reader_count_members (reader); i++) {
+ gint64 published_at;
+ gchar *title = NULL, *description = NULL;
+ gchar *category_id = NULL;
+
+ json_reader_read_element (reader, i);
+
+ if (gdata_parser_int64_time_from_json_member (reader, "publishedAt", P_DEFAULT, &published_at, &success, error)) {
+ if (success) {
+ _gdata_entry_set_published (GDATA_ENTRY (parsable),
+ published_at);
+ }
+ } else if (gdata_parser_string_from_json_member (reader, "title", P_DEFAULT, &title, &success, error)) {
+ if (success) {
+ gdata_entry_set_title (GDATA_ENTRY (parsable),
+ title);
+ }
+
+ g_free (title);
+ } else if (gdata_parser_string_from_json_member (reader, "description", P_DEFAULT, &description, &success, error)) {
+ if (success) {
+ gdata_entry_set_summary (GDATA_ENTRY (parsable),
+ description);
+ }
+
+ g_free (description);
+ } else if (gdata_parser_strv_from_json_member (reader, "tags", P_DEFAULT, &priv->keywords, &success, error) ||
+ thumbnails_from_json_member (reader, "thumbnails", P_DEFAULT, &priv->thumbnails, &success, error) ||
+ gdata_parser_string_from_json_member (reader, "channelId", P_DEFAULT, &priv->channel_id, &success, error)) {
+ /* Fall through. */
+ } else if (gdata_parser_string_from_json_member (reader, "categoryId", P_DEFAULT, &category_id, &success, error)) {
+ if (success) {
+ priv->category = gdata_media_category_new (category_id,
+ NULL,
+ NULL);
+ }
+
+ g_free (category_id);
+ }
+
+ json_reader_end_element (reader);
+
+ if (!success) {
+ return FALSE;
+ }
+ }
+
+ return TRUE;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader),
+ "contentDetails") == 0) {
+ guint i;
+
+ /* Check this is an object. */
+ if (!json_reader_is_object (reader)) {
+ return gdata_parser_error_required_json_content_missing (reader, error);
+ }
+
+ for (i = 0; i < (guint) json_reader_count_members (reader); i++) {
+ json_reader_read_element (reader, i);
+
+ if (duration_from_json_member (reader, "duration", P_DEFAULT, &priv->duration, &success, error) ||
+ restricted_countries_from_json_member (reader, "regionRestriction", P_DEFAULT, &priv->region_restriction_allowed, &priv->region_restriction_blocked, &success, error) ||
+ content_rating_from_json_member (reader, "contentRating", P_DEFAULT, &priv->content_ratings, &success, error)) {
+ /* Fall through. */
+ }
+
+ json_reader_end_element (reader);
+
+ if (!success) {
+ return FALSE;
+ }
+ }
+
+ return TRUE;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader),
+ "status") == 0) {
+ const gchar *privacy_status;
+
+ /* Check this is an object. */
+ if (!json_reader_is_object (reader)) {
+ return gdata_parser_error_required_json_content_missing (reader, error);
+ }
+
+ json_reader_read_member (reader, "privacyStatus");
+ privacy_status = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ if (g_strcmp0 (privacy_status, "private") == 0) {
+ priv->is_private = TRUE;
+ } else if (g_strcmp0 (privacy_status, "public") == 0) {
+ priv->is_private = FALSE;
+ g_hash_table_insert (priv->access_controls,
+ g_strdup ("list"),
+ GINT_TO_POINTER (GDATA_YOUTUBE_PERMISSION_ALLOWED));
+ } else if (g_strcmp0 (privacy_status, "unlisted") == 0) {
+ /* See: ‘list’ on
+ * https://developers.google.com/youtube/2.0/reference?csw=1#youtube_data_api_tag_yt:accessControl */
+ priv->is_private = FALSE;
+ g_hash_table_insert (priv->access_controls,
+ g_strdup ("list"),
+ GINT_TO_POINTER (GDATA_YOUTUBE_PERMISSION_DENIED));
+ }
+
+ json_reader_read_member (reader, "embeddable");
+ g_hash_table_insert (priv->access_controls,
+ g_strdup (GDATA_YOUTUBE_ACTION_EMBED),
+ GINT_TO_POINTER (json_reader_get_boolean_value (reader) ?
+ GDATA_YOUTUBE_PERMISSION_ALLOWED :
+ GDATA_YOUTUBE_PERMISSION_DENIED));
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "uploadStatus");
+ priv->upload_status = g_strdup (json_reader_get_string_value (reader));
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "failureReason");
+ priv->rejection_reason = g_strdup (json_reader_get_string_value (reader));
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "rejectionReason");
+ priv->rejection_reason = g_strdup (json_reader_get_string_value (reader));
+ json_reader_end_member (reader);
+
+ return TRUE;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader),
+ "statistics") == 0) {
+ gint64 likes, dislikes;
+ GError *child_error = NULL;
+
+ /* Check this is an object. */
+ if (!json_reader_is_object (reader)) {
+ return gdata_parser_error_required_json_content_missing (reader, error);
+ }
+
+ /* Views and favourites. For some unknown reason, the feed
+ * returns them as a string, even though they’re documented as
+ * being unsigned longs.
+ *
+ * Reference: https://developers.google.com/youtube/v3/docs/videos#statistics */
+ priv->view_count = parse_uint64_from_json_string_member (reader, "viewCount", &child_error);
+ if (child_error != NULL) {
+ g_propagate_error (error, child_error);
+ return FALSE;
+ }
+
+ priv->favorite_count = parse_uint64_from_json_string_member (reader, "favoriteCount", &child_error);
+ if (child_error != NULL) {
+ g_propagate_error (error, child_error);
+ return FALSE;
+ }
+
+ /* The new ratings API (total likes, total dislikes) doesn’t
+ * really match with the old API (collection of integer ratings
+ * between 1 and 5). Try and return something appropriate. */
+ likes = parse_uint64_from_json_string_member (reader, "likeCount", &child_error);
+ if (child_error != NULL) {
+ g_propagate_error (error, child_error);
+ return FALSE;
+ }
+
+ dislikes = parse_uint64_from_json_string_member (reader, "dislikeCount", &child_error);
+ if (child_error != NULL) {
+ g_propagate_error (error, child_error);
+ return FALSE;
+ }
+
+ priv->rating.min = 0;
+ priv->rating.max = 1;
+ priv->rating.count = likes + dislikes;
+ if (likes + dislikes == 0) {
+ priv->rating.average = 0.0; /* basically undefined */
+ } else {
+ priv->rating.average = (gdouble) likes / (gdouble) (likes + dislikes);
+ }
+
+ return TRUE;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader),
+ "processingDetails") == 0) {
+ /* Check this is an object. */
+ if (!json_reader_is_object (reader)) {
+ return gdata_parser_error_required_json_content_missing (reader, error);
+ }
+
+ json_reader_read_member (reader, "processingStatus");
+ priv->processing_status = g_strdup (json_reader_get_string_value (reader));
+ json_reader_end_member (reader);
+
+ return TRUE;
+ } else if (g_strcmp0 (json_reader_get_member_name (reader),
+ "recordingDetails") == 0) {
+ const gchar *recording_date;
+ const GError *child_error = NULL;
+
+ /* Check this is an object. */
+ if (!json_reader_is_object (reader)) {
+ return gdata_parser_error_required_json_content_missing (reader, error);
+ }
+
+ json_reader_read_member (reader, "recordingDate");
+ recording_date = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ if (recording_date != NULL &&
+ !gdata_parser_int64_from_date (recording_date,
+ &priv->recorded)) {
+ /* Error */
+ gdata_parser_error_not_iso8601_format_json (reader,
+ recording_date,
+ error);
+ return FALSE;
+ }
+
+ json_reader_read_member (reader, "locationDescription");
+ priv->location = g_strdup (json_reader_get_string_value (reader));
+ json_reader_end_member (reader);
+
+ if (json_reader_read_member (reader, "location")) {
+ json_reader_read_member (reader, "latitude");
+ priv->latitude = json_reader_get_double_value (reader);
+ json_reader_end_member (reader);
+
+ json_reader_read_member (reader, "longitude");
+ priv->longitude = json_reader_get_double_value (reader);
+ json_reader_end_member (reader);
+ }
+
+ json_reader_end_member (reader);
+
+ child_error = json_reader_get_error (reader);
+ if (child_error != NULL) {
+ return gdata_parser_error_from_json_error (reader,
+ child_error,
+ error);
+ }
+
+ return TRUE;
+ } else {
+ return GDATA_PARSABLE_CLASS (gdata_youtube_video_parent_class)->parse_json (parsable, reader, user_data, error);
+ }
+
+ return TRUE;
+}
+
+static gboolean
+post_parse_json (GDataParsable *parsable, gpointer user_data, GError **error)
+{
+ GDataLink *_link = NULL; /* owned */
+ const gchar *id;
+ gchar *uri = NULL; /* owned */
+
+ /* Set the self link, which is needed for
+ * gdata_service_delete_entry(). */
+ id = gdata_entry_get_id (GDATA_ENTRY (parsable));
+
+ if (id == NULL) {
+ return TRUE;
+ }
+
+ uri = _gdata_service_build_uri ("https://www.googleapis.com"
+ "/youtube/v3/videos"
+ "?id=%s", id);
+ _link = gdata_link_new (uri, GDATA_LINK_SELF);
+ gdata_entry_add_link (GDATA_ENTRY (parsable), _link);
+ g_object_unref (_link);
+ g_free (uri);
+
+ return TRUE;
+}
+
+static void
+get_json (GDataParsable *parsable, JsonBuilder *builder)
+{
+ GDataEntry *entry = GDATA_ENTRY (parsable);
+ GDataYouTubeVideoPrivate *priv = GDATA_YOUTUBE_VIDEO (parsable)->priv;
+ guint i;
+ gpointer permission_ptr;
+
+ /* Chain up to the parent class */
+ GDATA_PARSABLE_CLASS (gdata_youtube_video_parent_class)->get_json (parsable, builder);
+
+ /* Add the video-specific JSON.
+ * Reference:
+ * https://developers.google.com/youtube/v3/docs/videos/insert#request_body */
+ /* snippet object. */
+ json_builder_set_member_name (builder, "snippet");
+ json_builder_begin_object (builder);
+
+ if (gdata_entry_get_title (entry) != NULL) {
+ json_builder_set_member_name (builder, "title");
+ json_builder_add_string_value (builder,
+ gdata_entry_get_title (entry));
+ }
+
+ if (gdata_entry_get_summary (entry) != NULL) {
+ json_builder_set_member_name (builder, "description");
+ json_builder_add_string_value (builder,
+ gdata_entry_get_summary (entry));
+ }
+
+ if (priv->keywords != NULL) {
+ json_builder_set_member_name (builder, "tags");
+ json_builder_begin_array (builder);
+
+ for (i = 0; priv->keywords[i] != NULL; i++) {
+ json_builder_add_string_value (builder,
+ priv->keywords[i]);
+ }
+
+ json_builder_end_array (builder);
+ }
+
+ if (priv->category != NULL) {
+ json_builder_set_member_name (builder, "categoryId");
+ json_builder_add_string_value (builder,
+ gdata_media_category_get_category (priv->category));
+ }
+
+ json_builder_end_object (builder);
+
+ /* status object. */
+ json_builder_set_member_name (builder, "status");
+ json_builder_begin_object (builder);
+
+ json_builder_set_member_name (builder, "privacyStatus");
+
+ if (!priv->is_private &&
+ g_hash_table_lookup_extended (priv->access_controls,
+ "list", NULL,
+ &permission_ptr)) {
+ GDataYouTubePermission perm;
+
+ perm = GPOINTER_TO_INT (permission_ptr);
+
+ /* See the ‘list’ documentation on:
+ * https://developers.google.com/youtube/2.0/reference?csw=1#youtube_data_api_tag_yt:accessControl */
+ json_builder_add_string_value (builder,
+ (perm == GDATA_YOUTUBE_PERMISSION_ALLOWED) ? "public" : "unlisted");
+ } else {
+ json_builder_add_string_value (builder,
+ priv->is_private ? "private" : "public");
+ }
+
+ if (g_hash_table_lookup_extended (priv->access_controls,
+ GDATA_YOUTUBE_ACTION_EMBED, NULL,
+ &permission_ptr)) {
+ GDataYouTubePermission perm;
+
+ perm = GPOINTER_TO_INT (permission_ptr);
+
+ json_builder_set_member_name (builder, "embeddable");
+ json_builder_add_boolean_value (builder,
+ perm == GDATA_YOUTUBE_PERMISSION_ALLOWED);
+ }
+
+ /* FIXME: add support for:
+ * publicStatsViewable
+ * publishAt
+ * license
+ */
+
+ json_builder_end_object (builder);
+
+ /* recordingDetails object. */
+ json_builder_set_member_name (builder, "recordingDetails");
+ json_builder_begin_object (builder);
+
+ if (priv->location != NULL) {
+ json_builder_set_member_name (builder, "locationDescription");
+ json_builder_add_string_value (builder, priv->location);
+ }
+
+ if (priv->latitude >= -90.0 && priv->latitude <= 90.0 &&
+ priv->longitude >= -180.0 && priv->longitude <= 180.0) {
+ json_builder_set_member_name (builder, "location");
+ json_builder_begin_object (builder);
+
+ json_builder_set_member_name (builder, "latitude");
+ json_builder_add_double_value (builder, priv->latitude);
+
+ json_builder_set_member_name (builder, "longitude");
+ json_builder_add_double_value (builder, priv->longitude);
+
+ json_builder_end_object (builder);
+ }
+
+ if (priv->recorded != -1) {
+ gchar *recorded = gdata_parser_date_from_int64 (priv->recorded);
+ json_builder_set_member_name (builder, "recordingDate");
+ json_builder_add_string_value (builder, recorded);
+ g_free (recorded);
+ }
+
+ json_builder_end_object (builder);
+}
+
+static const gchar *
+get_content_type (void)
+{
+ return "application/json";
+}
+
+static gchar *
+get_entry_uri (const gchar *id)
+{
+ const gchar *old_prefix = "tag:youtube.com,2008:video:";
+
+ /* For compatibility with previous video ID formats, strip off the v2
+ * ID prefix. */
+ if (g_str_has_prefix (id, old_prefix)) {
+ id += strlen (old_prefix);
+ }
+
+ /* Build the query URI for a single video. This is a bit of a pain,
+ * because it actually returns a list containing a single video, but
+ * there seems no other way to do it. See parsing_in_video_list_response
+ * in parse_json() for the fallout.
+ *
+ * Reference: https://developers.google.com/youtube/v3/docs/videos/list#part */
+ return _gdata_service_build_uri ("https://www.googleapis.com/youtube/v3/videos"
+ "?part=contentDetails,id,"
+ "recordingDetails,snippet,"
+ "status,statistics"
+ "&id=%s", id);
+}
+
+static GDataAuthorizationDomain *
+get_authorization_domain (GDataCommentable *self)
+{
+ return gdata_youtube_service_get_primary_authorization_domain ();
+}
+
+static gchar *
+get_query_comments_uri (GDataCommentable *self)
+{
+ const gchar *video_id;
+
+ video_id = gdata_entry_get_id (GDATA_ENTRY (self));
+
+ /* https://developers.google.com/youtube/v3/docs/commentThreads/list */
+ return _gdata_service_build_uri ("https://www.googleapis.com"
+ "/youtube/v3/commentThreads"
+ "?part=snippet"
+ "&videoId=%s", video_id);
+}
+
+G_GNUC_INTERNAL void
+_gdata_youtube_comment_set_video_id (GDataYouTubeComment *self,
+ const gchar *video_id);
+G_GNUC_INTERNAL void
+_gdata_youtube_comment_set_channel_id (GDataYouTubeComment *self,
+ const gchar *channel_id);
+
+static gchar *
+get_insert_comment_uri (GDataCommentable *self, GDataComment *comment_)
+{
+ const gchar *video_id, *channel_id;
+ GDataYouTubeVideoPrivate *priv = GDATA_YOUTUBE_VIDEO (self)->priv;
+
+ video_id = gdata_entry_get_id (GDATA_ENTRY (self));
+ channel_id = priv->channel_id;
+
+ /* https://developers.google.com/youtube/v3/docs/commentThreads/insert
+ *
+ * We have to set the video ID on the @comment_. */
+ _gdata_youtube_comment_set_video_id (GDATA_YOUTUBE_COMMENT (comment_),
+ video_id);
+ _gdata_youtube_comment_set_channel_id (GDATA_YOUTUBE_COMMENT (comment_),
+ channel_id);
+
+ return _gdata_service_build_uri ("https://www.googleapis.com"
+ "/youtube/v3/commentThreads"
+ "?part=snippet"
+ "&shareOnGooglePlus=false");
+}
+
+static gboolean
+is_comment_deletable (GDataCommentable *self, GDataComment *comment_)
+{
+ /* FIXME: Currently unsupported:
+ * https://developers.google.com/youtube/v3/migration-guide#to_be_migrated
+ * https://developers.google.com/youtube/v3/guides/implementation/comments#comments-delete */
+ return FALSE;
+}
+
+/**
+ * gdata_youtube_video_new:
+ * @id: (allow-none): the video's ID, or %NULL
+ *
+ * Creates a new #GDataYouTubeVideo with the given ID and default properties.
+ *
+ * Return value: a new #GDataYouTubeVideo; unref with g_object_unref()
+ */
+GDataYouTubeVideo *
+gdata_youtube_video_new (const gchar *id)
+{
+ return g_object_new (GDATA_TYPE_YOUTUBE_VIDEO, "id", id, NULL);
+}
+
+/**
+ * gdata_youtube_video_get_view_count:
+ * @self: a #GDataYouTubeVideo
+ *
+ * Gets the #GDataYouTubeVideo:view-count property.
+ *
+ * Return value: the number of times the video has been viewed
+ */
+guint
+gdata_youtube_video_get_view_count (GDataYouTubeVideo *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), 0);
+ return self->priv->view_count;
+}
+
+/**
+ * gdata_youtube_video_get_favorite_count:
+ * @self: a #GDataYouTubeVideo
+ *
+ * Gets the #GDataYouTubeVideo:favorite-count property.
+ *
+ * Return value: the number of users who have added the video to their favorites list
+ */
+guint
+gdata_youtube_video_get_favorite_count (GDataYouTubeVideo *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), 0);
+ return self->priv->favorite_count;
+}
+
+/**
+ * gdata_youtube_video_get_location:
+ * @self: a #GDataYouTubeVideo
+ *
+ * Gets the #GDataYouTubeVideo:location property.
+ *
+ * Return value: a string describing the video's location, or %NULL
+ */
+const gchar *
+gdata_youtube_video_get_location (GDataYouTubeVideo *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), NULL);
+ return self->priv->location;
+}
+
+/**
+ * gdata_youtube_video_set_location:
+ * @self: a #GDataYouTubeVideo
+ * @location: (allow-none): a new location, or %NULL
+ *
+ * Sets the #GDataYouTubeVideo:location property to the new location string, @location.
+ *
+ * Set @location to %NULL to unset the property in the video.
+ */
+void
+gdata_youtube_video_set_location (GDataYouTubeVideo *self, const gchar *location)
+{
+ g_return_if_fail (GDATA_IS_YOUTUBE_VIDEO (self));
+
+ g_free (self->priv->location);
+ self->priv->location = g_strdup (location);
+ g_object_notify (G_OBJECT (self), "location");
+}
+
+/**
+ * gdata_youtube_video_get_access_control:
+ * @self: a #GDataYouTubeVideo
+ * @action: the action whose permission should be returned
+ *
+ * Gets the permission associated with the given @action on the #GDataYouTubeVideo. If the given @action
+ * doesn't have a permission set on the video, %GDATA_YOUTUBE_PERMISSION_DENIED is returned.
+ *
+ * Return value: the permission associated with @action, or %GDATA_YOUTUBE_PERMISSION_DENIED
+ *
+ * Since: 0.7.0
+ */
+GDataYouTubePermission
+gdata_youtube_video_get_access_control (GDataYouTubeVideo *self, const gchar *action)
+{
+ gpointer value;
+
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), GDATA_YOUTUBE_PERMISSION_DENIED);
+ g_return_val_if_fail (action != NULL, GDATA_YOUTUBE_PERMISSION_DENIED);
+
+ if (g_hash_table_lookup_extended (self->priv->access_controls, action, NULL, &value) == FALSE)
+ return GDATA_YOUTUBE_PERMISSION_DENIED;
+ return GPOINTER_TO_INT (value);
+}
+
+/**
+ * gdata_youtube_video_set_access_control:
+ * @self: a #GDataYouTubeVideo
+ * @action: the action whose permission is being set
+ * @permission: the permission to give to the action
+ *
+ * Sets the permission associated with @action on the #GDataYouTubeVideo, allowing restriction or derestriction of various
+ * operations on YouTube videos.
+ *
+ * Note that only %GDATA_YOUTUBE_ACTION_RATE and %GDATA_YOUTUBE_ACTION_COMMENT actions can have the %GDATA_YOUTUBE_PERMISSION_MODERATED permission.
+ *
+ * Since: 0.7.0
+ */
+void
+gdata_youtube_video_set_access_control (GDataYouTubeVideo *self, const gchar *action, GDataYouTubePermission permission)
+{
+ g_return_if_fail (GDATA_IS_YOUTUBE_VIDEO (self));
+ g_return_if_fail (action != NULL);
+
+ g_hash_table_replace (self->priv->access_controls, g_strdup (action), GINT_TO_POINTER (permission));
+}
+
+/**
+ * gdata_youtube_video_get_rating:
+ * @self: a #GDataYouTubeVideo
+ * @min: (out caller-allocates) (allow-none): return location for the minimum rating value, or %NULL
+ * @max: (out caller-allocates) (allow-none): return location for the maximum rating value, or %NULL
+ * @count: (out caller-allocates) (allow-none): return location for the number of ratings, or %NULL
+ * @average: (out caller-allocates) (allow-none): return location for the average rating value, or %NULL
+ *
+ * Gets various properties of the ratings on the video.
+ *
+ * Note that this property may not be retrieved when querying for multiple
+ * videos at once, but is guaranteed to be retrieved when querying with
+ * gdata_service_query_single_entry_async().
+ */
+void
+gdata_youtube_video_get_rating (GDataYouTubeVideo *self, guint *min, guint *max, guint *count, gdouble *average)
+{
+ g_return_if_fail (GDATA_IS_YOUTUBE_VIDEO (self));
+ if (min != NULL)
+ *min = self->priv->rating.min;
+ if (max != NULL)
+ *max = self->priv->rating.max;
+ if (count != NULL)
+ *count = self->priv->rating.count;
+ if (average != NULL)
+ *average = self->priv->rating.average;
+}
+
+/**
+ * gdata_youtube_video_get_keywords:
+ * @self: a #GDataYouTubeVideo
+ *
+ * Gets the #GDataYouTubeVideo:keywords property.
+ *
+ * Return value: (array zero-terminated=1) (transfer none): a %NULL-terminated array of words associated with the video
+ */
+const gchar * const *
+gdata_youtube_video_get_keywords (GDataYouTubeVideo *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), NULL);
+ return (const gchar * const *) self->priv->keywords;
+}
+
+/**
+ * gdata_youtube_video_set_keywords:
+ * @self: a #GDataYouTubeVideo
+ * @keywords: (array zero-terminated=1): a new %NULL-terminated array of keywords
+ *
+ * Sets the #GDataYouTubeVideo:keywords property to the new keyword list, @keywords.
+ *
+ * @keywords must not be %NULL. For more information, see the <ulink type="http"
+ * url="https://developers.google.com/youtube/v3/docs/videos#snippet.tags[]">online documentation</ulink>.
+ */
+void
+gdata_youtube_video_set_keywords (GDataYouTubeVideo *self, const gchar * const *keywords)
+{
+ g_return_if_fail (GDATA_IS_YOUTUBE_VIDEO (self));
+ g_return_if_fail (keywords != NULL);
+
+ g_strfreev (self->priv->keywords);
+ self->priv->keywords = g_strdupv ((gchar **) keywords);
+ g_object_notify (G_OBJECT (self), "keywords");
+}
+
+/**
+ * gdata_youtube_video_get_player_uri:
+ * @self: a #GDataYouTubeVideo
+ *
+ * Gets the #GDataYouTubeVideo:player-uri property.
+ *
+ * Return value: a URI where the video is playable in a web browser, or %NULL
+ */
+const gchar *
+gdata_youtube_video_get_player_uri (GDataYouTubeVideo *self)
+{
+ GDataYouTubeVideoPrivate *priv;
+
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), NULL);
+
+ priv = self->priv;
+
+ /* Generate and cache the player URI. */
+ if (priv->player_uri == NULL) {
+ priv->player_uri = _gdata_service_build_uri ("https://www.youtube.com/watch?v=%s",
+ gdata_entry_get_id (GDATA_ENTRY (self)));
+ }
+
+ return priv->player_uri;
+}
+
+static gboolean
+strv_contains (const gchar * const *strv, const gchar *key)
+{
+ guint i;
+
+ for (i = 0; strv != NULL && strv[i] != NULL; i++) {
+ if (g_strcmp0 (strv[i], key) == 0) {
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
+/**
+ * gdata_youtube_video_is_restricted_in_country:
+ * @self: a #GDataYouTubeVideo
+ * @country: an ISO 3166 two-letter country code to check
+ *
+ * Checks whether viewing of the video is restricted in @country, either by its content rating, or by the request of the producer.
+ * The return value from this function is purely informational, and no obligation is assumed.
+ *
+ * Return value: %TRUE if the video is restricted in @country, %FALSE otherwise
+ *
+ * Since: 0.4.0
+ */
+gboolean
+gdata_youtube_video_is_restricted_in_country (GDataYouTubeVideo *self, const gchar *country)
+{
+ GDataYouTubeVideoPrivate *priv;
+ gboolean allowed_present, allowed_empty;
+ gboolean in_allowed, in_blocked;
+
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), FALSE);
+ g_return_val_if_fail (country != NULL && *country != '\0', FALSE);
+
+ priv = self->priv;
+
+ allowed_present = (priv->region_restriction_allowed != NULL);
+ allowed_empty = (allowed_present &&
+ priv->region_restriction_allowed[0] == NULL);
+
+ in_allowed = strv_contains ((const gchar * const *) priv->region_restriction_allowed, country);
+ in_blocked = strv_contains ((const gchar * const *) priv->region_restriction_blocked, country);
+
+ return ((allowed_present && !in_allowed) ||
+ allowed_empty ||
+ (in_blocked && !in_allowed));
+}
+
+/* References:
+ * v2: https://developers.google.com/youtube/2.0/reference#youtube_data_api_tag_media:rating
+ * v3: https://developers.google.com/youtube/v3/docs/videos#contentDetails.contentRating.mpaaRating
+ */
+static const gchar *
+convert_mpaa_rating (const gchar *v3_rating)
+{
+ if (g_strcmp0 (v3_rating, "mpaaG") == 0) {
+ return "g";
+ } else if (g_strcmp0 (v3_rating, "mpaaNc17") == 0) {
+ return "nc-17";
+ } else if (g_strcmp0 (v3_rating, "mpaaPg") == 0) {
+ return "pg";
+ } else if (g_strcmp0 (v3_rating, "mpaaPg13") == 0) {
+ return "pg-13";
+ } else if (g_strcmp0 (v3_rating, "mpaaR") == 0) {
+ return "r";
+ } else {
+ return NULL;
+ }
+}
+
+/* References:
+ * v2: https://developers.google.com/youtube/2.0/reference#youtube_data_api_tag_media:rating
+ * v3: https://developers.google.com/youtube/v3/docs/videos#contentDetails.contentRating.tvpgRating
+ */
+static const gchar *
+convert_tvpg_rating (const gchar *v3_rating)
+{
+ if (g_strcmp0 (v3_rating, "pg14") == 0) {
+ return "tv-14";
+ } else if (g_strcmp0 (v3_rating, "tvpgG") == 0) {
+ return "tv-g";
+ } else if (g_strcmp0 (v3_rating, "tvpgMa") == 0) {
+ return "tv-ma";
+ } else if (g_strcmp0 (v3_rating, "tvpgPg") == 0) {
+ return "tv-pg";
+ } else if (g_strcmp0 (v3_rating, "tvpgY") == 0) {
+ return "tv-y";
+ } else if (g_strcmp0 (v3_rating, "tvpgY7") == 0) {
+ return "tv-y7";
+ } else if (g_strcmp0 (v3_rating, "tvpgY7Fv") == 0) {
+ return "tv-y7-fv";
+ } else {
+ return NULL;
+ }
+}
+
+/**
+ * gdata_youtube_video_get_media_rating:
+ * @self: a #GDataYouTubeVideo
+ * @rating_type: the type of rating to retrieve
+ *
+ * Returns the rating of the given type for the video, if one exists. For example, this could be a film rating awarded by the MPAA; or a simple
+ * rating specifying whether the video contains adult content.
+ *
+ * The valid values for @rating_type are: %GDATA_YOUTUBE_RATING_TYPE_MPAA and %GDATA_YOUTUBE_RATING_TYPE_V_CHIP.
+ * Further values may be added in future; if an unknown rating type is passed to the function, %NULL will be returned.
+ *
+ * The possible return values depend on what's passed to @rating_type. Valid values for each rating type are listed in the documentation for the
+ * rating types.
+ *
+ * Return value: the rating of the video for the given @rating_type, or %NULL if the video isn't rated with that type (or the type is unknown)
+ *
+ * Since: 0.10.0
+ */
+const gchar *
+gdata_youtube_video_get_media_rating (GDataYouTubeVideo *self, const gchar *rating_type)
+{
+ const gchar *rating;
+
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), NULL);
+ g_return_val_if_fail (rating_type != NULL && *rating_type != '\0', NULL);
+
+ /* All ratings are unknown. */
+ if (self->priv->content_ratings == NULL) {
+ return NULL;
+ }
+
+ /* Compatibility with the old API. */
+ if (g_strcmp0 (rating_type, "simple") == 0) {
+ /* Not supported any more. */
+ return NULL;
+ } else if (g_strcmp0 (rating_type, "mpaa") == 0) {
+ rating = g_hash_table_lookup (self->priv->content_ratings,
+ "mpaaRating");
+ return convert_mpaa_rating (rating);
+ } else if (g_strcmp0 (rating_type, "v-chip") == 0) {
+ rating = g_hash_table_lookup (self->priv->content_ratings,
+ "tvpgRating");
+ return convert_tvpg_rating (rating);
+ }
+
+ return g_hash_table_lookup (self->priv->content_ratings, rating_type);
+}
+
+/**
+ * gdata_youtube_video_get_category:
+ * @self: a #GDataYouTubeVideo
+ *
+ * Gets the #GDataYouTubeVideo:category property.
+ *
+ * Return value: (transfer none): a #GDataMediaCategory giving the video's single and mandatory category
+ */
+GDataMediaCategory *
+gdata_youtube_video_get_category (GDataYouTubeVideo *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), NULL);
+ return self->priv->category;
+}
+
+/**
+ * gdata_youtube_video_set_category:
+ * @self: a #GDataYouTubeVideo
+ * @category: a new #GDataMediaCategory
+ *
+ * Sets the #GDataYouTubeVideo:category property to the new category, @category, and increments its reference count.
+ *
+ * @category must not be %NULL. For more information, see the <ulink type="http"
+ * url="https://developers.google.com/youtube/v3/docs/videos#snippet.categoryId">online documentation</ulink>.
+ */
+void
+gdata_youtube_video_set_category (GDataYouTubeVideo *self, GDataMediaCategory *category)
+{
+ g_return_if_fail (GDATA_IS_YOUTUBE_VIDEO (self));
+ g_return_if_fail (GDATA_IS_MEDIA_CATEGORY (category));
+
+ g_object_ref (category);
+ g_clear_object (&self->priv->category);
+ self->priv->category = category;
+ g_object_notify (G_OBJECT (self), "category");
+}
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
+/**
+ * gdata_youtube_video_get_credit:
+ * @self: a #GDataYouTubeVideo
+ *
+ * Gets the #GDataYouTubeVideo:credit property.
+ *
+ * Return value: (transfer none): a #GDataMediaCredit giving information on whom to credit for the video, or %NULL
+ * Deprecated: 0.17.0: This is no longer supported by Google, and will
+ * always return %NULL. There is no replacement.
+ */
+GDataYouTubeCredit *
+gdata_youtube_video_get_credit (GDataYouTubeVideo *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), NULL);
+ return NULL;
+}
+
+G_GNUC_END_IGNORE_DEPRECATIONS
+
+/**
+ * gdata_youtube_video_get_description:
+ * @self: a #GDataYouTubeVideo
+ *
+ * Gets the #GDataYouTubeVideo:description property.
+ *
+ * Return value: the video's long text description, or %NULL
+ */
+const gchar *
+gdata_youtube_video_get_description (GDataYouTubeVideo *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), NULL);
+ return gdata_entry_get_summary (GDATA_ENTRY (self));
+}
+
+/**
+ * gdata_youtube_video_set_description:
+ * @self: a #GDataYouTubeVideo
+ * @description: (allow-none): the video's new description, or %NULL
+ *
+ * Sets the #GDataYouTubeVideo:description property to the new description, @description.
+ *
+ * Set @description to %NULL to unset the video's description.
+ */
+void
+gdata_youtube_video_set_description (GDataYouTubeVideo *self, const gchar *description)
+{
+ g_return_if_fail (GDATA_IS_YOUTUBE_VIDEO (self));
+ gdata_entry_set_summary (GDATA_ENTRY (self), description);
+ g_object_notify (G_OBJECT (self), "description");
+}
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
+/**
+ * gdata_youtube_video_look_up_content:
+ * @self: a #GDataYouTubeVideo
+ * @type: the MIME type of the content desired
+ *
+ * Looks up a #GDataYouTubeContent from the video with the given MIME type. The video's list of contents is
+ * a list of URIs to various formats of the video itself, such as its SWF URI or RTSP stream.
+ *
+ * Return value: (transfer none): a #GDataYouTubeContent matching @type, or %NULL
+ * Deprecated: 0.17.0: This is no longer supported by Google, and will
+ * always return %NULL. To view a video, open the URI returned by
+ * gdata_youtube_video_get_player_uri() in a web browser.
+ */
+GDataYouTubeContent *
+gdata_youtube_video_look_up_content (GDataYouTubeVideo *self, const gchar *type)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), NULL);
+ g_return_val_if_fail (type != NULL, NULL);
+
+ /* Not supported in the v3 API. */
+ return NULL;
+}
+
+G_GNUC_END_IGNORE_DEPRECATIONS
+
+/**
+ * gdata_youtube_video_get_thumbnails:
+ * @self: a #GDataYouTubeVideo
+ *
+ * Gets a list of the thumbnails available for the video.
+ *
+ * Return value: (element-type GData.MediaThumbnail) (transfer none): a #GList of #GDataMediaThumbnails, or %NULL
+ */
+GList *
+gdata_youtube_video_get_thumbnails (GDataYouTubeVideo *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), NULL);
+ return self->priv->thumbnails;
+}
+
+/**
+ * gdata_youtube_video_get_duration:
+ * @self: a #GDataYouTubeVideo
+ *
+ * Gets the #GDataYouTubeVideo:duration property.
+ *
+ * Return value: the video duration in seconds, or <code class="literal">0</code> if unknown
+ */
+guint
+gdata_youtube_video_get_duration (GDataYouTubeVideo *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), 0);
+ return self->priv->duration;
+}
+
+/**
+ * gdata_youtube_video_is_private:
+ * @self: a #GDataYouTubeVideo
+ *
+ * Gets the #GDataYouTubeVideo:is-private property.
+ *
+ * Return value: %TRUE if the video is private, %FALSE otherwise
+ */
+gboolean
+gdata_youtube_video_is_private (GDataYouTubeVideo *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), FALSE);
+ return self->priv->is_private;
+}
+
+/**
+ * gdata_youtube_video_set_is_private:
+ * @self: a #GDataYouTubeVideo
+ * @is_private: whether the video is private
+ *
+ * Sets the #GDataYouTubeVideo:is-private property to decide whether the video is publicly viewable.
+ */
+void
+gdata_youtube_video_set_is_private (GDataYouTubeVideo *self, gboolean is_private)
+{
+ g_return_if_fail (GDATA_IS_YOUTUBE_VIDEO (self));
+ self->priv->is_private = is_private;
+ g_object_notify (G_OBJECT (self), "is-private");
+}
+
+/**
+ * gdata_youtube_video_get_uploaded:
+ * @self: a #GDataYouTubeVideo
+ *
+ * Gets the #GDataYouTubeVideo:uploaded property. If the property is unset, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the UNIX timestamp for the time the video was uploaded, or <code class="literal">-1</code>
+ */
+gint64
+gdata_youtube_video_get_uploaded (GDataYouTubeVideo *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), -1);
+ return gdata_entry_get_published (GDATA_ENTRY (self));
+}
+
+/**
+ * gdata_youtube_video_get_video_id:
+ * @self: a #GDataYouTubeVideo
+ *
+ * Gets the #GDataYouTubeVideo:video-id property.
+ *
+ * Return value: the video's unique and permanent ID
+ * Deprecated: 0.17.0: This is now equal to #GDataEntry:id.
+ */
+const gchar *
+gdata_youtube_video_get_video_id (GDataYouTubeVideo *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), NULL);
+ return gdata_entry_get_id (GDATA_ENTRY (self));
+}
+
+/**
+ * gdata_youtube_video_is_draft:
+ * @self: a #GDataYouTubeVideo
+ *
+ * Gets the #GDataYouTubeVideo:is-draft property.
+ *
+ * Return value: %TRUE if the video is a draft, %FALSE otherwise
+ * Deprecated: 0.17.0: This is now equal to
+ * gdata_youtube_video_is_private().
+ */
+gboolean
+gdata_youtube_video_is_draft (GDataYouTubeVideo *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), FALSE);
+ return gdata_youtube_video_is_private (self);
+}
+
+/**
+ * gdata_youtube_video_set_is_draft:
+ * @self: a #GDataYouTubeVideo
+ * @is_draft: whether the video is a draft
+ *
+ * Sets the #GDataYouTubeVideo:is-draft property to decide whether the video is a draft.
+ *
+ * Deprecated: 0.17.0: This is now equivalent to
+ * gdata_youtube_video_set_is_private().
+ */
+void
+gdata_youtube_video_set_is_draft (GDataYouTubeVideo *self, gboolean is_draft)
+{
+ g_return_if_fail (GDATA_IS_YOUTUBE_VIDEO (self));
+ gdata_youtube_video_set_is_private (self, is_draft);
+ g_object_notify (G_OBJECT (self), "is-draft");
+}
+
+/* Convert from v3 to v2 API video upload state. References:
+ * v2: https://developers.google.com/youtube/2.0/reference?csw=1#youtube_data_api_tag_yt:state
+ * v3: https://developers.google.com/youtube/v3/docs/videos#processingDetails.processingStatus
+ * https://developers.google.com/youtube/v3/docs/videos#status.uploadStatus
+ */
+static const gchar *
+convert_state_name (const gchar *v3_processing_status,
+ const gchar *v3_upload_status)
+{
+ if (g_strcmp0 (v3_upload_status, "deleted") == 0 ||
+ g_strcmp0 (v3_upload_status, "failed") == 0 ||
+ g_strcmp0 (v3_upload_status, "rejected") == 0) {
+ return v3_upload_status;
+ } else if (g_strcmp0 (v3_processing_status, "processing") == 0) {
+ return v3_processing_status;
+ }
+
+ return NULL;
+}
+
+/* References:
+ * v2: https://developers.google.com/youtube/2.0/reference?csw=1#youtube_data_api_tag_yt:state
+ * v3: https://developers.google.com/youtube/v3/docs/videos#status.failureReason
+ * https://developers.google.com/youtube/v3/docs/videos#status.rejectionReason
+ */
+static const gchar *
+convert_state_reason_code (const gchar *v2_name,
+ const gchar *v3_failure_reason,
+ const gchar *v3_rejection_reason)
+{
+ if (v2_name == NULL ||
+ g_strcmp0 (v2_name, "processing") == 0 ||
+ g_strcmp0 (v2_name, "deleted") == 0) {
+ /* Explicitly unset if unknown, processing or deleted. */
+ return NULL;
+ } else if (g_strcmp0 (v2_name, "restricted") == 0) {
+ /* Unsupported conversion; convert_state_name() can never return
+ * ‘restricted’ anyway. */
+ return NULL;
+ } else if (g_strcmp0 (v2_name, "rejected") == 0) {
+ if (g_strcmp0 (v3_rejection_reason, "claim") == 0 ||
+ g_strcmp0 (v3_rejection_reason, "copyright") == 0 ||
+ g_strcmp0 (v3_rejection_reason, "trademark") == 0) {
+ return "copyright";
+ } else if (g_strcmp0 (v3_rejection_reason, "duplicate") == 0) {
+ return "duplicate";
+ } else if (g_strcmp0 (v3_rejection_reason,
+ "inappropriate") == 0) {
+ return "inappropriate";
+ } else if (g_strcmp0 (v3_rejection_reason, "length") == 0) {
+ return "tooLong";
+ } else if (g_strcmp0 (v3_rejection_reason, "termsOfUse") == 0) {
+ return "termsOfUse";
+ } else if (g_strcmp0 (v3_rejection_reason,
+ "uploaderAccountClosed") == 0 ||
+ g_strcmp0 (v3_rejection_reason,
+ "uploaderAccountSuspended") == 0) {
+ return "duplicate";
+ } else {
+ /* Generic fallback. */
+ return "termsOfUse";
+ }
+ } else if (g_strcmp0 (v2_name, "failed") == 0) {
+ if (g_strcmp0 (v3_failure_reason, "codec") == 0) {
+ return "unsupportedCodec";
+ } else if (g_strcmp0 (v3_failure_reason, "conversion") == 0) {
+ return "invalidFormat";
+ } else if (g_strcmp0 (v3_failure_reason, "emptyFile") == 0) {
+ return "empty";
+ } else if (g_strcmp0 (v3_failure_reason, "tooSmall") == 0) {
+ return "tooSmall";
+ } else {
+ return "cantProcess";
+ }
+ }
+
+ return NULL;
+}
+
+/**
+ * gdata_youtube_video_get_state:
+ * @self: a #GDataYouTubeVideo
+ *
+ * Gets the #GDataYouTubeVideo:state property.
+ *
+ * For more information, see the <ulink type="http"
+ * url="https://developers.google.com/youtube/v3/docs/videos#status.uploadStatus">online documentation</ulink>.
+ *
+ * Return value: (transfer none): a #GDataYouTubeState showing the state of the video, or %NULL
+ */
+GDataYouTubeState *
+gdata_youtube_video_get_state (GDataYouTubeVideo *self)
+{
+ GDataYouTubeVideoPrivate *priv;
+
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), NULL);
+
+ priv = self->priv;
+
+ /* Lazily create the state object. */
+ if (priv->upload_state == NULL) {
+ const gchar *name, *reason_code;
+
+ name = convert_state_name (priv->processing_status,
+ priv->upload_status);
+ reason_code = convert_state_reason_code (name,
+ priv->failure_reason,
+ priv->rejection_reason);
+
+ priv->upload_state = g_object_new (GDATA_TYPE_YOUTUBE_STATE,
+ "name", name,
+ "reason-code", reason_code,
+ "help-uri", NULL,
+ "message", NULL,
+ NULL);
+ }
+
+ return priv->upload_state;
+}
+
+/**
+ * gdata_youtube_video_get_recorded:
+ * @self: a #GDataYouTubeVideo
+ *
+ * Gets the #GDataYouTubeVideo:recorded property. If the property is unset, <code class="literal">-1</code> will be returned.
+ *
+ * Return value: the UNIX timestamp for the time the video was recorded, or <code class="literal">-1</code>
+ *
+ * Since: 0.3.0
+ */
+gint64
+gdata_youtube_video_get_recorded (GDataYouTubeVideo *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), -1);
+ return self->priv->recorded;
+}
+
+/**
+ * gdata_youtube_video_set_recorded:
+ * @self: a #GDataYouTubeVideo
+ * @recorded: the video's new recorded time, or <code class="literal">-1</code>
+ *
+ * Sets the #GDataYouTubeVideo:recorded property to the new recorded time, @recorded.
+ *
+ * Set @recorded to <code class="literal">-1</code> to unset the video's recorded time.
+ *
+ * Since: 0.3.0
+ */
+void
+gdata_youtube_video_set_recorded (GDataYouTubeVideo *self, gint64 recorded)
+{
+ g_return_if_fail (GDATA_IS_YOUTUBE_VIDEO (self));
+ g_return_if_fail (recorded >= -1);
+
+ self->priv->recorded = recorded;
+ g_object_notify (G_OBJECT (self), "recorded");
+}
+
+/**
+ * gdata_youtube_video_get_video_id_from_uri:
+ * @video_uri: a YouTube video player URI
+ *
+ * Extracts a video ID from a YouTube video player URI. The video ID is in the same form as returned by
+ * gdata_youtube_video_get_video_id(), and the @video_uri should be in the same form as returned by
+ * gdata_youtube_video_get_player_uri().
+ *
+ * The function will validate whether the URI actually points to a hostname containing <literal>youtube</literal>
+ * (e.g. <literal>youtube.com</literal>), and will return %NULL if it doesn't.
+ *
+ * For example:
+ * <informalexample><programlisting>
+ * video_id = gdata_youtube_video_get_video_id_from_uri ("http://www.youtube.com/watch?v=BH_vwsyCrTc&feature=featured");
+ * g_message ("Video ID: %s", video_id); /<!-- -->* Should print: BH_vwsyCrTc *<!-- -->/
+ * g_free (video_id);
+ * </programlisting></informalexample>
+ *
+ * Since: 0.4.0
+ *
+ * Return value: the video ID, or %NULL; free with g_free()
+ */
+gchar *
+gdata_youtube_video_get_video_id_from_uri (const gchar *video_uri)
+{
+ gchar *video_id = NULL;
+ SoupURI *uri;
+
+ g_return_val_if_fail (video_uri != NULL && *video_uri != '\0', NULL);
+
+ /* Extract the query string from the URI */
+ uri = soup_uri_new (video_uri);
+ if (uri == NULL)
+ return NULL;
+ else if (uri->host == NULL || strstr (uri->host, "youtube") == NULL) {
+ soup_uri_free (uri);
+ return NULL;
+ }
+
+ /* Try the "v" parameter (e.g. format is: http://www.youtube.com/watch?v=ylLzyHk54Z0) */
+ if (uri->query != NULL) {
+ GHashTable *params = soup_form_decode (uri->query);
+ video_id = g_strdup (g_hash_table_lookup (params, "v"));
+ g_hash_table_destroy (params);
+ }
+
+ /* Try the "v" fragment component (e.g. format is: http://www.youtube.com/watch#!v=ylLzyHk54Z0).
+ * YouTube introduced this new URI format in March 2010:
+ * http://apiblog.youtube.com/2010/03/upcoming-change-to-youtube-video-page.html */
+ if (video_id == NULL && uri->fragment != NULL) {
+ gchar **components, **i;
+
+ components = g_strsplit (uri->fragment, "!", -1);
+ for (i = components; *i != NULL; i++) {
+ if (**i == 'v' && *((*i) + 1) == '=') {
+ video_id = g_strdup ((*i) + 2);
+ break;
+ }
+ }
+ g_strfreev (components);
+ }
+
+ soup_uri_free (uri);
+
+ return video_id;
+}
+
+/**
+ * gdata_youtube_video_get_aspect_ratio:
+ * @self: a #GDataYouTubeVideo
+ *
+ * Gets the #GDataYouTubeVideo:aspect-ratio property.
+ *
+ * Return value: the aspect ratio property, or %NULL
+ *
+ * Since: 0.4.0
+ */
+const gchar *
+gdata_youtube_video_get_aspect_ratio (GDataYouTubeVideo *self)
+{
+ g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), NULL);
+
+ /* Permanently NULL for the moment, but let’s not deprecate the property
+ * because it looks like it might come in useful in future. */
+ return NULL;
+}
+
+/**
+ * gdata_youtube_video_set_aspect_ratio:
+ * @self: a #GDataYouTubeVideo
+ * @aspect_ratio: (allow-none): the aspect ratio property, or %NULL
+ *
+ * Sets the #GDataYouTubeVideo:aspect-ratio property to specify the video's aspect ratio.
+ * If @aspect_ratio is %NULL, the property will be unset.
+ *
+ * Since: 0.4.0
+ */
+void
+gdata_youtube_video_set_aspect_ratio (GDataYouTubeVideo *self, const gchar *aspect_ratio)
+{
+ g_return_if_fail (GDATA_IS_YOUTUBE_VIDEO (self));
+
+ /* Ignore it. See note in gdata_youtube_video_get_aspect_ratio(),
+ * above. */
+}
+
+/**
+ * gdata_youtube_video_get_coordinates:
+ * @self: a #GDataYouTubeVideo
+ * @latitude: (out caller-allocates) (allow-none): return location for the latitude, or %NULL
+ * @longitude: (out caller-allocates) (allow-none): return location for the longitude, or %NULL
+ *
+ * Gets the #GDataYouTubeVideo:latitude and #GDataYouTubeVideo:longitude properties, setting the out parameters to them. If either latitude or
+ * longitude is %NULL, that parameter will not be set. If the coordinates are unset, @latitude and @longitude will be set to %G_MAXDOUBLE.
+ *
+ * Since: 0.8.0
+ */
+void
+gdata_youtube_video_get_coordinates (GDataYouTubeVideo *self, gdouble *latitude, gdouble *longitude)
+{
+ g_return_if_fail (GDATA_IS_YOUTUBE_VIDEO (self));
+
+ if (latitude != NULL) {
+ *latitude = self->priv->latitude;
+ }
+ if (longitude != NULL) {
+ *longitude = self->priv->longitude;
+ }
+}
+
+/**
+ * gdata_youtube_video_set_coordinates:
+ * @self: a #GDataYouTubeVideo
+ * @latitude: the video's new latitude coordinate, or %G_MAXDOUBLE
+ * @longitude: the video's new longitude coordinate, or %G_MAXDOUBLE
+ *
+ * Sets the #GDataYouTubeVideo:latitude and #GDataYouTubeVideo:longitude properties to @latitude and @longitude respectively.
+ *
+ * Since: 0.8.0
+ */
+void
+gdata_youtube_video_set_coordinates (GDataYouTubeVideo *self, gdouble latitude, gdouble longitude)
+{
+ g_return_if_fail (GDATA_IS_YOUTUBE_VIDEO (self));
+
+ self->priv->latitude = latitude;
+ self->priv->longitude = longitude;
+
+ g_object_freeze_notify (G_OBJECT (self));
+ g_object_notify (G_OBJECT (self), "latitude");
+ g_object_notify (G_OBJECT (self), "longitude");
+ g_object_thaw_notify (G_OBJECT (self));
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2008-2009, 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_YOUTUBE_VIDEO_H
+#define GDATA_YOUTUBE_VIDEO_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <gdata/gdata-entry.h>
+#include <gdata/media/gdata-media-category.h>
+#include <gdata/services/youtube/gdata-youtube-content.h>
+#include <gdata/services/youtube/gdata-youtube-credit.h>
+#include <gdata/services/youtube/gdata-youtube-state.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GDATA_YOUTUBE_ASPECT_RATIO_WIDESCREEN:
+ *
+ * The aspect ratio for widescreen (16:9) videos.
+ *
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_yt:aspectratio">
+ * online documentation</ulink>.
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_YOUTUBE_ASPECT_RATIO_WIDESCREEN "widescreen"
+
+/**
+ * GDATA_YOUTUBE_ACTION_RATE:
+ *
+ * An action to rate a video, for use with gdata_youtube_video_set_access_control().
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_YOUTUBE_ACTION_RATE "rate"
+
+/**
+ * GDATA_YOUTUBE_ACTION_COMMENT:
+ *
+ * An action to comment on a video, for use with gdata_youtube_video_set_access_control().
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_YOUTUBE_ACTION_COMMENT "comment"
+
+/**
+ * GDATA_YOUTUBE_ACTION_COMMENT_VOTE:
+ *
+ * An action to rate other users' comments on a video, for use with gdata_youtube_video_set_access_control().
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_YOUTUBE_ACTION_COMMENT_VOTE "commentVote"
+
+/**
+ * GDATA_YOUTUBE_ACTION_VIDEO_RESPOND:
+ *
+ * An action to add a video response to a video, for use with gdata_youtube_video_set_access_control().
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_YOUTUBE_ACTION_VIDEO_RESPOND "videoRespond"
+
+/**
+ * GDATA_YOUTUBE_ACTION_EMBED:
+ *
+ * An action to embed a video on third-party websites, for use with gdata_youtube_video_set_access_control().
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_YOUTUBE_ACTION_EMBED "embed"
+
+/**
+ * GDATA_YOUTUBE_ACTION_SYNDICATE:
+ *
+ * An action allowing YouTube to show the video on mobile phones and televisions, for use with gdata_youtube_video_set_access_control().
+ *
+ * Since: 0.7.0
+ */
+#define GDATA_YOUTUBE_ACTION_SYNDICATE "syndicate"
+
+#ifndef LIBGDATA_DISABLE_DEPRECATED
+/**
+ * GDATA_YOUTUBE_RATING_TYPE_SIMPLE:
+ *
+ * A rating type to pass to gdata_youtube_video_get_media_rating() for “simple” ratings. The values which can be returned for such ratings are:
+ * <code class="literal">adult</code> and <code class="literal">nonadult</code>.
+ *
+ * Since: 0.10.0
+ * Deprecated: 0.17.0: No longer supported by Google. Calling
+ * gdata_youtube_video_get_media_rating() with this rating type will always
+ * return %NULL.
+ */
+#define GDATA_YOUTUBE_RATING_TYPE_SIMPLE "simple"
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
+
+/**
+ * GDATA_YOUTUBE_RATING_TYPE_MPAA:
+ *
+ * A rating type to pass to gdata_youtube_video_get_media_rating() for ratings by the <ulink type="http" url="http://www.mpaa.org/">MPAA</ulink>. The
+ * values which can be returned for such ratings are: <code class="literal">g</code>, <code class="literal">pg</code>,
+ * <code class="literal">pg-13</code>, <code class="literal">r</code> and <code class="literal">nc-17</code>.
+ *
+ * Since: 0.10.0
+ */
+#define GDATA_YOUTUBE_RATING_TYPE_MPAA "mpaa"
+
+/**
+ * GDATA_YOUTUBE_RATING_TYPE_V_CHIP:
+ *
+ * A rating type to pass to gdata_youtube_video_get_media_rating() for ratings following the FCC
+ * <ulink type="http" url="http://www.fcc.gov/vchip/">V-Chip</ulink> system. The values which can be returned for such ratings are:
+ * <code class="literal">tv-y</code>, <code class="literal">tv-y7</code>, <code class="literal">tv-y7-fv</code>, <code class="literal">tv-g</code>,
+ * <code class="literal">tv-pg</code>, <code class="literal">tv-14</code> and <code class="literal">tv-ma</code>.
+ *
+ * Since: 0.10.0
+ */
+#define GDATA_YOUTUBE_RATING_TYPE_V_CHIP "v-chip"
+
+/**
+ * GDataYouTubePermission:
+ * @GDATA_YOUTUBE_PERMISSION_ALLOWED: the action is allowed for everyone
+ * @GDATA_YOUTUBE_PERMISSION_DENIED: the action is denied for everyone
+ * @GDATA_YOUTUBE_PERMISSION_MODERATED: the action is moderated by the video owner
+ *
+ * Permissions for actions which can be set on a #GDataYouTubeVideo using gdata_youtube_video_set_access_control().
+ *
+ * The only actions which can have the %GDATA_YOUTUBE_PERMISSION_MODERATED permission are
+ * %GDATA_YOUTUBE_ACTION_RATE and %GDATA_YOUTUBE_ACTION_COMMENT.
+ *
+ * Since: 0.7.0
+ */
+typedef enum {
+ GDATA_YOUTUBE_PERMISSION_ALLOWED,
+ GDATA_YOUTUBE_PERMISSION_DENIED,
+ GDATA_YOUTUBE_PERMISSION_MODERATED
+} GDataYouTubePermission;
+
+#define GDATA_TYPE_YOUTUBE_VIDEO (gdata_youtube_video_get_type ())
+#define GDATA_YOUTUBE_VIDEO(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_YOUTUBE_VIDEO, GDataYouTubeVideo))
+#define GDATA_YOUTUBE_VIDEO_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_YOUTUBE_VIDEO, GDataYouTubeVideoClass))
+#define GDATA_IS_YOUTUBE_VIDEO(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_YOUTUBE_VIDEO))
+#define GDATA_IS_YOUTUBE_VIDEO_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_YOUTUBE_VIDEO))
+#define GDATA_YOUTUBE_VIDEO_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_YOUTUBE_VIDEO, GDataYouTubeVideoClass))
+
+typedef struct _GDataYouTubeVideoPrivate GDataYouTubeVideoPrivate;
+
+/**
+ * GDataYouTubeVideo:
+ *
+ * All the fields in the #GDataYouTubeVideo structure are private and should never be accessed directly.
+ */
+typedef struct {
+ GDataEntry parent;
+ GDataYouTubeVideoPrivate *priv;
+} GDataYouTubeVideo;
+
+/**
+ * GDataYouTubeVideoClass:
+ *
+ * All the fields in the #GDataYouTubeVideoClass structure are private and should never be accessed directly.
+ */
+typedef struct {
+ /*< private >*/
+ GDataEntryClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataYouTubeVideoClass;
+
+GType gdata_youtube_video_get_type (void) G_GNUC_CONST;
+
+GDataYouTubeVideo *gdata_youtube_video_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+guint gdata_youtube_video_get_view_count (GDataYouTubeVideo *self) G_GNUC_PURE;
+guint gdata_youtube_video_get_favorite_count (GDataYouTubeVideo *self) G_GNUC_PURE;
+const gchar *gdata_youtube_video_get_location (GDataYouTubeVideo *self) G_GNUC_PURE;
+void gdata_youtube_video_set_location (GDataYouTubeVideo *self, const gchar *location);
+GDataYouTubePermission gdata_youtube_video_get_access_control (GDataYouTubeVideo *self, const gchar *action) G_GNUC_PURE;
+void gdata_youtube_video_set_access_control (GDataYouTubeVideo *self, const gchar *action, GDataYouTubePermission permission);
+void gdata_youtube_video_get_rating (GDataYouTubeVideo *self, guint *min, guint *max, guint *count, gdouble *average);
+const gchar * const *gdata_youtube_video_get_keywords (GDataYouTubeVideo *self) G_GNUC_PURE;
+void gdata_youtube_video_set_keywords (GDataYouTubeVideo *self, const gchar * const *keywords);
+const gchar *gdata_youtube_video_get_player_uri (GDataYouTubeVideo *self) G_GNUC_PURE;
+gboolean gdata_youtube_video_is_restricted_in_country (GDataYouTubeVideo *self, const gchar *country) G_GNUC_PURE;
+const gchar *gdata_youtube_video_get_media_rating (GDataYouTubeVideo *self, const gchar *rating_type) G_GNUC_PURE;
+GDataMediaCategory *gdata_youtube_video_get_category (GDataYouTubeVideo *self) G_GNUC_PURE;
+void gdata_youtube_video_set_category (GDataYouTubeVideo *self, GDataMediaCategory *category);
+const gchar *gdata_youtube_video_get_description (GDataYouTubeVideo *self) G_GNUC_PURE;
+void gdata_youtube_video_set_description (GDataYouTubeVideo *self, const gchar *description);
+GList *gdata_youtube_video_get_thumbnails (GDataYouTubeVideo *self) G_GNUC_PURE;
+guint gdata_youtube_video_get_duration (GDataYouTubeVideo *self) G_GNUC_PURE;
+gboolean gdata_youtube_video_is_private (GDataYouTubeVideo *self) G_GNUC_PURE;
+void gdata_youtube_video_set_is_private (GDataYouTubeVideo *self, gboolean is_private);
+gint64 gdata_youtube_video_get_uploaded (GDataYouTubeVideo *self);
+GDataYouTubeState *gdata_youtube_video_get_state (GDataYouTubeVideo *self) G_GNUC_PURE;
+gint64 gdata_youtube_video_get_recorded (GDataYouTubeVideo *self);
+void gdata_youtube_video_set_recorded (GDataYouTubeVideo *self, gint64 recorded);
+const gchar *gdata_youtube_video_get_aspect_ratio (GDataYouTubeVideo *self) G_GNUC_PURE;
+void gdata_youtube_video_set_aspect_ratio (GDataYouTubeVideo *self, const gchar *aspect_ratio);
+void gdata_youtube_video_get_coordinates (GDataYouTubeVideo *self, gdouble *latitude, gdouble *longitude);
+void gdata_youtube_video_set_coordinates (GDataYouTubeVideo *self, gdouble latitude, gdouble longitude);
+
+gchar *gdata_youtube_video_get_video_id_from_uri (const gchar *video_uri) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+#ifndef LIBGDATA_DISABLE_DEPRECATED
+const gchar *gdata_youtube_video_get_video_id (GDataYouTubeVideo *self) G_GNUC_PURE G_GNUC_DEPRECATED_FOR(gdata_entry_get_id);
+GDataYouTubeContent *gdata_youtube_video_look_up_content (GDataYouTubeVideo *self, const gchar *type) G_GNUC_PURE G_GNUC_DEPRECATED_FOR(gdata_youtube_video_get_player_uri);
+
+gboolean gdata_youtube_video_is_draft (GDataYouTubeVideo *self) G_GNUC_PURE G_GNUC_DEPRECATED_FOR(gdata_youtube_video_is_private);
+void gdata_youtube_video_set_is_draft (GDataYouTubeVideo *self, gboolean is_draft) G_GNUC_DEPRECATED_FOR(gdata_youtube_video_set_is_private);
+
+GDataYouTubeCredit *gdata_youtube_video_get_credit (GDataYouTubeVideo *self) G_GNUC_PURE G_GNUC_DEPRECATED;
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
+
+G_END_DECLS
+
+#endif /* !GDATA_YOUTUBE_VIDEO_H */
--- /dev/null
+incs += include_directories('.')
+
+include_subdir = gdata_include_subdir / 'services/youtube'
+
+headers = files(
+ 'gdata-youtube-category.h',
+ 'gdata-youtube-comment.h',
+ 'gdata-youtube-content.h',
+ 'gdata-youtube-credit.h',
+ 'gdata-youtube-feed.h',
+ 'gdata-youtube-query.h',
+ 'gdata-youtube-service.h',
+ 'gdata-youtube-state.h',
+ 'gdata-youtube-video.h',
+)
+
+install_headers(
+ headers,
+ subdir: include_subdir,
+)
+
+gir_headers += headers
+
+sources += files(
+ 'gdata-youtube-category.c',
+ 'gdata-youtube-comment.c',
+ 'gdata-youtube-content.c',
+ 'gdata-youtube-credit.c',
+ 'gdata-youtube-feed.c',
+ 'gdata-youtube-query.c',
+ 'gdata-youtube-service.c',
+ 'gdata-youtube-state.c',
+ 'gdata-youtube-video.c',
+)
+
+enums = 'gdata-youtube-enums'
+
+enums_in = gnome.mkenums_simple(
+ enums + '-in',
+ sources: headers,
+)
+
+# FIXME: Work around the namespace being incorrectly detected
+# by glib-mkenums. This needs to be fixed by changing the
+# namespace in libgdata. See !6.
+sources += custom_target(
+ enums + '.c',
+ input: enums_in[0],
+ output: enums + '.c',
+ command: [sed, '-e', 's/-in//', '-e', 's/g_data_you_tube/gdata_youtube/', build_root / '@INPUT@'],
+ capture: true,
+)
+
+enum_headers += custom_target(
+ enums + '.h',
+ input: enums_in[1],
+ output: enums + '.h',
+ command: [sed, '-e', 's/g_data_you_tube/gdata_youtube/', '-e', 's/G_TYPE_DATA_YOU_TUBE/GDATA_TYPE_YOUTUBE/', build_root / '@INPUT@'],
+ capture: true,
+ install: true,
+ install_dir: gdata_includedir / include_subdir,
+)
--- /dev/null
+{
+global:
+ gdata_access_handler_get_rules;
+ gdata_access_handler_get_rules_async;
+ gdata_access_handler_get_type;
+ gdata_access_rule_get_edited;
+ gdata_access_rule_get_key;
+ gdata_access_rule_get_role;
+ gdata_access_rule_get_scope;
+ gdata_access_rule_get_type;
+ gdata_access_rule_new;
+ gdata_access_rule_set_role;
+ gdata_access_rule_set_scope;
+ gdata_app_categories_get_categories;
+ gdata_app_categories_get_type;
+ gdata_app_categories_is_fixed;
+ gdata_author_get_email_address;
+ gdata_author_get_name;
+ gdata_author_get_type;
+ gdata_author_get_uri;
+ gdata_author_new;
+ gdata_author_set_email_address;
+ gdata_author_set_name;
+ gdata_author_set_uri;
+ gdata_authorization_domain_get_scope;
+ gdata_authorization_domain_get_service_name;
+ gdata_authorization_domain_get_type;
+ gdata_authorizer_get_type;
+ gdata_authorizer_is_authorized_for_domain;
+ gdata_authorizer_process_request;
+ gdata_authorizer_refresh_authorization;
+ gdata_authorizer_refresh_authorization_async;
+ gdata_authorizer_refresh_authorization_finish;
+ gdata_batch_operation_add_deletion;
+ gdata_batch_operation_add_insertion;
+ gdata_batch_operation_add_query;
+ gdata_batch_operation_add_update;
+ gdata_batch_operation_get_authorization_domain;
+ gdata_batch_operation_get_feed_uri;
+ gdata_batch_operation_get_service;
+ gdata_batch_operation_get_type;
+ gdata_batch_operation_run;
+ gdata_batch_operation_run_async;
+ gdata_batch_operation_run_finish;
+ gdata_batch_operation_type_get_type;
+ gdata_batchable_create_operation;
+ gdata_batchable_get_type;
+ gdata_calendar_access_rule_get_type;
+ gdata_calendar_access_rule_new;
+ gdata_calendar_calendar_get_access_level;
+ gdata_calendar_calendar_get_color;
+ gdata_calendar_calendar_get_edited;
+ gdata_calendar_calendar_get_times_cleaned;
+ gdata_calendar_calendar_get_timezone;
+ gdata_calendar_calendar_get_type;
+ gdata_calendar_calendar_is_hidden;
+ gdata_calendar_calendar_is_selected;
+ gdata_calendar_calendar_new;
+ gdata_calendar_calendar_set_color;
+ gdata_calendar_calendar_set_is_hidden;
+ gdata_calendar_calendar_set_is_selected;
+ gdata_calendar_calendar_set_timezone;
+ gdata_calendar_event_add_person;
+ gdata_calendar_event_add_place;
+ gdata_calendar_event_add_time;
+ gdata_calendar_event_get_anyone_can_add_self;
+ gdata_calendar_event_get_edited;
+ gdata_calendar_event_get_guests_can_invite_others;
+ gdata_calendar_event_get_guests_can_modify;
+ gdata_calendar_event_get_guests_can_see_guests;
+ gdata_calendar_event_get_original_event_details;
+ gdata_calendar_event_get_people;
+ gdata_calendar_event_get_places;
+ gdata_calendar_event_get_primary_time;
+ gdata_calendar_event_get_recurrence;
+ gdata_calendar_event_get_sequence;
+ gdata_calendar_event_get_status;
+ gdata_calendar_event_get_times;
+ gdata_calendar_event_get_transparency;
+ gdata_calendar_event_get_type;
+ gdata_calendar_event_get_uid;
+ gdata_calendar_event_get_visibility;
+ gdata_calendar_event_is_exception;
+ gdata_calendar_event_new;
+ gdata_calendar_event_set_anyone_can_add_self;
+ gdata_calendar_event_set_guests_can_invite_others;
+ gdata_calendar_event_set_guests_can_modify;
+ gdata_calendar_event_set_guests_can_see_guests;
+ gdata_calendar_event_set_recurrence;
+ gdata_calendar_event_set_sequence;
+ gdata_calendar_event_set_status;
+ gdata_calendar_event_set_transparency;
+ gdata_calendar_event_set_uid;
+ gdata_calendar_event_set_visibility;
+ gdata_calendar_feed_get_times_cleaned;
+ gdata_calendar_feed_get_timezone;
+ gdata_calendar_feed_get_type;
+ gdata_calendar_query_get_future_events;
+ gdata_calendar_query_get_max_attendees;
+ gdata_calendar_query_get_order_by;
+ gdata_calendar_query_get_recurrence_expansion_end;
+ gdata_calendar_query_get_recurrence_expansion_start;
+ gdata_calendar_query_get_single_events;
+ gdata_calendar_query_get_sort_order;
+ gdata_calendar_query_get_start_max;
+ gdata_calendar_query_get_start_min;
+ gdata_calendar_query_get_timezone;
+ gdata_calendar_query_get_type;
+ gdata_calendar_query_new;
+ gdata_calendar_query_new_with_limits;
+ gdata_calendar_query_set_future_events;
+ gdata_calendar_query_set_max_attendees;
+ gdata_calendar_query_set_order_by;
+ gdata_calendar_query_set_recurrence_expansion_end;
+ gdata_calendar_query_set_recurrence_expansion_start;
+ gdata_calendar_query_set_show_deleted;
+ gdata_calendar_query_set_single_events;
+ gdata_calendar_query_set_sort_order;
+ gdata_calendar_query_set_start_max;
+ gdata_calendar_query_set_start_min;
+ gdata_calendar_query_set_timezone;
+ gdata_calendar_query_show_deleted;
+ gdata_calendar_service_get_primary_authorization_domain;
+ gdata_calendar_service_get_type;
+ gdata_calendar_service_insert_calendar_event;
+ gdata_calendar_service_insert_calendar_event_async;
+ gdata_calendar_service_insert_event;
+ gdata_calendar_service_insert_event_async;
+ gdata_calendar_service_new;
+ gdata_calendar_service_query_all_calendars;
+ gdata_calendar_service_query_all_calendars_async;
+ gdata_calendar_service_query_events;
+ gdata_calendar_service_query_events_async;
+ gdata_calendar_service_query_own_calendars;
+ gdata_calendar_service_query_own_calendars_async;
+ gdata_category_get_label;
+ gdata_category_get_scheme;
+ gdata_category_get_term;
+ gdata_category_get_type;
+ gdata_category_new;
+ gdata_category_set_label;
+ gdata_category_set_scheme;
+ gdata_category_set_term;
+ gdata_client_login_authorizer_authenticate;
+ gdata_client_login_authorizer_authenticate_async;
+ gdata_client_login_authorizer_authenticate_finish;
+ gdata_client_login_authorizer_error_get_type;
+ gdata_client_login_authorizer_error_quark;
+ gdata_client_login_authorizer_get_client_id;
+ gdata_client_login_authorizer_get_password;
+ gdata_client_login_authorizer_get_proxy_resolver;
+ gdata_client_login_authorizer_get_proxy_uri;
+ gdata_client_login_authorizer_get_timeout;
+ gdata_client_login_authorizer_get_type;
+ gdata_client_login_authorizer_get_username;
+ gdata_client_login_authorizer_new;
+ gdata_client_login_authorizer_new_for_authorization_domains;
+ gdata_client_login_authorizer_set_proxy_resolver;
+ gdata_client_login_authorizer_set_proxy_uri;
+ gdata_client_login_authorizer_set_timeout;
+ gdata_color_from_hexadecimal;
+ gdata_color_get_type;
+ gdata_color_to_hexadecimal;
+ gdata_comment_get_type;
+ gdata_commentable_delete_comment;
+ gdata_commentable_delete_comment_async;
+ gdata_commentable_delete_comment_finish;
+ gdata_commentable_get_type;
+ gdata_commentable_insert_comment;
+ gdata_commentable_insert_comment_async;
+ gdata_commentable_insert_comment_finish;
+ gdata_commentable_query_comments;
+ gdata_commentable_query_comments_async;
+ gdata_commentable_query_comments_finish;
+ gdata_comparable_compare;
+ gdata_comparable_get_type;
+ gdata_contacts_contact_add_calendar;
+ gdata_contacts_contact_add_email_address;
+ gdata_contacts_contact_add_event;
+ gdata_contacts_contact_add_external_id;
+ gdata_contacts_contact_add_group;
+ gdata_contacts_contact_add_hobby;
+ gdata_contacts_contact_add_im_address;
+ gdata_contacts_contact_add_jot;
+ gdata_contacts_contact_add_language;
+ gdata_contacts_contact_add_organization;
+ gdata_contacts_contact_add_phone_number;
+ gdata_contacts_contact_add_postal_address;
+ gdata_contacts_contact_add_relation;
+ gdata_contacts_contact_add_website;
+ gdata_contacts_contact_get_billing_information;
+ gdata_contacts_contact_get_birthday;
+ gdata_contacts_contact_get_calendars;
+ gdata_contacts_contact_get_directory_server;
+ gdata_contacts_contact_get_edited;
+ gdata_contacts_contact_get_email_addresses;
+ gdata_contacts_contact_get_events;
+ gdata_contacts_contact_get_extended_properties;
+ gdata_contacts_contact_get_extended_property;
+ gdata_contacts_contact_get_external_ids;
+ gdata_contacts_contact_get_file_as;
+ gdata_contacts_contact_get_gender;
+ gdata_contacts_contact_get_groups;
+ gdata_contacts_contact_get_hobbies;
+ gdata_contacts_contact_get_im_addresses;
+ gdata_contacts_contact_get_initials;
+ gdata_contacts_contact_get_jots;
+ gdata_contacts_contact_get_languages;
+ gdata_contacts_contact_get_maiden_name;
+ gdata_contacts_contact_get_mileage;
+ gdata_contacts_contact_get_name;
+ gdata_contacts_contact_get_nickname;
+ gdata_contacts_contact_get_occupation;
+ gdata_contacts_contact_get_organizations;
+ gdata_contacts_contact_get_phone_numbers;
+ gdata_contacts_contact_get_photo;
+ gdata_contacts_contact_get_photo_async;
+ gdata_contacts_contact_get_photo_etag;
+ gdata_contacts_contact_get_photo_finish;
+ gdata_contacts_contact_get_postal_addresses;
+ gdata_contacts_contact_get_primary_calendar;
+ gdata_contacts_contact_get_primary_email_address;
+ gdata_contacts_contact_get_primary_im_address;
+ gdata_contacts_contact_get_primary_organization;
+ gdata_contacts_contact_get_primary_phone_number;
+ gdata_contacts_contact_get_primary_postal_address;
+ gdata_contacts_contact_get_primary_website;
+ gdata_contacts_contact_get_priority;
+ gdata_contacts_contact_get_relations;
+ gdata_contacts_contact_get_sensitivity;
+ gdata_contacts_contact_get_short_name;
+ gdata_contacts_contact_get_subject;
+ gdata_contacts_contact_get_type;
+ gdata_contacts_contact_get_user_defined_field;
+ gdata_contacts_contact_get_user_defined_fields;
+ gdata_contacts_contact_get_websites;
+ gdata_contacts_contact_is_deleted;
+ gdata_contacts_contact_is_group_deleted;
+ gdata_contacts_contact_new;
+ gdata_contacts_contact_remove_all_calendars;
+ gdata_contacts_contact_remove_all_email_addresses;
+ gdata_contacts_contact_remove_all_events;
+ gdata_contacts_contact_remove_all_external_ids;
+ gdata_contacts_contact_remove_all_hobbies;
+ gdata_contacts_contact_remove_all_im_addresses;
+ gdata_contacts_contact_remove_all_jots;
+ gdata_contacts_contact_remove_all_languages;
+ gdata_contacts_contact_remove_all_organizations;
+ gdata_contacts_contact_remove_all_phone_numbers;
+ gdata_contacts_contact_remove_all_postal_addresses;
+ gdata_contacts_contact_remove_all_relations;
+ gdata_contacts_contact_remove_all_websites;
+ gdata_contacts_contact_remove_group;
+ gdata_contacts_contact_set_billing_information;
+ gdata_contacts_contact_set_birthday;
+ gdata_contacts_contact_set_directory_server;
+ gdata_contacts_contact_set_extended_property;
+ gdata_contacts_contact_set_file_as;
+ gdata_contacts_contact_set_gender;
+ gdata_contacts_contact_set_initials;
+ gdata_contacts_contact_set_maiden_name;
+ gdata_contacts_contact_set_mileage;
+ gdata_contacts_contact_set_name;
+ gdata_contacts_contact_set_nickname;
+ gdata_contacts_contact_set_occupation;
+ gdata_contacts_contact_set_photo;
+ gdata_contacts_contact_set_photo_async;
+ gdata_contacts_contact_set_photo_finish;
+ gdata_contacts_contact_set_priority;
+ gdata_contacts_contact_set_sensitivity;
+ gdata_contacts_contact_set_short_name;
+ gdata_contacts_contact_set_subject;
+ gdata_contacts_contact_set_user_defined_field;
+ gdata_contacts_group_get_edited;
+ gdata_contacts_group_get_extended_properties;
+ gdata_contacts_group_get_extended_property;
+ gdata_contacts_group_get_system_group_id;
+ gdata_contacts_group_get_type;
+ gdata_contacts_group_is_deleted;
+ gdata_contacts_group_new;
+ gdata_contacts_group_set_extended_property;
+ gdata_contacts_query_get_group;
+ gdata_contacts_query_get_order_by;
+ gdata_contacts_query_get_sort_order;
+ gdata_contacts_query_get_type;
+ gdata_contacts_query_new;
+ gdata_contacts_query_new_with_limits;
+ gdata_contacts_query_set_group;
+ gdata_contacts_query_set_order_by;
+ gdata_contacts_query_set_show_deleted;
+ gdata_contacts_query_set_sort_order;
+ gdata_contacts_query_show_deleted;
+ gdata_contacts_service_get_primary_authorization_domain;
+ gdata_contacts_service_get_type;
+ gdata_contacts_service_insert_contact;
+ gdata_contacts_service_insert_contact_async;
+ gdata_contacts_service_insert_group;
+ gdata_contacts_service_insert_group_async;
+ gdata_contacts_service_new;
+ gdata_contacts_service_query_contacts;
+ gdata_contacts_service_query_contacts_async;
+ gdata_contacts_service_query_groups;
+ gdata_contacts_service_query_groups_async;
+ gdata_documents_access_rule_get_type;
+ gdata_documents_access_rule_new;
+ gdata_documents_document_download;
+ gdata_documents_document_get_download_uri;
+ gdata_documents_document_get_thumbnail_uri;
+ gdata_documents_document_get_type;
+ gdata_documents_document_new;
+ gdata_documents_drawing_get_type;
+ gdata_documents_drawing_new;
+ gdata_documents_entry_add_documents_property;
+ gdata_documents_entry_get_document_id;
+ gdata_documents_entry_get_document_properties;
+ gdata_documents_entry_get_edited;
+ gdata_documents_entry_get_file_size;
+ gdata_documents_entry_get_last_modified_by;
+ gdata_documents_entry_get_last_viewed;
+ gdata_documents_entry_get_path;
+ gdata_documents_entry_get_quota_used;
+ gdata_documents_entry_get_resource_id;
+ gdata_documents_entry_get_type;
+ gdata_documents_entry_is_deleted;
+ gdata_documents_entry_remove_documents_property;
+ gdata_documents_entry_set_writers_can_invite;
+ gdata_documents_entry_writers_can_invite;
+ gdata_documents_feed_get_type;
+ gdata_documents_folder_get_type;
+ gdata_documents_folder_new;
+ gdata_documents_metadata_get_quota_total;
+ gdata_documents_metadata_get_quota_used;
+ gdata_documents_metadata_get_type;
+ gdata_documents_pdf_get_type;
+ gdata_documents_pdf_new;
+ gdata_documents_presentation_get_type;
+ gdata_documents_presentation_new;
+ gdata_documents_property_get_etag;
+ gdata_documents_property_get_key;
+ gdata_documents_property_get_type;
+ gdata_documents_property_get_value;
+ gdata_documents_property_get_visibility;
+ gdata_documents_property_new;
+ gdata_documents_property_set_value;
+ gdata_documents_property_set_visibility;
+ gdata_documents_query_add_collaborator;
+ gdata_documents_query_add_reader;
+ gdata_documents_query_get_collaborator_addresses;
+ gdata_documents_query_get_exact_title;
+ gdata_documents_query_get_folder_id;
+ gdata_documents_query_get_reader_addresses;
+ gdata_documents_query_get_title;
+ gdata_documents_query_get_type;
+ gdata_documents_query_new;
+ gdata_documents_query_new_with_limits;
+ gdata_documents_query_set_folder_id;
+ gdata_documents_query_set_show_deleted;
+ gdata_documents_query_set_show_folders;
+ gdata_documents_query_set_title;
+ gdata_documents_query_show_deleted;
+ gdata_documents_query_show_folders;
+ gdata_documents_service_add_entry_to_folder;
+ gdata_documents_service_add_entry_to_folder_async;
+ gdata_documents_service_add_entry_to_folder_finish;
+ gdata_documents_service_copy_document;
+ gdata_documents_service_copy_document_async;
+ gdata_documents_service_copy_document_finish;
+ gdata_documents_service_error_get_type;
+ gdata_documents_service_error_quark;
+ gdata_documents_service_finish_upload;
+ gdata_documents_service_get_metadata;
+ gdata_documents_service_get_metadata_async;
+ gdata_documents_service_get_metadata_finish;
+ gdata_documents_service_get_primary_authorization_domain;
+ gdata_documents_service_get_spreadsheet_authorization_domain;
+ gdata_documents_service_get_type;
+ gdata_documents_service_get_upload_uri;
+ gdata_documents_service_new;
+ gdata_documents_service_query_documents;
+ gdata_documents_service_query_documents_async;
+ gdata_documents_service_remove_entry_from_folder;
+ gdata_documents_service_remove_entry_from_folder_async;
+ gdata_documents_service_remove_entry_from_folder_finish;
+ gdata_documents_service_update_document;
+ gdata_documents_service_update_document_resumable;
+ gdata_documents_service_upload_document;
+ gdata_documents_service_upload_document_resumable;
+ gdata_documents_spreadsheet_get_download_uri;
+ gdata_documents_spreadsheet_get_type;
+ gdata_documents_spreadsheet_new;
+ gdata_documents_text_get_type;
+ gdata_documents_text_new;
+ gdata_documents_upload_query_build_uri;
+ gdata_documents_upload_query_get_convert;
+ gdata_documents_upload_query_get_folder;
+ gdata_documents_upload_query_get_type;
+ gdata_documents_upload_query_new;
+ gdata_documents_upload_query_set_convert;
+ gdata_documents_upload_query_set_folder;
+ gdata_download_stream_get_authorization_domain;
+ gdata_download_stream_get_cancellable;
+ gdata_download_stream_get_content_length;
+ gdata_download_stream_get_content_type;
+ gdata_download_stream_get_download_uri;
+ gdata_download_stream_get_service;
+ gdata_download_stream_get_type;
+ gdata_download_stream_new;
+ gdata_entry_add_author;
+ gdata_entry_add_category;
+ gdata_entry_add_link;
+ gdata_entry_get_authors;
+ gdata_entry_get_categories;
+ gdata_entry_get_content;
+ gdata_entry_get_content_uri;
+ gdata_entry_get_etag;
+ gdata_entry_get_id;
+ gdata_entry_get_published;
+ gdata_entry_get_rights;
+ gdata_entry_get_summary;
+ gdata_entry_get_title;
+ gdata_entry_get_type;
+ gdata_entry_get_updated;
+ gdata_entry_is_inserted;
+ gdata_entry_look_up_link;
+ gdata_entry_look_up_links;
+ gdata_entry_new;
+ gdata_entry_remove_link;
+ gdata_entry_set_content;
+ gdata_entry_set_content_uri;
+ gdata_entry_set_rights;
+ gdata_entry_set_summary;
+ gdata_entry_set_title;
+ gdata_feed_get_authors;
+ gdata_feed_get_categories;
+ gdata_feed_get_entries;
+ gdata_feed_get_etag;
+ gdata_feed_get_generator;
+ gdata_feed_get_icon;
+ gdata_feed_get_id;
+ gdata_feed_get_items_per_page;
+ gdata_feed_get_links;
+ gdata_feed_get_logo;
+ gdata_feed_get_next_page_token;
+ gdata_feed_get_rights;
+ gdata_feed_get_start_index;
+ gdata_feed_get_subtitle;
+ gdata_feed_get_title;
+ gdata_feed_get_total_results;
+ gdata_feed_get_type;
+ gdata_feed_get_updated;
+ gdata_feed_look_up_entry;
+ gdata_feed_look_up_link;
+ gdata_freebase_query_get_type;
+ gdata_freebase_query_new;
+ gdata_freebase_query_new_from_variant;
+ gdata_freebase_result_dup_variant;
+ gdata_freebase_result_get_type;
+ gdata_freebase_result_new;
+ gdata_freebase_search_filter_type_get_type;
+ gdata_freebase_search_query_add_filter;
+ gdata_freebase_search_query_add_location;
+ gdata_freebase_search_query_close_filter;
+ gdata_freebase_search_query_get_language;
+ gdata_freebase_search_query_get_stemmed;
+ gdata_freebase_search_query_get_type;
+ gdata_freebase_search_query_new;
+ gdata_freebase_search_query_open_filter;
+ gdata_freebase_search_query_set_language;
+ gdata_freebase_search_query_set_stemmed;
+ gdata_freebase_search_result_get_item;
+ gdata_freebase_search_result_get_num_items;
+ gdata_freebase_search_result_get_total_hits;
+ gdata_freebase_search_result_get_type;
+ gdata_freebase_search_result_item_get_id;
+ gdata_freebase_search_result_item_get_language;
+ gdata_freebase_search_result_item_get_mid;
+ gdata_freebase_search_result_item_get_name;
+ gdata_freebase_search_result_item_get_notable_id;
+ gdata_freebase_search_result_item_get_notable_name;
+ gdata_freebase_search_result_item_get_score;
+ gdata_freebase_search_result_item_get_type;
+ gdata_freebase_search_result_new;
+ gdata_freebase_service_get_image;
+ gdata_freebase_service_get_topic;
+ gdata_freebase_service_get_topic_async;
+ gdata_freebase_service_get_type;
+ gdata_freebase_service_new;
+ gdata_freebase_service_query;
+ gdata_freebase_service_query_async;
+ gdata_freebase_service_search;
+ gdata_freebase_service_search_async;
+ gdata_freebase_topic_object_get_id;
+ gdata_freebase_topic_object_get_property_count;
+ gdata_freebase_topic_object_get_property_hits;
+ gdata_freebase_topic_object_get_property_value;
+ gdata_freebase_topic_object_get_type;
+ gdata_freebase_topic_object_list_properties;
+ gdata_freebase_topic_object_ref;
+ gdata_freebase_topic_object_unref;
+ gdata_freebase_topic_query_get_filter;
+ gdata_freebase_topic_query_get_language;
+ gdata_freebase_topic_query_get_type;
+ gdata_freebase_topic_query_new;
+ gdata_freebase_topic_query_set_filter;
+ gdata_freebase_topic_query_set_language;
+ gdata_freebase_topic_result_dup_object;
+ gdata_freebase_topic_result_get_type;
+ gdata_freebase_topic_result_new;
+ gdata_freebase_topic_value_copy_value;
+ gdata_freebase_topic_value_get_creator;
+ gdata_freebase_topic_value_get_double;
+ gdata_freebase_topic_value_get_int;
+ gdata_freebase_topic_value_get_language;
+ gdata_freebase_topic_value_get_object;
+ gdata_freebase_topic_value_get_property;
+ gdata_freebase_topic_value_get_string;
+ gdata_freebase_topic_value_get_text;
+ gdata_freebase_topic_value_get_timestamp;
+ gdata_freebase_topic_value_get_type;
+ gdata_freebase_topic_value_get_value_type;
+ gdata_freebase_topic_value_is_image;
+ gdata_freebase_topic_value_ref;
+ gdata_freebase_topic_value_unref;
+ gdata_gcontact_calendar_get_label;
+ gdata_gcontact_calendar_get_relation_type;
+ gdata_gcontact_calendar_get_type;
+ gdata_gcontact_calendar_get_uri;
+ gdata_gcontact_calendar_is_primary;
+ gdata_gcontact_calendar_new;
+ gdata_gcontact_calendar_set_is_primary;
+ gdata_gcontact_calendar_set_label;
+ gdata_gcontact_calendar_set_relation_type;
+ gdata_gcontact_calendar_set_uri;
+ gdata_gcontact_event_get_date;
+ gdata_gcontact_event_get_label;
+ gdata_gcontact_event_get_relation_type;
+ gdata_gcontact_event_get_type;
+ gdata_gcontact_event_new;
+ gdata_gcontact_event_set_date;
+ gdata_gcontact_event_set_label;
+ gdata_gcontact_event_set_relation_type;
+ gdata_gcontact_external_id_get_label;
+ gdata_gcontact_external_id_get_relation_type;
+ gdata_gcontact_external_id_get_type;
+ gdata_gcontact_external_id_get_value;
+ gdata_gcontact_external_id_new;
+ gdata_gcontact_external_id_set_label;
+ gdata_gcontact_external_id_set_relation_type;
+ gdata_gcontact_external_id_set_value;
+ gdata_gcontact_jot_get_content;
+ gdata_gcontact_jot_get_relation_type;
+ gdata_gcontact_jot_get_type;
+ gdata_gcontact_jot_new;
+ gdata_gcontact_jot_set_content;
+ gdata_gcontact_jot_set_relation_type;
+ gdata_gcontact_language_get_code;
+ gdata_gcontact_language_get_label;
+ gdata_gcontact_language_get_type;
+ gdata_gcontact_language_new;
+ gdata_gcontact_language_set_code;
+ gdata_gcontact_language_set_label;
+ gdata_gcontact_relation_get_label;
+ gdata_gcontact_relation_get_name;
+ gdata_gcontact_relation_get_relation_type;
+ gdata_gcontact_relation_get_type;
+ gdata_gcontact_relation_new;
+ gdata_gcontact_relation_set_label;
+ gdata_gcontact_relation_set_name;
+ gdata_gcontact_relation_set_relation_type;
+ gdata_gcontact_website_get_label;
+ gdata_gcontact_website_get_relation_type;
+ gdata_gcontact_website_get_type;
+ gdata_gcontact_website_get_uri;
+ gdata_gcontact_website_is_primary;
+ gdata_gcontact_website_new;
+ gdata_gcontact_website_set_is_primary;
+ gdata_gcontact_website_set_label;
+ gdata_gcontact_website_set_relation_type;
+ gdata_gcontact_website_set_uri;
+ gdata_gd_email_address_get_address;
+ gdata_gd_email_address_get_display_name;
+ gdata_gd_email_address_get_label;
+ gdata_gd_email_address_get_relation_type;
+ gdata_gd_email_address_get_type;
+ gdata_gd_email_address_is_primary;
+ gdata_gd_email_address_new;
+ gdata_gd_email_address_set_address;
+ gdata_gd_email_address_set_display_name;
+ gdata_gd_email_address_set_is_primary;
+ gdata_gd_email_address_set_label;
+ gdata_gd_email_address_set_relation_type;
+ gdata_gd_im_address_get_address;
+ gdata_gd_im_address_get_label;
+ gdata_gd_im_address_get_protocol;
+ gdata_gd_im_address_get_relation_type;
+ gdata_gd_im_address_get_type;
+ gdata_gd_im_address_is_primary;
+ gdata_gd_im_address_new;
+ gdata_gd_im_address_set_address;
+ gdata_gd_im_address_set_is_primary;
+ gdata_gd_im_address_set_label;
+ gdata_gd_im_address_set_protocol;
+ gdata_gd_im_address_set_relation_type;
+ gdata_gd_name_get_additional_name;
+ gdata_gd_name_get_family_name;
+ gdata_gd_name_get_full_name;
+ gdata_gd_name_get_given_name;
+ gdata_gd_name_get_prefix;
+ gdata_gd_name_get_suffix;
+ gdata_gd_name_get_type;
+ gdata_gd_name_new;
+ gdata_gd_name_set_additional_name;
+ gdata_gd_name_set_family_name;
+ gdata_gd_name_set_full_name;
+ gdata_gd_name_set_given_name;
+ gdata_gd_name_set_prefix;
+ gdata_gd_name_set_suffix;
+ gdata_gd_organization_get_department;
+ gdata_gd_organization_get_job_description;
+ gdata_gd_organization_get_label;
+ gdata_gd_organization_get_location;
+ gdata_gd_organization_get_name;
+ gdata_gd_organization_get_relation_type;
+ gdata_gd_organization_get_symbol;
+ gdata_gd_organization_get_title;
+ gdata_gd_organization_get_type;
+ gdata_gd_organization_is_primary;
+ gdata_gd_organization_new;
+ gdata_gd_organization_set_department;
+ gdata_gd_organization_set_is_primary;
+ gdata_gd_organization_set_job_description;
+ gdata_gd_organization_set_label;
+ gdata_gd_organization_set_location;
+ gdata_gd_organization_set_name;
+ gdata_gd_organization_set_relation_type;
+ gdata_gd_organization_set_symbol;
+ gdata_gd_organization_set_title;
+ gdata_gd_phone_number_get_label;
+ gdata_gd_phone_number_get_number;
+ gdata_gd_phone_number_get_relation_type;
+ gdata_gd_phone_number_get_type;
+ gdata_gd_phone_number_get_uri;
+ gdata_gd_phone_number_is_primary;
+ gdata_gd_phone_number_new;
+ gdata_gd_phone_number_set_is_primary;
+ gdata_gd_phone_number_set_label;
+ gdata_gd_phone_number_set_number;
+ gdata_gd_phone_number_set_relation_type;
+ gdata_gd_phone_number_set_uri;
+ gdata_gd_postal_address_get_address;
+ gdata_gd_postal_address_get_agent;
+ gdata_gd_postal_address_get_city;
+ gdata_gd_postal_address_get_country;
+ gdata_gd_postal_address_get_country_code;
+ gdata_gd_postal_address_get_house_name;
+ gdata_gd_postal_address_get_label;
+ gdata_gd_postal_address_get_mail_class;
+ gdata_gd_postal_address_get_neighborhood;
+ gdata_gd_postal_address_get_po_box;
+ gdata_gd_postal_address_get_postcode;
+ gdata_gd_postal_address_get_region;
+ gdata_gd_postal_address_get_relation_type;
+ gdata_gd_postal_address_get_street;
+ gdata_gd_postal_address_get_subregion;
+ gdata_gd_postal_address_get_type;
+ gdata_gd_postal_address_get_usage;
+ gdata_gd_postal_address_is_primary;
+ gdata_gd_postal_address_new;
+ gdata_gd_postal_address_set_address;
+ gdata_gd_postal_address_set_agent;
+ gdata_gd_postal_address_set_city;
+ gdata_gd_postal_address_set_country;
+ gdata_gd_postal_address_set_house_name;
+ gdata_gd_postal_address_set_is_primary;
+ gdata_gd_postal_address_set_label;
+ gdata_gd_postal_address_set_mail_class;
+ gdata_gd_postal_address_set_neighborhood;
+ gdata_gd_postal_address_set_po_box;
+ gdata_gd_postal_address_set_postcode;
+ gdata_gd_postal_address_set_region;
+ gdata_gd_postal_address_set_relation_type;
+ gdata_gd_postal_address_set_street;
+ gdata_gd_postal_address_set_subregion;
+ gdata_gd_postal_address_set_usage;
+ gdata_gd_reminder_get_absolute_time;
+ gdata_gd_reminder_get_method;
+ gdata_gd_reminder_get_relative_time;
+ gdata_gd_reminder_get_type;
+ gdata_gd_reminder_is_absolute_time;
+ gdata_gd_reminder_new;
+ gdata_gd_reminder_set_absolute_time;
+ gdata_gd_reminder_set_method;
+ gdata_gd_reminder_set_relative_time;
+ gdata_gd_when_add_reminder;
+ gdata_gd_when_get_end_time;
+ gdata_gd_when_get_reminders;
+ gdata_gd_when_get_start_time;
+ gdata_gd_when_get_type;
+ gdata_gd_when_get_value_string;
+ gdata_gd_when_is_date;
+ gdata_gd_when_new;
+ gdata_gd_when_set_end_time;
+ gdata_gd_when_set_is_date;
+ gdata_gd_when_set_start_time;
+ gdata_gd_when_set_value_string;
+ gdata_gd_where_get_label;
+ gdata_gd_where_get_relation_type;
+ gdata_gd_where_get_type;
+ gdata_gd_where_get_value_string;
+ gdata_gd_where_new;
+ gdata_gd_where_set_label;
+ gdata_gd_where_set_relation_type;
+ gdata_gd_where_set_value_string;
+ gdata_gd_who_get_email_address;
+ gdata_gd_who_get_relation_type;
+ gdata_gd_who_get_type;
+ gdata_gd_who_get_value_string;
+ gdata_gd_who_new;
+ gdata_gd_who_set_email_address;
+ gdata_gd_who_set_relation_type;
+ gdata_gd_who_set_value_string;
+ gdata_generator_get_name;
+ gdata_generator_get_type;
+ gdata_generator_get_uri;
+ gdata_generator_get_version;
+ gdata_goa_authorizer_get_goa_object;
+ gdata_goa_authorizer_get_type;
+ gdata_goa_authorizer_new;
+ gdata_link_get_content_type;
+ gdata_link_get_language;
+ gdata_link_get_length;
+ gdata_link_get_relation_type;
+ gdata_link_get_title;
+ gdata_link_get_type;
+ gdata_link_get_uri;
+ gdata_link_new;
+ gdata_link_set_content_type;
+ gdata_link_set_language;
+ gdata_link_set_length;
+ gdata_link_set_relation_type;
+ gdata_link_set_title;
+ gdata_link_set_uri;
+ gdata_media_category_get_category;
+ gdata_media_category_get_label;
+ gdata_media_category_get_scheme;
+ gdata_media_category_get_type;
+ gdata_media_category_new;
+ gdata_media_category_set_category;
+ gdata_media_category_set_label;
+ gdata_media_category_set_scheme;
+ gdata_media_content_download;
+ gdata_media_content_get_content_type;
+ gdata_media_content_get_duration;
+ gdata_media_content_get_expression;
+ gdata_media_content_get_filesize;
+ gdata_media_content_get_height;
+ gdata_media_content_get_medium;
+ gdata_media_content_get_type;
+ gdata_media_content_get_uri;
+ gdata_media_content_get_width;
+ gdata_media_content_is_default;
+ gdata_media_credit_get_credit;
+ gdata_media_credit_get_role;
+ gdata_media_credit_get_scheme;
+ gdata_media_credit_get_type;
+ gdata_media_expression_get_type;
+ gdata_media_medium_get_type;
+ gdata_media_thumbnail_download;
+ gdata_media_thumbnail_get_height;
+ gdata_media_thumbnail_get_time;
+ gdata_media_thumbnail_get_type;
+ gdata_media_thumbnail_get_uri;
+ gdata_media_thumbnail_get_width;
+ gdata_oauth1_authorizer_get_application_name;
+ gdata_oauth1_authorizer_get_locale;
+ gdata_oauth1_authorizer_get_proxy_resolver;
+ gdata_oauth1_authorizer_get_proxy_uri;
+ gdata_oauth1_authorizer_get_timeout;
+ gdata_oauth1_authorizer_get_type;
+ gdata_oauth1_authorizer_new;
+ gdata_oauth1_authorizer_new_for_authorization_domains;
+ gdata_oauth1_authorizer_request_authentication_uri;
+ gdata_oauth1_authorizer_request_authentication_uri_async;
+ gdata_oauth1_authorizer_request_authentication_uri_finish;
+ gdata_oauth1_authorizer_request_authorization;
+ gdata_oauth1_authorizer_request_authorization_async;
+ gdata_oauth1_authorizer_request_authorization_finish;
+ gdata_oauth1_authorizer_set_locale;
+ gdata_oauth1_authorizer_set_proxy_resolver;
+ gdata_oauth1_authorizer_set_proxy_uri;
+ gdata_oauth1_authorizer_set_timeout;
+ gdata_oauth2_authorizer_build_authentication_uri;
+ gdata_oauth2_authorizer_dup_refresh_token;
+ gdata_oauth2_authorizer_get_client_id;
+ gdata_oauth2_authorizer_get_client_secret;
+ gdata_oauth2_authorizer_get_locale;
+ gdata_oauth2_authorizer_get_proxy_resolver;
+ gdata_oauth2_authorizer_get_redirect_uri;
+ gdata_oauth2_authorizer_get_timeout;
+ gdata_oauth2_authorizer_get_type;
+ gdata_oauth2_authorizer_new;
+ gdata_oauth2_authorizer_new_for_authorization_domains;
+ gdata_oauth2_authorizer_request_authorization;
+ gdata_oauth2_authorizer_request_authorization_async;
+ gdata_oauth2_authorizer_request_authorization_finish;
+ gdata_oauth2_authorizer_set_locale;
+ gdata_oauth2_authorizer_set_proxy_resolver;
+ gdata_oauth2_authorizer_set_refresh_token;
+ gdata_oauth2_authorizer_set_timeout;
+ gdata_operation_type_get_type;
+ gdata_parsable_get_content_type;
+ gdata_parsable_get_json;
+ gdata_parsable_get_type;
+ gdata_parsable_get_xml;
+ gdata_parsable_new_from_json;
+ gdata_parsable_new_from_xml;
+ gdata_parser_error_get_type;
+ gdata_parser_error_quark;
+ gdata_picasaweb_album_get_bytes_used;
+ gdata_picasaweb_album_get_comment_count;
+ gdata_picasaweb_album_get_contents;
+ gdata_picasaweb_album_get_coordinates;
+ gdata_picasaweb_album_get_edited;
+ gdata_picasaweb_album_get_id;
+ gdata_picasaweb_album_get_location;
+ gdata_picasaweb_album_get_nickname;
+ gdata_picasaweb_album_get_num_photos;
+ gdata_picasaweb_album_get_num_photos_remaining;
+ gdata_picasaweb_album_get_tags;
+ gdata_picasaweb_album_get_thumbnails;
+ gdata_picasaweb_album_get_timestamp;
+ gdata_picasaweb_album_get_type;
+ gdata_picasaweb_album_get_user;
+ gdata_picasaweb_album_get_visibility;
+ gdata_picasaweb_album_is_commenting_enabled;
+ gdata_picasaweb_album_new;
+ gdata_picasaweb_album_set_coordinates;
+ gdata_picasaweb_album_set_is_commenting_enabled;
+ gdata_picasaweb_album_set_location;
+ gdata_picasaweb_album_set_tags;
+ gdata_picasaweb_album_set_timestamp;
+ gdata_picasaweb_album_set_visibility;
+ gdata_picasaweb_comment_get_type;
+ gdata_picasaweb_comment_new;
+ gdata_picasaweb_feed_get_type;
+ gdata_picasaweb_file_get_album_id;
+ gdata_picasaweb_file_get_caption;
+ gdata_picasaweb_file_get_checksum;
+ gdata_picasaweb_file_get_comment_count;
+ gdata_picasaweb_file_get_contents;
+ gdata_picasaweb_file_get_coordinates;
+ gdata_picasaweb_file_get_credit;
+ gdata_picasaweb_file_get_distance;
+ gdata_picasaweb_file_get_edited;
+ gdata_picasaweb_file_get_exposure;
+ gdata_picasaweb_file_get_flash;
+ gdata_picasaweb_file_get_focal_length;
+ gdata_picasaweb_file_get_fstop;
+ gdata_picasaweb_file_get_height;
+ gdata_picasaweb_file_get_id;
+ gdata_picasaweb_file_get_image_unique_id;
+ gdata_picasaweb_file_get_iso;
+ gdata_picasaweb_file_get_make;
+ gdata_picasaweb_file_get_model;
+ gdata_picasaweb_file_get_rotation;
+ gdata_picasaweb_file_get_size;
+ gdata_picasaweb_file_get_tags;
+ gdata_picasaweb_file_get_thumbnails;
+ gdata_picasaweb_file_get_timestamp;
+ gdata_picasaweb_file_get_type;
+ gdata_picasaweb_file_get_version;
+ gdata_picasaweb_file_get_video_status;
+ gdata_picasaweb_file_get_width;
+ gdata_picasaweb_file_is_commenting_enabled;
+ gdata_picasaweb_file_new;
+ gdata_picasaweb_file_set_album_id;
+ gdata_picasaweb_file_set_caption;
+ gdata_picasaweb_file_set_checksum;
+ gdata_picasaweb_file_set_coordinates;
+ gdata_picasaweb_file_set_is_commenting_enabled;
+ gdata_picasaweb_file_set_rotation;
+ gdata_picasaweb_file_set_tags;
+ gdata_picasaweb_file_set_timestamp;
+ gdata_picasaweb_query_get_bounding_box;
+ gdata_picasaweb_query_get_image_size;
+ gdata_picasaweb_query_get_location;
+ gdata_picasaweb_query_get_tag;
+ gdata_picasaweb_query_get_thumbnail_size;
+ gdata_picasaweb_query_get_type;
+ gdata_picasaweb_query_get_visibility;
+ gdata_picasaweb_query_new;
+ gdata_picasaweb_query_new_with_limits;
+ gdata_picasaweb_query_set_bounding_box;
+ gdata_picasaweb_query_set_image_size;
+ gdata_picasaweb_query_set_location;
+ gdata_picasaweb_query_set_tag;
+ gdata_picasaweb_query_set_thumbnail_size;
+ gdata_picasaweb_query_set_visibility;
+ gdata_picasaweb_service_finish_file_upload;
+ gdata_picasaweb_service_get_primary_authorization_domain;
+ gdata_picasaweb_service_get_type;
+ gdata_picasaweb_service_get_user;
+ gdata_picasaweb_service_get_user_async;
+ gdata_picasaweb_service_get_user_finish;
+ gdata_picasaweb_service_insert_album;
+ gdata_picasaweb_service_insert_album_async;
+ gdata_picasaweb_service_new;
+ gdata_picasaweb_service_query_all_albums;
+ gdata_picasaweb_service_query_all_albums_async;
+ gdata_picasaweb_service_query_files;
+ gdata_picasaweb_service_query_files_async;
+ gdata_picasaweb_service_upload_file;
+ gdata_picasaweb_user_get_max_photos_per_album;
+ gdata_picasaweb_user_get_nickname;
+ gdata_picasaweb_user_get_quota_current;
+ gdata_picasaweb_user_get_quota_limit;
+ gdata_picasaweb_user_get_thumbnail_uri;
+ gdata_picasaweb_user_get_type;
+ gdata_picasaweb_user_get_user;
+ gdata_picasaweb_visibility_get_type;
+ gdata_query_get_author;
+ gdata_query_get_categories;
+ gdata_query_get_etag;
+ gdata_query_get_max_results;
+ gdata_query_get_published_max;
+ gdata_query_get_published_min;
+ gdata_query_get_q;
+ gdata_query_get_query_uri;
+ gdata_query_get_start_index;
+ gdata_query_get_type;
+ gdata_query_get_updated_max;
+ gdata_query_get_updated_min;
+ gdata_query_is_strict;
+ gdata_query_new;
+ gdata_query_new_with_limits;
+ gdata_query_next_page;
+ gdata_query_previous_page;
+ gdata_query_set_author;
+ gdata_query_set_categories;
+ gdata_query_set_etag;
+ gdata_query_set_is_strict;
+ gdata_query_set_max_results;
+ gdata_query_set_published_max;
+ gdata_query_set_published_min;
+ gdata_query_set_q;
+ gdata_query_set_start_index;
+ gdata_query_set_updated_max;
+ gdata_query_set_updated_min;
+ gdata_service_delete_entry;
+ gdata_service_delete_entry_async;
+ gdata_service_delete_entry_finish;
+ gdata_service_error_get_type;
+ gdata_service_error_quark;
+ gdata_service_get_authorization_domains;
+ gdata_service_get_authorizer;
+ gdata_service_get_locale;
+ gdata_service_get_proxy_resolver;
+ gdata_service_get_proxy_uri;
+ gdata_service_get_timeout;
+ gdata_service_get_type;
+ gdata_service_insert_entry;
+ gdata_service_insert_entry_async;
+ gdata_service_insert_entry_finish;
+ gdata_service_is_authorized;
+ gdata_service_query;
+ gdata_service_query_async;
+ gdata_service_query_finish;
+ gdata_service_query_single_entry;
+ gdata_service_query_single_entry_async;
+ gdata_service_query_single_entry_finish;
+ gdata_service_set_authorizer;
+ gdata_service_set_locale;
+ gdata_service_set_proxy_resolver;
+ gdata_service_set_proxy_uri;
+ gdata_service_set_timeout;
+ gdata_service_update_entry;
+ gdata_service_update_entry_async;
+ gdata_service_update_entry_finish;
+ gdata_tasks_query_get_completed_max;
+ gdata_tasks_query_get_completed_min;
+ gdata_tasks_query_get_due_max;
+ gdata_tasks_query_get_due_min;
+ gdata_tasks_query_get_show_completed;
+ gdata_tasks_query_get_show_deleted;
+ gdata_tasks_query_get_show_hidden;
+ gdata_tasks_query_get_type;
+ gdata_tasks_query_new;
+ gdata_tasks_query_set_completed_max;
+ gdata_tasks_query_set_completed_min;
+ gdata_tasks_query_set_due_max;
+ gdata_tasks_query_set_due_min;
+ gdata_tasks_query_set_show_completed;
+ gdata_tasks_query_set_show_deleted;
+ gdata_tasks_query_set_show_hidden;
+ gdata_tasks_service_delete_task;
+ gdata_tasks_service_delete_task_async;
+ gdata_tasks_service_delete_tasklist;
+ gdata_tasks_service_delete_tasklist_async;
+ gdata_tasks_service_get_primary_authorization_domain;
+ gdata_tasks_service_get_type;
+ gdata_tasks_service_insert_task;
+ gdata_tasks_service_insert_task_async;
+ gdata_tasks_service_insert_tasklist;
+ gdata_tasks_service_insert_tasklist_async;
+ gdata_tasks_service_new;
+ gdata_tasks_service_query_all_tasklists;
+ gdata_tasks_service_query_all_tasklists_async;
+ gdata_tasks_service_query_tasks;
+ gdata_tasks_service_query_tasks_async;
+ gdata_tasks_service_update_task;
+ gdata_tasks_service_update_task_async;
+ gdata_tasks_service_update_tasklist;
+ gdata_tasks_service_update_tasklist_async;
+ gdata_tasks_task_get_completed;
+ gdata_tasks_task_get_due;
+ gdata_tasks_task_get_notes;
+ gdata_tasks_task_get_parent;
+ gdata_tasks_task_get_position;
+ gdata_tasks_task_get_status;
+ gdata_tasks_task_get_type;
+ gdata_tasks_task_is_deleted;
+ gdata_tasks_task_is_hidden;
+ gdata_tasks_task_new;
+ gdata_tasks_task_set_completed;
+ gdata_tasks_task_set_due;
+ gdata_tasks_task_set_is_deleted;
+ gdata_tasks_task_set_notes;
+ gdata_tasks_task_set_parent;
+ gdata_tasks_task_set_position;
+ gdata_tasks_task_set_status;
+ gdata_tasks_tasklist_get_type;
+ gdata_tasks_tasklist_new;
+ gdata_upload_stream_get_authorization_domain;
+ gdata_upload_stream_get_cancellable;
+ gdata_upload_stream_get_content_length;
+ gdata_upload_stream_get_content_type;
+ gdata_upload_stream_get_entry;
+ gdata_upload_stream_get_method;
+ gdata_upload_stream_get_service;
+ gdata_upload_stream_get_slug;
+ gdata_upload_stream_get_type;
+ gdata_upload_stream_get_upload_uri;
+ gdata_upload_stream_new;
+ gdata_upload_stream_new_resumable;
+ gdata_youtube_age_get_type;
+ gdata_youtube_category_get_type;
+ gdata_youtube_category_is_assignable;
+ gdata_youtube_category_is_browsable;
+ gdata_youtube_category_is_deprecated;
+ gdata_youtube_comment_get_parent_comment_uri;
+ gdata_youtube_comment_get_type;
+ gdata_youtube_comment_new;
+ gdata_youtube_comment_set_parent_comment_uri;
+ gdata_youtube_content_get_format;
+ gdata_youtube_content_get_type;
+ gdata_youtube_credit_get_entity_type;
+ gdata_youtube_credit_get_type;
+ gdata_youtube_feed_get_type;
+ gdata_youtube_format_get_type;
+ gdata_youtube_permission_get_type;
+ gdata_youtube_query_get_age;
+ gdata_youtube_query_get_format;
+ gdata_youtube_query_get_language;
+ gdata_youtube_query_get_license;
+ gdata_youtube_query_get_location;
+ gdata_youtube_query_get_order_by;
+ gdata_youtube_query_get_restriction;
+ gdata_youtube_query_get_safe_search;
+ gdata_youtube_query_get_sort_order;
+ gdata_youtube_query_get_type;
+ gdata_youtube_query_get_uploader;
+ gdata_youtube_query_new;
+ gdata_youtube_query_set_age;
+ gdata_youtube_query_set_format;
+ gdata_youtube_query_set_language;
+ gdata_youtube_query_set_license;
+ gdata_youtube_query_set_location;
+ gdata_youtube_query_set_order_by;
+ gdata_youtube_query_set_restriction;
+ gdata_youtube_query_set_safe_search;
+ gdata_youtube_query_set_sort_order;
+ gdata_youtube_query_set_uploader;
+ gdata_youtube_safe_search_get_type;
+ gdata_youtube_service_error_get_type;
+ gdata_youtube_service_error_quark;
+ gdata_youtube_service_finish_video_upload;
+ gdata_youtube_service_get_categories;
+ gdata_youtube_service_get_categories_async;
+ gdata_youtube_service_get_categories_finish;
+ gdata_youtube_service_get_developer_key;
+ gdata_youtube_service_get_primary_authorization_domain;
+ gdata_youtube_service_get_type;
+ gdata_youtube_service_new;
+ gdata_youtube_service_query_related;
+ gdata_youtube_service_query_related_async;
+ gdata_youtube_service_query_standard_feed;
+ gdata_youtube_service_query_standard_feed_async;
+ gdata_youtube_service_query_videos;
+ gdata_youtube_service_query_videos_async;
+ gdata_youtube_service_upload_video;
+ gdata_youtube_sort_order_get_type;
+ gdata_youtube_standard_feed_type_get_type;
+ gdata_youtube_state_get_help_uri;
+ gdata_youtube_state_get_message;
+ gdata_youtube_state_get_name;
+ gdata_youtube_state_get_reason_code;
+ gdata_youtube_state_get_type;
+ gdata_youtube_uploader_get_type;
+ gdata_youtube_video_get_access_control;
+ gdata_youtube_video_get_aspect_ratio;
+ gdata_youtube_video_get_category;
+ gdata_youtube_video_get_coordinates;
+ gdata_youtube_video_get_credit;
+ gdata_youtube_video_get_description;
+ gdata_youtube_video_get_duration;
+ gdata_youtube_video_get_favorite_count;
+ gdata_youtube_video_get_keywords;
+ gdata_youtube_video_get_location;
+ gdata_youtube_video_get_media_rating;
+ gdata_youtube_video_get_player_uri;
+ gdata_youtube_video_get_rating;
+ gdata_youtube_video_get_recorded;
+ gdata_youtube_video_get_state;
+ gdata_youtube_video_get_thumbnails;
+ gdata_youtube_video_get_type;
+ gdata_youtube_video_get_uploaded;
+ gdata_youtube_video_get_video_id;
+ gdata_youtube_video_get_video_id_from_uri;
+ gdata_youtube_video_get_view_count;
+ gdata_youtube_video_is_draft;
+ gdata_youtube_video_is_private;
+ gdata_youtube_video_is_restricted_in_country;
+ gdata_youtube_video_look_up_content;
+ gdata_youtube_video_new;
+ gdata_youtube_video_set_access_control;
+ gdata_youtube_video_set_aspect_ratio;
+ gdata_youtube_video_set_category;
+ gdata_youtube_video_set_coordinates;
+ gdata_youtube_video_set_description;
+ gdata_youtube_video_set_is_draft;
+ gdata_youtube_video_set_is_private;
+ gdata_youtube_video_set_keywords;
+ gdata_youtube_video_set_location;
+ gdata_youtube_video_set_recorded;
+local:
+ *;
+};
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2011 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <string.h>
+#include <glib.h>
+#include <gdata/gdata.h>
+
+#include "common.h"
+
+/* Used as common "testing domains" to simplify test code. */
+static GDataAuthorizationDomain *test_domain1 = NULL;
+static GDataAuthorizationDomain *test_domain2 = NULL;
+
+static void
+test_authorization_domain_properties (void)
+{
+ GDataAuthorizationDomain *domain;
+ gchar *service_name, *scope;
+
+ /* NOTE: It's not expected that client code will normally get hold of GDataAuthorizationDomain instances this way.
+ * This is just for testing purposes. */
+ domain = GDATA_AUTHORIZATION_DOMAIN (g_object_new (GDATA_TYPE_AUTHORIZATION_DOMAIN,
+ "service-name", "service-name",
+ "scope", "scope",
+ NULL));
+
+ g_assert_cmpstr (gdata_authorization_domain_get_service_name (domain), ==, "service-name");
+ g_assert_cmpstr (gdata_authorization_domain_get_scope (domain), ==, "scope");
+
+ g_object_get (domain,
+ "service-name", &service_name,
+ "scope", &scope,
+ NULL);
+
+ g_assert_cmpstr (service_name, ==, "service-name");
+ g_assert_cmpstr (scope, ==, "scope");
+
+ g_free (service_name);
+ g_free (scope);
+}
+
+/* Simple implementation of GDataAuthorizer for test purposes */
+#define TYPE_SIMPLE_AUTHORIZER (simple_authorizer_get_type ())
+#define SIMPLE_AUTHORIZER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SIMPLE_TYPE_AUTHORIZER, SimpleAuthorizer))
+#define SIMPLE_AUTHORIZER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SIMPLE_TYPE_AUTHORIZER, SimpleAuthorizerClass))
+#define IS_SIMPLE_AUTHORIZER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SIMPLE_TYPE_AUTHORIZER))
+#define IS_SIMPLE_AUTHORIZER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SIMPLE_TYPE_AUTHORIZER))
+#define SIMPLE_AUTHORIZER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), SIMPLE_TYPE_AUTHORIZER, SimpleAuthorizerClass))
+
+typedef struct {
+ GObject parent;
+} SimpleAuthorizer;
+
+typedef struct {
+ GObjectClass parent;
+} SimpleAuthorizerClass;
+
+static GType simple_authorizer_get_type (void) G_GNUC_CONST;
+static void simple_authorizer_authorizer_init (GDataAuthorizerInterface *iface);
+
+G_DEFINE_TYPE_WITH_CODE (SimpleAuthorizer, simple_authorizer, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_AUTHORIZER, simple_authorizer_authorizer_init))
+
+static void
+simple_authorizer_class_init (SimpleAuthorizerClass *klass)
+{
+ /* Nothing to see here */
+}
+
+static void
+simple_authorizer_init (SimpleAuthorizer *self)
+{
+ /* Nothing to see here */
+}
+
+static void
+simple_authorizer_process_request (GDataAuthorizer *self, GDataAuthorizationDomain *domain, SoupMessage *message)
+{
+ SoupURI *test_uri;
+
+ /* Check that the domain and message are as expected */
+ g_assert (domain == NULL || GDATA_IS_AUTHORIZATION_DOMAIN (domain));
+ if (domain != NULL) {
+ g_assert_cmpstr (gdata_authorization_domain_get_scope (domain), ==, "scope1");
+ }
+
+ g_assert (message != NULL);
+ g_assert (SOUP_IS_MESSAGE (message));
+ test_uri = soup_uri_new ("http://example.com/");
+ g_assert (soup_uri_equal (soup_message_get_uri (message), test_uri) == TRUE);
+ soup_uri_free (test_uri);
+
+ /* Check that this is the first time we've touched the message, and if so, flag the message as touched */
+ if (domain != NULL) {
+ g_assert (soup_message_headers_get_one (message->request_headers, "process_request") == NULL);
+ soup_message_headers_append (message->request_headers, "process_request", "1");
+ } else {
+ soup_message_headers_append (message->request_headers, "process_request_null", "1");
+ }
+}
+
+static gboolean
+simple_authorizer_is_authorized_for_domain (GDataAuthorizer *self, GDataAuthorizationDomain *domain)
+{
+ gboolean is_test_domain1, is_test_domain2;
+
+ /* Check that the domain is as expected */
+ g_assert (domain != NULL);
+ g_assert (GDATA_IS_AUTHORIZATION_DOMAIN (domain));
+
+ is_test_domain1 = (strcmp (gdata_authorization_domain_get_scope (domain), "scope1") == 0) ? TRUE : FALSE;
+ is_test_domain2 = (strcmp (gdata_authorization_domain_get_scope (domain), "scope2") == 0) ? TRUE : FALSE;
+
+ g_assert (is_test_domain1 == TRUE || is_test_domain2 == TRUE);
+
+ /* Increment the counter on the domain so we know if this function's been called more than once on each domain */
+ g_object_set_data (G_OBJECT (domain), "counter", GUINT_TO_POINTER (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (domain), "counter")) + 1));
+
+ /* Only authorise test_domain1 */
+ return is_test_domain1;
+}
+
+static void
+simple_authorizer_authorizer_init (GDataAuthorizerInterface *iface)
+{
+ iface->process_request = simple_authorizer_process_request;
+ iface->is_authorized_for_domain = simple_authorizer_is_authorized_for_domain;
+}
+
+/* Normal implementation of GDataAuthorizer for test purposes */
+#define TYPE_NORMAL_AUTHORIZER (normal_authorizer_get_type ())
+#define NORMAL_AUTHORIZER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), NORMAL_TYPE_AUTHORIZER, NormalAuthorizer))
+#define NORMAL_AUTHORIZER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), NORMAL_TYPE_AUTHORIZER, NormalAuthorizerClass))
+#define IS_NORMAL_AUTHORIZER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), NORMAL_TYPE_AUTHORIZER))
+#define IS_NORMAL_AUTHORIZER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), NORMAL_TYPE_AUTHORIZER))
+#define NORMAL_AUTHORIZER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), NORMAL_TYPE_AUTHORIZER, NormalAuthorizerClass))
+
+typedef struct {
+ GObject parent;
+} NormalAuthorizer;
+
+typedef struct {
+ GObjectClass parent;
+} NormalAuthorizerClass;
+
+static GType normal_authorizer_get_type (void) G_GNUC_CONST;
+static void normal_authorizer_authorizer_init (GDataAuthorizerInterface *iface);
+
+G_DEFINE_TYPE_WITH_CODE (NormalAuthorizer, normal_authorizer, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_AUTHORIZER, normal_authorizer_authorizer_init))
+
+static void
+normal_authorizer_class_init (NormalAuthorizerClass *klass)
+{
+ /* Nothing to see here */
+}
+
+static void
+normal_authorizer_init (NormalAuthorizer *self)
+{
+ /* Nothing to see here */
+}
+
+static gboolean
+normal_authorizer_refresh_authorization (GDataAuthorizer *self, GCancellable *cancellable, GError **error)
+{
+ /* Check the inputs */
+ g_assert (GDATA_IS_AUTHORIZER (self));
+ g_assert (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+ g_assert (error == NULL || *error == NULL);
+
+ /* Increment the counter on the authorizer so we know if this function's been called more than once */
+ g_object_set_data (G_OBJECT (self), "counter", GUINT_TO_POINTER (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (self), "counter")) + 1));
+
+ /* If we're instructed to set an error, do so (with an arbitrary error code) */
+ if (g_object_get_data (G_OBJECT (self), "error") != NULL) {
+ g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR, "Error message");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static void
+normal_authorizer_authorizer_init (GDataAuthorizerInterface *iface)
+{
+ /* Use the same implementation as SimpleAuthorizer for process_request() and is_authorized_for_domain(). */
+ iface->process_request = simple_authorizer_process_request;
+ iface->is_authorized_for_domain = simple_authorizer_is_authorized_for_domain;
+
+ /* Unlike SimpleAuthorizer, also implement refresh_authorization() (but not the async versions). */
+ iface->refresh_authorization = normal_authorizer_refresh_authorization;
+}
+
+/* Complex implementation of GDataAuthorizer for test purposes */
+#define TYPE_COMPLEX_AUTHORIZER (complex_authorizer_get_type ())
+#define COMPLEX_AUTHORIZER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), COMPLEX_TYPE_AUTHORIZER, ComplexAuthorizer))
+#define COMPLEX_AUTHORIZER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), COMPLEX_TYPE_AUTHORIZER, ComplexAuthorizerClass))
+#define IS_COMPLEX_AUTHORIZER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), COMPLEX_TYPE_AUTHORIZER))
+#define IS_COMPLEX_AUTHORIZER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), COMPLEX_TYPE_AUTHORIZER))
+#define COMPLEX_AUTHORIZER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), COMPLEX_TYPE_AUTHORIZER, ComplexAuthorizerClass))
+
+typedef struct {
+ GObject parent;
+} ComplexAuthorizer;
+
+typedef struct {
+ GObjectClass parent;
+} ComplexAuthorizerClass;
+
+static GType complex_authorizer_get_type (void) G_GNUC_CONST;
+static void complex_authorizer_authorizer_init (GDataAuthorizerInterface *iface);
+
+G_DEFINE_TYPE_WITH_CODE (ComplexAuthorizer, complex_authorizer, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_AUTHORIZER, complex_authorizer_authorizer_init))
+
+static void
+complex_authorizer_class_init (ComplexAuthorizerClass *klass)
+{
+ /* Nothing to see here */
+}
+
+static void
+complex_authorizer_init (ComplexAuthorizer *self)
+{
+ /* Nothing to see here */
+}
+
+static void
+complex_authorizer_refresh_authorization_async (GDataAuthorizer *self, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+{
+ g_autoptr(GTask) task = NULL;
+ g_autoptr(GError) error = NULL;
+
+ /* Check the inputs */
+ g_assert (GDATA_IS_AUTHORIZER (self));
+ g_assert (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, complex_authorizer_refresh_authorization_async);
+
+ /* Increment the async counter on the authorizer so we know if this function's been called more than once */
+ g_object_set_data (G_OBJECT (self), "async-counter",
+ GUINT_TO_POINTER (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (self), "async-counter")) + 1));
+
+ if (g_cancellable_set_error_if_cancelled (cancellable, &error) == TRUE) {
+ /* Handle cancellation */
+ g_task_return_error (task, g_steal_pointer (&error));
+ } else if (g_object_get_data (G_OBJECT (self), "error") != NULL) {
+ /* If we're instructed to set an error, do so (with an arbitrary error code) */
+ g_task_return_new_error (task, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_NETWORK_ERROR, "%s", "Error message");
+ } else {
+ g_task_return_boolean (task, TRUE);
+ }
+}
+
+static gboolean
+complex_authorizer_refresh_authorization_finish (GDataAuthorizer *self, GAsyncResult *async_result, GError **error)
+{
+ /* Check the inputs */
+ g_assert (GDATA_IS_AUTHORIZER (self));
+ g_assert (G_IS_ASYNC_RESULT (async_result));
+ g_assert (error == NULL || *error == NULL);
+ g_assert (g_task_is_valid (async_result, self));
+ g_assert (g_async_result_is_tagged (async_result, complex_authorizer_refresh_authorization_async));
+
+ /* Assert that the async function's already been called (once) */
+ g_assert_cmpuint (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (self), "async-counter")), ==, 1);
+
+ /* Increment the finish counter on the authorizer so we know if this function's been called more than once */
+ g_object_set_data (G_OBJECT (self), "finish-counter",
+ GUINT_TO_POINTER (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (self), "finish-counter")) + 1));
+
+ return g_task_propagate_boolean (G_TASK (async_result), error);
+}
+
+static void
+complex_authorizer_authorizer_init (GDataAuthorizerInterface *iface)
+{
+ /* Use the same implementation as SimpleAuthorizer/NormalAuthorizer for process_request(), is_authorized_for_domain() and
+ * refresh_authorization(). */
+ iface->process_request = simple_authorizer_process_request;
+ iface->is_authorized_for_domain = simple_authorizer_is_authorized_for_domain;
+ iface->refresh_authorization = normal_authorizer_refresh_authorization;
+
+ /* Unlike NormalAuthorizer, also implement the async versions of refresh_authorization(). */
+ iface->refresh_authorization_async = complex_authorizer_refresh_authorization_async;
+ iface->refresh_authorization_finish = complex_authorizer_refresh_authorization_finish;
+}
+
+/* Testing data for generic GDataAuthorizer interface tests */
+typedef struct {
+ GDataAuthorizer *authorizer;
+} AuthorizerData;
+
+static void
+set_up_simple_authorizer_data (AuthorizerData *data, gconstpointer user_data)
+{
+ data->authorizer = GDATA_AUTHORIZER (g_object_new (TYPE_SIMPLE_AUTHORIZER, NULL));
+}
+
+static void
+set_up_normal_authorizer_data (AuthorizerData *data, gconstpointer user_data)
+{
+ data->authorizer = GDATA_AUTHORIZER (g_object_new (TYPE_NORMAL_AUTHORIZER, NULL));
+}
+
+static void
+set_up_complex_authorizer_data (AuthorizerData *data, gconstpointer user_data)
+{
+ data->authorizer = GDATA_AUTHORIZER (g_object_new (TYPE_COMPLEX_AUTHORIZER, NULL));
+}
+
+static void
+tear_down_authorizer_data (AuthorizerData *data, gconstpointer user_data)
+{
+ g_object_unref (data->authorizer);
+}
+
+/* Test that calling gdata_authorizer_process_request() happens correctly */
+static void
+test_authorizer_process_request (AuthorizerData *data, gconstpointer user_data)
+{
+ SoupMessage *message;
+
+ message = soup_message_new (SOUP_METHOD_GET, "http://example.com/");
+
+ gdata_authorizer_process_request (data->authorizer, test_domain1, message);
+ g_assert_cmpstr (soup_message_headers_get_one (message->request_headers, "process_request"), ==, "1");
+ g_assert (soup_message_headers_get_one (message->request_headers, "process_request_null") == NULL);
+
+ g_object_unref (message);
+}
+
+/* Test that calling gdata_authorizer_process_request() happens correctly for a NULL domain */
+static void
+test_authorizer_process_request_null (AuthorizerData *data, gconstpointer user_data)
+{
+ SoupMessage *message;
+
+ message = soup_message_new (SOUP_METHOD_GET, "http://example.com/");
+
+ gdata_authorizer_process_request (data->authorizer, NULL, message);
+ g_assert (soup_message_headers_get_one (message->request_headers, "process_request") == NULL);
+ g_assert_cmpstr (soup_message_headers_get_one (message->request_headers, "process_request_null"), ==, "1");
+
+ g_object_unref (message);
+}
+
+/* Test that calling gdata_authorizer_is_authorized_for_domain() happens correctly */
+static void
+test_authorizer_is_authorized_for_domain (AuthorizerData *data, gconstpointer user_data)
+{
+ /* Set some counters on the test domains to check that the interface implementation is only called once per domain */
+ g_object_set_data (G_OBJECT (test_domain1), "counter", GUINT_TO_POINTER (0));
+ g_object_set_data (G_OBJECT (test_domain2), "counter", GUINT_TO_POINTER (0));
+
+ g_assert (gdata_authorizer_is_authorized_for_domain (data->authorizer, test_domain1) == TRUE);
+ g_assert (gdata_authorizer_is_authorized_for_domain (data->authorizer, test_domain2) == FALSE);
+
+ g_assert_cmpuint (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (test_domain1), "counter")), ==, 1);
+ g_assert_cmpuint (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (test_domain2), "counter")), ==, 1);
+}
+
+/* Test that calling gdata_authorizer_is_authorized_for_domain() with a NULL authorizer always returns FALSE */
+static void
+test_authorizer_is_authorized_for_domain_null (AuthorizerData *data, gconstpointer user_data)
+{
+ g_assert (gdata_authorizer_is_authorized_for_domain (NULL, test_domain1) == FALSE);
+ g_assert (gdata_authorizer_is_authorized_for_domain (NULL, test_domain2) == FALSE);
+}
+
+/* Test that calling refresh_authorization() on an authorizer which implements it returns TRUE without error, and only calls the implementation
+ * once */
+static void
+test_authorizer_refresh_authorization (AuthorizerData *data, gconstpointer user_data)
+{
+ gboolean success;
+ GError *error = NULL;
+
+ /* Set a counter on the authoriser to check that the interface implementation is only called once */
+ g_object_set_data (G_OBJECT (data->authorizer), "counter", GUINT_TO_POINTER (0));
+
+ success = gdata_authorizer_refresh_authorization (data->authorizer, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (success == TRUE);
+ g_clear_error (&error);
+
+ g_assert_cmpuint (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (data->authorizer), "counter")), ==, 1);
+}
+
+/* Test that calling refresh_authorization() on an authorizer which implements it with errors returns FALSE with an error, and only calls the
+ * implementation once */
+static void
+test_authorizer_refresh_authorization_error (AuthorizerData *data, gconstpointer user_data)
+{
+ gboolean success;
+ GError *error = NULL;
+
+ /* Set a counter on the authoriser to check that the interface implementation is only called once */
+ g_object_set_data (G_OBJECT (data->authorizer), "counter", GUINT_TO_POINTER (0));
+
+ /* Set a flag on the authoriser to make the NormalAuthorizer implementation return an error for refresh_authorization() */
+ g_object_set_data (G_OBJECT (data->authorizer), "error", GUINT_TO_POINTER (TRUE));
+
+ success = gdata_authorizer_refresh_authorization (data->authorizer, NULL, &error);
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR);
+ g_assert (success == FALSE);
+ g_clear_error (&error);
+
+ g_assert_cmpuint (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (data->authorizer), "counter")), ==, 1);
+}
+
+/* Test that calling refresh_authorization() on an authorizer which doesn't implement it returns FALSE without an error */
+static void
+test_authorizer_refresh_authorization_unimplemented (AuthorizerData *data, gconstpointer user_data)
+{
+ gboolean success;
+ GError *error = NULL;
+
+ success = gdata_authorizer_refresh_authorization (data->authorizer, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (success == FALSE);
+ g_clear_error (&error);
+}
+
+/* Test that calling refresh_authorization() on an authorizer which doesn't implement it, then cancelling the call returns FALSE without an error
+ * (not even a cancellation error) */
+static void
+test_authorizer_refresh_authorization_cancellation_unimplemented (AuthorizerData *data, gconstpointer user_data)
+{
+ GCancellable *cancellable;
+ gboolean success;
+ GError *error = NULL;
+
+ cancellable = g_cancellable_new ();
+ g_cancellable_cancel (cancellable);
+
+ success = gdata_authorizer_refresh_authorization (data->authorizer, cancellable, &error);
+ g_assert_no_error (error);
+ g_assert (success == FALSE);
+ g_clear_error (&error);
+
+ g_object_unref (cancellable);
+}
+
+/* Set of standard async callback functions for refresh_authorization_async() which check various combinations of success and error value */
+static void
+test_authorizer_refresh_authorization_async_success_no_error_cb (GDataAuthorizer *authorizer, GAsyncResult *async_result, GMainLoop *main_loop)
+{
+ gboolean success;
+ GError *error = NULL;
+
+ success = gdata_authorizer_refresh_authorization_finish (authorizer, async_result, &error);
+ g_assert_no_error (error);
+ g_assert (success == TRUE);
+ g_clear_error (&error);
+
+ g_main_loop_quit (main_loop);
+}
+
+static void
+test_authorizer_refresh_authorization_async_failure_no_error_cb (GDataAuthorizer *authorizer, GAsyncResult *async_result, GMainLoop *main_loop)
+{
+ gboolean success;
+ GError *error = NULL;
+
+ success = gdata_authorizer_refresh_authorization_finish (authorizer, async_result, &error);
+ g_assert_no_error (error);
+ g_assert (success == FALSE);
+ g_clear_error (&error);
+
+ g_main_loop_quit (main_loop);
+}
+
+static void
+test_authorizer_refresh_authorization_async_network_error_cb (GDataAuthorizer *authorizer, GAsyncResult *async_result, GMainLoop *main_loop)
+{
+ gboolean success;
+ GError *error = NULL;
+
+ success = gdata_authorizer_refresh_authorization_finish (authorizer, async_result, &error);
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_NETWORK_ERROR);
+ g_assert (success == FALSE);
+ g_clear_error (&error);
+
+ g_main_loop_quit (main_loop);
+}
+
+static void
+test_authorizer_refresh_authorization_async_protocol_error_cb (GDataAuthorizer *authorizer, GAsyncResult *async_result, GMainLoop *main_loop)
+{
+ gboolean success;
+ GError *error = NULL;
+
+ success = gdata_authorizer_refresh_authorization_finish (authorizer, async_result, &error);
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR);
+ g_assert (success == FALSE);
+ g_clear_error (&error);
+
+ g_main_loop_quit (main_loop);
+}
+
+static void
+test_authorizer_refresh_authorization_async_cancelled_error_cb (GDataAuthorizer *authorizer, GAsyncResult *async_result, GMainLoop *main_loop)
+{
+ gboolean success;
+ GError *error = NULL;
+
+ success = gdata_authorizer_refresh_authorization_finish (authorizer, async_result, &error);
+ g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CANCELLED);
+ g_assert (success == FALSE);
+ g_clear_error (&error);
+
+ g_main_loop_quit (main_loop);
+}
+
+/* Test that calling refresh_authorization_async() on an authorizer which implements it returns TRUE without an error */
+static void
+test_authorizer_refresh_authorization_async (AuthorizerData *data, gconstpointer user_data)
+{
+ GMainLoop *main_loop;
+
+ /* Set counters on the authoriser to check that the interface implementations are only called once */
+ g_object_set_data (G_OBJECT (data->authorizer), "counter", GUINT_TO_POINTER (0));
+ g_object_set_data (G_OBJECT (data->authorizer), "async-counter", GUINT_TO_POINTER (0));
+ g_object_set_data (G_OBJECT (data->authorizer), "finish-counter", GUINT_TO_POINTER (0));
+
+ main_loop = g_main_loop_new (NULL, FALSE);
+
+ gdata_authorizer_refresh_authorization_async (data->authorizer, NULL,
+ (GAsyncReadyCallback) test_authorizer_refresh_authorization_async_success_no_error_cb,
+ main_loop);
+
+ g_main_loop_run (main_loop);
+
+ g_assert_cmpuint (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (data->authorizer), "counter")), ==, 0);
+ g_assert_cmpuint (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (data->authorizer), "async-counter")), ==, 1);
+ g_assert_cmpuint (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (data->authorizer), "finish-counter")), ==, 1);
+
+ g_main_loop_unref (main_loop);
+}
+
+/* Test that calling refresh_authorization_async() on an authorizer which implements it with an error returns FALSE with the appropriate error */
+static void
+test_authorizer_refresh_authorization_async_error (AuthorizerData *data, gconstpointer user_data)
+{
+ GMainLoop *main_loop;
+
+ /* Set counters on the authoriser to check that the interface implementations are only called once */
+ g_object_set_data (G_OBJECT (data->authorizer), "counter", GUINT_TO_POINTER (0));
+ g_object_set_data (G_OBJECT (data->authorizer), "async-counter", GUINT_TO_POINTER (0));
+ g_object_set_data (G_OBJECT (data->authorizer), "finish-counter", GUINT_TO_POINTER (0));
+
+ /* Set a flag on the authoriser to make the ComplexAuthorizer implementation return an error for refresh_authorization_async() */
+ g_object_set_data (G_OBJECT (data->authorizer), "error", GUINT_TO_POINTER (TRUE));
+
+ main_loop = g_main_loop_new (NULL, FALSE);
+
+ gdata_authorizer_refresh_authorization_async (data->authorizer, NULL,
+ (GAsyncReadyCallback) test_authorizer_refresh_authorization_async_network_error_cb, main_loop);
+
+ g_main_loop_run (main_loop);
+
+ g_assert_cmpuint (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (data->authorizer), "counter")), ==, 0);
+ g_assert_cmpuint (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (data->authorizer), "async-counter")), ==, 1);
+ g_assert_cmpuint (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (data->authorizer), "finish-counter")), ==, 1);
+
+ g_main_loop_unref (main_loop);
+}
+
+/* Test that calling refresh_authorization_async() on an authorizer which implements it, then cancelling the call returns FALSE with a cancellation
+ * error */
+static void
+test_authorizer_refresh_authorization_async_cancellation (AuthorizerData *data, gconstpointer user_data)
+{
+ GCancellable *cancellable;
+ GMainLoop *main_loop;
+
+ /* Set counters on the authoriser to check that the interface implementations are only called once */
+ g_object_set_data (G_OBJECT (data->authorizer), "counter", GUINT_TO_POINTER (0));
+ g_object_set_data (G_OBJECT (data->authorizer), "async-counter", GUINT_TO_POINTER (0));
+ g_object_set_data (G_OBJECT (data->authorizer), "finish-counter", GUINT_TO_POINTER (0));
+
+ main_loop = g_main_loop_new (NULL, FALSE);
+
+ cancellable = g_cancellable_new ();
+ g_cancellable_cancel (cancellable);
+
+ gdata_authorizer_refresh_authorization_async (data->authorizer, cancellable,
+ (GAsyncReadyCallback) test_authorizer_refresh_authorization_async_cancelled_error_cb,
+ main_loop);
+
+ g_main_loop_run (main_loop);
+
+ g_assert_cmpuint (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (data->authorizer), "counter")), ==, 0);
+ g_assert_cmpuint (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (data->authorizer), "async-counter")), ==, 1);
+ g_assert_cmpuint (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (data->authorizer), "finish-counter")), ==, 1);
+
+ g_object_unref (cancellable);
+ g_main_loop_unref (main_loop);
+}
+
+/* Test that calling refresh_authorization_async() on an authorizer which doesn't implement it, but does implement refresh_authorization(), returns
+ * TRUE without an error */
+static void
+test_authorizer_refresh_authorization_async_simulated (AuthorizerData *data, gconstpointer user_data)
+{
+ GMainLoop *main_loop;
+
+ /* Set a counter on the authoriser to check that the interface implementation is only called once */
+ g_object_set_data (G_OBJECT (data->authorizer), "counter", GUINT_TO_POINTER (0));
+
+ main_loop = g_main_loop_new (NULL, FALSE);
+
+ gdata_authorizer_refresh_authorization_async (data->authorizer, NULL,
+ (GAsyncReadyCallback) test_authorizer_refresh_authorization_async_success_no_error_cb,
+ main_loop);
+
+ g_main_loop_run (main_loop);
+
+ g_assert_cmpuint (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (data->authorizer), "counter")), ==, 1);
+
+ g_main_loop_unref (main_loop);
+}
+
+/* Test that calling refresh_authorization_async() on an authorizer which doesn't implement it, but does implement refresh_authorization() with an
+ * error, returns FALSE with the appropriate error */
+static void
+test_authorizer_refresh_authorization_async_error_simulated (AuthorizerData *data, gconstpointer user_data)
+{
+ GMainLoop *main_loop;
+
+ /* Set a counter on the authoriser to check that the interface implementation is only called once */
+ g_object_set_data (G_OBJECT (data->authorizer), "counter", GUINT_TO_POINTER (0));
+
+ /* Set a flag on the authoriser to make the NormalAuthorizer implementation return an error for refresh_authorization() */
+ g_object_set_data (G_OBJECT (data->authorizer), "error", GUINT_TO_POINTER (TRUE));
+
+ main_loop = g_main_loop_new (NULL, FALSE);
+
+ gdata_authorizer_refresh_authorization_async (data->authorizer, NULL,
+ (GAsyncReadyCallback) test_authorizer_refresh_authorization_async_protocol_error_cb, main_loop);
+
+ g_main_loop_run (main_loop);
+
+ g_assert_cmpuint (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (data->authorizer), "counter")), ==, 1);
+
+ g_main_loop_unref (main_loop);
+}
+
+/* Test that calling refresh_authorization_async() on an authorizer which doesn't implement it, but does implement refresh_authorization(), then
+ * cancelling the call returns FALSE with a cancellation error */
+static void
+test_authorizer_refresh_authorization_async_cancellation_simulated (AuthorizerData *data, gconstpointer user_data)
+{
+ GCancellable *cancellable;
+ GMainLoop *main_loop;
+
+ main_loop = g_main_loop_new (NULL, FALSE);
+
+ cancellable = g_cancellable_new ();
+ g_cancellable_cancel (cancellable);
+
+ /* Note we don't count how many times the implementation of refresh_authorization() is called, since cancellation can legitimately be
+ * handled by the gdata_authorizer_refresh_authorization_async() code before refresh_authorization() is ever called. */
+ gdata_authorizer_refresh_authorization_async (data->authorizer, cancellable,
+ (GAsyncReadyCallback) test_authorizer_refresh_authorization_async_cancelled_error_cb,
+ main_loop);
+
+ g_main_loop_run (main_loop);
+
+ g_object_unref (cancellable);
+ g_main_loop_unref (main_loop);
+}
+
+/* Test that calling refresh_authorization_async() on an authorizer which doesn't implement it returns FALSE without an error */
+static void
+test_authorizer_refresh_authorization_async_unimplemented (AuthorizerData *data, gconstpointer user_data)
+{
+ GMainLoop *main_loop;
+
+ main_loop = g_main_loop_new (NULL, FALSE);
+
+ gdata_authorizer_refresh_authorization_async (data->authorizer, NULL,
+ (GAsyncReadyCallback) test_authorizer_refresh_authorization_async_failure_no_error_cb,
+ main_loop);
+
+ g_main_loop_run (main_loop);
+
+ g_main_loop_unref (main_loop);
+}
+
+/* Test that calling refresh_authorization_async() on an authorizer which doesn't implement it, then cancelling the call returns FALSE without an
+ * error (not even a cancellation error) */
+static void
+test_authorizer_refresh_authorization_async_cancellation_unimplemented (AuthorizerData *data, gconstpointer user_data)
+{
+ GCancellable *cancellable;
+ GMainLoop *main_loop;
+
+ main_loop = g_main_loop_new (NULL, FALSE);
+
+ cancellable = g_cancellable_new ();
+ g_cancellable_cancel (cancellable);
+
+ gdata_authorizer_refresh_authorization_async (data->authorizer, cancellable,
+ (GAsyncReadyCallback) test_authorizer_refresh_authorization_async_failure_no_error_cb,
+ main_loop);
+
+ g_main_loop_run (main_loop);
+
+ g_object_unref (cancellable);
+ g_main_loop_unref (main_loop);
+}
+
+int
+main (int argc, char *argv[])
+{
+ int retval;
+
+ gdata_test_init (argc, argv);
+
+ /* Note: This is not how GDataAuthorizationDomains are meant to be constructed. Client code is not expected to do this. */
+ test_domain1 = g_object_new (GDATA_TYPE_AUTHORIZATION_DOMAIN,
+ "service-name", "service-name1",
+ "scope", "scope1",
+ NULL);
+ test_domain2 = g_object_new (GDATA_TYPE_AUTHORIZATION_DOMAIN,
+ "service-name", "service-name2",
+ "scope", "scope2",
+ NULL);
+
+ /* GDataAuthorizationDomain tests */
+ g_test_add_func ("/authorization-domain/properties", test_authorization_domain_properties);
+
+ /* GDataAuthorizer interface tests */
+ g_test_add ("/authorizer/process-request", AuthorizerData, NULL, set_up_simple_authorizer_data, test_authorizer_process_request,
+ tear_down_authorizer_data);
+ g_test_add ("/authorizer/process-request/null", AuthorizerData, NULL, set_up_simple_authorizer_data, test_authorizer_process_request_null,
+ tear_down_authorizer_data);
+ g_test_add ("/authorizer/is-authorized-for-domain", AuthorizerData, NULL, set_up_simple_authorizer_data,
+ test_authorizer_is_authorized_for_domain, tear_down_authorizer_data);
+ g_test_add ("/authorizer/is-authorized-for-domain/null", AuthorizerData, NULL, set_up_simple_authorizer_data,
+ test_authorizer_is_authorized_for_domain_null, tear_down_authorizer_data);
+ g_test_add ("/authorizer/refresh-authorization", AuthorizerData, NULL, set_up_normal_authorizer_data,
+ test_authorizer_refresh_authorization, tear_down_authorizer_data);
+ g_test_add ("/authorizer/refresh-authorization/error", AuthorizerData, NULL, set_up_normal_authorizer_data,
+ test_authorizer_refresh_authorization_error, tear_down_authorizer_data);
+ g_test_add ("/authorizer/refresh-authorization/unimplemented", AuthorizerData, NULL, set_up_simple_authorizer_data,
+ test_authorizer_refresh_authorization_unimplemented, tear_down_authorizer_data);
+ g_test_add ("/authorizer/refresh-authorization/cancellation/unimplemented", AuthorizerData, NULL, set_up_simple_authorizer_data,
+ test_authorizer_refresh_authorization_cancellation_unimplemented, tear_down_authorizer_data);
+ g_test_add ("/authorizer/refresh-authorization/async", AuthorizerData, NULL, set_up_complex_authorizer_data,
+ test_authorizer_refresh_authorization_async, tear_down_authorizer_data);
+ g_test_add ("/authorizer/refresh-authorization/async/error", AuthorizerData, NULL, set_up_complex_authorizer_data,
+ test_authorizer_refresh_authorization_async_error, tear_down_authorizer_data);
+ g_test_add ("/authorizer/refresh-authorization/async/cancellation", AuthorizerData, NULL, set_up_complex_authorizer_data,
+ test_authorizer_refresh_authorization_async_cancellation, tear_down_authorizer_data);
+ g_test_add ("/authorizer/refresh-authorization/async/simulated", AuthorizerData, NULL, set_up_normal_authorizer_data,
+ test_authorizer_refresh_authorization_async_simulated, tear_down_authorizer_data);
+ g_test_add ("/authorizer/refresh-authorization/async/error/simulated", AuthorizerData, NULL, set_up_normal_authorizer_data,
+ test_authorizer_refresh_authorization_async_error_simulated, tear_down_authorizer_data);
+ g_test_add ("/authorizer/refresh-authorization/async/cancellation/simulated", AuthorizerData, NULL, set_up_normal_authorizer_data,
+ test_authorizer_refresh_authorization_async_cancellation_simulated, tear_down_authorizer_data);
+ g_test_add ("/authorizer/refresh-authorization/async/unimplemented", AuthorizerData, NULL, set_up_simple_authorizer_data,
+ test_authorizer_refresh_authorization_async_unimplemented, tear_down_authorizer_data);
+ g_test_add ("/authorizer/refresh-authorization/async/cancellation/unimplemented", AuthorizerData, NULL, set_up_simple_authorizer_data,
+ test_authorizer_refresh_authorization_async_cancellation_unimplemented, tear_down_authorizer_data);
+
+ retval = g_test_run ();
+
+ g_object_unref (test_domain2);
+ g_object_unref (test_domain1);
+
+ return retval;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2016 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+
+#include <glib.h>
+#include <unistd.h>
+
+#include "gdata.h"
+#include "common.h"
+
+/* gdata-buffer.h is private, so just include the C file for easy testing. */
+#include "gdata-buffer.c"
+
+
+typedef struct {
+ gpointer unused;
+} Fixture;
+
+
+static void
+set_up (Fixture *f, gconstpointer user_data)
+{
+ /* Abort if we end up blocking. */
+ alarm (30);
+}
+
+static void
+tear_down (Fixture *f, gconstpointer user_data)
+{
+ /* Reset the alarm. */
+ alarm (0);
+}
+
+static void
+test_buffer_construction (Fixture *f, gconstpointer user_data)
+{
+ GDataBuffer *buffer = NULL; /* owned */
+
+ buffer = gdata_buffer_new ();
+ gdata_buffer_free (buffer);
+}
+
+static void
+test_buffer_instant_eof (Fixture *f, gconstpointer user_data)
+{
+ GDataBuffer *buffer = NULL; /* owned */
+ gboolean reached_eof = FALSE;
+ guint8 buf[1];
+
+ buffer = gdata_buffer_new ();
+
+ g_assert_false (gdata_buffer_push_data (buffer, NULL, 0));
+ g_assert_cmpuint (gdata_buffer_pop_data (buffer, buf, sizeof (buf),
+ &reached_eof, NULL), ==, 0);
+ g_assert_true (reached_eof);
+
+ gdata_buffer_free (buffer);
+}
+
+static gpointer
+test_buffer_thread_eof_func (gpointer user_data)
+{
+ GDataBuffer *buffer = user_data;
+
+ /* HACK: Wait for a while to be sure that gdata_buffer_pop_data() has
+ * been already called. */
+ g_usleep (G_USEC_PER_SEC / 2);
+
+ g_assert_false (gdata_buffer_push_data (buffer, NULL, 0));
+
+ return NULL;
+}
+
+/* The test needs to call gdata_buffer_push_data() from another thread only
+ * once gdata_buffer_pop_data() has reached its blocking loop. */
+static void
+test_buffer_thread_eof (Fixture *f, gconstpointer user_data)
+{
+ GDataBuffer *buffer = NULL; /* owned */
+ gboolean reached_eof = FALSE;
+ guint8 buf[1];
+
+ g_test_bug ("769727");
+
+ buffer = gdata_buffer_new ();
+
+ g_thread_new (NULL, test_buffer_thread_eof_func, buffer);
+ g_assert_cmpuint (gdata_buffer_pop_data (buffer, buf, sizeof (buf),
+ &reached_eof, NULL), ==, 0);
+ g_assert_true (reached_eof);
+
+ gdata_buffer_free (buffer);
+}
+
+static void
+test_buffer_basic (Fixture *f, gconstpointer user_data)
+{
+ GDataBuffer *buffer = NULL; /* owned */
+ gboolean reached_eof = FALSE;
+ guint8 buf[100];
+ guint8 buf2[100];
+ gsize i;
+
+ buffer = gdata_buffer_new ();
+
+ for (i = 0; i < sizeof (buf); i++)
+ buf[i] = i;
+
+ g_assert_true (gdata_buffer_push_data (buffer, buf, sizeof (buf)));
+ g_assert_false (gdata_buffer_push_data (buffer, NULL, 0));
+
+ g_assert_cmpuint (gdata_buffer_pop_data (buffer, buf2,
+ sizeof (buf2) / 2,
+ &reached_eof, NULL), ==,
+ sizeof (buf2) / 2);
+ g_assert_false (reached_eof);
+ g_assert_cmpuint (gdata_buffer_pop_data (buffer,
+ buf2 + sizeof (buf2) / 2,
+ sizeof (buf2) / 2,
+ &reached_eof, NULL), ==,
+ sizeof (buf2) / 2);
+ g_assert_true (reached_eof);
+
+ for (i = 0; i < sizeof (buf); i++)
+ g_assert_cmpuint (buf[i], ==, buf2[i]);
+
+ gdata_buffer_free (buffer);
+}
+
+int
+main (int argc, char *argv[])
+{
+ gdata_test_init (argc, argv);
+
+ /* Only print out headers, since we're sending a lot of data. */
+ g_setenv ("LIBGDATA_DEBUG", "2" /* GDATA_LOG_HEADERS */, TRUE);
+
+ g_test_add ("/buffer/construction", Fixture, NULL,
+ set_up, test_buffer_construction, tear_down);
+ g_test_add ("/buffer/instant-eof", Fixture, NULL,
+ set_up, test_buffer_instant_eof, tear_down);
+ g_test_add ("/buffer/thread-eof", Fixture, NULL,
+ set_up, test_buffer_thread_eof, tear_down);
+ g_test_add ("/buffer/basic", Fixture, NULL,
+ set_up, test_buffer_basic, tear_down);
+
+ return g_test_run ();
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009, 2010, 2014, 2015, 2017 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib.h>
+#include <unistd.h>
+#include <string.h>
+
+#include "gdata.h"
+#include "common.h"
+#include "gdata-dummy-authorizer.h"
+
+static UhmServer *mock_server = NULL;
+
+#undef CLIENT_ID /* from common.h */
+
+#define CLIENT_ID "352818697630-nqu2cmt5quqd6lr17ouoqmb684u84l1f.apps.googleusercontent.com"
+#define CLIENT_SECRET "-fA4pHQJxR3zJ-FyAMPQsikg"
+#define REDIRECT_URI "urn:ietf:wg:oauth:2.0:oob"
+
+typedef struct {
+ GDataCalendarCalendar *calendar;
+} TempCalendarData;
+
+static void
+set_up_temp_calendar (TempCalendarData *data, gconstpointer service)
+{
+ GDataCalendarCalendar *calendar;
+ GDataColor colour;
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-temp-calendar");
+
+ g_assert (gdata_color_from_hexadecimal ("#7A367A", &colour) == TRUE);
+
+ /* Create a single temporary test calendar */
+ calendar = gdata_calendar_calendar_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (calendar), "Temp Test Calendar");
+ gdata_calendar_calendar_set_color (calendar, &colour);
+ data->calendar = GDATA_CALENDAR_CALENDAR (gdata_service_insert_entry (GDATA_SERVICE (service),
+ gdata_calendar_service_get_primary_authorization_domain (),
+ "https://www.googleapis.com/calendar/v3/calendars",
+ GDATA_ENTRY (calendar), NULL, NULL));
+ g_assert (GDATA_IS_CALENDAR_CALENDAR (data->calendar));
+ g_object_unref (calendar);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+tear_down_temp_calendar (TempCalendarData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "teardown-temp-calendar");
+
+ /* Delete the calendar */
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_calendar_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->calendar), NULL, NULL) == TRUE);
+ g_object_unref (data->calendar);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_authentication (void)
+{
+ GDataOAuth2Authorizer *authorizer = NULL; /* owned */
+ gchar *authentication_uri, *authorisation_code;
+
+ gdata_test_mock_server_start_trace (mock_server, "authentication");
+
+ authorizer = gdata_oauth2_authorizer_new (CLIENT_ID, CLIENT_SECRET,
+ REDIRECT_URI,
+ GDATA_TYPE_CALENDAR_SERVICE);
+
+ /* Get an authentication URI. */
+ authentication_uri = gdata_oauth2_authorizer_build_authentication_uri (authorizer, NULL, FALSE);
+ g_assert (authentication_uri != NULL);
+
+ /* Get the authorisation code off the user. */
+ if (uhm_server_get_enable_online (mock_server)) {
+ authorisation_code = gdata_test_query_user_for_verifier (authentication_uri);
+ } else {
+ /* Hard coded, extracted from the trace file. */
+ authorisation_code = g_strdup ("4/OEX-S1iMbOA_dOnNgUlSYmGWh3TK.QrR73axcNMkWoiIBeO6P2m_su7cwkQI");
+ }
+
+ g_free (authentication_uri);
+
+ if (authorisation_code == NULL) {
+ /* Skip tests. */
+ goto skip_test;
+ }
+
+ /* Authorise the token */
+ g_assert (gdata_oauth2_authorizer_request_authorization (authorizer, authorisation_code, NULL, NULL) == TRUE);
+
+ /* Check all is as it should be */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (authorizer),
+ gdata_calendar_service_get_primary_authorization_domain ()) == TRUE);
+
+skip_test:
+ g_free (authorisation_code);
+ g_object_unref (authorizer);
+
+ uhm_server_end_trace (mock_server);
+}
+
+typedef struct {
+ GDataCalendarCalendar *calendar1;
+ GDataCalendarCalendar *calendar2;
+} QueryCalendarsData;
+
+static void
+set_up_query_calendars (QueryCalendarsData *data, gconstpointer service)
+{
+ GDataCalendarCalendar *calendar;
+ GDataColor colour;
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-query-calendars");
+
+ g_assert (gdata_color_from_hexadecimal ("#7A367A", &colour) == TRUE);
+
+ /* Create some new calendars for queries */
+ calendar = gdata_calendar_calendar_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (calendar), "Test Calendar 1");
+ gdata_calendar_calendar_set_color (calendar, &colour);
+ data->calendar1 = GDATA_CALENDAR_CALENDAR (gdata_service_insert_entry (GDATA_SERVICE (service),
+ gdata_calendar_service_get_primary_authorization_domain (),
+ "https://www.googleapis.com/calendar/v3/calendars",
+ GDATA_ENTRY (calendar), NULL, NULL));
+ g_assert (GDATA_IS_CALENDAR_CALENDAR (data->calendar1));
+ g_object_unref (calendar);
+
+ calendar = gdata_calendar_calendar_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (calendar), "Test Calendar 2");
+ gdata_calendar_calendar_set_color (calendar, &colour);
+ data->calendar2 = GDATA_CALENDAR_CALENDAR (gdata_service_insert_entry (GDATA_SERVICE (service),
+ gdata_calendar_service_get_primary_authorization_domain (),
+ "https://www.googleapis.com/calendar/v3/calendars",
+ GDATA_ENTRY (calendar), NULL, NULL));
+ g_assert (GDATA_IS_CALENDAR_CALENDAR (data->calendar2));
+ g_object_unref (calendar);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+tear_down_query_calendars (QueryCalendarsData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "teardown-query-calendars");
+
+ /* Delete the calendars */
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_calendar_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->calendar1), NULL, NULL) == TRUE);
+ g_object_unref (data->calendar1);
+
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_calendar_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->calendar2), NULL, NULL) == TRUE);
+ g_object_unref (data->calendar2);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_query_all_calendars (QueryCalendarsData *data, gconstpointer service)
+{
+ GDataFeed *feed;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "query-all-calendars");
+
+ feed = gdata_calendar_service_query_all_calendars (GDATA_CALENDAR_SERVICE (service), NULL, NULL, NULL, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_CALENDAR_FEED (feed));
+ g_clear_error (&error);
+
+ /* TODO: check entries and feed properties */
+
+ g_object_unref (feed);
+
+ uhm_server_end_trace (mock_server);
+}
+
+GDATA_ASYNC_CLOSURE_FUNCTIONS (query_calendars, QueryCalendarsData);
+
+GDATA_ASYNC_TEST_FUNCTIONS (query_all_calendars, QueryCalendarsData,
+G_STMT_START {
+ gdata_calendar_service_query_all_calendars_async (GDATA_CALENDAR_SERVICE (service), NULL, cancellable, NULL,
+ NULL, NULL, async_ready_callback, async_data);
+} G_STMT_END,
+G_STMT_START {
+ GDataFeed *feed;
+
+ feed = gdata_service_query_finish (GDATA_SERVICE (obj), async_result, &error);
+
+ if (error == NULL) {
+ /* TODO: Tests? */
+ g_assert (GDATA_IS_CALENDAR_FEED (feed));
+
+ g_object_unref (feed);
+ } else {
+ g_assert (feed == NULL);
+ }
+} G_STMT_END);
+
+static void
+test_query_all_calendars_async_progress_closure (QueryCalendarsData *query_data, gconstpointer service)
+{
+ GDataAsyncProgressClosure *data = g_slice_new0 (GDataAsyncProgressClosure);
+
+ gdata_test_mock_server_start_trace (mock_server, "query-all-calendars-async-progress-closure");
+
+ data->main_loop = g_main_loop_new (NULL, TRUE);
+
+ gdata_calendar_service_query_all_calendars_async (GDATA_CALENDAR_SERVICE (service), NULL, NULL,
+ (GDataQueryProgressCallback) gdata_test_async_progress_callback,
+ data, (GDestroyNotify) gdata_test_async_progress_closure_free,
+ (GAsyncReadyCallback) gdata_test_async_progress_finish_callback, data);
+
+ g_main_loop_run (data->main_loop);
+ g_main_loop_unref (data->main_loop);
+
+ /* Check that both callbacks were called exactly once */
+ g_assert_cmpuint (data->progress_destroy_notify_count, ==, 1);
+ g_assert_cmpuint (data->async_ready_notify_count, ==, 1);
+
+ g_slice_free (GDataAsyncProgressClosure, data);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_query_own_calendars (QueryCalendarsData *data, gconstpointer service)
+{
+ GDataFeed *feed;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "query-own-calendars");
+
+ feed = gdata_calendar_service_query_own_calendars (GDATA_CALENDAR_SERVICE (service), NULL, NULL, NULL, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_CALENDAR_FEED (feed));
+ g_clear_error (&error);
+
+ /* TODO: check entries and feed properties */
+
+ g_object_unref (feed);
+
+ uhm_server_end_trace (mock_server);
+}
+
+GDATA_ASYNC_TEST_FUNCTIONS (query_own_calendars, QueryCalendarsData,
+G_STMT_START {
+ gdata_calendar_service_query_own_calendars_async (GDATA_CALENDAR_SERVICE (service), NULL, cancellable, NULL,
+ NULL, NULL, async_ready_callback, async_data);
+} G_STMT_END,
+G_STMT_START {
+ GDataFeed *feed;
+
+ feed = gdata_service_query_finish (GDATA_SERVICE (obj), async_result, &error);
+
+ if (error == NULL) {
+ g_assert (GDATA_IS_CALENDAR_FEED (feed));
+ /* TODO: Tests? */
+
+ g_object_unref (feed);
+ } else {
+ g_assert (feed == NULL);
+ }
+} G_STMT_END);
+
+static void
+test_query_own_calendars_async_progress_closure (QueryCalendarsData *query_data, gconstpointer service)
+{
+ GDataAsyncProgressClosure *data = g_slice_new0 (GDataAsyncProgressClosure);
+
+ gdata_test_mock_server_start_trace (mock_server, "query-own-calendars-async-progress-closure");
+
+ data->main_loop = g_main_loop_new (NULL, TRUE);
+
+ gdata_calendar_service_query_own_calendars_async (GDATA_CALENDAR_SERVICE (service), NULL, NULL,
+ (GDataQueryProgressCallback) gdata_test_async_progress_callback,
+ data, (GDestroyNotify) gdata_test_async_progress_closure_free,
+ (GAsyncReadyCallback) gdata_test_async_progress_finish_callback, data);
+
+ g_main_loop_run (data->main_loop);
+ g_main_loop_unref (data->main_loop);
+
+ /* Check that both callbacks were called exactly once */
+ g_assert_cmpuint (data->progress_destroy_notify_count, ==, 1);
+ g_assert_cmpuint (data->async_ready_notify_count, ==, 1);
+
+ g_slice_free (GDataAsyncProgressClosure, data);
+
+ uhm_server_end_trace (mock_server);
+}
+
+typedef struct {
+ TempCalendarData parent;
+ GDataCalendarEvent *event1;
+ GDataCalendarEvent *event2;
+ GDataCalendarEvent *event3;
+} QueryEventsData;
+
+static void
+set_up_query_events (QueryEventsData *data, gconstpointer service)
+{
+ GDataCalendarEvent *event;
+ GDataGDWhen *when;
+ GError *error = NULL;
+
+ /* Set up a temporary calendar */
+ set_up_temp_calendar ((TempCalendarData*) data, service);
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-query-events");
+
+ /* Add some test events to it */
+ event = gdata_calendar_event_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (event), "Test Event 1");
+
+ when = gdata_gd_when_new (1419113727, 1419113728, FALSE);
+ gdata_calendar_event_add_time (event, when);
+ g_object_unref (when);
+
+ data->event1 = gdata_calendar_service_insert_calendar_event (GDATA_CALENDAR_SERVICE (service), data->parent.calendar, event, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_CALENDAR_EVENT (data->event1));
+ g_object_unref (event);
+
+ event = gdata_calendar_event_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (event), "Test Event 2");
+
+ when = gdata_gd_when_new (1419113000, 1419114000, FALSE);
+ gdata_calendar_event_add_time (event, when);
+ g_object_unref (when);
+
+ data->event2 = gdata_calendar_service_insert_calendar_event (GDATA_CALENDAR_SERVICE (service), data->parent.calendar, event, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_CALENDAR_EVENT (data->event2));
+ g_object_unref (event);
+
+ event = gdata_calendar_event_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (event), "Test Event 3");
+
+ when = gdata_gd_when_new (1419110000, 1419120000, TRUE);
+ gdata_calendar_event_add_time (event, when);
+ g_object_unref (when);
+
+ data->event3 = gdata_calendar_service_insert_calendar_event (GDATA_CALENDAR_SERVICE (service), data->parent.calendar, event, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_CALENDAR_EVENT (data->event3));
+ g_object_unref (event);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+tear_down_query_events (QueryEventsData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "teardown-query-events");
+
+ /* Delete the events */
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_calendar_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->event1), NULL, NULL) == TRUE);
+ g_object_unref (data->event1);
+
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_calendar_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->event2), NULL, NULL) == TRUE);
+ g_object_unref (data->event2);
+
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_calendar_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->event3), NULL, NULL) == TRUE);
+ g_object_unref (data->event3);
+
+ uhm_server_end_trace (mock_server);
+
+ /* Delete the calendar */
+ tear_down_temp_calendar ((TempCalendarData*) data, service);
+}
+
+static void
+test_query_events (QueryEventsData *data, gconstpointer service)
+{
+ GDataFeed *feed;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "query-events");
+
+ /* Get the entry feed */
+ feed = gdata_calendar_service_query_events (GDATA_CALENDAR_SERVICE (service), data->parent.calendar, NULL, NULL, NULL, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_CALENDAR_FEED (feed));
+ g_clear_error (&error);
+
+ /* TODO: check entries and feed properties */
+
+ g_object_unref (feed);
+
+ uhm_server_end_trace (mock_server);
+}
+
+GDATA_ASYNC_CLOSURE_FUNCTIONS (query_events, QueryEventsData);
+
+GDATA_ASYNC_TEST_FUNCTIONS (query_events, QueryEventsData,
+G_STMT_START {
+ gdata_calendar_service_query_events_async (GDATA_CALENDAR_SERVICE (service), data->parent.calendar, NULL, cancellable, NULL, NULL, NULL,
+ async_ready_callback, async_data);
+} G_STMT_END,
+G_STMT_START {
+ GDataFeed *feed;
+
+ feed = gdata_service_query_finish (GDATA_SERVICE (obj), async_result, &error);
+
+ if (error == NULL) {
+ g_assert (GDATA_IS_CALENDAR_FEED (feed));
+
+ g_object_unref (feed);
+ } else {
+ g_assert (feed == NULL);
+ }
+} G_STMT_END);
+
+static void
+test_query_events_async_progress_closure (QueryEventsData *query_data, gconstpointer service)
+{
+ GDataAsyncProgressClosure *data = g_slice_new0 (GDataAsyncProgressClosure);
+
+ gdata_test_mock_server_start_trace (mock_server, "query-events-async-progress-closure");
+
+ data->main_loop = g_main_loop_new (NULL, TRUE);
+
+ gdata_calendar_service_query_events_async (GDATA_CALENDAR_SERVICE (service), query_data->parent.calendar, NULL, NULL,
+ (GDataQueryProgressCallback) gdata_test_async_progress_callback,
+ data, (GDestroyNotify) gdata_test_async_progress_closure_free,
+ (GAsyncReadyCallback) gdata_test_async_progress_finish_callback, data);
+
+ g_main_loop_run (data->main_loop);
+ g_main_loop_unref (data->main_loop);
+
+ /* Check that both callbacks were called exactly once */
+ g_assert_cmpuint (data->progress_destroy_notify_count, ==, 1);
+ g_assert_cmpuint (data->async_ready_notify_count, ==, 1);
+
+ g_slice_free (GDataAsyncProgressClosure, data);
+
+ uhm_server_end_trace (mock_server);
+}
+
+typedef struct {
+ TempCalendarData parent;
+ GDataCalendarEvent *new_event;
+} InsertEventData;
+
+static void
+set_up_insert_event (InsertEventData *data, gconstpointer service)
+{
+ set_up_temp_calendar ((TempCalendarData*) data, service);
+ data->new_event = NULL;
+}
+
+static void
+tear_down_insert_event (InsertEventData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "teardown-insert-event");
+
+ /* Delete the new event */
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_calendar_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->new_event), NULL, NULL) == TRUE);
+ g_object_unref (data->new_event);
+
+ uhm_server_end_trace (mock_server);
+
+ /* Delete the calendar too */
+ tear_down_temp_calendar ((TempCalendarData*) data, service);
+}
+
+static void
+test_event_insert (InsertEventData *data, gconstpointer service)
+{
+ GDataCalendarEvent *event, *new_event;
+ GDataGDWhere *where;
+ GDataGDWho *who;
+ GDataGDWhen *when;
+ GTimeVal start_time, end_time;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "event-insert");
+
+ event = gdata_calendar_event_new (NULL);
+
+ gdata_entry_set_title (GDATA_ENTRY (event), "Tennis with Beth");
+ gdata_entry_set_content (GDATA_ENTRY (event), "Meet for a quick lesson.");
+ gdata_calendar_event_set_transparency (event, GDATA_GD_EVENT_TRANSPARENCY_OPAQUE);
+ gdata_calendar_event_set_status (event, GDATA_GD_EVENT_STATUS_CONFIRMED);
+ where = gdata_gd_where_new (NULL, "Rolling Lawn Courts", NULL);
+ gdata_calendar_event_add_place (event, where);
+ g_object_unref (where);
+ who = gdata_gd_who_new (GDATA_GD_WHO_EVENT_ORGANIZER, "John Smith‽", "john.smith@example.com");
+ gdata_calendar_event_add_person (event, who);
+ g_object_unref (who);
+ g_time_val_from_iso8601 ("2009-04-17T15:00:00.000Z", &start_time);
+ g_time_val_from_iso8601 ("2009-04-17T17:00:00.000Z", &end_time);
+ when = gdata_gd_when_new (start_time.tv_sec, end_time.tv_sec, FALSE);
+ gdata_calendar_event_add_time (event, when);
+ g_object_unref (when);
+
+ /* Insert the event */
+ new_event = data->new_event = gdata_calendar_service_insert_calendar_event (GDATA_CALENDAR_SERVICE (service),
+ data->parent.calendar, event, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_CALENDAR_EVENT (new_event));
+ g_clear_error (&error);
+
+ /* TODO: check entries and feed properties */
+
+ g_object_unref (event);
+
+ uhm_server_end_trace (mock_server);
+}
+
+GDATA_ASYNC_CLOSURE_FUNCTIONS (insert_event, InsertEventData);
+
+GDATA_ASYNC_TEST_FUNCTIONS (event_insert, InsertEventData,
+G_STMT_START {
+ GDataCalendarEvent *event;
+ GDataGDWhere *where;
+ GDataGDWho *who;
+ GDataGDWhen *when;
+ GTimeVal start_time;
+ GTimeVal end_time;
+
+ event = gdata_calendar_event_new (NULL);
+
+ gdata_entry_set_title (GDATA_ENTRY (event), "Tennis with Beth");
+ gdata_entry_set_content (GDATA_ENTRY (event), "Meet for a quick lesson.");
+ gdata_calendar_event_set_transparency (event, GDATA_GD_EVENT_TRANSPARENCY_OPAQUE);
+ gdata_calendar_event_set_status (event, GDATA_GD_EVENT_STATUS_CONFIRMED);
+ where = gdata_gd_where_new (NULL, "Rolling Lawn Courts", NULL);
+ gdata_calendar_event_add_place (event, where);
+ g_object_unref (where);
+ who = gdata_gd_who_new (GDATA_GD_WHO_EVENT_ORGANIZER, "John Smith‽", "john.smith@example.com");
+ gdata_calendar_event_add_person (event, who);
+ g_object_unref (who);
+ g_time_val_from_iso8601 ("2009-04-17T15:00:00.000Z", &start_time);
+ g_time_val_from_iso8601 ("2009-04-17T17:00:00.000Z", &end_time);
+ when = gdata_gd_when_new (start_time.tv_sec, end_time.tv_sec, FALSE);
+ gdata_calendar_event_add_time (event, when);
+ g_object_unref (when);
+
+ /* Insert the event */
+ gdata_calendar_service_insert_calendar_event_async (GDATA_CALENDAR_SERVICE (service),
+ data->parent.calendar, event, cancellable,
+ async_ready_callback, async_data);
+
+ g_object_unref (event);
+} G_STMT_END,
+G_STMT_START {
+ GDataEntry *event;
+ event = gdata_service_insert_entry_finish (GDATA_SERVICE (obj), async_result, &error);
+ if (error == NULL) {
+ g_assert (GDATA_IS_CALENDAR_EVENT (event));
+ data->new_event = GDATA_CALENDAR_EVENT (event);
+ g_assert_cmpstr (gdata_entry_get_title (event), ==, "Tennis with Beth");
+ } else {
+ g_assert (event == NULL);
+ }
+} G_STMT_END);
+
+static void
+test_event_json (void)
+{
+ GDataCalendarEvent *event;
+ GDataGDWhere *where;
+ GDataGDWho *who;
+ GDataGDWhen *when;
+ GTimeVal start_time, end_time;
+
+ event = gdata_calendar_event_new (NULL);
+
+ gdata_entry_set_title (GDATA_ENTRY (event), "Tennis with Beth");
+ gdata_entry_set_content (GDATA_ENTRY (event), "Meet for a quick lesson.");
+ gdata_calendar_event_set_transparency (event, GDATA_GD_EVENT_TRANSPARENCY_OPAQUE);
+ gdata_calendar_event_set_status (event, GDATA_GD_EVENT_STATUS_CONFIRMED);
+ where = gdata_gd_where_new (NULL, "Rolling Lawn Courts", NULL);
+ gdata_calendar_event_add_place (event, where);
+ g_object_unref (where);
+ who = gdata_gd_who_new (GDATA_GD_WHO_EVENT_ORGANIZER, "John Smith‽", "john.smith@example.com");
+ gdata_calendar_event_add_person (event, who);
+ g_object_unref (who);
+ g_time_val_from_iso8601 ("2009-04-17T15:00:00.000Z", &start_time);
+ g_time_val_from_iso8601 ("2009-04-17T17:00:00.000Z", &end_time);
+ when = gdata_gd_when_new (start_time.tv_sec, end_time.tv_sec, FALSE);
+ gdata_calendar_event_add_time (event, when);
+ g_object_unref (when);
+
+ /* Check the JSON */
+ gdata_test_assert_json (event, "{"
+ "'summary': 'Tennis with Beth',"
+ "'description': 'Meet for a quick lesson.',"
+ "'kind': 'calendar#event',"
+ "'status': 'confirmed',"
+ "'transparency': 'opaque',"
+ "'guestsCanModify': false,"
+ "'guestsCanInviteOthers': false,"
+ "'guestsCanSeeOtherGuests': false,"
+ "'anyoneCanAddSelf': false,"
+ "'start': {"
+ "'dateTime': '2009-04-17T15:00:00Z',"
+ "'timeZone': 'UTC'"
+ "},"
+ "'end': {"
+ "'dateTime': '2009-04-17T17:00:00Z',"
+ "'timeZone': 'UTC'"
+ "},"
+ "'attendees': ["
+ "{"
+ "'email': 'john.smith@example.com',"
+ "'displayName': 'John Smith‽',"
+ "'organizer': true"
+ "}"
+ "],"
+ "'organizer': {"
+ "'email': 'john.smith@example.com',"
+ "'displayName': 'John Smith‽'"
+ "},"
+ "'location': 'Rolling Lawn Courts'"
+ "}");
+}
+
+static void
+test_event_json_attendees (void)
+{
+ GDataCalendarEvent *event;
+ GList/*<unowned GDataGDWho>*/ *l;
+ guint n_people;
+ const struct {
+ const gchar *relation_type;
+ const gchar *value_string;
+ const gchar *email_address;
+ } expected[] = {
+ { GDATA_GD_WHO_EVENT_ATTENDEE, "Joe Hibbs", "person1@gmail.com" },
+ { GDATA_GD_WHO_EVENT_ATTENDEE, "Me McMeeson", "me@gmail.com" },
+ { GDATA_GD_WHO_EVENT_ATTENDEE, NULL, "person2@gmail.com" },
+ { GDATA_GD_WHO_EVENT_ATTENDEE, "Example Person 3", "person3@gmail.com" },
+ { GDATA_GD_WHO_EVENT_ATTENDEE, NULL, "person4@gmail.com" },
+ { GDATA_GD_WHO_EVENT_ORGANIZER, "Ruth Pettut", "blah@example.com" },
+ };
+ GError *error = NULL;
+
+ event = GDATA_CALENDAR_EVENT (gdata_parsable_new_from_json (GDATA_TYPE_CALENDAR_EVENT, "{"
+ "'kind': 'calendar#event',"
+ "'id': 'some-id',"
+ "'created': '2017-02-04T17:53:47.000Z',"
+ "'summary': 'Duff this',"
+ "'organizer': {"
+ "'email': 'blah@example.com',"
+ "'displayName': 'Ruth Pettut'"
+ "},"
+ "'attendees': ["
+ "{"
+ "'email': 'person1@gmail.com',"
+ "'displayName': 'Joe Hibbs',"
+ "'responseStatus': 'accepted'"
+ "},"
+ "{"
+ "'email': 'me@gmail.com',"
+ "'displayName': 'Me McMeeson',"
+ "'self': true,"
+ "'responseStatus': 'needsAction'"
+ "},"
+ "{"
+ "'email': 'person2@gmail.com',"
+ "'responseStatus': 'needsAction'"
+ "},"
+ "{"
+ "'email': 'person3@gmail.com',"
+ "'displayName': 'Example Person 3',"
+ "'responseStatus': 'tentative',"
+ "'comment': 'Some poor excuse about not coming.'"
+ "},"
+ "{"
+ "'email': 'person4@gmail.com',"
+ "'responseStatus': 'accepted'"
+ "},"
+ "{"
+ "'email': 'blah@example.com',"
+ "'displayName': 'Ruth Pettut',"
+ "'organizer': true,"
+ "'responseStatus': 'accepted'"
+ "}"
+ "]"
+ "}", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_ENTRY (event));
+ g_clear_error (&error);
+
+ /* Check attendee details. */
+ for (n_people = 0, l = gdata_calendar_event_get_people (event);
+ l != NULL;
+ n_people += 1, l = l->next) {
+ GDataGDWho *who = GDATA_GD_WHO (l->data);
+ gsize i;
+
+ g_test_message ("Examining attendee: %s",
+ gdata_gd_who_get_email_address (who));
+
+ for (i = 0; i < G_N_ELEMENTS (expected); i++) {
+ if (g_strcmp0 (gdata_gd_who_get_email_address (who),
+ expected[i].email_address) == 0) {
+ g_assert_cmpstr (gdata_gd_who_get_relation_type (who), ==, expected[i].relation_type);
+ g_assert_cmpstr (gdata_gd_who_get_value_string (who), ==, expected[i].value_string);
+ break;
+ }
+ }
+
+ g_assert_cmpuint (i, <, G_N_ELEMENTS (expected));
+ }
+
+ g_assert_cmpuint (n_people, ==, G_N_ELEMENTS (expected));
+
+ g_object_unref (event);
+}
+
+static void
+test_event_json_dates (void)
+{
+ guint i;
+
+ const struct {
+ const gchar *json;
+ gboolean is_date;
+ gint64 start_time;
+ gint64 end_time;
+ const gchar *output_json; /* NULL if equal to @json */
+ } test_vectors[] = {
+ /* Plain date, single day. */
+ { "'start': {"
+ "'date': '2009-04-17',"
+ "'timeZone': 'UTC'"
+ "},"
+ "'end': {"
+ "'date': '2009-04-18',"
+ "'timeZone': 'UTC'"
+ "}", TRUE, 1239926400, 1239926400 + 86400, NULL },
+ /* Full date and time. */
+ { "'start': {"
+ "'dateTime': '2009-04-17T15:00:00Z',"
+ "'timeZone': 'UTC'"
+ "},"
+ "'end': {"
+ "'dateTime': '2009-04-17T16:00:00Z',"
+ "'timeZone': 'UTC'"
+ "}", FALSE, 1239926400 + 54000, 1239926400 + 54000 + 3600, NULL },
+ /* Start and end time. */
+ { "'start': {"
+ "'date': '2009-04-27',"
+ "'timeZone': 'UTC'"
+ "},"
+ "'end': {"
+ "'date': '20090506',"
+ "'timeZone': 'UTC'"
+ "}", TRUE, 1239926400 + 864000, 1241568000, "'start': {"
+ "'date': '2009-04-27',"
+ "'timeZone': 'UTC'"
+ "},"
+ "'end': {"
+ "'date': '2009-05-06',"
+ "'timeZone': 'UTC'"
+ "}" },
+ };
+
+ for (i = 0; i < G_N_ELEMENTS (test_vectors); i++) {
+ gchar *json = NULL, *output_json = NULL; /* owned */
+ GDataCalendarEvent *event;
+ GList *j;
+ GDataGDWhen *when;
+ gint64 _time;
+ GError *error = NULL;
+
+ json = g_strdup_printf ("{"
+ "'summary': 'Tennis with Beth',"
+ "'description': 'Meet for a quick lesson.',"
+ "'kind': 'calendar#event',"
+ "%s"
+ "}", test_vectors[i].json);
+ output_json = g_strdup_printf ("{"
+ "'summary': 'Tennis with Beth',"
+ "'description': 'Meet for a quick lesson.',"
+ "'kind': 'calendar#event',"
+ "'guestsCanModify': false,"
+ "'guestsCanInviteOthers': false,"
+ "'guestsCanSeeOtherGuests': false,"
+ "'anyoneCanAddSelf': false,"
+ "'attendees': [],"
+ "%s"
+ "}", (test_vectors[i].output_json != NULL) ? test_vectors[i].output_json : test_vectors[i].json);
+
+ event = GDATA_CALENDAR_EVENT (gdata_parsable_new_from_json (GDATA_TYPE_CALENDAR_EVENT, json, -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_ENTRY (event));
+ g_clear_error (&error);
+
+ /* Check the times */
+ j = gdata_calendar_event_get_times (event);
+ g_assert (j != NULL);
+
+ when = GDATA_GD_WHEN (j->data);
+ g_assert (gdata_gd_when_is_date (when) == test_vectors[i].is_date);
+ _time = gdata_gd_when_get_start_time (when);
+ g_assert_cmpint (_time, ==, test_vectors[i].start_time);
+ _time = gdata_gd_when_get_end_time (when);
+ g_assert_cmpint (_time, ==, test_vectors[i].end_time);
+ g_assert (gdata_gd_when_get_value_string (when) == NULL);
+ g_assert (gdata_gd_when_get_reminders (when) == NULL);
+
+ /* Should be no other times. */
+ g_assert (j->next == NULL);
+
+ /* Check the JSON */
+ gdata_test_assert_json (event, output_json);
+
+ g_object_unref (event);
+ g_free (output_json);
+ g_free (json);
+ }
+}
+
+static void
+test_event_json_organizer (void)
+{
+ GDataCalendarEvent *event;
+ GError *error = NULL;
+
+ event = GDATA_CALENDAR_EVENT (gdata_parsable_new_from_json (GDATA_TYPE_CALENDAR_EVENT, "{"
+ "'kind': 'calendar#event',"
+ "'id': 'some-id',"
+ "'created': '2013-12-22T18:00:00.000Z',"
+ "'summary': 'FOSDEM GNOME Beer Event',"
+ "'organizer': {"
+ "'id': 'another-id',"
+ "'displayName': 'Guillaume Desmottes'"
+ "},"
+ "'attendees': ["
+ "{"
+ "'id': 'another-id',"
+ "'displayName': 'Guillaume Desmottes',"
+ "'organizer': true,"
+ "'responseStatus': 'accepted'"
+ "}"
+ "]"
+ "}", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_ENTRY (event));
+ g_clear_error (&error);
+
+ g_object_unref (event);
+}
+
+static void
+test_event_json_recurrence (void)
+{
+ GDataCalendarEvent *event;
+ GError *error = NULL;
+ gchar *id, *uri;
+
+ event = GDATA_CALENDAR_EVENT (gdata_parsable_new_from_json (GDATA_TYPE_CALENDAR_EVENT, "{"
+ "'id': 'https://www.googleapis.com/calendar/v3/calendars/libgdata.test@googlemail.com/events/g5928e82rrch95b25f8ud0dlsg_20090429T153000Z',"
+ "'updated': '2009-04-27T17:54:10.000Z',"
+ "'summary': 'Test daily instance event',"
+ "'kind': 'calendar#event',"
+ "'creator': {"
+ "'displayName': 'GData Test',"
+ "'email': 'libgdata.test@googlemail.com'"
+ "},"
+ "'recurringEventId': 'g5928e82rrch95b25f8ud0dlsg',"
+ "'originalStartTime': {"
+ "'dateTime': '2009-04-29T16:30:00.000+01:00',"
+ "'timeZone': 'UTC'"
+ "},"
+ "'guestsCanModify': false,"
+ "'guestsCanInviteOthers': false,"
+ "'guestsCanSeeOtherGuests': false,"
+ "'anyoneCanAddSelf': false,"
+ "'status': 'confirmed',"
+ "'visibility': 'private',"
+ "'transparency': 'opaque',"
+ "'iCalUID': 'g5928e82rrch95b25f8ud0dlsg@google.com',"
+ "'sequence': '0',"
+ "'start': {"
+ "'dateTime': '2009-04-29T17:30:00.000+01:00',"
+ "'timeZone': 'UTC'"
+ "},"
+ "'end': {"
+ "'dateTime': '2009-04-29T17:30:00.000+01:00',"
+ "'timeZone': 'UTC'"
+ "},"
+ "'reminders': {"
+ "'overrides': [{"
+ "'method': 'email',"
+ "'minutes': 10"
+ "}, {"
+ "'method': 'popup',"
+ "'minutes': 10"
+ "}]"
+ "},"
+ "'attendees': ["
+ "{"
+ "'email': 'libgdata.test@googlemail.com',"
+ "'displayName': 'GData Test',"
+ "'organizer': true,"
+ "'responseStatus': 'needsAction'"
+ "}"
+ "],"
+ "'organizer': {"
+ "'email': 'libgdata.test@googlemail.com',"
+ "'displayName': 'GData Test'"
+ "}"
+ "}", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_ENTRY (event));
+ g_clear_error (&error);
+
+ /* Check the original event */
+ g_assert (gdata_calendar_event_is_exception (event) == TRUE);
+
+ gdata_calendar_event_get_original_event_details (event, &id, &uri);
+ g_assert_cmpstr (id, ==, "g5928e82rrch95b25f8ud0dlsg");
+ g_assert_cmpstr (uri, ==, "https://www.googleapis.com/calendar/v3/events/g5928e82rrch95b25f8ud0dlsg");
+
+ g_free (id);
+ g_free (uri);
+ g_object_unref (event);
+}
+
+static void
+test_calendar_escaping (void)
+{
+ GDataCalendarCalendar *calendar;
+
+ calendar = gdata_calendar_calendar_new (NULL);
+ gdata_calendar_calendar_set_timezone (calendar, "<timezone>");
+
+ /* Check the outputted JSON is escaped properly */
+ gdata_test_assert_json (calendar, "{"
+ "'kind': 'calendar#calendar',"
+ "'timeZone': '<timezone>',"
+ "'hidden': false,"
+ "'backgroundColor': '#000000',"
+ "'selected': false"
+ "}");
+ g_object_unref (calendar);
+}
+
+static void
+test_event_escaping (void)
+{
+ GDataCalendarEvent *event;
+
+ event = gdata_calendar_event_new (NULL);
+ gdata_calendar_event_set_status (event, "\"status\"");
+ gdata_calendar_event_set_visibility (event, "\"visibility\"");
+ gdata_calendar_event_set_transparency (event, "\"transparency\"");
+ gdata_calendar_event_set_uid (event, "\"uid\"");
+ gdata_calendar_event_set_recurrence (event, "\"recurrence\"");
+
+ /* Check the outputted JSON is escaped properly */
+ gdata_test_assert_json (event, "{"
+ "'kind': 'calendar#event',"
+ "'status': '\"status\"',"
+ "'transparency': '\"transparency\"',"
+ "'visibility': '\"visibility\"',"
+ "'iCalUID': '\"uid\"',"
+ "'recurrence': [ '\"recurrence\"' ],"
+ "'guestsCanModify': false,"
+ "'guestsCanInviteOthers': false,"
+ "'guestsCanSeeOtherGuests': false,"
+ "'anyoneCanAddSelf': false,"
+ "'attendees': []"
+ "}");
+ g_object_unref (event);
+}
+
+/* Test the event parser with the minimal number of properties specified. */
+static void
+test_calendar_event_parser_minimal (void)
+{
+ GDataCalendarEvent *event = NULL; /* owned */
+ GDataEntry *entry; /* unowned */
+ GError *error = NULL;
+
+ event = GDATA_CALENDAR_EVENT (gdata_parsable_new_from_json (GDATA_TYPE_CALENDAR_EVENT,
+ "{"
+ "\"kind\": \"calendar#event\","
+ "\"etag\": \"\\\"2838230136828000\\\"\","
+ "\"id\": \"hsfgtc50u68vdai81t6634u7lg\","
+ "\"status\": \"confirmed\","
+ "\"htmlLink\": \"https://www.google.com/calendar/event?eid=aHNmZ3RjNTB1Njh2ZGFpODF0NjYzNHU3bGcgODk5MWkzNjM0YzRzN3Nwa3NrcjNjZjVuanNAZw\","
+ "\"created\": \"2014-12-20T22:37:48.000Z\","
+ "\"updated\": \"2014-12-20T22:37:48.414Z\","
+ "\"summary\": \"Test Event 1\","
+ "\"creator\": {"
+ "\"email\": \"libgdata.test@googlemail.com\","
+ "\"displayName\": \"GData Test\""
+ "},"
+ "\"organizer\": {"
+ "\"email\": \"8991i3634c4s7spkskr3cf5njs@group.calendar.google.com\","
+ "\"displayName\": \"Temp Test Calendar\","
+ "\"self\": true"
+ "},"
+ "\"start\": {"
+ "\"dateTime\": \"2014-12-20T22:15:27Z\","
+ "\"timeZone\": \"UTC\""
+ "},"
+ "\"end\": {"
+ "\"dateTime\": \"2014-12-20T22:15:28Z\","
+ "\"timeZone\": \"UTC\""
+ "},"
+ "\"iCalUID\": \"hsfgtc50u68vdai81t6634u7lg@google.com\","
+ "\"sequence\": 0,"
+ "\"guestsCanInviteOthers\": false,"
+ "\"guestsCanSeeOtherGuests\": false,"
+ "\"reminders\": {"
+ "\"useDefault\": true"
+ "}"
+ "}", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_CALENDAR_EVENT (event));
+ gdata_test_compare_kind (GDATA_ENTRY (event), "calendar#event", NULL);
+
+ entry = GDATA_ENTRY (event);
+
+ /* Check the event’s properties. */
+ g_assert_cmpstr (gdata_entry_get_id (entry), ==,
+ "hsfgtc50u68vdai81t6634u7lg");
+ g_assert_cmpstr (gdata_entry_get_etag (entry), ==,
+ "\"2838230136828000\"");
+ g_assert_cmpstr (gdata_entry_get_title (entry), ==,
+ "Test Event 1");
+ g_assert_cmpint (gdata_entry_get_updated (entry), ==, 1419115068);
+
+ /* TODO: check everything else */
+
+ g_object_unref (event);
+}
+
+static void
+test_access_rule_properties (void)
+{
+ GDataCalendarAccessRule *rule;
+ const gchar *scope_type, *scope_value;
+
+ rule = gdata_calendar_access_rule_new (NULL);
+
+ gdata_access_rule_set_role (GDATA_ACCESS_RULE (rule), GDATA_CALENDAR_ACCESS_ROLE_EDITOR);
+ g_assert_cmpstr (gdata_access_rule_get_role (GDATA_ACCESS_RULE (rule)), ==, GDATA_CALENDAR_ACCESS_ROLE_EDITOR);
+
+ gdata_access_rule_set_scope (GDATA_ACCESS_RULE (rule), GDATA_ACCESS_SCOPE_USER, "darcy@gmail.com");
+ gdata_access_rule_get_scope (GDATA_ACCESS_RULE (rule), &scope_type, &scope_value);
+ g_assert_cmpstr (scope_type, ==, GDATA_ACCESS_SCOPE_USER);
+ g_assert_cmpstr (scope_value, ==, "darcy@gmail.com");
+}
+
+static void
+test_access_rule_json (void)
+{
+ GDataCalendarAccessRule *rule;
+
+ rule = gdata_calendar_access_rule_new (NULL);
+
+ gdata_access_rule_set_role (GDATA_ACCESS_RULE (rule), GDATA_CALENDAR_ACCESS_ROLE_EDITOR);
+ gdata_access_rule_set_scope (GDATA_ACCESS_RULE (rule), GDATA_ACCESS_SCOPE_USER, "darcy@gmail.com");
+
+ /* Check the JSON */
+ gdata_test_assert_json (rule, "{"
+ "'kind': 'calendar#aclRule',"
+ "'role': 'writer',"
+ "'scope': {"
+ "'type': 'user',"
+ "'value': 'darcy@gmail.com'"
+ "}"
+ "}");
+}
+
+static void
+test_query_uri (void)
+{
+ gint64 _time;
+ GTimeVal time_val;
+ gchar *query_uri;
+ GDataCalendarQuery *query = gdata_calendar_query_new ("q");
+
+ /* Set to false or it will override our startMin below. */
+ gdata_calendar_query_set_future_events (query, FALSE);
+ g_assert (gdata_calendar_query_get_future_events (query) == FALSE);
+
+ gdata_calendar_query_set_order_by (query, "starttime");
+ g_assert_cmpstr (gdata_calendar_query_get_order_by (query), ==, "starttime");
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ g_time_val_from_iso8601 ("2009-04-17T15:00:00.000Z", &time_val);
+ gdata_calendar_query_set_recurrence_expansion_start (query, time_val.tv_sec);
+ _time = gdata_calendar_query_get_recurrence_expansion_start (query);
+ g_assert_cmpint (_time, ==, time_val.tv_sec);
+
+ g_time_val_from_iso8601 ("2010-04-17T15:00:00.000Z", &time_val);
+ gdata_calendar_query_set_recurrence_expansion_end (query, time_val.tv_sec);
+ _time = gdata_calendar_query_get_recurrence_expansion_end (query);
+ g_assert_cmpint (_time, ==, time_val.tv_sec);
+G_GNUC_END_IGNORE_DEPRECATIONS
+
+ gdata_calendar_query_set_single_events (query, TRUE);
+ g_assert (gdata_calendar_query_get_single_events (query) == TRUE);
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ gdata_calendar_query_set_sort_order (query, "descending");
+ g_assert_cmpstr (gdata_calendar_query_get_sort_order (query), ==, "descending");
+G_GNUC_END_IGNORE_DEPRECATIONS
+
+ g_time_val_from_iso8601 ("2009-04-17T15:00:00.000Z", &time_val);
+ gdata_calendar_query_set_start_min (query, time_val.tv_sec);
+ _time = gdata_calendar_query_get_start_min (query);
+ g_assert_cmpint (_time, ==, time_val.tv_sec);
+
+ g_time_val_from_iso8601 ("2010-04-17T15:00:00.000Z", &time_val);
+ gdata_calendar_query_set_start_max (query, time_val.tv_sec);
+ _time = gdata_calendar_query_get_start_max (query);
+ g_assert_cmpint (_time, ==, time_val.tv_sec);
+
+ gdata_calendar_query_set_timezone (query, "America/Los Angeles");
+ g_assert_cmpstr (gdata_calendar_query_get_timezone (query), ==, "America/Los_Angeles");
+
+ gdata_calendar_query_set_max_attendees (query, 15);
+ g_assert_cmpuint (gdata_calendar_query_get_max_attendees (query), ==, 15);
+
+ gdata_calendar_query_set_show_deleted (query, TRUE);
+ g_assert (gdata_calendar_query_show_deleted (query) == TRUE);
+
+ /* Check the built query URI with a normal feed URI */
+ query_uri = gdata_query_get_query_uri (GDATA_QUERY (query), "http://example.com");
+ g_assert_cmpstr (query_uri, ==, "http://example.com?q=q&orderBy=startTime&singleEvents=true"
+ "&timeMin=2009-04-17T15:00:00Z&timeMax=2010-04-17T15:00:00Z&timeZone=America%2FLos_Angeles&maxAttendees=15"
+ "&showDeleted=true");
+ g_free (query_uri);
+
+ /* …with a feed URI with a trailing slash */
+ query_uri = gdata_query_get_query_uri (GDATA_QUERY (query), "http://example.com/");
+ g_assert_cmpstr (query_uri, ==, "http://example.com/?q=q&orderBy=startTime&singleEvents=true"
+ "&timeMin=2009-04-17T15:00:00Z&timeMax=2010-04-17T15:00:00Z&timeZone=America%2FLos_Angeles&maxAttendees=15"
+ "&showDeleted=true");
+ g_free (query_uri);
+
+ /* …with a feed URI with pre-existing arguments */
+ query_uri = gdata_query_get_query_uri (GDATA_QUERY (query), "http://example.com/bar/?test=test&this=that");
+ g_assert_cmpstr (query_uri, ==, "http://example.com/bar/?test=test&this=that&q=q&orderBy=startTime"
+ "&singleEvents=true&timeMin=2009-04-17T15:00:00Z&timeMax=2010-04-17T15:00:00Z"
+ "&timeZone=America%2FLos_Angeles&maxAttendees=15&showDeleted=true");
+ g_free (query_uri);
+
+ g_object_unref (query);
+}
+
+static void
+test_query_etag (void)
+{
+ GDataCalendarQuery *query = gdata_calendar_query_new (NULL);
+
+ /* Test that setting any property will unset the ETag */
+ g_test_bug ("613529");
+
+#define CHECK_ETAG(C) \
+ gdata_query_set_etag (GDATA_QUERY (query), "foobar"); \
+ (C); \
+ g_assert (gdata_query_get_etag (GDATA_QUERY (query)) == NULL);
+
+ CHECK_ETAG (gdata_calendar_query_set_future_events (query, FALSE))
+ CHECK_ETAG (gdata_calendar_query_set_order_by (query, "shizzle"))
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ CHECK_ETAG (gdata_calendar_query_set_recurrence_expansion_start (query, -1))
+ CHECK_ETAG (gdata_calendar_query_set_recurrence_expansion_end (query, -1))
+G_GNUC_END_IGNORE_DEPRECATIONS
+ CHECK_ETAG (gdata_calendar_query_set_single_events (query, FALSE))
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ CHECK_ETAG (gdata_calendar_query_set_sort_order (query, "shizzle"))
+G_GNUC_END_IGNORE_DEPRECATIONS
+ CHECK_ETAG (gdata_calendar_query_set_start_min (query, -1))
+ CHECK_ETAG (gdata_calendar_query_set_start_max (query, -1))
+ CHECK_ETAG (gdata_calendar_query_set_timezone (query, "about now"))
+ CHECK_ETAG (gdata_calendar_query_set_max_attendees (query, 10))
+ CHECK_ETAG (gdata_calendar_query_set_show_deleted (query, TRUE))
+
+#undef CHECK_ETAG
+
+ g_object_unref (query);
+}
+
+typedef struct {
+ TempCalendarData parent;
+ GDataCalendarAccessRule *rule;
+} TempCalendarAclsData;
+
+static void
+calendar_access_rule_set_self_link (GDataCalendarCalendar *parent_calendar,
+ GDataCalendarAccessRule *rule)
+{
+ GDataLink *_link = NULL; /* owned */
+ const gchar *calendar_id, *id;
+ gchar *uri = NULL; /* owned */
+
+ /* FIXME: Horrendous hack to set the self link, which is needed for
+ * gdata_service_delete_entry(). Unfortunately, it needs the
+ * ACL ID _and_ the calendar ID.
+ *
+ * Do _not_ copy this code. It needs to be fixed architecturally in
+ * libgdata. */
+ calendar_id = gdata_entry_get_id (GDATA_ENTRY (parent_calendar));
+ id = gdata_entry_get_id (GDATA_ENTRY (rule));
+ uri = g_strconcat ("https://www.googleapis.com"
+ "/calendar/v3/calendars/",
+ calendar_id, "/acl/", id, NULL);
+ _link = gdata_link_new (uri, GDATA_LINK_SELF);
+ gdata_entry_add_link (GDATA_ENTRY (rule), _link);
+ g_object_unref (_link);
+ g_free (uri);
+}
+
+static void
+set_up_temp_calendar_acls (TempCalendarAclsData *data, gconstpointer service)
+{
+ GDataCalendarAccessRule *rule;
+ GDataLink *_link;
+ GError *error = NULL;
+
+ /* Set up a calendar */
+ set_up_temp_calendar ((TempCalendarData*) data, service);
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-temp-calendar-acls");
+
+ /* Add an access rule to the calendar */
+ rule = gdata_calendar_access_rule_new (NULL);
+
+ gdata_access_rule_set_role (GDATA_ACCESS_RULE (rule), GDATA_CALENDAR_ACCESS_ROLE_EDITOR);
+ gdata_access_rule_set_scope (GDATA_ACCESS_RULE (rule), GDATA_ACCESS_SCOPE_USER, "darcy@gmail.com");
+
+ /* Insert the rule */
+ _link = gdata_entry_look_up_link (GDATA_ENTRY (data->parent.calendar), GDATA_LINK_ACCESS_CONTROL_LIST);
+ g_assert (_link != NULL);
+
+ data->rule = GDATA_CALENDAR_ACCESS_RULE (gdata_service_insert_entry (GDATA_SERVICE (service),
+ gdata_calendar_service_get_primary_authorization_domain (),
+ gdata_link_get_uri (_link), GDATA_ENTRY (rule), NULL,
+ &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_CALENDAR_ACCESS_RULE (data->rule));
+
+ calendar_access_rule_set_self_link (data->parent.calendar, data->rule);
+
+ g_object_unref (rule);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+set_up_temp_calendar_acls_no_insertion (TempCalendarAclsData *data, gconstpointer service)
+{
+ set_up_temp_calendar ((TempCalendarData*) data, service);
+ data->rule = NULL;
+}
+
+static void
+tear_down_temp_calendar_acls (TempCalendarAclsData *data, gconstpointer service)
+{
+ /* Delete the access rule if it still exists */
+ if (data->rule != NULL) {
+ gdata_test_mock_server_start_trace (mock_server, "teardown-temp-calendar-acls");
+
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_calendar_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->rule), NULL, NULL) == TRUE);
+ g_object_unref (data->rule);
+
+ uhm_server_end_trace (mock_server);
+ }
+
+ /* Delete the calendar */
+ tear_down_temp_calendar ((TempCalendarData*) data, service);
+}
+
+static void
+test_access_rule_get (TempCalendarAclsData *data, gconstpointer service)
+{
+ GDataFeed *feed;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "access-rule-get");
+
+ /* Get the rules */
+ feed = gdata_access_handler_get_rules (GDATA_ACCESS_HANDLER (data->parent.calendar), GDATA_SERVICE (service), NULL, NULL, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_FEED (feed));
+ g_clear_error (&error);
+
+ /* TODO: check rules and feed properties */
+
+ g_object_unref (feed);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_access_rule_insert (TempCalendarAclsData *data, gconstpointer service)
+{
+ GDataCalendarAccessRule *rule, *new_rule;
+ const gchar *scope_type, *scope_value;
+ GDataCategory *category;
+ GDataLink *_link;
+ GList *categories;
+ gint64 edited;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "access-rule-insert");
+
+ rule = gdata_calendar_access_rule_new (NULL);
+
+ gdata_access_rule_set_role (GDATA_ACCESS_RULE (rule), GDATA_CALENDAR_ACCESS_ROLE_EDITOR);
+ gdata_access_rule_set_scope (GDATA_ACCESS_RULE (rule), GDATA_ACCESS_SCOPE_USER, "darcy@gmail.com");
+
+ /* Insert the rule */
+ _link = gdata_entry_look_up_link (GDATA_ENTRY (data->parent.calendar), GDATA_LINK_ACCESS_CONTROL_LIST);
+ g_assert (_link != NULL);
+
+ new_rule = data->rule = GDATA_CALENDAR_ACCESS_RULE (gdata_service_insert_entry (GDATA_SERVICE (service),
+ gdata_calendar_service_get_primary_authorization_domain (),
+ gdata_link_get_uri (_link), GDATA_ENTRY (rule), NULL, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_ACCESS_RULE (new_rule));
+ g_clear_error (&error);
+
+ calendar_access_rule_set_self_link (data->parent.calendar, data->rule);
+
+ /* Check the properties of the returned rule */
+ g_assert_cmpstr (gdata_access_rule_get_role (GDATA_ACCESS_RULE (new_rule)), ==, GDATA_CALENDAR_ACCESS_ROLE_EDITOR);
+ gdata_access_rule_get_scope (GDATA_ACCESS_RULE (new_rule), &scope_type, &scope_value);
+ g_assert_cmpstr (scope_type, ==, GDATA_ACCESS_SCOPE_USER);
+ g_assert_cmpstr (scope_value, ==, "darcy@gmail.com");
+ edited = gdata_access_rule_get_edited (GDATA_ACCESS_RULE (new_rule));
+ g_assert_cmpuint (edited, >, 0);
+
+ /* Check it only has the one category and that it's correct */
+ categories = gdata_entry_get_categories (GDATA_ENTRY (new_rule));
+ g_assert (categories != NULL);
+ g_assert_cmpuint (g_list_length (categories), ==, 1);
+ category = categories->data;
+ g_assert_cmpstr (gdata_category_get_term (category), ==, "calendar#aclRule");
+ g_assert_cmpstr (gdata_category_get_scheme (category), ==, "http://schemas.google.com/g/2005#kind");
+ g_assert (gdata_category_get_label (category) == NULL);
+
+ /* TODO: Check more properties? */
+
+ g_object_unref (rule);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_access_rule_update (TempCalendarAclsData *data, gconstpointer service)
+{
+ GDataCalendarAccessRule *new_rule;
+ const gchar *scope_type, *scope_value;
+ gint64 edited;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "access-rule-update");
+
+ /* Update the rule */
+ gdata_access_rule_set_role (GDATA_ACCESS_RULE (data->rule), GDATA_CALENDAR_ACCESS_ROLE_READ);
+
+ /* Send the update to the server */
+ new_rule = GDATA_CALENDAR_ACCESS_RULE (gdata_service_update_entry (GDATA_SERVICE (service), gdata_calendar_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->rule), NULL, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_ACCESS_RULE (new_rule));
+ g_clear_error (&error);
+
+ calendar_access_rule_set_self_link (data->parent.calendar, new_rule);
+
+ /* Check the properties of the returned rule */
+ g_assert_cmpstr (gdata_access_rule_get_role (GDATA_ACCESS_RULE (new_rule)), ==, GDATA_CALENDAR_ACCESS_ROLE_READ);
+ gdata_access_rule_get_scope (GDATA_ACCESS_RULE (new_rule), &scope_type, &scope_value);
+ g_assert_cmpstr (scope_type, ==, GDATA_ACCESS_SCOPE_USER);
+ g_assert_cmpstr (scope_value, ==, "darcy@gmail.com");
+ edited = gdata_access_rule_get_edited (GDATA_ACCESS_RULE (new_rule));
+ g_assert_cmpuint (edited, >, 0);
+
+ g_object_unref (new_rule);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_access_rule_delete (TempCalendarAclsData *data, gconstpointer service)
+{
+ gboolean success;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "access-rule-delete");
+
+ /* Delete the rule */
+ success = gdata_service_delete_entry (GDATA_SERVICE (service), gdata_calendar_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->rule), NULL, &error);
+ g_assert_no_error (error);
+ g_assert (success == TRUE);
+ g_clear_error (&error);
+
+ g_object_unref (data->rule);
+ data->rule = NULL;
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+mock_server_notify_resolver_cb (GObject *object, GParamSpec *pspec, gpointer user_data)
+{
+ UhmServer *server;
+ UhmResolver *resolver;
+
+ server = UHM_SERVER (object);
+
+ /* Set up the expected domain names here. This should technically be split up between
+ * the different unit test suites, but that's too much effort. */
+ resolver = uhm_server_get_resolver (server);
+
+ if (resolver != NULL) {
+ const gchar *ip_address = uhm_server_get_address (server);
+
+ uhm_resolver_add_A (resolver, "www.google.com", ip_address);
+ uhm_resolver_add_A (resolver, "www.googleapis.com", ip_address);
+ uhm_resolver_add_A (resolver,
+ "accounts.google.com", ip_address);
+ }
+}
+
+/* Set up a global GDataAuthorizer to be used for all the tests. Unfortunately,
+ * the Google Calendar API is limited to OAuth1 and OAuth2 authorisation, so
+ * this requires user interaction when online.
+ *
+ * If not online, use a dummy authoriser. */
+static GDataAuthorizer *
+create_global_authorizer (void)
+{
+ GDataOAuth2Authorizer *authorizer = NULL; /* owned */
+ gchar *authentication_uri, *authorisation_code;
+ GError *error = NULL;
+
+ /* If not online, just return a dummy authoriser. */
+ if (!uhm_server_get_enable_online (mock_server)) {
+ return GDATA_AUTHORIZER (gdata_dummy_authorizer_new (GDATA_TYPE_CALENDAR_SERVICE));
+ }
+
+ /* Otherwise, go through the interactive OAuth dance. */
+ gdata_test_mock_server_start_trace (mock_server, "global-authentication");
+ authorizer = gdata_oauth2_authorizer_new (CLIENT_ID, CLIENT_SECRET,
+ REDIRECT_URI,
+ GDATA_TYPE_CALENDAR_SERVICE);
+
+ /* Get an authentication URI */
+ authentication_uri = gdata_oauth2_authorizer_build_authentication_uri (authorizer, NULL, FALSE);
+ g_assert (authentication_uri != NULL);
+
+ /* Get the authorisation code off the user. */
+ authorisation_code = gdata_test_query_user_for_verifier (authentication_uri);
+
+ g_free (authentication_uri);
+
+ if (authorisation_code == NULL) {
+ /* Skip tests. */
+ g_object_unref (authorizer);
+ authorizer = NULL;
+ goto skip_test;
+ }
+
+ /* Authorise the token */
+ g_assert (gdata_oauth2_authorizer_request_authorization (authorizer, authorisation_code, NULL, &error));
+ g_assert_no_error (error);
+
+skip_test:
+ g_free (authorisation_code);
+
+ uhm_server_end_trace (mock_server);
+
+ return GDATA_AUTHORIZER (authorizer);
+}
+
+int
+main (int argc, char *argv[])
+{
+ gint retval;
+ GDataAuthorizer *authorizer = NULL;
+ GDataService *service = NULL;
+ GFile *trace_directory;
+ gchar *path = NULL;
+
+ gdata_test_init (argc, argv);
+
+ mock_server = gdata_test_get_mock_server ();
+ g_signal_connect (G_OBJECT (mock_server), "notify::resolver", (GCallback) mock_server_notify_resolver_cb, NULL);
+ path = g_test_build_filename (G_TEST_DIST, "traces/calendar", NULL);
+ trace_directory = g_file_new_for_path (path);
+ g_free (path);
+ uhm_server_set_trace_directory (mock_server, trace_directory);
+ g_object_unref (trace_directory);
+
+ authorizer = create_global_authorizer ();
+
+ service = GDATA_SERVICE (gdata_calendar_service_new (authorizer));
+
+ g_test_add_func ("/calendar/authentication", test_authentication);
+
+ g_test_add ("/calendar/query/all_calendars", QueryCalendarsData, service, set_up_query_calendars, test_query_all_calendars,
+ tear_down_query_calendars);
+ g_test_add ("/calendar/query/all_calendars/async", GDataAsyncTestData, service, set_up_query_calendars_async,
+ test_query_all_calendars_async, tear_down_query_calendars_async);
+ g_test_add ("/calendar/query/all_calendars/async/progress_closure", QueryCalendarsData, service, set_up_query_calendars,
+ test_query_all_calendars_async_progress_closure, tear_down_query_calendars);
+ g_test_add ("/calendar/query/all_calendars/async/cancellation", GDataAsyncTestData, service, set_up_query_calendars_async,
+ test_query_all_calendars_async_cancellation, tear_down_query_calendars_async);
+
+ g_test_add ("/calendar/query/own_calendars", QueryCalendarsData, service, set_up_query_calendars, test_query_own_calendars,
+ tear_down_query_calendars);
+ g_test_add ("/calendar/query/own_calendars/async", GDataAsyncTestData, service, set_up_query_calendars_async,
+ test_query_own_calendars_async, tear_down_query_calendars_async);
+ g_test_add ("/calendar/query/own_calendars/async/progress_closure", QueryCalendarsData, service, set_up_query_calendars,
+ test_query_own_calendars_async_progress_closure, tear_down_query_calendars);
+ g_test_add ("/calendar/query/own_calendars/async/cancellation", GDataAsyncTestData, service, set_up_query_calendars_async,
+ test_query_own_calendars_async_cancellation, tear_down_query_calendars_async);
+
+ g_test_add ("/calendar/query/events", QueryEventsData, service, set_up_query_events, test_query_events, tear_down_query_events);
+ g_test_add ("/calendar/query/events/async", GDataAsyncTestData, service, set_up_query_events_async, test_query_events_async,
+ tear_down_query_events_async);
+ g_test_add ("/calendar/query/events/async/progress_closure", QueryEventsData, service, set_up_query_events,
+ test_query_events_async_progress_closure, tear_down_query_events);
+ g_test_add ("/calendar/query/events/async/cancellation", GDataAsyncTestData, service, set_up_query_events_async,
+ test_query_events_async_cancellation, tear_down_query_events_async);
+
+ g_test_add ("/calendar/event/insert", InsertEventData, service, set_up_insert_event, test_event_insert, tear_down_insert_event);
+ g_test_add ("/calendar/event/insert/async", GDataAsyncTestData, service, set_up_insert_event_async, test_event_insert_async,
+ tear_down_insert_event_async);
+ g_test_add ("/calendar/event/insert/async/cancellation", GDataAsyncTestData, service, set_up_insert_event_async,
+ test_event_insert_async_cancellation, tear_down_insert_event_async);
+
+ g_test_add ("/calendar/access-rule/get", TempCalendarAclsData, service, set_up_temp_calendar_acls, test_access_rule_get,
+ tear_down_temp_calendar_acls);
+ g_test_add ("/calendar/access-rule/insert", TempCalendarAclsData, service, set_up_temp_calendar_acls_no_insertion,
+ test_access_rule_insert, tear_down_temp_calendar_acls);
+ g_test_add ("/calendar/access-rule/update", TempCalendarAclsData, service, set_up_temp_calendar_acls, test_access_rule_update,
+ tear_down_temp_calendar_acls);
+ g_test_add ("/calendar/access-rule/delete", TempCalendarAclsData, service, set_up_temp_calendar_acls, test_access_rule_delete,
+ tear_down_temp_calendar_acls);
+
+ g_test_add_func ("/calendar/event/json", test_event_json);
+ g_test_add_func ("/calendar/event/json/attendees", test_event_json_attendees);
+ g_test_add_func ("/calendar/event/json/dates", test_event_json_dates);
+ g_test_add_func ("/calendar/event/json/organizer", test_event_json_organizer);
+ g_test_add_func ("/calendar/event/json/recurrence", test_event_json_recurrence);
+ g_test_add_func ("/calendar/event/escaping", test_event_escaping);
+ g_test_add_func ("/calendar/event/parser/minimal",
+ test_calendar_event_parser_minimal);
+
+ g_test_add_func ("/calendar/calendar/escaping", test_calendar_escaping);
+
+ g_test_add_func ("/calendar/access-rule/properties", test_access_rule_properties);
+ g_test_add_func ("/calendar/access-rule/json", test_access_rule_json);
+
+ g_test_add_func ("/calendar/query/uri", test_query_uri);
+ g_test_add_func ("/calendar/query/etag", test_query_etag);
+
+ retval = g_test_run ();
+
+ if (service != NULL)
+ g_object_unref (service);
+
+ return retval;
+}
--- /dev/null
+-----BEGIN CERTIFICATE-----
+MIID6TCCAtGgAwIBAgIJAI9hYGsc661fMA0GCSqGSIb3DQEBBQUAMIGKMQswCQYD
+VQQGEwJHQjEVMBMGA1UEBwwMRGVmYXVsdCBDaXR5MREwDwYDVQQKDAhsaWJnZGF0
+YTEOMAwGA1UECwwFVGVzdHMxFzAVBgNVBAMMDmxpYmdkYXRhIHRlc3RzMSgwJgYJ
+KoZIhvcNAQkBFhlsaWJnZGF0YS1tYWludEBnbm9tZS5idWdzMB4XDTEzMDcwNjE3
+NDQxNFoXDTEzMDgwNTE3NDQxNFowgYoxCzAJBgNVBAYTAkdCMRUwEwYDVQQHDAxE
+ZWZhdWx0IENpdHkxETAPBgNVBAoMCGxpYmdkYXRhMQ4wDAYDVQQLDAVUZXN0czEX
+MBUGA1UEAwwObGliZ2RhdGEgdGVzdHMxKDAmBgkqhkiG9w0BCQEWGWxpYmdkYXRh
+LW1haW50QGdub21lLmJ1Z3MwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
+AQDCbpdfrtWTz+ZpNaVZuxaeAAY+f/xZz4wEH1gaNBNb3u9CPEWofW+fLNB6izkn
+f9qhx2K8PrM9LKHDJS4uUU9dkfQHQsrCSffRWqQTeOOnpYHjS21iDYdOt4e//f/J
+erAEIyWMQAP5eqMt4hp5wrfhSh2ul9lcHz2Lv5u6H+I8ygoUaMyH15WIlEzxOsn4
+i+lXSkdmso2n1FYbiMyyMYButnnmv+EcPvOdw88PB8Y6PnCN2Ye0fo9HvcJhHEdg
+GM4SKsejA/L+T8fX0FYCXrsLPYU0Ntm15ZV8nNsxCoZFGmdTs/prL8ztXaI1tYdi
+lI1RKVTOVxD2DKdrCs5bnxYhAgMBAAGjUDBOMB0GA1UdDgQWBBQwhz/4hEriPnF5
+F3TDY9TQLzxlnDAfBgNVHSMEGDAWgBQwhz/4hEriPnF5F3TDY9TQLzxlnDAMBgNV
+HRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAIVnySe76zjb5UHromPibgT9eL
+n8oZ76aGj6+VMLucpaK8K7U7y2ONAO+BB+wUyLaq48EYb6DmpFKThAxTajYd1f/7
+14bJIew8papMEooiJHyOVfZPLOePjCldV5+hPfwsfJ3NSDL8dc+IB2PQmgp32nom
+9uvQMOdD56hHSIP5zFZwNiWH75piWyUNs/+cbHKgnyVGWaoVd7z3E5dNelOMopbo
+qvWk2MM3nHpiQqMZyliTkq5uD2Q8WiXBD4rPUeEU55NaPslB8xKwldmrAlcwYvIg
+2SDhAsTPLcCgjNuHlr/v4VC29YsF37oYCGfmWvLwGFGufsxcxXkrVhhNr2WB
+-----END CERTIFICATE-----
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <locale.h>
+#include <stdio.h>
+#include <string.h>
+#include <libxml/parser.h>
+#include <libxml/xmlsave.h>
+
+#include "common.h"
+
+/* %TRUE if interactive tests should be skipped because we're running automatically (for example) */
+static gboolean no_interactive = TRUE;
+
+/* declaration of debug handler */
+static void gdata_test_debug_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data);
+
+/* Directory to output network trace files to, if trace output is enabled. (NULL otherwise.) */
+static GFile *trace_dir = NULL;
+
+/* TRUE if tests should be run online and a trace file written for each; FALSE if tests should run offline against existing trace files. */
+static gboolean write_traces = FALSE;
+
+/* TRUE if tests should be run online and the server's responses compared to the existing trace file for each; FALSE if tests should run offline without comparison. */
+static gboolean compare_traces = FALSE;
+
+/* Global mock server instance used by all tests. */
+static UhmServer *mock_server = NULL;
+
+void
+gdata_test_init (int argc, char **argv)
+{
+ GTlsCertificate *cert;
+ GError *child_error = NULL;
+ gchar *cert_path = NULL, *key_path = NULL;
+ gint i;
+
+ setlocale (LC_ALL, "");
+
+ /* Parse the custom options */
+ for (i = 1; i < argc; i++) {
+ if (strcmp ("--no-interactive", argv[i]) == 0 || strcmp ("-ni", argv[i]) == 0) {
+ no_interactive = TRUE;
+ argv[i] = (char*) "";
+ } else if (strcmp ("--interactive", argv[i]) == 0 || strcmp ("-i", argv[i]) == 0) {
+ no_interactive = FALSE;
+ argv[i] = (char*) "";
+ } else if (strcmp ("--trace-dir", argv[i]) == 0 || strcmp ("-t", argv[i]) == 0) {
+ if (i >= argc - 1) {
+ fprintf (stderr, "Error: Missing directory for --trace-dir option.\n");
+ exit (1);
+ }
+
+ trace_dir = g_file_new_for_path (argv[i + 1]);
+
+ argv[i] = (char*) "";
+ argv[i + 1] = (char*) "";
+ i++;
+ } else if (strcmp ("--write-traces", argv[i]) == 0 || strcmp ("-w", argv[i]) == 0) {
+ write_traces = TRUE;
+ argv[i] = (char*) "";
+ } else if (strcmp ("--compare-traces", argv[i]) == 0 || strcmp ("-c", argv[i]) == 0) {
+ compare_traces = TRUE;
+ argv[i] = (char*) "";
+ } else if (strcmp ("-?", argv[i]) == 0 || strcmp ("--help", argv[i]) == 0 || strcmp ("-h" , argv[i]) == 0) {
+ /* We have to override --help in order to document --no-interactive and the trace flags. */
+ printf ("Usage:\n"
+ " %s [OPTION...]\n\n"
+ "Help Options:\n"
+ " -?, --help Show help options\n"
+ "Test Options:\n"
+ " -l List test cases available in a test executable\n"
+ " -seed=RANDOMSEED Provide a random seed to reproduce test\n"
+ " runs using random numbers\n"
+ " --verbose Run tests verbosely\n"
+ " -q, --quiet Run tests quietly\n"
+ " -p TESTPATH Execute all tests matching TESTPATH\n"
+ " -m {perf|slow|thorough|quick} Execute tests according modes\n"
+ " --debug-log Debug test logging output\n"
+ " -ni, --no-interactive Only execute tests which don't require user interaction\n"
+ " -i, --interactive Execute tests including those requiring user interaction\n"
+ " -t, --trace-dir [directory] Read/Write trace files in the specified directory\n"
+ " -w, --write-traces Work online and write trace files to --trace-dir\n"
+ " -c, --compare-traces Work online and compare with existing trace files in --trace-dir\n",
+ argv[0]);
+ exit (0);
+ }
+ }
+
+ /* --[write|compare]-traces are mutually exclusive. */
+ if (write_traces == TRUE && compare_traces == TRUE) {
+ fprintf (stderr, "Error: --write-traces and --compare-traces are mutually exclusive.\n");
+ exit (1);
+ }
+
+ g_test_init (&argc, &argv, NULL);
+ g_test_bug_base ("http://bugzilla.gnome.org/show_bug.cgi?id=");
+
+ /* Set handler of debug information */
+ g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, (GLogFunc) gdata_test_debug_handler, NULL);
+
+ /* Enable full debugging. These options are seriously unsafe, but we don't care for test cases. */
+ g_setenv ("LIBGDATA_DEBUG", "4" /* GDATA_LOG_FULL_UNREDACTED */, FALSE);
+ g_setenv ("G_MESSAGES_DEBUG", "libgdata", FALSE);
+ g_setenv ("LIBGDATA_LAX_SSL_CERTIFICATES", "1", FALSE);
+
+ mock_server = uhm_server_new ();
+ uhm_server_set_enable_logging (mock_server, write_traces);
+ uhm_server_set_enable_online (mock_server, write_traces || compare_traces);
+
+ /* Build the certificate. */
+ cert_path = g_test_build_filename (G_TEST_DIST, "cert.pem", NULL);
+ key_path = g_test_build_filename (G_TEST_DIST, "key.pem", NULL);
+
+ cert = g_tls_certificate_new_from_files (cert_path, key_path, &child_error);
+ g_assert_no_error (child_error);
+
+ g_free (key_path);
+ g_free (cert_path);
+
+ /* Set it as the property. */
+ uhm_server_set_tls_certificate (mock_server, cert);
+ g_object_unref (cert);
+}
+
+/*
+ * gdata_test_get_mock_server:
+ *
+ * Returns the singleton #UhmServer instance used throughout the test suite.
+ *
+ * Return value: (transfer none): the mock server
+ *
+ * Since: 0.13.4
+ */
+UhmServer *
+gdata_test_get_mock_server (void)
+{
+ return mock_server;
+}
+
+/*
+ * gdata_test_interactive:
+ *
+ * Returns whether tests which require interactivity should be run.
+ *
+ * Return value: %TRUE if interactive tests should be run, %FALSE otherwise
+ *
+ * Since: 0.9.0
+ */
+gboolean
+gdata_test_interactive (void)
+{
+ return (no_interactive == FALSE) ? TRUE : FALSE;
+}
+
+typedef struct {
+ GDataBatchOperation *operation;
+ guint op_id;
+ GDataBatchOperationType operation_type;
+ GDataEntry *entry;
+ GDataEntry **returned_entry;
+ gchar *id;
+ GType entry_type;
+ GError **error;
+} BatchOperationData;
+
+static void
+batch_operation_data_free (BatchOperationData *data)
+{
+ if (data->operation != NULL)
+ g_object_unref (data->operation);
+ if (data->entry != NULL)
+ g_object_unref (data->entry);
+ g_free (data->id);
+
+ /* We don't free data->error, as it's owned by the calling code */
+
+ g_slice_free (BatchOperationData, data);
+}
+
+static void
+test_batch_operation_query_cb (guint operation_id, GDataBatchOperationType operation_type, GDataEntry *entry, GError *error, gpointer user_data)
+{
+ BatchOperationData *data = user_data;
+
+ /* Mark the callback as having been run */
+ g_object_set_data (G_OBJECT (data->operation), "test::called-callbacks",
+ GUINT_TO_POINTER (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (data->operation), "test::called-callbacks")) + 1));
+
+ /* Check that the @operation_type and @operation_id matches those stored in @data */
+ g_assert_cmpuint (operation_id, ==, data->op_id);
+ g_assert_cmpuint (operation_type, ==, data->operation_type);
+
+ /* If data->error is set, we're expecting the operation to fail; otherwise, we're expecting it to succeed */
+ if (data->error != NULL) {
+ g_assert (error != NULL);
+ *(data->error) = g_error_copy (error);
+ g_assert (entry == NULL);
+
+ if (data->returned_entry != NULL)
+ *(data->returned_entry) = NULL;
+ } else {
+ g_assert_no_error (error);
+ g_assert (entry != NULL);
+ g_assert (entry != data->entry); /* check that the pointers aren't the same */
+ g_assert (gdata_entry_is_inserted (entry) == TRUE);
+
+ /* Check the ID and type of the returned entry */
+ /* TODO: We can't check this, because the Contacts service is stupid with IDs
+ * g_assert_cmpstr (gdata_entry_get_id (entry), ==, data->id); */
+ g_assert (G_TYPE_CHECK_INSTANCE_TYPE (entry, data->entry_type));
+
+ /* Check the entries match */
+ if (data->entry != NULL) {
+ g_assert_cmpstr (gdata_entry_get_title (entry), ==, gdata_entry_get_title (data->entry));
+ g_assert_cmpstr (gdata_entry_get_summary (entry), ==, gdata_entry_get_summary (data->entry));
+ g_assert_cmpstr (gdata_entry_get_content (entry), ==, gdata_entry_get_content (data->entry));
+ g_assert_cmpstr (gdata_entry_get_content_uri (entry), ==, gdata_entry_get_content_uri (data->entry));
+ g_assert_cmpstr (gdata_entry_get_rights (entry), ==, gdata_entry_get_rights (data->entry));
+ }
+
+ /* Copy the returned entry for the calling test code to prod later */
+ if (data->returned_entry != NULL)
+ *(data->returned_entry) = g_object_ref (entry);
+ }
+
+ /* Free the data */
+ batch_operation_data_free (data);
+}
+
+guint
+gdata_test_batch_operation_query (GDataBatchOperation *operation, const gchar *id, GType entry_type, GDataEntry *entry, GDataEntry **returned_entry,
+ GError **error)
+{
+ guint op_id;
+ BatchOperationData *data;
+
+ data = g_slice_new (BatchOperationData);
+ data->operation = g_object_ref (operation);
+ data->op_id = 0;
+ data->operation_type = GDATA_BATCH_OPERATION_QUERY;
+ data->entry = g_object_ref (entry);
+ data->returned_entry = returned_entry;
+ data->id = g_strdup (id);
+ data->entry_type = entry_type;
+ data->error = error;
+
+ op_id = gdata_batch_operation_add_query (operation, id, entry_type, test_batch_operation_query_cb, data);
+
+ data->op_id = op_id;
+
+ /* We expect a callback to be called when the operation is run */
+ g_object_set_data (G_OBJECT (operation), "test::expected-callbacks",
+ GUINT_TO_POINTER (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (operation), "test::expected-callbacks")) + 1));
+
+ return op_id;
+}
+
+static void
+test_batch_operation_insertion_update_cb (guint operation_id, GDataBatchOperationType operation_type, GDataEntry *entry, GError *error,
+ gpointer user_data)
+{
+ BatchOperationData *data = user_data;
+
+ /* Mark the callback as having been run */
+ g_object_set_data (G_OBJECT (data->operation), "test::called-callbacks",
+ GUINT_TO_POINTER (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (data->operation), "test::called-callbacks")) + 1));
+
+ /* Check that the @operation_type and @operation_id matches those stored in @data */
+ g_assert_cmpuint (operation_id, ==, data->op_id);
+ g_assert_cmpuint (operation_type, ==, data->operation_type);
+
+ /* If data->error is set, we're expecting the operation to fail; otherwise, we're expecting it to succeed */
+ if (data->error != NULL) {
+ g_assert (error != NULL);
+ *(data->error) = g_error_copy (error);
+ g_assert (entry == NULL);
+
+ if (data->returned_entry != NULL)
+ *(data->returned_entry) = NULL;
+ } else {
+ g_assert_no_error (error);
+ g_assert (entry != NULL);
+ g_assert (entry != data->entry); /* check that the pointers aren't the same */
+ g_assert (gdata_entry_is_inserted (entry) == TRUE);
+
+ /* Check the entries match */
+ g_assert_cmpstr (gdata_entry_get_title (entry), ==, gdata_entry_get_title (data->entry));
+ g_assert_cmpstr (gdata_entry_get_summary (entry), ==, gdata_entry_get_summary (data->entry));
+ g_assert_cmpstr (gdata_entry_get_content (entry), ==, gdata_entry_get_content (data->entry));
+ g_assert_cmpstr (gdata_entry_get_rights (entry), ==, gdata_entry_get_rights (data->entry));
+
+ /* Only test for differences in content URI if we had one to begin with, since the inserted entry could feasibly generate and return
+ * new content. */
+ if (gdata_entry_get_content_uri (data->entry) != NULL)
+ g_assert_cmpstr (gdata_entry_get_content_uri (entry), ==, gdata_entry_get_content_uri (data->entry));
+
+ /* Copy the inserted entry for the calling test code to prod later */
+ if (data->returned_entry != NULL)
+ *(data->returned_entry) = g_object_ref (entry);
+ }
+
+ /* Free the data */
+ batch_operation_data_free (data);
+}
+
+guint
+gdata_test_batch_operation_insertion (GDataBatchOperation *operation, GDataEntry *entry, GDataEntry **inserted_entry, GError **error)
+{
+ guint op_id;
+ BatchOperationData *data;
+
+ data = g_slice_new (BatchOperationData);
+ data->operation = g_object_ref (operation);
+ data->op_id = 0;
+ data->operation_type = GDATA_BATCH_OPERATION_INSERTION;
+ data->entry = g_object_ref (entry);
+ data->returned_entry = inserted_entry;
+ data->id = NULL;
+ data->entry_type = G_TYPE_INVALID;
+ data->error = error;
+
+ op_id = gdata_batch_operation_add_insertion (operation, entry, test_batch_operation_insertion_update_cb, data);
+
+ data->op_id = op_id;
+
+ /* We expect a callback to be called when the operation is run */
+ g_object_set_data (G_OBJECT (operation), "test::expected-callbacks",
+ GUINT_TO_POINTER (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (operation), "test::expected-callbacks")) + 1));
+
+ return op_id;
+}
+
+guint
+gdata_test_batch_operation_update (GDataBatchOperation *operation, GDataEntry *entry, GDataEntry **updated_entry, GError **error)
+{
+ guint op_id;
+ BatchOperationData *data;
+
+ data = g_slice_new (BatchOperationData);
+ data->operation = g_object_ref (operation);
+ data->op_id = 0;
+ data->operation_type = GDATA_BATCH_OPERATION_UPDATE;
+ data->entry = g_object_ref (entry);
+ data->returned_entry = updated_entry;
+ data->id = NULL;
+ data->entry_type = G_TYPE_INVALID;
+ data->error = error;
+
+ op_id = gdata_batch_operation_add_update (operation, entry, test_batch_operation_insertion_update_cb, data);
+
+ data->op_id = op_id;
+
+ /* We expect a callback to be called when the operation is run */
+ g_object_set_data (G_OBJECT (operation), "test::expected-callbacks",
+ GUINT_TO_POINTER (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (operation), "test::expected-callbacks")) + 1));
+
+ return op_id;
+}
+
+static void
+test_batch_operation_deletion_cb (guint operation_id, GDataBatchOperationType operation_type, GDataEntry *entry, GError *error, gpointer user_data)
+{
+ BatchOperationData *data = user_data;
+
+ /* Mark the callback as having been run */
+ g_object_set_data (G_OBJECT (data->operation), "test::called-callbacks",
+ GUINT_TO_POINTER (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (data->operation), "test::called-callbacks")) + 1));
+
+ /* Check that the @operation_type and @operation_id matches those stored in @data */
+ g_assert_cmpuint (operation_id, ==, data->op_id);
+ g_assert_cmpuint (operation_type, ==, data->operation_type);
+ g_assert (entry == NULL);
+
+ /* If data->error is set, we're expecting the operation to fail; otherwise, we're expecting it to succeed */
+ if (data->error != NULL) {
+ g_assert (error != NULL);
+ *(data->error) = g_error_copy (error);
+ } else {
+ g_assert_no_error (error);
+ }
+
+ /* Free the data */
+ batch_operation_data_free (data);
+}
+
+guint
+gdata_test_batch_operation_deletion (GDataBatchOperation *operation, GDataEntry *entry, GError **error)
+{
+ guint op_id;
+ BatchOperationData *data;
+
+ data = g_slice_new (BatchOperationData);
+ data->operation = g_object_ref (operation);
+ data->op_id = 0;
+ data->operation_type = GDATA_BATCH_OPERATION_DELETION;
+ data->entry = g_object_ref (entry);
+ data->returned_entry = NULL;
+ data->id = NULL;
+ data->entry_type = G_TYPE_INVALID;
+ data->error = error;
+
+ op_id = gdata_batch_operation_add_deletion (operation, entry, test_batch_operation_deletion_cb, data);
+
+ data->op_id = op_id;
+
+ /* We expect a callback to be called when the operation is run */
+ g_object_set_data (G_OBJECT (operation), "test::expected-callbacks",
+ GUINT_TO_POINTER (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (operation), "test::expected-callbacks")) + 1));
+
+ return op_id;
+}
+
+gboolean
+gdata_test_batch_operation_run (GDataBatchOperation *operation, GCancellable *cancellable, GError **error)
+{
+ gboolean success = gdata_batch_operation_run (operation, cancellable, error);
+
+ /* Assert that callbacks were called exactly once for each operation in the batch operation */
+ g_assert_cmpuint (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (operation), "test::expected-callbacks")), ==,
+ GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (operation), "test::called-callbacks")));
+
+ return success;
+}
+
+gboolean
+gdata_test_batch_operation_run_finish (GDataBatchOperation *operation, GAsyncResult *async_result, GError **error)
+{
+ gboolean success = gdata_batch_operation_run_finish (operation, async_result, error);
+
+ /* Assert that callbacks were called exactly once for each operation in the batch operation */
+ g_assert_cmpuint (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (operation), "test::expected-callbacks")), ==,
+ GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (operation), "test::called-callbacks")));
+
+ return success;
+}
+
+static gboolean
+compare_xml_namespaces (xmlNs *ns1, xmlNs *ns2)
+{
+ if (ns1 == ns2)
+ return TRUE;
+
+ /* Compare various simple properties */
+ if (ns1->type != ns2->type ||
+ xmlStrcmp (ns1->href, ns2->href) != 0 ||
+ xmlStrcmp (ns1->prefix, ns2->prefix) != 0 ||
+ ns1->context != ns2->context) {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static gboolean compare_xml_nodes (xmlNode *node1, xmlNode *node2);
+
+static gboolean
+compare_xml_node_lists (xmlNode *list1, xmlNode *list2)
+{
+ GHashTable *table;
+ xmlNode *child;
+
+ /* Compare their child elements. We iterate through the first linked list and, for each child node, iterate through the second linked list
+ * comparing it against each node there. We keep a hashed set of nodes in the second linked list which have already been visited and compared
+ * successfully, both for speed and to guarantee that one element in the second linked list doesn't match more than one in the first linked
+ * list. We take this approach because we can't modify the second linked list in place to remove matched nodes.
+ * Finally, we iterate through the second node list and check that all its elements are in the hash table (i.e. they've all been visited
+ * exactly once).
+ * This approach is O(n^2) in the number of nodes in the linked lists, but since we should be dealing with fairly narrow XML trees this should
+ * be OK. */
+ table = g_hash_table_new (g_direct_hash, g_direct_equal);
+
+ for (child = list1; child != NULL; child = child->next) {
+ xmlNode *other_child;
+ gboolean matched = FALSE;
+
+ for (other_child = list2; other_child != NULL; other_child = other_child->next) {
+ if (g_hash_table_lookup (table, other_child) != NULL)
+ continue;
+
+ if (compare_xml_nodes (child, other_child) == TRUE) {
+ g_hash_table_insert (table, other_child, other_child);
+ matched = TRUE;
+ break;
+ }
+ }
+
+ if (matched == FALSE) {
+ g_hash_table_destroy (table);
+ return FALSE;
+ }
+ }
+
+ for (child = list2; child != NULL; child = child->next) {
+ if (g_hash_table_lookup (table, child) == NULL) {
+ g_hash_table_destroy (table);
+ return FALSE;
+ }
+ }
+
+ g_hash_table_destroy (table);
+
+ return TRUE;
+}
+
+static gboolean
+compare_xml_nodes (xmlNode *node1, xmlNode *node2)
+{
+ GHashTable *table;
+ xmlAttr *attr1, *attr2;
+ xmlNs *ns;
+
+ if (node1 == node2)
+ return TRUE;
+
+ /* Compare various simple properties */
+ if (node1->type != node2->type ||
+ xmlStrcmp (node1->name, node2->name) != 0 ||
+ compare_xml_namespaces (node1->ns, node2->ns) == FALSE ||
+ xmlStrcmp (node1->content, node2->content) != 0) {
+ return FALSE;
+ }
+
+ /* Compare their attributes. This is done in document order, which isn't strictly correct, since XML specifically does not apply an ordering
+ * over attributes. However, it suffices for our needs. */
+ for (attr1 = node1->properties, attr2 = node2->properties; attr1 != NULL && attr2 != NULL; attr1 = attr1->next, attr2 = attr2->next) {
+ /* Compare various simple properties */
+ if (attr1->type != attr2->type ||
+ xmlStrcmp (attr1->name, attr2->name) != 0 ||
+ compare_xml_namespaces (attr1->ns, attr2->ns) == FALSE ||
+ attr1->atype != attr2->atype) {
+ return FALSE;
+ }
+
+ /* Compare their child nodes (values represented as text and entity nodes) */
+ if (compare_xml_node_lists (attr1->children, attr2->children) == FALSE)
+ return FALSE;
+ }
+
+ /* Stragglers? */
+ if (attr1 != NULL || attr2 != NULL)
+ return FALSE;
+
+ /* Compare their namespace definitions regardless of order. Do this by inserting all the definitions from node1 into a hash table, then running
+ * through the definitions in node2 and ensuring they exist in the hash table, removing each one from the table as we go. Check there aren't
+ * any left in the hash table afterwards. */
+ table = g_hash_table_new (g_str_hash, g_str_equal);
+
+ for (ns = node1->nsDef; ns != NULL; ns = ns->next) {
+ /* Prefixes should be unique, but I trust libxml about as far as I can throw it. */
+ if (g_hash_table_lookup (table, ns->prefix ? ns->prefix : (gpointer) "") != NULL) {
+ g_hash_table_destroy (table);
+ return FALSE;
+ }
+
+ g_hash_table_insert (table, ns->prefix ? (gpointer) ns->prefix : (gpointer) "", ns);
+ }
+
+ for (ns = node2->nsDef; ns != NULL; ns = ns->next) {
+ xmlNs *original_ns = g_hash_table_lookup (table, ns->prefix ? ns->prefix : (gpointer) "");
+
+ if (original_ns == NULL ||
+ compare_xml_namespaces (original_ns, ns) == FALSE) {
+ g_hash_table_destroy (table);
+ return FALSE;
+ }
+
+ g_hash_table_remove (table, ns->prefix ? ns->prefix : (gpointer) "");
+ }
+
+ if (g_hash_table_size (table) != 0) {
+ g_hash_table_destroy (table);
+ return FALSE;
+ }
+
+ g_hash_table_destroy (table);
+
+ /* Compare their child nodes */
+ if (compare_xml_node_lists (node1->children, node2->children) == FALSE)
+ return FALSE;
+
+ /* Success! */
+ return TRUE;
+}
+
+gboolean
+gdata_test_compare_xml_strings (const gchar *parsable_xml, const gchar *expected_xml, gboolean print_error)
+{
+ gboolean success;
+ xmlDoc *parsable_doc, *expected_doc;
+
+ /* Parse both the XML strings */
+ parsable_doc = xmlReadMemory (parsable_xml, strlen (parsable_xml), "/dev/null", NULL, 0);
+ expected_doc = xmlReadMemory (expected_xml, strlen (expected_xml), "/dev/null", NULL, 0);
+
+ g_assert (parsable_doc != NULL && expected_doc != NULL);
+
+ /* Recursively compare the two XML trees */
+ success = compare_xml_nodes (xmlDocGetRootElement (parsable_doc), xmlDocGetRootElement (expected_doc));
+ if (success == FALSE && print_error == TRUE) {
+ /* The comparison has failed, so print out the two XML strings for ease of debugging */
+ g_message ("\n\nParsable: %s\n\nExpected: %s\n\n", parsable_xml, expected_xml);
+ }
+
+ xmlFreeDoc (expected_doc);
+ xmlFreeDoc (parsable_doc);
+
+ return success;
+}
+
+gboolean
+gdata_test_compare_xml (GDataParsable *parsable, const gchar *expected_xml, gboolean print_error)
+{
+ gboolean success;
+ gchar *parsable_xml;
+
+ /* Get an XML string for the GDataParsable */
+ parsable_xml = gdata_parsable_get_xml (parsable);
+ success = gdata_test_compare_xml_strings (parsable_xml, expected_xml, print_error);
+ g_free (parsable_xml);
+
+ return success;
+}
+
+static gboolean
+compare_json_nodes (JsonNode *node1, JsonNode *node2)
+{
+ if (node1 == node2)
+ return TRUE;
+
+ if (JSON_NODE_TYPE (node1) != JSON_NODE_TYPE (node2))
+ return FALSE;
+
+ switch (JSON_NODE_TYPE (node1)) {
+ case JSON_NODE_OBJECT: {
+ JsonObject *object1, *object2;
+ guint size1, size2;
+ GList *members, *i;
+
+ object1 = json_node_get_object (node1);
+ object2 = json_node_get_object (node2);
+
+ size1 = json_object_get_size (object1);
+ size2 = json_object_get_size (object2);
+
+ if (size1 != size2)
+ return FALSE;
+
+ /* Iterate over the first object, checking that every member is also present in the second object. */
+ members = json_object_get_members (object1);
+
+ for (i = members; i != NULL; i = i->next) {
+ JsonNode *child_node1, *child_node2;
+
+ child_node1 = json_object_get_member (object1, i->data);
+ child_node2 = json_object_get_member (object2, i->data);
+
+ g_assert (child_node1 != NULL);
+ if (child_node2 == NULL) {
+ g_list_free (members);
+ return FALSE;
+ }
+
+ if (compare_json_nodes (child_node1, child_node2) == FALSE) {
+ g_list_free (members);
+ return FALSE;
+ }
+ }
+
+ g_list_free (members);
+
+ return TRUE;
+ }
+ case JSON_NODE_ARRAY: {
+ JsonArray *array1, *array2;
+ guint length1, length2, i;
+
+ array1 = json_node_get_array (node1);
+ array2 = json_node_get_array (node2);
+
+ length1 = json_array_get_length (array1);
+ length2 = json_array_get_length (array2);
+
+ if (length1 != length2)
+ return FALSE;
+
+ /* Iterate over both arrays, checking the elements at each index are identical. */
+ for (i = 0; i < length1; i++) {
+ JsonNode *child_node1, *child_node2;
+
+ child_node1 = json_array_get_element (array1, i);
+ child_node2 = json_array_get_element (array2, i);
+
+ if (compare_json_nodes (child_node1, child_node2) == FALSE)
+ return FALSE;
+ }
+
+ return TRUE;
+ }
+ case JSON_NODE_VALUE: {
+ GType type1, type2;
+
+ type1 = json_node_get_value_type (node1);
+ type2 = json_node_get_value_type (node2);
+
+ if (type1 != type2)
+ return FALSE;
+
+ switch (type1) {
+ case G_TYPE_BOOLEAN:
+ return (json_node_get_boolean (node1) == json_node_get_boolean (node2)) ? TRUE : FALSE;
+ case G_TYPE_DOUBLE:
+ /* Note: This doesn't need an epsilon-based comparison because we only want to return
+ * true if the string representation of the two values is equal — and if it is, their
+ * parsed values should be binary identical too. */
+ return (json_node_get_double (node1) == json_node_get_double (node2)) ? TRUE : FALSE;
+ case G_TYPE_INT64:
+ return (json_node_get_int (node1) == json_node_get_int (node2)) ? TRUE : FALSE;
+ case G_TYPE_STRING:
+ return (g_strcmp0 (json_node_get_string (node1), json_node_get_string (node2)) == 0) ? TRUE : FALSE;
+ default:
+ /* JSON doesn't support any other types. */
+ g_assert_not_reached ();
+ }
+
+ return TRUE;
+ }
+ case JSON_NODE_NULL:
+ return TRUE;
+ default:
+ g_assert_not_reached ();
+ }
+}
+
+gboolean
+gdata_test_compare_json_strings (const gchar *parsable_json, const gchar *expected_json, gboolean print_error)
+{
+ gboolean success;
+ JsonParser *parsable_parser, *expected_parser;
+ GError *child_error = NULL;
+
+ /* Parse both strings. */
+ parsable_parser = json_parser_new ();
+ expected_parser = json_parser_new ();
+
+ json_parser_load_from_data (parsable_parser, parsable_json, -1, &child_error);
+ if (child_error != NULL) {
+ if (print_error == TRUE) {
+ g_message ("\n\nParsable: %s\n\nNot valid JSON: %s", parsable_json, child_error->message);
+ }
+
+ g_error_free (child_error);
+ return FALSE;
+ }
+
+ json_parser_load_from_data (expected_parser, expected_json, -1, &child_error);
+ g_assert_no_error (child_error); /* this really should never fail; or the test has encoded bad JSON */
+
+ /* Recursively compare the two JSON nodes. */
+ success = compare_json_nodes (json_parser_get_root (parsable_parser), json_parser_get_root (expected_parser));
+ if (success == FALSE && print_error == TRUE) {
+ /* The comparison has failed, so print out the two JSON strings for ease of debugging */
+ g_message ("\n\nParsable: %s\n\nExpected: %s\n\n", parsable_json, expected_json);
+ }
+
+ g_object_unref (expected_parser);
+ g_object_unref (parsable_parser);
+
+ return success;
+}
+
+gboolean
+gdata_test_compare_json (GDataParsable *parsable, const gchar *expected_json, gboolean print_error)
+{
+ gboolean success;
+ gchar *parsable_json;
+
+ /* Get a JSON string for the GDataParsable. */
+ parsable_json = gdata_parsable_get_json (parsable);
+ success = gdata_test_compare_json_strings (parsable_json, expected_json, print_error);
+ g_free (parsable_json);
+
+ return success;
+}
+
+gboolean
+gdata_test_compare_kind (GDataEntry *entry, const gchar *expected_term, const gchar *expected_label)
+{
+ GList *list;
+
+ /* Check the entry's kind category is present and correct */
+ for (list = gdata_entry_get_categories (entry); list != NULL; list = list->next) {
+ GDataCategory *category = GDATA_CATEGORY (list->data);
+
+ if (g_strcmp0 (gdata_category_get_scheme (category), "http://schemas.google.com/g/2005#kind") == 0) {
+ /* Found the kind category; check its term and label. */
+ return (g_strcmp0 (gdata_category_get_term (category), expected_term) == 0) &&
+ (g_strcmp0 (gdata_category_get_label (category), expected_label) == 0);
+ }
+ }
+
+ /* No kind! */
+ return FALSE;
+}
+
+/* Common code for tests of async query functions that have progress callbacks */
+
+void
+gdata_test_async_progress_callback (GDataEntry *entry, guint entry_key, guint entry_count, GDataAsyncProgressClosure *data)
+{
+ /* No-op */
+}
+
+void
+gdata_test_async_progress_closure_free (GDataAsyncProgressClosure *data)
+{
+ /* Check that this callback is called first */
+ g_assert_cmpuint (data->async_ready_notify_count, ==, 0);
+ data->progress_destroy_notify_count++;
+}
+
+void
+gdata_test_async_progress_finish_callback (GObject *service, GAsyncResult *res, GDataAsyncProgressClosure *data)
+{
+ /* Check that this callback is called second */
+ g_assert_cmpuint (data->progress_destroy_notify_count, ==, 1);
+ data->async_ready_notify_count++;
+
+ g_main_loop_quit (data->main_loop);
+}
+
+gboolean
+gdata_async_test_cancellation_cb (GDataAsyncTestData *async_data)
+{
+ g_cancellable_cancel (async_data->cancellable);
+ async_data->cancellation_timeout_id = 0;
+ return FALSE;
+}
+
+void
+gdata_set_up_async_test_data (GDataAsyncTestData *async_data, gconstpointer test_data)
+{
+ async_data->main_loop = g_main_loop_new (NULL, FALSE);
+ async_data->cancellable = g_cancellable_new ();
+ async_data->cancellation_timeout = 0;
+ async_data->cancellation_successful = FALSE;
+
+ async_data->test_data = test_data;
+}
+
+void
+gdata_tear_down_async_test_data (GDataAsyncTestData *async_data, gconstpointer test_data)
+{
+ g_assert (async_data->test_data == test_data); /* sanity check */
+
+ g_object_unref (async_data->cancellable);
+ g_main_loop_unref (async_data->main_loop);
+}
+
+/* Output a log message. Note the output is prefixed with ‘# ’ so that it
+ * doesn’t interfere with TAP output. */
+static void
+output_commented_lines (const gchar *message)
+{
+ const gchar *i, *next_newline;
+
+ for (i = message; i != NULL && *i != '\0'; i = next_newline) {
+ gchar *line;
+
+ next_newline = strchr (i, '\n');
+ if (next_newline != NULL) {
+ line = g_strndup (i, next_newline - i);
+ next_newline++;
+ } else {
+ line = g_strdup (i);
+ }
+
+ printf ("# %s\n", line);
+
+ g_free (line);
+ }
+}
+
+static void
+output_log_message (const gchar *message)
+{
+ if (strlen (message) > 2 && message[2] == '<') {
+ /* As debug string starts with direction indicator and space, t.i. "< ", */
+ /* we need access string starting from third character and see if it's */
+ /* looks like xml - t.i. it starts with '<' */
+ xmlChar *xml_buff;
+ int buffer_size;
+ xmlDocPtr xml_doc;
+ /* we need to cut to the beginning of XML string */
+ message = message + 2;
+ /* create xml document and dump it to string buffer */
+ xml_doc = xmlParseDoc ((const xmlChar*) message);
+ xmlDocDumpFormatMemory (xml_doc, &xml_buff, &buffer_size, 1);
+ /* print out structured xml - if it's not xml, it will get error in output */
+ output_commented_lines ((gchar*) xml_buff);
+ /* free xml structs */
+ xmlFree (xml_buff);
+ xmlFreeDoc (xml_doc);
+ } else {
+ output_commented_lines ((gchar*) message);
+ }
+}
+
+static void
+gdata_test_debug_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data)
+{
+ output_log_message (message);
+
+ /* Log to the trace file. */
+ if ((*message == '<' || *message == '>' || *message == ' ') && *(message + 1) == ' ') {
+ uhm_server_received_message_chunk (mock_server, message, strlen (message), NULL);
+ }
+}
+
+/**
+ * gdata_test_set_https_port:
+ * @server: a #UhmServer
+ *
+ * Sets the HTTPS port used for all future libgdata requests to that used by the given mock @server,
+ * effectively redirecting all client requests to the mock server.
+ *
+ * Since: 0.13.4
+ */
+void
+gdata_test_set_https_port (UhmServer *server)
+{
+ gchar *port_string = g_strdup_printf ("%u", uhm_server_get_port (server));
+ g_setenv ("LIBGDATA_HTTPS_PORT", port_string, TRUE);
+ g_free (port_string);
+}
+
+/**
+ * gdata_test_mock_server_start_trace:
+ * @server: a #UhmServer
+ * @trace_filename: filename of the trace to load
+ *
+ * Wrapper around uhm_server_start_trace() which additionally sets the <code class="literal">LIBGDATA_HTTPS_PORT</code>
+ * environment variable to redirect all libgdata requests to the mock server.
+ *
+ * Since: 0.13.4
+ */
+void
+gdata_test_mock_server_start_trace (UhmServer *server, const gchar *trace_filename)
+{
+ GError *child_error = NULL;
+
+ uhm_server_start_trace (server, trace_filename, &child_error);
+ g_assert_no_error (child_error);
+ gdata_test_set_https_port (server);
+}
+
+/**
+ * gdata_test_mock_server_handle_message_error:
+ * @server: a #UhmServer
+ * @message: the message whose response should be filled
+ * @client: the currently connected client
+ * @user_data: user data provided when connecting the signal
+ *
+ * Handler for #UhmServer::handle-message which sets the HTTP response for @message to the HTTP error status
+ * specified in a #GDataTestRequestErrorData structure passed to @user_data.
+ *
+ * Since: 0.13.4
+ */
+gboolean
+gdata_test_mock_server_handle_message_error (UhmServer *server, SoupMessage *message, SoupClientContext *client, gpointer user_data)
+{
+ const GDataTestRequestErrorData *data = user_data;
+
+ soup_message_set_status_full (message, data->status_code, data->reason_phrase);
+ soup_message_body_append (message->response_body, SOUP_MEMORY_STATIC, data->message_body, strlen (data->message_body));
+
+ return TRUE;
+}
+
+/**
+ * gdata_test_mock_server_handle_message_timeout:
+ * @server: a #UhmServer
+ * @message: the message whose response should be filled
+ * @client: the currently connected client
+ * @user_data: user data provided when connecting the signal
+ *
+ * Handler for #UhmServer::handle-message which waits for 2 seconds before returning a %SOUP_STATUS_REQUEST_TIMEOUT status
+ * and appropriate error message body. If used in conjunction with a 1 second timeout in the client code under test, this can
+ * simulate network error conditions and timeouts, in order to test the error handling code for such conditions.
+ *
+ * Since: 0.13.4
+ */
+gboolean
+gdata_test_mock_server_handle_message_timeout (UhmServer *server, SoupMessage *message, SoupClientContext *client, gpointer user_data)
+{
+ /* Sleep for longer than the timeout set on the client. */
+ g_usleep (2 * G_USEC_PER_SEC);
+
+ soup_message_set_status_full (message, SOUP_STATUS_REQUEST_TIMEOUT, "Request Timeout");
+ soup_message_body_append (message->response_body, SOUP_MEMORY_STATIC, "Request timed out.", strlen ("Request timed out."));
+
+ return TRUE;
+}
+
+/**
+ * gdata_test_query_user_for_verifier:
+ * @authentication_uri: authentication URI to present
+ *
+ * Given an authentication URI, prompt the user to go to that URI, grant access
+ * to the test application and enter the resulting verifier. This is to be used
+ * with interactive OAuth authorisation requests.
+ *
+ * Returns: (transfer full): verifier from the web page
+ */
+gchar *
+gdata_test_query_user_for_verifier (const gchar *authentication_uri)
+{
+ char verifier[100];
+
+ /* Wait for the user to retrieve and enter the verifier */
+ g_print ("Please navigate to the following URI and grant access: %s\n", authentication_uri);
+ g_print ("Enter verifier (EOF to skip test): ");
+ if (scanf ("%100s", verifier) != 1) {
+ /* Skip the test */
+ g_test_message ("Skipping test on user request.");
+ return NULL;
+ }
+
+ g_test_message ("Proceeding with user-provided verifier “%s”.", verifier);
+
+ return g_strdup (verifier);
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib.h>
+#include <gdata/gdata.h>
+
+#include <uhttpmock/uhm.h>
+
+#ifndef GDATA_TEST_COMMON_H
+#define GDATA_TEST_COMMON_H
+
+G_BEGIN_DECLS
+
+#define CLIENT_ID "ytapi-GNOME-libgdata-444fubtt-0"
+#define DOCUMENTS_USERNAME "libgdata.documents@gmail.com"
+
+/* These two must match */
+#define USERNAME_NO_DOMAIN "libgdata.test"
+#define USERNAME USERNAME_NO_DOMAIN "@gmail.com"
+
+/* This must not match the above two */
+#define INCORRECT_USERNAME "libgdata.test.invalid@gmail.com"
+
+/* These two must not match (obviously) */
+#define PASSWORD "gdata-gdata"
+#define INCORRECT_PASSWORD "bad-password"
+
+/* The amount of fuzziness (in seconds) used in comparisons between times which should (theoretically) be equal.
+ * Due to the weak consistency used in Google's servers, it's hard to guarantee that timestamps which should be equal,
+ * actually are. */
+#define TIME_FUZZINESS 5
+
+void gdata_test_init (int argc, char **argv);
+
+UhmServer *gdata_test_get_mock_server (void) G_GNUC_WARN_UNUSED_RESULT;
+
+gboolean gdata_test_interactive (void);
+
+guint gdata_test_batch_operation_query (GDataBatchOperation *operation, const gchar *id, GType entry_type,
+ GDataEntry *entry, GDataEntry **returned_entry, GError **error);
+guint gdata_test_batch_operation_insertion (GDataBatchOperation *operation, GDataEntry *entry, GDataEntry **inserted_entry, GError **error);
+guint gdata_test_batch_operation_update (GDataBatchOperation *operation, GDataEntry *entry, GDataEntry **updated_entry, GError **error);
+guint gdata_test_batch_operation_deletion (GDataBatchOperation *operation, GDataEntry *entry, GError **error);
+
+gboolean gdata_test_batch_operation_run (GDataBatchOperation *operation, GCancellable *cancellable, GError **error);
+gboolean gdata_test_batch_operation_run_finish (GDataBatchOperation *operation, GAsyncResult *async_result, GError **error);
+
+gboolean gdata_test_compare_xml_strings (const gchar *parsable_xml, const gchar *expected_xml, gboolean print_error);
+gboolean gdata_test_compare_xml (GDataParsable *parsable, const gchar *expected_xml, gboolean print_error);
+
+gboolean gdata_test_compare_json_strings (const gchar *parsable_json, const gchar *expected_json, gboolean print_error);
+gboolean gdata_test_compare_json (GDataParsable *parsable, const gchar *expected_json, gboolean print_error);
+
+gboolean gdata_test_compare_kind (GDataEntry *entry, const gchar *expected_term, const gchar *expected_label);
+
+/* Convenience macros. */
+#define gdata_test_assert_xml(Parsable, XML) \
+ G_STMT_START { \
+ gboolean _test_success = gdata_test_compare_xml (GDATA_PARSABLE (Parsable), XML, TRUE); \
+ g_assert (_test_success == TRUE); \
+ } G_STMT_END
+
+#define gdata_test_assert_json(Parsable, JSON) \
+ G_STMT_START { \
+ gboolean _test_success = gdata_test_compare_json (GDATA_PARSABLE (Parsable), JSON, TRUE); \
+ g_assert (_test_success == TRUE); \
+ } G_STMT_END
+
+/* Common code for tests of async query functions that have progress callbacks */
+typedef struct {
+ guint progress_destroy_notify_count;
+ guint async_ready_notify_count;
+ GMainLoop *main_loop;
+} GDataAsyncProgressClosure;
+void gdata_test_async_progress_callback (GDataEntry *entry, guint entry_key, guint entry_count, GDataAsyncProgressClosure *data);
+void gdata_test_async_progress_closure_free (GDataAsyncProgressClosure *data);
+void gdata_test_async_progress_finish_callback (GObject *service, GAsyncResult *res, GDataAsyncProgressClosure *data);
+
+typedef struct {
+ /*< private >*/
+ GMainLoop *main_loop;
+ GCancellable *cancellable;
+ guint cancellation_timeout; /* timeout period in ms */
+ guint cancellation_timeout_id; /* ID of the callback source */
+ gboolean cancellation_successful;
+
+ gconstpointer test_data;
+} GDataAsyncTestData;
+
+/**
+ * GDATA_ASYNC_CLOSURE_FUNCTIONS:
+ * @CLOSURE_NAME: the name of the closure
+ * @TestStructType: the type of the synchronous closure structure
+ *
+ * Defines set up and tear down functions for a version of @TestStructType which is wrapped by #GDataAsyncTestData (i.e. allocated and pointed to by
+ * the #GDataAsyncTestData.test_data pointer). These functions will be named <function>set_up_<replaceable>CLOSURE_NAME</replaceable>_async</function>
+ * and <function>tear_down_<replaceable>CLOSURE_NAME</replaceable>_async</function>.
+ *
+ * Since: 0.10.0
+ */
+#define GDATA_ASYNC_CLOSURE_FUNCTIONS(CLOSURE_NAME, TestStructType) \
+static void \
+set_up_##CLOSURE_NAME##_async (GDataAsyncTestData *async_data, gconstpointer service) \
+{ \
+ TestStructType *test_data = g_slice_new (TestStructType); \
+ set_up_##CLOSURE_NAME (test_data, service); \
+ gdata_set_up_async_test_data (async_data, test_data); \
+} \
+ \
+static void \
+tear_down_##CLOSURE_NAME##_async (GDataAsyncTestData *async_data, gconstpointer service) \
+{ \
+ tear_down_##CLOSURE_NAME ((TestStructType*) async_data->test_data, service); \
+ g_slice_free (TestStructType, (TestStructType*) async_data->test_data); \
+ gdata_tear_down_async_test_data (async_data, async_data->test_data); \
+}
+
+/**
+ * GDATA_ASYNC_STARTING_TIMEOUT:
+ *
+ * The initial timeout for cancellation tests, which will be the first timeout used after testing cancelling the operation before it's started.
+ * The value is in milliseconds.
+ *
+ * Since: 0.10.0
+ */
+#define GDATA_ASYNC_STARTING_TIMEOUT 20 /* ms */
+
+/**
+ * GDATA_ASYNC_TIMEOUT_MULTIPLIER:
+ *
+ * The factor by which the asynchronous cancellation timeout will be multiplied between iterations of the cancellation test.
+ *
+ * Since: 0.10.0
+ */
+#define GDATA_ASYNC_TIMEOUT_MULTIPLIER 3
+
+/**
+ * GDATA_ASYNC_MAXIMUM_TIMEOUT:
+ *
+ * The maximum timeout value for cancellation tests before they fail. i.e. If an operation takes longer than this period of time, the asynchronous
+ * operation test will fail.
+ * The value is in milliseconds.
+ *
+ * Since: 0.10.0
+ */
+#define GDATA_ASYNC_MAXIMUM_TIMEOUT 43740 /* ms */
+
+/**
+ * GDATA_ASYNC_TEST_FUNCTIONS:
+ * @TEST_NAME: the name of the test, excluding the “test_” prefix and the “_async” suffix
+ * @TestStructType: type of the closure structure to use, or <type>void</type>
+ * @TEST_BEGIN_CODE: code to execute to begin the test and start the asynchronous call
+ * @TEST_END_CODE: code to execute once the asynchronous call has completed, which will check the return values and any changed state
+ *
+ * Defines test and callback functions to test normal asynchronous operation and the cancellation behaviour of the given asynchronous function call.
+ *
+ * The asynchronous function call should be started in @TEST_BEGIN_CODE, using <varname>cancellable</varname> as its #GCancellable parameter,
+ * <varname>async_ready_callback</varname> as its #GAsyncReadyCallback parameter and <varname>async_data</varname> as its <varname>user_data</varname>
+ * parameter. There is no need for the code to create its own main loop: that's taken care of by the wrapper code.
+ *
+ * The code in @TEST_END_CODE will be inserted into the callback function for both the normal asynchronous test and the cancellation test, so should
+ * finish the asynchronous function call, using <varname>obj</varname> as the object on which the asynchronous function call was made,
+ * <varname>async_result</varname> as its #GAsyncResult parameter and <varname>error</varname> as its #GError parameter. The code should then check
+ * <varname>error</code>: if it's %NULL, the code should assert success conditions; if it's non-%NULL, the code should assert failure conditions.
+ * The wrapper code will ensure that the error is a %G_IO_ERROR_CANCELLED at the appropriate times.
+ *
+ * The following functions will be defined, and should be added to the test suite using the #GAsyncTestData closure structure:
+ * <function>test_<replaceable>TEST_NAME</replaceable>_async</function> and
+ * <function>test_<replaceable>TEST_NAME</replaceable>_async_cancellation</function>.
+ *
+ * These functions assume the existence of a <varname>mock_server</varname> variable which points to the current #UhmServer instance. They
+ * will automatically use traces <varname><replaceable>TEST_NAME</replaceable>-async</varname> and
+ * <varname><replaceable>TEST_NAME</replaceable>-async-cancellation</varname>.
+ *
+ * Since: 0.10.0
+ */
+#define GDATA_ASYNC_TEST_FUNCTIONS(TEST_NAME, TestStructType, TEST_BEGIN_CODE, TEST_END_CODE) \
+static void \
+test_##TEST_NAME##_async_cb (GObject *obj, GAsyncResult *async_result, GDataAsyncTestData *async_data) \
+{ \
+ TestStructType *data = (TestStructType*) async_data->test_data; \
+ GError *error = NULL; \
+ \
+ (void) data; /* hide potential unused variable warning */ \
+ \
+ { \
+ TEST_END_CODE; \
+ \
+ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED) == TRUE) { \
+ g_assert (g_cancellable_is_cancelled (async_data->cancellable) == TRUE); \
+ async_data->cancellation_successful = TRUE; \
+ } else if (error == NULL) { \
+ g_assert (g_cancellable_is_cancelled (async_data->cancellable) == FALSE || async_data->cancellation_timeout > 0); \
+ async_data->cancellation_successful = FALSE; \
+ } else { \
+ /* Unexpected error: explode. */ \
+ g_assert_no_error (error); \
+ async_data->cancellation_successful = FALSE; \
+ } \
+ } \
+ \
+ g_clear_error (&error); \
+ \
+ g_main_loop_quit (async_data->main_loop); \
+} \
+\
+static void \
+test_##TEST_NAME##_async (GDataAsyncTestData *async_data, gconstpointer service) \
+{ \
+ GAsyncReadyCallback async_ready_callback = (GAsyncReadyCallback) test_##TEST_NAME##_async_cb; \
+ TestStructType *data = (TestStructType*) async_data->test_data; \
+ GCancellable *cancellable = NULL; /* don't expose the cancellable, so the test proceeds as normal */ \
+ \
+ (void) data; /* hide potential unused variable warning */ \
+ \
+ /* Just run the test without doing any cancellation, and assert that it succeeds. */ \
+ async_data->cancellation_timeout = 0; \
+ \
+ g_test_message ("Running normal operation test…"); \
+ \
+ gdata_test_mock_server_start_trace (mock_server, G_STRINGIFY (TEST_NAME) "-async"); \
+ \
+ { \
+ TEST_BEGIN_CODE; \
+ } \
+ \
+ g_main_loop_run (async_data->main_loop); \
+ \
+ uhm_server_end_trace (mock_server); \
+} \
+ \
+static void \
+test_##TEST_NAME##_async_cancellation (GDataAsyncTestData *async_data, gconstpointer service) \
+{ \
+ async_data->cancellation_timeout = 0; \
+ \
+ /* Starting with a short timeout, repeatedly run the async. operation, cancelling it after the timeout and increasing the timeout until
+ * the operation succeeds for the first time. We then finish the test. This guarantees that if, for example, the test creates an entry on
+ * the server, it only ever creates one; because the test only ever succeeds once. (Of course, this assumes that the server does not change
+ * state if we cancel the operation, which is a fairly optimistic assumption. Sigh.) */ \
+ do { \
+ GCancellable *cancellable = async_data->cancellable; \
+ GAsyncReadyCallback async_ready_callback = (GAsyncReadyCallback) test_##TEST_NAME##_async_cb; \
+ TestStructType *data = (TestStructType*) async_data->test_data; \
+ \
+ gdata_test_mock_server_start_trace (mock_server, G_STRINGIFY (TEST_NAME) "-async-cancellation"); \
+ \
+ (void) data; /* hide potential unused variable warning */ \
+ \
+ /* Ensure the timeout remains sane. */ \
+ g_assert_cmpuint (async_data->cancellation_timeout, <=, GDATA_ASYNC_MAXIMUM_TIMEOUT); \
+ \
+ /* Schedule the cancellation after the timeout. */ \
+ if (async_data->cancellation_timeout == 0) { \
+ /* For the first test, cancel the cancellable before the test code is run */ \
+ gdata_async_test_cancellation_cb (async_data); \
+ } else { \
+ async_data->cancellation_timeout_id = g_timeout_add (async_data->cancellation_timeout, \
+ (GSourceFunc) gdata_async_test_cancellation_cb, async_data); \
+ } \
+ \
+ /* Mark the cancellation as unsuccessful and hope we get proven wrong. */ \
+ async_data->cancellation_successful = FALSE; \
+ \
+ g_test_message ("Running cancellation test with timeout of %u ms…", async_data->cancellation_timeout); \
+ \
+ { \
+ TEST_BEGIN_CODE; \
+ } \
+ \
+ g_main_loop_run (async_data->main_loop); \
+ \
+ /* Reset the cancellable for the next iteration and increase the timeout geometrically. */ \
+ g_cancellable_reset (cancellable); \
+ \
+ if (async_data->cancellation_timeout == 0) { \
+ async_data->cancellation_timeout = GDATA_ASYNC_STARTING_TIMEOUT; /* ms */ \
+ } else { \
+ async_data->cancellation_timeout *= GDATA_ASYNC_TIMEOUT_MULTIPLIER; \
+ } \
+ \
+ uhm_server_end_trace (mock_server); \
+ } while (async_data->cancellation_successful == TRUE); \
+ \
+ /* Clean up the last timeout callback */ \
+ if (async_data->cancellation_timeout_id != 0) { \
+ g_source_remove (async_data->cancellation_timeout_id); \
+ } \
+}
+
+gboolean gdata_async_test_cancellation_cb (GDataAsyncTestData *async_data);
+void gdata_set_up_async_test_data (GDataAsyncTestData *async_data, gconstpointer test_data);
+void gdata_tear_down_async_test_data (GDataAsyncTestData *async_data, gconstpointer test_data);
+
+/**
+ * GDataTestRequestErrorData:
+ * @status_code: HTTP response status code
+ * @reason_phrase: HTTP response status phrase
+ * @message_body: HTTP response message body
+ * @error_domain_func: constant function returning the #GQuark for the expected error domain
+ * @error_code: expected error code
+ *
+ * A mapping between a HTTP response emitted by a #UhmServer and the error expected to be thrown by the HTTP client.
+ * This is designed for testing error handling in the client code, typically by running a single request through an array
+ * of these such mappings and testing the client code throws the correct error in each case.
+ *
+ * Since: 0.13.4
+ */
+typedef struct {
+ /* HTTP response. */
+ guint status_code;
+ const gchar *reason_phrase;
+ const gchar *message_body;
+ /* Expected GData error. */
+ GQuark (*error_domain_func) (void); /* typically gdata_service_error_quark */
+ gint error_code;
+} GDataTestRequestErrorData;
+
+void gdata_test_set_https_port (UhmServer *server);
+void gdata_test_mock_server_start_trace (UhmServer *server, const gchar *trace_filename);
+gboolean gdata_test_mock_server_handle_message_error (UhmServer *server, SoupMessage *message, SoupClientContext *client, gpointer user_data);
+gboolean gdata_test_mock_server_handle_message_timeout (UhmServer *server, SoupMessage *message, SoupClientContext *client, gpointer user_data);
+
+gchar *gdata_test_query_user_for_verifier (const gchar *authentication_uri) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+G_END_DECLS
+
+#endif /* !GDATA_TEST_COMMON_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2009, 2010, 2011, 2014 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib.h>
+#include <unistd.h>
+#include <string.h>
+
+#include "gdata.h"
+#include "common.h"
+#include "gdata-dummy-authorizer.h"
+
+static UhmServer *mock_server = NULL;
+
+#undef CLIENT_ID /* from common.h */
+
+#define CLIENT_ID "352818697630-nqu2cmt5quqd6lr17ouoqmb684u84l1f.apps.googleusercontent.com"
+#define CLIENT_SECRET "-fA4pHQJxR3zJ-FyAMPQsikg"
+#define REDIRECT_URI "urn:ietf:wg:oauth:2.0:oob"
+
+typedef struct {
+ GDataContactsContact *contact;
+} TempContactData;
+
+static void
+set_up_temp_contact (TempContactData *data, gconstpointer service)
+{
+ GDataContactsContact *contact;
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-temp-contact");
+
+ /* Create a new temporary contact to use for a single test */
+ contact = gdata_contacts_contact_new (NULL);
+ gdata_contacts_contact_set_nickname (contact, "Test Contact Esq.");
+
+ /* Insert the contact */
+ data->contact = gdata_contacts_service_insert_contact (GDATA_CONTACTS_SERVICE (service), contact, NULL, NULL);
+ g_assert (GDATA_IS_CONTACTS_CONTACT (data->contact));
+ gdata_test_compare_kind (GDATA_ENTRY (data->contact), "http://schemas.google.com/contact/2008#contact", NULL);
+
+ g_object_unref (contact);
+
+ uhm_server_end_trace (mock_server);
+
+ /* HACK. Wait for the server to propagate distributed changes. */
+ if (uhm_server_get_enable_online (mock_server) == TRUE) {
+ sleep (10);
+ }
+}
+
+static void
+tear_down_temp_contact (TempContactData *data, gconstpointer service)
+{
+ GDataEntry *updated_contact;
+
+ gdata_test_mock_server_start_trace (mock_server, "teardown-temp-contact");
+
+ /* Re-query for the contact to get any updated ETags */
+ updated_contact = gdata_service_query_single_entry (GDATA_SERVICE (service), gdata_contacts_service_get_primary_authorization_domain (),
+ gdata_entry_get_id (GDATA_ENTRY (data->contact)), NULL, GDATA_TYPE_CONTACTS_CONTACT,
+ NULL, NULL);
+ g_assert (GDATA_IS_CONTACTS_CONTACT (updated_contact));
+
+ g_object_unref (data->contact);
+
+ /* Delete the new/updated contact */
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_contacts_service_get_primary_authorization_domain (),
+ updated_contact, NULL, NULL) == TRUE);
+
+ g_object_unref (updated_contact);
+
+ uhm_server_end_trace (mock_server);
+}
+
+GDATA_ASYNC_CLOSURE_FUNCTIONS (temp_contact, TempContactData);
+
+static void
+test_authentication (void)
+{
+ GDataOAuth2Authorizer *authorizer = NULL; /* owned */
+ gchar *authentication_uri, *authorisation_code;
+
+ gdata_test_mock_server_start_trace (mock_server, "authentication");
+
+ authorizer = gdata_oauth2_authorizer_new (CLIENT_ID, CLIENT_SECRET,
+ REDIRECT_URI,
+ GDATA_TYPE_CONTACTS_SERVICE);
+
+ /* Get an authentication URI. */
+ authentication_uri = gdata_oauth2_authorizer_build_authentication_uri (authorizer, NULL, FALSE);
+ g_assert (authentication_uri != NULL);
+
+ /* Get the authorisation code off the user. */
+ if (uhm_server_get_enable_online (mock_server)) {
+ authorisation_code = gdata_test_query_user_for_verifier (authentication_uri);
+ } else {
+ /* Hard coded, extracted from the trace file. */
+ authorisation_code = g_strdup ("4/OEX-S1iMbOA_dOnNgUlSYmGWh3TK.QrR73axcNMkWoiIBeO6P2m_su7cwkQI");
+ }
+
+ g_free (authentication_uri);
+
+ if (authorisation_code == NULL) {
+ /* Skip tests. */
+ goto skip_test;
+ }
+
+ /* Authorise the token */
+ g_assert (gdata_oauth2_authorizer_request_authorization (authorizer, authorisation_code, NULL, NULL) == TRUE);
+
+ /* Check all is as it should be */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (authorizer),
+ gdata_contacts_service_get_primary_authorization_domain ()) == TRUE);
+
+skip_test:
+ g_free (authorisation_code);
+ g_object_unref (authorizer);
+
+ uhm_server_end_trace (mock_server);
+}
+
+typedef struct {
+ GDataContactsContact *contact1;
+ GDataContactsContact *contact2;
+ GDataContactsContact *contact3;
+} QueryAllContactsData;
+
+static void
+set_up_query_all_contacts (QueryAllContactsData *data, gconstpointer service)
+{
+ GDataContactsContact *contact;
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-query-all-contacts");
+
+ /* Create new temporary contacts to use for the query all contacts tests */
+ contact = gdata_contacts_contact_new (NULL);
+ gdata_contacts_contact_set_nickname (contact, "Test Contact 1");
+ data->contact1 = gdata_contacts_service_insert_contact (GDATA_CONTACTS_SERVICE (service), contact, NULL, NULL);
+ g_object_unref (contact);
+
+ contact = gdata_contacts_contact_new (NULL);
+ gdata_contacts_contact_set_nickname (contact, "Test Contact 2");
+ data->contact2 = gdata_contacts_service_insert_contact (GDATA_CONTACTS_SERVICE (service), contact, NULL, NULL);
+ g_object_unref (contact);
+
+ contact = gdata_contacts_contact_new (NULL);
+ gdata_contacts_contact_set_nickname (contact, "Test Contact 3");
+ data->contact3 = gdata_contacts_service_insert_contact (GDATA_CONTACTS_SERVICE (service), contact, NULL, NULL);
+ g_object_unref (contact);
+
+ uhm_server_end_trace (mock_server);
+
+ /* It takes a few seconds for the contacts to reliably propagate around Google's servers. Distributed systems are so fun. Not.
+ * Thankfully, we don't have to wait when running against the mock server. */
+ if (uhm_server_get_enable_online (mock_server) == TRUE) {
+ g_usleep (G_USEC_PER_SEC * 5);
+ }
+}
+
+static void
+tear_down_query_all_contacts (QueryAllContactsData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "teardown-query-all-contacts");
+
+ /* Delete the new contacts */
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_contacts_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->contact1), NULL, NULL) == TRUE);
+ g_object_unref (data->contact1);
+
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_contacts_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->contact2), NULL, NULL) == TRUE);
+ g_object_unref (data->contact2);
+
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_contacts_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->contact3), NULL, NULL) == TRUE);
+ g_object_unref (data->contact3);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_query_all_contacts (QueryAllContactsData *data, gconstpointer service)
+{
+ GDataFeed *feed;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "query-all-contacts");
+
+ feed = gdata_contacts_service_query_contacts (GDATA_CONTACTS_SERVICE (service), NULL, NULL, NULL, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_FEED (feed));
+ g_clear_error (&error);
+
+ /* TODO: check entries, kinds and feed properties */
+
+ g_object_unref (feed);
+
+ uhm_server_end_trace (mock_server);
+}
+
+GDATA_ASYNC_CLOSURE_FUNCTIONS (query_all_contacts, QueryAllContactsData);
+
+GDATA_ASYNC_TEST_FUNCTIONS (query_all_contacts, QueryAllContactsData,
+G_STMT_START {
+ gdata_contacts_service_query_contacts_async (GDATA_CONTACTS_SERVICE (service), NULL, cancellable, NULL,
+ NULL, NULL, async_ready_callback, async_data);
+} G_STMT_END,
+G_STMT_START {
+ GDataFeed *feed;
+
+ feed = gdata_service_query_finish (GDATA_SERVICE (obj), async_result, &error);
+
+ if (error == NULL) {
+ g_assert (GDATA_IS_FEED (feed));
+ /* TODO: Tests? */
+
+ g_object_unref (feed);
+ } else {
+ g_assert (feed == NULL);
+ }
+} G_STMT_END);
+
+static void
+test_query_all_contacts_async_progress_closure (QueryAllContactsData *query_data, gconstpointer service)
+{
+ GDataAsyncProgressClosure *data = g_slice_new0 (GDataAsyncProgressClosure);
+
+ gdata_test_mock_server_start_trace (mock_server, "query-all-contacts-async-progress-closure");
+
+ data->main_loop = g_main_loop_new (NULL, TRUE);
+
+ gdata_contacts_service_query_contacts_async (GDATA_CONTACTS_SERVICE (service), NULL, NULL,
+ (GDataQueryProgressCallback) gdata_test_async_progress_callback,
+ data, (GDestroyNotify) gdata_test_async_progress_closure_free,
+ (GAsyncReadyCallback) gdata_test_async_progress_finish_callback, data);
+ g_main_loop_run (data->main_loop);
+ g_main_loop_unref (data->main_loop);
+
+ /* Check that both callbacks were called exactly once */
+ g_assert_cmpuint (data->progress_destroy_notify_count, ==, 1);
+ g_assert_cmpuint (data->async_ready_notify_count, ==, 1);
+
+ g_slice_free (GDataAsyncProgressClosure, data);
+
+ uhm_server_end_trace (mock_server);
+}
+
+typedef struct {
+ GDataContactsContact *new_contact;
+} InsertData;
+
+static void
+set_up_insert (InsertData *data, gconstpointer service)
+{
+ data->new_contact = NULL;
+}
+
+static void
+tear_down_insert (InsertData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "teardown-insert");
+
+ /* Delete the new contact */
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_contacts_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->new_contact), NULL, NULL) == TRUE);
+
+ g_object_unref (data->new_contact);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_contact_insert (InsertData *data, gconstpointer service)
+{
+ GDataContactsContact *contact, *new_contact;
+ GDataGDName *name, *name2;
+ GDataGDEmailAddress *email_address1, *email_address2;
+ GDataGDPhoneNumber *phone_number1, *phone_number2;
+ GDataGDIMAddress *im_address;
+ GDataGDOrganization *org;
+ GDataGDPostalAddress *postal_address;
+ GDataGContactJot *jot;
+ GDataGContactRelation *relation;
+ GDataGContactWebsite *website;
+ GDataGContactEvent *event;
+ GDataGContactCalendar *calendar;
+ GDataGContactExternalID *external_id;
+ GDataGContactLanguage *language;
+ GList *list;
+ GDate date;
+ GHashTable *properties;
+ GTimeVal current_time;
+ gint64 edited, creation_time;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "contact-insert");
+
+ contact = gdata_contacts_contact_new (NULL);
+ g_get_current_time (¤t_time);
+
+ /* Check the kind is present and correct */
+ g_assert (GDATA_IS_CONTACTS_CONTACT (contact));
+ gdata_test_compare_kind (GDATA_ENTRY (contact), "http://schemas.google.com/contact/2008#contact", NULL);
+
+ /* Set and check the name (to check if the title of the entry is updated) */
+ gdata_entry_set_title (GDATA_ENTRY (contact), "Elizabeth Bennet");
+ name = gdata_contacts_contact_get_name (contact);
+ gdata_gd_name_set_full_name (name, "Lizzie Bennet");
+
+ name2 = gdata_gd_name_new ("John", "Smith");
+ gdata_gd_name_set_full_name (name2, "John Smith");
+ gdata_contacts_contact_set_name (contact, name2);
+ g_object_unref (name2);
+
+ gdata_contacts_contact_set_nickname (contact, "Big J");
+ gdata_contacts_contact_set_file_as (contact, "J, Big");
+ g_date_set_dmy (&date, 1, 1, 1900);
+ gdata_contacts_contact_set_birthday (contact, &date, FALSE);
+ gdata_entry_set_content (GDATA_ENTRY (contact), "Notes");
+ gdata_contacts_contact_set_billing_information (contact, "Big J Enterprises, Ltd.");
+ gdata_contacts_contact_set_directory_server (contact, "This is a server");
+ gdata_contacts_contact_set_gender (contact, GDATA_CONTACTS_GENDER_MALE);
+ gdata_contacts_contact_set_initials (contact, "A. B. C.");
+ gdata_contacts_contact_set_maiden_name (contact, "Smith");
+ gdata_contacts_contact_set_mileage (contact, "12km");
+ gdata_contacts_contact_set_occupation (contact, "Professional bum");
+ gdata_contacts_contact_set_priority (contact, GDATA_CONTACTS_PRIORITY_HIGH);
+ gdata_contacts_contact_set_sensitivity (contact, GDATA_CONTACTS_SENSITIVITY_PERSONAL);
+ gdata_contacts_contact_set_short_name (contact, "Jon");
+ gdata_contacts_contact_set_subject (contact, "Charity work");
+
+ email_address1 = gdata_gd_email_address_new ("liz@gmail.com", GDATA_GD_EMAIL_ADDRESS_WORK, NULL, FALSE);
+ gdata_contacts_contact_add_email_address (contact, email_address1);
+ g_object_unref (email_address1);
+
+ email_address2 = gdata_gd_email_address_new ("liz@example.org", GDATA_GD_EMAIL_ADDRESS_HOME, NULL, FALSE);
+ gdata_contacts_contact_add_email_address (contact, email_address2);
+ g_object_unref (email_address2);
+
+ phone_number1 = gdata_gd_phone_number_new ("(206)555-1212", GDATA_GD_PHONE_NUMBER_WORK, NULL, NULL, TRUE);
+ gdata_contacts_contact_add_phone_number (contact, phone_number1);
+ g_object_unref (phone_number1);
+
+ phone_number2 = gdata_gd_phone_number_new ("(206)555-1213", GDATA_GD_PHONE_NUMBER_HOME, NULL, NULL, FALSE);
+ gdata_contacts_contact_add_phone_number (contact, phone_number2);
+ g_object_unref (phone_number2);
+
+ im_address = gdata_gd_im_address_new ("liz@gmail.com", GDATA_GD_IM_PROTOCOL_GOOGLE_TALK, GDATA_GD_IM_ADDRESS_HOME, NULL, FALSE);
+ gdata_contacts_contact_add_im_address (contact, im_address);
+ g_object_unref (im_address);
+
+ postal_address = gdata_gd_postal_address_new (GDATA_GD_POSTAL_ADDRESS_WORK, NULL, TRUE);
+ gdata_gd_postal_address_set_street (postal_address, "1600 Amphitheatre Pkwy Mountain View");
+ gdata_contacts_contact_add_postal_address (contact, postal_address);
+ g_object_unref (postal_address);
+
+ org = gdata_gd_organization_new ("OrgCorp", "President", GDATA_GD_ORGANIZATION_WORK, NULL, FALSE);
+ gdata_contacts_contact_add_organization (contact, org);
+ g_object_unref (org);
+
+ jot = gdata_gcontact_jot_new ("This is a jot.", GDATA_GCONTACT_JOT_OTHER);
+ gdata_contacts_contact_add_jot (contact, jot);
+ g_object_unref (jot);
+
+ relation = gdata_gcontact_relation_new ("Brian Haddock", GDATA_GCONTACT_RELATION_FRIEND, NULL);
+ gdata_contacts_contact_add_relation (contact, relation);
+ g_object_unref (relation);
+
+ website = gdata_gcontact_website_new ("http://example.com/", GDATA_GCONTACT_WEBSITE_PROFILE, NULL, TRUE);
+ gdata_contacts_contact_add_website (contact, website);
+ g_object_unref (website);
+
+ event = gdata_gcontact_event_new (&date, GDATA_GCONTACT_EVENT_ANNIVERSARY, NULL);
+ gdata_contacts_contact_add_event (contact, event);
+ g_object_unref (event);
+
+ calendar = gdata_gcontact_calendar_new ("http://calendar.example.com/", GDATA_GCONTACT_CALENDAR_HOME, NULL, TRUE);
+ gdata_contacts_contact_add_calendar (contact, calendar);
+ g_object_unref (calendar);
+
+ external_id = gdata_gcontact_external_id_new ("Number Six", GDATA_GCONTACT_EXTERNAL_ID_ORGANIZATION, NULL);
+ gdata_contacts_contact_add_external_id (contact, external_id);
+ g_object_unref (external_id);
+
+ gdata_contacts_contact_add_hobby (contact, "Rowing");
+
+ language = gdata_gcontact_language_new ("en-GB", NULL);
+ gdata_contacts_contact_add_language (contact, language);
+ g_object_unref (language);
+
+ /* Add some extended properties */
+ g_assert (gdata_contacts_contact_set_extended_property (contact, "TITLE", NULL) == TRUE);
+ g_assert (gdata_contacts_contact_set_extended_property (contact, "ROLE", "") == TRUE);
+ g_assert (gdata_contacts_contact_set_extended_property (contact, "CALURI", "http://example.com/") == TRUE);
+
+ /* Add some user-defined fields */
+ gdata_contacts_contact_set_user_defined_field (contact, "Favourite colour", "Blue");
+ gdata_contacts_contact_set_user_defined_field (contact, "Owes me", "£10");
+ gdata_contacts_contact_set_user_defined_field (contact, "My notes", "");
+ gdata_contacts_contact_set_user_defined_field (contact, "", "Foo"); /* bgo#648058 */
+
+ /* Insert the contact */
+ new_contact = data->new_contact = gdata_contacts_service_insert_contact (GDATA_CONTACTS_SERVICE (service), contact, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_CONTACTS_CONTACT (new_contact));
+ gdata_test_compare_kind (GDATA_ENTRY (new_contact), "http://schemas.google.com/contact/2008#contact", NULL);
+ g_clear_error (&error);
+
+ /* Check its edited date. Yes, we have to allow the edited time to possibly precede the creation time because Google's
+ * servers can allow this to happen. Somehow.
+ * This check isn't run when testing against a mock server because the dates in the trace file may be waaaay out of date. */
+ edited = gdata_contacts_contact_get_edited (contact);
+ if (uhm_server_get_enable_online (mock_server) == TRUE) {
+ creation_time = gdata_contacts_contact_get_edited (new_contact);
+ g_assert_cmpint (creation_time + TIME_FUZZINESS, >=, edited);
+ g_assert_cmpint (creation_time - TIME_FUZZINESS, <=, edited);
+ }
+
+ /* Various properties */
+ g_assert_cmpstr (gdata_contacts_contact_get_nickname (new_contact), ==, "Big J");
+ g_assert_cmpstr (gdata_contacts_contact_get_file_as (new_contact), ==, "J, Big");
+ g_assert (gdata_contacts_contact_get_birthday (new_contact, &date) == FALSE);
+ g_assert (g_date_valid (&date) == TRUE);
+ g_assert_cmpuint (g_date_get_month (&date), ==, 1);
+ g_assert_cmpuint (g_date_get_day (&date), ==, 1);
+ g_assert_cmpstr (gdata_contacts_contact_get_billing_information (new_contact), ==, "Big J Enterprises, Ltd.");
+ g_assert_cmpstr (gdata_contacts_contact_get_directory_server (new_contact), ==, "This is a server");
+ g_assert_cmpstr (gdata_contacts_contact_get_gender (new_contact), ==, GDATA_CONTACTS_GENDER_MALE);
+ g_assert_cmpstr (gdata_contacts_contact_get_initials (new_contact), ==, "A. B. C.");
+ g_assert_cmpstr (gdata_contacts_contact_get_maiden_name (new_contact), ==, "Smith");
+ g_assert_cmpstr (gdata_contacts_contact_get_mileage (new_contact), ==, "12km");
+ g_assert_cmpstr (gdata_contacts_contact_get_occupation (new_contact), ==, "Professional bum");
+ /* FIXME: https://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=3662
+ * g_assert_cmpstr (gdata_contacts_contact_get_priority (new_contact), ==, GDATA_CONTACTS_PRIORITY_HIGH);
+ * g_assert_cmpstr (gdata_contacts_contact_get_sensitivity (new_contact), ==, GDATA_CONTACTS_SENSITIVITY_PERSONAL); */
+ g_assert_cmpstr (gdata_contacts_contact_get_short_name (new_contact), ==, "Jon");
+ g_assert_cmpstr (gdata_contacts_contact_get_subject (new_contact), ==, "Charity work");
+
+ /* E-mail addresses */
+ list = gdata_contacts_contact_get_email_addresses (new_contact);
+ g_assert_cmpuint (g_list_length (list), ==, 2);
+ g_assert (GDATA_IS_GD_EMAIL_ADDRESS (list->data));
+
+ g_assert (gdata_contacts_contact_get_primary_email_address (new_contact) == NULL);
+
+ /* IM addresses */
+ list = gdata_contacts_contact_get_im_addresses (new_contact);
+ g_assert_cmpuint (g_list_length (list), ==, 1);
+ g_assert (GDATA_IS_GD_IM_ADDRESS (list->data));
+
+ g_assert (gdata_contacts_contact_get_primary_im_address (new_contact) == NULL);
+
+ /* Phone numbers */
+ list = gdata_contacts_contact_get_phone_numbers (new_contact);
+ g_assert_cmpuint (g_list_length (list), ==, 2);
+ g_assert (GDATA_IS_GD_PHONE_NUMBER (list->data));
+
+ g_assert (GDATA_IS_GD_PHONE_NUMBER (gdata_contacts_contact_get_primary_phone_number (new_contact)));
+
+ /* Postal addresses */
+ list = gdata_contacts_contact_get_postal_addresses (new_contact);
+ g_assert_cmpuint (g_list_length (list), ==, 1);
+ g_assert (GDATA_IS_GD_POSTAL_ADDRESS (list->data));
+
+ g_assert (GDATA_IS_GD_POSTAL_ADDRESS (gdata_contacts_contact_get_primary_postal_address (new_contact)));
+
+ /* Organizations */
+ list = gdata_contacts_contact_get_organizations (new_contact);
+ g_assert_cmpuint (g_list_length (list), ==, 1);
+ g_assert (GDATA_IS_GD_ORGANIZATION (list->data));
+
+ g_assert (gdata_contacts_contact_get_primary_organization (new_contact) == NULL);
+
+ /* Jots */
+ list = gdata_contacts_contact_get_jots (new_contact);
+ g_assert_cmpuint (g_list_length (list), ==, 1);
+ g_assert (GDATA_IS_GCONTACT_JOT (list->data));
+
+ /* Relations */
+ list = gdata_contacts_contact_get_relations (new_contact);
+ g_assert_cmpuint (g_list_length (list), ==, 1);
+ g_assert (GDATA_IS_GCONTACT_RELATION (list->data));
+
+ /* Websites */
+ list = gdata_contacts_contact_get_websites (new_contact);
+ g_assert_cmpuint (g_list_length (list), ==, 1);
+ g_assert (GDATA_IS_GCONTACT_WEBSITE (list->data));
+
+ g_assert (GDATA_IS_GCONTACT_WEBSITE (gdata_contacts_contact_get_primary_website (new_contact)));
+
+ /* Events */
+ list = gdata_contacts_contact_get_events (new_contact);
+ g_assert_cmpuint (g_list_length (list), ==, 1);
+ g_assert (GDATA_IS_GCONTACT_EVENT (list->data));
+
+ /* Calendars */
+ list = gdata_contacts_contact_get_calendars (new_contact);
+ g_assert_cmpuint (g_list_length (list), ==, 1);
+ g_assert (GDATA_IS_GCONTACT_CALENDAR (list->data));
+
+ g_assert (GDATA_IS_GCONTACT_CALENDAR (gdata_contacts_contact_get_primary_calendar (new_contact)));
+
+ /* External IDs */
+ list = gdata_contacts_contact_get_external_ids (new_contact);
+ g_assert_cmpuint (g_list_length (list), ==, 1);
+ g_assert (GDATA_IS_GCONTACT_EXTERNAL_ID (list->data));
+
+ /* Languages */
+ list = gdata_contacts_contact_get_languages (new_contact);
+ g_assert_cmpuint (g_list_length (list), ==, 1);
+ g_assert (GDATA_IS_GCONTACT_LANGUAGE (list->data));
+
+ /* Hobbies */
+ list = gdata_contacts_contact_get_hobbies (new_contact);
+ g_assert_cmpuint (g_list_length (list), ==, 1);
+ g_assert_cmpstr (list->data, ==, "Rowing");
+
+ /* Extended properties */
+ g_assert_cmpstr (gdata_contacts_contact_get_extended_property (new_contact, "CALURI"), ==, "http://example.com/");
+ g_assert (gdata_contacts_contact_get_extended_property (new_contact, "non-existent") == NULL);
+
+ properties = gdata_contacts_contact_get_extended_properties (new_contact);
+ g_assert (properties != NULL);
+ g_assert_cmpuint (g_hash_table_size (properties), ==, 1);
+
+ /* User-defined fields */
+ g_assert_cmpstr (gdata_contacts_contact_get_user_defined_field (new_contact, "Favourite colour"), ==, "Blue");
+ g_assert_cmpstr (gdata_contacts_contact_get_user_defined_field (new_contact, "Owes me"), ==, "£10");
+ g_assert_cmpstr (gdata_contacts_contact_get_user_defined_field (new_contact, "My notes"), ==, "");
+ g_assert_cmpstr (gdata_contacts_contact_get_user_defined_field (new_contact, ""), ==, "Foo");
+
+ properties = gdata_contacts_contact_get_user_defined_fields (new_contact);
+ g_assert (properties != NULL);
+ g_assert_cmpuint (g_hash_table_size (properties), ==, 4);
+
+ /* Groups */
+ list = gdata_contacts_contact_get_groups (new_contact);
+ g_assert (list == NULL);
+
+ /* Deleted? */
+ g_assert (gdata_contacts_contact_is_deleted (new_contact) == FALSE);
+
+ /* TODO: check entries and feed properties */
+
+ g_object_unref (contact);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_contact_update (TempContactData *data, gconstpointer service)
+{
+ GDataContactsContact *new_contact;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "contact-update");
+
+ /* Update the contact's name and add an extended property */
+ gdata_entry_set_title (GDATA_ENTRY (data->contact), "John Wilson");
+ g_assert (gdata_contacts_contact_set_extended_property (data->contact, "contact-test", "value"));
+
+ /* Update the contact */
+ new_contact = GDATA_CONTACTS_CONTACT (gdata_service_update_entry (GDATA_SERVICE (service),
+ gdata_contacts_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->contact), NULL, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_CONTACTS_CONTACT (new_contact));
+ gdata_test_compare_kind (GDATA_ENTRY (new_contact), "http://schemas.google.com/contact/2008#contact", NULL);
+ g_clear_error (&error);
+
+ /* Check a few properties */
+ g_assert_cmpstr (gdata_entry_get_title (GDATA_ENTRY (new_contact)), ==, "John Wilson");
+ g_assert_cmpstr (gdata_contacts_contact_get_extended_property (new_contact, "contact-test"), ==, "value");
+ g_assert (gdata_contacts_contact_is_deleted (new_contact) == FALSE);
+
+ g_object_unref (new_contact);
+
+ uhm_server_end_trace (mock_server);
+}
+
+typedef struct {
+ GDataContactsGroup *group1;
+ GDataContactsGroup *group2;
+ GDataContactsGroup *group3;
+} QueryAllGroupsData;
+
+static void
+set_up_query_all_groups (QueryAllGroupsData *data, gconstpointer service)
+{
+ GDataContactsGroup *group;
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-query-all-groups");
+
+ group = gdata_contacts_group_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (group), "Test Group 1");
+ data->group1 = gdata_contacts_service_insert_group (GDATA_CONTACTS_SERVICE (service), group, NULL, NULL);
+ g_assert (GDATA_IS_CONTACTS_GROUP (data->group1));
+ g_object_unref (group);
+
+ group = gdata_contacts_group_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (group), "Test Group 2");
+ data->group2 = gdata_contacts_service_insert_group (GDATA_CONTACTS_SERVICE (service), group, NULL, NULL);
+ g_assert (GDATA_IS_CONTACTS_GROUP (data->group2));
+ g_object_unref (group);
+
+ group = gdata_contacts_group_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (group), "Test Group 3");
+ data->group3 = gdata_contacts_service_insert_group (GDATA_CONTACTS_SERVICE (service), group, NULL, NULL);
+ g_assert (GDATA_IS_CONTACTS_GROUP (data->group3));
+ g_object_unref (group);
+
+ uhm_server_end_trace (mock_server);
+
+ /* HACK! Guess what? Distributed system inconsistency strikes again! */
+ if (uhm_server_get_enable_online (mock_server) == TRUE) {
+ sleep (10);
+ }
+}
+
+static void
+tear_down_query_all_groups (QueryAllGroupsData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "teardown-query-all-groups");
+
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_contacts_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->group1), NULL, NULL) == TRUE);
+ g_object_unref (data->group1);
+
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_contacts_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->group2), NULL, NULL) == TRUE);
+ g_object_unref (data->group2);
+
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_contacts_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->group3), NULL, NULL) == TRUE);
+ g_object_unref (data->group3);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_query_all_groups (QueryAllGroupsData *data, gconstpointer service)
+{
+ GDataFeed *feed;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "query-all-groups");
+
+ feed = gdata_contacts_service_query_groups (GDATA_CONTACTS_SERVICE (service), NULL, NULL, NULL, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_FEED (feed));
+ g_clear_error (&error);
+
+ /* TODO: check entries, kinds and feed properties */
+
+ g_object_unref (feed);
+
+ uhm_server_end_trace (mock_server);
+}
+
+GDATA_ASYNC_CLOSURE_FUNCTIONS (query_all_groups, QueryAllGroupsData);
+
+GDATA_ASYNC_TEST_FUNCTIONS (query_all_groups, QueryAllGroupsData,
+G_STMT_START {
+ gdata_contacts_service_query_groups_async (GDATA_CONTACTS_SERVICE (service), NULL, cancellable, NULL, NULL, NULL,
+ async_ready_callback, async_data);
+} G_STMT_END,
+G_STMT_START {
+ GDataFeed *feed;
+
+ feed = gdata_service_query_finish (GDATA_SERVICE (obj), async_result, &error);
+
+ if (error == NULL) {
+ g_assert (GDATA_IS_FEED (feed));
+ /* TODO: Tests? */
+
+ g_object_unref (feed);
+ } else {
+ g_assert (feed == NULL);
+ }
+} G_STMT_END);
+
+static void
+test_query_all_groups_async_progress_closure (QueryAllGroupsData *query_data, gconstpointer service)
+{
+ GDataAsyncProgressClosure *data = g_slice_new0 (GDataAsyncProgressClosure);
+
+ gdata_test_mock_server_start_trace (mock_server, "query-all-groups-async-progress-closure");
+
+ data->main_loop = g_main_loop_new (NULL, TRUE);
+
+ gdata_contacts_service_query_groups_async (GDATA_CONTACTS_SERVICE (service), NULL, NULL,
+ (GDataQueryProgressCallback) gdata_test_async_progress_callback,
+ data, (GDestroyNotify) gdata_test_async_progress_closure_free,
+ (GAsyncReadyCallback) gdata_test_async_progress_finish_callback, data);
+
+ g_main_loop_run (data->main_loop);
+ g_main_loop_unref (data->main_loop);
+
+ /* Check that both callbacks were called exactly once */
+ g_assert_cmpuint (data->progress_destroy_notify_count, ==, 1);
+ g_assert_cmpuint (data->async_ready_notify_count, ==, 1);
+
+ g_slice_free (GDataAsyncProgressClosure, data);
+
+ uhm_server_end_trace (mock_server);
+}
+
+typedef struct {
+ GDataContactsGroup *new_group;
+} InsertGroupData;
+
+static void
+set_up_insert_group (InsertGroupData *data, gconstpointer service)
+{
+ data->new_group = NULL;
+}
+
+static void
+tear_down_insert_group (InsertGroupData *data, gconstpointer service)
+{
+ /* HACK! Distributed systems suck. */
+ if (uhm_server_get_enable_online (mock_server) == TRUE) {
+ sleep (10);
+ }
+
+ gdata_test_mock_server_start_trace (mock_server, "teardown-insert-group");
+
+ /* Delete the group, just to be tidy */
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_contacts_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->new_group), NULL, NULL) == TRUE);
+ g_object_unref (data->new_group);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_group_insert (InsertGroupData *data, gconstpointer service)
+{
+ GDataContactsGroup *group, *new_group;
+ GTimeVal time_val;
+ GHashTable *properties;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "group-insert");
+
+ g_get_current_time (&time_val);
+
+ group = gdata_contacts_group_new (NULL);
+
+ /* Check the kind is present and correct */
+ g_assert (GDATA_IS_CONTACTS_GROUP (group));
+ gdata_test_compare_kind (GDATA_ENTRY (group), "http://schemas.google.com/contact/2008#group", NULL);
+
+ /* Set various properties */
+ gdata_entry_set_title (GDATA_ENTRY (group), "New Group!");
+ g_assert (gdata_contacts_group_set_extended_property (group, "foobar", "barfoo") == TRUE);
+
+ /* Insert the group */
+ new_group = data->new_group = gdata_contacts_service_insert_group (GDATA_CONTACTS_SERVICE (service), group, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_CONTACTS_GROUP (new_group));
+ gdata_test_compare_kind (GDATA_ENTRY (new_group), "http://schemas.google.com/contact/2008#group", NULL);
+ g_clear_error (&error);
+
+ /* Check the properties. Time-based properties can't be checked when running against a mock server, since
+ * the trace files may be quite old. */
+ if (uhm_server_get_enable_online (mock_server) == TRUE) {
+ g_assert_cmpint (gdata_contacts_group_get_edited (new_group), >=, time_val.tv_sec);
+ }
+ g_assert (gdata_contacts_group_is_deleted (new_group) == FALSE);
+ g_assert (gdata_contacts_group_get_system_group_id (new_group) == NULL);
+
+ properties = gdata_contacts_group_get_extended_properties (new_group);
+ g_assert (properties != NULL);
+ g_assert_cmpint (g_hash_table_size (properties), ==, 1);
+ g_assert_cmpstr (gdata_contacts_group_get_extended_property (new_group, "foobar"), ==, "barfoo");
+
+ g_object_unref (group);
+
+ uhm_server_end_trace (mock_server);
+}
+
+GDATA_ASYNC_CLOSURE_FUNCTIONS (insert_group, InsertGroupData);
+
+GDATA_ASYNC_TEST_FUNCTIONS (group_insert, InsertGroupData,
+G_STMT_START {
+ GDataContactsGroup *group;
+
+ group = gdata_contacts_group_new (NULL);
+
+ /* Check the kind is present and correct */
+ g_assert (GDATA_IS_CONTACTS_GROUP (group));
+ gdata_test_compare_kind (GDATA_ENTRY (group), "http://schemas.google.com/contact/2008#group", NULL);
+
+ /* Set various properties */
+ gdata_entry_set_title (GDATA_ENTRY (group), "New Group!");
+ g_assert (gdata_contacts_group_set_extended_property (group, "foobar", "barfoo") == TRUE);
+
+ gdata_contacts_service_insert_group_async (GDATA_CONTACTS_SERVICE (service), group, cancellable, async_ready_callback, async_data);
+
+ g_object_unref (group);
+} G_STMT_END,
+G_STMT_START {
+ GDataEntry *entry;
+
+ entry = gdata_service_insert_entry_finish (GDATA_SERVICE (obj), async_result, &error);
+
+ if (error == NULL) {
+ g_assert (GDATA_IS_CONTACTS_GROUP (entry));
+ /* TODO: Tests? */
+
+ data->new_group = GDATA_CONTACTS_GROUP (entry);
+ } else {
+ g_assert (entry == NULL);
+ }
+} G_STMT_END);
+
+static void
+test_contact_properties (void)
+{
+ GDataContactsContact *contact;
+ GDataGDName *name, *name2;
+ GDataGDEmailAddress *email_address1, *email_address2;
+ GDataGDPhoneNumber *phone_number1, *phone_number2;
+ GDataGDIMAddress *im_address;
+ GDataGDOrganization *org;
+ GDataGDPostalAddress *postal_address;
+ GDataGContactJot *jot;
+ GDataGContactRelation *relation;
+ GDataGContactWebsite *website;
+ GDataGContactEvent *event;
+ GDataGContactCalendar *calendar;
+ GDataGContactExternalID *external_id;
+ GDataGContactLanguage *language;
+ gchar *nickname, *file_as, *billing_information, *directory_server, *gender, *initials, *maiden_name, *mileage, *occupation;
+ gchar *priority, *sensitivity, *short_name, *subject, *photo_etag;
+ GDate date, *date2;
+ GTimeVal current_time;
+ gint64 edited;
+ gboolean deleted, birthday_has_year;
+
+ contact = gdata_contacts_contact_new (NULL);
+ g_get_current_time (¤t_time);
+
+ /* Check the kind is present and correct */
+ g_assert (GDATA_IS_CONTACTS_CONTACT (contact));
+ gdata_test_compare_kind (GDATA_ENTRY (contact), "http://schemas.google.com/contact/2008#contact", NULL);
+
+ /* Set and check the name (to check if the title of the entry is updated) */
+ gdata_entry_set_title (GDATA_ENTRY (contact), "Elizabeth Bennet");
+ name = gdata_contacts_contact_get_name (contact);
+ g_assert_cmpstr (gdata_gd_name_get_full_name (name), ==, "Elizabeth Bennet");
+ gdata_gd_name_set_full_name (name, "Lizzie Bennet");
+ g_assert_cmpstr (gdata_entry_get_title (GDATA_ENTRY (contact)), ==, "Lizzie Bennet");
+
+ name2 = gdata_gd_name_new ("John", "Smith");
+ gdata_gd_name_set_full_name (name2, "John Smith");
+ gdata_contacts_contact_set_name (contact, name2);
+ g_object_unref (name2);
+ g_assert_cmpstr (gdata_entry_get_title (GDATA_ENTRY (contact)), ==, "John Smith");
+
+ gdata_contacts_contact_set_nickname (contact, "Big J");
+ gdata_contacts_contact_set_file_as (contact, "J, Big");
+ g_date_set_dmy (&date, 1, 1, 1900);
+ gdata_contacts_contact_set_birthday (contact, &date, FALSE);
+ gdata_entry_set_content (GDATA_ENTRY (contact), "Notes");
+ gdata_contacts_contact_set_billing_information (contact, "Big J Enterprises, Ltd.");
+ gdata_contacts_contact_set_directory_server (contact, "This is a server");
+ gdata_contacts_contact_set_gender (contact, GDATA_CONTACTS_GENDER_MALE);
+ gdata_contacts_contact_set_initials (contact, "A. B. C.");
+ gdata_contacts_contact_set_maiden_name (contact, "Smith");
+ gdata_contacts_contact_set_mileage (contact, "12km");
+ gdata_contacts_contact_set_occupation (contact, "Professional bum");
+ gdata_contacts_contact_set_priority (contact, GDATA_CONTACTS_PRIORITY_HIGH);
+ gdata_contacts_contact_set_sensitivity (contact, GDATA_CONTACTS_SENSITIVITY_PERSONAL);
+ gdata_contacts_contact_set_short_name (contact, "Jon");
+ gdata_contacts_contact_set_subject (contact, "Charity work");
+
+ email_address1 = gdata_gd_email_address_new ("liz@gmail.com", GDATA_GD_EMAIL_ADDRESS_WORK, NULL, FALSE);
+ gdata_contacts_contact_add_email_address (contact, email_address1);
+ g_object_unref (email_address1);
+
+ email_address2 = gdata_gd_email_address_new ("liz@example.org", GDATA_GD_EMAIL_ADDRESS_HOME, NULL, FALSE);
+ gdata_contacts_contact_add_email_address (contact, email_address2);
+ g_object_unref (email_address2);
+
+ phone_number1 = gdata_gd_phone_number_new ("(206)555-1212", GDATA_GD_PHONE_NUMBER_WORK, NULL, NULL, TRUE);
+ gdata_contacts_contact_add_phone_number (contact, phone_number1);
+ g_object_unref (phone_number1);
+
+ phone_number2 = gdata_gd_phone_number_new ("(206)555-1213", GDATA_GD_PHONE_NUMBER_HOME, NULL, NULL, FALSE);
+ gdata_contacts_contact_add_phone_number (contact, phone_number2);
+ g_object_unref (phone_number2);
+
+ im_address = gdata_gd_im_address_new ("liz@gmail.com", GDATA_GD_IM_PROTOCOL_GOOGLE_TALK, GDATA_GD_IM_ADDRESS_HOME, NULL, FALSE);
+ gdata_contacts_contact_add_im_address (contact, im_address);
+ g_object_unref (im_address);
+
+ postal_address = gdata_gd_postal_address_new (GDATA_GD_POSTAL_ADDRESS_WORK, NULL, TRUE);
+ gdata_gd_postal_address_set_street (postal_address, "1600 Amphitheatre Pkwy Mountain View");
+ gdata_contacts_contact_add_postal_address (contact, postal_address);
+ g_object_unref (postal_address);
+
+ org = gdata_gd_organization_new ("OrgCorp", "President", GDATA_GD_ORGANIZATION_WORK, NULL, FALSE);
+ gdata_contacts_contact_add_organization (contact, org);
+ g_object_unref (org);
+
+ jot = gdata_gcontact_jot_new ("This is a jot.", GDATA_GCONTACT_JOT_OTHER);
+ gdata_contacts_contact_add_jot (contact, jot);
+ g_object_unref (jot);
+
+ relation = gdata_gcontact_relation_new ("Brian Haddock", GDATA_GCONTACT_RELATION_FRIEND, NULL);
+ gdata_contacts_contact_add_relation (contact, relation);
+ g_object_unref (relation);
+
+ website = gdata_gcontact_website_new ("http://example.com/", GDATA_GCONTACT_WEBSITE_PROFILE, NULL, TRUE);
+ gdata_contacts_contact_add_website (contact, website);
+ g_object_unref (website);
+
+ event = gdata_gcontact_event_new (&date, GDATA_GCONTACT_EVENT_ANNIVERSARY, NULL);
+ gdata_contacts_contact_add_event (contact, event);
+ g_object_unref (event);
+
+ calendar = gdata_gcontact_calendar_new ("http://calendar.example.com/", GDATA_GCONTACT_CALENDAR_HOME, NULL, TRUE);
+ gdata_contacts_contact_add_calendar (contact, calendar);
+ g_object_unref (calendar);
+
+ external_id = gdata_gcontact_external_id_new ("Number Six", GDATA_GCONTACT_EXTERNAL_ID_ORGANIZATION, NULL);
+ gdata_contacts_contact_add_external_id (contact, external_id);
+ g_object_unref (external_id);
+
+ gdata_contacts_contact_add_hobby (contact, "Rowing");
+
+ language = gdata_gcontact_language_new ("en-GB", NULL);
+ gdata_contacts_contact_add_language (contact, language);
+ g_object_unref (language);
+
+ /* Add some extended properties */
+ g_assert (gdata_contacts_contact_set_extended_property (contact, "TITLE", NULL) == TRUE);
+ g_assert (gdata_contacts_contact_set_extended_property (contact, "ROLE", "") == TRUE);
+ g_assert (gdata_contacts_contact_set_extended_property (contact, "CALURI", "http://example.com/") == TRUE);
+
+ /* Add some user-defined fields */
+ gdata_contacts_contact_set_user_defined_field (contact, "Favourite colour", "Blue");
+ gdata_contacts_contact_set_user_defined_field (contact, "Owes me", "£10");
+ gdata_contacts_contact_set_user_defined_field (contact, "My notes", "");
+ gdata_contacts_contact_set_user_defined_field (contact, "", "Foo"); /* bgo#648058 */
+
+ /* Check the properties of the object */
+ g_object_get (G_OBJECT (contact),
+ "edited", &edited,
+ "deleted", &deleted,
+ "photo-etag", &photo_etag,
+ "name", &name,
+ "nickname", &nickname,
+ "file-as", &file_as,
+ "birthday", &date2,
+ "birthday-has-year", &birthday_has_year,
+ "billing-information", &billing_information,
+ "directory-server", &directory_server,
+ "gender", &gender,
+ "initials", &initials,
+ "maiden-name", &maiden_name,
+ "mileage", &mileage,
+ "occupation", &occupation,
+ "priority", &priority,
+ "sensitivity", &sensitivity,
+ "short-name", &short_name,
+ "subject", &subject,
+ NULL);
+
+ g_assert_cmpint (edited, ==, current_time.tv_sec);
+ g_assert (deleted == FALSE);
+ g_assert (photo_etag == NULL);
+ g_assert (name2 == name);
+ g_assert_cmpstr (nickname, ==, "Big J");
+ g_assert_cmpstr (file_as, ==, "J, Big");
+ g_assert (g_date_valid (date2) == TRUE);
+ g_assert_cmpuint (g_date_get_month (date2), ==, 1);
+ g_assert_cmpuint (g_date_get_day (date2), ==, 1);
+ g_assert (birthday_has_year == FALSE);
+ g_assert_cmpstr (billing_information, ==, "Big J Enterprises, Ltd.");
+ g_assert_cmpstr (directory_server, ==, "This is a server");
+ g_assert_cmpstr (gender, ==, GDATA_CONTACTS_GENDER_MALE);
+ g_assert_cmpstr (initials, ==, "A. B. C.");
+ g_assert_cmpstr (maiden_name, ==, "Smith");
+ g_assert_cmpstr (mileage, ==, "12km");
+ g_assert_cmpstr (occupation, ==, "Professional bum");
+ g_assert_cmpstr (priority, ==, GDATA_CONTACTS_PRIORITY_HIGH);
+ g_assert_cmpstr (sensitivity, ==, GDATA_CONTACTS_SENSITIVITY_PERSONAL);
+ g_assert_cmpstr (short_name, ==, "Jon");
+ g_assert_cmpstr (subject, ==, "Charity work");
+
+ g_object_unref (name2);
+ g_free (date2);
+ g_free (nickname);
+ g_free (file_as);
+ g_free (billing_information);
+ g_free (directory_server);
+ g_free (gender);
+ g_free (initials);
+ g_free (maiden_name);
+ g_free (mileage);
+ g_free (occupation);
+ g_free (priority);
+ g_free (sensitivity);
+ g_free (short_name);
+ g_free (subject);
+ g_free (photo_etag);
+
+ /* Check the XML */
+ gdata_test_assert_xml (contact,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:app='http://www.w3.org/2007/app' "
+ "xmlns:gContact='http://schemas.google.com/contact/2008'>"
+ "<title type='text'>John Smith</title>"
+ "<content type='text'>Notes</content>"
+ "<category term='http://schemas.google.com/contact/2008#contact' scheme='http://schemas.google.com/g/2005#kind'/>"
+ "<gd:name>"
+ "<gd:givenName>John</gd:givenName>"
+ "<gd:familyName>Smith</gd:familyName>"
+ "<gd:fullName>John Smith</gd:fullName>"
+ "</gd:name>"
+ "<gd:email address='liz@gmail.com' rel='http://schemas.google.com/g/2005#work' primary='false'/>"
+ "<gd:email address='liz@example.org' rel='http://schemas.google.com/g/2005#home' primary='false'/>"
+ "<gd:im address='liz@gmail.com' protocol='http://schemas.google.com/g/2005#GOOGLE_TALK' "
+ "rel='http://schemas.google.com/g/2005#home' primary='false'/>"
+ "<gd:phoneNumber rel='http://schemas.google.com/g/2005#work' primary='true'>(206)555-1212</gd:phoneNumber>"
+ "<gd:phoneNumber rel='http://schemas.google.com/g/2005#home' primary='false'>(206)555-1213</gd:phoneNumber>"
+ "<gd:structuredPostalAddress rel='http://schemas.google.com/g/2005#work' primary='true'>"
+ "<gd:street>1600 Amphitheatre Pkwy Mountain View</gd:street>"
+ "</gd:structuredPostalAddress>"
+ "<gd:organization rel='http://schemas.google.com/g/2005#work' primary='false'>"
+ "<gd:orgName>OrgCorp</gd:orgName>"
+ "<gd:orgTitle>President</gd:orgTitle>"
+ "</gd:organization>"
+ "<gContact:jot rel='other'>This is a jot.</gContact:jot>"
+ "<gContact:relation rel='friend'>Brian Haddock</gContact:relation>"
+ "<gContact:website href='http://example.com/' rel='profile' primary='true'/>"
+ "<gContact:event rel='anniversary'><gd:when startTime='1900-01-01'/></gContact:event>"
+ "<gContact:calendarLink href='http://calendar.example.com/' rel='home' primary='true'/>"
+ "<gContact:externalId value='Number Six' rel='organization'/>"
+ "<gContact:language code='en-GB'/>"
+ "<gd:extendedProperty name='CALURI'>http://example.com/</gd:extendedProperty>"
+ "<gContact:userDefinedField key='Favourite colour' value='Blue'/>"
+ "<gContact:userDefinedField key='Owes me' value='£10'/>"
+ "<gContact:userDefinedField key='My notes' value=''/>"
+ "<gContact:userDefinedField key='' value='Foo'/>" /* bgo#648058 */
+ "<gContact:hobby>Rowing</gContact:hobby>"
+ "<gContact:nickname>Big J</gContact:nickname>"
+ "<gContact:fileAs>J, Big</gContact:fileAs>"
+ "<gContact:birthday when='--01-01'/>"
+ "<gContact:billingInformation>Big J Enterprises, Ltd.</gContact:billingInformation>"
+ "<gContact:directoryServer>This is a server</gContact:directoryServer>"
+ "<gContact:gender value='male'/>"
+ "<gContact:initials>A. B. C.</gContact:initials>"
+ "<gContact:maidenName>Smith</gContact:maidenName>"
+ "<gContact:mileage>12km</gContact:mileage>"
+ "<gContact:occupation>Professional bum</gContact:occupation>"
+ "<gContact:priority rel='high'/>"
+ "<gContact:sensitivity rel='personal'/>"
+ "<gContact:shortName>Jon</gContact:shortName>"
+ "<gContact:subject>Charity work</gContact:subject>"
+ "</entry>");
+
+ /* Try removing some things from the contact and ensure it works */
+ gdata_contacts_contact_remove_all_email_addresses (contact);
+ g_assert (gdata_contacts_contact_get_email_addresses (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_primary_email_address (contact) == NULL);
+
+ gdata_contacts_contact_remove_all_im_addresses (contact);
+ g_assert (gdata_contacts_contact_get_im_addresses (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_primary_im_address (contact) == NULL);
+
+ gdata_contacts_contact_remove_all_phone_numbers (contact);
+ g_assert (gdata_contacts_contact_get_phone_numbers (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_primary_phone_number (contact) == NULL);
+
+ gdata_contacts_contact_remove_all_postal_addresses (contact);
+ g_assert (gdata_contacts_contact_get_postal_addresses (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_primary_postal_address (contact) == NULL);
+
+ gdata_contacts_contact_remove_all_organizations (contact);
+ g_assert (gdata_contacts_contact_get_organizations (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_primary_organization (contact) == NULL);
+
+ gdata_contacts_contact_remove_all_jots (contact);
+ g_assert (gdata_contacts_contact_get_jots (contact) == NULL);
+
+ gdata_contacts_contact_remove_all_relations (contact);
+ g_assert (gdata_contacts_contact_get_relations (contact) == NULL);
+
+ gdata_contacts_contact_remove_all_websites (contact);
+ g_assert (gdata_contacts_contact_get_websites (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_primary_website (contact) == NULL);
+
+ gdata_contacts_contact_remove_all_events (contact);
+ g_assert (gdata_contacts_contact_get_events (contact) == NULL);
+
+ gdata_contacts_contact_remove_all_calendars (contact);
+ g_assert (gdata_contacts_contact_get_calendars (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_primary_calendar (contact) == NULL);
+
+ gdata_contacts_contact_remove_all_external_ids (contact);
+ g_assert (gdata_contacts_contact_get_external_ids (contact) == NULL);
+
+ gdata_contacts_contact_remove_all_languages (contact);
+ g_assert (gdata_contacts_contact_get_languages (contact) == NULL);
+
+ gdata_contacts_contact_remove_all_hobbies (contact);
+ g_assert (gdata_contacts_contact_get_hobbies (contact) == NULL);
+}
+
+static void
+test_contact_escaping (void)
+{
+ GDataContactsContact *contact;
+
+ contact = gdata_contacts_contact_new (NULL);
+ gdata_contacts_contact_set_nickname (contact, "Nickname & stuff");
+ gdata_contacts_contact_set_file_as (contact, "Stuff, & Nickname");
+ gdata_contacts_contact_set_billing_information (contact, "Billing information & stuff");
+ gdata_contacts_contact_set_directory_server (contact, "http://foo.com?foo&bar");
+ gdata_contacts_contact_set_gender (contact, "Misc. & other");
+ gdata_contacts_contact_set_initials (contact, "<AB>");
+ gdata_contacts_contact_set_maiden_name (contact, "Maiden & name");
+ gdata_contacts_contact_set_mileage (contact, "Over the hills & far away");
+ gdata_contacts_contact_set_occupation (contact, "Occupation & stuff");
+ gdata_contacts_contact_set_priority (contact, "http://foo.com?foo&priority=bar");
+ gdata_contacts_contact_set_sensitivity (contact, "http://foo.com?foo&sensitivity=bar");
+ gdata_contacts_contact_set_short_name (contact, "Short name & stuff");
+ gdata_contacts_contact_set_subject (contact, "Subject & stuff");
+ gdata_contacts_contact_add_hobby (contact, "Escaping &s");
+ gdata_contacts_contact_set_extended_property (contact, "extended & prop", "<unescaped>Value should be a pre-escaped XML blob.</unescaped>");
+ gdata_contacts_contact_set_user_defined_field (contact, "User defined field & stuff", "Value & stuff");
+ gdata_contacts_contact_add_group (contact, "http://foo.com?foo&bar");
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (contact,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:app='http://www.w3.org/2007/app' xmlns:gContact='http://schemas.google.com/contact/2008'>"
+ "<title type='text'></title>"
+ "<category term='http://schemas.google.com/contact/2008#contact' scheme='http://schemas.google.com/g/2005#kind'/>"
+ "<gd:name/>"
+ "<gd:extendedProperty name='extended & prop'>"
+ "<unescaped>Value should be a pre-escaped XML blob.</unescaped>"
+ "</gd:extendedProperty>"
+ "<gContact:userDefinedField key='User defined field & stuff' value='Value & stuff'/>"
+ "<gContact:groupMembershipInfo href='http://foo.com?foo&bar'/>"
+ "<gContact:hobby>Escaping &s</gContact:hobby>"
+ "<gContact:nickname>Nickname & stuff</gContact:nickname>"
+ "<gContact:fileAs>Stuff, & Nickname</gContact:fileAs>"
+ "<gContact:billingInformation>Billing information & stuff</gContact:billingInformation>"
+ "<gContact:directoryServer>http://foo.com?foo&bar</gContact:directoryServer>"
+ "<gContact:gender value='Misc. & other'/>"
+ "<gContact:initials><AB></gContact:initials>"
+ "<gContact:maidenName>Maiden & name</gContact:maidenName>"
+ "<gContact:mileage>Over the hills & far away</gContact:mileage>"
+ "<gContact:occupation>Occupation & stuff</gContact:occupation>"
+ "<gContact:priority rel='http://foo.com?foo&priority=bar'/>"
+ "<gContact:sensitivity rel='http://foo.com?foo&sensitivity=bar'/>"
+ "<gContact:shortName>Short name & stuff</gContact:shortName>"
+ "<gContact:subject>Subject & stuff</gContact:subject>"
+ "</entry>");
+ g_object_unref (contact);
+}
+
+static void
+test_group_escaping (void)
+{
+ GDataContactsGroup *group;
+
+ group = gdata_contacts_group_new (NULL);
+ gdata_contacts_group_set_extended_property (group, "extended & prop", "<unescaped>Value should be a pre-escaped XML blob.</unescaped>");
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (group,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:app='http://www.w3.org/2007/app' xmlns:gContact='http://schemas.google.com/contact/2008'>"
+ "<title type='text'></title>"
+ "<category term='http://schemas.google.com/contact/2008#group' scheme='http://schemas.google.com/g/2005#kind'/>"
+ "<gd:extendedProperty name='extended & prop'>"
+ "<unescaped>Value should be a pre-escaped XML blob.</unescaped>"
+ "</gd:extendedProperty>"
+ "</entry>");
+ g_object_unref (group);
+}
+
+static void
+test_query_uri (void)
+{
+ gchar *query_uri;
+ GDataContactsQuery *query = gdata_contacts_query_new ("q");
+
+ gdata_contacts_query_set_order_by (query, "lastmodified");
+ g_assert_cmpstr (gdata_contacts_query_get_order_by (query), ==, "lastmodified");
+
+ gdata_contacts_query_set_show_deleted (query, FALSE);
+ g_assert (gdata_contacts_query_show_deleted (query) == FALSE);
+
+ /* Test it with both values of show-deleted */
+ query_uri = gdata_query_get_query_uri (GDATA_QUERY (query), "http://example.com");
+ g_assert_cmpstr (query_uri, ==, "http://example.com?q=q&orderby=lastmodified&showdeleted=false");
+ g_free (query_uri);
+
+ gdata_contacts_query_set_show_deleted (query, TRUE);
+ g_assert (gdata_contacts_query_show_deleted (query) == TRUE);
+
+ gdata_contacts_query_set_sort_order (query, "descending");
+ g_assert_cmpstr (gdata_contacts_query_get_sort_order (query), ==, "descending");
+
+ gdata_contacts_query_set_group (query, "http://www.google.com/feeds/contacts/groups/jo@gmail.com/base/1234a");
+ g_assert_cmpstr (gdata_contacts_query_get_group (query), ==, "http://www.google.com/feeds/contacts/groups/jo@gmail.com/base/1234a");
+
+ /* Check the built query URI with a normal feed URI */
+ query_uri = gdata_query_get_query_uri (GDATA_QUERY (query), "http://example.com");
+ g_assert_cmpstr (query_uri, ==, "http://example.com?q=q&orderby=lastmodified&showdeleted=true&sortorder=descending"
+ "&group=http%3A%2F%2Fwww.google.com%2Ffeeds%2Fcontacts%2Fgroups%2Fjo%40gmail.com%2Fbase%2F1234a");
+ g_free (query_uri);
+
+ /* …with a feed URI with a trailing slash */
+ query_uri = gdata_query_get_query_uri (GDATA_QUERY (query), "http://example.com/");
+ g_assert_cmpstr (query_uri, ==, "http://example.com/?q=q&orderby=lastmodified&showdeleted=true&sortorder=descending"
+ "&group=http%3A%2F%2Fwww.google.com%2Ffeeds%2Fcontacts%2Fgroups%2Fjo%40gmail.com%2Fbase%2F1234a");
+ g_free (query_uri);
+
+ /* …with a feed URI with pre-existing arguments */
+ query_uri = gdata_query_get_query_uri (GDATA_QUERY (query), "http://example.com/bar/?test=test&this=that");
+ g_assert_cmpstr (query_uri, ==, "http://example.com/bar/?test=test&this=that&q=q&orderby=lastmodified&showdeleted=true&sortorder=descending"
+ "&group=http%3A%2F%2Fwww.google.com%2Ffeeds%2Fcontacts%2Fgroups%2Fjo%40gmail.com%2Fbase%2F1234a");
+ g_free (query_uri);
+
+ g_object_unref (query);
+}
+
+static void
+test_query_etag (void)
+{
+ GDataContactsQuery *query = gdata_contacts_query_new (NULL);
+
+ /* Test that setting any property will unset the ETag */
+ g_test_bug ("613529");
+
+#define CHECK_ETAG(C) \
+ gdata_query_set_etag (GDATA_QUERY (query), "foobar"); \
+ (C); \
+ g_assert (gdata_query_get_etag (GDATA_QUERY (query)) == NULL);
+
+ CHECK_ETAG (gdata_contacts_query_set_order_by (query, "foobar"))
+ CHECK_ETAG (gdata_contacts_query_set_show_deleted (query, FALSE))
+ CHECK_ETAG (gdata_contacts_query_set_sort_order (query, "shizzle"))
+ CHECK_ETAG (gdata_contacts_query_set_group (query, "support group"))
+
+#undef CHECK_ETAG
+
+ g_object_unref (query);
+}
+
+static void
+test_query_properties (void)
+{
+ gchar *order_by, *sort_order, *group;
+ gboolean show_deleted;
+ guint start_index, max_results;
+ GDataContactsQuery *query = gdata_contacts_query_new_with_limits ("q", 1, 10);
+
+ /* Set the properties */
+ g_object_set (G_OBJECT (query),
+ "order-by", "lastmodified",
+ "show-deleted", TRUE,
+ "sort-order", "descending",
+ "group", "http://www.google.com/feeds/contacts/groups/jo@gmail.com/base/1234a",
+ NULL);
+
+ /* Check the query's properties */
+ g_object_get (G_OBJECT (query),
+ "order-by", &order_by,
+ "show-deleted", &show_deleted,
+ "sort-order", &sort_order,
+ "group", &group,
+ "start-index", &start_index,
+ "max-results", &max_results,
+ NULL);
+
+ g_assert_cmpstr (order_by, ==, "lastmodified");
+ g_assert (show_deleted == TRUE);
+ g_assert_cmpstr (sort_order, ==, "descending");
+ g_assert_cmpstr (group, ==, "http://www.google.com/feeds/contacts/groups/jo@gmail.com/base/1234a");
+ g_assert_cmpuint (start_index, ==, 1);
+ g_assert_cmpuint (max_results, ==, 10);
+
+ g_free (order_by);
+ g_free (sort_order);
+ g_free (group);
+
+ g_object_unref (query);
+}
+
+static void
+test_contact_parser_minimal (void)
+{
+ GDataContactsContact *contact;
+ GDate birthday;
+ GError *error = NULL;
+
+ g_test_bug ("580330");
+
+ contact = GDATA_CONTACTS_CONTACT (gdata_parsable_new_from_xml (GDATA_TYPE_CONTACTS_CONTACT,
+ "<entry xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:gd='http://schemas.google.com/g/2005' "
+ "gd:etag='"QngzcDVSLyp7ImA9WxJTFkoITgU."'>"
+ "<id>http://www.google.com/m8/feeds/contacts/libgdata.test@googlemail.com/base/1b46cdd20bfbee3b</id>"
+ "<updated>2009-04-25T15:21:53.688Z</updated>"
+ "<app:edited xmlns:app='http://www.w3.org/2007/app'>2009-04-25T15:21:53.688Z</app:edited>"
+ "<category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#contact'/>"
+ "<title></title>" /* Here's where it all went wrong */
+ "<link rel='http://schemas.google.com/contacts/2008/rel#photo' type='image/*' "
+ "href='http://www.google.com/m8/feeds/photos/media/libgdata.test@googlemail.com/1b46cdd20bfbee3b'/>"
+ "<link rel='http://www.iana.org/assignments/relation/self' type='application/atom+xml' "
+ "href='http://www.google.com/m8/feeds/contacts/libgdata.test@googlemail.com/full/1b46cdd20bfbee3b'/>"
+ "<link rel='http://www.iana.org/assignments/relation/edit' type='application/atom+xml' "
+ "href='http://www.google.com/m8/feeds/contacts/libgdata.test@googlemail.com/full/1b46cdd20bfbee3b'/>"
+ "<gd:email rel='http://schemas.google.com/g/2005#other' address='bob@example.com'/>"
+ "</entry>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_CONTACTS_CONTACT (contact));
+ gdata_test_compare_kind (GDATA_ENTRY (contact), "http://schemas.google.com/contact/2008#contact", NULL);
+ g_clear_error (&error);
+
+ /* Check the contact's properties */
+ g_assert (gdata_entry_get_title (GDATA_ENTRY (contact)) != NULL);
+ g_assert (*gdata_entry_get_title (GDATA_ENTRY (contact)) == '\0');
+
+ /* TODO: Check the other properties */
+
+ g_assert (gdata_contacts_contact_get_nickname (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_file_as (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_birthday (contact, &birthday) == FALSE);
+ g_assert (g_date_valid (&birthday) == FALSE);
+ g_assert (gdata_contacts_contact_get_billing_information (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_directory_server (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_gender (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_initials (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_maiden_name (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_mileage (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_occupation (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_priority (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_sensitivity (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_short_name (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_subject (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_jots (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_relations (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_websites (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_primary_website (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_events (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_calendars (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_primary_calendar (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_external_ids (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_languages (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_hobbies (contact) == NULL);
+
+ g_object_unref (contact);
+}
+
+static void
+test_contact_parser_normal (void)
+{
+ GDataContactsContact *contact;
+ GDate date;
+ GList *list;
+ GError *error = NULL;
+
+ contact = GDATA_CONTACTS_CONTACT (gdata_parsable_new_from_xml (GDATA_TYPE_CONTACTS_CONTACT,
+ "<entry xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:gContact='http://schemas.google.com/contact/2008' "
+ "gd:etag='"QngzcDVSLyp7ImA9WxJTFkoITgU."'>"
+ "<id>http://www.google.com/m8/feeds/contacts/libgdata.test@googlemail.com/base/1b46cdd20bfbee3b</id>"
+ "<updated>2009-04-25T15:21:53.688Z</updated>"
+ "<app:edited xmlns:app='http://www.w3.org/2007/app'>2009-04-25T15:21:53.688Z</app:edited>"
+ "<category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#contact'/>"
+ "<title></title>" /* Here's where it all went wrong */
+ "<link rel='http://schemas.google.com/contacts/2008/rel#photo' type='image/*' "
+ "href='http://www.google.com/m8/feeds/photos/media/libgdata.test@googlemail.com/1b46cdd20bfbee3b'/>"
+ "<link rel='http://www.iana.org/assignments/relation/self' type='application/atom+xml' "
+ "href='http://www.google.com/m8/feeds/contacts/libgdata.test@googlemail.com/full/1b46cdd20bfbee3b'/>"
+ "<link rel='http://www.iana.org/assignments/relation/edit' type='application/atom+xml' "
+ "href='http://www.google.com/m8/feeds/contacts/libgdata.test@googlemail.com/full/1b46cdd20bfbee3b'/>"
+ "<gd:email rel='http://schemas.google.com/g/2005#other' address='bob@example.com'/>"
+ "<gd:email rel='http://schemas.google.com/g/2005#other' address=''/>" /* https://bugzilla.gnome.org/show_bug.cgi?id=734863 */
+ "<gd:extendedProperty name='test' value='test value'/>"
+ "<gd:organization rel='http://schemas.google.com/g/2005#work' label='Work' primary='true'/>"
+ "<gContact:groupMembershipInfo href='http://www.google.com/feeds/contacts/groups/jo%40gmail.com/base/1234a' "
+ "deleted='true'/>"
+ "<gContact:groupMembershipInfo href='http://www.google.com/feeds/contacts/groups/jo%40gmail.com/base/1234b'/>"
+ "<gd:deleted/>"
+ "<gContact:nickname>Agent Smith</gContact:nickname>"
+ "<gContact:fileAs>Smith, Agent</gContact:fileAs>"
+ "<gContact:birthday when='2010-12-03'/>"
+ "<gContact:billingInformation>Foo & Bar Inc.</gContact:billingInformation>"
+ "<gContact:directoryServer>Directory & server</gContact:directoryServer>"
+ "<gContact:gender value='female'/>"
+ "<gContact:initials>X. Y. Z.</gContact:initials>"
+ "<gContact:maidenName>Foo</gContact:maidenName>"
+ "<gContact:mileage>15km</gContact:mileage>"
+ "<gContact:occupation>Occupied</gContact:occupation>"
+ "<gContact:priority rel='low'/>"
+ "<gContact:sensitivity rel='confidential'/>"
+ "<gContact:shortName>Smith</gContact:shortName>"
+ "<gContact:subject>Film buddy</gContact:subject>"
+ "<gContact:jot rel='home'>Moved house on 2010-02-14 to the North Pole.</gContact:jot>"
+ "<gContact:jot rel='user'>Owes me ten pounds.</gContact:jot>"
+ "<gContact:jot rel='other'></gContact:jot>" /* Empty on purpose */
+ "<gContact:relation rel='father'>Darth Vader</gContact:relation>"
+ "<gContact:relation label='Favourite singer'>Rob Halford</gContact:relation>"
+ "<gContact:website href='http://example.com' rel='home-page' label='Home tab #1' primary='true'/>"
+ "<gContact:website href='http://example.com' rel='work'/>"
+ "<gContact:website href='http://bar.com' rel='profile' primary='false'/>"
+ "<gContact:website href='' rel='other'/>" /* empty on purpose; see bgo#790671 */
+ "<gContact:event rel='anniversary'><gd:when startTime='2010-03-04'/></gContact:event>"
+ "<gContact:event label='Foobar'><gd:when startTime='1900-01-01'/></gContact:event>"
+ "<gContact:calendarLink href='http://example.com/' rel='free-busy' primary='true'/>"
+ "<gContact:calendarLink href='http://example.com/' label='Gig list' primary='false'/>"
+ "<gContact:calendarLink href='http://foo.com/calendar' rel='home'/>"
+ "<gContact:externalId value='Number Six' label='The Prisoner'/>"
+ "<gContact:externalId value='1545' rel='account'/>"
+ "<gContact:language label='Fresian'/>"
+ "<gContact:language code='en-US'/>"
+ "<gContact:hobby>Programming</gContact:hobby>"
+ "<gContact:hobby>Heavy metal</gContact:hobby>"
+ "<gContact:hobby>Heavy metal</gContact:hobby>" /* Test that duplicates get merged */
+ "</entry>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_CONTACTS_CONTACT (contact));
+ gdata_test_compare_kind (GDATA_ENTRY (contact), "http://schemas.google.com/contact/2008#contact", NULL);
+ g_clear_error (&error);
+
+ /* TODO: Check the other properties */
+
+ g_assert_cmpstr (gdata_contacts_contact_get_nickname (contact), ==, "Agent Smith");
+ g_assert_cmpstr (gdata_contacts_contact_get_file_as (contact), ==, "Smith, Agent");
+ g_assert_cmpstr (gdata_contacts_contact_get_billing_information (contact), ==, "Foo & Bar Inc.");
+ g_assert_cmpstr (gdata_contacts_contact_get_directory_server (contact), ==, "Directory & server");
+ g_assert_cmpstr (gdata_contacts_contact_get_gender (contact), ==, GDATA_CONTACTS_GENDER_FEMALE);
+ g_assert_cmpstr (gdata_contacts_contact_get_initials (contact), ==, "X. Y. Z.");
+ g_assert_cmpstr (gdata_contacts_contact_get_maiden_name (contact), ==, "Foo");
+ g_assert_cmpstr (gdata_contacts_contact_get_mileage (contact), ==, "15km");
+ g_assert_cmpstr (gdata_contacts_contact_get_occupation (contact), ==, "Occupied");
+ g_assert_cmpstr (gdata_contacts_contact_get_priority (contact), ==, GDATA_CONTACTS_PRIORITY_LOW);
+ g_assert_cmpstr (gdata_contacts_contact_get_sensitivity (contact), ==, GDATA_CONTACTS_SENSITIVITY_CONFIDENTIAL);
+ g_assert_cmpstr (gdata_contacts_contact_get_short_name (contact), ==, "Smith");
+ g_assert_cmpstr (gdata_contacts_contact_get_subject (contact), ==, "Film buddy");
+
+ /* Birthday */
+ g_assert (gdata_contacts_contact_get_birthday (contact, &date) == TRUE);
+ g_assert (g_date_valid (&date) == TRUE);
+ g_assert_cmpuint (g_date_get_year (&date), ==, 2010);
+ g_assert_cmpuint (g_date_get_month (&date), ==, 12);
+ g_assert_cmpuint (g_date_get_day (&date), ==, 3);
+
+ /* Jots */
+ list = gdata_contacts_contact_get_jots (contact);
+ g_assert_cmpuint (g_list_length (list), ==, 3);
+
+ g_assert (GDATA_IS_GCONTACT_JOT (list->data));
+ g_assert_cmpstr (gdata_gcontact_jot_get_content (GDATA_GCONTACT_JOT (list->data)), ==, "Moved house on 2010-02-14 to the North Pole.");
+ g_assert_cmpstr (gdata_gcontact_jot_get_relation_type (GDATA_GCONTACT_JOT (list->data)), ==, GDATA_GCONTACT_JOT_HOME);
+
+ list = list->next;
+ g_assert (GDATA_IS_GCONTACT_JOT (list->data));
+ g_assert_cmpstr (gdata_gcontact_jot_get_content (GDATA_GCONTACT_JOT (list->data)), ==, "Owes me ten pounds.");
+ g_assert_cmpstr (gdata_gcontact_jot_get_relation_type (GDATA_GCONTACT_JOT (list->data)), ==, GDATA_GCONTACT_JOT_USER);
+
+ list = list->next;
+ g_assert (GDATA_IS_GCONTACT_JOT (list->data));
+ g_assert (gdata_gcontact_jot_get_content (GDATA_GCONTACT_JOT (list->data)) == NULL);
+ g_assert_cmpstr (gdata_gcontact_jot_get_relation_type (GDATA_GCONTACT_JOT (list->data)), ==, GDATA_GCONTACT_JOT_OTHER);
+
+ /* Relations */
+ list = gdata_contacts_contact_get_relations (contact);
+ g_assert_cmpuint (g_list_length (list), ==, 2);
+
+ g_assert (GDATA_IS_GCONTACT_RELATION (list->data));
+ g_assert_cmpstr (gdata_gcontact_relation_get_name (GDATA_GCONTACT_RELATION (list->data)), ==, "Darth Vader");
+ g_assert_cmpstr (gdata_gcontact_relation_get_relation_type (GDATA_GCONTACT_RELATION (list->data)), ==, GDATA_GCONTACT_RELATION_FATHER);
+ g_assert (gdata_gcontact_relation_get_label (GDATA_GCONTACT_RELATION (list->data)) == NULL);
+
+ list = list->next;
+ g_assert (GDATA_IS_GCONTACT_RELATION (list->data));
+ g_assert_cmpstr (gdata_gcontact_relation_get_name (GDATA_GCONTACT_RELATION (list->data)), ==, "Rob Halford");
+ g_assert (gdata_gcontact_relation_get_relation_type (GDATA_GCONTACT_RELATION (list->data)) == NULL);
+ g_assert_cmpstr (gdata_gcontact_relation_get_label (GDATA_GCONTACT_RELATION (list->data)), ==, "Favourite singer");
+
+ /* Websites */
+ list = gdata_contacts_contact_get_websites (contact);
+ g_assert_cmpuint (g_list_length (list), ==, 3);
+ /* Note the empty website should *not* be present. See bgo#790671. */
+
+ g_assert (GDATA_IS_GCONTACT_WEBSITE (list->data));
+ g_assert_cmpstr (gdata_gcontact_website_get_uri (GDATA_GCONTACT_WEBSITE (list->data)), ==, "http://example.com");
+ g_assert_cmpstr (gdata_gcontact_website_get_relation_type (GDATA_GCONTACT_WEBSITE (list->data)), ==, GDATA_GCONTACT_WEBSITE_HOME_PAGE);
+ g_assert_cmpstr (gdata_gcontact_website_get_label (GDATA_GCONTACT_WEBSITE (list->data)), ==, "Home tab #1");
+ g_assert (gdata_gcontact_website_is_primary (GDATA_GCONTACT_WEBSITE (list->data)) == TRUE);
+
+ g_assert (gdata_contacts_contact_get_primary_website (contact) == list->data);
+
+ list = list->next;
+ g_assert (GDATA_IS_GCONTACT_WEBSITE (list->data));
+ g_assert_cmpstr (gdata_gcontact_website_get_uri (GDATA_GCONTACT_WEBSITE (list->data)), ==, "http://example.com");
+ g_assert_cmpstr (gdata_gcontact_website_get_relation_type (GDATA_GCONTACT_WEBSITE (list->data)), ==, GDATA_GCONTACT_WEBSITE_WORK);
+ g_assert (gdata_gcontact_website_get_label (GDATA_GCONTACT_WEBSITE (list->data)) == NULL);
+ g_assert (gdata_gcontact_website_is_primary (GDATA_GCONTACT_WEBSITE (list->data)) == FALSE);
+
+ list = list->next;
+ g_assert (GDATA_IS_GCONTACT_WEBSITE (list->data));
+ g_assert_cmpstr (gdata_gcontact_website_get_uri (GDATA_GCONTACT_WEBSITE (list->data)), ==, "http://bar.com");
+ g_assert_cmpstr (gdata_gcontact_website_get_relation_type (GDATA_GCONTACT_WEBSITE (list->data)), ==, GDATA_GCONTACT_WEBSITE_PROFILE);
+ g_assert (gdata_gcontact_website_get_label (GDATA_GCONTACT_WEBSITE (list->data)) == NULL);
+ g_assert (gdata_gcontact_website_is_primary (GDATA_GCONTACT_WEBSITE (list->data)) == FALSE);
+
+ /* Events */
+ list = gdata_contacts_contact_get_events (contact);
+ g_assert_cmpuint (g_list_length (list), ==, 2);
+
+ g_assert (GDATA_IS_GCONTACT_EVENT (list->data));
+ gdata_gcontact_event_get_date (GDATA_GCONTACT_EVENT (list->data), &date);
+ g_assert (g_date_valid (&date) == TRUE);
+ g_assert_cmpuint (g_date_get_year (&date), ==, 2010);
+ g_assert_cmpuint (g_date_get_month (&date), ==, 3);
+ g_assert_cmpuint (g_date_get_day (&date), ==, 4);
+ g_assert_cmpstr (gdata_gcontact_event_get_relation_type (GDATA_GCONTACT_EVENT (list->data)), ==, GDATA_GCONTACT_EVENT_ANNIVERSARY);
+ g_assert (gdata_gcontact_event_get_label (GDATA_GCONTACT_EVENT (list->data)) == NULL);
+
+ list = list->next;
+ g_assert (GDATA_IS_GCONTACT_EVENT (list->data));
+ gdata_gcontact_event_get_date (GDATA_GCONTACT_EVENT (list->data), &date);
+ g_assert (g_date_valid (&date) == TRUE);
+ g_assert_cmpuint (g_date_get_year (&date), ==, 1900);
+ g_assert_cmpuint (g_date_get_month (&date), ==, 1);
+ g_assert_cmpuint (g_date_get_day (&date), ==, 1);
+ g_assert (gdata_gcontact_event_get_relation_type (GDATA_GCONTACT_EVENT (list->data)) == NULL);
+ g_assert_cmpstr (gdata_gcontact_event_get_label (GDATA_GCONTACT_EVENT (list->data)), ==, "Foobar");
+
+ /* Calendars */
+ list = gdata_contacts_contact_get_calendars (contact);
+ g_assert_cmpuint (g_list_length (list), ==, 3);
+
+ g_assert (GDATA_IS_GCONTACT_CALENDAR (list->data));
+ g_assert_cmpstr (gdata_gcontact_calendar_get_uri (GDATA_GCONTACT_CALENDAR (list->data)), ==, "http://example.com/");
+ g_assert_cmpstr (gdata_gcontact_calendar_get_relation_type (GDATA_GCONTACT_CALENDAR (list->data)), ==, GDATA_GCONTACT_CALENDAR_FREE_BUSY);
+ g_assert (gdata_gcontact_calendar_get_label (GDATA_GCONTACT_CALENDAR (list->data)) == NULL);
+ g_assert (gdata_gcontact_calendar_is_primary (GDATA_GCONTACT_CALENDAR (list->data)) == TRUE);
+
+ g_assert (gdata_contacts_contact_get_primary_calendar (contact) == list->data);
+
+ list = list->next;
+ g_assert (GDATA_IS_GCONTACT_CALENDAR (list->data));
+ g_assert_cmpstr (gdata_gcontact_calendar_get_uri (GDATA_GCONTACT_CALENDAR (list->data)), ==, "http://example.com/");
+ g_assert (gdata_gcontact_calendar_get_relation_type (GDATA_GCONTACT_CALENDAR (list->data)) == NULL);
+ g_assert_cmpstr (gdata_gcontact_calendar_get_label (GDATA_GCONTACT_CALENDAR (list->data)), ==, "Gig list");
+ g_assert (gdata_gcontact_calendar_is_primary (GDATA_GCONTACT_CALENDAR (list->data)) == FALSE);
+
+ list = list->next;
+ g_assert (GDATA_IS_GCONTACT_CALENDAR (list->data));
+ g_assert_cmpstr (gdata_gcontact_calendar_get_uri (GDATA_GCONTACT_CALENDAR (list->data)), ==, "http://foo.com/calendar");
+ g_assert_cmpstr (gdata_gcontact_calendar_get_relation_type (GDATA_GCONTACT_CALENDAR (list->data)), ==, GDATA_GCONTACT_CALENDAR_HOME);
+ g_assert (gdata_gcontact_calendar_get_label (GDATA_GCONTACT_CALENDAR (list->data)) == NULL);
+ g_assert (gdata_gcontact_calendar_is_primary (GDATA_GCONTACT_CALENDAR (list->data)) == FALSE);
+
+ /* External IDs */
+ list = gdata_contacts_contact_get_external_ids (contact);
+ g_assert_cmpuint (g_list_length (list), ==, 2);
+
+ g_assert (GDATA_IS_GCONTACT_EXTERNAL_ID (list->data));
+ g_assert (GDATA_IS_GCONTACT_EXTERNAL_ID (list->next->data));
+
+ /* Languages */
+ list = gdata_contacts_contact_get_languages (contact);
+ g_assert_cmpuint (g_list_length (list), ==, 2);
+
+ g_assert (GDATA_IS_GCONTACT_LANGUAGE (list->data));
+ g_assert (GDATA_IS_GCONTACT_LANGUAGE (list->next->data));
+
+ /* Hobbies */
+ list = gdata_contacts_contact_get_hobbies (contact);
+ g_assert_cmpuint (g_list_length (list), ==, 2);
+
+ g_assert_cmpstr (list->data, ==, "Programming");
+ g_assert_cmpstr (list->next->data, ==, "Heavy metal");
+
+ g_object_unref (contact);
+}
+
+static void
+test_contact_parser_error_handling (void)
+{
+ GDataContactsContact *contact;
+ GError *error = NULL;
+
+#define TEST_XML_ERROR_HANDLING(x) \
+ contact = GDATA_CONTACTS_CONTACT (gdata_parsable_new_from_xml (GDATA_TYPE_CONTACTS_CONTACT,\
+ "<entry xmlns='http://www.w3.org/2005/Atom' "\
+ "xmlns:gd='http://schemas.google.com/g/2005' "\
+ "xmlns:gContact='http://schemas.google.com/contact/2008'>"\
+ x\
+ "</entry>", -1, &error));\
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR);\
+ g_assert (contact == NULL);\
+ g_clear_error (&error)
+
+ /* app:edited */
+ TEST_XML_ERROR_HANDLING ("<app:edited xmlns:app='http://www.w3.org/2007/app'>this shouldn't parse</app:edited>");
+
+ /* gd:name */
+ TEST_XML_ERROR_HANDLING ("<gd:name><gd:givenName>Spartacus</gd:givenName><gd:givenName>Spartacus</gd:givenName></gd:name>");
+
+ /* gd:email */
+ TEST_XML_ERROR_HANDLING ("<gd:email>neither should this</gd:email>");
+
+ /* gd:im */
+ TEST_XML_ERROR_HANDLING ("<gd:im>nor this</gd:im>");
+
+ /* gd:phoneNumber */
+ TEST_XML_ERROR_HANDLING ("<gd:phoneNumber/>");
+
+ /* gd:structuredPostalAddress */
+ TEST_XML_ERROR_HANDLING ("<gd:structuredPostalAddress rel=''/>");
+
+ /* gd:organization */
+ TEST_XML_ERROR_HANDLING ("<gd:organization rel=''/>");
+
+ /* gd:extendedProperty */
+ TEST_XML_ERROR_HANDLING ("<gd:extendedProperty/>");
+
+ /* gContact:userDefinedField */
+ TEST_XML_ERROR_HANDLING ("<gContact:userDefinedField/>"); /* no key or value */
+ TEST_XML_ERROR_HANDLING ("<gContact:userDefinedField key='foo'/>"); /* no value */
+ TEST_XML_ERROR_HANDLING ("<gContact:userDefinedField value='bar'/>"); /* no key */
+
+ /* gContact:groupMembershipInfo */
+ TEST_XML_ERROR_HANDLING ("<gContact:groupMembershipInfo/>");
+ TEST_XML_ERROR_HANDLING ("<gContact:groupMembershipInfo href='http://foobar.com/base/1234b' deleted='maybe'/>");
+
+ /* gContact:nickname */
+ TEST_XML_ERROR_HANDLING ("<gContact:nickname/>"); /* missing content */
+ TEST_XML_ERROR_HANDLING ("<gContact:nickname>Nickname 1</gContact:nickname><gContact:nickname>Duplicate!</gContact:nickname>"); /* duplicate */
+
+ /* gContact:fileAs */
+ TEST_XML_ERROR_HANDLING ("<gContact:fileAs/>"); /* missing content */
+ TEST_XML_ERROR_HANDLING ("<gContact:fileAs>File As 1</gContact:fileAs><gContact:fileAs>Duplicate!</gContact:fileAs>"); /* duplicate */
+
+ /* gContact:birthday */
+ TEST_XML_ERROR_HANDLING ("<gContact:birthday/>"); /* missing "when" attribute */
+ TEST_XML_ERROR_HANDLING ("<gContact:birthday when='foobar'/>"); /* invalid date */
+ TEST_XML_ERROR_HANDLING ("<gContact:birthday when='2000-01-01'/><gContact:birthday when='--01-01'/>"); /* duplicate */
+
+ /* gContact:billingInformation */
+ TEST_XML_ERROR_HANDLING ("<gContact:billingInformation/>"); /* missing content */
+ TEST_XML_ERROR_HANDLING ("<gContact:billingInformation>foo</gContact:billingInformation>"
+ "<gContact:billingInformation>Dupe!</gContact:billingInformation>"); /* duplicate */
+
+ /* gContact:directoryServer */
+ TEST_XML_ERROR_HANDLING ("<gContact:directoryServer/>"); /* missing content */
+ TEST_XML_ERROR_HANDLING ("<gContact:directoryServer>foo</gContact:directoryServer>"
+ "<gContact:directoryServer>Dupe!</gContact:directoryServer>"); /* duplicate */
+
+ /* gContact:gender */
+ TEST_XML_ERROR_HANDLING ("<gContact:gender/>"); /* missing content */
+ TEST_XML_ERROR_HANDLING ("<gContact:gender value='male'/><gContact:gender value='female'/>"); /* duplicate */
+
+ /* gContact:initials */
+ TEST_XML_ERROR_HANDLING ("<gContact:initials/>"); /* missing content */
+ TEST_XML_ERROR_HANDLING ("<gContact:initials>A</gContact:initials><gContact:initials>B</gContact:initials>"); /* duplicate */
+
+ /* gContact:maidenName */
+ TEST_XML_ERROR_HANDLING ("<gContact:maidenName/>"); /* missing content */
+ TEST_XML_ERROR_HANDLING ("<gContact:maidenName>A</gContact:maidenName><gContact:maidenName>B</gContact:maidenName>"); /* duplicate */
+
+ /* gContact:mileage */
+ TEST_XML_ERROR_HANDLING ("<gContact:mileage/>"); /* missing content */
+ TEST_XML_ERROR_HANDLING ("<gContact:mileage>12 mi</gContact:mileage><gContact:mileage>12 mi</gContact:mileage>"); /* duplicate */
+
+ /* gContact:occupation */
+ TEST_XML_ERROR_HANDLING ("<gContact:occupation/>"); /* missing content */
+ TEST_XML_ERROR_HANDLING ("<gContact:occupation>Foo</gContact:occupation><gContact:occupation>Bar</gContact:occupation>"); /* duplicate */
+
+ /* gContact:priority */
+ TEST_XML_ERROR_HANDLING ("<gContact:priority/>"); /* missing rel param */
+ TEST_XML_ERROR_HANDLING ("<gContact:priority rel=''/>"); /* empty rel param */
+ TEST_XML_ERROR_HANDLING ("<gContact:priority rel='high'/><gContact:priority rel='low'/>"); /* duplicate */
+
+ /* gContact:sensitivity */
+ TEST_XML_ERROR_HANDLING ("<gContact:sensitivity/>"); /* missing rel param */
+ TEST_XML_ERROR_HANDLING ("<gContact:sensitivity rel=''/>"); /* empty rel param */
+ TEST_XML_ERROR_HANDLING ("<gContact:sensitivity rel='private'/><gContact:sensitivity rel='normal'/>"); /* duplicate */
+
+ /* gContact:shortName */
+ TEST_XML_ERROR_HANDLING ("<gContact:shortName/>"); /* missing content */
+ TEST_XML_ERROR_HANDLING ("<gContact:shortName>Foo</gContact:shortName><gContact:shortName>Bar</gContact:shortName>"); /* duplicate */
+
+ /* gContact:subject */
+ TEST_XML_ERROR_HANDLING ("<gContact:subject/>"); /* missing content */
+ TEST_XML_ERROR_HANDLING ("<gContact:subject>Foo</gContact:subject><gContact:subject>Bar</gContact:subject>"); /* duplicate */
+
+ /* gContact:jot */
+ TEST_XML_ERROR_HANDLING ("<gContact:jot/>");
+
+ /* gContact:relation */
+ TEST_XML_ERROR_HANDLING ("<gContact:relation/>");
+
+ /* gContact:website errors are ignored (see bgo#790671) */
+
+ /* gContact:event */
+ TEST_XML_ERROR_HANDLING ("<gContact:event/>");
+
+ /* gContact:calendar */
+ TEST_XML_ERROR_HANDLING ("<gContact:calendarLink/>");
+
+ /* gContact:externalId */
+ TEST_XML_ERROR_HANDLING ("<gContact:externalId/>");
+
+ /* gContact:language */
+ TEST_XML_ERROR_HANDLING ("<gContact:language/>");
+
+ /* gContact:hobby */
+ TEST_XML_ERROR_HANDLING ("<gContact:hobby/>");
+
+#undef TEST_XML_ERROR_HANDLING
+}
+
+static void
+test_group_properties (void)
+{
+ GDataContactsGroup *group;
+ GTimeVal time_val;
+ GHashTable *properties;
+ gint64 edited;
+ gboolean deleted;
+ gchar *system_group_id;
+
+ group = gdata_contacts_group_new (NULL);
+
+ /* Check the kind is present and correct */
+ g_assert (GDATA_IS_CONTACTS_GROUP (group));
+ gdata_test_compare_kind (GDATA_ENTRY (group), "http://schemas.google.com/contact/2008#group", NULL);
+
+ /* Set various properties */
+ gdata_entry_set_title (GDATA_ENTRY (group), "New Group!");
+ g_assert (gdata_contacts_group_set_extended_property (group, "foobar", "barfoo") == TRUE);
+
+ /* Check various properties */
+ g_get_current_time (&time_val);
+ g_assert_cmpint (gdata_contacts_group_get_edited (group), ==, time_val.tv_sec);
+ g_assert (gdata_contacts_group_is_deleted (group) == FALSE);
+ g_assert (gdata_contacts_group_get_system_group_id (group) == NULL);
+
+ properties = gdata_contacts_group_get_extended_properties (group);
+ g_assert (properties != NULL);
+ g_assert_cmpint (g_hash_table_size (properties), ==, 1);
+ g_assert_cmpstr (gdata_contacts_group_get_extended_property (group, "foobar"), ==, "barfoo");
+
+ /* Check the properties a different way */
+ g_object_get (G_OBJECT (group),
+ "edited", &edited,
+ "deleted", &deleted,
+ "system-group-id", &system_group_id,
+ NULL);
+
+ g_assert_cmpint (edited, ==, time_val.tv_sec);
+ g_assert (deleted == FALSE);
+ g_assert (system_group_id == NULL);
+
+ g_free (system_group_id);
+
+ /* Check the XML */
+ gdata_test_assert_xml (group,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:app='http://www.w3.org/2007/app' "
+ "xmlns:gContact='http://schemas.google.com/contact/2008'>"
+ "<title type='text'>New Group!</title>"
+ "<content type='text'>New Group!</content>"
+ "<category term='http://schemas.google.com/contact/2008#group' scheme='http://schemas.google.com/g/2005#kind'/>"
+ "<gd:extendedProperty name='foobar'>barfoo</gd:extendedProperty>"
+ "</entry>");
+
+ g_object_unref (group);
+}
+
+static void
+test_group_parser_normal (void)
+{
+ GDataContactsGroup *group;
+ GHashTable *properties;
+ GError *error = NULL;
+
+ group = GDATA_CONTACTS_GROUP (gdata_parsable_new_from_xml (GDATA_TYPE_CONTACTS_GROUP,
+ "<entry xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:gContact='http://schemas.google.com/contact/2008' "
+ "gd:etag='"Rno4ezVSLyp7ImA9WxdTEUgNRQU."'>"
+ "<category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#group'/>"
+ "<id>http://www.google.com/feeds/groups/jo%40gmail.com/base/1234</id>"
+ "<published>2005-01-18T21:00:00Z</published>"
+ "<updated>2006-01-01T00:00:00Z</updated>"
+ "<app:edited xmlns:app='http://www.w3.org/2007/app'>2006-01-01T00:00:00Z</app:edited>"
+ "<title>Salsa class members</title>"
+ "<content/>"
+ "<link rel='self' type='application/atom+xml' href='http://www.google.com/m8/feeds/groups/jo%40gmail.com/full/1234'/>"
+ "<link rel='edit' type='application/atom+xml' href='http://www.google.com/m8/feeds/groups/jo%40gmail.com/full/1234'/>"
+ "<gd:extendedProperty name='more info'>Some text.</gd:extendedProperty>"
+ "<gd:extendedProperty name='extra info'>"
+ "<xml>Foobar.</xml>"
+ "</gd:extendedProperty>"
+ "<gd:deleted/>"
+ "</entry>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_CONTACTS_GROUP (group));
+ gdata_test_compare_kind (GDATA_ENTRY (group), "http://schemas.google.com/contact/2008#group", NULL);
+ g_clear_error (&error);
+
+ g_assert_cmpint (gdata_contacts_group_get_edited (group), ==, 1136073600);
+ g_assert (gdata_contacts_group_is_deleted (group) == TRUE);
+ g_assert (gdata_contacts_group_get_system_group_id (group) == NULL);
+
+ g_assert_cmpstr (gdata_contacts_group_get_extended_property (group, "more info"), ==, "Some text.");
+ g_assert_cmpstr (gdata_contacts_group_get_extended_property (group, "extra info"), ==, "<xml>Foobar.</xml>");
+
+ properties = gdata_contacts_group_get_extended_properties (group);
+ g_assert_cmpint (g_hash_table_size (properties), ==, 2);
+
+ g_object_unref (group);
+}
+
+static void
+test_group_parser_system (void)
+{
+ GDataContactsGroup *group;
+ GError *error = NULL;
+
+ group = GDATA_CONTACTS_GROUP (gdata_parsable_new_from_xml (GDATA_TYPE_CONTACTS_GROUP,
+ "<entry xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:gContact='http://schemas.google.com/contact/2008' "
+ "gd:etag='"Rno4ezVSLyp7ImA9WxdTEUgNRQU."'>"
+ "<category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#group'/>"
+ "<id>http://www.google.com/feeds/groups/jo%40gmail.com/base/1234</id>"
+ "<published>2005-01-18T21:00:00Z</published>"
+ "<updated>2006-01-01T00:00:00Z</updated>"
+ "<app:edited xmlns:app='http://www.w3.org/2007/app'>2006-01-01T00:00:00Z</app:edited>"
+ "<title>Salsa class members</title>"
+ "<content/>"
+ "<link rel='self' type='application/atom+xml' href='http://www.google.com/m8/feeds/groups/jo%40gmail.com/full/1234'/>"
+ "<link rel='edit' type='application/atom+xml' href='http://www.google.com/m8/feeds/groups/jo%40gmail.com/full/1234'/>"
+ "<gContact:systemGroup id='Contacts'/>"
+ "</entry>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_CONTACTS_GROUP (group));
+ gdata_test_compare_kind (GDATA_ENTRY (group), "http://schemas.google.com/contact/2008#group", NULL);
+ g_clear_error (&error);
+
+ g_assert_cmpint (gdata_contacts_group_get_edited (group), ==, 1136073600);
+ g_assert (gdata_contacts_group_is_deleted (group) == FALSE);
+ g_assert_cmpstr (gdata_contacts_group_get_system_group_id (group), ==, GDATA_CONTACTS_GROUP_CONTACTS);
+
+ g_object_unref (group);
+}
+
+static void
+test_group_parser_error_handling (void)
+{
+ GDataContactsGroup *group;
+ GError *error = NULL;
+
+#define TEST_XML_ERROR_HANDLING(x) \
+ group = GDATA_CONTACTS_GROUP (gdata_parsable_new_from_xml (GDATA_TYPE_CONTACTS_GROUP,\
+ "<entry xmlns='http://www.w3.org/2005/Atom' "\
+ "xmlns:gd='http://schemas.google.com/g/2005' "\
+ "xmlns:gContact='http://schemas.google.com/contact/2008'>"\
+ x\
+ "</entry>", -1, &error));\
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR);\
+ g_assert (group == NULL);\
+ g_clear_error (&error)
+
+ /* app:edited */
+ TEST_XML_ERROR_HANDLING ("<app:edited xmlns:app='http://www.w3.org/2007/app'>this shouldn't parse</app:edited>");
+
+ /* gd:deleted */
+ TEST_XML_ERROR_HANDLING ("<gd:deleted/><gd:deleted/>");
+
+ /* gd:extendedProperty */
+ TEST_XML_ERROR_HANDLING ("<gd:extendedProperty/>");
+
+ /* gContact:systemGroup */
+ TEST_XML_ERROR_HANDLING ("<gContact:systemGroup/>");
+ TEST_XML_ERROR_HANDLING ("<gContact:systemGroup id='foo'/><gContact:systemGroup id='duplicated'/>");
+
+#undef TEST_XML_ERROR_HANDLING
+}
+
+static void
+test_photo_has_photo (gconstpointer service)
+{
+ GDataContactsContact *contact;
+ gsize length = 0;
+ gchar *content_type = NULL;
+ GError *error = NULL;
+
+ contact = GDATA_CONTACTS_CONTACT (gdata_parsable_new_from_xml (GDATA_TYPE_CONTACTS_CONTACT,
+ "<entry xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:gd='http://schemas.google.com/g/2005'>"
+ "<id>http://www.google.com/m8/feeds/contacts/libgdata.test@googlemail.com/base/1b46cdd20bfbee3b</id>"
+ "<updated>2009-04-25T15:21:53.688Z</updated>"
+ "<category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#contact'/>"
+ "<title></title>" /* Here's where it all went wrong */
+ "<link rel='http://schemas.google.com/contacts/2008/rel#photo' type='image/*' "
+ "href='http://www.google.com/m8/feeds/photos/media/libgdata.test@googlemail.com/1b46cdd20bfbee3b'/>"
+ "</entry>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_CONTACTS_CONTACT (contact));
+ gdata_test_compare_kind (GDATA_ENTRY (contact), "http://schemas.google.com/contact/2008#contact", NULL);
+ g_clear_error (&error);
+
+ /* Check for no photo */
+ g_assert (gdata_contacts_contact_get_photo_etag (contact) == NULL);
+ g_assert (gdata_contacts_contact_get_photo (contact, GDATA_CONTACTS_SERVICE (service), &length, &content_type, NULL, &error) == NULL);
+ g_assert_cmpint (length, ==, 0);
+ g_assert (content_type == NULL);
+ g_assert_no_error (error);
+
+ g_clear_error (&error);
+ g_free (content_type);
+ g_object_unref (contact);
+
+ /* Try again with a photo */
+ contact = GDATA_CONTACTS_CONTACT (gdata_parsable_new_from_xml (GDATA_TYPE_CONTACTS_CONTACT,
+ "<entry xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:gd='http://schemas.google.com/g/2005'>"
+ "<id>http://www.google.com/m8/feeds/contacts/libgdata.test@googlemail.com/base/1b46cdd20bfbee3b</id>"
+ "<updated>2009-04-25T15:21:53.688Z</updated>"
+ "<category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#contact'/>"
+ "<title></title>" /* Here's where it all went wrong */
+ "<link rel='http://schemas.google.com/contacts/2008/rel#photo' type='image/*' "
+ "href='http://www.google.com/m8/feeds/photos/media/libgdata.test@googlemail.com/1b46cdd20bfbee3b' "
+ "gd:etag='"QngzcDVSLyp7ImA9WxJTFkoITgU."'/>"
+ "</entry>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_CONTACTS_CONTACT (contact));
+ gdata_test_compare_kind (GDATA_ENTRY (contact), "http://schemas.google.com/contact/2008#contact", NULL);
+ g_clear_error (&error);
+
+ g_assert (gdata_contacts_contact_get_photo_etag (contact) != NULL);
+ g_object_unref (contact);
+}
+
+static void
+test_photo_add (TempContactData *data, gconstpointer service)
+{
+ guint8 *photo_data;
+ gsize length;
+ gboolean retval;
+ gchar *path = NULL;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "photo-add");
+
+ /* Get the photo */
+ path = g_test_build_filename (G_TEST_DIST, "photo.jpg", NULL);
+ g_assert (g_file_get_contents (path, (gchar**) &photo_data, &length, NULL) == TRUE);
+ g_free (path);
+
+ /* Add it to the contact */
+ retval = gdata_contacts_contact_set_photo (data->contact, GDATA_CONTACTS_SERVICE (service), photo_data, length, "image/jpeg", NULL, &error);
+ g_assert_no_error (error);
+ g_assert (retval == TRUE);
+
+ g_clear_error (&error);
+ g_free (photo_data);
+
+ uhm_server_end_trace (mock_server);
+}
+
+GDATA_ASYNC_TEST_FUNCTIONS (photo_add, TempContactData,
+G_STMT_START {
+ guint8 *photo_data;
+ gsize length;
+ gchar *path = NULL;
+
+ /* Get the photo */
+ path = g_test_build_filename (G_TEST_DIST, "photo.jpg", NULL);
+ g_assert (g_file_get_contents (path, (gchar**) &photo_data, &length, NULL) == TRUE);
+ g_free (path);
+
+ /* Add it to the contact asynchronously */
+ gdata_contacts_contact_set_photo_async (data->contact, GDATA_CONTACTS_SERVICE (service), photo_data, length, "image/jpeg", cancellable,
+ async_ready_callback, async_data);
+
+ g_free (photo_data);
+} G_STMT_END,
+G_STMT_START {
+ GDataContactsContact *contact = GDATA_CONTACTS_CONTACT (obj);
+ gboolean success;
+
+ success = gdata_contacts_contact_set_photo_finish (contact, async_result, &error);
+
+ if (error == NULL) {
+ g_assert (success == TRUE);
+ g_assert (gdata_contacts_contact_get_photo_etag (contact) != NULL);
+ } else {
+ g_assert (success == FALSE);
+ /*g_assert (gdata_contacts_contact_get_photo_etag (contact) == NULL);*/
+
+ /* Bail out on a conflict error, since it means the addition went through
+ * (but not fast enough for libgdata to return success rather than cancellation). */
+ if (g_error_matches (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_CONFLICT) == TRUE) {
+ g_clear_error (&error);
+ async_data->cancellation_successful = FALSE;
+ }
+ }
+} G_STMT_END);
+
+static void
+add_photo_to_contact (GDataContactsService *service, GDataContactsContact **contact)
+{
+ guint8 *photo_data;
+ gsize length;
+ GDataEntry *updated_contact;
+ gchar *path = NULL;
+
+ /* Get the photo and add it to the contact */
+ path = g_test_build_filename (G_TEST_DIST, "photo.jpg", NULL);
+ g_assert (g_file_get_contents (path, (gchar**) &photo_data, &length, NULL) == TRUE);
+ g_assert (gdata_contacts_contact_set_photo (*contact, service, photo_data, length, "image/jpeg", NULL, NULL) == TRUE);
+
+ g_free (path);
+ g_free (photo_data);
+
+ /* HACK: It fairly consistently seems to take the Google servers about 4 seconds to process uploaded photos. Before this
+ * time, a query for the photo will return an error. So let's wait for 10.
+ * Helps: bgo#679072 */
+ if (uhm_server_get_enable_online (mock_server) == TRUE) {
+ sleep (10);
+ }
+
+ /* Re-query for the contact to get any updated ETags. */
+ updated_contact = gdata_service_query_single_entry (GDATA_SERVICE (service), gdata_contacts_service_get_primary_authorization_domain (),
+ gdata_entry_get_id (GDATA_ENTRY (*contact)), NULL, GDATA_TYPE_CONTACTS_CONTACT,
+ NULL, NULL);
+ g_assert (GDATA_IS_CONTACTS_CONTACT (updated_contact));
+
+ g_object_unref (*contact);
+ *contact = GDATA_CONTACTS_CONTACT (updated_contact);
+}
+
+typedef TempContactData TempContactWithPhotoData;
+
+static void
+set_up_temp_contact_with_photo (TempContactWithPhotoData *data, gconstpointer service)
+{
+ set_up_temp_contact ((TempContactData*) data, service);
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-temp-contact-with-photo");
+ add_photo_to_contact (GDATA_CONTACTS_SERVICE (service), &data->contact);
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+tear_down_temp_contact_with_photo (TempContactWithPhotoData *data, gconstpointer service)
+{
+ tear_down_temp_contact ((TempContactData*) data, service);
+}
+
+GDATA_ASYNC_CLOSURE_FUNCTIONS (temp_contact_with_photo, TempContactWithPhotoData);
+
+static void
+test_photo_get (TempContactData *data, gconstpointer service)
+{
+ guint8 *photo_data;
+ gchar *content_type = NULL;
+ gsize length = 0;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "photo-get");
+
+ g_assert (gdata_contacts_contact_get_photo_etag (data->contact) != NULL);
+
+ /* Get the photo from the network */
+ photo_data = gdata_contacts_contact_get_photo (data->contact, GDATA_CONTACTS_SERVICE (service), &length, &content_type, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (photo_data != NULL);
+ g_assert (length != 0);
+ g_assert_cmpstr (content_type, ==, "image/jpeg");
+
+ g_assert (gdata_contacts_contact_get_photo_etag (data->contact) != NULL);
+
+ g_free (content_type);
+ g_free (photo_data);
+ g_clear_error (&error);
+
+ uhm_server_end_trace (mock_server);
+}
+
+GDATA_ASYNC_TEST_FUNCTIONS (photo_get, TempContactData,
+G_STMT_START {
+ g_assert (gdata_contacts_contact_get_photo_etag (data->contact) != NULL);
+
+ /* Get the photo from the network asynchronously */
+ gdata_contacts_contact_get_photo_async (data->contact, GDATA_CONTACTS_SERVICE (service), cancellable, async_ready_callback, async_data);
+} G_STMT_END,
+G_STMT_START {
+ GDataContactsContact *contact = GDATA_CONTACTS_CONTACT (obj);
+ guint8 *photo_data;
+ gsize length;
+ gchar *content_type;
+
+ /* Finish getting the photo */
+ photo_data = gdata_contacts_contact_get_photo_finish (contact, async_result, &length, &content_type, &error);
+
+ if (error == NULL) {
+ g_assert (photo_data != NULL);
+ g_assert (length != 0);
+ g_assert_cmpstr (content_type, ==, "image/jpeg");
+
+ g_assert (gdata_contacts_contact_get_photo_etag (contact) != NULL);
+ } else {
+ g_assert (photo_data == NULL);
+ g_assert (length == 0);
+ g_assert (content_type == NULL);
+ }
+
+ g_free (content_type);
+ g_free (photo_data);
+} G_STMT_END);
+
+static void
+test_photo_delete (TempContactData *data, gconstpointer service)
+{
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "photo-delete");
+
+ g_assert (gdata_contacts_contact_get_photo_etag (data->contact) != NULL);
+
+ /* Remove the contact's photo */
+ g_assert (gdata_contacts_contact_set_photo (data->contact, GDATA_CONTACTS_SERVICE (service), NULL, 0, NULL, NULL, &error) == TRUE);
+ g_assert_no_error (error);
+
+ g_assert (gdata_contacts_contact_get_photo_etag (data->contact) == NULL);
+
+ g_clear_error (&error);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_photo_delete_async_cancellation (GDataAsyncTestData *data,
+ gconstpointer service) __attribute__((unused));
+
+GDATA_ASYNC_TEST_FUNCTIONS (photo_delete, TempContactData,
+G_STMT_START {
+ g_assert (gdata_contacts_contact_get_photo_etag (data->contact) != NULL);
+
+ /* Delete it from the contact asynchronously */
+ gdata_contacts_contact_set_photo_async (data->contact, GDATA_CONTACTS_SERVICE (service), NULL, 0, NULL, cancellable,
+ async_ready_callback, async_data);
+} G_STMT_END,
+G_STMT_START {
+ GDataContactsContact *contact = GDATA_CONTACTS_CONTACT (obj);
+ gboolean success;
+
+ success = gdata_contacts_contact_set_photo_finish (contact, async_result, &error);
+
+ if (error == NULL) {
+ g_assert (success == TRUE);
+ g_assert (gdata_contacts_contact_get_photo_etag (contact) == NULL);
+ } else {
+ g_assert (success == FALSE);
+ g_assert (gdata_contacts_contact_get_photo_etag (contact) != NULL);
+ }
+} G_STMT_END);
+
+static void
+test_batch (gconstpointer service)
+{
+ GDataBatchOperation *operation;
+ GDataService *service2;
+ GDataContactsContact *contact, *contact2, *contact3;
+ GDataEntry *inserted_entry, *inserted_entry2, *inserted_entry3;
+ gchar *feed_uri;
+ guint op_id, op_id2, op_id3;
+ GError *error = NULL, *entry_error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "batch");
+
+ /* Here we hardcode the feed URI, but it should really be extracted from a contacts feed, as the GDATA_LINK_BATCH link */
+ operation = gdata_batchable_create_operation (GDATA_BATCHABLE (service), gdata_contacts_service_get_primary_authorization_domain (),
+ "https://www.google.com/m8/feeds/contacts/default/full/batch");
+
+ /* Check the properties of the operation */
+ g_assert (gdata_batch_operation_get_service (operation) == service);
+ g_assert_cmpstr (gdata_batch_operation_get_feed_uri (operation), ==, "https://www.google.com/m8/feeds/contacts/default/full/batch");
+
+ g_object_get (operation,
+ "service", &service2,
+ "feed-uri", &feed_uri,
+ NULL);
+
+ g_assert (service2 == service);
+ g_assert_cmpstr (feed_uri, ==, "https://www.google.com/m8/feeds/contacts/default/full/batch");
+
+ g_object_unref (service2);
+ g_free (feed_uri);
+
+ /* Run a singleton batch operation to insert a new entry */
+ contact = gdata_contacts_contact_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (contact), "Fooish Bar");
+
+ gdata_test_batch_operation_insertion (operation, GDATA_ENTRY (contact), &inserted_entry, NULL);
+ g_assert (gdata_test_batch_operation_run (operation, NULL, &error) == TRUE);
+ g_assert_no_error (error);
+
+ g_clear_error (&error);
+ g_object_unref (operation);
+ g_object_unref (contact);
+
+ /* Run another batch operation to insert another entry and query the previous one */
+ contact2 = gdata_contacts_contact_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (contact2), "Brian");
+
+ operation = gdata_batchable_create_operation (GDATA_BATCHABLE (service), gdata_contacts_service_get_primary_authorization_domain (),
+ "https://www.google.com/m8/feeds/contacts/default/full/batch");
+ op_id = gdata_test_batch_operation_insertion (operation, GDATA_ENTRY (contact2), &inserted_entry2, NULL);
+ op_id2 = gdata_test_batch_operation_query (operation, gdata_entry_get_id (inserted_entry), GDATA_TYPE_CONTACTS_CONTACT, inserted_entry, NULL,
+ NULL);
+ g_assert_cmpuint (op_id, !=, op_id2);
+
+ g_assert (gdata_test_batch_operation_run (operation, NULL, &error) == TRUE);
+ g_assert_no_error (error);
+
+ g_clear_error (&error);
+ g_object_unref (operation);
+ g_object_unref (contact2);
+
+ /* Run another batch operation to delete the first entry and a fictitious one to test error handling, and update the second entry */
+ gdata_entry_set_title (inserted_entry2, "Toby");
+ contact3 = gdata_contacts_contact_new ("foobar");
+
+ operation = gdata_batchable_create_operation (GDATA_BATCHABLE (service), gdata_contacts_service_get_primary_authorization_domain (),
+ "https://www.google.com/m8/feeds/contacts/default/full/batch");
+ op_id = gdata_test_batch_operation_deletion (operation, inserted_entry, NULL);
+ op_id2 = gdata_test_batch_operation_deletion (operation, GDATA_ENTRY (contact3), &entry_error);
+ op_id3 = gdata_test_batch_operation_update (operation, inserted_entry2, &inserted_entry3, NULL);
+ g_assert_cmpuint (op_id, !=, op_id2);
+ g_assert_cmpuint (op_id, !=, op_id3);
+ g_assert_cmpuint (op_id2, !=, op_id3);
+
+ g_assert (gdata_test_batch_operation_run (operation, NULL, &error) == TRUE);
+ g_assert_no_error (error);
+
+ g_assert_error (entry_error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR);
+
+ g_clear_error (&error);
+ g_clear_error (&entry_error);
+ g_object_unref (operation);
+ g_object_unref (inserted_entry);
+ g_object_unref (contact3);
+
+ /* Run another batch operation to update the second entry with the wrong ETag (i.e. pass the old version of the entry to the batch operation
+ * to test error handling */
+#if 0
+ operation = gdata_batchable_create_operation (GDATA_BATCHABLE (service), gdata_contacts_service_get_primary_authorization_domain (),
+ "https://www.google.com/m8/feeds/contacts/default/full/batch");
+ gdata_test_batch_operation_update (operation, inserted_entry2, NULL, &entry_error);
+ g_assert (gdata_test_batch_operation_run (operation, NULL, &error) == TRUE);
+ g_assert_no_error (error);
+
+ g_assert_error (entry_error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_CONFLICT);
+#endif
+ g_clear_error (&error);
+ g_clear_error (&entry_error);
+/* g_object_unref (operation);*/
+ g_object_unref (inserted_entry2);
+
+ /* Run a final batch operation to delete the second entry */
+/* operation = gdata_batchable_create_operation (GDATA_BATCHABLE (service), gdata_contacts_service_get_primary_authorization_domain (),
+ "https://www.google.com/m8/feeds/contacts/default/full/batch");
+ gdata_test_batch_operation_deletion (operation, inserted_entry3, NULL);
+ g_assert (gdata_test_batch_operation_run (operation, NULL, &error) == TRUE);
+ g_assert_no_error (error);
+*/
+ g_clear_error (&error);
+ /*g_object_unref (operation);*/
+ g_object_unref (inserted_entry3);
+
+ uhm_server_end_trace (mock_server);
+}
+
+typedef struct {
+ GDataContactsContact *new_contact;
+} BatchAsyncData;
+
+static void
+setup_batch_async (BatchAsyncData *data, gconstpointer service)
+{
+ GDataContactsContact *contact;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-batch-async");
+
+ /* Insert a new contact which we can query asyncly */
+ contact = gdata_contacts_contact_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (contact), "Fooish Bar");
+
+ data->new_contact = gdata_contacts_service_insert_contact (GDATA_CONTACTS_SERVICE (service), contact, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_CONTACTS_CONTACT (data->new_contact));
+ g_clear_error (&error);
+
+ g_object_unref (contact);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_batch_async_cb (GDataBatchOperation *operation, GAsyncResult *async_result, GMainLoop *main_loop)
+{
+ GError *error = NULL;
+
+ /* Clear all pending events (such as callbacks for the operations) */
+ while (g_main_context_iteration (NULL, FALSE) == TRUE);
+
+ g_assert (gdata_test_batch_operation_run_finish (operation, async_result, &error) == TRUE);
+ g_assert_no_error (error);
+ g_clear_error (&error);
+
+ g_main_loop_quit (main_loop);
+}
+
+static void
+test_batch_async (BatchAsyncData *data, gconstpointer service)
+{
+ GDataBatchOperation *operation;
+ GMainLoop *main_loop;
+
+ gdata_test_mock_server_start_trace (mock_server, "batch-async");
+
+ /* Run an async query operation on the contact */
+ operation = gdata_batchable_create_operation (GDATA_BATCHABLE (service), gdata_contacts_service_get_primary_authorization_domain (),
+ "https://www.google.com/m8/feeds/contacts/default/full/batch");
+ gdata_test_batch_operation_query (operation, gdata_entry_get_id (GDATA_ENTRY (data->new_contact)), GDATA_TYPE_CONTACTS_CONTACT,
+ GDATA_ENTRY (data->new_contact), NULL, NULL);
+
+ main_loop = g_main_loop_new (NULL, TRUE);
+
+ gdata_batch_operation_run_async (operation, NULL, (GAsyncReadyCallback) test_batch_async_cb, main_loop);
+ g_main_loop_run (main_loop);
+
+ g_main_loop_unref (main_loop);
+ g_object_unref (operation);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_batch_async_cancellation_cb (GDataBatchOperation *operation, GAsyncResult *async_result, GMainLoop *main_loop)
+{
+ GError *error = NULL;
+
+ /* Clear all pending events (such as callbacks for the operations) */
+ while (g_main_context_iteration (NULL, FALSE) == TRUE);
+
+ g_assert (gdata_test_batch_operation_run_finish (operation, async_result, &error) == FALSE);
+ g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CANCELLED);
+ g_clear_error (&error);
+
+ g_main_loop_quit (main_loop);
+}
+
+static void
+test_batch_async_cancellation (BatchAsyncData *data, gconstpointer service)
+{
+ GDataBatchOperation *operation;
+ GMainLoop *main_loop;
+ GCancellable *cancellable;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "batch-async-cancellation");
+
+ /* Run an async query operation on the contact */
+ operation = gdata_batchable_create_operation (GDATA_BATCHABLE (service), gdata_contacts_service_get_primary_authorization_domain (),
+ "https://www.google.com/m8/feeds/contacts/default/full/batch");
+ gdata_test_batch_operation_query (operation, gdata_entry_get_id (GDATA_ENTRY (data->new_contact)), GDATA_TYPE_CONTACTS_CONTACT,
+ GDATA_ENTRY (data->new_contact), NULL, &error);
+
+ main_loop = g_main_loop_new (NULL, TRUE);
+ cancellable = g_cancellable_new ();
+
+ gdata_batch_operation_run_async (operation, cancellable, (GAsyncReadyCallback) test_batch_async_cancellation_cb, main_loop);
+ g_cancellable_cancel (cancellable); /* this should cancel the operation before it even starts, as we haven't run the main loop yet */
+
+ g_main_loop_run (main_loop);
+
+ g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CANCELLED);
+ g_clear_error (&error);
+
+ g_main_loop_unref (main_loop);
+ g_object_unref (cancellable);
+ g_object_unref (operation);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+teardown_batch_async (BatchAsyncData *data, gconstpointer service)
+{
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "teardown-batch-async");
+
+ /* Delete the contact */
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_contacts_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->new_contact), NULL, &error) == TRUE);
+ g_assert_no_error (error);
+ g_clear_error (&error);
+
+ g_object_unref (data->new_contact);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_group_membership (void)
+{
+ GDataContactsContact *contact;
+ GList *groups;
+
+ /* Create a new contact with no groups */
+ contact = gdata_contacts_contact_new (NULL);
+ g_assert (GDATA_IS_CONTACTS_CONTACT (contact));
+ g_assert (gdata_contacts_contact_get_groups (contact) == NULL);
+ g_assert (gdata_contacts_contact_is_group_deleted (contact, "http://notagroup.com/") == FALSE);
+
+ /* Add a group */
+ gdata_contacts_contact_add_group (contact, "http://foo.com/group1");
+ g_assert (gdata_contacts_contact_is_group_deleted (contact, "http://foo.com/group1") == FALSE);
+
+ groups = gdata_contacts_contact_get_groups (contact);
+ g_assert_cmpint (g_list_length (groups), ==, 1);
+ g_assert_cmpstr (groups->data, ==, "http://foo.com/group1");
+
+ /* Add another group */
+ gdata_contacts_contact_add_group (contact, "http://foo.com/group2");
+ g_assert (gdata_contacts_contact_is_group_deleted (contact, "http://foo.com/group1") == FALSE);
+ g_assert (gdata_contacts_contact_is_group_deleted (contact, "http://foo.com/group2") == FALSE);
+
+ groups = gdata_contacts_contact_get_groups (contact);
+ g_assert_cmpint (g_list_length (groups), ==, 2);
+ if (strcmp (groups->data, "http://foo.com/group1") == 0)
+ g_assert_cmpstr (groups->next->data, ==, "http://foo.com/group2");
+ else if (strcmp (groups->data, "http://foo.com/group2") == 0)
+ g_assert_cmpstr (groups->next->data, ==, "http://foo.com/group1");
+ else
+ g_assert_not_reached ();
+
+ /* Remove the first group */
+ gdata_contacts_contact_remove_group (contact, "http://foo.com/group1");
+ g_assert (gdata_contacts_contact_is_group_deleted (contact, "http://foo.com/group1") == FALSE); /* hasn't been propagated to the server */
+
+ groups = gdata_contacts_contact_get_groups (contact);
+ g_assert_cmpint (g_list_length (groups), ==, 1);
+ g_assert_cmpstr (groups->data, ==, "http://foo.com/group2");
+
+ g_object_unref (contact);
+}
+
+static void
+test_contact_id (void)
+{
+ GDataContactsContact *contact;
+ GError *error = NULL;
+
+ /* Check that IDs are changed to the full projection when creating a new contact… */
+ contact = gdata_contacts_contact_new ("http://www.google.com/m8/feeds/contacts/libgdata.test@googlemail.com/base/1b46cdd20bfbee3b");
+ g_assert_cmpstr (gdata_entry_get_id (GDATA_ENTRY (contact)), ==,
+ "http://www.google.com/m8/feeds/contacts/libgdata.test@googlemail.com/full/1b46cdd20bfbee3b");
+ g_object_unref (contact);
+
+ /* …and when creating one from XML. */
+ contact = GDATA_CONTACTS_CONTACT (gdata_parsable_new_from_xml (GDATA_TYPE_CONTACTS_CONTACT,
+ "<entry xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:gd='http://schemas.google.com/g/2005'>"
+ "<id>http://www.google.com/m8/feeds/contacts/libgdata.test@googlemail.com/base/1b46cdd20bfbee3b</id>"
+ "<updated>2009-04-25T15:21:53.688Z</updated>"
+ "<category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#contact'/>"
+ "<title>Foobar</title>"
+ "</entry>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_CONTACTS_CONTACT (contact));
+ g_clear_error (&error);
+
+ g_assert_cmpstr (gdata_entry_get_id (GDATA_ENTRY (contact)), ==,
+ "http://www.google.com/m8/feeds/contacts/libgdata.test@googlemail.com/full/1b46cdd20bfbee3b");
+
+ g_object_unref (contact);
+}
+
+static void
+mock_server_notify_resolver_cb (GObject *object, GParamSpec *pspec, gpointer user_data)
+{
+ UhmServer *server;
+ UhmResolver *resolver;
+
+ server = UHM_SERVER (object);
+
+ /* Set up the expected domain names here. This should technically be split up between
+ * the different unit test suites, but that's too much effort. */
+ resolver = uhm_server_get_resolver (server);
+
+ if (resolver != NULL) {
+ const gchar *ip_address = uhm_server_get_address (server);
+
+ uhm_resolver_add_A (resolver, "www.google.com", ip_address);
+ uhm_resolver_add_A (resolver,
+ "accounts.google.com", ip_address);
+ }
+}
+
+/* Set up a global GDataAuthorizer to be used for all the tests. Unfortunately,
+ * the Google Contacts API is effectively limited to OAuth1 and OAuth2
+ * authorisation, so this requires user interaction when online.
+ *
+ * If not online, use a dummy authoriser. */
+static GDataAuthorizer *
+create_global_authorizer (void)
+{
+ GDataOAuth2Authorizer *authorizer = NULL; /* owned */
+ gchar *authentication_uri, *authorisation_code;
+ GError *error = NULL;
+
+ /* If not online, just return a dummy authoriser. */
+ if (!uhm_server_get_enable_online (mock_server)) {
+ return GDATA_AUTHORIZER (gdata_dummy_authorizer_new (GDATA_TYPE_CONTACTS_SERVICE));
+ }
+
+ /* Otherwise, go through the interactive OAuth dance. */
+ gdata_test_mock_server_start_trace (mock_server, "global-authentication");
+ authorizer = gdata_oauth2_authorizer_new (CLIENT_ID, CLIENT_SECRET,
+ REDIRECT_URI,
+ GDATA_TYPE_CONTACTS_SERVICE);
+
+ /* Get an authentication URI */
+ authentication_uri = gdata_oauth2_authorizer_build_authentication_uri (authorizer, NULL, FALSE);
+ g_assert (authentication_uri != NULL);
+
+ /* Get the authorisation code off the user. */
+ authorisation_code = gdata_test_query_user_for_verifier (authentication_uri);
+
+ g_free (authentication_uri);
+
+ if (authorisation_code == NULL) {
+ /* Skip tests. */
+ g_object_unref (authorizer);
+ authorizer = NULL;
+ goto skip_test;
+ }
+
+ /* Authorise the token */
+ g_assert (gdata_oauth2_authorizer_request_authorization (authorizer, authorisation_code, NULL, &error));
+ g_assert_no_error (error);
+
+skip_test:
+ g_free (authorisation_code);
+
+ uhm_server_end_trace (mock_server);
+
+ return GDATA_AUTHORIZER (authorizer);
+}
+
+int
+main (int argc, char *argv[])
+{
+ gint retval;
+ GDataAuthorizer *authorizer = NULL; /* owned */
+ GDataService *service = NULL; /* owned */
+ GFile *trace_directory = NULL; /* owned */
+ gchar *path = NULL; /* owned */
+
+ gdata_test_init (argc, argv);
+
+ mock_server = gdata_test_get_mock_server ();
+ g_signal_connect (G_OBJECT (mock_server), "notify::resolver",
+ (GCallback) mock_server_notify_resolver_cb, NULL);
+ path = g_test_build_filename (G_TEST_DIST, "traces/contacts", NULL);
+ trace_directory = g_file_new_for_path (path);
+ g_free (path);
+ uhm_server_set_trace_directory (mock_server, trace_directory);
+ g_object_unref (trace_directory);
+
+ authorizer = create_global_authorizer ();
+ service = GDATA_SERVICE (gdata_contacts_service_new (authorizer));
+
+ g_test_add_func ("/contacts/authentication", test_authentication);
+
+ g_test_add ("/contacts/contact/insert", InsertData, service, set_up_insert, test_contact_insert, tear_down_insert);
+ g_test_add ("/contacts/contact/update", TempContactData, service, set_up_temp_contact, test_contact_update, tear_down_temp_contact);
+
+ g_test_add ("/contacts/query/all_contacts", QueryAllContactsData, service, set_up_query_all_contacts, test_query_all_contacts,
+ tear_down_query_all_contacts);
+ g_test_add ("/contacts/query/all_contacts/async", GDataAsyncTestData, service, set_up_query_all_contacts_async,
+ test_query_all_contacts_async, tear_down_query_all_contacts_async);
+ g_test_add ("/contacts/query/all_contacts/async/progress_closure", QueryAllContactsData, service,
+ set_up_query_all_contacts, test_query_all_contacts_async_progress_closure, tear_down_query_all_contacts);
+ g_test_add ("/contacts/query/all_contacts/cancellation", GDataAsyncTestData, service, set_up_query_all_contacts_async,
+ test_query_all_contacts_async_cancellation, tear_down_query_all_contacts_async);
+
+ g_test_add_data_func ("/contacts/photo/has_photo", service, test_photo_has_photo);
+ g_test_add ("/contacts/photo/add", TempContactData, service, set_up_temp_contact, test_photo_add, tear_down_temp_contact);
+ g_test_add ("/contacts/photo/add/async", GDataAsyncTestData, service, set_up_temp_contact_async, test_photo_add_async,
+ tear_down_temp_contact_async);
+ g_test_add ("/contacts/photo/add/async/cancellation", GDataAsyncTestData, service, set_up_temp_contact_async,
+ test_photo_add_async_cancellation, tear_down_temp_contact_async);
+ g_test_add ("/contacts/photo/get", TempContactData, service, set_up_temp_contact_with_photo, test_photo_get, tear_down_temp_contact);
+ g_test_add ("/contacts/photo/get/async", GDataAsyncTestData, service, set_up_temp_contact_with_photo_async, test_photo_get_async,
+ tear_down_temp_contact_with_photo_async);
+ g_test_add ("/contacts/photo/get/async/cancellation", GDataAsyncTestData, service, set_up_temp_contact_with_photo_async,
+ test_photo_get_async_cancellation, tear_down_temp_contact_with_photo_async);
+
+ g_test_add ("/contacts/photo/delete", TempContactData, service, set_up_temp_contact_with_photo, test_photo_delete,
+ tear_down_temp_contact);
+ g_test_add ("/contacts/photo/delete/async", GDataAsyncTestData, service, set_up_temp_contact_with_photo_async,
+ test_photo_delete_async, tear_down_temp_contact_with_photo_async);
+/*
+ Too broken to continue running at the moment.
+ g_test_add ("/contacts/photo/delete/async/cancellation", GDataAsyncTestData, service, set_up_temp_contact_with_photo_async,
+ test_photo_delete_async_cancellation, tear_down_temp_contact_with_photo_async);
+*/
+
+ g_test_add_data_func ("/contacts/batch", service, test_batch);
+ g_test_add ("/contacts/batch/async", BatchAsyncData, service, setup_batch_async, test_batch_async, teardown_batch_async);
+ g_test_add ("/contacts/batch/async/cancellation", BatchAsyncData, service, setup_batch_async, test_batch_async_cancellation,
+ teardown_batch_async);
+
+ g_test_add ("/contacts/group/query", QueryAllGroupsData, service, set_up_query_all_groups, test_query_all_groups,
+ tear_down_query_all_groups);
+ g_test_add ("/contacts/group/query/async", GDataAsyncTestData, service, set_up_query_all_groups_async,
+ test_query_all_groups_async, tear_down_query_all_groups_async);
+ g_test_add ("/contacts/group/query/async/progress_closure", QueryAllGroupsData, service, set_up_query_all_groups,
+ test_query_all_groups_async_progress_closure, tear_down_query_all_groups);
+ g_test_add ("/contacts/group/query/async/cancellation", GDataAsyncTestData, service, set_up_query_all_groups_async,
+ test_query_all_groups_async_cancellation, tear_down_query_all_groups_async);
+
+ g_test_add ("/contacts/group/insert", InsertGroupData, service, set_up_insert_group, test_group_insert, tear_down_insert_group);
+ g_test_add ("/contacts/group/insert/async", GDataAsyncTestData, service, set_up_insert_group_async, test_group_insert_async,
+ tear_down_insert_group_async);
+ g_test_add ("/contacts/group/insert/async/cancellation", GDataAsyncTestData, service, set_up_insert_group_async,
+ test_group_insert_async_cancellation, tear_down_insert_group_async);
+
+ g_test_add_func ("/contacts/contact/properties", test_contact_properties);
+ g_test_add_func ("/contacts/contact/escaping", test_contact_escaping);
+ g_test_add_func ("/contacts/contact/parser/minimal", test_contact_parser_minimal);
+ g_test_add_func ("/contacts/contact/parser/normal", test_contact_parser_normal);
+ g_test_add_func ("/contacts/contact/parser/error_handling", test_contact_parser_error_handling);
+ g_test_add_func ("/contacts/contact/id", test_contact_id);
+
+ g_test_add_func ("/contacts/query/uri", test_query_uri);
+ g_test_add_func ("/contacts/query/etag", test_query_etag);
+ g_test_add_func ("/contacts/query/properties", test_query_properties);
+
+ g_test_add_func ("/contacts/group/properties", test_group_properties);
+ g_test_add_func ("/contacts/group/escaping", test_group_escaping);
+ g_test_add_func ("/contacts/group/parser/normal", test_group_parser_normal);
+ g_test_add_func ("/contacts/group/parser/system", test_group_parser_system);
+ g_test_add_func ("/contacts/group/parser/error_handling", test_group_parser_error_handling);
+ g_test_add_func ("/contacts/group/membership", test_group_membership);
+
+ retval = g_test_run ();
+
+ g_clear_object (&service);
+ g_clear_object (&authorizer);
+
+ return retval;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Thibault Saunier 2009 <saunierthibault@gmail.com>
+ * Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
+ * Copyright (C) Red Hat, Inc. 2015, 2016
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib.h>
+#include <unistd.h>
+#include <string.h>
+
+/* For the thumbnail size tests in test_download_thumbnail() */
+#ifdef HAVE_GDK_PIXBUF
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#endif
+
+#include "gdata.h"
+#include "common.h"
+#include "gdata-dummy-authorizer.h"
+
+static UhmServer *mock_server = NULL;
+
+#undef CLIENT_ID /* from common.h */
+
+#define CLIENT_ID "352818697630-nqu2cmt5quqd6lr17ouoqmb684u84l1f.apps.googleusercontent.com"
+#define CLIENT_SECRET "-fA4pHQJxR3zJ-FyAMPQsikg"
+#define REDIRECT_URI "urn:ietf:wg:oauth:2.0:oob"
+
+static void
+add_folder_link_to_entry (GDataDocumentsEntry *entry, GDataDocumentsFolder *folder)
+{
+ GDataLink *_link;
+ const gchar *id;
+ gchar *uri;
+
+ /* HACK: Build the GDataLink:uri from the ID by adding the prefix. */
+ id = gdata_entry_get_id (GDATA_ENTRY (folder));
+ uri = g_strconcat ("https://www.googleapis.com/drive/v2/files/", id, NULL);
+ _link = gdata_link_new (uri, GDATA_LINK_PARENT);
+ gdata_entry_add_link (GDATA_ENTRY (entry), _link);
+ g_object_unref (_link);
+ g_free (uri);
+}
+
+static gboolean
+check_document_is_in_folder (GDataDocumentsDocument *document, GDataDocumentsFolder *folder)
+{
+ GList *links;
+ gboolean found_folder_category = FALSE;
+ GDataLink *folder_self_link;
+
+ folder_self_link = gdata_entry_look_up_link (GDATA_ENTRY (folder), GDATA_LINK_SELF);
+ g_assert (folder_self_link != NULL);
+
+ for (links = gdata_entry_look_up_links (GDATA_ENTRY (document), GDATA_LINK_PARENT);
+ links != NULL; links = links->next) {
+ GDataLink *_link = GDATA_LINK (links->data);
+
+ if (strcmp (gdata_link_get_uri (_link), gdata_link_get_uri (folder_self_link)) == 0) {
+ g_assert (found_folder_category == FALSE);
+ found_folder_category = TRUE;
+ }
+ }
+
+ return found_folder_category;
+}
+
+static gboolean
+check_document_is_in_root_folder (GDataDocumentsDocument *document)
+{
+ GList *links;
+ gboolean is_in_root_folder;
+
+ links = gdata_entry_look_up_links (GDATA_ENTRY (document), GDATA_LINK_PARENT);
+ is_in_root_folder = (links == NULL) ? TRUE : FALSE;
+ g_list_free (links);
+
+ return is_in_root_folder;
+}
+
+static void
+delete_entry (GDataDocumentsEntry *entry, GDataService *service)
+{
+ GDataEntry *new_entry;
+
+ /* Re-query for the entry because its ETag may have changed over the course of the tests (or because the Documents servers like to
+ * arbitrarily change ETag values). */
+ new_entry = gdata_service_query_single_entry (service, gdata_documents_service_get_primary_authorization_domain (),
+ gdata_entry_get_id (GDATA_ENTRY (entry)), NULL, G_OBJECT_TYPE (entry), NULL, NULL);
+ g_assert (GDATA_IS_DOCUMENTS_ENTRY (new_entry));
+
+ /* Delete the entry. Don't bother asserting that it succeeds, because it will often fail because Google keep giving us the wrong ETag above. */
+ gdata_service_delete_entry (service, gdata_documents_service_get_primary_authorization_domain (), new_entry, NULL, NULL);
+ g_object_unref (new_entry);
+}
+
+static GDataDocumentsFolder *
+create_folder (GDataDocumentsService *service, const gchar *title)
+{
+ GDataDocumentsFolder *folder, *new_folder;
+ GDataDocumentsFolder *root;
+
+ root = GDATA_DOCUMENTS_FOLDER (gdata_service_query_single_entry (GDATA_SERVICE (service),
+ gdata_documents_service_get_primary_authorization_domain (),
+ "root",
+ NULL,
+ GDATA_TYPE_DOCUMENTS_FOLDER,
+ NULL,
+ NULL));
+
+ folder = gdata_documents_folder_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (folder), title);
+
+ /* Insert the folder */
+ new_folder = GDATA_DOCUMENTS_FOLDER (gdata_documents_service_add_entry_to_folder (GDATA_DOCUMENTS_SERVICE (service),
+ GDATA_DOCUMENTS_ENTRY (folder),
+ root,
+ NULL,
+ NULL));
+ g_assert (GDATA_IS_DOCUMENTS_FOLDER (new_folder));
+ g_object_unref (folder);
+ g_object_unref (root);
+
+ return new_folder;
+}
+
+static void
+test_authentication (void)
+{
+ GDataOAuth2Authorizer *authorizer = NULL; /* owned */
+ gchar *authentication_uri, *authorisation_code;
+
+ gdata_test_mock_server_start_trace (mock_server, "authentication");
+
+ authorizer = gdata_oauth2_authorizer_new (CLIENT_ID, CLIENT_SECRET, REDIRECT_URI, GDATA_TYPE_DOCUMENTS_SERVICE);
+
+ /* Get an authentication URI. */
+ authentication_uri = gdata_oauth2_authorizer_build_authentication_uri (authorizer, NULL, FALSE);
+ g_assert (authentication_uri != NULL);
+
+ /* Get the authorisation code off the user. */
+ if (uhm_server_get_enable_online (mock_server)) {
+ authorisation_code = gdata_test_query_user_for_verifier (authentication_uri);
+ } else {
+ /* Hard coded, extracted from the trace file. */
+ authorisation_code = g_strdup ("FIXME: to be updated from the trace file");
+ }
+
+ g_free (authentication_uri);
+
+ if (authorisation_code == NULL) {
+ /* Skip tests. */
+ goto skip_test;
+ }
+
+ /* Authorise the token */
+ g_assert (gdata_oauth2_authorizer_request_authorization (authorizer, authorisation_code, NULL, NULL) == TRUE);
+
+ /* Check all is as it should be */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (authorizer),
+ gdata_documents_service_get_primary_authorization_domain ()) == TRUE);
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (authorizer),
+ gdata_documents_service_get_spreadsheet_authorization_domain ()) == TRUE);
+
+skip_test:
+ g_free (authorisation_code);
+ g_object_unref (authorizer);
+
+ uhm_server_end_trace (mock_server);
+}
+
+typedef struct {
+ GDataDocumentsFolder *folder;
+} TempFolderData;
+
+static void
+set_up_temp_folder (TempFolderData *data, gconstpointer service)
+{
+ GDataDocumentsFolder *folder;
+ GDataDocumentsFolder *root;
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-temp-folder");
+
+ root = GDATA_DOCUMENTS_FOLDER (gdata_service_query_single_entry (GDATA_SERVICE (service),
+ gdata_documents_service_get_primary_authorization_domain (),
+ "root",
+ NULL,
+ GDATA_TYPE_DOCUMENTS_FOLDER,
+ NULL,
+ NULL));
+
+ /* Create a folder */
+ folder = gdata_documents_folder_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (folder), "Temporary Folder");
+
+ /* Insert the folder */
+ data->folder = GDATA_DOCUMENTS_FOLDER (gdata_documents_service_add_entry_to_folder (GDATA_DOCUMENTS_SERVICE (service),
+ GDATA_DOCUMENTS_ENTRY (folder),
+ root,
+ NULL,
+ NULL));
+ g_assert (GDATA_IS_DOCUMENTS_FOLDER (data->folder));
+ g_object_unref (folder);
+ g_object_unref (root);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+tear_down_temp_folder (TempFolderData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "teardown-temp-folder");
+
+ if (data->folder != NULL) {
+ delete_entry (GDATA_DOCUMENTS_ENTRY (data->folder), GDATA_SERVICE (service));
+ g_object_unref (data->folder);
+ }
+
+ uhm_server_end_trace (mock_server);
+}
+
+typedef struct {
+ GDataDocumentsDocument *document;
+} TempDocumentData;
+
+static GDataDocumentsDocument *
+_set_up_temp_document (GDataDocumentsEntry *entry, GDataService *service, GFile *document_file)
+{
+ GDataDocumentsDocument *document, *new_document;
+ GFileInfo *file_info;
+ GFileInputStream *file_stream;
+ GDataUploadStream *upload_stream;
+ GError *error = NULL;
+
+ /* Query for information on the file. */
+ file_info = g_file_query_info (document_file,
+ G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME "," G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
+ G_FILE_QUERY_INFO_NONE, NULL, &error);
+ g_assert_no_error (error);
+
+ /* Prepare the upload stream */
+ upload_stream = gdata_documents_service_upload_document (GDATA_DOCUMENTS_SERVICE (service),
+ GDATA_DOCUMENTS_DOCUMENT (entry),
+ g_file_info_get_display_name (file_info),
+ g_file_info_get_content_type (file_info),
+ NULL, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_UPLOAD_STREAM (upload_stream));
+
+ g_object_unref (file_info);
+
+ /* Open the file */
+ file_stream = g_file_read (document_file, NULL, &error);
+ g_assert_no_error (error);
+
+ /* Upload the document */
+ g_output_stream_splice (G_OUTPUT_STREAM (upload_stream), G_INPUT_STREAM (file_stream),
+ G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, NULL, &error);
+ g_assert_no_error (error);
+
+ /* Finish the upload */
+ document = gdata_documents_service_finish_upload (GDATA_DOCUMENTS_SERVICE (service), upload_stream, &error);
+ g_assert_no_error (error);
+
+ g_object_unref (upload_stream);
+
+ /* HACK: Query for the new document, as Google's servers appear to modify it behind our back when creating the document:
+ * http://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=2337. We have to wait a few seconds before trying this to allow the
+ * various Google servers to catch up with each other. Thankfully, we don't have to wait when running against the mock server. */
+ if (uhm_server_get_enable_online (mock_server) == TRUE) {
+ g_usleep (5 * G_USEC_PER_SEC);
+ }
+
+ new_document = GDATA_DOCUMENTS_DOCUMENT (gdata_service_query_single_entry (service,
+ gdata_documents_service_get_primary_authorization_domain (),
+ gdata_entry_get_id (GDATA_ENTRY (document)), NULL,
+ G_OBJECT_TYPE (document), NULL, NULL));
+ g_assert (GDATA_IS_DOCUMENTS_DOCUMENT (new_document));
+
+ g_object_unref (document);
+
+ return new_document;
+}
+
+static void
+set_up_temp_document_spreadsheet (TempDocumentData *data, gconstpointer service)
+{
+ GDataDocumentsSpreadsheet *document;
+ gchar *document_file_path;
+ GFile *document_file;
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-temp-document-spreadsheet");
+
+ /* Create a document */
+ document = gdata_documents_spreadsheet_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (document), "Temporary Document (Spreadsheet)");
+
+ document_file_path = g_test_build_filename (G_TEST_DIST, "test.ods", NULL);
+ document_file = g_file_new_for_path (document_file_path);
+ g_free (document_file_path);
+
+ data->document = _set_up_temp_document (GDATA_DOCUMENTS_ENTRY (document), GDATA_SERVICE (service), document_file);
+
+ g_object_unref (document_file);
+ g_object_unref (document);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+tear_down_temp_document (TempDocumentData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "teardown-temp-document");
+
+ if (data->document != NULL) {
+ delete_entry (GDATA_DOCUMENTS_ENTRY (data->document), GDATA_SERVICE (service));
+ g_object_unref (data->document);
+ }
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_delete_folder (TempFolderData *data, gconstpointer service)
+{
+ gboolean success;
+ GDataEntry *updated_folder;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "delete-folder");
+
+ g_assert (gdata_documents_entry_is_deleted (GDATA_DOCUMENTS_ENTRY (data->folder)) == FALSE);
+
+ /* Delete the folder */
+ success = gdata_service_delete_entry (GDATA_SERVICE (service), gdata_documents_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->folder), NULL, &error);
+ g_assert_no_error (error);
+ g_assert (success == TRUE);
+ g_clear_error (&error);
+
+ /* Re-query for the folder to ensure it's been deleted */
+ updated_folder = gdata_service_query_single_entry (GDATA_SERVICE (service), gdata_documents_service_get_primary_authorization_domain (),
+ gdata_entry_get_id (GDATA_ENTRY (data->folder)), NULL,
+ GDATA_TYPE_DOCUMENTS_FOLDER, NULL, &error);
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_NOT_FOUND);
+ g_assert (updated_folder == NULL);
+ g_clear_error (&error);
+
+ g_object_unref (data->folder);
+ data->folder = NULL;
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_delete_document (TempDocumentData *data, gconstpointer service)
+{
+ gboolean success;
+ GDataEntry *updated_document;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "delete-document");
+
+ g_assert (gdata_documents_entry_is_deleted (GDATA_DOCUMENTS_ENTRY (data->document)) == FALSE);
+
+ /* Delete the document */
+ success = gdata_service_delete_entry (GDATA_SERVICE (service), gdata_documents_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->document), NULL, &error);
+ g_assert_no_error (error);
+ g_assert (success == TRUE);
+ g_clear_error (&error);
+
+ /* Re-query for the document to ensure it's been deleted */
+ updated_document = gdata_service_query_single_entry (GDATA_SERVICE (service), gdata_documents_service_get_primary_authorization_domain (),
+ gdata_entry_get_id (GDATA_ENTRY (data->document)), NULL,
+ G_OBJECT_TYPE (data->document), NULL, &error);
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_NOT_FOUND);
+ g_assert (updated_document == NULL);
+ g_clear_error (&error);
+
+ g_object_unref (data->document);
+ data->document = NULL;
+
+ uhm_server_end_trace (mock_server);
+}
+
+typedef struct {
+ TempFolderData parent;
+ GDataDocumentsSpreadsheet *spreadsheet_document;
+ GDataDocumentsPresentation *presentation_document;
+ GDataDocumentsText *text_document;
+ GDataDocumentsDocument *arbitrary_document;
+} TempDocumentsData;
+
+static void
+set_up_temp_documents (TempDocumentsData *data, gconstpointer service)
+{
+ GDataDocumentsEntry *document;
+ gchar *document_file_path;
+ GFile *document_file;
+
+ /* Create a temporary folder */
+ set_up_temp_folder ((TempFolderData*) data, service);
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-temp-documents");
+
+ /* Create some temporary documents of different types */
+ document = GDATA_DOCUMENTS_ENTRY (gdata_documents_spreadsheet_new (NULL));
+ gdata_entry_set_title (GDATA_ENTRY (document), "Temporary Spreadsheet");
+ data->spreadsheet_document = GDATA_DOCUMENTS_SPREADSHEET (
+ gdata_documents_service_add_entry_to_folder (GDATA_DOCUMENTS_SERVICE (service), document, ((TempFolderData*) data)->folder,
+ NULL, NULL)
+ );
+ g_assert (GDATA_IS_DOCUMENTS_SPREADSHEET (data->spreadsheet_document));
+ g_object_unref (document);
+
+ document = GDATA_DOCUMENTS_ENTRY (gdata_documents_presentation_new (NULL));
+ gdata_entry_set_title (GDATA_ENTRY (document), "Temporary Presentation");
+ data->presentation_document = GDATA_DOCUMENTS_PRESENTATION (
+ gdata_documents_service_add_entry_to_folder (GDATA_DOCUMENTS_SERVICE (service), document, ((TempFolderData*) data)->folder,
+ NULL, NULL)
+ );
+ g_assert (GDATA_IS_DOCUMENTS_PRESENTATION (data->presentation_document));
+ g_object_unref (document);
+
+ document = GDATA_DOCUMENTS_ENTRY (gdata_documents_text_new (NULL));
+ gdata_entry_set_title (GDATA_ENTRY (document), "Temporary Text Document");
+ data->text_document = GDATA_DOCUMENTS_TEXT (
+ gdata_documents_service_add_entry_to_folder (GDATA_DOCUMENTS_SERVICE (service), document, ((TempFolderData*) data)->folder,
+ NULL, NULL)
+ );
+ g_assert (GDATA_IS_DOCUMENTS_TEXT (data->text_document));
+ g_object_unref (document);
+
+ document_file_path = g_test_build_filename (G_TEST_DIST, "test.odt", NULL);
+ document_file = g_file_new_for_path (document_file_path);
+ g_free (document_file_path);
+
+ document = GDATA_DOCUMENTS_ENTRY (gdata_documents_document_new (NULL));
+ gdata_entry_set_title (GDATA_ENTRY (document), "Temporary Arbitrary Document");
+ data->arbitrary_document = _set_up_temp_document (document, GDATA_SERVICE (service), document_file);
+ g_assert (GDATA_IS_DOCUMENTS_DOCUMENT (data->arbitrary_document));
+ g_object_unref (document);
+
+ g_object_unref (document_file);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+tear_down_temp_documents (TempDocumentsData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "teardown-temp-documents");
+
+ /* Delete the documents */
+ delete_entry (GDATA_DOCUMENTS_ENTRY (data->spreadsheet_document), GDATA_SERVICE (service));
+ g_object_unref (data->spreadsheet_document);
+
+ delete_entry (GDATA_DOCUMENTS_ENTRY (data->presentation_document), GDATA_SERVICE (service));
+ g_object_unref (data->presentation_document);
+
+ delete_entry (GDATA_DOCUMENTS_ENTRY (data->text_document), GDATA_SERVICE (service));
+ g_object_unref (data->text_document);
+
+ delete_entry (GDATA_DOCUMENTS_ENTRY (data->arbitrary_document), GDATA_SERVICE (service));
+ g_object_unref (data->arbitrary_document);
+
+ uhm_server_end_trace (mock_server);
+
+ /* Delete the folder */
+ tear_down_temp_folder ((TempFolderData*) data, service);
+}
+
+static void
+test_query_all_documents_with_folder (TempDocumentsData *data, gconstpointer service)
+{
+ GDataDocumentsFeed *feed;
+ GDataDocumentsQuery *query;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "query-all-documents-with-folder");
+
+ query = gdata_documents_query_new (NULL);
+ gdata_documents_query_set_show_folders (query, TRUE);
+
+ feed = gdata_documents_service_query_documents (GDATA_DOCUMENTS_SERVICE (service), query, NULL, NULL, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_FEED (feed));
+
+ /* TODO: Test the feed */
+
+ g_clear_error (&error);
+ g_object_unref (feed);
+ g_object_unref (query);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_query_all_documents (TempDocumentsData *data, gconstpointer service)
+{
+ GDataDocumentsFeed *feed;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "query-all-documents");
+
+ feed = gdata_documents_service_query_documents (GDATA_DOCUMENTS_SERVICE (service), NULL, NULL, NULL, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_FEED (feed));
+ g_clear_error (&error);
+
+ /* TODO: check entries and feed properties */
+
+ g_object_unref (feed);
+
+ uhm_server_end_trace (mock_server);
+}
+
+GDATA_ASYNC_CLOSURE_FUNCTIONS (temp_documents, TempDocumentsData);
+
+GDATA_ASYNC_TEST_FUNCTIONS (query_all_documents, TempDocumentsData,
+G_STMT_START {
+ gdata_documents_service_query_documents_async (GDATA_DOCUMENTS_SERVICE (service), NULL, cancellable, NULL, NULL,
+ NULL, async_ready_callback, async_data);
+} G_STMT_END,
+G_STMT_START {
+ GDataDocumentsFeed *feed;
+
+ feed = GDATA_DOCUMENTS_FEED (gdata_service_query_finish (GDATA_SERVICE (obj), async_result, &error));
+
+ if (error == NULL) {
+ g_assert (GDATA_IS_FEED (feed));
+ /* TODO: Tests? */
+
+ g_object_unref (feed);
+ } else {
+ g_assert (feed == NULL);
+ }
+} G_STMT_END);
+
+static void
+test_query_all_documents_async_progress_closure (TempDocumentsData *documents_data, gconstpointer service)
+{
+ GDataAsyncProgressClosure *data = g_slice_new0 (GDataAsyncProgressClosure);
+
+ gdata_test_mock_server_start_trace (mock_server, "query-all-documents-async-progress-closure");
+
+ data->main_loop = g_main_loop_new (NULL, TRUE);
+
+ gdata_documents_service_query_documents_async (GDATA_DOCUMENTS_SERVICE (service), NULL, NULL,
+ (GDataQueryProgressCallback) gdata_test_async_progress_callback,
+ data, (GDestroyNotify) gdata_test_async_progress_closure_free,
+ (GAsyncReadyCallback) gdata_test_async_progress_finish_callback, data);
+
+ g_main_loop_run (data->main_loop);
+ g_main_loop_unref (data->main_loop);
+
+ /* Check that both callbacks were called exactly once */
+ g_assert_cmpuint (data->progress_destroy_notify_count, ==, 1);
+ g_assert_cmpuint (data->async_ready_notify_count, ==, 1);
+
+ g_slice_free (GDataAsyncProgressClosure, data);
+
+ uhm_server_end_trace (mock_server);
+}
+
+typedef enum {
+ UPLOAD_METADATA_ONLY,
+ UPLOAD_CONTENT_ONLY,
+ UPLOAD_CONTENT_AND_METADATA,
+} PayloadType;
+#define UPLOAD_PAYLOAD_TYPE_MAX UPLOAD_CONTENT_AND_METADATA
+
+const gchar *payload_type_names[] = {
+ "metadata-only",
+ "content-only",
+ "content-and-metadata",
+};
+
+typedef enum {
+ UPLOAD_IN_FOLDER,
+ UPLOAD_ROOT_FOLDER,
+} FolderType;
+#define UPLOAD_FOLDER_TYPE_MAX UPLOAD_ROOT_FOLDER
+
+const gchar *folder_type_names[] = {
+ "in-folder",
+ "root-folder",
+};
+
+typedef enum {
+ UPLOAD_RESUMABLE,
+ UPLOAD_NON_RESUMABLE,
+} ResumableType;
+#define UPLOAD_RESUMABLE_TYPE_MAX UPLOAD_NON_RESUMABLE
+
+const gchar *resumable_type_names[] = {
+ "resumable",
+ "non-resumable",
+};
+
+typedef enum {
+ UPLOAD_ODT_CONVERT,
+ UPLOAD_ODT_NO_CONVERT,
+ UPLOAD_BIN_NO_CONVERT,
+} DocumentType;
+#define UPLOAD_DOCUMENT_TYPE_MAX UPLOAD_BIN_NO_CONVERT
+
+const gchar *document_type_names[] = {
+ "odt-convert",
+ "odt-no-convert",
+ "bin-no-convert",
+};
+
+typedef struct {
+ PayloadType payload_type;
+ FolderType folder_type;
+ ResumableType resumable_type;
+ DocumentType document_type;
+ gchar *test_name;
+
+ GDataDocumentsService *service;
+} UploadDocumentTestParams;
+
+typedef struct {
+ GDataDocumentsFolder *folder;
+ GDataDocumentsDocument *new_document;
+} UploadDocumentData;
+
+static void
+set_up_upload_document (UploadDocumentData *data, gconstpointer _test_params)
+{
+ const UploadDocumentTestParams *test_params = _test_params;
+ gchar *trace_name;
+
+ /* The trace name needs to take the test parameters into account. */
+ trace_name = g_strdup_printf ("setup-upload-document_%s-%s-%s-%s",
+ payload_type_names[test_params->payload_type],
+ folder_type_names[test_params->folder_type],
+ resumable_type_names[test_params->resumable_type],
+ document_type_names[test_params->document_type]);
+ gdata_test_mock_server_start_trace (mock_server, trace_name);
+ g_free (trace_name);
+
+ data->new_document = NULL;
+
+ switch (test_params->folder_type) {
+ case UPLOAD_IN_FOLDER:
+ data->folder = create_folder (test_params->service, "Temporary Folder for Uploading Documents");
+ break;
+ case UPLOAD_ROOT_FOLDER:
+ data->folder = NULL;
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+tear_down_upload_document (UploadDocumentData *data, gconstpointer _test_params)
+{
+ const UploadDocumentTestParams *test_params = _test_params;
+ gchar *trace_name;
+
+ /* The trace name needs to take the test parameters into account. */
+ trace_name = g_strdup_printf ("teardown-upload-document_%s-%s-%s-%s",
+ payload_type_names[test_params->payload_type],
+ folder_type_names[test_params->folder_type],
+ resumable_type_names[test_params->resumable_type],
+ document_type_names[test_params->document_type]);
+ gdata_test_mock_server_start_trace (mock_server, trace_name);
+ g_free (trace_name);
+
+ /* Delete the new file */
+ if (data->new_document != NULL) {
+ /* HACK: Query for the new document, as Google's servers appear to modify it behind our back if we don't upload both metadata and data
+ * when creating the document: http://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=2337. We have to wait a few
+ * seconds before trying this to allow the various Google servers to catch up with each other. */
+ if (uhm_server_get_enable_online (mock_server) == TRUE) {
+ g_usleep (5 * G_USEC_PER_SEC);
+ }
+
+ delete_entry (GDATA_DOCUMENTS_ENTRY (data->new_document), GDATA_SERVICE (test_params->service));
+ g_object_unref (data->new_document);
+ }
+
+ /* Delete the folder */
+ if (data->folder != NULL) {
+ delete_entry (GDATA_DOCUMENTS_ENTRY (data->folder), GDATA_SERVICE (test_params->service));
+ g_object_unref (data->folder);
+ }
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_upload (UploadDocumentData *data, gconstpointer _test_params)
+{
+ const UploadDocumentTestParams *test_params = _test_params;
+
+ GDataDocumentsDocument *document = NULL;
+ const gchar *document_filename = NULL, *document_title = NULL;
+ gchar *trace_name;
+ GFile *document_file = NULL;
+ GFileInfo *file_info = NULL;
+ GDataDocumentsUploadQuery *upload_query = NULL;
+ GDataLink *edit_media_link;
+ GError *error = NULL;
+
+ /* The trace name needs to take the test parameters into account. */
+ trace_name = g_strdup_printf ("upload_%s-%s-%s-%s",
+ payload_type_names[test_params->payload_type],
+ folder_type_names[test_params->folder_type],
+ resumable_type_names[test_params->resumable_type],
+ document_type_names[test_params->document_type]);
+ gdata_test_mock_server_start_trace (mock_server, trace_name);
+ g_free (trace_name);
+
+ upload_query = gdata_documents_upload_query_new ();
+
+ /* File to upload. (Ignored if we're doing a metadata-only upload.) Also set the conversion type (ignored for non-resumable uploads). */
+ switch (test_params->document_type) {
+ case UPLOAD_ODT_CONVERT:
+ /* ODT file. */
+ document_filename = "test.odt";
+ document_title = "test";
+ gdata_documents_upload_query_set_convert (upload_query, TRUE);
+ break;
+ case UPLOAD_ODT_NO_CONVERT:
+ /* ODT file. */
+ document_filename = "test.odt";
+ document_title = "test";
+ gdata_documents_upload_query_set_convert (upload_query, FALSE);
+ break;
+ case UPLOAD_BIN_NO_CONVERT:
+ /* Arbitrary binary file. */
+ document_filename = "sample.ogg";
+ document_title = "sample";
+ gdata_documents_upload_query_set_convert (upload_query, FALSE);
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ /* Upload content? */
+ switch (test_params->payload_type) {
+ case UPLOAD_METADATA_ONLY:
+ document_filename = NULL;
+ document_title = NULL;
+ document_file = NULL;
+ file_info = NULL;
+ break;
+ case UPLOAD_CONTENT_ONLY:
+ case UPLOAD_CONTENT_AND_METADATA: {
+ gchar *document_file_path = g_test_build_filename (G_TEST_DIST, document_filename, NULL);
+ document_file = g_file_new_for_path (document_file_path);
+ g_free (document_file_path);
+
+ file_info = g_file_query_info (document_file,
+ G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME "," G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE ","
+ G_FILE_ATTRIBUTE_STANDARD_SIZE, G_FILE_QUERY_INFO_NONE, NULL, &error);
+ g_assert_no_error (error);
+
+ break;
+ }
+ default:
+ g_assert_not_reached ();
+ }
+
+ /* Upload metadata? */
+ switch (test_params->payload_type) {
+ case UPLOAD_CONTENT_ONLY:
+ document = NULL;
+ break;
+ case UPLOAD_METADATA_ONLY:
+ case UPLOAD_CONTENT_AND_METADATA: {
+ gchar *title;
+
+ switch (test_params->document_type) {
+ case UPLOAD_ODT_CONVERT:
+ document = GDATA_DOCUMENTS_DOCUMENT (gdata_documents_text_new (NULL));
+ break;
+ case UPLOAD_ODT_NO_CONVERT:
+ case UPLOAD_BIN_NO_CONVERT:
+ document = GDATA_DOCUMENTS_DOCUMENT (gdata_documents_document_new (NULL));
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ /* Build a title including the test details. */
+ title = g_strdup_printf ("Test Upload file (%s)", test_params->test_name);
+ gdata_entry_set_title (GDATA_ENTRY (document), title);
+ g_free (title);
+
+ break;
+ }
+ default:
+ g_assert_not_reached ();
+ }
+
+ if (test_params->payload_type == UPLOAD_METADATA_ONLY) {
+ data->new_document = GDATA_DOCUMENTS_DOCUMENT (gdata_documents_service_add_entry_to_folder (test_params->service,
+ GDATA_DOCUMENTS_ENTRY (document),
+ data->folder, NULL, &error));
+ g_assert_no_error (error);
+ } else {
+ GDataUploadStream *upload_stream;
+ GFileInputStream *file_stream;
+
+ /* Prepare the upload stream */
+ switch (test_params->resumable_type) {
+ case UPLOAD_NON_RESUMABLE:
+ upload_stream = gdata_documents_service_upload_document (test_params->service, document,
+ g_file_info_get_display_name (file_info),
+ g_file_info_get_content_type (file_info), data->folder,
+ NULL, &error);
+ break;
+ case UPLOAD_RESUMABLE:
+ gdata_documents_upload_query_set_folder (upload_query, data->folder);
+
+ upload_stream = gdata_documents_service_upload_document_resumable (test_params->service, document,
+ g_file_info_get_display_name (file_info),
+ g_file_info_get_content_type (file_info),
+ g_file_info_get_size (file_info), upload_query,
+ NULL, &error);
+
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_UPLOAD_STREAM (upload_stream));
+
+ g_object_unref (file_info);
+
+ /* Open the file */
+ file_stream = g_file_read (document_file, NULL, &error);
+ g_assert_no_error (error);
+
+ /* Upload the document */
+ g_output_stream_splice (G_OUTPUT_STREAM (upload_stream), G_INPUT_STREAM (file_stream),
+ G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, NULL, &error);
+ g_assert_no_error (error);
+
+ /* Finish the upload */
+ data->new_document = gdata_documents_service_finish_upload (test_params->service, upload_stream, &error);
+ g_assert_no_error (error);
+
+ g_object_unref (upload_stream);
+ g_object_unref (file_stream);
+ }
+
+ g_assert (GDATA_IS_DOCUMENTS_DOCUMENT (data->new_document)); /* note that this isn't entirely specific */
+
+ /* Verify the uploaded document is the same as the original */
+ switch (test_params->payload_type) {
+ case UPLOAD_METADATA_ONLY:
+ case UPLOAD_CONTENT_AND_METADATA:
+ g_assert_cmpstr (gdata_entry_get_title (GDATA_ENTRY (data->new_document)), ==, gdata_entry_get_title (GDATA_ENTRY (document)));
+ break;
+ case UPLOAD_CONTENT_ONLY:
+ /* HACK: The title returned by the server varies depending on how we uploaded the document. */
+ if (test_params->resumable_type == UPLOAD_NON_RESUMABLE) {
+ g_assert_cmpstr (gdata_entry_get_title (GDATA_ENTRY (data->new_document)), ==, document_title);
+ } else {
+ g_assert_cmpstr (gdata_entry_get_title (GDATA_ENTRY (data->new_document)), ==, "Untitled");
+ }
+
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ /* Check it's been correctly converted/not converted and is of the right document type. */
+ edit_media_link = gdata_entry_look_up_link (GDATA_ENTRY (data->new_document), GDATA_LINK_EDIT_MEDIA);
+
+ switch (test_params->document_type) {
+ case UPLOAD_ODT_CONVERT:
+ g_assert (GDATA_IS_DOCUMENTS_TEXT (data->new_document));
+ g_assert (g_str_has_prefix (gdata_documents_entry_get_resource_id (GDATA_DOCUMENTS_ENTRY (data->new_document)), "document:"));
+ g_assert_cmpstr (gdata_link_get_content_type (edit_media_link), ==, "text/html");
+ break;
+ case UPLOAD_ODT_NO_CONVERT:
+ g_assert (GDATA_IS_DOCUMENTS_DOCUMENT (data->new_document));
+ g_assert (g_str_has_prefix (gdata_documents_entry_get_resource_id (GDATA_DOCUMENTS_ENTRY (data->new_document)), "file:"));
+ g_assert_cmpstr (gdata_link_get_content_type (edit_media_link), ==, "application/vnd.oasis.opendocument.text");
+ break;
+ case UPLOAD_BIN_NO_CONVERT:
+ g_assert (GDATA_IS_DOCUMENTS_DOCUMENT (data->new_document));
+ g_assert (g_str_has_prefix (gdata_documents_entry_get_resource_id (GDATA_DOCUMENTS_ENTRY (data->new_document)), "file:"));
+ g_assert_cmpstr (gdata_link_get_content_type (edit_media_link), ==, "video/x-theora+ogg");
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ /* Check it's in the right folder. */
+ switch (test_params->folder_type) {
+ case UPLOAD_IN_FOLDER:
+ /* HACK: When uploading content-only to a folder using the folder's resumable-create-media link, Google decides that it's
+ * not useful to list the folder in the returned entry XML for the new document (i.e. the server pretends the document's
+ * not in the folder you've just uploaded it to). Joy. */
+ g_assert (test_params->payload_type == UPLOAD_CONTENT_ONLY ||
+ check_document_is_in_folder (data->new_document, data->folder) == TRUE);
+ break;
+ case UPLOAD_ROOT_FOLDER:
+ /* Check root folder. */
+ g_assert (check_document_is_in_root_folder (data->new_document) == TRUE);
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ g_clear_error (&error);
+ g_clear_object (&upload_query);
+ g_clear_object (&document_file);
+ g_clear_object (&document);
+
+ uhm_server_end_trace (mock_server);
+}
+
+typedef struct {
+ PayloadType payload_type;
+ ResumableType resumable_type;
+ gchar *test_name;
+
+ GDataDocumentsService *service;
+} UpdateDocumentTestParams;
+
+typedef struct {
+ GDataDocumentsDocument *document;
+} UpdateDocumentData;
+
+static void
+set_up_update_document (UpdateDocumentData *data, gconstpointer _test_params)
+{
+ const UpdateDocumentTestParams *test_params = _test_params;
+ GDataDocumentsText *document;
+ gchar *title, *document_file_path, *trace_name;
+ GFile *document_file;
+
+ /* The trace name needs to take the test parameters into account. */
+ trace_name = g_strdup_printf ("setup-update-document_%s-%s",
+ payload_type_names[test_params->payload_type],
+ resumable_type_names[test_params->resumable_type]);
+ gdata_test_mock_server_start_trace (mock_server, trace_name);
+ g_free (trace_name);
+
+ /* Create a document */
+ document = gdata_documents_text_new (NULL);
+ title = g_strdup_printf ("Test Update file (%s)", test_params->test_name);
+ gdata_entry_set_title (GDATA_ENTRY (document), title);
+ g_free (title);
+
+ document_file_path = g_test_build_filename (G_TEST_DIST, "test.odt", NULL);
+ document_file = g_file_new_for_path (document_file_path);
+ g_free (document_file_path);
+
+ data->document = _set_up_temp_document (GDATA_DOCUMENTS_ENTRY (document), GDATA_SERVICE (test_params->service), document_file);
+
+ g_object_unref (document_file);
+ g_object_unref (document);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+tear_down_update_document (UpdateDocumentData *data, gconstpointer _test_params)
+{
+ const UpdateDocumentTestParams *test_params = _test_params;
+ gchar *trace_name;
+
+ /* The trace name needs to take the test parameters into account. */
+ trace_name = g_strdup_printf ("teardown-update-document_%s-%s",
+ payload_type_names[test_params->payload_type],
+ resumable_type_names[test_params->resumable_type]);
+ gdata_test_mock_server_start_trace (mock_server, trace_name);
+ g_free (trace_name);
+
+ /* Delete the new file */
+ if (data->document != NULL) {
+ /* HACK: Query for the new document, as Google's servers appear to modify it behind our back if we don't update both metadata and data
+ * when creating the document: http://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=2337. We have to wait a few
+ * seconds before trying this to allow the various Google servers to catch up with each other. */
+ if (uhm_server_get_enable_online (mock_server) == TRUE) {
+ g_usleep (5 * G_USEC_PER_SEC);
+ }
+
+ delete_entry (GDATA_DOCUMENTS_ENTRY (data->document), GDATA_SERVICE (test_params->service));
+ g_object_unref (data->document);
+ }
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_update (UpdateDocumentData *data, gconstpointer _test_params)
+{
+ const UpdateDocumentTestParams *test_params = _test_params;
+
+ GDataDocumentsDocument *updated_document;
+ gchar *original_title, *trace_name;
+ GError *error = NULL;
+
+ /* The trace name needs to take the test parameters into account. */
+ trace_name = g_strdup_printf ("update_%s-%s",
+ payload_type_names[test_params->payload_type],
+ resumable_type_names[test_params->resumable_type]);
+ gdata_test_mock_server_start_trace (mock_server, trace_name);
+ g_free (trace_name);
+
+ switch (test_params->payload_type) {
+ case UPLOAD_METADATA_ONLY:
+ case UPLOAD_CONTENT_AND_METADATA: {
+ gchar *new_title;
+
+ /* Change the title of the document */
+ original_title = g_strdup (gdata_entry_get_title (GDATA_ENTRY (data->document)));
+ new_title = g_strdup_printf ("Updated Test Update file (%s)", test_params->test_name);
+ gdata_entry_set_title (GDATA_ENTRY (data->document), new_title);
+ g_free (new_title);
+
+ break;
+ }
+ case UPLOAD_CONTENT_ONLY:
+ original_title = NULL;
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ if (test_params->payload_type == UPLOAD_METADATA_ONLY) {
+ /* Update the document */
+ updated_document = GDATA_DOCUMENTS_DOCUMENT (gdata_service_update_entry (GDATA_SERVICE (test_params->service),
+ gdata_documents_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->document), NULL, &error));
+ g_assert_no_error (error);
+ } else {
+ GDataUploadStream *upload_stream;
+ GFileInputStream *file_stream;
+ GFile *updated_document_file;
+ GFileInfo *file_info;
+ gchar *path = NULL;
+
+ /* Prepare the updated file */
+ path = g_test_build_filename (G_TEST_DIST, "test_updated.odt", NULL);
+ updated_document_file = g_file_new_for_path (path);
+ g_free (path);
+
+ file_info = g_file_query_info (updated_document_file, G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME ","
+ G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE "," G_FILE_ATTRIBUTE_STANDARD_SIZE, G_FILE_QUERY_INFO_NONE,
+ NULL, &error);
+ g_assert_no_error (error);
+
+ /* Prepare the upload stream */
+ switch (test_params->resumable_type) {
+ case UPLOAD_NON_RESUMABLE:
+ upload_stream = gdata_documents_service_update_document (test_params->service, data->document,
+ g_file_info_get_display_name (file_info),
+ g_file_info_get_content_type (file_info),
+ NULL, &error);
+ break;
+ case UPLOAD_RESUMABLE:
+ upload_stream = gdata_documents_service_update_document_resumable (test_params->service, data->document,
+ g_file_info_get_display_name (file_info),
+ g_file_info_get_content_type (file_info),
+ g_file_info_get_size (file_info), NULL, &error);
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_UPLOAD_STREAM (upload_stream));
+
+ g_object_unref (file_info);
+
+ /* Open the file */
+ file_stream = g_file_read (updated_document_file, NULL, &error);
+ g_assert_no_error (error);
+
+ g_object_unref (updated_document_file);
+
+ /* Upload the updated document */
+ g_output_stream_splice (G_OUTPUT_STREAM (upload_stream), G_INPUT_STREAM (file_stream),
+ G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, NULL, &error);
+ g_assert_no_error (error);
+
+ /* Finish the upload */
+ updated_document = gdata_documents_service_finish_upload (test_params->service, upload_stream, &error);
+ g_assert_no_error (error);
+
+ g_object_unref (upload_stream);
+ g_object_unref (file_stream);
+ }
+
+ g_assert (GDATA_IS_DOCUMENTS_TEXT (updated_document));
+
+ /* Check for success */
+ switch (test_params->payload_type) {
+ case UPLOAD_METADATA_ONLY:
+ case UPLOAD_CONTENT_AND_METADATA:
+ g_assert_cmpstr (gdata_entry_get_title (GDATA_ENTRY (updated_document)), !=, original_title);
+ /* Fall through */
+ case UPLOAD_CONTENT_ONLY:
+ g_assert_cmpstr (gdata_entry_get_title (GDATA_ENTRY (updated_document)), ==,
+ gdata_entry_get_title (GDATA_ENTRY (data->document)));
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ g_free (original_title);
+ g_object_unref (updated_document);
+
+ uhm_server_end_trace (mock_server);
+}
+
+typedef struct {
+ TempDocumentData parent;
+ GDataDocumentsDocument *new_document;
+} TempCopyDocumentData;
+
+static void
+set_up_copy_document (TempCopyDocumentData *data, gconstpointer service)
+{
+ /* Create a temporary document. */
+ set_up_temp_document_spreadsheet ((TempDocumentData*) data, service);
+
+ data->new_document = NULL;
+}
+
+static void
+tear_down_copy_document (TempCopyDocumentData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "teardown-copy-document");
+
+ /* Delete the copied document */
+ delete_entry (GDATA_DOCUMENTS_ENTRY (data->new_document), GDATA_SERVICE (service));
+ g_object_unref (data->new_document);
+
+ uhm_server_end_trace (mock_server);
+
+ /* Delete the folder */
+ tear_down_temp_document ((TempDocumentData*) data, service);
+}
+
+static void
+test_copy_document (TempCopyDocumentData *data, gconstpointer service)
+{
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "copy-document");
+
+ /* Copy the document */
+ data->new_document = gdata_documents_service_copy_document (GDATA_DOCUMENTS_SERVICE (service), data->parent.document, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_DOCUMENTS_SPREADSHEET (data->new_document));
+
+ /* Check their IDs are different but that their other properties (e.g. title) are the same. */
+ g_assert_cmpstr (gdata_entry_get_id (GDATA_ENTRY (data->parent.document)), !=, gdata_entry_get_id (GDATA_ENTRY (data->new_document)));
+ g_assert_cmpstr (gdata_entry_get_title (GDATA_ENTRY (data->parent.document)), ==, gdata_entry_get_title (GDATA_ENTRY (data->new_document)));
+
+ uhm_server_end_trace (mock_server);
+}
+
+typedef struct {
+ GDataDocumentsFolder *folder;
+ GDataDocumentsDocument *document;
+} FoldersData;
+
+static void
+set_up_folders (FoldersData *data, GDataDocumentsService *service, gboolean initially_in_folder)
+{
+ GDataDocumentsFolder *folder;
+ GDataDocumentsFolder *root;
+ GDataDocumentsDocument *document, *new_document;
+ GDataUploadStream *upload_stream;
+ GFileInputStream *file_stream;
+ GFile *document_file;
+ GFileInfo *file_info;
+ gchar *path = NULL;
+ GError *error = NULL;
+
+ root = GDATA_DOCUMENTS_FOLDER (gdata_service_query_single_entry (GDATA_SERVICE (service),
+ gdata_documents_service_get_primary_authorization_domain (),
+ "root",
+ NULL,
+ GDATA_TYPE_DOCUMENTS_FOLDER,
+ NULL,
+ NULL));
+ /* Create a new folder for the tests */
+ folder = gdata_documents_folder_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (folder), "add_file_folder_move_folder");
+
+ /* Insert the folder */
+ data->folder = GDATA_DOCUMENTS_FOLDER (gdata_documents_service_add_entry_to_folder (GDATA_DOCUMENTS_SERVICE (service),
+ GDATA_DOCUMENTS_ENTRY (folder),
+ root,
+ NULL,
+ &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_DOCUMENTS_FOLDER (data->folder));
+
+ g_object_unref (folder);
+
+ /* Create a new file for the tests */
+ path = g_test_build_filename (G_TEST_DIST, "test.odt", NULL);
+ document_file = g_file_new_for_path (path);
+ g_free (path);
+
+ document = GDATA_DOCUMENTS_DOCUMENT (gdata_documents_text_new (NULL));
+ gdata_entry_set_title (GDATA_ENTRY (document), "add_file_folder_move_text");
+ if (initially_in_folder)
+ add_folder_link_to_entry (GDATA_DOCUMENTS_ENTRY (document), root);
+
+ g_object_unref (root);
+
+ file_info = g_file_query_info (document_file, G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME "," G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
+ G_FILE_QUERY_INFO_NONE, NULL, &error);
+ g_assert_no_error (error);
+
+ /* Prepare the upload stream */
+ upload_stream = gdata_documents_service_upload_document (service, document, g_file_info_get_display_name (file_info),
+ g_file_info_get_content_type (file_info),
+ (initially_in_folder == TRUE) ? data->folder : NULL, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_UPLOAD_STREAM (upload_stream));
+
+ g_object_unref (file_info);
+ g_object_unref (document);
+
+ /* Open the file */
+ file_stream = g_file_read (document_file, NULL, &error);
+ g_assert_no_error (error);
+
+ g_object_unref (document_file);
+
+ /* Upload the document */
+ g_output_stream_splice (G_OUTPUT_STREAM (upload_stream), G_INPUT_STREAM (file_stream),
+ G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, NULL, &error);
+ g_assert_no_error (error);
+
+ /* Finish the upload */
+ new_document = gdata_documents_service_finish_upload (service, upload_stream, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_DOCUMENTS_TEXT (new_document));
+
+ g_object_unref (upload_stream);
+ g_object_unref (file_stream);
+
+ /* HACK: Query for the new document, as Google's servers appear to modify it behind our back when creating the document:
+ * http://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=2337. We have to wait a few seconds before trying this to allow the
+ * various Google servers to catch up with each other. */
+ if (uhm_server_get_enable_online (mock_server) == TRUE) {
+ g_usleep (5 * G_USEC_PER_SEC);
+ }
+
+ data->document = GDATA_DOCUMENTS_DOCUMENT (gdata_service_query_single_entry (GDATA_SERVICE (service),
+ gdata_documents_service_get_primary_authorization_domain (),
+ gdata_entry_get_id (GDATA_ENTRY (new_document)), NULL,
+ G_OBJECT_TYPE (new_document), NULL, NULL));
+ g_assert (GDATA_IS_DOCUMENTS_TEXT (data->document));
+}
+
+static void
+set_up_folders_add_to_folder (FoldersData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "setup-folders-add-to-folder");
+ set_up_folders (data, GDATA_DOCUMENTS_SERVICE (service), FALSE);
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+tear_down_folders_add_to_folder (FoldersData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "teardown-folders-add-to-folder");
+
+ delete_entry (GDATA_DOCUMENTS_ENTRY (data->document), GDATA_SERVICE (service));
+ g_object_unref (data->document);
+
+ delete_entry (GDATA_DOCUMENTS_ENTRY (data->folder), GDATA_SERVICE (service));
+ g_object_unref (data->folder);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_folders_add_to_folder (FoldersData *data, gconstpointer service)
+{
+ GDataDocumentsDocument *new_document;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "folders-add-to-folder");
+
+ /* Add the document to the folder */
+ new_document = GDATA_DOCUMENTS_DOCUMENT (gdata_documents_service_add_entry_to_folder (GDATA_DOCUMENTS_SERVICE (service),
+ GDATA_DOCUMENTS_ENTRY (data->document),
+ data->folder, NULL, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_DOCUMENTS_TEXT (new_document));
+
+ /* Check it's still the same document */
+ g_assert_cmpstr (gdata_entry_get_title (GDATA_ENTRY (new_document)), ==, gdata_entry_get_title (GDATA_ENTRY (data->document)));
+ g_assert (check_document_is_in_folder (new_document, data->folder) == TRUE);
+
+ g_object_unref (new_document);
+
+ uhm_server_end_trace (mock_server);
+}
+
+GDATA_ASYNC_CLOSURE_FUNCTIONS (folders_add_to_folder, FoldersData);
+
+GDATA_ASYNC_TEST_FUNCTIONS (folders_add_to_folder, FoldersData,
+G_STMT_START {
+ /* Add the document to the folder asynchronously */
+ gdata_documents_service_add_entry_to_folder_async (GDATA_DOCUMENTS_SERVICE (service), GDATA_DOCUMENTS_ENTRY (data->document),
+ data->folder, cancellable, async_ready_callback, async_data);
+} G_STMT_END,
+G_STMT_START {
+ GDataDocumentsEntry *entry;
+
+ entry = gdata_documents_service_add_entry_to_folder_finish (GDATA_DOCUMENTS_SERVICE (obj), async_result, &error);
+
+ if (error == NULL) {
+ g_assert (GDATA_IS_DOCUMENTS_ENTRY (entry));
+
+ /* Check it's still the same document */
+ g_assert_cmpstr (gdata_entry_get_title (GDATA_ENTRY (entry)), ==, gdata_entry_get_title (GDATA_ENTRY (data->document)));
+ g_assert (check_document_is_in_folder (GDATA_DOCUMENTS_DOCUMENT (entry), data->folder) == TRUE);
+
+ g_object_unref (entry);
+ } else {
+ g_assert (entry == NULL);
+ }
+} G_STMT_END);
+
+static void
+set_up_folders_remove_from_folder (FoldersData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "setup-folders-remove-from-folder");
+ set_up_folders (data, GDATA_DOCUMENTS_SERVICE (service), TRUE);
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+tear_down_folders_remove_from_folder (FoldersData *data, gconstpointer service)
+{
+ tear_down_folders_add_to_folder (data, service);
+}
+
+static void
+test_folders_remove_from_folder (FoldersData *data, gconstpointer service)
+{
+ GDataDocumentsDocument *new_document;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "folders-remove-from-folder");
+
+ /* Remove the document from the folder */
+ new_document = GDATA_DOCUMENTS_DOCUMENT (gdata_documents_service_remove_entry_from_folder (GDATA_DOCUMENTS_SERVICE (service),
+ GDATA_DOCUMENTS_ENTRY (data->document),
+ data->folder, NULL, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_DOCUMENTS_TEXT (new_document));
+
+ /* Check it's still the same document */
+ g_assert_cmpstr (gdata_entry_get_title (GDATA_ENTRY (new_document)), ==, gdata_entry_get_title (GDATA_ENTRY (data->document)));
+ g_assert (check_document_is_in_folder (new_document, data->folder) == FALSE);
+
+ g_object_unref (new_document);
+
+ uhm_server_end_trace (mock_server);
+}
+
+GDATA_ASYNC_CLOSURE_FUNCTIONS (folders_remove_from_folder, FoldersData);
+
+GDATA_ASYNC_TEST_FUNCTIONS (folders_remove_from_folder, FoldersData,
+G_STMT_START {
+ /* Remove the document from the folder asynchronously */
+ gdata_documents_service_remove_entry_from_folder_async (GDATA_DOCUMENTS_SERVICE (service), GDATA_DOCUMENTS_ENTRY (data->document),
+ data->folder, cancellable, async_ready_callback, async_data);
+} G_STMT_END,
+G_STMT_START {
+ GDataDocumentsEntry *entry;
+ GDataEntry *new_entry;
+
+ entry = gdata_documents_service_remove_entry_from_folder_finish (GDATA_DOCUMENTS_SERVICE (obj), async_result, &error);
+
+ if (error == NULL) {
+ g_assert (GDATA_IS_DOCUMENTS_ENTRY (entry));
+
+ /* Check it's still the same document */
+ g_assert_cmpstr (gdata_entry_get_title (GDATA_ENTRY (entry)), ==, gdata_entry_get_title (GDATA_ENTRY (data->document)));
+ g_assert (check_document_is_in_folder (GDATA_DOCUMENTS_DOCUMENT (entry), data->folder) == FALSE);
+
+ g_object_unref (entry);
+ } else {
+ g_assert (entry == NULL);
+ }
+
+ /* Since this code is called for the cancellation tests, we don't know exactly how many requests will be made
+ * before cancellation kicks in; so the epilogue request (below) needs to be in a separate trace file. */
+ uhm_server_end_trace (mock_server);
+ gdata_test_mock_server_start_trace (mock_server, "folders_remove_from_folder-async-epilogue");
+
+ /* With the longer cancellation timeouts, the server can somehow modify the document without getting around to completely
+ * deleting it; hence its ETag changes, but it isn't marked as deleted. Joy of joys. Re-query for the document after every
+ * attempt to ensure we've always got the latest ETag value. */
+ new_entry = gdata_service_query_single_entry (GDATA_SERVICE (obj), gdata_documents_service_get_primary_authorization_domain (),
+ gdata_entry_get_id (GDATA_ENTRY (data->document)), NULL,
+ G_OBJECT_TYPE (data->document), NULL, NULL);
+ g_assert (GDATA_IS_DOCUMENTS_ENTRY (new_entry));
+
+ g_object_unref (data->document);
+ data->document = GDATA_DOCUMENTS_DOCUMENT (new_entry);
+} G_STMT_END);
+
+static void
+_test_download_document (GDataDocumentsDocument *document, GDataService *service)
+{
+ GDataDownloadStream *download_stream;
+ GFileOutputStream *output_stream;
+ GFile *destination_file;
+ GFileInfo *file_info;
+ const gchar *destination_file_extension;
+ gchar *destination_file_name, *destination_file_path;
+ GError *error = NULL;
+
+ if (GDATA_IS_DOCUMENTS_PRESENTATION (document)) {
+ /* Presentation */
+ destination_file_extension = "odp";
+ download_stream = gdata_documents_document_download (document, GDATA_DOCUMENTS_SERVICE (service),
+ GDATA_DOCUMENTS_PRESENTATION_PPT, NULL, &error);
+ } else if (GDATA_IS_DOCUMENTS_SPREADSHEET (document)) {
+ /* Spreadsheet */
+ destination_file_extension = "ods";
+ download_stream = gdata_documents_document_download (document, GDATA_DOCUMENTS_SERVICE (service),
+ GDATA_DOCUMENTS_SPREADSHEET_ODS, NULL, &error);
+ } else if (GDATA_IS_DOCUMENTS_TEXT (document)) {
+ /* Text document */
+ destination_file_extension = "odt";
+ download_stream = gdata_documents_document_download (document, GDATA_DOCUMENTS_SERVICE (service),
+ GDATA_DOCUMENTS_TEXT_ODT, NULL, &error);
+ } else {
+ /* Error! */
+ g_assert_not_reached ();
+ }
+
+ g_assert_no_error (error);
+ g_clear_error (&error);
+
+ /* Find a destination file */
+ destination_file_name = g_strdup_printf ("%s.%s", gdata_documents_entry_get_resource_id (GDATA_DOCUMENTS_ENTRY (document)),
+ destination_file_extension);
+ destination_file_path = g_build_filename (g_get_tmp_dir (), destination_file_name, NULL);
+ g_free (destination_file_name);
+
+ destination_file = g_file_new_for_path (destination_file_path);
+ g_free (destination_file_path);
+
+ /* Download the file */
+ output_stream = g_file_replace (destination_file, NULL, FALSE, G_FILE_CREATE_REPLACE_DESTINATION, NULL, &error);
+ g_assert_no_error (error);
+ g_clear_error (&error);
+
+ g_output_stream_splice (G_OUTPUT_STREAM (output_stream), G_INPUT_STREAM (download_stream),
+ G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, NULL, &error);
+ g_assert_no_error (error);
+ g_clear_error (&error);
+
+ g_object_unref (output_stream);
+ g_object_unref (download_stream);
+
+ /* Check the file size.
+ * Checking the content types turns out to be quite involved, and not worth doing, as it depends on the local user's content type DB. */
+ file_info = g_file_query_info (destination_file, G_FILE_ATTRIBUTE_STANDARD_SIZE, G_FILE_QUERY_INFO_NONE, NULL, &error);
+ g_assert_no_error (error);
+ g_clear_error (&error);
+
+ g_assert_cmpint (g_file_info_get_size (file_info), >, 0);
+
+ g_object_unref (file_info);
+
+ /* Delete the file (shouldn't cause the test to fail if this fails) */
+ g_file_delete (destination_file, NULL, NULL);
+ g_object_unref (destination_file);
+}
+
+static void
+test_download_document (TempDocumentsData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "download-document");
+
+ _test_download_document (GDATA_DOCUMENTS_DOCUMENT (data->spreadsheet_document), GDATA_SERVICE (service));
+ _test_download_document (GDATA_DOCUMENTS_DOCUMENT (data->presentation_document), GDATA_SERVICE (service));
+ _test_download_document (GDATA_DOCUMENTS_DOCUMENT (data->text_document), GDATA_SERVICE (service));
+ _test_download_document (GDATA_DOCUMENTS_DOCUMENT (data->arbitrary_document), GDATA_SERVICE (service));
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_download_thumbnail (TempDocumentData *data, gconstpointer service)
+{
+ const gchar *thumbnail_uri;
+ GDataDownloadStream *download_stream;
+ gchar *destination_file_name, *destination_file_path;
+ GFile *destination_file;
+ GFileOutputStream *file_stream;
+ gssize transfer_size;
+ GError *error = NULL;
+
+ thumbnail_uri = gdata_documents_document_get_thumbnail_uri (data->document);
+
+ /* Google takes many minutes to generate thumbnails for uploaded documents, so with our current testing strategy of creating fresh documents
+ * for each test, this particular test is fairly useless. */
+ if (thumbnail_uri == NULL) {
+ g_test_message ("Skipping thumbnail download test because document ‘%s’ doesn’t have a thumbnail.",
+ gdata_documents_entry_get_resource_id (GDATA_DOCUMENTS_ENTRY (data->document)));
+ return;
+ }
+
+ gdata_test_mock_server_start_trace (mock_server, "download-thumbnail");
+
+ /* Download the thumbnail to a file for testing (in case we weren't compiled with GdkPixbuf support) */
+ download_stream = GDATA_DOWNLOAD_STREAM (gdata_download_stream_new (GDATA_SERVICE (service), NULL, thumbnail_uri, NULL));
+ g_assert (GDATA_IS_DOWNLOAD_STREAM (download_stream));
+
+ /* Prepare a file to write the data to */
+ destination_file_name = g_strdup_printf ("%s_thumbnail.jpg", gdata_documents_entry_get_resource_id (GDATA_DOCUMENTS_ENTRY (data->document)));
+ destination_file_path = g_build_filename (g_get_tmp_dir (), destination_file_name, NULL);
+ g_free (destination_file_name);
+ destination_file = g_file_new_for_path (destination_file_path);
+ g_free (destination_file_path);
+
+ /* Download the file */
+ file_stream = g_file_replace (destination_file, NULL, FALSE, G_FILE_CREATE_REPLACE_DESTINATION, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (G_IS_FILE_OUTPUT_STREAM (file_stream));
+
+ transfer_size = g_output_stream_splice (G_OUTPUT_STREAM (file_stream), G_INPUT_STREAM (download_stream),
+ G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, NULL, &error);
+ g_assert_no_error (error);
+ g_assert_cmpint (transfer_size, >, 0);
+
+ g_object_unref (file_stream);
+ g_object_unref (download_stream);
+
+ /* Delete the file (shouldn't cause the test to fail if this fails) */
+ g_file_delete (destination_file, NULL, NULL);
+ g_object_unref (destination_file);
+
+#ifdef HAVE_GDK_PIXBUF
+ /* Test downloading all thumbnails directly into GdkPixbufs, and check that they're all the correct size */
+ {
+ GdkPixbuf *pixbuf;
+
+ /* Prepare a new download stream */
+ download_stream = GDATA_DOWNLOAD_STREAM (gdata_download_stream_new (GDATA_SERVICE (service), NULL, thumbnail_uri, NULL));
+ g_assert (GDATA_IS_DOWNLOAD_STREAM (download_stream));
+
+ /* Download into a new GdkPixbuf */
+ pixbuf = gdk_pixbuf_new_from_stream (G_INPUT_STREAM (download_stream), NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDK_IS_PIXBUF (pixbuf));
+
+ g_object_unref (download_stream);
+
+ /* Check the dimensions are as expected. */
+ g_assert_cmpint (gdk_pixbuf_get_width (pixbuf), ==, 10);
+ g_assert_cmpint (gdk_pixbuf_get_height (pixbuf), ==, 10);
+
+ g_object_unref (pixbuf);
+ }
+#endif /* HAVE_GDK_PIXBUF */
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_access_rule_insert (TempDocumentData *data, gconstpointer service)
+{
+ GDataDocumentsAccessRule *access_rule, *new_access_rule;
+ GDataLink *_link;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "access-rule-insert");
+
+ /* New access rule */
+ access_rule = gdata_documents_access_rule_new (NULL);
+ gdata_access_rule_set_role (GDATA_ACCESS_RULE (access_rule), GDATA_DOCUMENTS_ACCESS_ROLE_WRITER);
+ gdata_access_rule_set_scope (GDATA_ACCESS_RULE (access_rule), GDATA_ACCESS_SCOPE_USER, "libgdata.test@gmail.com");
+
+ /* Set access rules */
+ _link = gdata_entry_look_up_link (GDATA_ENTRY (data->document), GDATA_LINK_ACCESS_CONTROL_LIST);
+ g_assert (_link != NULL);
+
+ new_access_rule = GDATA_DOCUMENTS_ACCESS_RULE (gdata_service_insert_entry (GDATA_SERVICE (service),
+ gdata_documents_service_get_primary_authorization_domain (),
+ gdata_link_get_uri (_link),
+ GDATA_ENTRY (access_rule), NULL, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_DOCUMENTS_ACCESS_RULE (new_access_rule));
+ g_clear_error (&error);
+
+ /* TODO: Check if everything is as it should be */
+
+ g_object_unref (access_rule);
+ g_object_unref (new_access_rule);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_folder_parser_normal (void)
+{
+ GDataDocumentsFolder *folder;
+ gchar *path;
+ GDataAuthor *author;
+ GError *error = NULL;
+
+ folder = GDATA_DOCUMENTS_FOLDER (gdata_parsable_new_from_xml (GDATA_TYPE_DOCUMENTS_FOLDER,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' "
+ "xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' "
+ "gd:etag='"WBYEFh8LRCt7ImBk"'>"
+ "<id>https://docs.google.com/feeds/id/folder%3A0BzY2jgHHwMwYalFhbjhVT3dyams</id>"
+ "<published>2012-04-14T09:12:19.418Z</published>"
+ "<updated>2012-04-14T09:12:19.418Z</updated>"
+ "<app:edited xmlns:app='http://www.w3.org/2007/app'>2012-04-14T09:12:20.055Z</app:edited>"
+ "<category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#folder' label='folder'/>"
+ "<title>Temporary Folder</title>"
+ "<content type='application/atom+xml;type=feed' "
+ "src='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYalFhbjhVT3dyams/contents'/>"
+ "<link rel='alternate' type='text/html' href='https://docs.google.com/#folders/folder.0.0BzY2jgHHwMwYalFhbjhVT3dyams'/>"
+ "<link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_9_collection_list.png'/>"
+ "<link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYalFhbjhVT3dyams/contents'/>"
+ "<link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/folder%3A0BzY2jgHHwMwYalFhbjhVT3dyams/contents'/>"
+ "<link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYalFhbjhVT3dyams'/>"
+ "<link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYalFhbjhVT3dyams'/>"
+ "<author>"
+ "<name>libgdata.documents</name>"
+ "<email>libgdata.documents@gmail.com</email>"
+ "</author>"
+ "<gd:resourceId>folder:0BzY2jgHHwMwYalFhbjhVT3dyams</gd:resourceId>"
+ "<gd:lastModifiedBy>"
+ "<name>libgdata.documents</name>"
+ "<email>libgdata.documents@gmail.com</email>"
+ "</gd:lastModifiedBy>"
+ "<gd:quotaBytesUsed>0</gd:quotaBytesUsed>"
+ "<docs:writersCanInvite value='false'/>"
+ "<gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYalFhbjhVT3dyams/acl'/>"
+ "</entry>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_DOCUMENTS_FOLDER (folder));
+ gdata_test_compare_kind (GDATA_ENTRY (folder), "http://schemas.google.com/docs/2007#folder", NULL);
+
+ /* Check IDs. */
+ g_assert_cmpstr (gdata_documents_entry_get_resource_id (GDATA_DOCUMENTS_ENTRY (folder)), ==, "folder:0BzY2jgHHwMwYalFhbjhVT3dyams");
+
+ path = gdata_documents_entry_get_path (GDATA_DOCUMENTS_ENTRY (folder));
+ g_assert_cmpstr (path, ==, "/0BzY2jgHHwMwYalFhbjhVT3dyams");
+ g_free (path);
+
+ /* Check dates. */
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ g_assert_cmpuint (gdata_documents_entry_get_edited (GDATA_DOCUMENTS_ENTRY (folder)), ==, 1334394740);
+ G_GNUC_END_IGNORE_DEPRECATIONS
+ g_assert_cmpuint (gdata_documents_entry_get_last_viewed (GDATA_DOCUMENTS_ENTRY (folder)), ==, -1);
+
+ author = gdata_documents_entry_get_last_modified_by (GDATA_DOCUMENTS_ENTRY (folder));
+
+ g_assert_cmpstr (gdata_author_get_name (author), ==, "libgdata.documents");
+ g_assert_cmpstr (gdata_author_get_uri (author), ==, NULL);
+ g_assert_cmpstr (gdata_author_get_email_address (author), ==, "libgdata.documents@gmail.com");
+
+ /* Check permissions/quotas. */
+ g_assert (gdata_documents_entry_writers_can_invite (GDATA_DOCUMENTS_ENTRY (folder)) == FALSE);
+ g_assert_cmpuint (gdata_documents_entry_get_quota_used (GDATA_DOCUMENTS_ENTRY (folder)), ==, 0);
+
+ /* Check miscellany. */
+ g_assert (gdata_documents_entry_is_deleted (GDATA_DOCUMENTS_ENTRY (folder)) == FALSE);
+
+ g_object_unref (folder);
+}
+
+static void
+test_query_etag (void)
+{
+ GDataDocumentsQuery *query = gdata_documents_query_new (NULL);
+
+ /* Test that setting any property will unset the ETag */
+ g_test_bug ("613529");
+
+#define CHECK_ETAG(C) \
+ gdata_query_set_etag (GDATA_QUERY (query), "foobar"); \
+ (C); \
+ g_assert (gdata_query_get_etag (GDATA_QUERY (query)) == NULL);
+
+ CHECK_ETAG (gdata_documents_query_set_show_deleted (query, FALSE))
+ CHECK_ETAG (gdata_documents_query_set_show_folders (query, TRUE))
+ CHECK_ETAG (gdata_documents_query_set_folder_id (query, "this-is-an-id"))
+ CHECK_ETAG (gdata_documents_query_set_title (query, "Title", FALSE))
+ CHECK_ETAG (gdata_documents_query_add_reader (query, "foo@example.com"))
+ CHECK_ETAG (gdata_documents_query_add_collaborator (query, "foo@example.com"))
+
+#undef CHECK_ETAG
+
+ g_object_unref (query);
+}
+
+/* Test getting and setting the GDataDocumentsUploadQuery:convert property */
+static void
+test_upload_query_properties_convert (void)
+{
+ gboolean convert;
+ GDataDocumentsUploadQuery *query;
+
+ /* Verifying the normal state of the property in a newly-constructed instance of GDataDocumentsUploadQuery */
+ query = gdata_documents_upload_query_new ();
+ g_assert (gdata_documents_upload_query_get_convert (query) == TRUE);
+
+ g_object_get (query, "convert", &convert, NULL);
+ g_assert (convert == TRUE);
+
+ /* Setting the property. */
+ gdata_documents_upload_query_set_convert (query, FALSE);
+ g_assert (gdata_documents_upload_query_get_convert (query) == FALSE);
+
+ /* Setting it another way. */
+ g_object_set (query, "convert", TRUE, NULL);
+ g_assert (gdata_documents_upload_query_get_convert (query) == TRUE);
+
+ g_object_unref (query);
+}
+
+/* Here we hardcode the feed URI, but it should really be extracted from a document feed, as the GDATA_LINK_BATCH link */
+#define BATCH_URI "https://docs.google.com/feeds/default/private/full/batch"
+
+static void
+test_batch (gconstpointer service)
+{
+ GDataBatchOperation *operation;
+ GDataService *service2;
+ GDataDocumentsText *doc, *doc2, *doc3;
+ GDataEntry *inserted_entry, *inserted_entry_updated, *inserted_entry2, *inserted_entry2_updated, *inserted_entry3;
+ gchar *feed_uri;
+ guint op_id, op_id2, op_id3;
+ GError *error = NULL, *entry_error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "batch");
+
+ operation = gdata_batchable_create_operation (GDATA_BATCHABLE (service), gdata_documents_service_get_primary_authorization_domain (),
+ BATCH_URI);
+
+ /* Check the properties of the operation */
+ g_assert (gdata_batch_operation_get_service (operation) == service);
+ g_assert_cmpstr (gdata_batch_operation_get_feed_uri (operation), ==, BATCH_URI);
+
+ g_object_get (operation,
+ "service", &service2,
+ "feed-uri", &feed_uri,
+ NULL);
+
+ g_assert (service2 == service);
+ g_assert_cmpstr (feed_uri, ==, BATCH_URI);
+
+ g_object_unref (service2);
+ g_free (feed_uri);
+
+ /* Run a singleton batch operation to insert a new entry */
+ doc = gdata_documents_text_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (doc), "My First Document");
+
+ gdata_test_batch_operation_insertion (operation, GDATA_ENTRY (doc), &inserted_entry, NULL);
+ g_assert (gdata_test_batch_operation_run (operation, NULL, &error) == TRUE);
+ g_assert_no_error (error);
+
+ g_clear_error (&error);
+ g_object_unref (operation);
+ g_object_unref (doc);
+
+ /* Run another batch operation to insert another entry and query the previous one */
+ doc2 = gdata_documents_text_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (doc2), "I'm a poet and I didn't know it");
+
+ operation = gdata_batchable_create_operation (GDATA_BATCHABLE (service), gdata_documents_service_get_primary_authorization_domain (),
+ BATCH_URI);
+ op_id = gdata_test_batch_operation_insertion (operation, GDATA_ENTRY (doc2), &inserted_entry2, NULL);
+ op_id2 = gdata_test_batch_operation_query (operation, gdata_entry_get_id (inserted_entry), GDATA_TYPE_DOCUMENTS_TEXT, inserted_entry, NULL,
+ NULL);
+ g_assert_cmpuint (op_id, !=, op_id2);
+
+ g_assert (gdata_test_batch_operation_run (operation, NULL, &error) == TRUE);
+ g_assert_no_error (error);
+
+ g_clear_error (&error);
+ g_object_unref (operation);
+ g_object_unref (doc2);
+
+ /* Run another batch operation to query one of the entries we just created, since it seems that the ETags for documents change for no
+ * apparent reason when you're not looking. */
+ operation = gdata_batchable_create_operation (GDATA_BATCHABLE (service), gdata_documents_service_get_primary_authorization_domain (),
+ BATCH_URI);
+ gdata_test_batch_operation_query (operation, gdata_entry_get_id (inserted_entry), GDATA_TYPE_DOCUMENTS_TEXT, inserted_entry,
+ &inserted_entry_updated, NULL);
+
+ g_assert (gdata_test_batch_operation_run (operation, NULL, &error) == TRUE);
+ g_assert_no_error (error);
+
+ g_clear_error (&error);
+ g_object_unref (operation);
+ g_object_unref (inserted_entry);
+
+ /* Run another batch operation to query the other entry we just created. It would be sensible to batch this query together with the previous
+ * one, seeing as we're testing _batch_ functionality. Funnily enough, the combination of two idempotent operations changes the ETags and
+ * makes the whole effort worthless. */
+ operation = gdata_batchable_create_operation (GDATA_BATCHABLE (service), gdata_documents_service_get_primary_authorization_domain (),
+ BATCH_URI);
+ gdata_test_batch_operation_query (operation, gdata_entry_get_id (inserted_entry2), GDATA_TYPE_DOCUMENTS_TEXT, inserted_entry2,
+ &inserted_entry2_updated, NULL);
+
+ g_assert (gdata_test_batch_operation_run (operation, NULL, &error) == TRUE);
+ g_assert_no_error (error);
+
+ g_clear_error (&error);
+ g_object_unref (operation);
+
+ /* Run another batch operation to delete the first entry and a fictitious one to test error handling, and update the second entry */
+ gdata_entry_set_title (inserted_entry2_updated, "War & Peace");
+ doc3 = gdata_documents_text_new ("foobar");
+
+ operation = gdata_batchable_create_operation (GDATA_BATCHABLE (service), gdata_documents_service_get_primary_authorization_domain (),
+ BATCH_URI);
+ op_id = gdata_test_batch_operation_deletion (operation, inserted_entry_updated, NULL);
+ op_id2 = gdata_test_batch_operation_deletion (operation, GDATA_ENTRY (doc3), &entry_error);
+ op_id3 = gdata_test_batch_operation_update (operation, inserted_entry2_updated, &inserted_entry3, NULL);
+ g_assert_cmpuint (op_id, !=, op_id2);
+ g_assert_cmpuint (op_id, !=, op_id3);
+ g_assert_cmpuint (op_id2, !=, op_id3);
+
+ g_assert (gdata_test_batch_operation_run (operation, NULL, &error) == TRUE);
+ g_assert_no_error (error);
+
+ g_assert_error (entry_error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR);
+
+ g_clear_error (&error);
+ g_clear_error (&entry_error);
+ g_object_unref (operation);
+ g_object_unref (inserted_entry_updated);
+ g_object_unref (inserted_entry2_updated);
+ g_object_unref (doc3);
+
+ /* Run another batch operation to update the second entry with the wrong ETag (i.e. pass the old version of the entry to the batch operation
+ * to test error handling */
+ operation = gdata_batchable_create_operation (GDATA_BATCHABLE (service), gdata_documents_service_get_primary_authorization_domain (),
+ BATCH_URI);
+ gdata_test_batch_operation_update (operation, inserted_entry2, NULL, &entry_error);
+ g_assert (gdata_test_batch_operation_run (operation, NULL, &error) == TRUE);
+ g_assert_no_error (error);
+
+ g_assert_error (entry_error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_CONFLICT);
+
+ g_clear_error (&error);
+ g_clear_error (&entry_error);
+ g_object_unref (operation);
+ g_object_unref (inserted_entry2);
+
+ /* Run a final batch operation to delete the second entry */
+ operation = gdata_batchable_create_operation (GDATA_BATCHABLE (service), gdata_documents_service_get_primary_authorization_domain (),
+ BATCH_URI);
+ gdata_test_batch_operation_deletion (operation, inserted_entry3, NULL);
+ g_assert (gdata_test_batch_operation_run (operation, NULL, &error) == TRUE);
+ g_assert_no_error (error);
+
+ g_clear_error (&error);
+ g_object_unref (operation);
+ g_object_unref (inserted_entry3);
+
+ uhm_server_end_trace (mock_server);
+}
+
+typedef struct {
+ GDataDocumentsEntry *new_doc;
+} BatchAsyncData;
+
+static void
+set_up_batch_async (BatchAsyncData *data, gconstpointer service)
+{
+ GDataDocumentsText *doc;
+ gchar *upload_uri;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-batch-async");
+
+ /* Insert a new document which we can query asyncly */
+ doc = gdata_documents_text_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (doc), "A View from the Bridge");
+
+ upload_uri = gdata_documents_service_get_upload_uri (NULL);
+ data->new_doc = GDATA_DOCUMENTS_ENTRY (gdata_service_insert_entry (GDATA_SERVICE (service),
+ gdata_documents_service_get_primary_authorization_domain (),
+ upload_uri, GDATA_ENTRY (doc), NULL, &error));
+ g_free (upload_uri);
+
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_DOCUMENTS_TEXT (data->new_doc));
+ g_clear_error (&error);
+
+ g_object_unref (doc);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_batch_async_cb (GDataBatchOperation *operation, GAsyncResult *async_result, GMainLoop *main_loop)
+{
+ GError *error = NULL;
+
+ /* Clear all pending events (such as callbacks for the operations) */
+ while (g_main_context_iteration (NULL, FALSE) == TRUE);
+
+ g_assert (gdata_test_batch_operation_run_finish (operation, async_result, &error) == TRUE);
+ g_assert_no_error (error);
+ g_clear_error (&error);
+
+ g_main_loop_quit (main_loop);
+}
+
+static void
+test_batch_async (BatchAsyncData *data, gconstpointer service)
+{
+ GDataBatchOperation *operation;
+ GMainLoop *main_loop;
+
+ gdata_test_mock_server_start_trace (mock_server, "batch-async");
+
+ /* Run an async query operation on the document */
+ operation = gdata_batchable_create_operation (GDATA_BATCHABLE (service), gdata_documents_service_get_primary_authorization_domain (),
+ BATCH_URI);
+ gdata_test_batch_operation_query (operation, gdata_entry_get_id (GDATA_ENTRY (data->new_doc)), GDATA_TYPE_DOCUMENTS_TEXT,
+ GDATA_ENTRY (data->new_doc), NULL, NULL);
+
+ main_loop = g_main_loop_new (NULL, TRUE);
+
+ gdata_batch_operation_run_async (operation, NULL, (GAsyncReadyCallback) test_batch_async_cb, main_loop);
+ g_main_loop_run (main_loop);
+
+ g_main_loop_unref (main_loop);
+ g_object_unref (operation);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_batch_async_cancellation_cb (GDataBatchOperation *operation, GAsyncResult *async_result, GMainLoop *main_loop)
+{
+ GError *error = NULL;
+
+ /* Clear all pending events (such as callbacks for the operations) */
+ while (g_main_context_iteration (NULL, FALSE) == TRUE);
+
+ g_assert (gdata_test_batch_operation_run_finish (operation, async_result, &error) == FALSE);
+ g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CANCELLED);
+ g_clear_error (&error);
+
+ g_main_loop_quit (main_loop);
+}
+
+static void
+test_batch_async_cancellation (BatchAsyncData *data, gconstpointer service)
+{
+ GDataBatchOperation *operation;
+ GMainLoop *main_loop;
+ GCancellable *cancellable;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "batch-async-cancellation");
+
+ /* Run an async query operation on the document */
+ operation = gdata_batchable_create_operation (GDATA_BATCHABLE (service), gdata_documents_service_get_primary_authorization_domain (),
+ BATCH_URI);
+ gdata_test_batch_operation_query (operation, gdata_entry_get_id (GDATA_ENTRY (data->new_doc)), GDATA_TYPE_DOCUMENTS_TEXT,
+ GDATA_ENTRY (data->new_doc), NULL, &error);
+
+ main_loop = g_main_loop_new (NULL, TRUE);
+ cancellable = g_cancellable_new ();
+
+ gdata_batch_operation_run_async (operation, cancellable, (GAsyncReadyCallback) test_batch_async_cancellation_cb, main_loop);
+ g_cancellable_cancel (cancellable); /* this should cancel the operation before it even starts, as we haven't run the main loop yet */
+
+ g_main_loop_run (main_loop);
+
+ g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CANCELLED);
+ g_clear_error (&error);
+
+ g_main_loop_unref (main_loop);
+ g_object_unref (cancellable);
+ g_object_unref (operation);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+tear_down_batch_async (BatchAsyncData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "teardown-batch-async");
+
+ delete_entry (GDATA_DOCUMENTS_ENTRY (data->new_doc), GDATA_SERVICE (service));
+ g_object_unref (data->new_doc);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+mock_server_notify_resolver_cb (GObject *object, GParamSpec *pspec, gpointer user_data)
+{
+ UhmServer *server;
+ UhmResolver *resolver;
+
+ server = UHM_SERVER (object);
+
+ /* Set up the expected domain names here. This should technically be split up between
+ * the different unit test suites, but that's too much effort. */
+ resolver = uhm_server_get_resolver (server);
+
+ if (resolver != NULL) {
+ const gchar *ip_address = uhm_server_get_address (server);
+
+ uhm_resolver_add_A (resolver, "www.google.com", ip_address);
+ uhm_resolver_add_A (resolver, "docs.google.com", ip_address);
+ uhm_resolver_add_A (resolver, "lh3.googleusercontent.com", ip_address);
+ uhm_resolver_add_A (resolver, "lh5.googleusercontent.com", ip_address);
+ uhm_resolver_add_A (resolver, "lh6.googleusercontent.com", ip_address);
+ }
+}
+
+/* Set up a global GDataAuthorizer to be used for all the tests. Unfortunately,
+ * the Google Drive API is effectively limited to OAuth2 authorisation,
+ * so this requires user interaction when online.
+ *
+ * If not online, use a dummy authoriser. */
+static GDataAuthorizer *
+create_global_authorizer (void)
+{
+ GDataOAuth2Authorizer *authorizer = NULL; /* owned */
+ gchar *authentication_uri, *authorisation_code;
+ GError *error = NULL;
+
+ /* If not online, just return a dummy authoriser. */
+ if (!uhm_server_get_enable_online (mock_server)) {
+ return GDATA_AUTHORIZER (gdata_dummy_authorizer_new (GDATA_TYPE_DOCUMENTS_SERVICE));
+ }
+
+ /* Otherwise, go through the interactive OAuth dance. */
+ gdata_test_mock_server_start_trace (mock_server, "global-authentication");
+ authorizer = gdata_oauth2_authorizer_new (CLIENT_ID, CLIENT_SECRET, REDIRECT_URI, GDATA_TYPE_DOCUMENTS_SERVICE);
+
+ /* Get an authentication URI */
+ authentication_uri = gdata_oauth2_authorizer_build_authentication_uri (authorizer, NULL, FALSE);
+ g_assert (authentication_uri != NULL);
+
+ /* Get the authorisation code off the user. */
+ authorisation_code = gdata_test_query_user_for_verifier (authentication_uri);
+
+ g_free (authentication_uri);
+
+ if (authorisation_code == NULL) {
+ /* Skip tests. */
+ g_object_unref (authorizer);
+ authorizer = NULL;
+ goto skip_test;
+ }
+
+ /* Authorise the token */
+ g_assert (gdata_oauth2_authorizer_request_authorization (authorizer, authorisation_code, NULL, &error));
+ g_assert_no_error (error);
+
+skip_test:
+ g_free (authorisation_code);
+
+ uhm_server_end_trace (mock_server);
+
+ return GDATA_AUTHORIZER (authorizer);
+}
+
+int
+main (int argc, char *argv[])
+{
+ gint retval;
+ GDataAuthorizer *authorizer = NULL;
+ GDataService *service = NULL;
+ GFile *trace_directory;
+ gchar *path = NULL;
+
+ gdata_test_init (argc, argv);
+
+ mock_server = gdata_test_get_mock_server ();
+ g_signal_connect (G_OBJECT (mock_server), "notify::resolver", (GCallback) mock_server_notify_resolver_cb, NULL);
+ path = g_test_build_filename (G_TEST_DIST, "traces/documents", NULL);
+ trace_directory = g_file_new_for_path (path);
+ g_free (path);
+ uhm_server_set_trace_directory (mock_server, trace_directory);
+ g_object_unref (trace_directory);
+
+ authorizer = create_global_authorizer ();
+ service = GDATA_SERVICE (gdata_documents_service_new (authorizer));
+
+ g_test_add_func ("/documents/authentication", test_authentication);
+
+ g_test_add ("/documents/delete/document", TempDocumentData, service, set_up_temp_document_spreadsheet, test_delete_document,
+ tear_down_temp_document);
+ g_test_add ("/documents/delete/folder", TempFolderData, service, set_up_temp_folder, test_delete_folder, tear_down_temp_folder);
+
+ /* Test all possible combinations of conditions for resumable uploads. */
+ {
+ PayloadType i;
+ FolderType j;
+ ResumableType k;
+ DocumentType l;
+
+ for (i = 0; i < UPLOAD_PAYLOAD_TYPE_MAX + 1; i++) {
+ for (j = 0; j < UPLOAD_FOLDER_TYPE_MAX + 1; j++) {
+ for (k = 0; k < UPLOAD_RESUMABLE_TYPE_MAX + 1; k++) {
+ for (l = 0; l < UPLOAD_DOCUMENT_TYPE_MAX + 1; l++) {
+ UploadDocumentTestParams *test_params;
+ gchar *test_name;
+
+ /* FIXME: Resumable uploads are not implemented. */
+ if (k == UPLOAD_RESUMABLE) {
+ continue;
+ }
+
+ /* FIXME: Conversion during uploads is not implemented. */
+ if (l == UPLOAD_ODT_CONVERT) {
+ continue;
+ }
+
+ /* Resumable metadata-only uploads don't make sense. */
+ if (i == UPLOAD_METADATA_ONLY && k == UPLOAD_RESUMABLE) {
+ continue;
+ }
+ /* Non-resumable non-conversion uploads don't make sense. */
+ if (k == UPLOAD_NON_RESUMABLE && l != UPLOAD_ODT_CONVERT) {
+ continue;
+ }
+
+ test_name = g_strdup_printf ("/documents/upload/%s/%s/%s/%s",
+ payload_type_names[i], folder_type_names[j],
+ resumable_type_names[k], document_type_names[l]);
+
+ /* Allocate a new struct. We leak this. */
+ test_params = g_slice_new0 (UploadDocumentTestParams);
+ test_params->payload_type = i;
+ test_params->folder_type = j;
+ test_params->resumable_type = k;
+ test_params->document_type = l;
+ test_params->test_name = g_strdup (test_name);
+ test_params->service = GDATA_DOCUMENTS_SERVICE (service);
+
+ g_test_add (test_name, UploadDocumentData, test_params, set_up_upload_document, test_upload,
+ tear_down_upload_document);
+
+ g_free (test_name);
+ }
+ }
+ }
+ }
+ }
+
+ g_test_add ("/documents/download/document", TempDocumentsData, service, set_up_temp_documents, test_download_document,
+ tear_down_temp_documents);
+ g_test_add ("/documents/download/thumbnail", TempDocumentData, service, set_up_temp_document_spreadsheet, test_download_thumbnail,
+ tear_down_temp_document);
+
+ /* Test all possible combinations of conditions for resumable updates. */
+ {
+ PayloadType i;
+ ResumableType j;
+
+ for (i = 0; i < UPLOAD_PAYLOAD_TYPE_MAX + 1; i++) {
+ for (j = 0; j < UPLOAD_RESUMABLE_TYPE_MAX + 1; j++) {
+ UpdateDocumentTestParams *test_params;
+ gchar *test_name;
+
+ /* Resumable metadata-only updates don't make sense. */
+ if (i == UPLOAD_METADATA_ONLY && j == UPLOAD_RESUMABLE) {
+ continue;
+ }
+
+ /* FIXME: Resumable uploads are not implemented. */
+ if (j == UPLOAD_RESUMABLE) {
+ continue;
+ }
+
+ test_name = g_strdup_printf ("/documents/update/%s/%s", payload_type_names[i], resumable_type_names[j]);
+
+ /* Allocate a new struct. We leak this. */
+ test_params = g_slice_new0 (UpdateDocumentTestParams);
+ test_params->payload_type = i;
+ test_params->resumable_type = j;
+ test_params->test_name = g_strdup (test_name);
+ test_params->service = GDATA_DOCUMENTS_SERVICE (service);
+
+ g_test_add (test_name, UpdateDocumentData, test_params, set_up_update_document, test_update,
+ tear_down_update_document);
+
+ g_free (test_name);
+ }
+ }
+ }
+
+ g_test_add ("/documents/access-rule/insert", TempDocumentData, service, set_up_temp_document_spreadsheet, test_access_rule_insert,
+ tear_down_temp_document);
+
+ g_test_add ("/documents/query/all_documents", TempDocumentsData, service, set_up_temp_documents, test_query_all_documents,
+ tear_down_temp_documents);
+ g_test_add ("/documents/query/all_documents/with_folder", TempDocumentsData, service, set_up_temp_documents,
+ test_query_all_documents_with_folder, tear_down_temp_documents);
+ g_test_add ("/documents/query/all_documents/async", GDataAsyncTestData, service, set_up_temp_documents_async,
+ test_query_all_documents_async, tear_down_temp_documents_async);
+ g_test_add ("/documents/query/all_documents/async/progress_closure", TempDocumentsData, service, set_up_temp_documents,
+ test_query_all_documents_async_progress_closure, tear_down_temp_documents);
+ g_test_add ("/documents/query/all_documents/async/cancellation", GDataAsyncTestData, service, set_up_temp_documents_async,
+ test_query_all_documents_async_cancellation, tear_down_temp_documents_async);
+
+ g_test_add ("/documents/copy", TempCopyDocumentData, service, set_up_copy_document, test_copy_document, tear_down_copy_document);
+ /*g_test_add ("/documents/copy/async", GDataAsyncTestData, service, set_up_folders_add_to_folder_async,
+ test_folders_add_to_folder_async, tear_down_folders_add_to_folder_async);
+ g_test_add ("/documents/copy/async/cancellation", GDataAsyncTestData, service, set_up_folders_add_to_folder_async,
+ test_folders_add_to_folder_async_cancellation, tear_down_folders_add_to_folder_async);*/
+
+ g_test_add ("/documents/folders/add_to_folder", FoldersData, service, set_up_folders_add_to_folder,
+ test_folders_add_to_folder, tear_down_folders_add_to_folder);
+ g_test_add ("/documents/folders/add_to_folder/async", GDataAsyncTestData, service, set_up_folders_add_to_folder_async,
+ test_folders_add_to_folder_async, tear_down_folders_add_to_folder_async);
+ g_test_add ("/documents/folders/add_to_folder/async/cancellation", GDataAsyncTestData, service, set_up_folders_add_to_folder_async,
+ test_folders_add_to_folder_async_cancellation, tear_down_folders_add_to_folder_async);
+
+ g_test_add ("/documents/folders/remove_from_folder", FoldersData, service, set_up_folders_remove_from_folder,
+ test_folders_remove_from_folder, tear_down_folders_remove_from_folder);
+ g_test_add ("/documents/folders/remove_from_folder/async", GDataAsyncTestData, service, set_up_folders_remove_from_folder_async,
+ test_folders_remove_from_folder_async, tear_down_folders_remove_from_folder_async);
+ g_test_add ("/documents/folders/remove_from_folder/async/cancellation", GDataAsyncTestData, service,
+ set_up_folders_remove_from_folder_async, test_folders_remove_from_folder_async_cancellation,
+ tear_down_folders_remove_from_folder_async);
+
+ g_test_add_data_func ("/documents/batch", service, test_batch);
+ g_test_add ("/documents/batch/async", BatchAsyncData, service, set_up_batch_async, test_batch_async, tear_down_batch_async);
+ g_test_add ("/documents/batch/async/cancellation", BatchAsyncData, service, set_up_batch_async, test_batch_async_cancellation,
+ tear_down_batch_async);
+
+ g_test_add_func ("/documents/folder/parser/normal", test_folder_parser_normal);
+ g_test_add_func ("/documents/query/etag", test_query_etag);
+ g_test_add_func ("/documents/upload-query/properties/convert", test_upload_query_properties_convert);
+
+ retval = g_test_run ();
+
+ if (service != NULL)
+ g_object_unref (service);
+
+ g_clear_object (&authorizer);
+
+ return retval;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2014 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * SECTION:gdata-dummy-authorizer
+ * @short_description: GData dummy authorization interface
+ * @stability: Stable
+ * @include: tests/gdata-dummy-authorizer.h
+ *
+ * #GDataDummyAuthorizer is a dummy #GDataAuthorizer implementation intended for
+ * use in prototyping and testing code. It should not be used in production
+ * code.
+ *
+ * It adds a constant ‘Authorization’ header to all requests it processes whose
+ * domain is in the set of domains the authorizer was initialised with. All
+ * requests for other domains have no header added, and are considered
+ * non-authorized.
+ *
+ * Since: 0.16.0
+ */
+
+#include <config.h>
+#include <string.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+
+#include "gdata-dummy-authorizer.h"
+#include "gdata-private.h"
+
+static void authorizer_init (GDataAuthorizerInterface *iface);
+static void finalize (GObject *object);
+
+static void process_request (GDataAuthorizer *self,
+ GDataAuthorizationDomain *domain,
+ SoupMessage *message);
+static gboolean is_authorized_for_domain (GDataAuthorizer *self,
+ GDataAuthorizationDomain *domain);
+
+struct _GDataDummyAuthorizerPrivate {
+ GMutex mutex; /* mutex for authorization_domains */
+
+ /* Mapping from GDataAuthorizationDomain to itself; a set of domains
+ * which are authorised. */
+ GHashTable *authorization_domains;
+};
+
+G_DEFINE_TYPE_WITH_CODE (GDataDummyAuthorizer, gdata_dummy_authorizer,
+ G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_AUTHORIZER,
+ authorizer_init))
+
+static void
+gdata_dummy_authorizer_class_init (GDataDummyAuthorizerClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GDataDummyAuthorizerPrivate));
+
+ gobject_class->finalize = finalize;
+}
+
+static void
+authorizer_init (GDataAuthorizerInterface *iface)
+{
+ iface->process_request = process_request;
+ iface->is_authorized_for_domain = is_authorized_for_domain;
+}
+
+static void
+gdata_dummy_authorizer_init (GDataDummyAuthorizer *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
+ GDATA_TYPE_DUMMY_AUTHORIZER,
+ GDataDummyAuthorizerPrivate);
+
+ /* Set up the authorizer's mutex */
+ g_mutex_init (&(self->priv->mutex));
+ self->priv->authorization_domains = g_hash_table_new_full (g_direct_hash,
+ g_direct_equal,
+ g_object_unref,
+ NULL);
+}
+
+static void
+finalize (GObject *object)
+{
+ GDataDummyAuthorizerPrivate *priv = GDATA_DUMMY_AUTHORIZER (object)->priv;
+
+ g_hash_table_destroy (priv->authorization_domains);
+ g_mutex_clear (&(priv->mutex));
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (gdata_dummy_authorizer_parent_class)->finalize (object);
+}
+
+static void
+process_request (GDataAuthorizer *self, GDataAuthorizationDomain *domain,
+ SoupMessage *message)
+{
+ GDataDummyAuthorizerPrivate *priv = GDATA_DUMMY_AUTHORIZER (self)->priv;
+
+ /* Set the authorisation header */
+ g_mutex_lock (&(priv->mutex));
+
+ if (g_hash_table_lookup (priv->authorization_domains, domain) != NULL) {
+ soup_message_headers_replace (message->request_headers,
+ "Authorization", "dummy");
+ }
+
+ g_mutex_unlock (&(priv->mutex));
+}
+
+static gboolean
+is_authorized_for_domain (GDataAuthorizer *self,
+ GDataAuthorizationDomain *domain)
+{
+ GDataDummyAuthorizerPrivate *priv = GDATA_DUMMY_AUTHORIZER (self)->priv;
+ gpointer result;
+
+ g_mutex_lock (&(priv->mutex));
+ result = g_hash_table_lookup (priv->authorization_domains, domain);
+ g_mutex_unlock (&(priv->mutex));
+
+ /* Sanity check */
+ g_assert (result == NULL || result == domain);
+
+ return (result != NULL);
+}
+
+/*
+ * gdata_dummy_authorizer_new:
+ * @service_type: the #GType of a #GDataService subclass which the
+ * #GDataDummyAuthorizer will be used with
+ *
+ * Creates a new #GDataDummyAuthorizer.
+ *
+ * The #GDataAuthorizationDomains for the given @service_type (i.e. as
+ * returned by gdata_service_get_authorization_domains()) will be authorized,
+ * and all others will not.
+ *
+ * Return value: (transfer full): a new #GDataDummyAuthorizer; unref with
+ * g_object_unref()
+ *
+ * Since: 0.16.0
+ */
+GDataDummyAuthorizer *
+gdata_dummy_authorizer_new (GType service_type)
+{
+ GList/*<unowned GDataAuthorizationDomain>*/ *domains; /* owned */
+ GDataDummyAuthorizer *retval = NULL; /* owned */
+
+ g_return_val_if_fail (g_type_is_a (service_type, GDATA_TYPE_SERVICE),
+ NULL);
+
+ domains = gdata_service_get_authorization_domains (service_type);
+ retval = gdata_dummy_authorizer_new_for_authorization_domains (domains);
+ g_list_free (domains);
+
+ return retval;
+}
+
+/*
+ * gdata_dummy_authorizer_new_for_authorization_domains:
+ * @authorization_domains: (element-type GDataAuthorizationDomain) (transfer none):
+ * a non-empty list of #GDataAuthorizationDomains to be authorized
+ * against by the #GDataDummyAuthorizer
+ *
+ * Creates a new #GDataDummyAuthorizer. This function is intended to be used
+ * only when the default authorization domain list for a single #GDataService,
+ * as used by gdata_dummy_authorizer_new(), isn't suitable. For example, this
+ * could be because the #GDataDummyAuthorizer will be used with multiple
+ * #GDataService subclasses, or because the client requires a specific set of
+ * authorization domains.
+ *
+ * Return value: (transfer full): a new #GDataDummyAuthorizer; unref with
+ * g_object_unref()
+ *
+ * Since: 0.16.0
+ */
+GDataDummyAuthorizer *
+gdata_dummy_authorizer_new_for_authorization_domains (GList *authorization_domains)
+{
+ GList *i;
+ GDataDummyAuthorizer *authorizer;
+
+ g_return_val_if_fail (authorization_domains != NULL, NULL);
+
+ authorizer = GDATA_DUMMY_AUTHORIZER (g_object_new (GDATA_TYPE_DUMMY_AUTHORIZER,
+ NULL));
+
+ /* Register all the domains with the authorizer */
+ for (i = authorization_domains; i != NULL; i = i->next) {
+ GDataAuthorizationDomain *domain;
+
+ g_return_val_if_fail (GDATA_IS_AUTHORIZATION_DOMAIN (i->data),
+ NULL);
+
+ /* We don't have to lock the authoriser's mutex here as no other
+ * code has seen the authoriser yet */
+ domain = GDATA_AUTHORIZATION_DOMAIN (i->data);
+ g_hash_table_insert (authorizer->priv->authorization_domains,
+ g_object_ref (domain), domain);
+ }
+
+ return authorizer;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2014 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GDATA_DUMMY_AUTHORIZER_H
+#define GDATA_DUMMY_AUTHORIZER_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include "gdata-authorizer.h"
+
+G_BEGIN_DECLS
+
+#define GDATA_TYPE_DUMMY_AUTHORIZER (gdata_dummy_authorizer_get_type ())
+#define GDATA_DUMMY_AUTHORIZER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_DUMMY_AUTHORIZER, GDataDummyAuthorizer))
+#define GDATA_DUMMY_AUTHORIZER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_DUMMY_AUTHORIZER, GDataDummyAuthorizerClass))
+#define GDATA_IS_DUMMY_AUTHORIZER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_DUMMY_AUTHORIZER))
+#define GDATA_IS_DUMMY_AUTHORIZER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_DUMMY_AUTHORIZER))
+#define GDATA_DUMMY_AUTHORIZER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_DUMMY_AUTHORIZER, GDataDummyAuthorizerClass))
+
+typedef struct _GDataDummyAuthorizerPrivate GDataDummyAuthorizerPrivate;
+
+/**
+ * GDataDummyAuthorizer:
+ *
+ * All the fields in the #GDataDummyAuthorizer structure are private and should never be accessed directly.
+ *
+ * Since: 0.16.0
+ */
+typedef struct {
+ /*< private >*/
+ GObject parent;
+ GDataDummyAuthorizerPrivate *priv;
+} GDataDummyAuthorizer;
+
+/**
+ * GDataDummyAuthorizerClass:
+ *
+ * All the fields in the #GDataDummyAuthorizerClass structure are private and should never be accessed directly.
+ *
+ * Since: 0.16.0
+ */
+typedef struct {
+ /*< private >*/
+ GObjectClass parent;
+
+ /*< private >*/
+ /* Padding for future expansion */
+ void (*_g_reserved0) (void);
+ void (*_g_reserved1) (void);
+} GDataDummyAuthorizerClass;
+
+GType gdata_dummy_authorizer_get_type (void) G_GNUC_CONST;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataDummyAuthorizer, g_object_unref)
+
+GDataDummyAuthorizer *gdata_dummy_authorizer_new (GType service_type) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+GDataDummyAuthorizer *gdata_dummy_authorizer_new_for_authorization_domains (GList *authorization_domains) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
+
+G_END_DECLS
+
+#endif /* !GDATA_DUMMY_AUTHORIZER_H */
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2008–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib.h>
+#include <locale.h>
+
+#include "gdata.h"
+#include "common.h"
+
+static void
+test_documents_property_parse_json (void)
+{
+ GDataDocumentsProperty *property;
+ GError *error = NULL;
+
+ /* Create an entry from JSON with unhandled nodes. */
+ property = GDATA_DOCUMENTS_PROPERTY (gdata_parsable_new_from_json (GDATA_TYPE_DOCUMENTS_PROPERTY,
+ "{"
+ "\"key\":\"foobar\","
+ "\"etag\":\"some-etag\","
+ "\"value\":\"some foobar value\","
+ "\"visibility\":\"PUBLIC\","
+ "\"unhandled-boolean\":false,"
+ "\"unhandled-string\":\"this-is-a-string---sometimes\","
+ "\"unhandled-int\":15,"
+ "\"unhandled-double\":42.42,"
+ "\"unhandled-object\":{"
+ "\"a\":true,"
+ "\"b\":true"
+ "},"
+ "\"unhandled-array\":["
+ "1,"
+ "2,"
+ "3"
+ "],"
+ "\"unhandled-null\":null"
+ "}", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_DOCUMENTS_PROPERTY (property));
+
+ /* Now check the outputted JSON from the property still has the unhandled nodes. */
+ gdata_test_assert_json (property,
+ "{"
+ "\"key\":\"foobar\","
+ "\"etag\":\"some-etag\","
+ "\"value\":\"some foobar value\","
+ "\"visibility\":\"PUBLIC\","
+ "\"unhandled-boolean\":false,"
+ "\"unhandled-string\":\"this-is-a-string---sometimes\","
+ "\"unhandled-int\":15,"
+ "\"unhandled-double\":42.42,"
+ "\"unhandled-object\":{"
+ "\"a\":true,"
+ "\"b\":true"
+ "},"
+ "\"unhandled-array\":["
+ "1,"
+ "2,"
+ "3"
+ "],"
+ "\"unhandled-null\":null"
+ "}");
+ g_object_unref (property);
+}
+
+static void
+test_documents_property_get_json (void)
+{
+ GDataDocumentsProperty *property1, *property2;
+ gchar *json;
+ GError *error = NULL;
+
+ property1 = gdata_documents_property_new ("Testing key & \"escaping\"");
+
+ /* Set the properties more conventionally */
+ gdata_documents_property_set_value (property1, "Testing value & \"escaping\"");
+ gdata_documents_property_set_visibility (property1, GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PRIVATE);
+
+ /* Check the generated JSON's OK */
+ gdata_test_assert_json (property1,
+ "{"
+ "\"key\":\"Testing key & \\\"escaping\\\"\","
+ "\"value\":\"Testing value & \\\"escaping\\\"\","
+ "\"visibility\":\"PRIVATE\""
+ "}");
+
+ /* Check again by re-parsing the JSON to a GDataEntry. */
+ json = gdata_parsable_get_json (GDATA_PARSABLE (property1));
+ property2 = GDATA_DOCUMENTS_PROPERTY (gdata_parsable_new_from_json (GDATA_TYPE_DOCUMENTS_PROPERTY, json, -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_DOCUMENTS_PROPERTY (property2));
+ g_clear_error (&error);
+ g_free (json);
+
+ g_assert_cmpstr (gdata_documents_property_get_key (property1), ==, gdata_documents_property_get_key (property2));
+ g_assert_cmpstr (gdata_documents_property_get_etag (property1), ==, gdata_documents_property_get_etag (property2));
+ g_assert_cmpstr (gdata_documents_property_get_value (property1), ==, gdata_documents_property_get_value (property2));
+ g_assert_cmpstr (gdata_documents_property_get_visibility (property1), ==, gdata_documents_property_get_visibility (property2));
+
+ g_object_unref (property1);
+ g_object_unref (property2);
+}
+
+static void
+test_xml_comparison (void)
+{
+ GDataAccessRule *rule;
+
+ /* Since we've written the XML comparison function used across all the test suites, it's necessary to test that it actually works before we
+ * blindly assert that its results are correct. */
+ rule = gdata_access_rule_new ("an-id");
+ gdata_access_rule_set_role (rule, GDATA_ACCESS_ROLE_NONE);
+ gdata_access_rule_set_scope (rule, GDATA_ACCESS_SCOPE_USER, "foo@example.com");
+
+ /* Check a valid comparison */
+ gdata_test_assert_xml (rule,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:gAcl='http://schemas.google.com/acl/2007'>"
+ "<title type='text'>none</title>"
+ "<id>an-id</id>"
+ "<category term='http://schemas.google.com/acl/2007#accessRule' scheme='http://schemas.google.com/g/2005#kind'/>"
+ "<gAcl:role value='none'/>"
+ "<gAcl:scope type='user' value='foo@example.com'/>"
+ "</entry>");
+
+ /* Check a valid comparison with namespaces swapped */
+ gdata_test_assert_xml (rule,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:gAcl='http://schemas.google.com/acl/2007' "
+ "xmlns:gd='http://schemas.google.com/g/2005'>"
+ "<title type='text'>none</title>"
+ "<id>an-id</id>"
+ "<category term='http://schemas.google.com/acl/2007#accessRule' scheme='http://schemas.google.com/g/2005#kind'/>"
+ "<gAcl:role value='none'/>"
+ "<gAcl:scope type='user' value='foo@example.com'/>"
+ "</entry>");
+
+ /* Check a valid comparison with elements swapped */
+ gdata_test_assert_xml (rule,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:gAcl='http://schemas.google.com/acl/2007'>"
+ "<id>an-id</id>"
+ "<title type='text'>none</title>"
+ "<category term='http://schemas.google.com/acl/2007#accessRule' scheme='http://schemas.google.com/g/2005#kind'/>"
+ "<gAcl:role value='none'/>"
+ "<gAcl:scope type='user' value='foo@example.com'/>"
+ "</entry>");
+
+ /* Missing namespace (still valid XML, just not what's expected) */
+ g_assert (gdata_test_compare_xml (GDATA_PARSABLE (rule),
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:gAcl='http://schemas.google.com/acl/2007'>"
+ "<title type='text'>none</title>"
+ "<id>an-id</id>"
+ "<category term='http://schemas.google.com/acl/2007#accessRule' scheme='http://schemas.google.com/g/2005#kind'/>"
+ "<gAcl:role value='none'/>"
+ "<gAcl:scope type='user' value='foo@example.com'/>"
+ "</entry>", FALSE) == FALSE);
+
+ /* Extra namespace */
+ g_assert (gdata_test_compare_xml (GDATA_PARSABLE (rule),
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:gAcl='http://schemas.google.com/acl/2007' "
+ "xmlns:foo='http://foo.com/'>"
+ "<title type='text'>none</title>"
+ "<id>an-id</id>"
+ "<category term='http://schemas.google.com/acl/2007#accessRule' scheme='http://schemas.google.com/g/2005#kind'/>"
+ "<gAcl:role value='none'/>"
+ "<gAcl:scope type='user' value='foo@example.com'/>"
+ "</entry>", FALSE) == FALSE);
+
+ /* Missing element */
+ g_assert (gdata_test_compare_xml (GDATA_PARSABLE (rule),
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:gAcl='http://schemas.google.com/acl/2007'>"
+ "<id>an-id</id>"
+ "<category term='http://schemas.google.com/acl/2007#accessRule' scheme='http://schemas.google.com/g/2005#kind'/>"
+ "<gAcl:role value='none'/>"
+ "<gAcl:scope type='user' value='foo@example.com'/>"
+ "</entry>", FALSE) == FALSE);
+
+ /* Extra element */
+ g_assert (gdata_test_compare_xml (GDATA_PARSABLE (rule),
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:gAcl='http://schemas.google.com/acl/2007'>"
+ "<title type='text'>none</title>"
+ "<foo>bar</foo>"
+ "<id>an-id</id>"
+ "<category term='http://schemas.google.com/acl/2007#accessRule' scheme='http://schemas.google.com/g/2005#kind'/>"
+ "<gAcl:role value='none'/>"
+ "<gAcl:scope type='user' value='foo@example.com'/>"
+ "</entry>", FALSE) == FALSE);
+
+ /* Incorrect namespace on element */
+ g_assert (gdata_test_compare_xml (GDATA_PARSABLE (rule),
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:gAcl='http://schemas.google.com/acl/2007'>"
+ "<gAcl:title type='text'>none</gAcl:title>"
+ "<id>an-id</id>"
+ "<category term='http://schemas.google.com/acl/2007#accessRule' scheme='http://schemas.google.com/g/2005#kind'/>"
+ "<gAcl:role value='none'/>"
+ "<gAcl:scope type='user' value='foo@example.com'/>"
+ "</entry>", FALSE) == FALSE);
+
+ /* Mis-valued content */
+ g_assert (gdata_test_compare_xml (GDATA_PARSABLE (rule),
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:gAcl='http://schemas.google.com/acl/2007'>"
+ "<title type='text'>none</title>"
+ "<id>an-other-id</id>"
+ "<category term='http://schemas.google.com/acl/2007#accessRule' scheme='http://schemas.google.com/g/2005#kind'/>"
+ "<gAcl:role value='none'/>"
+ "<gAcl:scope type='user' value='foo@example.com'/>"
+ "</entry>", FALSE) == FALSE);
+
+ /* Missing attribute */
+ g_assert (gdata_test_compare_xml (GDATA_PARSABLE (rule),
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:gAcl='http://schemas.google.com/acl/2007'>"
+ "<title type='text'>none</title>"
+ "<id>an-id</id>"
+ "<category term='http://schemas.google.com/acl/2007#accessRule' scheme='http://schemas.google.com/g/2005#kind'/>"
+ "<gAcl:role/>"
+ "<gAcl:scope type='user' value='foo@example.com'/>"
+ "</entry>", FALSE) == FALSE);
+
+ /* Extra attribute */
+ g_assert (gdata_test_compare_xml (GDATA_PARSABLE (rule),
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:gAcl='http://schemas.google.com/acl/2007'>"
+ "<title type='text'>none</title>"
+ "<id>an-id</id>"
+ "<category term='http://schemas.google.com/acl/2007#accessRule' scheme='http://schemas.google.com/g/2005#kind'/>"
+ "<gAcl:role value='none' other-value='foo'/>"
+ "<gAcl:scope type='user' value='foo@example.com'/>"
+ "</entry>", FALSE) == FALSE);
+
+ /* Mis-valued attribute */
+ g_assert (gdata_test_compare_xml (GDATA_PARSABLE (rule),
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:gAcl='http://schemas.google.com/acl/2007'>"
+ "<title type='text'>none</title>"
+ "<id>an-id</id>"
+ "<category term='http://schemas.google.com/acl/2007#accessRule' scheme='http://schemas.google.com/g/2005#kind'/>"
+ "<gAcl:role value='other'/>"
+ "<gAcl:scope type='user' value='foo@example.com'/>"
+ "</entry>", FALSE) == FALSE);
+
+ g_object_unref (rule);
+}
+
+static void
+test_entry_get_xml (void)
+{
+ gint64 updated, published, updated2, published2, updated3, published3;
+ GDataEntry *entry, *entry2;
+ GDataCategory *category;
+ GDataLink *_link; /* stupid unistd.h */
+ GDataAuthor *author;
+ gchar *xml, *title, *summary, *id, *etag, *content, *content_uri, *rights;
+ gboolean is_inserted;
+ GList *list;
+ GError *error = NULL;
+
+ entry = gdata_entry_new (NULL);
+
+ /* Test setting properties directly */
+ g_object_set (G_OBJECT (entry),
+ "title", "First testing title & escaping",
+ "summary", "Test summary & escaping.",
+ "content", "Test <markup> & escaping.",
+ "rights", "Philip Withnall <philip@tecnocode.co.uk>",
+ NULL);
+
+ g_assert_cmpstr (gdata_entry_get_title (entry), ==, "First testing title & escaping");
+ g_assert_cmpstr (gdata_entry_get_summary (entry), ==, "Test summary & escaping.");
+ g_assert_cmpstr (gdata_entry_get_content (entry), ==, "Test <markup> & escaping.");
+ g_assert (gdata_entry_get_content_uri (entry) == NULL);
+ g_assert_cmpstr (gdata_entry_get_rights (entry), ==, "Philip Withnall <philip@tecnocode.co.uk>");
+
+ /* Set the properties more conventionally */
+ gdata_entry_set_title (entry, "Testing title & escaping");
+ gdata_entry_set_summary (entry, NULL);
+ gdata_entry_set_content (entry, "This is some sample content testing, amongst other things, <markup> & odd characters‽");
+ gdata_entry_set_rights (entry, NULL);
+
+ /* Content URI */
+ g_object_set (G_OBJECT (entry), "content-uri", "http://foo.com/", NULL);
+
+ g_assert (gdata_entry_get_content (entry) == NULL);
+ g_assert_cmpstr (gdata_entry_get_content_uri (entry), ==, "http://foo.com/");
+
+ gdata_entry_set_content_uri (entry, "http://bar.com/");
+
+ /* Check the generated XML's OK */
+ gdata_test_assert_xml (entry,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'>"
+ "<title type='text'>Testing title & escaping</title>"
+ "<content type='text/plain' src='http://bar.com/'/>"
+ "</entry>");
+
+ /* Reset the content */
+ gdata_entry_set_content (entry, "This is some sample content testing, amongst other things, <markup> & odd characters‽");
+
+ /* Categories */
+ category = gdata_category_new ("test", NULL, NULL);
+ gdata_entry_add_category (entry, category);
+ g_object_unref (category);
+ category = gdata_category_new ("example", NULL, "Example stuff");
+ gdata_entry_add_category (entry, category);
+ g_object_unref (category);
+ category = gdata_category_new ("Film", "http://gdata.youtube.com/schemas/2007/categories.cat", "Film & Animation");
+ gdata_entry_add_category (entry, category);
+ g_object_unref (category);
+
+ /* Links */
+ _link = gdata_link_new ("http://test.com/", GDATA_LINK_SELF);
+ gdata_link_set_content_type (_link, "application/atom+xml");
+ gdata_entry_add_link (entry, _link);
+ g_object_unref (_link);
+ _link = gdata_link_new ("http://example.com/", NULL);
+ gdata_entry_add_link (entry, _link);
+ g_object_unref (_link);
+ _link = gdata_link_new ("http://test.mn/", GDATA_LINK_RELATED);
+ gdata_link_set_content_type (_link, "text/html");
+ gdata_link_set_language (_link, "mn");
+ gdata_link_set_title (_link, "A treatise on Mongolian test websites & other stuff.");
+ gdata_link_set_length (_link, 5010);
+ gdata_entry_add_link (entry, _link);
+ g_object_unref (_link);
+ _link = gdata_link_new ("http://example.com/", "http://foobar.link");
+ gdata_entry_add_link (entry, _link);
+ g_object_unref (_link);
+ _link = gdata_link_new ("http://example2.com/", "http://foobar.link");
+ gdata_entry_add_link (entry, _link);
+ g_object_unref (_link);
+
+ /* Authors */
+ author = gdata_author_new ("Joe Bloggs", "http://example.com/", "joe@example.com");
+ gdata_entry_add_author (entry, author);
+ g_object_unref (author);
+ author = gdata_author_new ("John Smith", NULL, "smith.john@example.com");
+ gdata_entry_add_author (entry, author);
+ g_object_unref (author);
+ author = gdata_author_new ("F. Barr؟", NULL, NULL);
+ gdata_entry_add_author (entry, author);
+ g_object_unref (author);
+
+ /* Check the generated XML's OK */
+ gdata_test_assert_xml (entry,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'>"
+ "<title type='text'>Testing title & escaping</title>"
+ "<content type='text'>This is some sample content testing, amongst other things, <markup> & odd characters\342\200\275</content>"
+ "<category term='Film' scheme='http://gdata.youtube.com/schemas/2007/categories.cat' label='Film & Animation'/>"
+ "<category term='example' label='Example stuff'/>"
+ "<category term='test'/>"
+ "<link href='http://example2.com/' rel='http://foobar.link'/>"
+ "<link href='http://example.com/' rel='http://foobar.link'/>"
+ "<link href='http://test.mn/' title='A treatise on Mongolian test websites & other stuff.' rel='http://www.iana.org/assignments/relation/related' type='text/html' hreflang='mn' length='5010'/>"
+ "<link href='http://example.com/' rel='http://www.iana.org/assignments/relation/alternate'/>"
+ "<link href='http://test.com/' rel='http://www.iana.org/assignments/relation/self' type='application/atom+xml'/>"
+ "<author><name>F. Barr\330\237</name></author>"
+ "<author><name>John Smith</name><email>smith.john@example.com</email></author>"
+ "<author><name>Joe Bloggs</name><uri>http://example.com/</uri><email>joe@example.com</email></author>"
+ "</entry>");
+
+ /* Check again by re-parsing the XML to a GDataEntry */
+ xml = gdata_parsable_get_xml (GDATA_PARSABLE (entry));
+ entry2 = GDATA_ENTRY (gdata_parsable_new_from_xml (GDATA_TYPE_ENTRY, xml, -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_ENTRY (entry2));
+ g_clear_error (&error);
+ g_free (xml);
+
+ g_assert_cmpstr (gdata_entry_get_title (entry), ==, gdata_entry_get_title (entry2));
+ g_assert_cmpstr (gdata_entry_get_id (entry), ==, gdata_entry_get_id (entry2)); /* should both be NULL */
+ g_assert_cmpstr (gdata_entry_get_content (entry), ==, gdata_entry_get_content (entry2));
+ g_assert_cmpstr (gdata_entry_get_content_uri (entry), ==, gdata_entry_get_content_uri (entry2)); /* should both be NULL */
+
+ updated = gdata_entry_get_updated (entry);
+ updated2 = gdata_entry_get_updated (entry2);
+ g_assert_cmpuint (updated, ==, updated2);
+
+ published = gdata_entry_get_published (entry);
+ published2 = gdata_entry_get_published (entry2);
+ g_assert_cmpuint (published, ==, published2);
+
+ /* Check links */
+ _link = gdata_entry_look_up_link (entry, GDATA_LINK_SELF);
+ g_assert (_link != NULL);
+ g_assert_cmpstr (gdata_link_get_uri (_link), ==, "http://test.com/");
+ g_assert_cmpstr (gdata_link_get_relation_type (_link), ==, GDATA_LINK_SELF);
+ g_assert_cmpstr (gdata_link_get_content_type (_link), ==, "application/atom+xml");
+
+ _link = gdata_entry_look_up_link (entry, "http://link.not.exist");
+ g_assert (_link == NULL);
+
+ list = gdata_entry_look_up_links (entry, "http://foobar.link");
+ g_assert (list != NULL);
+ g_assert_cmpint (g_list_length (list), ==, 2);
+
+ _link = GDATA_LINK (list->data);
+ g_assert (_link != NULL);
+ g_assert_cmpstr (gdata_link_get_uri (_link), ==, "http://example2.com/");
+ g_assert_cmpstr (gdata_link_get_relation_type (_link), ==, "http://foobar.link");
+
+ _link = GDATA_LINK (list->next->data);
+ g_assert (_link != NULL);
+ g_assert_cmpstr (gdata_link_get_uri (_link), ==, "http://example.com/");
+ g_assert_cmpstr (gdata_link_get_relation_type (_link), ==, "http://foobar.link");
+
+ g_list_free (list);
+
+ /* Check authors */
+ list = gdata_entry_get_authors (entry);
+ g_assert_cmpuint (g_list_length (list), ==, 3);
+
+ author = GDATA_AUTHOR (list->data);
+ g_assert (author != NULL);
+ g_assert_cmpstr (gdata_author_get_name (author), ==, "F. Barr؟");
+ g_assert (gdata_author_get_uri (author) == NULL);
+ g_assert (gdata_author_get_email_address (author) == NULL);
+
+ author = GDATA_AUTHOR (list->next->data);
+ g_assert (author != NULL);
+ g_assert_cmpstr (gdata_author_get_name (author), ==, "John Smith");
+ g_assert (gdata_author_get_uri (author) == NULL);
+ g_assert_cmpstr (gdata_author_get_email_address (author), ==, "smith.john@example.com");
+
+ author = GDATA_AUTHOR (list->next->next->data);
+ g_assert (author != NULL);
+ g_assert_cmpstr (gdata_author_get_name (author), ==, "Joe Bloggs");
+ g_assert_cmpstr (gdata_author_get_uri (author), ==, "http://example.com/");
+ g_assert_cmpstr (gdata_author_get_email_address (author), ==, "joe@example.com");
+
+ /* Check categories */
+ list = gdata_entry_get_categories (entry);
+ g_assert (list != NULL);
+ g_assert_cmpint (g_list_length (list), ==, 3);
+
+ category = GDATA_CATEGORY (list->data);
+ g_assert (category != NULL);
+ g_assert_cmpstr (gdata_category_get_term (category), ==, "Film");
+ g_assert_cmpstr (gdata_category_get_scheme (category), ==, "http://gdata.youtube.com/schemas/2007/categories.cat");
+ g_assert_cmpstr (gdata_category_get_label (category), ==, "Film & Animation");
+
+ category = GDATA_CATEGORY (list->next->data);
+ g_assert (category != NULL);
+ g_assert_cmpstr (gdata_category_get_term (category), ==, "example");
+ g_assert (gdata_category_get_scheme (category) == NULL);
+ g_assert_cmpstr (gdata_category_get_label (category), ==, "Example stuff");
+
+ category = GDATA_CATEGORY (list->next->next->data);
+ g_assert (category != NULL);
+ g_assert_cmpstr (gdata_category_get_term (category), ==, "test");
+ g_assert (gdata_category_get_scheme (category) == NULL);
+ g_assert (gdata_category_get_label (category) == NULL);
+
+ /* TODO: Check authors */
+
+ /* Check properties a different way */
+ g_object_get (G_OBJECT (entry2),
+ "title", &title,
+ "summary", &summary,
+ "id", &id,
+ "etag", &etag,
+ "updated", &updated3,
+ "published", &published3,
+ "content", &content,
+ "content-uri", &content_uri,
+ "is-inserted", &is_inserted,
+ "rights", &rights,
+ NULL);
+
+ g_assert_cmpstr (title, ==, gdata_entry_get_title (entry));
+ g_assert_cmpstr (summary, ==, gdata_entry_get_summary (entry));
+ g_assert_cmpstr (id, ==, gdata_entry_get_id (entry));
+ g_assert_cmpstr (etag, ==, gdata_entry_get_etag (entry));
+ g_assert_cmpint (updated3, ==, updated);
+ g_assert_cmpint (published3, ==, published);
+ g_assert_cmpstr (content, ==, gdata_entry_get_content (entry));
+ g_assert_cmpstr (content_uri, ==, gdata_entry_get_content_uri (entry));
+ g_assert (is_inserted == FALSE);
+ g_assert_cmpstr (rights, ==, gdata_entry_get_rights (entry));
+
+ g_free (title);
+ g_free (summary);
+ g_free (id);
+ g_free (etag);
+ g_free (content);
+ g_free (content_uri);
+ g_free (rights);
+
+ /* Set the content URI and check that */
+ gdata_entry_set_content_uri (entry, "http://baz.net/");
+
+ g_object_get (G_OBJECT (entry),
+ "content", &content,
+ "content-uri", &content_uri,
+ NULL);
+
+ g_assert_cmpstr (content, ==, gdata_entry_get_content (entry));
+ g_assert_cmpstr (content_uri, ==, gdata_entry_get_content_uri (entry));
+
+ g_free (content);
+ g_free (content_uri);
+
+ g_object_unref (entry);
+ g_object_unref (entry2);
+}
+
+static void
+test_entry_get_json (void)
+{
+ gint64 updated, published, updated2, published2;
+ GDataEntry *entry, *entry2;
+ gchar *json;
+ GError *error = NULL;
+
+ entry = gdata_entry_new (NULL);
+
+ /* Set the properties more conventionally */
+ gdata_entry_set_title (entry, "Testing title & \"escaping\"");
+ gdata_entry_set_summary (entry, NULL);
+ gdata_entry_set_content (entry, NULL);
+ gdata_entry_set_rights (entry, NULL);
+
+ /* Check the generated JSON's OK */
+ gdata_test_assert_json (entry,
+ "{"
+ "\"title\":\"Testing title & \\\"escaping\\\"\""
+ "}");
+
+ /* Check again by re-parsing the JSON to a GDataEntry. */
+ json = gdata_parsable_get_json (GDATA_PARSABLE (entry));
+ entry2 = GDATA_ENTRY (gdata_parsable_new_from_json (GDATA_TYPE_ENTRY, json, -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_ENTRY (entry2));
+ g_clear_error (&error);
+ g_free (json);
+
+ g_assert_cmpstr (gdata_entry_get_title (entry), ==, gdata_entry_get_title (entry2));
+ g_assert_cmpstr (gdata_entry_get_id (entry), ==, gdata_entry_get_id (entry2)); /* should both be NULL */
+ g_assert_cmpstr (gdata_entry_get_content (entry), ==, gdata_entry_get_content (entry2));
+ g_assert_cmpstr (gdata_entry_get_content_uri (entry), ==, gdata_entry_get_content_uri (entry2)); /* should both be NULL */
+
+ updated = gdata_entry_get_updated (entry);
+ updated2 = gdata_entry_get_updated (entry2);
+ g_assert_cmpuint (updated, ==, updated2);
+
+ published = gdata_entry_get_published (entry);
+ published2 = gdata_entry_get_published (entry2);
+ g_assert_cmpuint (published, ==, published2);
+
+ g_object_unref (entry);
+ g_object_unref (entry2);
+}
+
+static void
+test_entry_parse_xml (void)
+{
+ GDataEntry *entry;
+ GError *error = NULL;
+
+ /* Create an entry from XML with unhandled elements */
+ entry = GDATA_ENTRY (gdata_parsable_new_from_xml (GDATA_TYPE_ENTRY,
+ "<entry xmlns='http://www.w3.org/2005/Atom' xmlns:ns='http://example.com/'>"
+ "<title type='text'>Testing unhandled XML</title>"
+ "<updated>2009-01-25T14:07:37Z</updated>"
+ "<published>2009-01-23T14:06:37Z</published>"
+ "<content type='text'>Here we test unhandled XML elements.</content>"
+ "<foobar>Test!</foobar>"
+ "<barfoo shizzle='zing'/>"
+ "<ns:barfoo shizzle='zing' fo='shizzle'>How about some characters‽</ns:barfoo>"
+ "</entry>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_ENTRY (entry));
+ g_clear_error (&error);
+
+ /* Now check the outputted XML from the entry still has the unhandled elements */
+ gdata_test_assert_xml (entry,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' xmlns:ns='http://example.com/'>"
+ "<title type='text'>Testing unhandled XML</title>"
+ "<updated>2009-01-25T14:07:37Z</updated>"
+ "<published>2009-01-23T14:06:37Z</published>"
+ "<content type='text'>Here we test unhandled XML elements.</content>"
+ "<foobar>Test!</foobar>"
+ "<barfoo shizzle=\"zing\"/>"
+ "<ns:barfoo shizzle=\"zing\" fo=\"shizzle\">How about some characters‽</ns:barfoo>"
+ "</entry>");
+ g_object_unref (entry);
+}
+
+static void
+test_entry_parse_xml_kind_category (void)
+{
+ GDataEntry *entry;
+ GError *error = NULL;
+
+ g_test_bug ("707477");
+
+ /* Create an entry from XML with a ‘kind’ category with extra attributes. */
+ entry = GDATA_ENTRY (gdata_parsable_new_from_xml (GDATA_TYPE_ENTRY,
+ "<entry xmlns='http://www.w3.org/2005/Atom'>"
+ "<title type='text'>Testing kind categories</title>"
+ "<updated>2009-01-25T14:07:37Z</updated>"
+ "<published>2009-01-23T14:06:37Z</published>"
+ "<content type='text'>Here we test kind categories.</content>"
+ "<category scheme='http://schemas.google.com/g/2005#kind' "
+ "term='http://schemas.google.com/docs/2007#file' "
+ "label='application/vnd.oasis.opendocument.presentation'/>"
+ "<category scheme='http://schemas.google.com/g/2005/labels' "
+ "term='http://schemas.google.com/g/2005/labels#modified-by-me' "
+ "label='modified-by-me'/>"
+ "</entry>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_ENTRY (entry));
+ g_clear_error (&error);
+
+ /* Now check the outputted XML from the entry still has the extra attributes */
+ gdata_test_assert_xml (entry,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'>"
+ "<title type='text'>Testing kind categories</title>"
+ "<updated>2009-01-25T14:07:37Z</updated>"
+ "<published>2009-01-23T14:06:37Z</published>"
+ "<content type='text'>Here we test kind categories.</content>"
+ "<category term='http://schemas.google.com/docs/2007#file' "
+ "scheme='http://schemas.google.com/g/2005#kind' "
+ "label='application/vnd.oasis.opendocument.presentation'/>"
+ "<category term='http://schemas.google.com/g/2005/labels#modified-by-me' "
+ "scheme='http://schemas.google.com/g/2005/labels' "
+ "label='modified-by-me'/>"
+ "</entry>");
+ g_object_unref (entry);
+}
+
+static void
+test_entry_parse_json (void)
+{
+ GDataEntry *entry;
+ GError *error = NULL;
+
+ /* Create an entry from JSON with unhandled nodes. */
+ entry = GDATA_ENTRY (gdata_parsable_new_from_json (GDATA_TYPE_ENTRY,
+ "{"
+ "\"title\":\"A title\","
+ "\"updated\":\"2009-01-25T14:07:37Z\","
+ "\"selfLink\":\"http://example.com/\","
+ "\"etag\":\"some-etag\","
+ "\"id\":\"some-id\","
+ "\"kind\":\"kind#kind\","
+ "\"unhandled-boolean\":false,"
+ "\"unhandled-string\":\"this-is-a-string---sometimes\","
+ "\"unhandled-int\":15,"
+ "\"unhandled-double\":42.42,"
+ "\"unhandled-object\":{"
+ "\"a\":true,"
+ "\"b\":true"
+ "},"
+ "\"unhandled-array\":["
+ "1,"
+ "2,"
+ "3"
+ "],"
+ "\"unhandled-null\":null"
+ "}", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_ENTRY (entry));
+
+ /* Now check the outputted JSON from the entry still has the unhandled nodes. */
+ gdata_test_assert_json (entry,
+ "{"
+ "\"title\":\"A title\","
+ "\"id\":\"some-id\","
+ "\"updated\":\"2009-01-25T14:07:37Z\","
+ "\"etag\":\"some-etag\","
+ "\"selfLink\":\"http://example.com/\","
+ "\"kind\":\"kind#kind\","
+ "\"unhandled-boolean\":false,"
+ "\"unhandled-string\":\"this-is-a-string---sometimes\","
+ "\"unhandled-int\":15,"
+ "\"unhandled-double\":42.42,"
+ "\"unhandled-object\":{"
+ "\"a\":true,"
+ "\"b\":true"
+ "},"
+ "\"unhandled-array\":["
+ "1,"
+ "2,"
+ "3"
+ "],"
+ "\"unhandled-null\":null"
+ "}");
+ g_object_unref (entry);
+
+ /* Test parsing of empty titles. */
+ entry = GDATA_ENTRY (gdata_parsable_new_from_json (GDATA_TYPE_ENTRY,
+ "{"
+ "\"title\":\"\""
+ "}", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_ENTRY (entry));
+ g_object_unref (entry);
+}
+
+static void
+test_entry_error_handling_xml (void)
+{
+ GDataEntry *entry;
+ GError *error = NULL;
+
+#define TEST_XML_ERROR_HANDLING(x) entry = GDATA_ENTRY (gdata_parsable_new_from_xml (GDATA_TYPE_ENTRY,\
+ "<entry>"\
+ x\
+ "</entry>", -1, &error));\
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR);\
+ g_assert (entry == NULL);\
+ g_clear_error (&error)
+
+ /* updated */
+ TEST_XML_ERROR_HANDLING ("<updated>not a date</updated>"); /* invalid date */
+
+ /* published */
+ TEST_XML_ERROR_HANDLING ("<published>also not a date</published>"); /* invalid date */
+
+ /* category */
+ TEST_XML_ERROR_HANDLING ("<category/>"); /* invalid category */
+
+ /* link */
+ TEST_XML_ERROR_HANDLING ("<link/>"); /* invalid link */
+
+ /* author */
+ TEST_XML_ERROR_HANDLING ("<author/>"); /* invalid author */
+
+#undef TEST_XML_ERROR_HANDLING
+}
+
+static void
+test_entry_error_handling_json (void)
+{
+ GDataEntry *entry;
+ GError *error = NULL;
+
+#define TEST_JSON_ERROR_HANDLING(x) \
+ entry = GDATA_ENTRY (gdata_parsable_new_from_json (GDATA_TYPE_ENTRY,x, -1, &error));\
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR);\
+ g_assert (entry == NULL);\
+ g_clear_error (&error)
+#define TEST_JSON_ERROR_HANDLING_PARSER(x) \
+ entry = GDATA_ENTRY (gdata_parsable_new_from_json (GDATA_TYPE_ENTRY,x, -1, &error));\
+ g_assert_error (error, GDATA_PARSER_ERROR, GDATA_PARSER_ERROR_PARSING_STRING);\
+ g_assert (entry == NULL);\
+ g_clear_error (&error)
+
+ /* General structure. */
+ TEST_JSON_ERROR_HANDLING_PARSER ("[true,false,true]"); /* root node is not an object */
+ TEST_JSON_ERROR_HANDLING_PARSER ("false"); /* root node is not an object */
+ TEST_JSON_ERROR_HANDLING_PARSER ("invalid json"); /* totally invalid JSON */
+
+ /* id */
+ TEST_JSON_ERROR_HANDLING ("{\"id\":\"\"}"); /* empty */
+ TEST_JSON_ERROR_HANDLING ("{\"id\":null}"); /* invalid type */
+
+ /* updated */
+ TEST_JSON_ERROR_HANDLING ("{\"updated\":\"not correct\"}"); /* incorrect format */
+ TEST_JSON_ERROR_HANDLING ("{\"updated\":false}"); /* invalid type */
+ TEST_JSON_ERROR_HANDLING ("{\"updated\":\"\"}"); /* empty */
+
+ /* title */
+ TEST_JSON_ERROR_HANDLING ("{\"title\":false}"); /* invalid type */
+
+ /* etag */
+ TEST_JSON_ERROR_HANDLING ("{\"etag\":\"\"}"); /* empty */
+ TEST_JSON_ERROR_HANDLING ("{\"etag\":false}"); /* invalid type */
+
+ /* selfLink */
+ TEST_JSON_ERROR_HANDLING ("{\"selfLink\":\"\"}"); /* empty */
+ TEST_JSON_ERROR_HANDLING ("{\"selfLink\":false}"); /* invalid type */
+
+ /* kind */
+ TEST_JSON_ERROR_HANDLING ("{\"kind\":\"\"}"); /* empty */
+ TEST_JSON_ERROR_HANDLING ("{\"kind\":false}"); /* invalid type */
+
+#undef TEST_JSON_ERROR_HANDLING_PARSER
+#undef TEST_JSON_ERROR_HANDLING
+}
+
+static void
+test_entry_escaping (void)
+{
+ GDataEntry *entry;
+ GError *error = NULL;
+
+ /* Since we can't construct a GDataEntry directly, we need to parse it from XML */
+ entry = GDATA_ENTRY (gdata_parsable_new_from_xml (GDATA_TYPE_ENTRY,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom'>"
+ "<title type='text'>Escaped content & stuff</title>"
+ "<id>http://foo.com/?foo&bar</id>"
+ "<updated>2010-12-10T17:21:24Z</updated>"
+ "<published>2010-12-10T17:21:24Z</published>"
+ "<summary type='text'>Summary & stuff</summary>"
+ "<rights>Free & open source</rights>"
+ "<content type='text'>Content & things.</content>"
+ "</entry>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_ENTRY (entry));
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (entry,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'>"
+ "<title type='text'>Escaped content & stuff</title>"
+ "<id>http://foo.com/?foo&bar</id>"
+ "<updated>2010-12-10T17:21:24Z</updated>"
+ "<published>2010-12-10T17:21:24Z</published>"
+ "<summary type='text'>Summary & stuff</summary>"
+ "<rights>Free & open source</rights>"
+ "<content type='text'>Content & things.</content>"
+ "</entry>");
+ g_object_unref (entry);
+
+ /* Repeat with content given by a URI */
+ entry = GDATA_ENTRY (gdata_parsable_new_from_xml (GDATA_TYPE_ENTRY,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom'>"
+ "<title type='text'>Escaped content & stuff</title>"
+ "<content type='text/plain' src='http://foo.com?foo&bar'/>"
+ "</entry>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_ENTRY (entry));
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (entry,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'>"
+ "<title type='text'>Escaped content & stuff</title>"
+ "<content type='text/plain' src='http://foo.com?foo&bar'/>"
+ "</entry>");
+ g_object_unref (entry);
+}
+
+static void
+test_entry_links_remove (void)
+{
+ GDataEntry *entry;
+ GDataLink *link_, *link2_;
+ GError *error = NULL;
+
+ /* Since we can't construct a GDataEntry directly, we need to parse it from XML. */
+ entry = GDATA_ENTRY (gdata_parsable_new_from_xml (GDATA_TYPE_ENTRY,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom'>"
+ "<title type='text'>Escaped content & stuff</title>"
+ "<id>http://foo.com/?foo&bar</id>"
+ "<updated>2010-12-10T17:21:24Z</updated>"
+ "<published>2010-12-10T17:21:24Z</published>"
+ "<summary type='text'>Summary & stuff</summary>"
+ "<rights>Free & open source</rights>"
+ "<content type='text'>Content & things.</content>"
+ "</entry>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_ENTRY (entry));
+
+ link_ = gdata_link_new ("http://example.com/", GDATA_LINK_RELATED);
+
+ /* Add a link. */
+ gdata_entry_add_link (entry, link_);
+ g_assert (gdata_entry_look_up_link (entry, GDATA_LINK_RELATED) == link_);
+
+ /* Remove the link. */
+ g_assert (gdata_entry_remove_link (entry, link_) == TRUE);
+ g_assert (gdata_entry_look_up_link (entry, GDATA_LINK_RELATED) == NULL);
+
+ /* Attempt to remove a non-existent link. */
+ link2_ = gdata_link_new ("http://foobar.com/", GDATA_LINK_SELF);
+ g_assert (gdata_entry_remove_link (entry, link2_) == FALSE);
+
+ g_object_unref (link2_);
+ g_object_unref (link_);
+ g_object_unref (entry);
+}
+
+static void
+test_feed_parse_xml (void)
+{
+ GDataFeed *feed;
+ GDataEntry *entry;
+ GDataLink *_link; /* stupid unistd.h */
+ GList *list;
+ gchar *title, *subtitle, *id, *etag, *logo, *icon, *rights;
+ gint64 updated, updated2;
+ GDataGenerator *generator;
+ guint items_per_page, start_index, total_results;
+ GError *error = NULL;
+
+ feed = GDATA_FEED (gdata_parsable_new_from_xml (GDATA_TYPE_FEED,
+ "<feed xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' "
+ "xmlns:gd='http://schemas.google.com/g/2005' "
+ "gd:etag='W/\"D08FQn8-eil7ImA9WxZbFEw.\"'>"
+ "<id>http://example.com/id</id>"
+ "<updated>2009-02-25T14:07:37.880860Z</updated>"
+ "<title type='text'>Test feed</title>"
+ "<subtitle type='text'>Test subtitle</subtitle>"
+ "<logo>http://example.com/logo.png</logo>"
+ "<icon>http://example.com/icon.png</icon>"
+ "<link rel='alternate' type='text/html' href='http://alternate.example.com/'/>"
+ "<link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://example.com/id'/>"
+ "<link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='http://example.com/post'/>"
+ "<link rel='self' type='application/atom+xml' href='http://example.com/id'/>"
+ "<category scheme='http://example.com/categories' term='feed'/>"
+ "<rights>public</rights>"
+ "<author>"
+ "<name>Joe Smith</name>"
+ "<email>j.smith@example.com</email>"
+ "</author>"
+ "<generator version='0.6' uri='http://example.com/'>Example Generator</generator>"
+ "<openSearch:totalResults>2</openSearch:totalResults>"
+ "<openSearch:startIndex>1</openSearch:startIndex>"
+ "<openSearch:itemsPerPage>50</openSearch:itemsPerPage>"
+ "<entry>"
+ "<id>entry1</id>"
+ "<title type='text'>Testing unhandled XML</title>"
+ "<updated>2009-01-25T14:07:37.880860Z</updated>"
+ "<published>2009-01-23T14:06:37.880860Z</published>"
+ "<content type='text'>Here we test unhandled XML elements.</content>"
+ "</entry>"
+ "<entry>"
+ "<id>entry2</id>"
+ "<title type='text'>Testing unhandled XML 2</title>"
+ "<updated>2009-02-25T14:07:37.880860Z</updated>"
+ "<published>2009-02-23T14:06:37.880860Z</published>"
+ "<content type='text'>Here we test unhandled XML elements again.</content>"
+ "</entry>"
+ "<foobar>Test unhandled elements!</foobar>"
+ "</feed>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_FEED (feed));
+ g_clear_error (&error);
+
+ /* Check the feed's properties */
+ g_object_get (G_OBJECT (feed),
+ "title", &title,
+ "subtitle", &subtitle,
+ "id", &id,
+ "etag", &etag,
+ "updated", &updated,
+ "logo", &logo,
+ "icon", &icon,
+ "generator", &generator,
+ "rights", &rights,
+ "items-per-page", &items_per_page,
+ "start-index", &start_index,
+ "total-results", &total_results,
+ NULL);
+
+ g_assert_cmpstr (title, ==, "Test feed");
+ g_assert_cmpstr (subtitle, ==, "Test subtitle");
+ g_assert_cmpstr (id, ==, "http://example.com/id");
+ g_assert_cmpstr (etag, ==, "W/\"D08FQn8-eil7ImA9WxZbFEw.\"");
+
+ g_assert_cmpint (updated, ==, 1235570857);
+
+ g_assert_cmpstr (logo, ==, "http://example.com/logo.png");
+ g_assert_cmpstr (icon, ==, "http://example.com/icon.png");
+ g_assert_cmpstr (rights, ==, "public");
+
+ g_assert (GDATA_IS_GENERATOR (generator));
+ g_assert_cmpstr (gdata_generator_get_name (generator), ==, "Example Generator");
+ g_assert_cmpstr (gdata_generator_get_uri (generator), ==, "http://example.com/");
+ g_assert_cmpstr (gdata_generator_get_version (generator), ==, "0.6");
+
+ g_assert_cmpuint (items_per_page, ==, 50);
+ g_assert_cmpuint (start_index, ==, 1);
+ g_assert_cmpuint (total_results, ==, 2);
+
+ g_free (title);
+ g_free (subtitle);
+ g_free (id);
+ g_free (etag);
+ g_free (logo);
+ g_free (icon);
+ g_free (rights);
+ g_object_unref (generator);
+
+ /* Check the entries */
+ entry = gdata_feed_look_up_entry (feed, "entry1");
+ g_assert (GDATA_IS_ENTRY (entry));
+
+ entry = gdata_feed_look_up_entry (feed, "this doesn't exist");
+ g_assert (entry == NULL);
+
+ entry = gdata_feed_look_up_entry (feed, "entry2");
+ g_assert (GDATA_IS_ENTRY (entry));
+
+ /* Check the categories */
+ list = gdata_feed_get_categories (feed);
+ g_assert (list != NULL);
+ g_assert_cmpint (g_list_length (list), ==, 1);
+ g_assert (GDATA_IS_CATEGORY (list->data));
+
+ /* Check the links */
+ list = gdata_feed_get_links (feed);
+ g_assert (list != NULL);
+ g_assert_cmpint (g_list_length (list), ==, 4);
+ g_assert (GDATA_IS_LINK (list->data));
+ g_assert (GDATA_IS_LINK (list->next->data));
+ g_assert (GDATA_IS_LINK (list->next->next->data));
+ g_assert (GDATA_IS_LINK (list->next->next->next->data));
+
+ _link = gdata_feed_look_up_link (feed, GDATA_LINK_ALTERNATE);
+ g_assert (GDATA_IS_LINK (_link));
+
+ _link = gdata_feed_look_up_link (feed, "this doesn't exist");
+ g_assert (_link == NULL);
+
+ _link = gdata_feed_look_up_link (feed, "http://schemas.google.com/g/2005#feed");
+ g_assert (GDATA_IS_LINK (_link));
+
+ _link = gdata_feed_look_up_link (feed, "http://schemas.google.com/g/2005#post");
+ g_assert (GDATA_IS_LINK (_link));
+
+ _link = gdata_feed_look_up_link (feed, GDATA_LINK_SELF);
+ g_assert (GDATA_IS_LINK (_link));
+
+ /* Check the authors */
+ list = gdata_feed_get_authors (feed);
+ g_assert (list != NULL);
+ g_assert_cmpint (g_list_length (list), ==, 1);
+ g_assert (GDATA_IS_AUTHOR (list->data));
+
+ /* Check the other properties again, the more normal way this time */
+ g_assert_cmpstr (gdata_feed_get_title (feed), ==, "Test feed");
+ g_assert_cmpstr (gdata_feed_get_subtitle (feed), ==, "Test subtitle");
+ g_assert_cmpstr (gdata_feed_get_id (feed), ==, "http://example.com/id");
+ g_assert_cmpstr (gdata_feed_get_etag (feed), ==, "W/\"D08FQn8-eil7ImA9WxZbFEw.\"");
+
+ updated2 = gdata_feed_get_updated (feed);
+ g_assert_cmpint (updated2, ==, 1235570857);
+
+ g_assert_cmpstr (gdata_feed_get_logo (feed), ==, "http://example.com/logo.png");
+ g_assert_cmpstr (gdata_feed_get_icon (feed), ==, "http://example.com/icon.png");
+ g_assert_cmpstr (gdata_feed_get_rights (feed), ==, "public");
+
+ generator = gdata_feed_get_generator (feed);
+ g_assert (GDATA_IS_GENERATOR (generator));
+ g_assert_cmpstr (gdata_generator_get_name (generator), ==, "Example Generator");
+ g_assert_cmpstr (gdata_generator_get_uri (generator), ==, "http://example.com/");
+ g_assert_cmpstr (gdata_generator_get_version (generator), ==, "0.6");
+
+ g_assert_cmpuint (gdata_feed_get_items_per_page (feed), ==, 50);
+ g_assert_cmpuint (gdata_feed_get_start_index (feed), ==, 1);
+ g_assert_cmpuint (gdata_feed_get_total_results (feed), ==, 2);
+
+ g_object_unref (feed);
+}
+
+static void
+test_feed_error_handling (void)
+{
+ GDataFeed *feed;
+ GError *error = NULL;
+
+#define TEST_XML_ERROR_HANDLING(x) feed = GDATA_FEED (gdata_parsable_new_from_xml (GDATA_TYPE_FEED, \
+ "<feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/'>"\
+ x\
+ "</feed>", -1, &error));\
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR);\
+ g_assert (feed == NULL);\
+ g_clear_error (&error)
+
+ /* entry */
+ TEST_XML_ERROR_HANDLING ("<entry><updated>this isn't a date</updated></entry>"); /* invalid entry */
+
+ /* title */
+ TEST_XML_ERROR_HANDLING ("<title>First title</title><title>Second title</title>"); /* duplicate title */
+#if 0
+ /* FIXME: Removed due to the YouTube comments feed not being a valid Atom feed.
+ * See: https://code.google.com/p/gdata-issues/issues/detail?id=2908
+ * and: https://bugzilla.gnome.org/show_bug.cgi?id=679072 */
+ TEST_XML_ERROR_HANDLING ("<id>ID</id><updated>2009-01-25T14:07:37.880860Z</updated>"); /* missing title */
+#endif
+
+ /* subtitle */
+ TEST_XML_ERROR_HANDLING ("<subtitle>First subtitle</subtitle><subtitle>Second subtitle</subtitle>"); /* duplicate subtitle */
+
+ /* id */
+ TEST_XML_ERROR_HANDLING ("<id>First ID</id><id>Second ID</id>"); /* duplicate ID */
+ TEST_XML_ERROR_HANDLING ("<title>Title</title><updated>2009-01-25T14:07:37.880860Z</updated>"); /* missing ID */
+
+ /* updated */
+ TEST_XML_ERROR_HANDLING ("<updated>2009-01-25T14:07:37.880860Z</updated>"
+ "<updated>2009-01-25T14:07:37.880860Z</updated>"); /* duplicate updated */
+ TEST_XML_ERROR_HANDLING ("<updated>not a date</updated>"); /* invalid date */
+ TEST_XML_ERROR_HANDLING ("<title>Title</title><id>ID</id>"); /* missing updated */
+
+ /* category */
+ TEST_XML_ERROR_HANDLING ("<category/>"); /* invalid category */
+
+ /* logo */
+ TEST_XML_ERROR_HANDLING ("<logo>First logo</logo><logo>Second logo</logo>"); /* duplicate logo */
+
+ /* icon */
+ TEST_XML_ERROR_HANDLING ("<icon>First icon</icon><icon>Second icon</icon>"); /* duplicate icon */
+
+ /* link */
+ TEST_XML_ERROR_HANDLING ("<link/>"); /* invalid link */
+
+ /* author */
+ TEST_XML_ERROR_HANDLING ("<author/>"); /* invalid author */
+
+ /* generator */
+ TEST_XML_ERROR_HANDLING ("<generator>First generator</generator><generator>Second generator</generator>"); /* duplicate generator */
+ TEST_XML_ERROR_HANDLING ("<generator uri=''/>"); /* invalid generator */
+
+ /* openSearch:totalResults */
+ TEST_XML_ERROR_HANDLING ("<openSearch:totalResults>5</openSearch:totalResults>"
+ "<openSearch:totalResults>3</openSearch:totalResults>"); /* duplicate totalResults */
+ TEST_XML_ERROR_HANDLING ("<openSearch:totalResults></openSearch:totalResults>"); /* missing content */
+ TEST_XML_ERROR_HANDLING ("<openSearch:totalResults>this isn't a number!</openSearch:totalResults>"); /* invalid number */
+
+ /* openSearch:startIndex */
+ TEST_XML_ERROR_HANDLING ("<openSearch:startIndex>5</openSearch:startIndex>"
+ "<openSearch:startIndex>3</openSearch:startIndex>"); /* duplicate startIndex */
+ TEST_XML_ERROR_HANDLING ("<openSearch:startIndex></openSearch:startIndex>"); /* missing content */
+ TEST_XML_ERROR_HANDLING ("<openSearch:startIndex>this isn't a number!</openSearch:startIndex>"); /* invalid number */
+
+ /* openSearch:itemsPerPage */
+ TEST_XML_ERROR_HANDLING ("<openSearch:itemsPerPage>5</openSearch:itemsPerPage>"
+ "<openSearch:itemsPerPage>3</openSearch:itemsPerPage>"); /* duplicate itemsPerPage */
+ TEST_XML_ERROR_HANDLING ("<openSearch:itemsPerPage></openSearch:itemsPerPage>"); /* missing content */
+ TEST_XML_ERROR_HANDLING ("<openSearch:itemsPerPage>this isn't a number!</openSearch:itemsPerPage>"); /* invalid number */
+
+#undef TEST_XML_ERROR_HANDLING
+}
+
+static void
+test_feed_escaping (void)
+{
+ GDataFeed *feed;
+ GError *error = NULL;
+
+ /* Since we can't construct a GDataEntry directly, we need to parse it from XML */
+ feed = GDATA_FEED (gdata_parsable_new_from_xml (GDATA_TYPE_FEED,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<feed xmlns='http://www.w3.org/2005/Atom'>"
+ "<id>http://foo.com?foo&bar</id>"
+ "<updated>2010-12-10T17:49:15Z</updated>"
+ "<title type='text'>Test feed & stuff.</title>"
+ "</feed>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_FEED (feed));
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (feed,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<feed xmlns='http://www.w3.org/2005/Atom'>"
+ "<title type='text'>Test feed & stuff.</title>"
+ "<id>http://foo.com?foo&bar</id>"
+ "<updated>2010-12-10T17:49:15Z</updated>"
+ "</feed>");
+ g_object_unref (feed);
+}
+
+static void
+test_query_categories (void)
+{
+ GDataQuery *query;
+ gchar *query_uri;
+
+ query = gdata_query_new ("foobar");
+
+ /* AND */
+ gdata_query_set_categories (query, "Fritz/Laurie");
+ query_uri = gdata_query_get_query_uri (query, "http://example.com");
+ g_assert_cmpstr (query_uri, ==, "http://example.com/-/Fritz/Laurie?q=foobar");
+ g_free (query_uri);
+
+ /* OR */
+ gdata_query_set_categories (query, "Fritz|Laurie");
+ query_uri = gdata_query_get_query_uri (query, "http://example.com");
+ g_assert_cmpstr (query_uri, ==, "http://example.com/-/Fritz%7CLaurie?q=foobar");
+ g_free (query_uri);
+
+ /* Combination */
+ gdata_query_set_categories (query, "A|-{urn:google.com}B/-C");
+ query_uri = gdata_query_get_query_uri (query, "http://example.com/gdata_test");
+ g_assert_cmpstr (query_uri, ==, "http://example.com/gdata_test/-/A%7C-%7Burn%3Agoogle.com%7DB/-C?q=foobar");
+ g_free (query_uri);
+
+ /* Same combination without q param */
+ gdata_query_set_q (query, NULL);
+ query_uri = gdata_query_get_query_uri (query, "http://example.com");
+ g_assert_cmpstr (query_uri, ==, "http://example.com/-/A%7C-%7Burn%3Agoogle.com%7DB/-C");
+ g_free (query_uri);
+
+ g_object_unref (query);
+}
+
+static void
+test_query_dates (void)
+{
+ GDataQuery *query;
+ gchar *query_uri;
+
+ query = gdata_query_new ("baz");
+
+ /* updated-min */
+ gdata_query_set_updated_min (query, 1373280114); /* 2013-07-08T10:41:54Z */
+ query_uri = gdata_query_get_query_uri (query, "http://example.com");
+ g_assert_cmpstr (query_uri, ==, "http://example.com?q=baz&updated-min=2013-07-08T10:41:54Z");
+ g_free (query_uri);
+ gdata_query_set_updated_min (query, -1);
+
+ /* updated-max */
+ gdata_query_set_updated_max (query, 1373280114); /* 2013-07-08T10:41:54Z */
+ query_uri = gdata_query_get_query_uri (query, "http://example.com");
+ g_assert_cmpstr (query_uri, ==, "http://example.com?q=baz&updated-max=2013-07-08T10:41:54Z");
+ g_free (query_uri);
+ gdata_query_set_updated_max (query, -1);
+
+ /* published-min */
+ gdata_query_set_published_min (query, 1373280114); /* 2013-07-08T10:41:54Z */
+ query_uri = gdata_query_get_query_uri (query, "http://example.com");
+ g_assert_cmpstr (query_uri, ==, "http://example.com?q=baz&published-min=2013-07-08T10:41:54Z");
+ g_free (query_uri);
+ gdata_query_set_published_min (query, -1);
+
+ /* published-max */
+ gdata_query_set_published_max (query, 1373280114); /* 2013-07-08T10:41:54Z */
+ query_uri = gdata_query_get_query_uri (query, "http://example.com");
+ g_assert_cmpstr (query_uri, ==, "http://example.com?q=baz&published-max=2013-07-08T10:41:54Z");
+ g_free (query_uri);
+ gdata_query_set_published_max (query, -1);
+
+ g_object_unref (query);
+}
+
+static void
+test_query_strict (void)
+{
+ GDataQuery *query;
+ gchar *query_uri;
+
+ query = gdata_query_new ("bar");
+
+ gdata_query_set_is_strict (query, TRUE);
+ query_uri = gdata_query_get_query_uri (query, "http://example.com");
+ g_assert_cmpstr (query_uri, ==, "http://example.com?q=bar&strict=true");
+ g_free (query_uri);
+
+ gdata_query_set_is_strict (query, FALSE);
+ query_uri = gdata_query_get_query_uri (query, "http://example.com");
+ g_assert_cmpstr (query_uri, ==, "http://example.com?q=bar");
+ g_free (query_uri);
+
+ g_object_unref (query);
+}
+
+static void
+test_query_pagination (void)
+{
+ GDataQuery *query;
+ gchar *query_uri;
+
+ query = gdata_query_new ("test");
+ gdata_query_set_max_results (query, 15);
+ gdata_query_set_etag (query, "etag"); /* this should be cleared by pagination */
+
+ query_uri = gdata_query_get_query_uri (query, "http://example.com/");
+ g_assert_cmpstr (query_uri, ==, "http://example.com/?q=test&max-results=15");
+ g_free (query_uri);
+
+ /* Try the next and previous pages. */
+ gdata_query_next_page (query);
+ g_assert (gdata_query_get_etag (query) == NULL);
+
+ query_uri = gdata_query_get_query_uri (query, "http://example.com/");
+ g_assert_cmpstr (query_uri, ==, "http://example.com/?q=test&start-index=16&max-results=15");
+ g_free (query_uri);
+
+ gdata_query_set_etag (query, "etag");
+ g_assert (gdata_query_previous_page (query) == TRUE);
+ g_assert (gdata_query_get_etag (query) == NULL);
+
+ query_uri = gdata_query_get_query_uri (query, "http://example.com/");
+ g_assert_cmpstr (query_uri, ==, "http://example.com/?q=test&max-results=15");
+ g_free (query_uri);
+
+ /* Try another previous page. This should fail, and the ETag should be untouched. */
+ gdata_query_set_etag (query, "etag");
+ g_assert (gdata_query_previous_page (query) == FALSE);
+ g_assert_cmpstr (gdata_query_get_etag (query), ==, "etag");
+
+ g_object_unref (query);
+
+ /* Try the alternate constructor. */
+ query = gdata_query_new_with_limits ("test", 40, 10);
+
+ query_uri = gdata_query_get_query_uri (query, "http://example.com/");
+ g_assert_cmpstr (query_uri, ==, "http://example.com/?q=test&start-index=40&max-results=10");
+ g_free (query_uri);
+
+ /* Try the next and previous pages again. */
+ gdata_query_next_page (query);
+
+ query_uri = gdata_query_get_query_uri (query, "http://example.com/");
+ g_assert_cmpstr (query_uri, ==, "http://example.com/?q=test&start-index=50&max-results=10");
+ g_free (query_uri);
+
+ g_assert (gdata_query_previous_page (query) == TRUE);
+
+ query_uri = gdata_query_get_query_uri (query, "http://example.com/");
+ g_assert_cmpstr (query_uri, ==, "http://example.com/?q=test&start-index=40&max-results=10");
+ g_free (query_uri);
+
+ g_assert (gdata_query_previous_page (query) == TRUE);
+
+ query_uri = gdata_query_get_query_uri (query, "http://example.com/");
+ g_assert_cmpstr (query_uri, ==, "http://example.com/?q=test&start-index=30&max-results=10");
+ g_free (query_uri);
+
+ g_object_unref (query);
+}
+
+static void
+notify_cb (GObject *obj, GParamSpec *pspec, gpointer user_data)
+{
+ gboolean *notification_received = user_data;
+ g_assert (*notification_received == FALSE);
+ *notification_received = TRUE;
+}
+
+static void
+test_query_properties (void)
+{
+ GDataQuery *query;
+ gboolean notification_received = FALSE;
+ gulong handler_id;
+
+ query = gdata_query_new ("default");
+
+#define CHECK_PROPERTY(cmptype, name_hyphens, name_underscores, default_val, new_val, new_val2, val_type, free_val) \
+ { \
+ val_type val; \
+ \
+ handler_id = g_signal_connect (query, "notify::" name_hyphens, (GCallback) notify_cb, ¬ification_received); \
+ \
+ g_assert_##cmptype (gdata_query_get_##name_underscores (query), ==, default_val); \
+ g_object_get (query, name_hyphens, &val, NULL); \
+ g_assert_##cmptype (val, ==, default_val); \
+ if (free_val == TRUE) { \
+ g_free ((gpointer) ((guintptr) val)); \
+ } \
+ \
+ notification_received = FALSE; \
+ gdata_query_set_##name_underscores (query, new_val); \
+ g_assert (notification_received == TRUE); \
+ \
+ g_assert_##cmptype (gdata_query_get_##name_underscores (query), ==, new_val); \
+ \
+ notification_received = FALSE; \
+ g_object_set (query, name_hyphens, (val_type) new_val2, NULL); \
+ g_assert (notification_received == TRUE); \
+ \
+ g_assert_##cmptype (gdata_query_get_##name_underscores (query), ==, new_val2); \
+ \
+ g_signal_handler_disconnect (query, handler_id); \
+ }
+#define CHECK_PROPERTY_STR(name_hyphens, name_underscores, default_val) \
+ CHECK_PROPERTY (cmpstr, name_hyphens, name_underscores, default_val, "new", "new2", gchar*, TRUE)
+#define CHECK_PROPERTY_INT64(name_hyphens, name_underscores, default_val) \
+ CHECK_PROPERTY (cmpint, name_hyphens, name_underscores, default_val, 123, 5134132, gint64, FALSE)
+#define CHECK_PROPERTY_UINT(name_hyphens, name_underscores, default_val) \
+ CHECK_PROPERTY (cmpuint, name_hyphens, name_underscores, default_val, 535, 123, guint, FALSE)
+#define CHECK_PROPERTY_BOOLEAN(name_hyphens, name_underscores, default_val) \
+ CHECK_PROPERTY (cmpuint, name_hyphens, name_underscores, default_val, TRUE, FALSE, gboolean, FALSE)
+
+ CHECK_PROPERTY_STR ("q", q, "default");
+ CHECK_PROPERTY_STR ("categories", categories, NULL);
+ CHECK_PROPERTY_STR ("author", author, NULL);
+ CHECK_PROPERTY_INT64 ("updated-min", updated_min, -1);
+ CHECK_PROPERTY_INT64 ("updated-max", updated_max, -1);
+ CHECK_PROPERTY_INT64 ("published-min", published_min, -1);
+ CHECK_PROPERTY_INT64 ("published-max", published_max, -1);
+ CHECK_PROPERTY_UINT ("start-index", start_index, 0);
+#define gdata_query_get_is_strict gdata_query_is_strict
+ CHECK_PROPERTY_BOOLEAN ("is-strict", is_strict, FALSE);
+#undef gdata_query_get_is_strict
+ CHECK_PROPERTY_UINT ("max-results", max_results, 0);
+ CHECK_PROPERTY_STR ("etag", etag, NULL);
+
+#undef CHECK_PROPERTY_BOOLEAN
+#undef CHECK_PROPERTY_UINT
+#undef CHECK_PROPERTY_INT64
+#undef CHECK_PROPERTY_STR
+#undef CHECK_PROPERTY
+
+ g_object_unref (query);
+}
+
+static void
+test_query_unicode (void)
+{
+ GDataQuery *query;
+ gchar *query_uri;
+
+ g_test_bug ("602497");
+
+ /* Simple query */
+ query = gdata_query_new ("fööbar‽");
+ query_uri = gdata_query_get_query_uri (query, "http://example.com");
+ g_assert_cmpstr (query_uri, ==, "http://example.com?q=f%C3%B6%C3%B6bar%E2%80%BD");
+ g_free (query_uri);
+
+ /* Categories */
+ gdata_query_set_categories (query, "Ümlauts|¿Questions‽");
+ query_uri = gdata_query_get_query_uri (query, "http://example.com");
+ g_assert_cmpstr (query_uri, ==, "http://example.com/-/%C3%9Cmlauts%7C%C2%BFQuestions%E2%80%BD?q=f%C3%B6%C3%B6bar%E2%80%BD");
+ g_free (query_uri);
+
+ /* Author */
+ gdata_query_set_author (query, "Lørd Brïan Bleßêd");
+ query_uri = gdata_query_get_query_uri (query, "http://example.com");
+ g_assert_cmpstr (query_uri, ==, "http://example.com/-/%C3%9Cmlauts%7C%C2%BFQuestions%E2%80%BD?q=f%C3%B6%C3%B6bar%E2%80%BD&author=L%C3%B8rd%20Br%C3%AFan%20Ble%C3%9F%C3%AAd");
+ g_free (query_uri);
+
+ g_object_unref (query);
+}
+
+static void
+test_query_etag (void)
+{
+ GDataQuery *query = gdata_query_new (NULL);
+
+ /* Test that setting any property will unset the ETag */
+ g_test_bug ("613529");
+
+ /* Also check that setting the ETag doesn't unset the ETag! */
+ gdata_query_set_etag (query, "foobar");
+ g_assert_cmpstr (gdata_query_get_etag (query), ==, "foobar");
+
+#define CHECK_ETAG(C) \
+ gdata_query_set_etag (query, "foobar"); \
+ C; \
+ g_assert (gdata_query_get_etag (query) == NULL);
+
+ CHECK_ETAG (gdata_query_set_q (query, "q"))
+ CHECK_ETAG (gdata_query_set_categories (query, "shizzle,foobar"))
+ CHECK_ETAG (gdata_query_set_author (query, "John Smith"))
+ CHECK_ETAG (gdata_query_set_updated_min (query, -1))
+ CHECK_ETAG (gdata_query_set_updated_max (query, -1))
+ CHECK_ETAG (gdata_query_set_published_min (query, -1))
+ CHECK_ETAG (gdata_query_set_published_max (query, -1))
+ CHECK_ETAG (gdata_query_set_start_index (query, 5))
+ CHECK_ETAG (gdata_query_set_is_strict (query, TRUE))
+ CHECK_ETAG (gdata_query_set_max_results (query, 1000))
+ CHECK_ETAG (gdata_query_next_page (query))
+ CHECK_ETAG (g_assert (gdata_query_previous_page (query)))
+
+#undef CHECK_ETAG
+
+ g_object_unref (query);
+}
+
+static void
+test_service_network_error (void)
+{
+ GDataService *service;
+#if 0
+ SoupURI *proxy_uri;
+#endif
+ GError *error = NULL;
+
+ /* Skip this test unless explicitly asked for, so that we don’t do network accesses on build machines by default. */
+ if (!g_test_slow ()) {
+ g_test_skip ("Test requires network access");
+ return;
+ }
+
+ /* This is a little hacky, but it should work */
+ service = g_object_new (GDATA_TYPE_SERVICE, NULL);
+
+ /* Try a query which should always fail due to errors resolving the hostname */
+ g_assert (gdata_service_query (service, NULL, "https://thisshouldnotexist.invalid", NULL, GDATA_TYPE_ENTRY,
+ NULL, NULL, NULL, &error) == NULL);
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_NETWORK_ERROR);
+ g_clear_error (&error);
+
+ /* TODO: We have to disable this test, as libsoup 2.30.2 < x <= 2.32.0 doesn't return SOUP_STATUS_CANT_RESOLVE_PROXY properly any more.
+ * Filed as bgo#632354. */
+#if 0
+ /* Try one with a bad proxy set */
+ proxy_uri = soup_uri_new ("https://thisshouldalsonotexist.invalid/proxy");
+ gdata_service_set_proxy_uri (service, proxy_uri);
+ soup_uri_free (proxy_uri);
+
+ g_assert (gdata_service_query (service, "https://google.com", NULL, GDATA_TYPE_ENTRY, NULL, NULL, NULL, &error) == NULL);
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROXY_ERROR);
+ g_clear_error (&error);
+#endif
+
+ g_object_unref (service);
+}
+
+static void
+test_service_locale (void)
+{
+ GDataService *service;
+ gchar *locale;
+
+ /* This is a little hacky, but it should work */
+ service = g_object_new (GDATA_TYPE_SERVICE, NULL);
+
+ /* Just test setting and getting the locale */
+ g_assert (gdata_service_get_locale (service) == NULL);
+ gdata_service_set_locale (service, "en_GB");
+ g_assert_cmpstr (gdata_service_get_locale (service), ==, "en_GB");
+
+ g_object_get (service, "locale", &locale, NULL);
+ g_assert_cmpstr (locale, ==, "en_GB");
+ g_free (locale);
+
+ g_object_unref (service);
+}
+
+static void
+test_access_rule_get_xml (void)
+{
+ GDataAccessRule *rule, *rule2;
+ const gchar *content_type;
+ gchar *xml, *role, *scope_type3, *scope_value3, *key;
+ gint64 edited, edited2;
+ const gchar *scope_type, *scope_value, *scope_type2, *scope_value2;
+ GError *error = NULL;
+
+ rule = gdata_access_rule_new ("an-id");
+
+ /* Test setting properties directly */
+ g_object_set (G_OBJECT (rule),
+ "role", "A role",
+ "scope-type", "A scope type",
+ "scope-value", "A scope value",
+ NULL);
+
+ g_assert_cmpstr (gdata_access_rule_get_role (rule), ==, "A role");
+ gdata_access_rule_get_scope (rule, &scope_type, &scope_value);
+ g_assert_cmpstr (scope_type, ==, "A scope type");
+ g_assert_cmpstr (scope_value, ==, "A scope value");
+ edited = gdata_access_rule_get_edited (rule);
+ g_assert_cmpuint (edited, >, 0); /* current time */
+ g_assert_cmpstr (gdata_access_rule_get_key (rule), ==, NULL);
+
+ /* Set the properties more conventionally */
+ gdata_access_rule_set_role (rule, GDATA_ACCESS_ROLE_NONE);
+ gdata_access_rule_set_scope (rule, GDATA_ACCESS_SCOPE_USER, "foo@example.com");
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (rule));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the generated XML's OK */
+ gdata_test_assert_xml (rule,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:gAcl='http://schemas.google.com/acl/2007'>"
+ "<title type='text'>none</title>"
+ "<id>an-id</id>"
+ "<category term='http://schemas.google.com/acl/2007#accessRule' scheme='http://schemas.google.com/g/2005#kind'/>"
+ "<gAcl:role value='none'/>"
+ "<gAcl:scope type='user' value='foo@example.com'/>"
+ "</entry>");
+
+ /* Check again by re-parsing the XML to a GDataAccessRule */
+ xml = gdata_parsable_get_xml (GDATA_PARSABLE (rule));
+ rule2 = GDATA_ACCESS_RULE (gdata_parsable_new_from_xml (GDATA_TYPE_ACCESS_RULE, xml, -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_ACCESS_RULE (rule2));
+ g_clear_error (&error);
+ g_free (xml);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (rule2));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ g_assert_cmpstr (gdata_access_rule_get_role (rule), ==, gdata_access_rule_get_role (rule2));
+ gdata_access_rule_get_scope (rule, &scope_type, &scope_value);
+ gdata_access_rule_get_scope (rule2, &scope_type2, &scope_value2);
+ g_assert_cmpstr (scope_type, ==, scope_type2);
+ g_assert_cmpstr (scope_value, ==, scope_value2);
+ edited = gdata_access_rule_get_edited (rule2);
+ g_assert_cmpuint (edited, ==, -1); /* unspecified in XML */
+ g_assert_cmpstr (gdata_access_rule_get_key (rule), ==, gdata_access_rule_get_key (rule2));
+
+ /* Check properties a different way */
+ g_object_get (G_OBJECT (rule2),
+ "role", &role,
+ "scope-type", &scope_type3,
+ "scope-value", &scope_value3,
+ "edited", &edited2,
+ "key", &key,
+ NULL);
+
+ g_assert_cmpstr (role, ==, gdata_access_rule_get_role (rule));
+ g_assert_cmpstr (scope_type, ==, scope_type3);
+ g_assert_cmpstr (scope_value, ==, scope_value3);
+ g_assert_cmpuint (edited2, ==, -1);
+ g_assert_cmpstr (key, ==, NULL);
+
+ g_free (role);
+ g_free (scope_type3);
+ g_free (scope_value3);
+
+ /* Test that the GDataAccessRule:role and GDataEntry:title properties are linked */
+ gdata_entry_set_title (GDATA_ENTRY (rule), "Another role");
+ g_assert_cmpstr (gdata_access_rule_get_role (rule), ==, "Another role");
+ gdata_access_rule_set_role (rule, GDATA_ACCESS_ROLE_NONE);
+ g_assert_cmpstr (gdata_entry_get_title (GDATA_ENTRY (rule)), ==, "none");
+
+ g_object_unref (rule);
+ g_object_unref (rule2);
+
+ /* Check that a rule with scope type 'default' doesn't have a value.
+ * See: https://developers.google.com/google-apps/calendar/v2/reference#gacl_reference */
+ rule = gdata_access_rule_new ("another-id");
+ gdata_access_rule_set_role (rule, GDATA_ACCESS_ROLE_NONE);
+ gdata_access_rule_set_scope (rule, GDATA_ACCESS_SCOPE_DEFAULT, NULL);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (rule));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the generated XML's OK */
+ gdata_test_assert_xml (rule,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:gAcl='http://schemas.google.com/acl/2007'>"
+ "<title type='text'>none</title>"
+ "<id>another-id</id>"
+ "<category term='http://schemas.google.com/acl/2007#accessRule' scheme='http://schemas.google.com/g/2005#kind'/>"
+ "<gAcl:role value='none'/>"
+ "<gAcl:scope type='default'/>"
+ "</entry>");
+
+ /* Check by re-parsing the XML to a GDataAccessRule */
+ xml = gdata_parsable_get_xml (GDATA_PARSABLE (rule));
+ rule2 = GDATA_ACCESS_RULE (gdata_parsable_new_from_xml (GDATA_TYPE_ACCESS_RULE, xml, -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_ACCESS_RULE (rule2));
+ g_clear_error (&error);
+ g_free (xml);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (rule2));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ g_assert_cmpstr (gdata_access_rule_get_role (rule), ==, gdata_access_rule_get_role (rule2));
+ gdata_access_rule_get_scope (rule, &scope_type, &scope_value);
+ gdata_access_rule_get_scope (rule2, &scope_type2, &scope_value2);
+ g_assert_cmpstr (scope_type, ==, scope_type2);
+ g_assert_cmpstr (scope_value, ==, scope_value2);
+ edited = gdata_access_rule_get_edited (rule2);
+ g_assert_cmpuint (edited, ==, -1); /* unspecified in XML */
+
+ g_object_unref (rule);
+ g_object_unref (rule2);
+}
+
+static void
+test_access_rule_get_xml_with_key (void)
+{
+ GDataAccessRule *rule;
+ gint64 edited;
+ const gchar *content_type, *scope_type, *scope_value;
+ GError *error = NULL;
+
+ rule = GDATA_ACCESS_RULE (gdata_parsable_new_from_xml (GDATA_TYPE_ACCESS_RULE,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:gAcl='http://schemas.google.com/acl/2007'>"
+ "<title type='text'>none</title>"
+ "<id>an-id</id>"
+ "<category term='http://schemas.google.com/acl/2007#accessRule' scheme='http://schemas.google.com/g/2005#kind'/>"
+ "<gAcl:withKey key='asdasd'><gAcl:role value='none'/></gAcl:withKey>"
+ "<gAcl:scope type='user' value='foo@example.com'/>"
+ "</entry>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_ACCESS_RULE (rule));
+
+ /* Check the properties. */
+ g_assert_cmpstr (gdata_access_rule_get_role (rule), ==, "none");
+ gdata_access_rule_get_scope (rule, &scope_type, &scope_value);
+ g_assert_cmpstr (scope_type, ==, "user");
+ g_assert_cmpstr (scope_value, ==, "foo@example.com");
+ edited = gdata_access_rule_get_edited (rule);
+ g_assert_cmpuint (edited, >, 0); /* current time */
+ g_assert_cmpstr (gdata_access_rule_get_key (rule), ==, "asdasd");
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (rule));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is the same. */
+ gdata_test_assert_xml (rule,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:gAcl='http://schemas.google.com/acl/2007'>"
+ "<title type='text'>none</title>"
+ "<id>an-id</id>"
+ "<category term='http://schemas.google.com/acl/2007#accessRule' scheme='http://schemas.google.com/g/2005#kind'/>"
+ "<gAcl:withKey key='asdasd'><gAcl:role value='none'/></gAcl:withKey>"
+ "<gAcl:scope type='user' value='foo@example.com'/>"
+ "</entry>");
+
+ g_object_unref (rule);
+}
+
+static void
+test_access_rule_error_handling (void)
+{
+ GDataAccessRule *rule;
+ GError *error = NULL;
+
+#define TEST_XML_ERROR_HANDLING(x) rule = GDATA_ACCESS_RULE (gdata_parsable_new_from_xml (GDATA_TYPE_ACCESS_RULE,\
+ "<entry xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gAcl='http://schemas.google.com/acl/2007'>"\
+ x\
+ "</entry>", -1, &error));\
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR);\
+ g_assert (rule == NULL);\
+ g_clear_error (&error)
+
+ /* role */
+ TEST_XML_ERROR_HANDLING ("<gAcl:role/>"); /* missing value */
+
+ /* scope */
+ TEST_XML_ERROR_HANDLING ("<gAcl:scope/>"); /* missing type */
+ TEST_XML_ERROR_HANDLING ("<gAcl:scope type='user'/>"); /* missing value */
+ TEST_XML_ERROR_HANDLING ("<gAcl:scope type='domain'/>"); /* missing value */
+
+ /* edited */
+ TEST_XML_ERROR_HANDLING ("<app:edited/>"); /* missing date */
+ TEST_XML_ERROR_HANDLING ("<app:edited>not a date</app:edited>"); /* bad date */
+
+ /* withKey */
+ TEST_XML_ERROR_HANDLING ("<gAcl:withKey><gAcl:role value='none'/></gAcl:withKey>"); /* missing key */
+ TEST_XML_ERROR_HANDLING ("<gAcl:withKey key='asd'/>"); /* missing role */
+ TEST_XML_ERROR_HANDLING ("<gAcl:withKey key='asd'><gAcl:role/></gAcl:withKey>"); /* missing role */
+
+#undef TEST_XML_ERROR_HANDLING
+}
+
+static void
+test_access_rule_escaping (void)
+{
+ GDataAccessRule *rule;
+
+ rule = gdata_access_rule_new (NULL);
+ gdata_access_rule_set_role (rule, "<role>");
+ gdata_access_rule_set_scope (rule, "<scope>", "<value>");
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (rule,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:gAcl='http://schemas.google.com/acl/2007'>"
+ "<title type='text'><role></title>"
+ "<category term='http://schemas.google.com/acl/2007#accessRule' scheme='http://schemas.google.com/g/2005#kind'/>"
+ "<gAcl:role value='<role>'/>"
+ "<gAcl:scope type='<scope>' value='<value>'/>"
+ "</entry>");
+ g_object_unref (rule);
+}
+
+static void
+test_comparable (void)
+{
+ GDataComparable *category = GDATA_COMPARABLE (gdata_category_new ("term", "http://scheme", "label"));
+
+ /* Test the NULL comparisons */
+ g_assert_cmpint (gdata_comparable_compare (category, NULL), ==, 1);
+ g_assert_cmpint (gdata_comparable_compare (NULL, category), ==, -1);
+ g_assert_cmpint (gdata_comparable_compare (NULL, NULL), ==, 0);
+ g_assert_cmpint (gdata_comparable_compare (category, category), ==, 0);
+
+ g_object_unref (category);
+}
+
+static void
+test_color_parsing (void)
+{
+ GDataColor color;
+
+ /* With hash */
+ g_assert (gdata_color_from_hexadecimal ("#F99Ff0", &color) == TRUE);
+ g_assert_cmpuint (color.red, ==, 249);
+ g_assert_cmpuint (color.green, ==, 159);
+ g_assert_cmpuint (color.blue, ==, 240);
+
+ /* Without hash */
+ g_assert (gdata_color_from_hexadecimal ("F99Ff0", &color) == TRUE);
+ g_assert_cmpuint (color.red, ==, 249);
+ g_assert_cmpuint (color.green, ==, 159);
+ g_assert_cmpuint (color.blue, ==, 240);
+
+ /* Invalid, but correct length */
+ g_assert (gdata_color_from_hexadecimal ("foobar", &color) == FALSE);
+
+ /* Wildly invalid */
+ g_assert (gdata_color_from_hexadecimal ("this is not a real colour!", &color) == FALSE);
+}
+
+static void
+test_color_output (void)
+{
+ GDataColor color;
+ gchar *color_string;
+
+ /* General test */
+ g_assert (gdata_color_from_hexadecimal ("#F99Ff0", &color) == TRUE);
+ color_string = gdata_color_to_hexadecimal (&color);
+ g_assert_cmpstr (color_string, ==, "#f99ff0");
+ g_free (color_string);
+
+ /* Boundary tests */
+ g_assert (gdata_color_from_hexadecimal ("#ffffff", &color) == TRUE);
+ color_string = gdata_color_to_hexadecimal (&color);
+ g_assert_cmpstr (color_string, ==, "#ffffff");
+ g_free (color_string);
+
+ g_assert (gdata_color_from_hexadecimal ("#000000", &color) == TRUE);
+ color_string = gdata_color_to_hexadecimal (&color);
+ g_assert_cmpstr (color_string, ==, "#000000");
+ g_free (color_string);
+}
+
+/*static void
+test_media_thumbnail_parse_time (const gchar *locale)
+{
+ g_test_bug ("584737");
+
+ g_test_message ("Testing gdata_media_thumbnail_parse_time in the \"%s\" locale...", locale);
+ g_assert_cmpstr (setlocale (LC_ALL, locale), ==, locale);
+
+ g_assert_cmpint (gdata_media_thumbnail_parse_time ("00:01:42.500"), ==, 102500);
+ g_assert_cmpint (gdata_media_thumbnail_parse_time ("00:02:45"), ==, 165000);
+ g_assert_cmpint (gdata_media_thumbnail_parse_time ("12:00:15.000"), ==, 43215000);
+ g_assert_cmpint (gdata_media_thumbnail_parse_time ("00:00:00"), ==, 0);
+ g_assert_cmpint (gdata_media_thumbnail_parse_time ("foobar"), ==, -1);
+
+ setlocale (LC_ALL, "");
+}*/
+
+static void
+test_atom_author (void)
+{
+ GDataAuthor *author, *author2;
+ const gchar *content_type;
+ gchar *name, *uri, *email_address;
+ GError *error = NULL;
+
+ author = GDATA_AUTHOR (gdata_parsable_new_from_xml (GDATA_TYPE_AUTHOR,
+ "<author>"
+ "<name>John Smöth</name>"
+ "<uri>http://example.com/</uri>"
+ "<email>john@example.com</email>"
+ "</author>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_AUTHOR (author));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_author_get_name (author), ==, "John Smöth");
+ g_assert_cmpstr (gdata_author_get_uri (author), ==, "http://example.com/");
+ g_assert_cmpstr (gdata_author_get_email_address (author), ==, "john@example.com");
+
+ /* Compare it against another identical author */
+ author2 = gdata_author_new ("John Smöth", "http://example.com/", "john@example.com");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (author), GDATA_COMPARABLE (author2)), ==, 0);
+ g_object_unref (author2);
+
+ /* …and a different author */
+ author2 = gdata_author_new ("Brian Blessed", NULL, NULL);
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (author), GDATA_COMPARABLE (author2)), !=, 0);
+ g_object_unref (author2);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (author));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is the same */
+ gdata_test_assert_xml (author,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<author xmlns='http://www.w3.org/2005/Atom'>"
+ "<name>John Smöth</name>"
+ "<uri>http://example.com/</uri>"
+ "<email>john@example.com</email>"
+ "</author>");
+
+ /* Check the properties */
+ g_object_get (G_OBJECT (author),
+ "name", &name,
+ "uri", &uri,
+ "email-address", &email_address,
+ NULL);
+
+ g_assert_cmpstr (name, ==, "John Smöth");
+ g_assert_cmpstr (uri, ==, "http://example.com/");
+ g_assert_cmpstr (email_address, ==, "john@example.com");
+
+ g_free (name);
+ g_free (uri);
+ g_free (email_address);
+ g_object_unref (author);
+
+ /* Now parse an author with little information available */
+ author = GDATA_AUTHOR (gdata_parsable_new_from_xml (GDATA_TYPE_AUTHOR,
+ "<author>"
+ "<name>James Johnson</name>"
+ "</author>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_AUTHOR (author));
+ g_clear_error (&error);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (author));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_author_get_name (author), ==, "James Johnson");
+ g_assert (gdata_author_get_uri (author) == NULL);
+ g_assert (gdata_author_get_email_address (author) == NULL);
+
+ g_object_unref (author);
+}
+
+static void
+test_atom_author_error_handling (void)
+{
+ GDataAuthor *author;
+ GError *error = NULL;
+
+#define TEST_XML_ERROR_HANDLING(x) author = GDATA_AUTHOR (gdata_parsable_new_from_xml (GDATA_TYPE_AUTHOR,\
+ "<author>"\
+ x\
+ "</author>", -1, &error));\
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR);\
+ g_assert (author == NULL);\
+ g_clear_error (&error)
+
+ /* name */
+ TEST_XML_ERROR_HANDLING ("<name>John Smöth</name><name>Not John Smöth</name>"); /* duplicated name */
+ TEST_XML_ERROR_HANDLING ("<name></name>"); /* empty name */
+ TEST_XML_ERROR_HANDLING ("<uri>http://example.com/</uri><email>john@example.com</email>"); /* missing name */
+
+ /* uri */
+ TEST_XML_ERROR_HANDLING ("<uri>http://example.com/</uri><uri>http://another-example.com/</uri>"); /* duplicated URI */
+
+ /* email */
+ TEST_XML_ERROR_HANDLING ("<email>john@example.com</email><email>john@another-example.com</email>"); /* duplicated e-mail address */
+
+#undef TEST_XML_ERROR_HANDLING
+}
+
+static void
+test_atom_author_escaping (void)
+{
+ GDataAuthor *author;
+
+ author = gdata_author_new ("First & Last Name", "http://foo.com?foo&bar", "John Smith <john.smith@gmail.com>");
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (author,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<author xmlns='http://www.w3.org/2005/Atom'>"
+ "<name>First & Last Name</name>"
+ "<uri>http://foo.com?foo&bar</uri>"
+ "<email>John Smith <john.smith@gmail.com></email>"
+ "</author>");
+ g_object_unref (author);
+}
+
+static void
+test_atom_category (void)
+{
+ GDataCategory *category, *category2;
+ const gchar *content_type;
+ gchar *term, *scheme, *label;
+ GError *error = NULL;
+
+ category = GDATA_CATEGORY (gdata_parsable_new_from_xml (GDATA_TYPE_CATEGORY,
+ "<category term='jokes' scheme='http://foobar.com#categories' label='Jokes & Trivia'/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_CATEGORY (category));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_category_get_term (category), ==, "jokes");
+ g_assert_cmpstr (gdata_category_get_scheme (category), ==, "http://foobar.com#categories");
+ g_assert_cmpstr (gdata_category_get_label (category), ==, "Jokes & Trivia");
+
+ /* Compare it against another identical category */
+ category2 = gdata_category_new ("jokes", "http://foobar.com#categories", "Jokes & Trivia");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (category), GDATA_COMPARABLE (category2)), ==, 0);
+ g_object_unref (category2);
+
+ /* …and a different category */
+ category2 = gdata_category_new ("sports", "http://foobar.com#categories", NULL);
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (category), GDATA_COMPARABLE (category2)), !=, 0);
+ g_object_unref (category2);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (category));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is the same */
+ gdata_test_assert_xml (category,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<category xmlns='http://www.w3.org/2005/Atom' "
+ "term='jokes' scheme='http://foobar.com#categories' label='Jokes & Trivia'/>");
+
+ /* Check the properties */
+ g_object_get (G_OBJECT (category),
+ "term", &term,
+ "scheme", &scheme,
+ "label", &label,
+ NULL);
+
+ g_assert_cmpstr (term, ==, "jokes");
+ g_assert_cmpstr (scheme, ==, "http://foobar.com#categories");
+ g_assert_cmpstr (label, ==, "Jokes & Trivia");
+
+ g_free (term);
+ g_free (scheme);
+ g_free (label);
+ g_object_unref (category);
+
+ /* Now parse a category with less information available */
+ category = GDATA_CATEGORY (gdata_parsable_new_from_xml (GDATA_TYPE_CATEGORY,
+ "<category term='sports'/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_CATEGORY (category));
+ g_clear_error (&error);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (category));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_category_get_term (category), ==, "sports");
+ g_assert (gdata_category_get_scheme (category) == NULL);
+ g_assert (gdata_category_get_label (category) == NULL);
+ g_object_unref (category);
+
+ /* Try a category with custom content */
+ category = GDATA_CATEGORY (gdata_parsable_new_from_xml (GDATA_TYPE_CATEGORY,
+ "<category term='documentary'>"
+ "<foobar/>"
+ "<shizzle/>"
+ "</category>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_CATEGORY (category));
+ g_clear_error (&error);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (category));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML contains the unknown XML */
+ gdata_test_assert_xml (category,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<category xmlns='http://www.w3.org/2005/Atom' term='documentary'>"
+ "<foobar/>"
+ "<shizzle/>"
+ "</category>");
+ g_object_unref (category);
+}
+
+static void
+test_atom_category_error_handling (void)
+{
+ GDataCategory *category;
+ GError *error = NULL;
+
+ /* Missing term */
+ category = GDATA_CATEGORY (gdata_parsable_new_from_xml (GDATA_TYPE_CATEGORY, "<category/>", -1, &error));
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR);
+ g_assert (category == NULL);
+ g_clear_error (&error);
+}
+
+static void
+test_atom_category_escaping (void)
+{
+ GDataCategory *category;
+
+ category = gdata_category_new ("<term>", "http://foo.com?foo&bar", "Label & Stuff");
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (category,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<category xmlns='http://www.w3.org/2005/Atom' term='<term>' scheme='http://foo.com?foo&bar' "
+ "label='Label & Stuff'/>");
+ g_object_unref (category);
+}
+
+static void
+test_atom_generator (void)
+{
+ GDataGenerator *generator, *generator2;
+ const gchar *content_type;
+ gchar *name, *uri, *version;
+ GError *error = NULL;
+
+ generator = GDATA_GENERATOR (gdata_parsable_new_from_xml (GDATA_TYPE_GENERATOR,
+ "<generator uri='http://example.com/' version='15'>Bach & Son's Generator</generator>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GENERATOR (generator));
+ g_clear_error (&error);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (generator));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Compare it against another identical generator */
+ generator2 = GDATA_GENERATOR (gdata_parsable_new_from_xml (GDATA_TYPE_GENERATOR,
+ "<generator uri='http://example.com/' version='15'>Bach & Son's Generator</generator>", -1, NULL));
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (generator), GDATA_COMPARABLE (generator2)), ==, 0);
+ g_object_unref (generator2);
+
+ /* …and a different generator */
+ generator2 = GDATA_GENERATOR (gdata_parsable_new_from_xml (GDATA_TYPE_GENERATOR,
+ "<generator>Different generator</generator>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GENERATOR (generator));
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (generator), GDATA_COMPARABLE (generator2)), !=, 0);
+ g_object_unref (generator2);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_generator_get_name (generator), ==, "Bach & Son's Generator");
+ g_assert_cmpstr (gdata_generator_get_uri (generator), ==, "http://example.com/");
+ g_assert_cmpstr (gdata_generator_get_version (generator), ==, "15");
+
+ /* Check them a different way too */
+ g_object_get (G_OBJECT (generator),
+ "name", &name,
+ "uri", &uri,
+ "version", &version,
+ NULL);
+
+ g_assert_cmpstr (name, ==, "Bach & Son's Generator");
+ g_assert_cmpstr (uri, ==, "http://example.com/");
+ g_assert_cmpstr (version, ==, "15");
+
+ g_free (name);
+ g_free (uri);
+ g_free (version);
+ g_object_unref (generator);
+
+ /* Now parse a generator with less information available */
+ generator = GDATA_GENERATOR (gdata_parsable_new_from_xml (GDATA_TYPE_GENERATOR,
+ "<generator/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GENERATOR (generator));
+ g_clear_error (&error);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (generator));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the properties */
+ g_assert (gdata_generator_get_name (generator) == NULL);
+ g_assert (gdata_generator_get_uri (generator) == NULL);
+ g_assert (gdata_generator_get_version (generator) == NULL);
+ g_object_unref (generator);
+}
+
+static void
+test_atom_generator_error_handling (void)
+{
+ GDataGenerator *generator;
+ GError *error = NULL;
+
+ /* Empty URI */
+ generator = GDATA_GENERATOR (gdata_parsable_new_from_xml (GDATA_TYPE_GENERATOR, "<generator uri=''/>", -1, &error));
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR);
+ g_assert (generator == NULL);
+ g_clear_error (&error);
+}
+
+static void
+test_atom_link (void)
+{
+ GDataLink *link1, *link2;
+ gchar *uri, *relation_type, *content_type, *language, *title;
+ gint length;
+ GError *error = NULL;
+
+ link1 = GDATA_LINK (gdata_parsable_new_from_xml (GDATA_TYPE_LINK,
+ "<link href='http://example.com/' rel='http://test.com#link-type' type='text/plain' hreflang='de' "
+ "title='All About Angle Brackets: <, >' length='2000'/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_LINK (link1));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_link_get_uri (link1), ==, "http://example.com/");
+ g_assert_cmpstr (gdata_link_get_relation_type (link1), ==, "http://test.com#link-type");
+ g_assert_cmpstr (gdata_link_get_content_type (link1), ==, "text/plain");
+ g_assert_cmpstr (gdata_link_get_language (link1), ==, "de");
+ g_assert_cmpstr (gdata_link_get_title (link1), ==, "All About Angle Brackets: <, >");
+ g_assert_cmpint (gdata_link_get_length (link1), ==, 2000);
+
+ /* Compare it against another identical link */
+ link2 = gdata_link_new ("http://example.com/", "http://test.com#link-type");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (link1), GDATA_COMPARABLE (link2)), ==, 0);
+ gdata_link_set_content_type (link2, "text/plain");
+ gdata_link_set_language (link2, "de");
+ gdata_link_set_title (link2, "All About Angle Brackets: <, >");
+ gdata_link_set_length (link2, 2000);
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (link1), GDATA_COMPARABLE (link2)), ==, 0);
+
+ /* Try with a dissimilar link */
+ gdata_link_set_uri (link2, "http://gnome.org/");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (link1), GDATA_COMPARABLE (link2)), !=, 0);
+ g_object_unref (link2);
+
+ g_assert_cmpstr (gdata_parsable_get_content_type (GDATA_PARSABLE (link1)), ==, "application/atom+xml");
+
+ /* Check the outputted XML is the same */
+ gdata_test_assert_xml (link1,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<link xmlns='http://www.w3.org/2005/Atom' href='http://example.com/' title='All About Angle Brackets: <, >' "
+ "rel='http://test.com#link-type' type='text/plain' hreflang='de' length='2000'/>");
+
+ /* Set some of the properties */
+ g_object_set (G_OBJECT (link1),
+ "uri", "http://another-example.com/",
+ "relation-type", "http://test.com#link-type2",
+ "content-type", "text/html",
+ "language", "sv",
+ "title", "This & That About <Angle Brackets>",
+ "length", -1,
+ NULL);
+
+ /* Check the properties */
+ g_object_get (G_OBJECT (link1),
+ "uri", &uri,
+ "relation-type", &relation_type,
+ "content-type", &content_type,
+ "language", &language,
+ "title", &title,
+ "length", &length,
+ NULL);
+
+ g_assert_cmpstr (uri, ==, "http://another-example.com/");
+ g_assert_cmpstr (relation_type, ==, "http://test.com#link-type2");
+ g_assert_cmpstr (content_type, ==, "text/html");
+ g_assert_cmpstr (language, ==, "sv");
+ g_assert_cmpstr (title, ==, "This & That About <Angle Brackets>");
+ g_assert_cmpint (length, ==, -1);
+
+ g_free (uri);
+ g_free (relation_type);
+ g_free (content_type);
+ g_free (language);
+ g_free (title);
+ g_object_unref (link1);
+
+ /* Now parse a link with less information available */
+ link1 = GDATA_LINK (gdata_parsable_new_from_xml (GDATA_TYPE_LINK,
+ "<link href='http://shizzle.com'>Test Content<foobar/></link>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_LINK (link1));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_link_get_uri (link1), ==, "http://shizzle.com");
+ g_assert_cmpstr (gdata_link_get_relation_type (link1), ==, "http://www.iana.org/assignments/relation/alternate");
+ g_assert (gdata_link_get_content_type (link1) == NULL);
+ g_assert (gdata_link_get_language (link1) == NULL);
+ g_assert (gdata_link_get_title (link1) == NULL);
+ g_assert (gdata_link_get_length (link1) == -1);
+
+ g_assert_cmpstr (gdata_parsable_get_content_type (GDATA_PARSABLE (link1)), ==, "application/atom+xml");
+
+ /* Check the outputted XML contains the unknown XML */
+ gdata_test_assert_xml (link1,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<link xmlns='http://www.w3.org/2005/Atom' href='http://shizzle.com' rel='http://www.iana.org/assignments/relation/alternate'>"
+ "Test Content<foobar/></link>");
+ g_object_unref (link1);
+}
+
+static void
+test_atom_link_error_handling (void)
+{
+ GDataLink *_link; /* stupid unistd.h */
+ GError *error = NULL;
+
+#define TEST_XML_ERROR_HANDLING(x) _link = GDATA_LINK (gdata_parsable_new_from_xml (GDATA_TYPE_LINK,\
+ "<link " x "/>", -1, &error));\
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR);\
+ g_assert (_link == NULL);\
+ g_clear_error (&error)
+
+ /* href */
+ TEST_XML_ERROR_HANDLING (""); /* missing href */
+ TEST_XML_ERROR_HANDLING ("href=''"); /* empty href */
+
+ /* rel */
+ TEST_XML_ERROR_HANDLING ("href='http://example.com/' rel=''"); /* empty rel */
+
+ /* type */
+ TEST_XML_ERROR_HANDLING ("href='http://example.com/' type=''"); /* empty type */
+
+ /* hreflang */
+ TEST_XML_ERROR_HANDLING ("href='http://example.com/' hreflang=''"); /* empty hreflang */
+
+#undef TEST_XML_ERROR_HANDLING
+}
+
+static void
+test_atom_link_escaping (void)
+{
+ GDataLink *_link;
+
+ _link = gdata_link_new ("http://foo.com?foo&bar", "http://foo.com?foo&relation=bar");
+ gdata_link_set_content_type (_link, "<content type>");
+ gdata_link_set_language (_link, "<language>");
+ gdata_link_set_title (_link, "Title & stuff");
+
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (_link,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<link xmlns='http://www.w3.org/2005/Atom' href='http://foo.com?foo&bar' title='Title & stuff' "
+ "rel='http://foo.com?foo&relation=bar' type='<content type>' hreflang='<language>'/>");
+ g_object_unref (_link);
+}
+
+static void
+test_app_categories (void)
+{
+ GDataAPPCategories *categories;
+ GList *_categories;
+ gboolean fixed;
+ const gchar *content_type;
+ GError *error = NULL;
+
+ categories = GDATA_APP_CATEGORIES (gdata_parsable_new_from_json (GDATA_TYPE_APP_CATEGORIES,
+ "{"
+ "'kind': 'youtube#videoCategoryListResponse',"
+ "'etag': '\"tbWC5XrSXxe1WOAx6MK9z4hHSU8/1v2mrzYSYG6onNLt2qTj13hkQZk\"',"
+ "'items': ["
+ "{"
+ "'kind': 'youtube#videoCategory',"
+ "'etag': '\"tbWC5XrSXxe1WOAx6MK9z4hHSU8/Xy1mB4_yLrHy_BmKmPBggty2mZQ\"',"
+ "'id': '1',"
+ "'snippet': {"
+ "'channelId': 'UCBR8-60-B28hp2BmDPdntcQ',"
+ "'title': 'Film & Animation',"
+ "'assignable': true"
+ "}"
+ "},"
+ "{"
+ "'kind': 'youtube#videoCategory',"
+ "'etag': '\"tbWC5XrSXxe1WOAx6MK9z4hHSU8/UZ1oLIIz2dxIhO45ZTFR3a3NyTA\"',"
+ "'id': '2',"
+ "'snippet': {"
+ "'channelId': 'UCBR8-60-B28hp2BmDPdntcQ',"
+ "'title': 'Autos & Vehicles',"
+ "'assignable': true"
+ "}"
+ "}"
+ "]"
+ "}", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_APP_CATEGORIES (categories));
+ g_clear_error (&error);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (categories));
+ g_assert_cmpstr (content_type, ==, "application/json");
+
+ /* Check the properties */
+ g_assert (gdata_app_categories_is_fixed (categories) == FALSE);
+
+ /* Check them a different way too */
+ g_object_get (G_OBJECT (categories), "is-fixed", &fixed, NULL);
+ g_assert (fixed == FALSE);
+
+ /* Check the categories and scheme inheritance */
+ _categories = gdata_app_categories_get_categories (categories);
+ g_assert_cmpint (g_list_length (_categories), ==, 2);
+
+ g_assert (GDATA_IS_CATEGORY (_categories->data));
+ g_assert_cmpstr (gdata_category_get_scheme (GDATA_CATEGORY (_categories->data)), ==, NULL);
+ g_assert_cmpstr (gdata_category_get_label (GDATA_CATEGORY (_categories->data)), ==, "Film & Animation");
+
+ g_assert (GDATA_IS_CATEGORY (_categories->next->data));
+ g_assert_cmpstr (gdata_category_get_scheme (GDATA_CATEGORY (_categories->next->data)), ==, NULL);
+ g_assert_cmpstr (gdata_category_get_label (GDATA_CATEGORY (_categories->next->data)), ==, "Autos & Vehicles");
+
+ g_object_unref (categories);
+
+ /* Now parse one with less information available */
+ categories = GDATA_APP_CATEGORIES (gdata_parsable_new_from_json (GDATA_TYPE_APP_CATEGORIES,
+ "{"
+ "'kind': 'youtube#videoCategoryListResponse',"
+ "'items': []"
+ "}", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_APP_CATEGORIES (categories));
+ g_clear_error (&error);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (categories));
+ g_assert_cmpstr (content_type, ==, "application/json");
+
+ /* Check the properties */
+ g_assert (gdata_app_categories_is_fixed (categories) == FALSE);
+ g_object_unref (categories);
+}
+
+static void
+test_gd_email_address (void)
+{
+ GDataGDEmailAddress *email, *email2;
+ GError *error = NULL;
+ const gchar *content_type;
+
+ email = GDATA_GD_EMAIL_ADDRESS (gdata_parsable_new_from_xml (GDATA_TYPE_GD_EMAIL_ADDRESS,
+ "<gd:email xmlns:gd='http://schemas.google.com/g/2005' label='Personal & Private' rel='http://schemas.google.com/g/2005#home' "
+ "address='fubar@gmail.com' primary='true' displayName='<John Smith>'/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GD_EMAIL_ADDRESS (email));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gd_email_address_get_address (email), ==, "fubar@gmail.com");
+ g_assert_cmpstr (gdata_gd_email_address_get_relation_type (email), ==, GDATA_GD_EMAIL_ADDRESS_HOME);
+ g_assert_cmpstr (gdata_gd_email_address_get_label (email), ==, "Personal & Private");
+ g_assert_cmpstr (gdata_gd_email_address_get_display_name (email), ==, "<John Smith>");
+ g_assert (gdata_gd_email_address_is_primary (email) == TRUE);
+
+ /* Compare it against another identical address */
+ email2 = gdata_gd_email_address_new ("fubar@gmail.com", GDATA_GD_EMAIL_ADDRESS_HOME, "Personal & Private", TRUE);
+ gdata_gd_email_address_set_display_name (email2, "<John Smith>");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (email), GDATA_COMPARABLE (email2)), ==, 0);
+
+ /* …and a different one */
+ gdata_gd_email_address_set_address (email2, "test@example.com");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (email), GDATA_COMPARABLE (email2)), !=, 0);
+ g_object_unref (email2);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (email));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is the same */
+ gdata_test_assert_xml (email,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:email xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' address='fubar@gmail.com' "
+ "rel='http://schemas.google.com/g/2005#home' label='Personal & Private' displayName='<John Smith>' "
+ "primary='true'/>");
+ g_object_unref (email);
+
+ /* Now parse an address with less information available */
+ email = GDATA_GD_EMAIL_ADDRESS (gdata_parsable_new_from_xml (GDATA_TYPE_GD_EMAIL_ADDRESS,
+ "<gd:email xmlns:gd='http://schemas.google.com/g/2005' address='test@example.com'/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GD_EMAIL_ADDRESS (email));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gd_email_address_get_address (email), ==, "test@example.com");
+ g_assert (gdata_gd_email_address_get_relation_type (email) == NULL);
+ g_assert (gdata_gd_email_address_get_label (email) == NULL);
+ g_assert (gdata_gd_email_address_get_display_name (email) == NULL);
+ g_assert (gdata_gd_email_address_is_primary (email) == FALSE);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (email));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML contains the unknown XML */
+ gdata_test_assert_xml (email,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:email xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' address='test@example.com' "
+ "primary='false'/>");
+ g_object_unref (email);
+}
+
+static void
+test_gd_email_address_escaping (void)
+{
+ GDataGDEmailAddress *email;
+
+ g_test_bug ("630350");
+
+ email = gdata_gd_email_address_new ("Fubar <fubar@gmail.com>", GDATA_GD_EMAIL_ADDRESS_HOME "?foo&bar", "Personal & Private", TRUE);
+ gdata_gd_email_address_set_display_name (email, "<John Smith>");
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (email,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:email xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' "
+ "address='Fubar <fubar@gmail.com>' rel='http://schemas.google.com/g/2005#home?foo&bar' "
+ "label='Personal & Private' displayName='<John Smith>' primary='true'/>");
+ g_object_unref (email);
+}
+
+static void
+test_gd_email_address_comparison (void)
+{
+ GDataGDEmailAddress *email1, *email2;
+
+ /* Should only compare equal if addresses are equal. */
+ email1 = gdata_gd_email_address_new ("foo@example.com", NULL, NULL, TRUE);
+ email2 = gdata_gd_email_address_new ("foo@example.com", NULL, "label", FALSE);
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (email1), GDATA_COMPARABLE (email2)), ==, 0);
+
+ gdata_gd_email_address_set_address (email1, "bar@example.com");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (email1), GDATA_COMPARABLE (email2)), !=, 0);
+
+ g_object_unref (email2);
+ g_object_unref (email1);
+}
+
+static void
+test_gd_im_address (void)
+{
+ GDataGDIMAddress *im, *im2;
+ GError *error = NULL;
+ const gchar *content_type;
+
+ im = GDATA_GD_IM_ADDRESS (gdata_parsable_new_from_xml (GDATA_TYPE_GD_IM_ADDRESS,
+ "<gd:im xmlns:gd='http://schemas.google.com/g/2005' protocol='http://schemas.google.com/g/2005#MSN' address='foo@bar.msn.com' "
+ "rel='http://schemas.google.com/g/2005#home' primary='true'/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GD_IM_ADDRESS (im));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gd_im_address_get_address (im), ==, "foo@bar.msn.com");
+ g_assert_cmpstr (gdata_gd_im_address_get_protocol (im), ==, GDATA_GD_IM_PROTOCOL_LIVE_MESSENGER);
+ g_assert_cmpstr (gdata_gd_im_address_get_relation_type (im), ==, GDATA_GD_IM_ADDRESS_HOME);
+ g_assert (gdata_gd_im_address_get_label (im) == NULL);
+ g_assert (gdata_gd_im_address_is_primary (im) == TRUE);
+
+ /* Compare it against another identical address */
+ im2 = gdata_gd_im_address_new ("foo@bar.msn.com", GDATA_GD_IM_PROTOCOL_LIVE_MESSENGER, GDATA_GD_IM_ADDRESS_HOME, NULL, TRUE);
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (im), GDATA_COMPARABLE (im2)), ==, 0);
+
+ /* …and a different one */
+ gdata_gd_im_address_set_protocol (im2, GDATA_GD_IM_PROTOCOL_GOOGLE_TALK);
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (im), GDATA_COMPARABLE (im2)), !=, 0);
+ g_object_unref (im2);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (im));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is the same */
+ gdata_test_assert_xml (im,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:im xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' "
+ "address='foo@bar.msn.com' protocol='http://schemas.google.com/g/2005#MSN' "
+ "rel='http://schemas.google.com/g/2005#home' primary='true'/>");
+ g_object_unref (im);
+
+ /* Now parse an address with less information available */
+ im = GDATA_GD_IM_ADDRESS (gdata_parsable_new_from_xml (GDATA_TYPE_GD_IM_ADDRESS,
+ "<gd:im xmlns:gd='http://schemas.google.com/g/2005' label='Other & Miscellaneous' address='foo@baz.example.com'/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GD_IM_ADDRESS (im));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gd_im_address_get_address (im), ==, "foo@baz.example.com");
+ g_assert (gdata_gd_im_address_get_protocol (im) == NULL);
+ g_assert (gdata_gd_im_address_get_relation_type (im) == NULL);
+ g_assert_cmpstr (gdata_gd_im_address_get_label (im), ==, "Other & Miscellaneous");
+ g_assert (gdata_gd_im_address_is_primary (im) == FALSE);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (im));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML contains the unknown XML */
+ gdata_test_assert_xml (im,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:im xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' address='foo@baz.example.com' "
+ "label='Other & Miscellaneous' primary='false'/>");
+ g_object_unref (im);
+}
+
+static void
+test_gd_im_address_escaping (void)
+{
+ GDataGDIMAddress *im;
+
+ im = gdata_gd_im_address_new ("Fubar <fubar@gmail.com>", GDATA_GD_IM_PROTOCOL_GOOGLE_TALK "?foo&bar", GDATA_GD_IM_ADDRESS_HOME "?foo&bar",
+ "Personal & Private", TRUE);
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (im,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:im xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' "
+ "address='Fubar <fubar@gmail.com>' protocol='http://schemas.google.com/g/2005#GOOGLE_TALK?foo&bar' "
+ "rel='http://schemas.google.com/g/2005#home?foo&bar' label='Personal & Private' primary='true'/>");
+ g_object_unref (im);
+}
+
+static void
+test_gd_im_address_comparison (void)
+{
+ GDataGDIMAddress *im_address1, *im_address2;
+
+ /* Should only compare equal if address and protocol are both equal. */
+ im_address1 = gdata_gd_im_address_new ("foo@example.com", GDATA_GD_IM_PROTOCOL_LIVE_MESSENGER, NULL, NULL, TRUE);
+ im_address2 = gdata_gd_im_address_new ("foo@example.com", GDATA_GD_IM_PROTOCOL_LIVE_MESSENGER, NULL, "label", FALSE);
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (im_address1), GDATA_COMPARABLE (im_address2)), ==, 0);
+
+ /* Different addresses, same protocol. */
+ gdata_gd_im_address_set_address (im_address1, "bar@example.com");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (im_address1), GDATA_COMPARABLE (im_address2)), !=, 0);
+
+ /* Same address, different protocols. */
+ gdata_gd_im_address_set_address (im_address1, "foo@example.com");
+ gdata_gd_im_address_set_protocol (im_address1, GDATA_GD_IM_PROTOCOL_JABBER);
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (im_address1), GDATA_COMPARABLE (im_address2)), !=, 0);
+
+ g_object_unref (im_address2);
+ g_object_unref (im_address1);
+}
+
+static void
+test_gd_name (void)
+{
+ GDataGDName *name, *name2;
+ GError *error = NULL;
+ const gchar *content_type;
+
+ name = GDATA_GD_NAME (gdata_parsable_new_from_xml (GDATA_TYPE_GD_NAME,
+ "<gd:name xmlns:gd='http://schemas.google.com/g/2005'>"
+ "<gd:givenName>Brian</gd:givenName>"
+ "<gd:additionalName>Charles</gd:additionalName>"
+ "<gd:familyName>Blessed</gd:familyName>"
+ "<gd:namePrefix>Mr</gd:namePrefix>"
+ "<gd:nameSuffix>ABC</gd:nameSuffix>"
+ "<gd:fullName>Mr Brian Charles Blessed, ABC</gd:fullName>"
+ "</gd:name>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GD_NAME (name));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gd_name_get_given_name (name), ==, "Brian");
+ g_assert_cmpstr (gdata_gd_name_get_additional_name (name), ==, "Charles");
+ g_assert_cmpstr (gdata_gd_name_get_family_name (name), ==, "Blessed");
+ g_assert_cmpstr (gdata_gd_name_get_prefix (name), ==, "Mr");
+ g_assert_cmpstr (gdata_gd_name_get_suffix (name), ==, "ABC");
+ g_assert_cmpstr (gdata_gd_name_get_full_name (name), ==, "Mr Brian Charles Blessed, ABC");
+
+ /* Compare it against another identical name */
+ name2 = gdata_gd_name_new ("Brian", "Blessed");
+ gdata_gd_name_set_additional_name (name2, "Charles");
+ gdata_gd_name_set_prefix (name2, "Mr");
+ gdata_gd_name_set_suffix (name2, "ABC");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (name), GDATA_COMPARABLE (name2)), ==, 0);
+
+ /* …and a different one */
+ gdata_gd_name_set_prefix (name2, "Mrs");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (name), GDATA_COMPARABLE (name2)), !=, 0);
+ g_object_unref (name2);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (name));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is the same */
+ gdata_test_assert_xml (name,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:name xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'>"
+ "<gd:givenName>Brian</gd:givenName>"
+ "<gd:additionalName>Charles</gd:additionalName>"
+ "<gd:familyName>Blessed</gd:familyName>"
+ "<gd:namePrefix>Mr</gd:namePrefix>"
+ "<gd:nameSuffix>ABC</gd:nameSuffix>"
+ "<gd:fullName>Mr Brian Charles Blessed, ABC</gd:fullName>"
+ "</gd:name>");
+ g_object_unref (name);
+
+ /* Now parse an address with less information available */
+ name = GDATA_GD_NAME (gdata_parsable_new_from_xml (GDATA_TYPE_GD_NAME,
+ "<gd:name xmlns:gd='http://schemas.google.com/g/2005'><gd:givenName>Bob</gd:givenName></gd:name>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GD_NAME (name));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gd_name_get_given_name (name), ==, "Bob");
+ g_assert (gdata_gd_name_get_additional_name (name) == NULL);
+ g_assert (gdata_gd_name_get_family_name (name) == NULL);
+ g_assert (gdata_gd_name_get_prefix (name) == NULL);
+ g_assert (gdata_gd_name_get_suffix (name) == NULL);
+ g_assert (gdata_gd_name_get_full_name (name) == NULL);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (name));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is still correct */
+ gdata_test_assert_xml (name,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:name xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'>"
+ "<gd:givenName>Bob</gd:givenName>"
+ "</gd:name>");
+ g_object_unref (name);
+}
+
+static void
+test_gd_name_empty_strings (void)
+{
+ GDataGDName *name;
+ GError *error = NULL;
+
+ g_test_bug ("662290");
+
+ /* Test that empty full names get treated as NULL correctly. */
+ name = GDATA_GD_NAME (gdata_parsable_new_from_xml (GDATA_TYPE_GD_NAME,
+ "<gd:name xmlns:gd='http://schemas.google.com/g/2005'>"
+ "<gd:fullName></gd:fullName>"
+ "</gd:name>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GD_NAME (name));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gd_name_get_given_name (name), ==, NULL);
+ g_assert_cmpstr (gdata_gd_name_get_additional_name (name), ==, NULL);
+ g_assert_cmpstr (gdata_gd_name_get_family_name (name), ==, NULL);
+ g_assert_cmpstr (gdata_gd_name_get_prefix (name), ==, NULL);
+ g_assert_cmpstr (gdata_gd_name_get_suffix (name), ==, NULL);
+ g_assert_cmpstr (gdata_gd_name_get_full_name (name), ==, NULL);
+
+ g_object_unref (name);
+
+ /* Build a name with an empty string full name and check the serialisation */
+ name = gdata_gd_name_new ("Georgey", "Porgey");
+ gdata_gd_name_set_full_name (name, "");
+
+ g_assert_cmpstr (gdata_gd_name_get_full_name (name), ==, NULL);
+
+ /* Check the outputted XML is the same */
+ gdata_test_assert_xml (name,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:name xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'>"
+ "<gd:givenName>Georgey</gd:givenName>"
+ "<gd:familyName>Porgey</gd:familyName>"
+ "</gd:name>");
+
+ g_object_unref (name);
+}
+
+static void
+test_gd_name_comparison (void)
+{
+ GDataGDName *name1, *name2;
+
+ /* Names are only equal if the given, additional and family names are all equal, and the prefixes are equal too. */
+ name1 = gdata_gd_name_new ("Given", "Family");
+ gdata_gd_name_set_additional_name (name1, "Additional");
+ gdata_gd_name_set_prefix (name1, "Mrs");
+ name2 = gdata_gd_name_new ("Given", "Family");
+ gdata_gd_name_set_additional_name (name2, "Additional");
+ gdata_gd_name_set_prefix (name2, "Mrs");
+
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (name1), GDATA_COMPARABLE (name2)), ==, 0);
+
+ /* Different given names. */
+ gdata_gd_name_set_given_name (name1, "Different");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (name1), GDATA_COMPARABLE (name2)), !=, 0);
+
+ /* Different additional names. */
+ gdata_gd_name_set_given_name (name1, "Given");
+ gdata_gd_name_set_additional_name (name1, "Different");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (name1), GDATA_COMPARABLE (name2)), !=, 0);
+
+ /* Different family names. */
+ gdata_gd_name_set_additional_name (name1, "Additional");
+ gdata_gd_name_set_family_name (name1, "Different");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (name1), GDATA_COMPARABLE (name2)), !=, 0);
+
+ /* Different prefixes. */
+ gdata_gd_name_set_family_name (name1, "Family");
+ gdata_gd_name_set_prefix (name1, "Mr");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (name1), GDATA_COMPARABLE (name2)), !=, 0);
+
+ g_object_unref (name2);
+ g_object_unref (name1);
+}
+
+static void
+test_gd_organization (void)
+{
+ GDataGDOrganization *org, *org2;
+ GDataGDWhere *location;
+ GError *error = NULL;
+ const gchar *content_type;
+
+ org = GDATA_GD_ORGANIZATION (gdata_parsable_new_from_xml (GDATA_TYPE_GD_ORGANIZATION,
+ "<gd:organization xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#work' label='Work & Occupation' "
+ "primary='true'>"
+ "<gd:orgName>Google, Inc.</gd:orgName>"
+ "<gd:orgTitle><Angle Bracketeer></gd:orgTitle>"
+ "<gd:orgDepartment>Finance</gd:orgDepartment>"
+ "<gd:orgJobDescription>Doing stuff.</gd:orgJobDescription>"
+ "<gd:orgSymbol>FOO</gd:orgSymbol>"
+ "<gd:where valueString='Test location'/>"
+ "</gd:organization>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GD_ORGANIZATION (org));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gd_organization_get_name (org), ==, "Google, Inc.");
+ g_assert_cmpstr (gdata_gd_organization_get_title (org), ==, "<Angle Bracketeer>");
+ g_assert_cmpstr (gdata_gd_organization_get_relation_type (org), ==, GDATA_GD_ORGANIZATION_WORK);
+ g_assert_cmpstr (gdata_gd_organization_get_label (org), ==, "Work & Occupation");
+ g_assert_cmpstr (gdata_gd_organization_get_department (org), ==, "Finance");
+ g_assert_cmpstr (gdata_gd_organization_get_job_description (org), ==, "Doing stuff.");
+ g_assert_cmpstr (gdata_gd_organization_get_symbol (org), ==, "FOO");
+ location = gdata_gd_organization_get_location (org);
+ g_assert (GDATA_IS_GD_WHERE (location));
+ g_assert (gdata_gd_organization_is_primary (org) == TRUE);
+
+ /* Compare it against another identical organization */
+ org2 = gdata_gd_organization_new ("Google, Inc.", "<Angle Bracketeer>", GDATA_GD_ORGANIZATION_WORK, "Work & Occupation", TRUE);
+ gdata_gd_organization_set_department (org2, "Finance");
+ gdata_gd_organization_set_location (org2, location);
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (org), GDATA_COMPARABLE (org2)), ==, 0);
+
+ /* …and a different one */
+ gdata_gd_organization_set_title (org2, "Demoted!");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (org), GDATA_COMPARABLE (org2)), !=, 0);
+ g_object_unref (org2);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (org));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is the same */
+ gdata_test_assert_xml (org,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:organization xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' "
+ "rel='http://schemas.google.com/g/2005#work' label='Work & Occupation' primary='true'>"
+ "<gd:orgName>Google, Inc.</gd:orgName>"
+ "<gd:orgTitle><Angle Bracketeer></gd:orgTitle>"
+ "<gd:orgDepartment>Finance</gd:orgDepartment>"
+ "<gd:orgJobDescription>Doing stuff.</gd:orgJobDescription>"
+ "<gd:orgSymbol>FOO</gd:orgSymbol>"
+ "<gd:where valueString='Test location'/>"
+ "</gd:organization>");
+ g_object_unref (org);
+
+ /* Now parse an organization with less information available */
+ org = GDATA_GD_ORGANIZATION (gdata_parsable_new_from_xml (GDATA_TYPE_GD_ORGANIZATION,
+ "<gd:organization xmlns:gd='http://schemas.google.com/g/2005'/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GD_ORGANIZATION (org));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert (gdata_gd_organization_get_name (org) == NULL);
+ g_assert (gdata_gd_organization_get_title (org) == NULL);
+ g_assert (gdata_gd_organization_get_relation_type (org) == NULL);
+ g_assert (gdata_gd_organization_get_label (org) == NULL);
+ g_assert (gdata_gd_organization_is_primary (org) == FALSE);
+ g_assert (gdata_gd_organization_get_department (org) == NULL);
+ g_assert (gdata_gd_organization_get_job_description (org) == NULL);
+ g_assert (gdata_gd_organization_get_symbol (org) == NULL);
+ g_assert (gdata_gd_organization_get_location (org) == NULL);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (org));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML contains the unknown XML */
+ gdata_test_assert_xml (org,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:organization xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' primary='false'/>");
+ g_object_unref (org);
+}
+
+static void
+test_gd_organization_escaping (void)
+{
+ GDataGDOrganization *org;
+
+ org = gdata_gd_organization_new ("Steptoe & Son", "Title & Stuff", GDATA_GD_ORGANIZATION_WORK "?foo&bar", "Personal & Private", TRUE);
+ gdata_gd_organization_set_department (org, "Department & Stuff");
+ gdata_gd_organization_set_job_description (org, "Escaping <brackets>.");
+ gdata_gd_organization_set_symbol (org, "<&>");
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (org,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:organization xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' "
+ "rel='http://schemas.google.com/g/2005#work?foo&bar' label='Personal & Private' primary='true'>"
+ "<gd:orgName>Steptoe & Son</gd:orgName>"
+ "<gd:orgTitle>Title & Stuff</gd:orgTitle>"
+ "<gd:orgDepartment>Department & Stuff</gd:orgDepartment>"
+ "<gd:orgJobDescription>Escaping <brackets>.</gd:orgJobDescription>"
+ "<gd:orgSymbol><&></gd:orgSymbol>"
+ "</gd:organization>");
+ g_object_unref (org);
+}
+
+static void
+test_gd_organization_comparison (void)
+{
+ GDataGDOrganization *org1, *org2;
+
+ /* Organisation positions are equal if the name, title and department are all equal. */
+ org1 = gdata_gd_organization_new ("Name", "Title", NULL, NULL, TRUE);
+ gdata_gd_organization_set_department (org1, "Department");
+ org2 = gdata_gd_organization_new ("Name", "Title", NULL, "label", FALSE);
+ gdata_gd_organization_set_department (org2, "Department");
+
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (org1), GDATA_COMPARABLE (org2)), ==, 0);
+
+ /* Different name. */
+ gdata_gd_organization_set_name (org1, "Different");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (org1), GDATA_COMPARABLE (org2)), !=, 0);
+
+ /* Different title. */
+ gdata_gd_organization_set_name (org1, "Name");
+ gdata_gd_organization_set_title (org1, "Different");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (org1), GDATA_COMPARABLE (org2)), !=, 0);
+
+ /* Different department. */
+ gdata_gd_organization_set_title (org1, "Title");
+ gdata_gd_organization_set_department (org1, "Different");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (org1), GDATA_COMPARABLE (org2)), !=, 0);
+
+ g_object_unref (org2);
+ g_object_unref (org1);
+}
+
+static void
+test_gd_phone_number (void)
+{
+ GDataGDPhoneNumber *phone, *phone2;
+ GError *error = NULL;
+ const gchar *content_type;
+
+ phone = GDATA_GD_PHONE_NUMBER (gdata_parsable_new_from_xml (GDATA_TYPE_GD_PHONE_NUMBER,
+ "<gd:phoneNumber xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#mobile' "
+ "label='Personal & business calls only' uri='tel:+12065551212'>+1 206 555 1212</gd:phoneNumber>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GD_PHONE_NUMBER (phone));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gd_phone_number_get_number (phone), ==, "+1 206 555 1212");
+ g_assert_cmpstr (gdata_gd_phone_number_get_uri (phone), ==, "tel:+12065551212");
+ g_assert_cmpstr (gdata_gd_phone_number_get_relation_type (phone), ==, GDATA_GD_PHONE_NUMBER_MOBILE);
+ g_assert_cmpstr (gdata_gd_phone_number_get_label (phone), ==, "Personal & business calls only");
+ g_assert (gdata_gd_phone_number_is_primary (phone) == FALSE);
+
+ /* Compare it against another identical number */
+ phone2 = gdata_gd_phone_number_new ("+1 206 555 1212", GDATA_GD_PHONE_NUMBER_MOBILE, "Personal & business calls only",
+ "tel:+12065551212", FALSE);
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (phone), GDATA_COMPARABLE (phone2)), ==, 0);
+
+ /* …and a different one */
+ gdata_gd_phone_number_set_number (phone2, "+1 206 555 1212 666");
+ gdata_gd_phone_number_set_uri (phone2, NULL);
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (phone), GDATA_COMPARABLE (phone2)), !=, 0);
+ g_object_unref (phone2);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (phone));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is the same */
+ gdata_test_assert_xml (phone,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:phoneNumber xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' "
+ "uri='tel:+12065551212' rel='http://schemas.google.com/g/2005#mobile' label='Personal & business calls only' "
+ "primary='false'>+1 206 555 1212</gd:phoneNumber>");
+
+ /* Check we trim whitespace properly, and respect Unicode characters */
+ gdata_gd_phone_number_set_number (phone, " 0123456 (789) ëxt 300 ");
+ g_assert_cmpstr (gdata_gd_phone_number_get_number (phone), ==, "0123456 (789) ëxt 300");
+ g_object_unref (phone);
+
+ /* Now parse a phone number with less information available, but some extraneous whitespace */
+ phone = GDATA_GD_PHONE_NUMBER (gdata_parsable_new_from_xml (GDATA_TYPE_GD_PHONE_NUMBER,
+ "<gd:phoneNumber xmlns:gd='http://schemas.google.com/g/2005'> (425) 555-8080 ext. 72585 \n </gd:phoneNumber>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GD_PHONE_NUMBER (phone));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gd_phone_number_get_number (phone), ==, "(425) 555-8080 ext. 72585");
+ g_assert (gdata_gd_phone_number_get_uri (phone) == NULL);
+ g_assert (gdata_gd_phone_number_get_relation_type (phone) == NULL);
+ g_assert (gdata_gd_phone_number_get_label (phone) == NULL);
+ g_assert (gdata_gd_phone_number_is_primary (phone) == FALSE);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (phone));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML contains the unknown XML */
+ gdata_test_assert_xml (phone,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:phoneNumber xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:gd='http://schemas.google.com/g/2005' primary='false'>(425) 555-8080 ext. 72585</gd:phoneNumber>");
+ g_object_unref (phone);
+}
+
+static void
+test_gd_phone_number_escaping (void)
+{
+ GDataGDPhoneNumber *phone;
+
+ phone = gdata_gd_phone_number_new ("0123456789 <54>", GDATA_GD_PHONE_NUMBER_WORK_MOBILE "?foo&bar", "Personal & Private",
+ "tel:+012345678954?foo&bar", TRUE);
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (phone,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:phoneNumber xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' "
+ "uri='tel:+012345678954?foo&bar' rel='http://schemas.google.com/g/2005#work_mobile?foo&bar' "
+ "label='Personal & Private' primary='true'>0123456789 <54></gd:phoneNumber>");
+ g_object_unref (phone);
+}
+
+static void
+test_gd_phone_number_comparison (void)
+{
+ GDataGDPhoneNumber *phone1, *phone2;
+
+ /* Phone numbers are equal if the number or the URI matches (NULL URIs cannot match). */
+ phone1 = gdata_gd_phone_number_new ("123", NULL, NULL, "phone://123", TRUE);
+ phone2 = gdata_gd_phone_number_new ("123", NULL, "label", "phone://123", FALSE);
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (phone1), GDATA_COMPARABLE (phone2)), ==, 0);
+
+ /* Same numbers, different URIs. */
+ gdata_gd_phone_number_set_uri (phone1, "phone://+44123");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (phone1), GDATA_COMPARABLE (phone2)), ==, 0);
+
+ /* Different numbers, same URIs. */
+ gdata_gd_phone_number_set_uri (phone1, "phone://123");
+ gdata_gd_phone_number_set_number (phone1, "+44123");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (phone1), GDATA_COMPARABLE (phone2)), ==, 0);
+
+ /* Different numbers and URIs. */
+ gdata_gd_phone_number_set_number (phone1, "456");
+ gdata_gd_phone_number_set_uri (phone1, "phone://456");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (phone1), GDATA_COMPARABLE (phone2)), !=, 0);
+
+ /* Different numbers, NULL URIs. */
+ gdata_gd_phone_number_set_uri (phone1, NULL);
+ gdata_gd_phone_number_set_uri (phone2, NULL);
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (phone1), GDATA_COMPARABLE (phone2)), !=, 0);
+
+ /* Same numbers, NULL URIs. */
+ gdata_gd_phone_number_set_number (phone1, "123");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (phone1), GDATA_COMPARABLE (phone2)), ==, 0);
+
+ g_object_unref (phone2);
+ g_object_unref (phone1);
+}
+
+static void
+test_gd_postal_address (void)
+{
+ GDataGDPostalAddress *postal, *postal2;
+ GError *error = NULL;
+ const gchar *content_type;
+
+ postal = GDATA_GD_POSTAL_ADDRESS (gdata_parsable_new_from_xml (GDATA_TYPE_GD_POSTAL_ADDRESS,
+ "<gd:structuredPostalAddress xmlns:gd='http://schemas.google.com/g/2005' label='Home & Safe House' "
+ "rel='http://schemas.google.com/g/2005#home' primary='true'>"
+ "<gd:street>500 West 45th Street</gd:street>"
+ "<gd:city>New York</gd:city>"
+ "<gd:postcode>NY 10036</gd:postcode>"
+ "<gd:country code='US'>United States</gd:country>"
+ "</gd:structuredPostalAddress>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GD_POSTAL_ADDRESS (postal));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gd_postal_address_get_street (postal), ==, "500 West 45th Street");
+ g_assert_cmpstr (gdata_gd_postal_address_get_city (postal), ==, "New York");
+ g_assert_cmpstr (gdata_gd_postal_address_get_postcode (postal), ==, "NY 10036");
+ g_assert_cmpstr (gdata_gd_postal_address_get_relation_type (postal), ==, GDATA_GD_POSTAL_ADDRESS_HOME);
+ g_assert_cmpstr (gdata_gd_postal_address_get_label (postal), ==, "Home & Safe House");
+ g_assert_cmpstr (gdata_gd_postal_address_get_country (postal), ==, "United States");
+ g_assert_cmpstr (gdata_gd_postal_address_get_country_code (postal), ==, "US");
+ g_assert (gdata_gd_postal_address_is_primary (postal) == TRUE);
+
+ /* Compare it against another identical address */
+ postal2 = gdata_gd_postal_address_new (GDATA_GD_POSTAL_ADDRESS_HOME, "Home & Safe House", TRUE);
+ gdata_gd_postal_address_set_street (postal2, "500 West 45th Street");
+ gdata_gd_postal_address_set_city (postal2, "New York");
+ gdata_gd_postal_address_set_postcode (postal2, "NY 10036");
+ gdata_gd_postal_address_set_country (postal2, "United States", "US");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (postal), GDATA_COMPARABLE (postal2)), ==, 0);
+
+ /* …and a different one */
+ gdata_gd_postal_address_set_city (postal2, "Atlas Mountains");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (postal), GDATA_COMPARABLE (postal2)), !=, 0);
+ g_object_unref (postal2);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (postal));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is the same */
+ gdata_test_assert_xml (postal,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:structuredPostalAddress xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' "
+ "rel='http://schemas.google.com/g/2005#home' label='Home & Safe House' primary='true'>"
+ "<gd:street>500 West 45th Street</gd:street>"
+ "<gd:city>New York</gd:city>"
+ "<gd:postcode>NY 10036</gd:postcode>"
+ "<gd:country code='US'>United States</gd:country>"
+ "</gd:structuredPostalAddress>");
+
+ /* Check we trim whitespace properly, and respect Unicode characters */
+ gdata_gd_postal_address_set_address (postal, " Schöne Grüße Straße\nGermany ");
+ g_assert_cmpstr (gdata_gd_postal_address_get_address (postal), ==, "Schöne Grüße Straße\nGermany");
+ g_object_unref (postal);
+
+ /* Now parse an address with less information available */
+ postal = GDATA_GD_POSTAL_ADDRESS (gdata_parsable_new_from_xml (GDATA_TYPE_GD_POSTAL_ADDRESS,
+ "<gd:structuredPostalAddress xmlns:gd='http://schemas.google.com/g/2005'><gd:street>f</gd:street></gd:structuredPostalAddress>",
+ -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GD_POSTAL_ADDRESS (postal));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gd_postal_address_get_street (postal), ==, "f");
+ g_assert (gdata_gd_postal_address_get_relation_type (postal) == NULL);
+ g_assert (gdata_gd_postal_address_get_label (postal) == NULL);
+ g_assert (gdata_gd_postal_address_is_primary (postal) == FALSE);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (postal));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML contains the unknown XML */
+ gdata_test_assert_xml (postal,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:structuredPostalAddress xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' primary='false'>"
+ "<gd:street>f</gd:street></gd:structuredPostalAddress>");
+ g_object_unref (postal);
+}
+
+static void
+test_gd_postal_address_escaping (void)
+{
+ GDataGDPostalAddress *address;
+
+ address = gdata_gd_postal_address_new (GDATA_GD_POSTAL_ADDRESS_WORK "?foo&bar", "Personal & Private", TRUE);
+ gdata_gd_postal_address_set_address (address, "<address>");
+ gdata_gd_postal_address_set_mail_class (address, GDATA_GD_MAIL_CLASS_BOTH "?foo&bar");
+ gdata_gd_postal_address_set_usage (address, GDATA_GD_ADDRESS_USAGE_GENERAL "?foo&bar");
+ gdata_gd_postal_address_set_agent (address, "<agent>");
+ gdata_gd_postal_address_set_house_name (address, "House & House");
+ gdata_gd_postal_address_set_street (address, "Church & Main Street");
+ gdata_gd_postal_address_set_po_box (address, "<515>");
+ gdata_gd_postal_address_set_neighborhood (address, "<neighbourhood>");
+ gdata_gd_postal_address_set_city (address, "City <17>");
+ gdata_gd_postal_address_set_subregion (address, "Subregion <5>");
+ gdata_gd_postal_address_set_region (address, "<region>");
+ gdata_gd_postal_address_set_postcode (address, "Postcode & stuff");
+ gdata_gd_postal_address_set_country (address, "<foo>", "<bar>");
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (address,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:structuredPostalAddress xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' "
+ "rel='http://schemas.google.com/g/2005#work?foo&bar' label='Personal & Private' "
+ "mailClass='http://schemas.google.com/g/2005#both?foo&bar' "
+ "usage='http://schemas.google.com/g/2005#general?foo&bar' primary='true'>"
+ "<gd:agent><agent></gd:agent>"
+ "<gd:housename>House & House</gd:housename>"
+ "<gd:street>Church & Main Street</gd:street>"
+ "<gd:pobox><515></gd:pobox>"
+ "<gd:neighborhood><neighbourhood></gd:neighborhood>"
+ "<gd:city>City <17></gd:city>"
+ "<gd:subregion>Subregion <5></gd:subregion>"
+ "<gd:region><region></gd:region>"
+ "<gd:postcode>Postcode & stuff</gd:postcode>"
+ "<gd:country code='<bar>'><foo></gd:country>"
+ "<gd:formattedAddress><address></gd:formattedAddress>"
+ "</gd:structuredPostalAddress>");
+ g_object_unref (address);
+}
+
+static void
+test_gd_postal_address_comparison (void)
+{
+ GDataGDPostalAddress *address1, *address2;
+
+ /* Postal addresses compare equal if the street, city, PO box and postcode are all equal. */
+ address1 = gdata_gd_postal_address_new (NULL, NULL, TRUE);
+ gdata_gd_postal_address_set_street (address1, "Street");
+ gdata_gd_postal_address_set_city (address1, "City");
+ gdata_gd_postal_address_set_po_box (address1, "PO box");
+ gdata_gd_postal_address_set_postcode (address1, "Postcode");
+ address2 = gdata_gd_postal_address_new (NULL, "label", FALSE);
+ gdata_gd_postal_address_set_street (address2, "Street");
+ gdata_gd_postal_address_set_city (address2, "City");
+ gdata_gd_postal_address_set_po_box (address2, "PO box");
+ gdata_gd_postal_address_set_postcode (address2, "Postcode");
+
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (address1), GDATA_COMPARABLE (address2)), ==, 0);
+
+ /* Different streets. */
+ gdata_gd_postal_address_set_street (address1, "Different");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (address1), GDATA_COMPARABLE (address2)), !=, 0);
+
+ /* Different cities. */
+ gdata_gd_postal_address_set_street (address1, "Street");
+ gdata_gd_postal_address_set_city (address1, "Different");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (address1), GDATA_COMPARABLE (address2)), !=, 0);
+
+ /* Different PO box. */
+ gdata_gd_postal_address_set_city (address1, "City");
+ gdata_gd_postal_address_set_po_box (address1, "Different");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (address1), GDATA_COMPARABLE (address2)), !=, 0);
+
+ /* Different postcode. */
+ gdata_gd_postal_address_set_po_box (address1, "PO box");
+ gdata_gd_postal_address_set_postcode (address1, "Different");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (address1), GDATA_COMPARABLE (address2)), !=, 0);
+
+ g_object_unref (address2);
+ g_object_unref (address1);
+}
+
+static void
+test_gd_reminder (void)
+{
+ GDataGDReminder *reminder, *reminder2;
+ gint64 _time;
+ GError *error = NULL;
+ const gchar *content_type;
+
+ reminder = GDATA_GD_REMINDER (gdata_parsable_new_from_xml (GDATA_TYPE_GD_REMINDER,
+ "<gd:reminder xmlns:gd='http://schemas.google.com/g/2005' days='15'/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GD_REMINDER (reminder));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert (gdata_gd_reminder_get_method (reminder) == NULL);
+ g_assert (gdata_gd_reminder_is_absolute_time (reminder) == FALSE);
+ g_assert_cmpint (gdata_gd_reminder_get_relative_time (reminder), ==, 15 * 24 * 60);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (reminder));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML */
+ gdata_test_assert_xml (reminder,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:reminder xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' minutes='21600'/>");
+ g_object_unref (reminder);
+
+ /* Try again with a different property */
+ reminder = GDATA_GD_REMINDER (gdata_parsable_new_from_xml (GDATA_TYPE_GD_REMINDER,
+ "<gd:reminder xmlns:gd='http://schemas.google.com/g/2005' hours='15'/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GD_REMINDER (reminder));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert (gdata_gd_reminder_get_method (reminder) == NULL);
+ g_assert (gdata_gd_reminder_is_absolute_time (reminder) == FALSE);
+ g_assert_cmpint (gdata_gd_reminder_get_relative_time (reminder), ==, 15 * 60);
+
+ /* Compare to another reminder */
+ reminder2 = gdata_gd_reminder_new (NULL, -1, 15 * 60);
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (reminder), GDATA_COMPARABLE (reminder2)), ==, 0);
+ g_object_unref (reminder2);
+ g_object_unref (reminder);
+
+ /* …and another */
+ reminder = GDATA_GD_REMINDER (gdata_parsable_new_from_xml (GDATA_TYPE_GD_REMINDER,
+ "<gd:reminder xmlns:gd='http://schemas.google.com/g/2005' minutes='15'/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GD_REMINDER (reminder));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert (gdata_gd_reminder_get_method (reminder) == NULL);
+ g_assert (gdata_gd_reminder_is_absolute_time (reminder) == FALSE);
+ g_assert_cmpint (gdata_gd_reminder_get_relative_time (reminder), ==, 15);
+ g_object_unref (reminder);
+
+ /* Try again with an absolute time and a method */
+ reminder = GDATA_GD_REMINDER (gdata_parsable_new_from_xml (GDATA_TYPE_GD_REMINDER,
+ "<gd:reminder xmlns:gd='http://schemas.google.com/g/2005' method='alert' absoluteTime='2005-06-06T16:55:00-08:00'/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GD_REMINDER (reminder));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gd_reminder_get_method (reminder), ==, GDATA_GD_REMINDER_ALERT);
+ g_assert (gdata_gd_reminder_is_absolute_time (reminder) == TRUE);
+ _time = gdata_gd_reminder_get_absolute_time (reminder);
+ g_assert_cmpint (_time, ==, 1118105700);
+
+ /* Compare to another reminder */
+ reminder2 = gdata_gd_reminder_new (GDATA_GD_REMINDER_ALERT, _time, -1);
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (reminder), GDATA_COMPARABLE (reminder2)), ==, 0);
+ g_object_unref (reminder2);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (reminder));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML */
+ gdata_test_assert_xml (reminder,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:reminder xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' "
+ "absoluteTime='2005-06-07T00:55:00Z' method='alert'/>");
+ g_object_unref (reminder);
+}
+
+static void
+test_gd_reminder_escaping (void)
+{
+ GDataGDReminder *reminder;
+
+ reminder = gdata_gd_reminder_new (GDATA_GD_REMINDER_ALERT "?foo&bar", -1, 15);
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (reminder,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:reminder xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' "
+ "minutes='15' method='alert?foo&bar'/>");
+ g_object_unref (reminder);
+}
+
+static void
+test_gd_reminder_comparison (void)
+{
+ GDataGDReminder *reminder1, *reminder2;
+
+#define ASSERT_COMPARISON(op) \
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (reminder1), GDATA_COMPARABLE (reminder2)), op, 0)
+
+ /* Check for equality. */
+ reminder1 = gdata_gd_reminder_new (GDATA_GD_REMINDER_ALERT, -1, 15);
+ reminder2 = gdata_gd_reminder_new (GDATA_GD_REMINDER_ALERT, -1, 15);
+ ASSERT_COMPARISON(==);
+
+ /* Different methods, same time type, same time. */
+ gdata_gd_reminder_set_method (reminder1, GDATA_GD_REMINDER_SMS);
+ ASSERT_COMPARISON(>);
+
+ /* Same method, different time type, same time. */
+ gdata_gd_reminder_set_method (reminder1, GDATA_GD_REMINDER_ALERT);
+ gdata_gd_reminder_set_relative_time (reminder1, -1);
+ gdata_gd_reminder_set_absolute_time (reminder1, 5);
+ ASSERT_COMPARISON(>);
+
+ /* Same method, same time type, different time. */
+ gdata_gd_reminder_set_absolute_time (reminder1, -1);
+ gdata_gd_reminder_set_relative_time (reminder1, 20);
+ ASSERT_COMPARISON(>);
+
+ g_object_unref (reminder2);
+ g_object_unref (reminder1);
+
+#undef ASSERT_COMPARISON
+}
+
+static void
+test_gd_when (void)
+{
+ GDataGDWhen *when, *when2;
+ GDataGDReminder *reminder;
+ GList *reminders;
+ gint64 _time, _time2;
+ GError *error = NULL;
+ const gchar *content_type;
+
+ when = GDATA_GD_WHEN (gdata_parsable_new_from_xml (GDATA_TYPE_GD_WHEN,
+ "<gd:when xmlns:gd='http://schemas.google.com/g/2005' startTime='2005-06-06T17:00:00-08:00' endTime='2005-06-06T18:00:00-08:00'/>",
+ -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GD_WHEN (when));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ _time = gdata_gd_when_get_start_time (when);
+ g_assert_cmpint (_time, ==, 1118106000);
+ _time2 = gdata_gd_when_get_end_time (when);
+ g_assert_cmpint (_time2, ==, 1118109600);
+ g_assert (gdata_gd_when_is_date (when) == FALSE);
+ g_assert (gdata_gd_when_get_value_string (when) == NULL);
+ g_assert (gdata_gd_when_get_reminders (when) == NULL);
+
+ /* Compare it against another identical time */
+ when2 = gdata_gd_when_new (_time, _time2, FALSE);
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (when), GDATA_COMPARABLE (when2)), ==, 0);
+
+ /* …and a different one */
+ _time2 = 100;
+ gdata_gd_when_set_end_time (when2, _time2);
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (when), GDATA_COMPARABLE (when2)), !=, 0);
+ g_object_unref (when2);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (when));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is the same */
+ gdata_test_assert_xml (when,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:when xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' startTime='2005-06-07T01:00:00Z' "
+ "endTime='2005-06-07T02:00:00Z'/>");
+ g_object_unref (when);
+
+ /* Now parse a time with different information */
+ when = GDATA_GD_WHEN (gdata_parsable_new_from_xml (GDATA_TYPE_GD_WHEN,
+ "<gd:when xmlns:gd='http://schemas.google.com/g/2005' startTime='2005-06-06' endTime='2005-06-08' valueString='This weekend'>"
+ "<gd:reminder minutes='15'/>"
+ "<foobar/>"
+ "</gd:when>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GD_WHEN (when));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ _time = gdata_gd_when_get_start_time (when);
+ g_assert_cmpint (_time, ==, 1118016000);
+ _time2 = gdata_gd_when_get_end_time (when);
+ g_assert_cmpint (_time2, ==, 1118188800);
+ g_assert (gdata_gd_when_is_date (when) == TRUE);
+ g_assert_cmpstr (gdata_gd_when_get_value_string (when), ==, "This weekend");
+
+ reminders = gdata_gd_when_get_reminders (when);
+ g_assert (reminders != NULL);
+ g_assert (GDATA_IS_GD_REMINDER (reminders->data));
+ g_assert (reminders->next == NULL);
+ g_assert (gdata_gd_reminder_is_absolute_time (GDATA_GD_REMINDER (reminders->data)) == FALSE);
+ g_assert_cmpint (gdata_gd_reminder_get_relative_time (GDATA_GD_REMINDER (reminders->data)), ==, 15);
+
+ /* Add another reminder */
+ reminder = gdata_gd_reminder_new (GDATA_GD_REMINDER_ALERT, _time, -1);
+ gdata_gd_when_add_reminder (when, reminder);
+ g_object_unref (reminder);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (when));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is correct */
+ gdata_test_assert_xml (when,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:when xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' startTime='2005-06-06' "
+ "endTime='2005-06-08' valueString='This weekend'>"
+ "<gd:reminder minutes='15'/>"
+ "<gd:reminder absoluteTime='2005-06-06T00:00:00Z' method='alert'/>"
+ "<foobar/>"
+ "</gd:when>");
+ g_object_unref (when);
+}
+
+static void
+test_gd_when_escaping (void)
+{
+ GDataGDWhen *when;
+ GTimeVal start_time;
+
+ g_time_val_from_iso8601 ("2005-06-07T01:00:00Z", &start_time);
+ when = gdata_gd_when_new (start_time.tv_sec, -1, FALSE);
+ gdata_gd_when_set_value_string (when, "Value string & stuff!");
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (when,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:when xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' "
+ "startTime='2005-06-07T01:00:00Z' valueString='Value string & stuff!'/>");
+ g_object_unref (when);
+}
+
+static void
+test_gd_when_comparison (void)
+{
+ GDataGDWhen *when1, *when2;
+
+ /* Whens are non-equal if one is a date and the other isn't, if their start times differ, or if their end times differ. */
+ when1 = gdata_gd_when_new (0, 1000, FALSE);
+ when2 = gdata_gd_when_new (0, 1000, FALSE);
+
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (when1), GDATA_COMPARABLE (when2)), ==, 0);
+
+ /* Different date/time type. */
+ gdata_gd_when_set_is_date (when1, TRUE);
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (when1), GDATA_COMPARABLE (when2)), !=, 0);
+
+ /* Different start time. */
+ gdata_gd_when_set_is_date (when1, FALSE);
+ gdata_gd_when_set_start_time (when1, 500);
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (when1), GDATA_COMPARABLE (when2)), !=, 0);
+
+ /* Different end time. */
+ gdata_gd_when_set_start_time (when1, 0);
+ gdata_gd_when_set_end_time (when1, 15000);
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (when1), GDATA_COMPARABLE (when2)), !=, 0);
+
+ g_object_unref (when2);
+ g_object_unref (when1);
+}
+
+static void
+test_gd_where (void)
+{
+ GDataGDWhere *where, *where2;
+ GError *error = NULL;
+ const gchar *content_type;
+
+ where = GDATA_GD_WHERE (gdata_parsable_new_from_xml (GDATA_TYPE_GD_WHERE,
+ "<gd:where xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#event.alternate' "
+ "label='New York Location <videoconference>' valueString='Metropolis'/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GD_WHERE (where));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gd_where_get_relation_type (where), ==, GDATA_GD_WHERE_EVENT_ALTERNATE);
+ g_assert_cmpstr (gdata_gd_where_get_value_string (where), ==, "Metropolis");
+ g_assert_cmpstr (gdata_gd_where_get_label (where), ==, "New York Location <videoconference>");
+
+ /* Compare it against another identical place */
+ where2 = gdata_gd_where_new (GDATA_GD_WHERE_EVENT_ALTERNATE, "Metropolis", "New York Location <videoconference>");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (where), GDATA_COMPARABLE (where2)), ==, 0);
+
+ /* …and a different one */
+ gdata_gd_where_set_label (where2, "Atlas Mountains");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (where), GDATA_COMPARABLE (where2)), !=, 0);
+ g_object_unref (where2);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (where));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is the same */
+ gdata_test_assert_xml (where,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:where xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' "
+ "label='New York Location <videoconference>' rel='http://schemas.google.com/g/2005#event.alternate' "
+ "valueString='Metropolis'/>");
+ g_object_unref (where);
+
+ /* Now parse a place with less information available */
+ where = GDATA_GD_WHERE (gdata_parsable_new_from_xml (GDATA_TYPE_GD_WHERE,
+ "<gd:where xmlns:gd='http://schemas.google.com/g/2005' valueString='Google Cafeteria <Building 40>'/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GD_WHERE (where));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gd_where_get_value_string (where), ==, "Google Cafeteria <Building 40>");
+ g_assert (gdata_gd_where_get_relation_type (where) == NULL);
+ g_assert (gdata_gd_where_get_label (where) == NULL);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (where));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML contains the unknown XML */
+ gdata_test_assert_xml (where,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:where xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' "
+ "valueString='Google Cafeteria <Building 40>'/>");
+ g_object_unref (where);
+}
+
+static void
+test_gd_where_escaping (void)
+{
+ GDataGDWhere *where;
+
+ where = gdata_gd_where_new (GDATA_GD_WHERE_EVENT "?foo&bar", "Value string & stuff!", "<label>");
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (where,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:where xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' "
+ "label='<label>' rel='http://schemas.google.com/g/2005#event?foo&bar' "
+ "valueString='Value string & stuff!'/>");
+ g_object_unref (where);
+}
+
+static void
+test_gd_where_comparison (void)
+{
+ GDataGDWhere *where1, *where2;
+
+ /* Wheres differ if their value or their label differs. */
+ where1 = gdata_gd_where_new (NULL, "Value", "Label");
+ where2 = gdata_gd_where_new (GDATA_GD_WHERE_EVENT, "Value", "Label");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (where1), GDATA_COMPARABLE (where2)), ==, 0);
+
+ /* Different values. */
+ gdata_gd_where_set_value_string (where1, "Different");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (where1), GDATA_COMPARABLE (where2)), !=, 0);
+
+ /* Different labels. */
+ gdata_gd_where_set_value_string (where1, "Value");
+ gdata_gd_where_set_label (where1, "Different");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (where1), GDATA_COMPARABLE (where2)), !=, 0);
+
+ g_object_unref (where2);
+ g_object_unref (where1);
+}
+
+static void
+test_gd_who (void)
+{
+ GDataGDWho *who, *who2;
+ GError *error = NULL;
+ const gchar *content_type;
+
+ who = GDATA_GD_WHO (gdata_parsable_new_from_xml (GDATA_TYPE_GD_WHO,
+ "<gd:who xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#message.to' valueString='Elizabeth' "
+ "email='liz@example.com'/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GD_WHO (who));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gd_who_get_relation_type (who), ==, "http://schemas.google.com/g/2005#message.to");
+ g_assert_cmpstr (gdata_gd_who_get_value_string (who), ==, "Elizabeth");
+ g_assert_cmpstr (gdata_gd_who_get_email_address (who), ==, "liz@example.com");
+
+ /* Compare it against another identical person */
+ who2 = gdata_gd_who_new ("http://schemas.google.com/g/2005#message.to", "Elizabeth", "liz@example.com");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (who), GDATA_COMPARABLE (who2)), ==, 0);
+
+ /* …and a different one */
+ gdata_gd_who_set_email_address (who2, "john@example.com");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (who), GDATA_COMPARABLE (who2)), !=, 0);
+ g_object_unref (who2);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (who));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is the same */
+ gdata_test_assert_xml (who,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:who xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' email='liz@example.com' "
+ "rel='http://schemas.google.com/g/2005#message.to' valueString='Elizabeth'/>");
+ g_object_unref (who);
+
+ /* Now parse a place with less information available */
+ who = GDATA_GD_WHO (gdata_parsable_new_from_xml (GDATA_TYPE_GD_WHO,
+ "<gd:who xmlns:gd='http://schemas.google.com/g/2005'/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GD_WHO (who));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert (gdata_gd_who_get_value_string (who) == NULL);
+ g_assert (gdata_gd_who_get_relation_type (who) == NULL);
+ g_assert (gdata_gd_who_get_email_address (who) == NULL);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (who));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML contains the unknown XML */
+ gdata_test_assert_xml (who,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:who xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'/>");
+ g_object_unref (who);
+}
+
+static void
+test_gd_who_escaping (void)
+{
+ GDataGDWho *who;
+
+ who = gdata_gd_who_new (GDATA_GD_WHO_EVENT_ATTENDEE "?foo&bar", "Value string & stuff!", "John Smith <john.smith@gmail.com>");
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (who,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gd:who xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' "
+ "email='John Smith <john.smith@gmail.com>' rel='http://schemas.google.com/g/2005#event.attendee?foo&bar' "
+ "valueString='Value string & stuff!'/>");
+ g_object_unref (who);
+}
+
+static void
+test_gd_who_comparison (void)
+{
+ GDataGDWho *who1, *who2;
+
+ /* Whos differ if their value strings or e-mail addresses differ. */
+ who1 = gdata_gd_who_new (NULL, "Jo Bloggs", "email@address");
+ who2 = gdata_gd_who_new (GDATA_GD_WHO_EVENT_ATTENDEE, "Jo Bloggs", "email@address"); /* who knew indeed? */
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (who1), GDATA_COMPARABLE (who2)), ==, 0);
+
+ /* Different value strings. */
+ gdata_gd_who_set_value_string (who1, "Bridget Smith");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (who1), GDATA_COMPARABLE (who2)), !=, 0);
+
+ /* Different e-mail addresses. */
+ gdata_gd_who_set_value_string (who1, "Jo Bloggs");
+ gdata_gd_who_set_email_address (who1, "foo@example.com");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (who1), GDATA_COMPARABLE (who2)), !=, 0);
+
+ g_object_unref (who2);
+ g_object_unref (who1);
+}
+
+static void
+test_media_category (void)
+{
+ GDataMediaCategory *category;
+ GError *error = NULL;
+ const gchar *content_type;
+
+ category = GDATA_MEDIA_CATEGORY (gdata_parsable_new_from_xml (GDATA_TYPE_MEDIA_CATEGORY,
+ "<media:category xmlns:media='http://search.yahoo.com/mrss/' scheme='http://dmoz.org' "
+ "label='Ace Ventura - Pet & Detective'>Arts/Movies/Titles/A/Ace_Ventura_Series/Ace_Ventura_-_Pet_Detective"
+ "</media:category>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_MEDIA_CATEGORY (category));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_media_category_get_category (category), ==, "Arts/Movies/Titles/A/Ace_Ventura_Series/Ace_Ventura_-_Pet_Detective");
+ g_assert_cmpstr (gdata_media_category_get_scheme (category), ==, "http://dmoz.org");
+ g_assert_cmpstr (gdata_media_category_get_label (category), ==, "Ace Ventura - Pet & Detective");
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (category));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is the same */
+ gdata_test_assert_xml (category,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<media:category xmlns='http://www.w3.org/2005/Atom' xmlns:media='http://search.yahoo.com/mrss/' "
+ "scheme='http://dmoz.org' "
+ "label='Ace Ventura - Pet & Detective'>Arts/Movies/Titles/A/Ace_Ventura_Series/Ace_Ventura_-_Pet_Detective"
+ "</media:category>");
+ g_object_unref (category);
+
+ /* Now parse one with less information available */
+ category = GDATA_MEDIA_CATEGORY (gdata_parsable_new_from_xml (GDATA_TYPE_MEDIA_CATEGORY,
+ "<media:category xmlns:media='http://search.yahoo.com/mrss/'>foo</media:category>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_MEDIA_CATEGORY (category));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_media_category_get_category (category), ==, "foo");
+ g_assert_cmpstr (gdata_media_category_get_scheme (category), ==, "http://video.search.yahoo.com/mrss/category_schema");
+ g_assert (gdata_media_category_get_label (category) == NULL);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (category));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is the same */
+ gdata_test_assert_xml (category,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<media:category xmlns='http://www.w3.org/2005/Atom' xmlns:media='http://search.yahoo.com/mrss/' "
+ "scheme='http://video.search.yahoo.com/mrss/category_schema'>foo</media:category>");
+ g_object_unref (category);
+}
+
+static void
+test_media_category_escaping (void)
+{
+ GDataMediaCategory *category;
+
+ category = gdata_media_category_new ("<category>", "http://foo.com?foo&bar", "Label & stuff");
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (category,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<media:category xmlns='http://www.w3.org/2005/Atom' xmlns:media='http://search.yahoo.com/mrss/' "
+ "scheme='http://foo.com?foo&bar' label='Label & stuff'><category></media:category>");
+ g_object_unref (category);
+}
+
+static void
+test_media_content (void)
+{
+ GDataMediaContent *content;
+ GError *error = NULL;
+ const gchar *content_type;
+
+ content = GDATA_MEDIA_CONTENT (gdata_parsable_new_from_xml (GDATA_TYPE_MEDIA_CONTENT,
+ "<media:content xmlns:media='http://search.yahoo.com/mrss/' url='http://www.foo.com/movie.mov' fileSize='12216320' "
+ "type='video/quicktime' medium='video' isDefault='true' expression='nonstop' duration='185' height='200' width='300'/>",
+ -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_MEDIA_CONTENT (content));
+ g_clear_error (&error);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (content));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_media_content_get_uri (content), ==, "http://www.foo.com/movie.mov");
+ g_assert_cmpint (gdata_media_content_get_filesize (content), ==, 12216320);
+ g_assert_cmpstr (gdata_media_content_get_content_type (content), ==, "video/quicktime");
+ g_assert (gdata_media_content_get_medium (content) == GDATA_MEDIA_VIDEO);
+ g_assert (gdata_media_content_is_default (content) == TRUE);
+ g_assert (gdata_media_content_get_expression (content) == GDATA_MEDIA_EXPRESSION_NONSTOP);
+ g_assert_cmpint (gdata_media_content_get_duration (content), ==, 185);
+ g_assert_cmpuint (gdata_media_content_get_width (content), ==, 300);
+ g_assert_cmpuint (gdata_media_content_get_height (content), ==, 200);
+
+ /* NOTE: We don't check the outputted XML, since the class currently doesn't have any support for outputting XML */
+ g_object_unref (content);
+
+ /* Now parse one with less information available */
+ content = GDATA_MEDIA_CONTENT (gdata_parsable_new_from_xml (GDATA_TYPE_MEDIA_CONTENT,
+ "<media:content xmlns:media='http://search.yahoo.com/mrss/' url='http://foobar.com/'/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_MEDIA_CONTENT (content));
+ g_clear_error (&error);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (content));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_media_content_get_uri (content), ==, "http://foobar.com/");
+ g_assert_cmpint (gdata_media_content_get_filesize (content), ==, 0);
+ g_assert (gdata_media_content_get_content_type (content) == NULL);
+ g_assert (gdata_media_content_get_medium (content) == GDATA_MEDIA_UNKNOWN);
+ g_assert (gdata_media_content_is_default (content) == FALSE);
+ g_assert (gdata_media_content_get_expression (content) == GDATA_MEDIA_EXPRESSION_FULL);
+ g_assert_cmpint (gdata_media_content_get_duration (content), ==, 0);
+ g_assert_cmpuint (gdata_media_content_get_width (content), ==, 0);
+ g_assert_cmpuint (gdata_media_content_get_height (content), ==, 0);
+
+ g_object_unref (content);
+}
+
+static void
+test_media_credit (void)
+{
+ GDataMediaCredit *credit;
+ GError *error = NULL;
+ const gchar *content_type;
+
+ credit = GDATA_MEDIA_CREDIT (gdata_parsable_new_from_xml (GDATA_TYPE_MEDIA_CREDIT,
+ "<media:credit xmlns:media='http://search.yahoo.com/mrss/' role='producer' scheme='urn:foobar'>entity name</media:credit>",
+ -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_MEDIA_CREDIT (credit));
+ g_clear_error (&error);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (credit));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_media_credit_get_credit (credit), ==, "entity name");
+ g_assert_cmpstr (gdata_media_credit_get_scheme (credit), ==, "urn:foobar");
+ g_assert_cmpstr (gdata_media_credit_get_role (credit), ==, "producer");
+
+ /* NOTE: We don't check the outputted XML, since the class currently doesn't have any support for outputting XML */
+ g_object_unref (credit);
+
+ /* Now parse one with less information available */
+ credit = GDATA_MEDIA_CREDIT (gdata_parsable_new_from_xml (GDATA_TYPE_MEDIA_CREDIT,
+ "<media:credit xmlns:media='http://search.yahoo.com/mrss/'>John Smith</media:credit>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_MEDIA_CREDIT (credit));
+ g_clear_error (&error);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (credit));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_media_credit_get_credit (credit), ==, "John Smith");
+ g_assert_cmpstr (gdata_media_credit_get_scheme (credit), ==, "urn:ebu");
+ g_assert (gdata_media_credit_get_role (credit) == NULL);
+
+ g_object_unref (credit);
+}
+
+#if 0
+/* We can't test GDataMediaGroup, since it isn't currently publicly exposed */
+static void
+test_media_group (void)
+{
+ GDataMediaGroup *group;
+ GList *contents, *thumbnails;
+ GError *error = NULL;
+ const gchar *content_type;
+
+ group = GDATA_MEDIA_GROUP (gdata_parsable_new_from_xml (GDATA_TYPE_MEDIA_GROUP,
+ "<media:group xmlns:media='http://search.yahoo.com/mrss/'>"
+ "<media:title>Foobar — shizzle!</media:title>"
+ "<media:description>This is a description, isn't it‽</media:description>"
+ "<media:keywords>keywords,are, fun</media:keywords>"
+ "<media:category scheme='http://dmoz.org' label='Ace Ventura - Pet Detective'>"
+ "Arts/Movies/Titles/A/Ace_Ventura_Series/Ace_Ventura_-_Pet_Detective</media:category>"
+ "<media:content url='http://foobar.com/'/>"
+ "<media:content url='http://www.foo.com/movie.mov' fileSize='12216320' type='video/quicktime' medium='video' isDefault='true' "
+ "expression='nonstop' duration='185' height='200' width='300'/>"
+ "<media:credit>John Smith</media:credit>"
+ "<media:player url='http://www.foo.com/player?id=1111' height='200' width='400'/>"
+ "<media:restriction relationship='deny'>all</media:restriction>"
+ "<media:restriction relationship='allow' type='country'>au us</media:restriction>"
+ "<media:thumbnail url='http://www.foo.com/keyframe.jpg' width='75' height='50' time='12:05:01.123'/>"
+ "<media:thumbnail url='http://www.foo.com/keyframe0.jpg' time='00:00:00'/>"
+ "</media:group>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_MEDIA_GROUP (group));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_media_group_get_title (group), ==, "Foobar — shizzle!");
+ g_assert_cmpstr (gdata_media_group_get_description (group), ==, "This is a description, isn't it‽");
+ g_assert_cmpstr (gdata_media_group_get_keywords (group), ==, "keywords,are, fun");
+ g_assert (GDATA_IS_MEDIA_CATEGORY (gdata_media_group_get_category (group)));
+ g_assert (GDATA_IS_MEDIA_CONTENT (gdata_media_group_look_up_content (group, NULL)));
+ g_assert (GDATA_IS_MEDIA_CONTENT (gdata_media_group_look_up_content (group, "video/quicktime")));
+
+ contents = gdata_media_group_get_contents (group);
+ g_assert_cmpuint (g_list_length (contents), ==, 2);
+ g_assert (GDATA_IS_MEDIA_CONTENT (contents->data));
+ g_assert (GDATA_IS_MEDIA_CONTENT (contents->next->data));
+
+ g_assert (GDATA_IS_MEDIA_CREDIT (gdata_media_group_get_credit (group)));
+ g_assert_cmpstr (gdata_media_group_get_player_uri (group), ==, "http://www.foo.com/player?id=1111");
+ g_assert (gdata_media_group_is_restricted_in_country (group, "uk") == TRUE);
+ g_assert (gdata_media_group_is_restricted_in_country (group, "au") == FALSE);
+ g_assert (gdata_media_group_is_restricted_in_country (group, "us") == FALSE);
+
+ thumbnails = gdata_media_group_get_thumbnails (group);
+ g_assert_cmpuint (g_list_length (thumbnails), ==, 2);
+ g_assert (GDATA_IS_MEDIA_THUMBNAIL (thumbnails->data));
+ g_assert (GDATA_IS_MEDIA_THUMBNAIL (thumbnails->next->data));
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (group));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is the same */
+ gdata_test_assert_xml (group,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<media:group xmlns:media='http://search.yahoo.com/mrss/'>"
+ "<media:title>Foobar — shizzle!</media:title>"
+ "<media:description>This is a description, isn't it‽</media:description>"
+ "<media:keywords>keywords,are, fun</media:keywords>"
+ "<media:category scheme='http://dmoz.org' label='Ace Ventura - Pet Detective'>"
+ "Arts/Movies/Titles/A/Ace_Ventura_Series/Ace_Ventura_-_Pet_Detective</media:category>"
+ "<media:content url='http://foobar.com/'/>"
+ "<media:content url='http://www.foo.com/movie.mov' fileSize='12216320' type='video/quicktime' medium='video' "
+ "isDefault='true' expression='nonstop' duration='185' height='200' width='300'/>"
+ "<media:credit>John Smith</media:credit>"
+ "<media:player url='http://www.foo.com/player?id=1111' height='200' width='400'/>"
+ "<media:restriction relationship='deny'>all</media:restriction>"
+ "<media:restriction relationship='allow' type='country'>au us</media:restriction>"
+ "<media:thumbnail url='http://www.foo.com/keyframe.jpg' width='75' height='50' time='12:05:01.123'/>"
+ "<media:thumbnail url='http://www.foo.com/keyframe0.jpg' time='00:00:00'/>"
+ "</media:group>");
+
+ /* Check setting things works */
+ gdata_media_group_set_title (group, "Test title");
+ g_assert_cmpstr (gdata_media_group_get_title (group), ==, "Test title");
+ gdata_media_group_set_title (group, NULL);
+ g_assert (gdata_media_group_get_title (group) == NULL);
+
+ gdata_media_group_set_description (group, "Foobar");
+ g_assert_cmpstr (gdata_media_group_get_description (group), ==, "Foobar");
+ gdata_media_group_set_description (group, NULL);
+ g_assert (gdata_media_group_get_description (group) == NULL);
+
+ gdata_media_group_set_keywords (group, "a,b, c");
+ g_assert_cmpstr (gdata_media_group_get_keywords (group), ==, "a,b, c");
+ gdata_media_group_set_keywords (group, NULL);
+ g_assert (gdata_media_group_get_keywords (group) == NULL);
+
+ gdata_media_group_set_category (group, NULL);
+ g_assert (gdata_media_group_get_category (group) == NULL);
+
+ g_object_unref (group);
+
+ /* Now parse one with less information available */
+ group = GDATA_MEDIA_GROUP (gdata_parsable_new_from_xml (GDATA_TYPE_MEDIA_GROUP,
+ "<media:group xmlns:media='http://search.yahoo.com/mrss/'></media:group>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_MEDIA_GROUP (group));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert (gdata_media_group_get_title (group) == NULL);
+ g_assert (gdata_media_group_get_description (group) == NULL);
+ g_assert (gdata_media_group_get_keywords (group) == NULL);
+ g_assert (gdata_media_group_get_category (group) == NULL);
+ g_assert (gdata_media_group_look_up_content (group, NULL) == NULL);
+ g_assert (gdata_media_group_look_up_content (group, "video/quicktime") == NULL);
+ g_assert (gdata_media_group_get_contents (group) == NULL);
+ g_assert (gdata_media_group_get_credit (group) == NULL);
+ g_assert (gdata_media_group_get_player_uri (group) == NULL);
+ g_assert (gdata_media_group_is_restricted_in_country (group, "uk") == FALSE);
+ g_assert (gdata_media_group_is_restricted_in_country (group, "au") == FALSE);
+ g_assert (gdata_media_group_is_restricted_in_country (group, "us") == FALSE);
+ g_assert (gdata_media_group_get_thumbnails (group) == NULL);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (group));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is the same */
+ gdata_test_assert_xml (group,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<media:group xmlns='http://www.w3.org/2005/Atom' xmlns:media='http://search.yahoo.com/mrss/'></media:group>");
+ g_object_unref (group);
+}
+#endif
+
+static void
+test_media_thumbnail (void)
+{
+ GDataMediaThumbnail *thumbnail;
+ GError *error = NULL;
+
+ thumbnail = GDATA_MEDIA_THUMBNAIL (gdata_parsable_new_from_xml (GDATA_TYPE_MEDIA_THUMBNAIL,
+ "<media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://www.foo.com/keyframe.jpg' width='75' height='50' "
+ "time='12:05:01.123'/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_MEDIA_THUMBNAIL (thumbnail));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_media_thumbnail_get_uri (thumbnail), ==, "http://www.foo.com/keyframe.jpg");
+ g_assert_cmpuint (gdata_media_thumbnail_get_width (thumbnail), ==, 75);
+ g_assert_cmpuint (gdata_media_thumbnail_get_height (thumbnail), ==, 50);
+ g_assert_cmpint (gdata_media_thumbnail_get_time (thumbnail), ==, 43501123);
+
+ /* NOTE: We don't check the outputted XML, since the class currently doesn't have any support for outputting XML */
+ g_object_unref (thumbnail);
+
+ /* Now parse one with less information available */
+ thumbnail = GDATA_MEDIA_THUMBNAIL (gdata_parsable_new_from_xml (GDATA_TYPE_MEDIA_THUMBNAIL,
+ "<media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://foobar.com/'/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_MEDIA_THUMBNAIL (thumbnail));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_media_thumbnail_get_uri (thumbnail), ==, "http://foobar.com/");
+ g_assert_cmpuint (gdata_media_thumbnail_get_width (thumbnail), ==, 0);
+ g_assert_cmpuint (gdata_media_thumbnail_get_height (thumbnail), ==, 0);
+ g_assert_cmpint (gdata_media_thumbnail_get_time (thumbnail), ==, -1);
+
+ g_object_unref (thumbnail);
+}
+
+static void
+test_gcontact_calendar (void)
+{
+ GDataGContactCalendar *calendar, *calendar2;
+ GError *error = NULL;
+ const gchar *content_type;
+
+ calendar = GDATA_GCONTACT_CALENDAR (gdata_parsable_new_from_xml (GDATA_TYPE_GCONTACT_CALENDAR,
+ "<gContact:calendarLink xmlns:gContact='http://schemas.google.com/contact/2008' rel='work' primary='true' "
+ "href='http://calendar.com/'/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GCONTACT_CALENDAR (calendar));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gcontact_calendar_get_uri (calendar), ==, "http://calendar.com/");
+ g_assert_cmpstr (gdata_gcontact_calendar_get_relation_type (calendar), ==, GDATA_GCONTACT_CALENDAR_WORK);
+ g_assert (gdata_gcontact_calendar_get_label (calendar) == NULL);
+ g_assert (gdata_gcontact_calendar_is_primary (calendar) == TRUE);
+
+ /* Compare it against another identical calendar */
+ calendar2 = gdata_gcontact_calendar_new ("http://calendar.com/", GDATA_GCONTACT_CALENDAR_WORK, NULL, TRUE);
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (calendar), GDATA_COMPARABLE (calendar2)), ==, 0);
+
+ /* …and a different one */
+ gdata_gcontact_calendar_set_uri (calendar2, "http://calendar.somewhereelse.com/");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (calendar), GDATA_COMPARABLE (calendar2)), !=, 0);
+ g_object_unref (calendar2);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (calendar));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is the same */
+ gdata_test_assert_xml (calendar,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gContact:calendarLink xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' "
+ "href='http://calendar.com/' rel='work' primary='true'/>");
+ g_object_unref (calendar);
+
+ /* Now parse a calendar with less information available */
+ calendar = GDATA_GCONTACT_CALENDAR (gdata_parsable_new_from_xml (GDATA_TYPE_GCONTACT_CALENDAR,
+ "<gContact:calendarLink xmlns:gContact='http://schemas.google.com/contact/2008' href='http://example.com/' label='<a>'/>",
+ -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GCONTACT_CALENDAR (calendar));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gcontact_calendar_get_uri (calendar), ==, "http://example.com/");
+ g_assert (gdata_gcontact_calendar_get_relation_type (calendar) == NULL);
+ g_assert_cmpstr (gdata_gcontact_calendar_get_label (calendar), ==, "<a>");
+ g_assert (gdata_gcontact_calendar_is_primary (calendar) == FALSE);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (calendar));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is still OK */
+ gdata_test_assert_xml (calendar,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gContact:calendarLink xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' "
+ "href='http://example.com/' label='<a>' primary='false'/>");
+ g_object_unref (calendar);
+}
+
+static void
+test_gcontact_calendar_error_handling (void)
+{
+ GDataGContactCalendar *calendar;
+ GError *error = NULL;
+
+#define TEST_XML_ERROR_HANDLING(x) calendar = GDATA_GCONTACT_CALENDAR (gdata_parsable_new_from_xml (GDATA_TYPE_GCONTACT_CALENDAR,\
+ "<gContact:calendarLink xmlns:gContact='http://schemas.google.com/contact/2008' "\
+ x\
+ "/>", -1, &error));\
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR);\
+ g_assert (calendar == NULL);\
+ g_clear_error (&error)
+
+ TEST_XML_ERROR_HANDLING ("rel='work'"); /* no href */
+ TEST_XML_ERROR_HANDLING ("rel='work' href=''"); /* empty href */
+ TEST_XML_ERROR_HANDLING ("href='http://example.com/'"); /* no rel or label */
+ TEST_XML_ERROR_HANDLING ("href='http://example.com/' rel=''"); /* empty rel */
+ TEST_XML_ERROR_HANDLING ("href='http://example.com/' label=''"); /* empty label */
+ TEST_XML_ERROR_HANDLING ("href='http://example.com/' rel='other' label='Other'"); /* rel and label */
+ TEST_XML_ERROR_HANDLING ("href='http://example.com/' rel='home' primary='not a boolean'"); /* invalid primary */
+
+#undef TEST_XML_ERROR_HANDLING
+}
+
+static void
+test_gcontact_calendar_escaping (void)
+{
+ GDataGContactCalendar *calendar;
+
+ /* Test with rel */
+ calendar = gdata_gcontact_calendar_new ("http://foo.com?foo&bar", "http://foo.com?foo&relation=bar", NULL, TRUE);
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (calendar,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gContact:calendarLink xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' "
+ "href='http://foo.com?foo&bar' rel='http://foo.com?foo&relation=bar' primary='true'/>");
+ g_object_unref (calendar);
+
+ /* Test with label */
+ calendar = gdata_gcontact_calendar_new ("http://foo.com?foo&bar", NULL, "Label & stuff", FALSE);
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (calendar,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gContact:calendarLink xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' "
+ "href='http://foo.com?foo&bar' label='Label & stuff' primary='false'/>");
+ g_object_unref (calendar);
+}
+
+static void
+test_gcontact_event (void)
+{
+ GDataGContactEvent *event, *event2;
+ GDate date;
+ GError *error = NULL;
+ const gchar *content_type;
+
+ event = GDATA_GCONTACT_EVENT (gdata_parsable_new_from_xml (GDATA_TYPE_GCONTACT_EVENT,
+ "<gContact:event xmlns:gContact='http://schemas.google.com/contact/2008' xmlns:gd='http://schemas.google.com/g/2005' rel='other'>"
+ "<gd:when startTime='2004-03-12'/>"
+ "</gContact:event>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GCONTACT_EVENT (event));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ gdata_gcontact_event_get_date (event, &date);
+ g_assert (g_date_valid (&date) == TRUE);
+ g_assert_cmpuint (g_date_get_year (&date), ==, 2004);
+ g_assert_cmpuint (g_date_get_month (&date), ==, 3);
+ g_assert_cmpuint (g_date_get_day (&date), ==, 12);
+ g_assert_cmpstr (gdata_gcontact_event_get_relation_type (event), ==, GDATA_GCONTACT_EVENT_OTHER);
+ g_assert (gdata_gcontact_event_get_label (event) == NULL);
+
+ /* Try creating another event from scratch */
+ event2 = gdata_gcontact_event_new (&date, GDATA_GCONTACT_EVENT_OTHER, NULL);
+ g_assert (GDATA_IS_GCONTACT_EVENT (event2));
+ g_object_unref (event2);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (event));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is the same */
+ gdata_test_assert_xml (event,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gContact:event xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:gContact='http://schemas.google.com/contact/2008' rel='other'>"
+ "<gd:when startTime='2004-03-12'/>"
+ "</gContact:event>");
+ g_object_unref (event);
+
+ /* Now parse an event with different information available */
+ event = GDATA_GCONTACT_EVENT (gdata_parsable_new_from_xml (GDATA_TYPE_GCONTACT_EVENT,
+ "<gContact:event xmlns:gContact='http://schemas.google.com/contact/2008' xmlns:gd='http://schemas.google.com/g/2005' "
+ "label='<a>'>"
+ "<gd:when startTime='2000-01-01'/>"
+ "</gContact:event>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GCONTACT_EVENT (event));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ gdata_gcontact_event_get_date (event, &date);
+ g_assert (g_date_valid (&date) == TRUE);
+ g_assert_cmpuint (g_date_get_year (&date), ==, 2000);
+ g_assert_cmpuint (g_date_get_month (&date), ==, 1);
+ g_assert_cmpuint (g_date_get_day (&date), ==, 1);
+ g_assert (gdata_gcontact_event_get_relation_type (event) == NULL);
+ g_assert_cmpstr (gdata_gcontact_event_get_label (event), ==, "<a>");
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (event));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is still OK */
+ gdata_test_assert_xml (event,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gContact:event xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:gContact='http://schemas.google.com/contact/2008' label='<a>'>"
+ "<gd:when startTime='2000-01-01'/>"
+ "</gContact:event>");
+ g_object_unref (event);
+}
+
+static void
+test_gcontact_event_error_handling (void)
+{
+ GDataGContactEvent *event;
+ GError *error = NULL;
+
+#define TEST_XML_ERROR_HANDLING(x) event = GDATA_GCONTACT_EVENT (gdata_parsable_new_from_xml (GDATA_TYPE_GCONTACT_EVENT,\
+ "<gContact:event xmlns:gContact='http://schemas.google.com/contact/2008' xmlns:gd='http://schemas.google.com/g/2005' "\
+ x\
+ "</gContact:event>", -1, &error));\
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR);\
+ g_assert (event == NULL);\
+ g_clear_error (&error)
+
+ TEST_XML_ERROR_HANDLING ("rel='anniversary'>"); /* no gd:when */
+ TEST_XML_ERROR_HANDLING ("rel='anniversary'><gd:when/>"); /* no startTime */
+ TEST_XML_ERROR_HANDLING ("rel='anniversary'><gd:when startTime='foobar'/>"); /* invalid startTime */
+ TEST_XML_ERROR_HANDLING ("rel='anniversary'><gd:when startTime='2001-12-41'/>");
+ TEST_XML_ERROR_HANDLING ("rel='anniversary'><gd:when startTime='2010-03-25T22:01Z'/>");
+ TEST_XML_ERROR_HANDLING ("><gd:when startTime='2000-01-01'/>"); /* no rel or label */
+ TEST_XML_ERROR_HANDLING ("rel=''><gd:when startTime='2000-01-01'/>"); /* empty rel */
+ TEST_XML_ERROR_HANDLING ("label=''><gd:when startTime='2000-01-01'/>"); /* empty label */
+ TEST_XML_ERROR_HANDLING ("rel='other' label='Other'><gd:when startTime='2000-01-01'/>"); /* rel and label */
+
+#undef TEST_XML_ERROR_HANDLING
+}
+
+static void
+test_gcontact_event_escaping (void)
+{
+ GDataGContactEvent *event;
+ GDate date;
+
+ g_date_clear (&date, 1);
+ g_date_set_dmy (&date, 1, G_DATE_JANUARY, 2011);
+
+ /* Test with rel */
+ event = gdata_gcontact_event_new (&date, "http://foo.com?foo&relation=bar", NULL);
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (event,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gContact:event xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:gContact='http://schemas.google.com/contact/2008' rel='http://foo.com?foo&relation=bar'>"
+ "<gd:when startTime='2011-01-01'/>"
+ "</gContact:event>");
+ g_object_unref (event);
+
+ /* Test with label */
+ event = gdata_gcontact_event_new (&date, NULL, "Label & stuff");
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (event,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gContact:event xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:gContact='http://schemas.google.com/contact/2008' label='Label & stuff'>"
+ "<gd:when startTime='2011-01-01'/>"
+ "</gContact:event>");
+ g_object_unref (event);
+}
+
+static void
+test_gcontact_external_id (void)
+{
+ GDataGContactExternalID *id, *id2;
+ GError *error = NULL;
+ const gchar *content_type;
+
+ id = GDATA_GCONTACT_EXTERNAL_ID (gdata_parsable_new_from_xml (GDATA_TYPE_GCONTACT_EXTERNAL_ID,
+ "<gContact:externalId xmlns:gContact='http://schemas.google.com/contact/2008' rel='account' value='5'/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GCONTACT_EXTERNAL_ID (id));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gcontact_external_id_get_value (id), ==, "5");
+ g_assert_cmpstr (gdata_gcontact_external_id_get_relation_type (id), ==, GDATA_GCONTACT_EXTERNAL_ID_ACCOUNT);
+ g_assert (gdata_gcontact_external_id_get_label (id) == NULL);
+
+ /* Compare it against another identical external ID */
+ id2 = gdata_gcontact_external_id_new ("5", GDATA_GCONTACT_EXTERNAL_ID_ACCOUNT, NULL);
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (id), GDATA_COMPARABLE (id2)), ==, 0);
+
+ /* …and a different one */
+ gdata_gcontact_external_id_set_value (id2, "http://identifying.uri");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (id), GDATA_COMPARABLE (id2)), !=, 0);
+ g_object_unref (id2);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (id));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is the same */
+ gdata_test_assert_xml (id,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gContact:externalId xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' "
+ "value='5' rel='account'/>");
+ g_object_unref (id);
+
+ /* Now parse an ID with less information available */
+ id = GDATA_GCONTACT_EXTERNAL_ID (gdata_parsable_new_from_xml (GDATA_TYPE_GCONTACT_EXTERNAL_ID,
+ "<gContact:externalId xmlns:gContact='http://schemas.google.com/contact/2008' value='' label='<a>'/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GCONTACT_EXTERNAL_ID (id));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gcontact_external_id_get_value (id), ==, "");
+ g_assert (gdata_gcontact_external_id_get_relation_type (id) == NULL);
+ g_assert_cmpstr (gdata_gcontact_external_id_get_label (id), ==, "<a>");
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (id));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is still OK */
+ gdata_test_assert_xml (id,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gContact:externalId xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' "
+ "value='' label='<a>'/>");
+ g_object_unref (id);
+}
+
+static void
+test_gcontact_external_id_error_handling (void)
+{
+ GDataGContactExternalID *id;
+ GError *error = NULL;
+
+#define TEST_XML_ERROR_HANDLING(x) id = GDATA_GCONTACT_EXTERNAL_ID (gdata_parsable_new_from_xml (GDATA_TYPE_GCONTACT_EXTERNAL_ID,\
+ "<gContact:externalId xmlns:gContact='http://schemas.google.com/contact/2008' "\
+ x\
+ "/>", -1, &error));\
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR);\
+ g_assert (id == NULL);\
+ g_clear_error (&error)
+
+ TEST_XML_ERROR_HANDLING ("rel='account'"); /* no value */
+ TEST_XML_ERROR_HANDLING ("value='foo'"); /* no rel or label */
+ TEST_XML_ERROR_HANDLING ("value='foo' rel=''"); /* empty rel */
+ TEST_XML_ERROR_HANDLING ("value='foo' label=''"); /* empty label */
+ TEST_XML_ERROR_HANDLING ("value='foo' rel='organization' label='Other'"); /* rel and label */
+
+#undef TEST_XML_ERROR_HANDLING
+}
+
+static void
+test_gcontact_external_id_escaping (void)
+{
+ GDataGContactExternalID *id;
+
+ /* Test with rel */
+ id = gdata_gcontact_external_id_new ("<id>", "http://foo.com?foo&relation=bar", NULL);
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (id,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gContact:externalId xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' "
+ "value='<id>' rel='http://foo.com?foo&relation=bar'/>");
+ g_object_unref (id);
+
+ /* Test with label */
+ id = gdata_gcontact_external_id_new ("<id>", NULL, "Label & stuff");
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (id,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gContact:externalId xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' "
+ "value='<id>' label='Label & stuff'/>");
+ g_object_unref (id);
+}
+
+static void
+test_gcontact_jot (void)
+{
+ GDataGContactJot *jot, *jot2;
+ GError *error = NULL;
+ const gchar *content_type;
+
+ jot = GDATA_GCONTACT_JOT (gdata_parsable_new_from_xml (GDATA_TYPE_GCONTACT_JOT,
+ "<gContact:jot xmlns:gContact='http://schemas.google.com/contact/2008' rel='user'>They like <angles>.</gContact:jot>",
+ -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GCONTACT_JOT (jot));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gcontact_jot_get_relation_type (jot), ==, GDATA_GCONTACT_JOT_USER);
+ g_assert_cmpstr (gdata_gcontact_jot_get_content (jot), ==, "They like <angles>.");
+
+ /* Try creating another jot from scratch */
+ jot2 = gdata_gcontact_jot_new ("friend,local,oss", GDATA_GCONTACT_JOT_KEYWORDS);
+ g_assert (GDATA_IS_GCONTACT_JOT (jot2));
+ g_object_unref (jot2);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (jot));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is the same */
+ gdata_test_assert_xml (jot,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gContact:jot xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' rel='user'>"
+ "They like <angles>.</gContact:jot>");
+ g_object_unref (jot);
+
+ /* Now parse a jot with different information available */
+ jot = GDATA_GCONTACT_JOT (gdata_parsable_new_from_xml (GDATA_TYPE_GCONTACT_JOT,
+ "<gContact:jot xmlns:gContact='http://schemas.google.com/contact/2008' rel='other'/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GCONTACT_JOT (jot));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gcontact_jot_get_relation_type (jot), ==, GDATA_GCONTACT_JOT_OTHER);
+ g_assert (gdata_gcontact_jot_get_content (jot) == NULL);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (jot));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is still OK */
+ gdata_test_assert_xml (jot,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gContact:jot xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' rel='other'/>");
+ g_object_unref (jot);
+}
+
+static void
+test_gcontact_jot_error_handling (void)
+{
+ GDataGContactJot *jot;
+ GError *error = NULL;
+
+#define TEST_XML_ERROR_HANDLING(x) jot = GDATA_GCONTACT_JOT (gdata_parsable_new_from_xml (GDATA_TYPE_GCONTACT_JOT,\
+ "<gContact:jot xmlns:gContact='http://schemas.google.com/contact/2008' "\
+ x\
+ "</gContact:jot>", -1, &error));\
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR);\
+ g_assert (jot == NULL);\
+ g_clear_error (&error)
+
+ TEST_XML_ERROR_HANDLING (">Content"); /* no rel */
+ TEST_XML_ERROR_HANDLING ("rel=''>Content"); /* empty rel */
+
+#undef TEST_XML_ERROR_HANDLING
+}
+
+static void
+test_gcontact_jot_escaping (void)
+{
+ GDataGContactJot *jot;
+
+ jot = gdata_gcontact_jot_new ("Content & stuff", "http://foo.com?foo&relation=bar");
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (jot,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gContact:jot xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' "
+ "rel='http://foo.com?foo&relation=bar'>Content & stuff</gContact:jot>");
+ g_object_unref (jot);
+}
+
+static void
+test_gcontact_language (void)
+{
+ GDataGContactLanguage *language, *language2;
+ GError *error = NULL;
+ const gchar *content_type;
+
+ language = GDATA_GCONTACT_LANGUAGE (gdata_parsable_new_from_xml (GDATA_TYPE_GCONTACT_LANGUAGE,
+ "<gContact:language xmlns:gContact='http://schemas.google.com/contact/2008' code='en-GB'/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GCONTACT_LANGUAGE (language));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gcontact_language_get_code (language), ==, "en-GB");
+ g_assert (gdata_gcontact_language_get_label (language) == NULL);
+
+ /* Compare it against another identical language */
+ language2 = gdata_gcontact_language_new ("en-GB", NULL);
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (language), GDATA_COMPARABLE (language2)), ==, 0);
+
+ /* …and a different one */
+ gdata_gcontact_language_set_code (language2, "sv");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (language), GDATA_COMPARABLE (language2)), !=, 0);
+ g_object_unref (language2);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (language));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is the same */
+ gdata_test_assert_xml (language,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gContact:language xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' "
+ "code='en-GB'/>");
+ g_object_unref (language);
+
+ /* Now parse a language with less information available */
+ language = GDATA_GCONTACT_LANGUAGE (gdata_parsable_new_from_xml (GDATA_TYPE_GCONTACT_LANGUAGE,
+ "<gContact:language xmlns:gContact='http://schemas.google.com/contact/2008' label='Gobbledegook'/>",
+ -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GCONTACT_LANGUAGE (language));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert (gdata_gcontact_language_get_code (language) == NULL);
+ g_assert_cmpstr (gdata_gcontact_language_get_label (language), ==, "Gobbledegook");
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (language));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is still OK */
+ gdata_test_assert_xml (language,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gContact:language xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' "
+ "label='Gobbledegook'/>");
+ g_object_unref (language);
+}
+
+static void
+test_gcontact_language_error_handling (void)
+{
+ GDataGContactLanguage *language;
+ GError *error = NULL;
+
+#define TEST_XML_ERROR_HANDLING(x) language = GDATA_GCONTACT_LANGUAGE (gdata_parsable_new_from_xml (GDATA_TYPE_GCONTACT_LANGUAGE,\
+ "<gContact:language xmlns:gContact='http://schemas.google.com/contact/2008' "\
+ x\
+ "/>", -1, &error));\
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR);\
+ g_assert (language == NULL);\
+ g_clear_error (&error)
+
+ TEST_XML_ERROR_HANDLING (""); /* no code or label */
+ TEST_XML_ERROR_HANDLING ("code=''"); /* empty code */
+ TEST_XML_ERROR_HANDLING ("label=''"); /* empty label */
+ TEST_XML_ERROR_HANDLING ("code='en-GB' label='Other'"); /* code and label */
+
+#undef TEST_XML_ERROR_HANDLING
+}
+
+static void
+test_gcontact_language_escaping (void)
+{
+ GDataGContactLanguage *language;
+
+ /* Test with code */
+ language = gdata_gcontact_language_new ("<code>", NULL);
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (language,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gContact:language xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' "
+ "code='<code>'/>");
+ g_object_unref (language);
+
+ /* Test with label */
+ language = gdata_gcontact_language_new (NULL, "Label & stuff");
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (language,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gContact:language xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' "
+ "label='Label & stuff'/>");
+ g_object_unref (language);
+}
+
+static void
+test_gcontact_relation (void)
+{
+ GDataGContactRelation *relation, *relation2;
+ GError *error = NULL;
+ const gchar *content_type;
+
+ relation = GDATA_GCONTACT_RELATION (gdata_parsable_new_from_xml (GDATA_TYPE_GCONTACT_RELATION,
+ "<gContact:relation xmlns:gContact='http://schemas.google.com/contact/2008' rel='child'>Fred</gContact:relation>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GCONTACT_RELATION (relation));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gcontact_relation_get_name (relation), ==, "Fred");
+ g_assert_cmpstr (gdata_gcontact_relation_get_relation_type (relation), ==, GDATA_GCONTACT_RELATION_CHILD);
+ g_assert (gdata_gcontact_relation_get_label (relation) == NULL);
+
+ /* Try creating another relation from scratch */
+ relation2 = gdata_gcontact_relation_new ("Brian", GDATA_GCONTACT_RELATION_RELATIVE, NULL);
+ g_assert (GDATA_IS_GCONTACT_RELATION (relation2));
+ g_object_unref (relation2);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (relation));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is the same */
+ gdata_test_assert_xml (relation,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gContact:relation xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' rel='child'>"
+ "Fred</gContact:relation>");
+ g_object_unref (relation);
+
+ /* Now parse a relation with different information available */
+ relation = GDATA_GCONTACT_RELATION (gdata_parsable_new_from_xml (GDATA_TYPE_GCONTACT_RELATION,
+ "<gContact:relation xmlns:gContact='http://schemas.google.com/contact/2008' label='<a>'>Sid</gContact:relation>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GCONTACT_RELATION (relation));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gcontact_relation_get_name (relation), ==, "Sid");
+ g_assert (gdata_gcontact_relation_get_relation_type (relation) == NULL);
+ g_assert_cmpstr (gdata_gcontact_relation_get_label (relation), ==, "<a>");
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (relation));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is still OK */
+ gdata_test_assert_xml (relation,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gContact:relation xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' "
+ "label='<a>'>Sid</gContact:relation>");
+ g_object_unref (relation);
+}
+
+static void
+test_gcontact_relation_error_handling (void)
+{
+ GDataGContactRelation *relation;
+ GError *error = NULL;
+
+#define TEST_XML_ERROR_HANDLING(x) relation = GDATA_GCONTACT_RELATION (gdata_parsable_new_from_xml (GDATA_TYPE_GCONTACT_RELATION,\
+ "<gContact:relation xmlns:gContact='http://schemas.google.com/contact/2008' "\
+ x\
+ "</gContact:relation>", -1, &error));\
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR);\
+ g_assert (relation == NULL);\
+ g_clear_error (&error)
+
+ TEST_XML_ERROR_HANDLING ("rel='spouse'>"); /* no name */
+ TEST_XML_ERROR_HANDLING (">Brian"); /* no rel or label */
+ TEST_XML_ERROR_HANDLING ("rel=''>Brian"); /* empty rel */
+ TEST_XML_ERROR_HANDLING ("label=''>Brian"); /* empty label */
+ TEST_XML_ERROR_HANDLING ("rel='sister' label='Older sister'>Brian"); /* rel and label */
+
+#undef TEST_XML_ERROR_HANDLING
+}
+
+static void
+test_gcontact_relation_escaping (void)
+{
+ GDataGContactRelation *relation;
+
+ /* Test with rel */
+ relation = gdata_gcontact_relation_new ("First & Last Name", "http://foo.com?foo&relation=bar", NULL);
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (relation,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gContact:relation xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' "
+ "rel='http://foo.com?foo&relation=bar'>First & Last Name</gContact:relation>");
+ g_object_unref (relation);
+
+ /* Test with label */
+ relation = gdata_gcontact_relation_new ("First & Last Name", NULL, "Label & stuff");
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (relation,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gContact:relation xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' "
+ "label='Label & stuff'>First & Last Name</gContact:relation>");
+ g_object_unref (relation);
+}
+
+static void
+test_gcontact_website (void)
+{
+ GDataGContactWebsite *website, *website2;
+ GError *error = NULL;
+ const gchar *content_type;
+
+ website = GDATA_GCONTACT_WEBSITE (gdata_parsable_new_from_xml (GDATA_TYPE_GCONTACT_WEBSITE,
+ "<gContact:website xmlns:gContact='http://schemas.google.com/contact/2008' href='http://example.com/' rel='work' primary='true' "
+ "label='<Markup> blog'/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GCONTACT_WEBSITE (website));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gcontact_website_get_uri (website), ==, "http://example.com/");
+ g_assert_cmpstr (gdata_gcontact_website_get_relation_type (website), ==, GDATA_GCONTACT_WEBSITE_WORK);
+ g_assert_cmpstr (gdata_gcontact_website_get_label (website), ==, "<Markup> blog");
+ g_assert (gdata_gcontact_website_is_primary (website) == TRUE);
+
+ /* Compare it against another identical website */
+ website2 = gdata_gcontact_website_new ("http://example.com/", GDATA_GCONTACT_WEBSITE_WORK, "<Markup> blog", TRUE);
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (website), GDATA_COMPARABLE (website2)), ==, 0);
+
+ /* …and a different one */
+ gdata_gcontact_website_set_uri (website2, "http://somewhereelse.com/");
+ g_assert_cmpint (gdata_comparable_compare (GDATA_COMPARABLE (website), GDATA_COMPARABLE (website2)), !=, 0);
+ g_object_unref (website2);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (website));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is the same */
+ gdata_test_assert_xml (website,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gContact:website xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' "
+ "href='http://example.com/' rel='work' label='<Markup> blog' primary='true'/>");
+ g_object_unref (website);
+
+ /* Now parse a website with less information available */
+ website = GDATA_GCONTACT_WEBSITE (gdata_parsable_new_from_xml (GDATA_TYPE_GCONTACT_WEBSITE,
+ "<gContact:website xmlns:gContact='http://schemas.google.com/contact/2008' href='http://test.com/' rel='ftp'/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GCONTACT_WEBSITE (website));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gcontact_website_get_uri (website), ==, "http://test.com/");
+ g_assert_cmpstr (gdata_gcontact_website_get_relation_type (website), ==, GDATA_GCONTACT_WEBSITE_FTP);
+ g_assert (gdata_gcontact_website_get_label (website) == NULL);
+ g_assert (gdata_gcontact_website_is_primary (website) == FALSE);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (website));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is still OK */
+ gdata_test_assert_xml (website,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gContact:website xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' "
+ "href='http://test.com/' rel='ftp' primary='false'/>");
+ g_object_unref (website);
+}
+
+static void
+test_gcontact_website_label (void)
+{
+ GDataGContactWebsite *website;
+ GError *error = NULL;
+ const gchar *content_type;
+
+ g_test_bug ("659016");
+
+ /* Parse a website with a label but no rel. */
+ website = GDATA_GCONTACT_WEBSITE (gdata_parsable_new_from_xml (GDATA_TYPE_GCONTACT_WEBSITE,
+ "<gContact:website xmlns:gContact='http://schemas.google.com/contact/2008' href='http://test.com/' label='Custom'/>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_GCONTACT_WEBSITE (website));
+ g_clear_error (&error);
+
+ /* Check the properties */
+ g_assert_cmpstr (gdata_gcontact_website_get_uri (website), ==, "http://test.com/");
+ g_assert_cmpstr (gdata_gcontact_website_get_relation_type (website), ==, NULL);
+ g_assert_cmpstr (gdata_gcontact_website_get_label (website), ==, "Custom");
+ g_assert (gdata_gcontact_website_is_primary (website) == FALSE);
+
+ content_type = gdata_parsable_get_content_type (GDATA_PARSABLE (website));
+ g_assert_cmpstr (content_type, ==, "application/atom+xml");
+
+ /* Check the outputted XML is still OK */
+ gdata_test_assert_xml (website,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gContact:website xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' "
+ "href='http://test.com/' label='Custom' primary='false'/>");
+ g_object_unref (website);
+}
+
+static void
+test_gcontact_website_error_handling (void)
+{
+ GDataGContactWebsite *website;
+ GError *error = NULL;
+
+#define TEST_XML_ERROR_HANDLING(x) website = GDATA_GCONTACT_WEBSITE (gdata_parsable_new_from_xml (GDATA_TYPE_GCONTACT_WEBSITE,\
+ "<gContact:website xmlns:gContact='http://schemas.google.com/contact/2008' "\
+ x\
+ "/>", -1, &error));\
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR);\
+ g_assert (website == NULL);\
+ g_clear_error (&error)
+
+ TEST_XML_ERROR_HANDLING ("rel='work'"); /* no href */
+ TEST_XML_ERROR_HANDLING ("rel='work' href=''"); /* empty href */
+ TEST_XML_ERROR_HANDLING ("href='http://example.com/'"); /* no rel or label */
+ TEST_XML_ERROR_HANDLING ("href='http://example.com/' rel=''"); /* empty rel */
+ TEST_XML_ERROR_HANDLING ("href='http://example.com/' rel='profile' primary='not a boolean'"); /* invalid primary */
+
+#undef TEST_XML_ERROR_HANDLING
+}
+
+static void
+test_gcontact_website_escaping (void)
+{
+ GDataGContactWebsite *website;
+
+ website = gdata_gcontact_website_new ("http://foo.com?foo&bar", "http://foo.com?foo&relation=bar", "Label & stuff", TRUE);
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (website,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gContact:website xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' "
+ "href='http://foo.com?foo&bar' rel='http://foo.com?foo&relation=bar' label='Label & stuff' "
+ "primary='true'/>");
+ g_object_unref (website);
+}
+
+int
+main (int argc, char *argv[])
+{
+ gdata_test_init (argc, argv);
+
+ g_test_add_func ("/tests/xml_comparison", test_xml_comparison);
+
+ g_test_add_func ("/service/network_error", test_service_network_error);
+ g_test_add_func ("/service/locale", test_service_locale);
+
+ g_test_add_func ("/entry/get_xml", test_entry_get_xml);
+ g_test_add_func ("/entry/get_json", test_entry_get_json);
+ g_test_add_func ("/entry/parse_xml", test_entry_parse_xml);
+ g_test_add_func ("/entry/parse_xml/kind_category", test_entry_parse_xml_kind_category);
+ g_test_add_func ("/entry/parse_json", test_entry_parse_json);
+ g_test_add_func ("/entry/error_handling/xml", test_entry_error_handling_xml);
+ g_test_add_func ("/entry/error_handling/json", test_entry_error_handling_json);
+ g_test_add_func ("/entry/escaping", test_entry_escaping);
+ g_test_add_func ("/entry/links/remove", test_entry_links_remove);
+
+ g_test_add_func ("/feed/parse_xml", test_feed_parse_xml);
+ g_test_add_func ("/feed/error_handling", test_feed_error_handling);
+ g_test_add_func ("/feed/escaping", test_feed_escaping);
+
+ g_test_add_func ("/query/categories", test_query_categories);
+ g_test_add_func ("/query/dates", test_query_dates);
+ g_test_add_func ("/query/strict", test_query_strict);
+ g_test_add_func ("/query/pagination", test_query_pagination);
+ g_test_add_func ("/query/properties", test_query_properties);
+ g_test_add_func ("/query/unicode", test_query_unicode);
+ g_test_add_func ("/query/etag", test_query_etag);
+
+ g_test_add_func ("/access-rule/get_xml", test_access_rule_get_xml);
+ g_test_add_func ("/access-rule/get_xml/with_key", test_access_rule_get_xml_with_key);
+ g_test_add_func ("/access-rule/error_handling", test_access_rule_error_handling);
+ g_test_add_func ("/access-rule/escaping", test_access_rule_escaping);
+
+ g_test_add_func ("/comparable", test_comparable);
+
+ g_test_add_func ("/color/parsing", test_color_parsing);
+ g_test_add_func ("/color/output", test_color_output);
+
+ g_test_add_func ("/atom/author", test_atom_author);
+ g_test_add_func ("/atom/author/error_handling", test_atom_author_error_handling);
+ g_test_add_func ("/atom/author/escaping", test_atom_author_escaping);
+ g_test_add_func ("/atom/category", test_atom_category);
+ g_test_add_func ("/atom/category/error_handling", test_atom_category_error_handling);
+ g_test_add_func ("/atom/category/escaping", test_atom_category_escaping);
+ g_test_add_func ("/atom/generator", test_atom_generator);
+ g_test_add_func ("/atom/generator/error_handling", test_atom_generator_error_handling);
+ g_test_add_func ("/atom/link", test_atom_link);
+ g_test_add_func ("/atom/link/error_handling", test_atom_link_error_handling);
+ g_test_add_func ("/atom/link/escaping", test_atom_link_escaping);
+
+ g_test_add_func ("/app/categories", test_app_categories);
+
+ g_test_add_func ("/gd/email_address", test_gd_email_address);
+ g_test_add_func ("/gd/email_address/escaping", test_gd_email_address_escaping);
+ g_test_add_func ("/gd/email_address/comparison", test_gd_email_address_comparison);
+ g_test_add_func ("/gd/im_address", test_gd_im_address);
+ g_test_add_func ("/gd/im_address/escaping", test_gd_im_address_escaping);
+ g_test_add_func ("/gd/im_address/comparison", test_gd_im_address_comparison);
+ g_test_add_func ("/gd/name", test_gd_name);
+ g_test_add_func ("/gd/name/empty_strings", test_gd_name_empty_strings);
+ g_test_add_func ("/gd/name/comparison", test_gd_name_comparison);
+ g_test_add_func ("/gd/organization", test_gd_organization);
+ g_test_add_func ("/gd/organization/escaping", test_gd_organization_escaping);
+ g_test_add_func ("/gd/organization/comparison", test_gd_organization_comparison);
+ g_test_add_func ("/gd/phone_number", test_gd_phone_number);
+ g_test_add_func ("/gd/phone_number/escaping", test_gd_phone_number_escaping);
+ g_test_add_func ("/gd/phone_number/comparison", test_gd_phone_number_comparison);
+ g_test_add_func ("/gd/postal_address", test_gd_postal_address);
+ g_test_add_func ("/gd/postal_address/escaping", test_gd_postal_address_escaping);
+ g_test_add_func ("/gd/postal_address/comparison", test_gd_postal_address_comparison);
+ g_test_add_func ("/gd/reminder", test_gd_reminder);
+ g_test_add_func ("/gd/reminder/escaping", test_gd_reminder_escaping);
+ g_test_add_func ("/gd/reminder/comparison", test_gd_reminder_comparison);
+ g_test_add_func ("/gd/when", test_gd_when);
+ g_test_add_func ("/gd/when/escaping", test_gd_when_escaping);
+ g_test_add_func ("/gd/when/comparison", test_gd_when_comparison);
+ g_test_add_func ("/gd/where", test_gd_where);
+ g_test_add_func ("/gd/where/escaping", test_gd_where_escaping);
+ g_test_add_func ("/gd/where/comparison", test_gd_where_comparison);
+ g_test_add_func ("/gd/who", test_gd_who);
+ g_test_add_func ("/gd/who/escaping", test_gd_who_escaping);
+ g_test_add_func ("/gd/who/comparison", test_gd_who_comparison);
+
+ g_test_add_func ("/media/category", test_media_category);
+ g_test_add_func ("/media/category/escaping", test_media_category_escaping);
+ g_test_add_func ("/media/content", test_media_content);
+ g_test_add_func ("/media/credit", test_media_credit);
+ /* g_test_add_func ("/media/group", test_media_group); */
+ g_test_add_func ("/media/thumbnail", test_media_thumbnail);
+ /*g_test_add_data_func ("/media/thumbnail/parse_time", "", test_media_thumbnail_parse_time);
+ g_test_add_data_func ("/media/thumbnail/parse_time", "de_DE", test_media_thumbnail_parse_time);*/
+
+ g_test_add_func ("/gcontact/calendar", test_gcontact_calendar);
+ g_test_add_func ("/gcontact/calendar/error_handling", test_gcontact_calendar_error_handling);
+ g_test_add_func ("/gcontact/calendar/escaping", test_gcontact_calendar_escaping);
+ g_test_add_func ("/gcontact/event", test_gcontact_event);
+ g_test_add_func ("/gcontact/event/error_handling", test_gcontact_event_error_handling);
+ g_test_add_func ("/gcontact/event/escaping", test_gcontact_event_escaping);
+ g_test_add_func ("/gcontact/external_id", test_gcontact_external_id);
+ g_test_add_func ("/gcontact/external_id/error_handling", test_gcontact_external_id_error_handling);
+ g_test_add_func ("/gcontact/external_id/escaping", test_gcontact_external_id_escaping);
+ g_test_add_func ("/gcontact/jot", test_gcontact_jot);
+ g_test_add_func ("/gcontact/jot/error_handling", test_gcontact_jot_error_handling);
+ g_test_add_func ("/gcontact/jot/escaping", test_gcontact_jot_escaping);
+ g_test_add_func ("/gcontact/language", test_gcontact_language);
+ g_test_add_func ("/gcontact/language/error_handling", test_gcontact_language_error_handling);
+ g_test_add_func ("/gcontact/language/escaping", test_gcontact_language_escaping);
+ g_test_add_func ("/gcontact/relation", test_gcontact_relation);
+ g_test_add_func ("/gcontact/relation/error_handling", test_gcontact_relation_error_handling);
+ g_test_add_func ("/gcontact/relation/escaping", test_gcontact_relation_escaping);
+ g_test_add_func ("/gcontact/website", test_gcontact_website);
+ g_test_add_func ("/gcontact/website/label", test_gcontact_website_label);
+ g_test_add_func ("/gcontact/website/error_handling", test_gcontact_website_error_handling);
+ g_test_add_func ("/gcontact/website/escaping", test_gcontact_website_escaping);
+
+ g_test_add_func ("/documents/property/parse_json", test_documents_property_parse_json);
+ g_test_add_func ("/documents/property/get_json", test_documents_property_get_json);
+
+ return g_test_run ();
+}
--- /dev/null
+-----BEGIN PRIVATE KEY-----
+MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDCbpdfrtWTz+Zp
+NaVZuxaeAAY+f/xZz4wEH1gaNBNb3u9CPEWofW+fLNB6izknf9qhx2K8PrM9LKHD
+JS4uUU9dkfQHQsrCSffRWqQTeOOnpYHjS21iDYdOt4e//f/JerAEIyWMQAP5eqMt
+4hp5wrfhSh2ul9lcHz2Lv5u6H+I8ygoUaMyH15WIlEzxOsn4i+lXSkdmso2n1FYb
+iMyyMYButnnmv+EcPvOdw88PB8Y6PnCN2Ye0fo9HvcJhHEdgGM4SKsejA/L+T8fX
+0FYCXrsLPYU0Ntm15ZV8nNsxCoZFGmdTs/prL8ztXaI1tYdilI1RKVTOVxD2DKdr
+Cs5bnxYhAgMBAAECggEAaMkhW7fl8xuAmgMHciyaK9zngJeJcP2iADbETJr0M/ca
+CyBgikXP+oE0ela+HsORGM9ULw+7maSMKZfII74+f7dBRQiCLeOfY3zuIHBugNN6
+BP2JneacnZfb2WUSjYtJgXFPsx5tBe9KMlhA3I5Me2ZuSMIdqsBLcx141/6G9ysZ
+qSfez4FCAmPB3CO6zjUyMUMwYkAilkZgpmSMvE/HtW5e/NDnCKk0/n30E2xthCUC
+eWwAMvekpyssKyAHxEHk7XZoIjMldUI7erFHRgsr5HFypp2Q7Gcd5KXVeotV8Y67
+O/aAKXURhdESeqJUS0D9ezJg3ES6Q2YOgA61OcK74QKBgQD8O5HM/MyN86RQV69s
+VduYpndq+tKnXBAnLxD9D2cjEI9wUXJFOZJTfVYzeVxMY9iWmuKJq9IwJLG4/Zkp
+s66pukesnJvLki2hhTcoOFfMzT4ZT/CaDPOO6PAgvdBL581uX68Uh8rPn9bYqxCA
+IG0n8sA/1j4H86YQVWzpI4tPtwKBgQDFVgQ54TT/yRTVdhNYooPHzSOQIf/BfNBe
+JW3B1FWONeznwV81TNdvTmNiSU0SKF5/VMuM6g8QOqXYLCo0i9DD65tH16XaArhw
+ctxtHN5ivDDFxEP9mgsO5jeVvk+e3516S9o/8BzzmTwo1zTz6MMT/JedIC6shhSW
+OnT6cBcY5wKBgQD8DEbQ8VkzDGGIy2aHunAa5VX1uDjidnPJxBWU21xzxKuhUDIB
+DNu0xE1sWHyr9SZMsO9pJSJ/a1uRARGZg20pO/U9fq2MSkGA4w7QCSVriTjhsGk8
+d262wvyZqzPHdhZpkgHxYRSATzgxARgXANAzGDeWUu9foNC0B7kya4tdlwKBgQCm
+qY0MLS4L0ZIs7npMY4UU3CZq9qwAiB+bQ9U83M4dO2IIIgL9CxbwRK4fNnVHHp0g
+wUbgjlWGiWHD/xjuJB9/OJ9+v5ytUZrgLcIIzVbs4K/4d1hM+SrZvIm5iG/KaGWi
+Aioj0fFBs2thutBYJ3+Kg8ywwZtpzhvY/SoK0VxQhQKBgQCB2e3HKOFnMFBO93dZ
+IyaUmhTM0ad+cP94mX/7REVdmN2NUsG3brIoibkgESL1h+2UbEkeOKIYWD4+ZZYJ
+V4ZhTsRcefOgTqU+EOAYSwNvNCld3X5oBi+b9Ie6y1teT6As5zGnH4YspTa5iCAk
+M97r3MWTAb4wpTnkHHoJ0GIHpA==
+-----END PRIVATE KEY-----
--- /dev/null
+tests_execdir = gdata_libexecdir / 'installed-tests' / gdata_name
+tests_metadir = gdata_datadir / 'installed-tests' / gdata_name
+
+tests_sources = files(
+ 'common.c',
+ 'gdata-dummy-authorizer.c',
+)
+
+common_deps = [
+ libgdata_dep,
+ libuhttpmock_dep,
+]
+
+# The empty objects may be used in future for keeping custom
+# arguments for each test
+tests = {
+ 'authorization': {},
+ 'buffer': {},
+ 'calendar': {},
+ 'contacts': {},
+ 'documents': {
+ 'dependencies': [gdk_pixbuf_dep],
+ 'should_fail': true,
+ },
+ 'general': {},
+ 'oauth1-authorizer': {},
+ 'oauth2-authorizer': {},
+ 'perf': {},
+ 'picasaweb': {
+ 'dependencies': [gdk_pixbuf_dep],
+ 'should_fail': true,
+ },
+ 'streams': {},
+ 'tasks': {},
+ 'youtube': {},
+}
+
+test_env = environment()
+test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
+test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
+
+foreach test_name, extra_args: tests
+ should_fail = extra_args.get('should_fail', false)
+ exe = executable(
+ test_name,
+ test_name + '.c',
+ c_args: common_c_args + ['-DG_LOG_DOMAIN="@0@"'.format(gdata_name)],
+ include_directories: top_inc_dir,
+ dependencies: common_deps + extra_args.get('dependencies', []),
+ sources: tests_sources,
+ install: install_tests and not should_fail,
+ install_dir: tests_execdir,
+ )
+
+ test(
+ test_name,
+ exe,
+ env: test_env,
+ should_fail: should_fail,
+ )
+endforeach
+
+if install_tests
+ foreach test_name, extra_args: tests
+ should_fail = extra_args.get('should_fail', false)
+ tests_conf = {
+ 'TEST_TYPE': 'session',
+ 'TEST_ABS_PATH': gdata_prefix / tests_execdir / test_name,
+ }
+
+ configure_file (
+ input: 'template.test.in',
+ output: test_name + '.test',
+ configuration: tests_conf,
+ install: not should_fail,
+ install_dir: tests_metadir,
+ )
+ endforeach
+
+ install_subdir(
+ 'traces',
+ install_dir: tests_execdir,
+ )
+
+ test_data = [
+ 'cert.pem',
+ 'key.pem',
+ 'photo.jpg',
+ 'sample.ogg',
+ 'test.doc',
+ 'test.ods',
+ 'test.odt',
+ 'test.ppt',
+ 'test_updated.odt',
+ 'test_updated_file.ppt',
+ 'test.xls',
+ ]
+
+ install_data(
+ test_data,
+ install_dir: tests_execdir,
+ )
+endif
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2011 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <gdata/gdata.h>
+
+#include "common.h"
+
+static GThread *main_thread = NULL;
+static UhmServer *mock_server = NULL;
+
+static void
+test_oauth1_authorizer_constructor (void)
+{
+ GDataOAuth1Authorizer *authorizer;
+
+ authorizer = gdata_oauth1_authorizer_new ("Application name", GDATA_TYPE_CONTACTS_SERVICE);
+
+ g_assert (authorizer != NULL);
+ g_assert (GDATA_IS_OAUTH1_AUTHORIZER (authorizer));
+ g_assert (GDATA_IS_AUTHORIZER (authorizer));
+
+ g_object_unref (authorizer);
+}
+
+static void
+test_oauth1_authorizer_constructor_for_domains (void)
+{
+ GDataOAuth1Authorizer *authorizer;
+ GDataAuthorizationDomain *domain;
+ GList *domains;
+
+ /* Try with standard domains first */
+ domains = gdata_service_get_authorization_domains (GDATA_TYPE_CONTACTS_SERVICE);
+ authorizer = gdata_oauth1_authorizer_new_for_authorization_domains ("Application name", domains);
+ g_list_free (domains);
+
+ g_assert (authorizer != NULL);
+ g_assert (GDATA_IS_OAUTH1_AUTHORIZER (authorizer));
+ g_assert (GDATA_IS_AUTHORIZER (authorizer));
+
+ g_object_unref (authorizer);
+
+ /* Try again with a custom domain. Note that, as in test_authorization_domain_properties() this should not normally happen in client code. */
+ domain = GDATA_AUTHORIZATION_DOMAIN (g_object_new (GDATA_TYPE_AUTHORIZATION_DOMAIN,
+ "service-name", "test",
+ "scope", "test",
+ NULL));
+
+ domains = g_list_prepend (NULL, domain);
+ authorizer = gdata_oauth1_authorizer_new_for_authorization_domains ("Application name", domains);
+ g_list_free (domains);
+
+ g_assert (authorizer != NULL);
+ g_assert (GDATA_IS_OAUTH1_AUTHORIZER (authorizer));
+ g_assert (GDATA_IS_AUTHORIZER (authorizer));
+
+ g_object_unref (authorizer);
+ g_object_unref (domain);
+}
+
+typedef struct {
+ GDataOAuth1Authorizer *authorizer;
+
+ guint locale_notification_count;
+ gulong locale_signal_handler;
+ guint proxy_resolver_notification_count;
+ gulong proxy_resolver_signal_handler;
+ guint timeout_notification_count;
+ gulong timeout_signal_handler;
+} OAuth1AuthorizerData;
+
+/* Used to count that exactly the right number of notify signals are emitted when setting properties */
+static void
+notify_cb (GObject *object, GParamSpec *pspec, guint *notification_count)
+{
+ /* Check we're running in the main thread */
+ g_assert (g_thread_self () == main_thread);
+
+ /* Increment the notification count */
+ *notification_count = *notification_count + 1;
+}
+
+static void
+connect_to_oauth1_authorizer (OAuth1AuthorizerData *data)
+{
+ /* Connect to notifications from the object to verify they're only emitted the correct number of times */
+ data->locale_signal_handler = g_signal_connect (data->authorizer, "notify::locale", (GCallback) notify_cb,
+ &(data->locale_notification_count));
+ data->proxy_resolver_signal_handler = g_signal_connect (data->authorizer, "notify::proxy-resolver", (GCallback) notify_cb,
+ &(data->proxy_resolver_notification_count));
+ data->timeout_signal_handler = g_signal_connect (data->authorizer, "notify::timeout", (GCallback) notify_cb,
+ &(data->timeout_notification_count));
+}
+
+static void
+set_up_oauth1_authorizer_data (OAuth1AuthorizerData *data, gconstpointer user_data)
+{
+ data->authorizer = gdata_oauth1_authorizer_new ("Application name", GDATA_TYPE_CONTACTS_SERVICE);
+ connect_to_oauth1_authorizer (data);
+}
+
+static void
+set_up_oauth1_authorizer_data_fallback_application_name (OAuth1AuthorizerData *data, gconstpointer user_data)
+{
+ g_set_application_name ("Fallback name");
+ data->authorizer = gdata_oauth1_authorizer_new (NULL, GDATA_TYPE_CONTACTS_SERVICE);
+ connect_to_oauth1_authorizer (data);
+}
+
+static void
+set_up_oauth1_authorizer_data_multiple_domains (OAuth1AuthorizerData *data, gconstpointer user_data)
+{
+ GList *authorization_domains = NULL;
+
+ authorization_domains = g_list_prepend (authorization_domains, gdata_contacts_service_get_primary_authorization_domain ());
+ authorization_domains = g_list_prepend (authorization_domains, gdata_picasaweb_service_get_primary_authorization_domain ());
+ data->authorizer = gdata_oauth1_authorizer_new_for_authorization_domains ("Application name", authorization_domains);
+ g_list_free (authorization_domains);
+
+ connect_to_oauth1_authorizer (data);
+}
+
+static void
+set_up_oauth1_authorizer_data_locale (OAuth1AuthorizerData *data, gconstpointer user_data)
+{
+ data->authorizer = gdata_oauth1_authorizer_new ("Application name", GDATA_TYPE_CONTACTS_SERVICE);
+ gdata_oauth1_authorizer_set_locale (data->authorizer, "en_GB");
+ connect_to_oauth1_authorizer (data);
+}
+
+static void
+set_up_oauth1_authorizer_data_authenticated (OAuth1AuthorizerData *data, gconstpointer user_data)
+{
+ gboolean *skip_test = (gboolean*) user_data;
+ gchar *authentication_uri, *token, *token_secret, *verifier;
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-oauth1-authorizer-data-authenticated");
+
+ /* Chain up */
+ set_up_oauth1_authorizer_data (data, NULL);
+
+ /* Get an authentication URI */
+ authentication_uri = gdata_oauth1_authorizer_request_authentication_uri (data->authorizer, &token, &token_secret, NULL, NULL);
+ g_assert (authentication_uri != NULL);
+
+ /* Get the verifier off the user */
+ verifier = gdata_test_query_user_for_verifier (authentication_uri);
+
+ g_free (authentication_uri);
+
+ if (verifier == NULL) {
+ *skip_test = TRUE;
+ goto skip_test;
+ }
+
+ /* Authorise the token */
+ g_assert (gdata_oauth1_authorizer_request_authorization (data->authorizer, token, token_secret, verifier, NULL, NULL) == TRUE);
+
+skip_test:
+ g_free (token);
+ g_free (token_secret);
+ g_free (verifier);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+tear_down_oauth1_authorizer_data (OAuth1AuthorizerData *data, gconstpointer user_data)
+{
+ /* Clean up signal handlers */
+ g_signal_handler_disconnect (data->authorizer, data->timeout_signal_handler);
+ g_signal_handler_disconnect (data->authorizer, data->proxy_resolver_signal_handler);
+ g_signal_handler_disconnect (data->authorizer, data->locale_signal_handler);
+
+ g_object_unref (data->authorizer);
+}
+
+/* Test getting and setting the application-name property */
+static void
+test_oauth1_authorizer_properties_application_name (OAuth1AuthorizerData *data, gconstpointer user_data)
+{
+ gchar *application_name;
+
+ /* Verifying the normal state of the property in a newly-constructed instance of GDataOAuth1Authorizer */
+ g_assert_cmpstr (gdata_oauth1_authorizer_get_application_name (data->authorizer), ==, "Application name");
+
+ g_object_get (data->authorizer, "application-name", &application_name, NULL);
+ g_assert_cmpstr (application_name, ==, "Application name");
+ g_free (application_name);
+}
+
+/* Test the fallback for the application-name property */
+static void
+test_oauth1_authorizer_properties_application_name_fallback (OAuth1AuthorizerData *data, gconstpointer user_data)
+{
+ gchar *application_name;
+
+ /* Verifying the normal state of the property in a newly-constructed instance of GDataOAuth1Authorizer */
+ g_assert_cmpstr (gdata_oauth1_authorizer_get_application_name (data->authorizer), ==, "Fallback name");
+
+ g_object_get (data->authorizer, "application-name", &application_name, NULL);
+ g_assert_cmpstr (application_name, ==, "Fallback name");
+ g_free (application_name);
+}
+
+/* Test getting and setting the locale property */
+static void
+test_oauth1_authorizer_properties_locale (OAuth1AuthorizerData *data, gconstpointer user_data)
+{
+ gchar *locale;
+
+ /* Verifying the normal state of the property in a newly-constructed instance of GDataOAuth1Authorizer */
+ g_assert_cmpstr (gdata_oauth1_authorizer_get_locale (data->authorizer), ==, NULL);
+
+ g_object_get (data->authorizer, "locale", &locale, NULL);
+ g_assert_cmpstr (locale, ==, NULL);
+ g_free (locale);
+
+ g_assert_cmpuint (data->locale_notification_count, ==, 0);
+
+ /* Check setting it works and emits a notification */
+ gdata_oauth1_authorizer_set_locale (data->authorizer, "en");
+
+ g_assert_cmpuint (data->locale_notification_count, ==, 1);
+
+ g_assert_cmpstr (gdata_oauth1_authorizer_get_locale (data->authorizer), ==, "en");
+
+ g_object_get (data->authorizer, "locale", &locale, NULL);
+ g_assert_cmpstr (locale, ==, "en");
+ g_free (locale);
+
+ /* Check setting it to the same value is a no-op */
+ gdata_oauth1_authorizer_set_locale (data->authorizer, "en");
+ g_assert_cmpuint (data->locale_notification_count, ==, 1);
+
+ /* Check setting it back to NULL works */
+ gdata_oauth1_authorizer_set_locale (data->authorizer, NULL);
+
+ g_assert_cmpuint (data->locale_notification_count, ==, 2);
+
+ g_assert_cmpstr (gdata_oauth1_authorizer_get_locale (data->authorizer), ==, NULL);
+
+ g_object_get (data->authorizer, "locale", &locale, NULL);
+ g_assert_cmpstr (locale, ==, NULL);
+ g_free (locale);
+
+ /* Test that setting it using g_object_set() works */
+ g_object_set (data->authorizer, "locale", "de", NULL);
+ g_assert_cmpstr (gdata_oauth1_authorizer_get_locale (data->authorizer), ==, "de");
+}
+
+/* Test getting and setting the proxy-resolver property */
+static void
+test_oauth1_authorizer_properties_proxy_resolver (OAuth1AuthorizerData *data, gconstpointer user_data)
+{
+ GProxyResolver *old_proxy_resolver, *proxy_resolver, *new_proxy_resolver;
+
+ /* Verifying the normal state of the property in a newly-constructed instance of GDataOAuth1Authorizer.
+ * Since the resolver comes from the SoupSession, we don’t know whether it’s initially NULL. */
+ old_proxy_resolver = gdata_oauth1_authorizer_get_proxy_resolver (data->authorizer);
+
+ g_object_get (data->authorizer, "proxy-resolver", &proxy_resolver, NULL);
+ g_assert (proxy_resolver == old_proxy_resolver);
+
+ g_assert_cmpuint (data->proxy_resolver_notification_count, ==, 0);
+
+ /* Check setting it works and emits a notification */
+ new_proxy_resolver = g_object_ref (g_proxy_resolver_get_default ());
+ gdata_oauth1_authorizer_set_proxy_resolver (data->authorizer, new_proxy_resolver);
+
+ g_assert_cmpuint (data->proxy_resolver_notification_count, ==, 1);
+
+ g_assert (gdata_oauth1_authorizer_get_proxy_resolver (data->authorizer) != NULL);
+ g_assert (gdata_oauth1_authorizer_get_proxy_resolver (data->authorizer) == new_proxy_resolver);
+
+ g_object_get (data->authorizer, "proxy-resolver", &proxy_resolver, NULL);
+ g_assert (proxy_resolver != NULL);
+ g_assert (gdata_oauth1_authorizer_get_proxy_resolver (data->authorizer) == new_proxy_resolver);
+ g_object_unref (proxy_resolver);
+
+ g_object_unref (new_proxy_resolver);
+
+ /* Check setting it back to NULL works */
+ gdata_oauth1_authorizer_set_proxy_resolver (data->authorizer, NULL);
+
+ g_assert_cmpuint (data->proxy_resolver_notification_count, ==, 2);
+
+ g_assert (gdata_oauth1_authorizer_get_proxy_resolver (data->authorizer) == NULL);
+
+ g_object_get (data->authorizer, "proxy-resolver", &proxy_resolver, NULL);
+ g_assert (proxy_resolver == NULL);
+
+ /* Test that setting it using g_object_set() works */
+ new_proxy_resolver = g_object_ref (g_proxy_resolver_get_default ());
+ g_object_set (data->authorizer, "proxy-resolver", new_proxy_resolver, NULL);
+ g_object_unref (new_proxy_resolver);
+
+ g_assert (gdata_oauth1_authorizer_get_proxy_resolver (data->authorizer) != NULL);
+}
+
+/* Test getting and setting the timeout property */
+static void
+test_oauth1_authorizer_properties_timeout (OAuth1AuthorizerData *data, gconstpointer user_data)
+{
+ guint timeout;
+
+ /* Verifying the normal state of the property in a newly-constructed instance of GDataOAuth1Authorizer */
+ g_assert_cmpuint (gdata_oauth1_authorizer_get_timeout (data->authorizer), ==, 0);
+
+ g_object_get (data->authorizer, "timeout", &timeout, NULL);
+ g_assert_cmpuint (timeout, ==, 0);
+
+ g_assert_cmpuint (data->timeout_notification_count, ==, 0);
+
+ /* Check setting it works and emits a notification */
+ gdata_oauth1_authorizer_set_timeout (data->authorizer, 30);
+
+ g_assert_cmpuint (data->timeout_notification_count, ==, 1);
+
+ g_assert_cmpuint (gdata_oauth1_authorizer_get_timeout (data->authorizer), ==, 30);
+
+ g_object_get (data->authorizer, "timeout", &timeout, NULL);
+ g_assert_cmpuint (timeout, ==, 30);
+
+ /* Check setting it to the same value is a no-op */
+ gdata_oauth1_authorizer_set_timeout (data->authorizer, 30);
+ g_assert_cmpuint (data->timeout_notification_count, ==, 1);
+
+ /* Check setting it back to 0 works */
+ gdata_oauth1_authorizer_set_timeout (data->authorizer, 0);
+
+ g_assert_cmpuint (data->timeout_notification_count, ==, 2);
+
+ g_assert_cmpuint (gdata_oauth1_authorizer_get_timeout (data->authorizer), ==, 0);
+
+ g_object_get (data->authorizer, "timeout", &timeout, NULL);
+ g_assert_cmpuint (timeout, ==, 0);
+
+ /* Test that setting it using g_object_set() works */
+ g_object_set (data->authorizer, "timeout", 15, NULL);
+ g_assert_cmpuint (gdata_oauth1_authorizer_get_timeout (data->authorizer), ==, 15);
+}
+
+/* Test that gdata_authorizer_refresh_authorization() is a no-op (whether authorised or not) */
+static void
+test_oauth1_authorizer_refresh_authorization (OAuth1AuthorizerData *data, gconstpointer user_data)
+{
+ gboolean *skip_test = (gboolean*) user_data;
+ GError *error = NULL;
+
+ /* Skip the test if the user's requested */
+ if (skip_test != NULL && *skip_test == TRUE) {
+ return;
+ }
+
+ gdata_test_mock_server_start_trace (mock_server, "oauth1-authorizer-refresh-authorization");
+
+ g_assert (gdata_authorizer_refresh_authorization (GDATA_AUTHORIZER (data->authorizer), NULL, &error) == FALSE);
+ g_assert_no_error (error);
+ g_clear_error (&error);
+
+ uhm_server_end_trace (mock_server);
+}
+
+/* Test that processing a request with a NULL domain will not change the request. */
+static void
+test_oauth1_authorizer_process_request_null (OAuth1AuthorizerData *data, gconstpointer user_data)
+{
+ SoupMessage *message;
+ SoupMessageHeadersIter iter;
+ guint header_count = 0;
+ const gchar *name, *value;
+
+ /* Create a new message with an empty set of request headers */
+ message = soup_message_new (SOUP_METHOD_GET, "https://example.com/");
+
+ /* Process the message */
+ gdata_authorizer_process_request (GDATA_AUTHORIZER (data->authorizer), NULL, message);
+
+ /* Check that the set of request headers is still empty */
+ soup_message_headers_iter_init (&iter, message->request_headers);
+
+ while (soup_message_headers_iter_next (&iter, &name, &value) == TRUE) {
+ header_count++;
+ }
+
+ g_assert_cmpuint (header_count, ==, 0);
+
+ g_object_unref (message);
+}
+
+/* Test that processing a request with an authorizer which hasn't been authenticated yet will not change the request. */
+static void
+test_oauth1_authorizer_process_request_unauthenticated (OAuth1AuthorizerData *data, gconstpointer user_data)
+{
+ SoupMessage *message;
+ SoupMessageHeadersIter iter;
+ guint header_count = 0;
+ const gchar *name, *value;
+
+ /* Create a new message with an empty set of request headers */
+ message = soup_message_new (SOUP_METHOD_GET, "https://example.com/");
+
+ /* Process the message */
+ gdata_authorizer_process_request (GDATA_AUTHORIZER (data->authorizer), gdata_contacts_service_get_primary_authorization_domain (), message);
+
+ /* Check that the set of request headers is still empty */
+ soup_message_headers_iter_init (&iter, message->request_headers);
+
+ while (soup_message_headers_iter_next (&iter, &name, &value) == TRUE) {
+ header_count++;
+ }
+
+ g_assert_cmpuint (header_count, ==, 0);
+
+ g_object_unref (message);
+}
+
+/* Test that processing a request with an authorizer which has been authenticated will change the request. */
+static void
+test_oauth1_authorizer_process_request_authenticated (OAuth1AuthorizerData *data, gconstpointer user_data)
+{
+ gboolean *skip_test = (gboolean*) user_data;
+ SoupMessage *message;
+ SoupMessageHeadersIter iter;
+ guint header_count = 0;
+ const gchar *name, *value;
+
+ /* Skip the test if the user's requested */
+ if (skip_test != NULL && *skip_test == TRUE) {
+ return;
+ }
+
+ /* Create a new message with an empty set of request headers */
+ message = soup_message_new (SOUP_METHOD_GET, "http://example.com/");
+
+ /* Process the message */
+ gdata_authorizer_process_request (GDATA_AUTHORIZER (data->authorizer), gdata_contacts_service_get_primary_authorization_domain (), message);
+
+ /* Check that at least one new header has been set */
+ soup_message_headers_iter_init (&iter, message->request_headers);
+
+ while (soup_message_headers_iter_next (&iter, &name, &value) == TRUE) {
+ header_count++;
+ }
+
+ g_assert_cmpuint (header_count, >, 0);
+
+ g_object_unref (message);
+}
+
+/* Test that requesting an authentication URI synchronously works correctly */
+static void
+test_oauth1_authorizer_request_authentication_uri_sync (OAuth1AuthorizerData *data, gconstpointer user_data)
+{
+ gchar *authentication_uri, *token, *token_secret;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "oauth1-authorizer-request-authentication-uri-sync");
+
+ authentication_uri = gdata_oauth1_authorizer_request_authentication_uri (data->authorizer, &token, &token_secret, NULL, &error);
+#ifdef ENABLE_OAUTH1
+ g_assert_no_error (error);
+ g_assert (authentication_uri != NULL && *authentication_uri != '\0');
+ g_assert (token != NULL && *token != '\0');
+ g_assert (token_secret != NULL && *token_secret != '\0');
+ g_clear_error (&error);
+
+ g_test_message ("Requesting an authentication URI gave “%s” with request token “%s” and request token secret “%s”.",
+ authentication_uri, token, token_secret);
+
+ g_free (authentication_uri);
+ g_free (token);
+ g_free (token_secret);
+#else
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_UNAVAILABLE);
+ g_assert_null (authentication_uri);
+ g_clear_error (&error);
+#endif
+
+ uhm_server_end_trace (mock_server);
+}
+
+/* Test that requesting an authentication URI synchronously can be cancelled */
+static void
+test_oauth1_authorizer_request_authentication_uri_sync_cancellation (OAuth1AuthorizerData *data, gconstpointer user_data)
+{
+ /* Initialise token and token_secret so we check that gdata_oauth1_authorizer_request_authentication_uri() NULLifies them on error */
+ gchar *authentication_uri, *token = (gchar*) "error", *token_secret = (gchar*) "error";
+ GCancellable *cancellable;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "oauth1-authorizer-request-authentication-uri-sync-cancellation");
+
+ /* Set up the cancellable */
+ cancellable = g_cancellable_new ();
+
+ /* Get a request token. This should return immediately as the cancellable was cancelled beforehand. */
+ g_cancellable_cancel (cancellable);
+ authentication_uri = gdata_oauth1_authorizer_request_authentication_uri (data->authorizer, &token, &token_secret, cancellable, &error);
+ g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CANCELLED);
+ g_assert (authentication_uri == NULL);
+ g_assert (token == NULL);
+ g_assert (token_secret == NULL);
+ g_clear_error (&error);
+
+ g_free (authentication_uri);
+ g_free (token);
+ g_free (token_secret);
+
+ g_object_unref (cancellable);
+
+ uhm_server_end_trace (mock_server);
+}
+
+typedef struct {
+ OAuth1AuthorizerData parent;
+ GMainLoop *main_loop;
+} OAuth1AuthorizerAsyncData;
+
+static void
+set_up_oauth1_authorizer_async_data (OAuth1AuthorizerAsyncData *data, gconstpointer user_data)
+{
+ /* Chain up */
+ set_up_oauth1_authorizer_data ((OAuth1AuthorizerData*) data, user_data);
+
+ /* Set up the main loop */
+ data->main_loop = g_main_loop_new (NULL, FALSE);
+}
+
+static void
+set_up_oauth1_authorizer_async_data_multiple_domains (OAuth1AuthorizerAsyncData *data, gconstpointer user_data)
+{
+ /* Chain up */
+ set_up_oauth1_authorizer_data_multiple_domains ((OAuth1AuthorizerData*) data, user_data);
+
+ /* Set up the main loop */
+ data->main_loop = g_main_loop_new (NULL, FALSE);
+}
+
+static void
+tear_down_oauth1_authorizer_async_data (OAuth1AuthorizerAsyncData *data, gconstpointer user_data)
+{
+ g_main_loop_unref (data->main_loop);
+
+ /* Chain up */
+ tear_down_oauth1_authorizer_data ((OAuth1AuthorizerData*) data, user_data);
+}
+
+static void
+test_oauth1_authorizer_request_authentication_uri_async_cb (GDataOAuth1Authorizer *authorizer, GAsyncResult *async_result,
+ OAuth1AuthorizerAsyncData *data)
+{
+ gchar *authentication_uri, *token, *token_secret;
+ GError *error = NULL;
+
+ authentication_uri = gdata_oauth1_authorizer_request_authentication_uri_finish (authorizer, async_result, &token, &token_secret, &error);
+#ifdef ENABLE_OAUTH1
+ g_assert_no_error (error);
+ g_assert (authentication_uri != NULL && *authentication_uri != '\0');
+ g_assert (token != NULL && *token != '\0');
+ g_assert (token_secret != NULL && *token_secret != '\0');
+ g_clear_error (&error);
+
+ g_test_message ("Requesting an authentication URI asynchronously gave “%s” with request token “%s” and request token secret “%s”.",
+ authentication_uri, token, token_secret);
+
+ g_free (authentication_uri);
+ g_free (token);
+ g_free (token_secret);
+#else
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_UNAVAILABLE);
+ g_assert_null (authentication_uri);
+ g_clear_error (&error);
+#endif
+
+ g_main_loop_quit (data->main_loop);
+}
+
+/* Test that asynchronously requesting an authentication URI for a single authorization domain works */
+static void
+test_oauth1_authorizer_request_authentication_uri_async (OAuth1AuthorizerAsyncData *data, gconstpointer user_data)
+{
+ gdata_test_mock_server_start_trace (mock_server, "oauth1-authorizer-request-authentication-uri-async");
+
+ /* Create a main loop and request an authentication URI */
+ gdata_oauth1_authorizer_request_authentication_uri_async (data->parent.authorizer, NULL,
+ (GAsyncReadyCallback) test_oauth1_authorizer_request_authentication_uri_async_cb,
+ data);
+
+ g_main_loop_run (data->main_loop);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_oauth1_authorizer_request_authentication_uri_async_cancellation_cb (GDataOAuth1Authorizer *authorizer, GAsyncResult *async_result,
+ OAuth1AuthorizerAsyncData *data)
+{
+ /* Initialise token and token_secret so we check that gdata_oauth1_authorizer_request_authentication_uri_finish() NULLifies them on error */
+ gchar *authentication_uri, *token = (gchar*) "error", *token_secret = (gchar*) "error";
+ GError *error = NULL;
+
+ authentication_uri = gdata_oauth1_authorizer_request_authentication_uri_finish (authorizer, async_result, &token, &token_secret, &error);
+ g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CANCELLED);
+ g_assert (authentication_uri == NULL);
+ g_assert (token == NULL);
+ g_assert (token_secret == NULL);
+ g_clear_error (&error);
+
+ g_free (authentication_uri);
+ g_free (token);
+ g_free (token_secret);
+
+ g_main_loop_quit (data->main_loop);
+}
+
+/* Test that cancellation of asynchronous authentication URI requests work */
+static void
+test_oauth1_authorizer_request_authentication_uri_async_cancellation (OAuth1AuthorizerAsyncData *data, gconstpointer user_data)
+{
+ GCancellable *cancellable;
+
+ gdata_test_mock_server_start_trace (mock_server, "oauth1-authorizer-request-authentication-uri-async-cancellation");
+
+ /* Set up the cancellable */
+ cancellable = g_cancellable_new ();
+
+ /* Create a main loop and request an authentication URI */
+ gdata_oauth1_authorizer_request_authentication_uri_async (data->parent.authorizer, cancellable,
+ (GAsyncReadyCallback)
+ test_oauth1_authorizer_request_authentication_uri_async_cancellation_cb,
+ data);
+ g_cancellable_cancel (cancellable);
+
+ g_main_loop_run (data->main_loop);
+
+ g_object_unref (cancellable);
+
+ uhm_server_end_trace (mock_server);
+}
+
+typedef struct {
+ OAuth1AuthorizerData parent;
+ gchar *token;
+ gchar *token_secret;
+ gchar *verifier;
+} OAuth1AuthorizerInteractiveData;
+
+/* NOTE: Any consumer of this data has to check for (data->verifier == NULL) and skip the test in that case */
+static void
+set_up_oauth1_authorizer_interactive_data (OAuth1AuthorizerInteractiveData *data, gconstpointer user_data)
+{
+ gchar *authentication_uri;
+
+ /* Chain up */
+ set_up_oauth1_authorizer_data ((OAuth1AuthorizerData*) data, user_data);
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-oauth1-authorizer-interactive-data");
+
+ /* Get an authentication URI */
+ authentication_uri = gdata_oauth1_authorizer_request_authentication_uri (data->parent.authorizer, &(data->token), &(data->token_secret),
+ NULL, NULL);
+ g_assert (authentication_uri != NULL);
+
+ /* Wait for the user to retrieve and enter the verifier */
+ data->verifier = gdata_test_query_user_for_verifier (authentication_uri);
+
+ g_free (authentication_uri);
+
+ uhm_server_end_trace (mock_server);
+}
+
+#ifdef ENABLE_OAUTH1
+static void
+set_up_oauth1_authorizer_interactive_data_bad_credentials (OAuth1AuthorizerInteractiveData *data, gconstpointer user_data)
+{
+ gchar *authentication_uri;
+
+ /* Chain up */
+ set_up_oauth1_authorizer_data ((OAuth1AuthorizerData*) data, user_data);
+
+ gdata_test_mock_server_start_trace (mock_server, "oauth1-authorizer-interactive-data-bad-credentials");
+
+ /* Get an authentication URI */
+ authentication_uri = gdata_oauth1_authorizer_request_authentication_uri (data->parent.authorizer, &(data->token), &(data->token_secret),
+ NULL, NULL);
+ g_assert (authentication_uri != NULL);
+
+ /* Give a bogus verifier */
+ data->verifier = g_strdup ("test");
+
+ g_free (authentication_uri);
+
+ uhm_server_end_trace (mock_server);
+}
+#endif /* ENABLE_OAUTH1 */
+
+static void
+tear_down_oauth1_authorizer_interactive_data (OAuth1AuthorizerInteractiveData *data, gconstpointer user_data)
+{
+ g_free (data->token);
+ g_free (data->token_secret);
+ g_free (data->verifier);
+
+ /* Chain up */
+ tear_down_oauth1_authorizer_data ((OAuth1AuthorizerData*) data, user_data);
+}
+
+/* Test that synchronously authorizing a request token is successful. Note that this test has to be interactive, as the user has to visit the
+ * authentication URI to retrieve a verifier for the request token. */
+static void
+test_oauth1_authorizer_request_authorization_sync (OAuth1AuthorizerInteractiveData *data, gconstpointer user_data)
+{
+ gboolean success;
+ GError *error = NULL;
+
+ /* Skip the test if the user's requested */
+ if (data->verifier == NULL) {
+ return;
+ }
+
+ gdata_test_mock_server_start_trace (mock_server, "oauth1-authorizer-request-authorization-sync");
+
+ /* Check we're not authorised beforehand */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (data->parent.authorizer),
+ gdata_contacts_service_get_primary_authorization_domain ()) == FALSE);
+
+ /* Test that authorising the token retrieved previously is successful */
+ success = gdata_oauth1_authorizer_request_authorization (data->parent.authorizer, data->token, data->token_secret, data->verifier, NULL,
+ &error);
+ g_assert_no_error (error);
+ g_assert (success == TRUE);
+ g_clear_error (&error);
+
+ /* Are we authorised now? */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (data->parent.authorizer),
+ gdata_contacts_service_get_primary_authorization_domain ()) == TRUE);
+
+ uhm_server_end_trace (mock_server);
+}
+
+#ifdef ENABLE_OAUTH1
+/* Test that synchronously authorizing a request token fails if an invalid verifier is provided. */
+static void
+test_oauth1_authorizer_request_authorization_sync_bad_credentials (OAuth1AuthorizerInteractiveData *data, gconstpointer user_data)
+{
+ gboolean success;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "oauth1-authorizer-request-authorization-sync-bad-credentials");
+
+ /* Check we're not authorised beforehand */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (data->parent.authorizer),
+ gdata_contacts_service_get_primary_authorization_domain ()) == FALSE);
+
+ /* Test that authorising the token retrieved above fails */
+ success = gdata_oauth1_authorizer_request_authorization (data->parent.authorizer, data->token, data->token_secret, data->verifier, NULL,
+ &error);
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_FORBIDDEN);
+ g_assert (success == FALSE);
+ g_clear_error (&error);
+
+ /* Are we authorised now? */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (data->parent.authorizer),
+ gdata_contacts_service_get_primary_authorization_domain ()) == FALSE);
+
+ uhm_server_end_trace (mock_server);
+}
+#endif /* ENABLE_OAUTH1 */
+
+/* Test that cancellation of synchronously authorizing a request token works. Note that this test has to be interactive, as the user has to visit the
+ * authentication URI to retrieve a verifier for the request token. */
+static void
+test_oauth1_authorizer_request_authorization_sync_cancellation (OAuth1AuthorizerInteractiveData *data, gconstpointer user_data)
+{
+ gboolean success;
+ GCancellable *cancellable;
+ GError *error = NULL;
+
+ /* Skip the test if the user's requested */
+ if (data->verifier == NULL) {
+ return;
+ }
+
+ gdata_test_mock_server_start_trace (mock_server, "oauth1-authorizer-request-authorization-sync-cancellation");
+
+ /* Check we're not authorised beforehand */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (data->parent.authorizer),
+ gdata_contacts_service_get_primary_authorization_domain ()) == FALSE);
+
+ /* Create the cancellable */
+ cancellable = g_cancellable_new ();
+
+ /* Test that authorising the token retrieved above is successful */
+ g_cancellable_cancel (cancellable);
+ success = gdata_oauth1_authorizer_request_authorization (data->parent.authorizer, data->token, data->token_secret, data->verifier,
+ cancellable, &error);
+ g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CANCELLED);
+ g_assert (success == FALSE);
+ g_clear_error (&error);
+
+ /* Are we authorised now? */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (data->parent.authorizer),
+ gdata_contacts_service_get_primary_authorization_domain ()) == FALSE);
+
+ g_object_unref (cancellable);
+
+ uhm_server_end_trace (mock_server);
+}
+
+typedef struct {
+ OAuth1AuthorizerInteractiveData parent;
+ GMainLoop *main_loop;
+} OAuth1AuthorizerInteractiveAsyncData;
+
+/* NOTE: Any consumer of this data has to check for (data->verifier == NULL) and skip the test in that case */
+static void
+set_up_oauth1_authorizer_interactive_async_data (OAuth1AuthorizerInteractiveAsyncData *data, gconstpointer user_data)
+{
+ /* Chain up */
+ set_up_oauth1_authorizer_interactive_data ((OAuth1AuthorizerInteractiveData*) data, user_data);
+
+ /* Set up the main loop */
+ data->main_loop = g_main_loop_new (NULL, FALSE);
+}
+
+#ifdef ENABLE_OAUTH1
+static void
+set_up_oauth1_authorizer_interactive_async_data_bad_credentials (OAuth1AuthorizerInteractiveAsyncData *data, gconstpointer user_data)
+{
+ /* Chain up */
+ set_up_oauth1_authorizer_interactive_data_bad_credentials ((OAuth1AuthorizerInteractiveData*) data, user_data);
+
+ /* Set up the main loop */
+ data->main_loop = g_main_loop_new (NULL, FALSE);
+}
+#endif /* ENABLE_OAUTH1 */
+
+static void
+tear_down_oauth1_authorizer_interactive_async_data (OAuth1AuthorizerInteractiveAsyncData *data, gconstpointer user_data)
+{
+ g_main_loop_unref (data->main_loop);
+
+ /* Chain up */
+ tear_down_oauth1_authorizer_interactive_data ((OAuth1AuthorizerInteractiveData*) data, user_data);
+}
+
+static void
+test_oauth1_authorizer_request_authorization_async_cb (GDataOAuth1Authorizer *authorizer, GAsyncResult *async_result,
+ OAuth1AuthorizerInteractiveAsyncData *data)
+{
+ gboolean success;
+ GError *error = NULL;
+
+ success = gdata_oauth1_authorizer_request_authorization_finish (authorizer, async_result, &error);
+ g_assert_no_error (error);
+ g_assert (success == TRUE);
+ g_clear_error (&error);
+
+ /* Are we authorised now? */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (authorizer),
+ gdata_contacts_service_get_primary_authorization_domain ()) == TRUE);
+
+ g_main_loop_quit (data->main_loop);
+}
+
+/* Test that asynchronously authorizing a request token works. Note that this test has to be interactive, as the user has to visit the
+ * authentication URI to retrieve a verifier for the request token. */
+static void
+test_oauth1_authorizer_request_authorization_async (OAuth1AuthorizerInteractiveAsyncData *data, gconstpointer user_data)
+{
+ /* Skip the test if the user's requested */
+ if (data->parent.verifier == NULL) {
+ return;
+ }
+
+ gdata_test_mock_server_start_trace (mock_server, "oauth1-authorizer-request-authorization-async");
+
+ /* Check we're not authorised beforehand */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (data->parent.parent.authorizer),
+ gdata_contacts_service_get_primary_authorization_domain ()) == FALSE);
+
+ /* Create a main loop and request authorization */
+ gdata_oauth1_authorizer_request_authorization_async (data->parent.parent.authorizer, data->parent.token, data->parent.token_secret,
+ data->parent.verifier, NULL,
+ (GAsyncReadyCallback) test_oauth1_authorizer_request_authorization_async_cb, data);
+
+ g_main_loop_run (data->main_loop);
+
+ uhm_server_end_trace (mock_server);
+}
+
+#ifdef ENABLE_OAUTH1
+static void
+test_oauth1_authorizer_request_authorization_async_bad_credentials_cb (GDataOAuth1Authorizer *authorizer, GAsyncResult *async_result,
+ OAuth1AuthorizerInteractiveAsyncData *data)
+{
+ gboolean success;
+ GError *error = NULL;
+
+ success = gdata_oauth1_authorizer_request_authorization_finish (authorizer, async_result, &error);
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_FORBIDDEN);
+ g_assert (success == FALSE);
+ g_clear_error (&error);
+
+ /* Are we authorised now? */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (authorizer),
+ gdata_contacts_service_get_primary_authorization_domain ()) == FALSE);
+
+ g_main_loop_quit (data->main_loop);
+}
+
+/* Test that asynchronously authorizing a request token fails if an invalid verifier is provided. */
+static void
+test_oauth1_authorizer_request_authorization_async_bad_credentials (OAuth1AuthorizerInteractiveAsyncData *data, gconstpointer user_data)
+{
+ gdata_test_mock_server_start_trace (mock_server, "oauth1-authorizer-request-authorization-async-bad-credentials");
+
+ /* Check we're not authorised beforehand */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (data->parent.parent.authorizer),
+ gdata_contacts_service_get_primary_authorization_domain ()) == FALSE);
+
+ /* Create a main loop and request authorization */
+ gdata_oauth1_authorizer_request_authorization_async (data->parent.parent.authorizer, data->parent.token, data->parent.token_secret,
+ data->parent.verifier, NULL,
+ (GAsyncReadyCallback)
+ test_oauth1_authorizer_request_authorization_async_bad_credentials_cb,
+ data);
+
+ g_main_loop_run (data->main_loop);
+
+ uhm_server_end_trace (mock_server);
+}
+#endif /* ENABLE_OAUTH1 */
+
+static void
+test_oauth1_authorizer_request_authorization_async_cancellation_cb (GDataOAuth1Authorizer *authorizer, GAsyncResult *async_result,
+ OAuth1AuthorizerInteractiveAsyncData *data)
+{
+ gboolean success;
+ GError *error = NULL;
+
+ success = gdata_oauth1_authorizer_request_authorization_finish (authorizer, async_result, &error);
+ g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CANCELLED);
+ g_assert (success == FALSE);
+ g_clear_error (&error);
+
+ /* Are we authorised now? */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (authorizer),
+ gdata_contacts_service_get_primary_authorization_domain ()) == FALSE);
+
+ g_main_loop_quit (data->main_loop);
+}
+
+/* Test that cancelling asynchronously authorizing a request token works. Note that this test has to be interactive, as the user has to visit the
+ * authentication URI to retrieve a verifier for the request token. */
+static void
+test_oauth1_authorizer_request_authorization_async_cancellation (OAuth1AuthorizerInteractiveAsyncData *data, gconstpointer user_data)
+{
+ GCancellable *cancellable;
+
+ /* Skip the test if the user's requested */
+ if (data->parent.verifier == NULL) {
+ return;
+ }
+
+ gdata_test_mock_server_start_trace (mock_server, "oauth1-authorizer-request-authorization-async-cancellation");
+
+ /* Check we're not authorised beforehand */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (data->parent.parent.authorizer),
+ gdata_contacts_service_get_primary_authorization_domain ()) == FALSE);
+
+ /* Create the cancellable */
+ cancellable = g_cancellable_new ();
+
+ /* Create a main loop and request authorization */
+ gdata_oauth1_authorizer_request_authorization_async (data->parent.parent.authorizer, data->parent.token, data->parent.token_secret,
+ data->parent.verifier, cancellable,
+ (GAsyncReadyCallback) test_oauth1_authorizer_request_authorization_async_cancellation_cb,
+ data);
+ g_cancellable_cancel (cancellable);
+
+ g_main_loop_run (data->main_loop);
+
+ g_object_unref (cancellable);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+mock_server_notify_resolver_cb (GObject *object, GParamSpec *pspec, gpointer user_data)
+{
+ UhmServer *server;
+ UhmResolver *resolver;
+
+ server = UHM_SERVER (object);
+
+ /* Set up the expected domain names here. This should technically be split up between
+ * the different unit test suites, but that's too much effort. */
+ resolver = uhm_server_get_resolver (server);
+
+ if (resolver != NULL) {
+ const gchar *ip_address = uhm_server_get_address (server);
+
+ uhm_resolver_add_A (resolver, "www.google.com", ip_address);
+ }
+}
+
+int
+main (int argc, char *argv[])
+{
+ GFile *trace_directory;
+ gchar *path = NULL;
+
+ gdata_test_init (argc, argv);
+
+ mock_server = gdata_test_get_mock_server ();
+ g_signal_connect (G_OBJECT (mock_server), "notify::resolver", (GCallback) mock_server_notify_resolver_cb, NULL);
+ path = g_test_build_filename (G_TEST_DIST, "traces/oauth1-authorizer", NULL);
+ trace_directory = g_file_new_for_path (path);
+ g_free (path);
+ uhm_server_set_trace_directory (mock_server, trace_directory);
+ g_object_unref (trace_directory);
+
+ main_thread = g_thread_self ();
+
+ g_test_add_func ("/oauth1-authorizer/constructor", test_oauth1_authorizer_constructor);
+ g_test_add_func ("/oauth1-authorizer/constructor/for-domains", test_oauth1_authorizer_constructor_for_domains);
+
+ g_test_add ("/oauth1-authorizer/properties/application-name", OAuth1AuthorizerData, NULL, set_up_oauth1_authorizer_data,
+ test_oauth1_authorizer_properties_application_name, tear_down_oauth1_authorizer_data);
+ g_test_add ("/oauth1-authorizer/properties/application-name/fallback", OAuth1AuthorizerData, NULL,
+ set_up_oauth1_authorizer_data_fallback_application_name, test_oauth1_authorizer_properties_application_name_fallback,
+ tear_down_oauth1_authorizer_data);
+ g_test_add ("/oauth1-authorizer/properties/locale", OAuth1AuthorizerData, NULL, set_up_oauth1_authorizer_data,
+ test_oauth1_authorizer_properties_locale, tear_down_oauth1_authorizer_data);
+ g_test_add ("/oauth1-authorizer/properties/proxy-resolver", OAuth1AuthorizerData, NULL, set_up_oauth1_authorizer_data,
+ test_oauth1_authorizer_properties_proxy_resolver, tear_down_oauth1_authorizer_data);
+ g_test_add ("/oauth1-authorizer/properties/timeout", OAuth1AuthorizerData, NULL, set_up_oauth1_authorizer_data,
+ test_oauth1_authorizer_properties_timeout, tear_down_oauth1_authorizer_data);
+
+ g_test_add ("/oauth1-authorizer/refresh-authorization/unauthenticated", OAuth1AuthorizerData, NULL,
+ set_up_oauth1_authorizer_data, test_oauth1_authorizer_refresh_authorization, tear_down_oauth1_authorizer_data);
+
+ g_test_add ("/oauth1-authorizer/process-request/null", OAuth1AuthorizerData, NULL,
+ set_up_oauth1_authorizer_data, test_oauth1_authorizer_process_request_null, tear_down_oauth1_authorizer_data);
+ g_test_add ("/oauth1-authorizer/process-request/unauthenticated", OAuth1AuthorizerData, NULL,
+ set_up_oauth1_authorizer_data, test_oauth1_authorizer_process_request_unauthenticated, tear_down_oauth1_authorizer_data);
+
+ /* Sync request-authentication-uri tests */
+ g_test_add ("/oauth1-authorizer/request-authentication-uri/sync", OAuth1AuthorizerData, NULL, set_up_oauth1_authorizer_data,
+ test_oauth1_authorizer_request_authentication_uri_sync, tear_down_oauth1_authorizer_data);
+ g_test_add ("/oauth1-authorizer/request-authentication-uri/sync/multiple-domains", OAuth1AuthorizerData, NULL,
+ set_up_oauth1_authorizer_data_multiple_domains, test_oauth1_authorizer_request_authentication_uri_sync,
+ tear_down_oauth1_authorizer_data);
+ g_test_add ("/oauth1-authorizer/request-authentication-uri/sync/locale", OAuth1AuthorizerData, NULL,
+ set_up_oauth1_authorizer_data_locale, test_oauth1_authorizer_request_authentication_uri_sync,
+ tear_down_oauth1_authorizer_data);
+ g_test_add ("/oauth1-authorizer/request-authentication-uri/sync/cancellation", OAuth1AuthorizerData, NULL,
+ set_up_oauth1_authorizer_data, test_oauth1_authorizer_request_authentication_uri_sync_cancellation,
+ tear_down_oauth1_authorizer_data);
+
+ /* Async request-authentication-uri tests */
+ g_test_add ("/oauth1-authorizer/request-authentication-uri/async", OAuth1AuthorizerAsyncData, NULL,
+ set_up_oauth1_authorizer_async_data, test_oauth1_authorizer_request_authentication_uri_async,
+ tear_down_oauth1_authorizer_async_data);
+ g_test_add ("/oauth1-authorizer/request-authentication-uri/async/multiple-domains", OAuth1AuthorizerAsyncData, NULL,
+ set_up_oauth1_authorizer_async_data_multiple_domains, test_oauth1_authorizer_request_authentication_uri_async,
+ tear_down_oauth1_authorizer_async_data);
+ g_test_add ("/oauth1-authorizer/request-authentication-uri/async/cancellation", OAuth1AuthorizerAsyncData, NULL,
+ set_up_oauth1_authorizer_async_data, test_oauth1_authorizer_request_authentication_uri_async_cancellation,
+ tear_down_oauth1_authorizer_async_data);
+
+ /* Sync request-authorization tests */
+ if (gdata_test_interactive () == TRUE) {
+ g_test_add ("/oauth1-authorizer/request-authorization/sync", OAuth1AuthorizerInteractiveData, NULL,
+ set_up_oauth1_authorizer_interactive_data, test_oauth1_authorizer_request_authorization_sync,
+ tear_down_oauth1_authorizer_interactive_data);
+ g_test_add ("/oauth1-authorizer/request-authorization/sync/cancellation", OAuth1AuthorizerInteractiveData, NULL,
+ set_up_oauth1_authorizer_interactive_data, test_oauth1_authorizer_request_authorization_sync_cancellation,
+ tear_down_oauth1_authorizer_interactive_data);
+ }
+
+#ifdef ENABLE_OAUTH1
+ g_test_add ("/oauth1-authorizer/request-authorization/sync/bad-credentials", OAuth1AuthorizerInteractiveData, NULL,
+ set_up_oauth1_authorizer_interactive_data_bad_credentials,
+ test_oauth1_authorizer_request_authorization_sync_bad_credentials, tear_down_oauth1_authorizer_interactive_data);
+#endif
+
+ /* Async request-authorization tests */
+ if (gdata_test_interactive () == TRUE) {
+ g_test_add ("/oauth1-authorizer/request-authorization/async", OAuth1AuthorizerInteractiveAsyncData, NULL,
+ set_up_oauth1_authorizer_interactive_async_data, test_oauth1_authorizer_request_authorization_async,
+ tear_down_oauth1_authorizer_interactive_async_data);
+ g_test_add ("/oauth1-authorizer/request-authorization/async/cancellation", OAuth1AuthorizerInteractiveAsyncData, NULL,
+ set_up_oauth1_authorizer_interactive_async_data, test_oauth1_authorizer_request_authorization_async_cancellation,
+ tear_down_oauth1_authorizer_interactive_async_data);
+ }
+
+#ifdef ENABLE_OAUTH1
+ g_test_add ("/oauth1-authorizer/request-authorization/async/bad-credentials", OAuth1AuthorizerInteractiveAsyncData, NULL,
+ set_up_oauth1_authorizer_interactive_async_data_bad_credentials,
+ test_oauth1_authorizer_request_authorization_async_bad_credentials, tear_down_oauth1_authorizer_interactive_async_data);
+#endif
+
+ /* Miscellaneous tests */
+ if (gdata_test_interactive () == TRUE) {
+ gboolean skip_test = FALSE;
+
+ g_test_add ("/oauth1-authorizer/refresh-authorization/authenticated", OAuth1AuthorizerData, &skip_test,
+ set_up_oauth1_authorizer_data_authenticated, test_oauth1_authorizer_refresh_authorization,
+ tear_down_oauth1_authorizer_data);
+
+ g_test_add ("/oauth1-authorizer/process-request/authenticated", OAuth1AuthorizerData, &skip_test,
+ set_up_oauth1_authorizer_data_authenticated, test_oauth1_authorizer_process_request_authenticated,
+ tear_down_oauth1_authorizer_data);
+ }
+
+ return g_test_run ();
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2011, 2014 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib.h>
+#include <gdata/gdata.h>
+
+#include "common.h"
+
+static GThread *main_thread = NULL;
+static UhmServer *mock_server = NULL;
+
+#undef CLIENT_ID /* from common.h */
+
+#define CLIENT_ID "352818697630-nqu2cmt5quqd6lr17ouoqmb684u84l1f.apps.googleusercontent.com"
+#define CLIENT_SECRET "-fA4pHQJxR3zJ-FyAMPQsikg"
+#define REDIRECT_URI "urn:ietf:wg:oauth:2.0:oob"
+
+static void
+test_oauth2_authorizer_constructor (void)
+{
+ GDataOAuth2Authorizer *authorizer;
+
+ authorizer = gdata_oauth2_authorizer_new (CLIENT_ID, CLIENT_SECRET,
+ REDIRECT_URI,
+ GDATA_TYPE_TASKS_SERVICE);
+
+ g_assert (authorizer != NULL);
+ g_assert (GDATA_IS_OAUTH2_AUTHORIZER (authorizer));
+ g_assert (GDATA_IS_AUTHORIZER (authorizer));
+
+ g_object_unref (authorizer);
+}
+
+static void
+test_oauth2_authorizer_constructor_for_domains (void)
+{
+ GDataOAuth2Authorizer *authorizer;
+ GDataAuthorizationDomain *domain;
+ GList *domains;
+
+ /* Try with standard domains first */
+ domains = gdata_service_get_authorization_domains (GDATA_TYPE_TASKS_SERVICE);
+ authorizer = gdata_oauth2_authorizer_new_for_authorization_domains (CLIENT_ID, CLIENT_SECRET,
+ REDIRECT_URI, domains);
+ g_list_free (domains);
+
+ g_assert (authorizer != NULL);
+ g_assert (GDATA_IS_OAUTH2_AUTHORIZER (authorizer));
+ g_assert (GDATA_IS_AUTHORIZER (authorizer));
+
+ g_object_unref (authorizer);
+
+ /* Try again with a custom domain. Note that, as in test_authorization_domain_properties() this should not normally happen in client code. */
+ domain = GDATA_AUTHORIZATION_DOMAIN (g_object_new (GDATA_TYPE_AUTHORIZATION_DOMAIN,
+ "service-name", "test",
+ "scope", "test",
+ NULL));
+
+ domains = g_list_prepend (NULL, domain);
+ authorizer = gdata_oauth2_authorizer_new_for_authorization_domains (CLIENT_ID, CLIENT_SECRET,
+ REDIRECT_URI, domains);
+ g_list_free (domains);
+
+ g_assert (authorizer != NULL);
+ g_assert (GDATA_IS_OAUTH2_AUTHORIZER (authorizer));
+ g_assert (GDATA_IS_AUTHORIZER (authorizer));
+
+ g_object_unref (authorizer);
+ g_object_unref (domain);
+}
+
+typedef struct {
+ GDataOAuth2Authorizer *authorizer;
+
+ guint locale_notification_count;
+ gulong locale_signal_handler;
+ guint proxy_resolver_notification_count;
+ gulong proxy_resolver_signal_handler;
+ guint timeout_notification_count;
+ gulong timeout_signal_handler;
+} OAuth2AuthorizerData;
+
+/* Used to count that exactly the right number of notify signals are emitted when setting properties */
+static void
+notify_cb (GObject *object, GParamSpec *pspec, guint *notification_count)
+{
+ /* Check we're running in the main thread */
+ g_assert (g_thread_self () == main_thread);
+
+ /* Increment the notification count */
+ *notification_count = *notification_count + 1;
+}
+
+static void
+connect_to_oauth2_authorizer (OAuth2AuthorizerData *data)
+{
+ /* Connect to notifications from the object to verify they're only emitted the correct number of times */
+ data->locale_signal_handler = g_signal_connect (data->authorizer, "notify::locale", (GCallback) notify_cb,
+ &(data->locale_notification_count));
+ data->proxy_resolver_signal_handler = g_signal_connect (data->authorizer, "notify::proxy-resolver", (GCallback) notify_cb,
+ &(data->proxy_resolver_notification_count));
+ data->timeout_signal_handler = g_signal_connect (data->authorizer, "notify::timeout", (GCallback) notify_cb,
+ &(data->timeout_notification_count));
+}
+
+static void
+set_up_oauth2_authorizer_data (OAuth2AuthorizerData *data, gconstpointer user_data)
+{
+ data->authorizer = gdata_oauth2_authorizer_new (CLIENT_ID,
+ CLIENT_SECRET,
+ REDIRECT_URI,
+ GDATA_TYPE_TASKS_SERVICE);
+ connect_to_oauth2_authorizer (data);
+}
+
+static void
+set_up_oauth2_authorizer_data_multiple_domains (OAuth2AuthorizerData *data, gconstpointer user_data)
+{
+ GList *authorization_domains = NULL;
+
+ authorization_domains = g_list_prepend (authorization_domains, gdata_tasks_service_get_primary_authorization_domain ());
+ authorization_domains = g_list_prepend (authorization_domains, gdata_picasaweb_service_get_primary_authorization_domain ());
+ data->authorizer = gdata_oauth2_authorizer_new_for_authorization_domains (CLIENT_ID, CLIENT_SECRET,
+ REDIRECT_URI, authorization_domains);
+ g_list_free (authorization_domains);
+
+ connect_to_oauth2_authorizer (data);
+}
+
+static void
+set_up_oauth2_authorizer_data_locale (OAuth2AuthorizerData *data, gconstpointer user_data)
+{
+ data->authorizer = gdata_oauth2_authorizer_new (CLIENT_ID,
+ CLIENT_SECRET,
+ REDIRECT_URI,
+ GDATA_TYPE_TASKS_SERVICE);
+ gdata_oauth2_authorizer_set_locale (data->authorizer, "en_GB");
+ connect_to_oauth2_authorizer (data);
+}
+
+static void
+set_up_oauth2_authorizer_data_authenticated (OAuth2AuthorizerData *data, gconstpointer user_data)
+{
+ gboolean *skip_test = (gboolean*) user_data;
+ gchar *authentication_uri, *authorisation_code;
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-oauth2-authorizer-data-authenticated");
+
+ /* Chain up */
+ set_up_oauth2_authorizer_data (data, NULL);
+
+ /* Get an authentication URI. */
+ authentication_uri = gdata_oauth2_authorizer_build_authentication_uri (data->authorizer, NULL, FALSE);
+ g_assert (authentication_uri != NULL);
+
+ /* Get the authorisation code off the user. */
+ if (uhm_server_get_enable_online (mock_server)) {
+ authorisation_code = gdata_test_query_user_for_verifier (authentication_uri);
+
+ g_free (authentication_uri);
+
+ if (authorisation_code == NULL) {
+ *skip_test = TRUE;
+ goto skip_test;
+ }
+ } else {
+ /* Hard-coded default to match the trace file. */
+ authorisation_code = g_strdup ("4/GeYb_3HkYh4vyephp-lbvzQs1GAb.YtXAxmx-uJ0eoiIBeO6P2m9iH6kvkQI");
+ g_free (authentication_uri);
+ }
+
+ /* Authorise the token. */
+ g_assert (gdata_oauth2_authorizer_request_authorization (data->authorizer, authorisation_code, NULL, NULL) == TRUE);
+
+skip_test:
+ g_free (authorisation_code);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+tear_down_oauth2_authorizer_data (OAuth2AuthorizerData *data, gconstpointer user_data)
+{
+ /* Clean up signal handlers */
+ g_signal_handler_disconnect (data->authorizer, data->timeout_signal_handler);
+ g_signal_handler_disconnect (data->authorizer, data->proxy_resolver_signal_handler);
+ g_signal_handler_disconnect (data->authorizer, data->locale_signal_handler);
+
+ g_object_unref (data->authorizer);
+}
+
+/* Test getting and setting the client-id property */
+static void
+test_oauth2_authorizer_properties_client_id (OAuth2AuthorizerData *data, gconstpointer user_data)
+{
+ gchar *client_id;
+
+ /* Verifying the normal state of the property in a newly-constructed instance of GDataOAuth2Authorizer */
+ g_assert_cmpstr (gdata_oauth2_authorizer_get_client_id (data->authorizer), ==, CLIENT_ID);
+
+ g_object_get (data->authorizer, "client-id", &client_id, NULL);
+ g_assert_cmpstr (client_id, ==, CLIENT_ID);
+ g_free (client_id);
+}
+
+/* Test getting and setting the client-id property */
+static void
+test_oauth2_authorizer_properties_client_secret (OAuth2AuthorizerData *data, gconstpointer user_data)
+{
+ gchar *client_secret;
+
+ /* Verifying the normal state of the property in a newly-constructed instance of GDataOAuth2Authorizer */
+ g_assert_cmpstr (gdata_oauth2_authorizer_get_client_secret (data->authorizer), ==, CLIENT_SECRET);
+
+ g_object_get (data->authorizer, "client-secret", &client_secret, NULL);
+ g_assert_cmpstr (client_secret, ==, CLIENT_SECRET);
+ g_free (client_secret);
+}
+
+/* Test getting and setting the client-id property */
+static void
+test_oauth2_authorizer_properties_redirect_uri (OAuth2AuthorizerData *data, gconstpointer user_data)
+{
+ gchar *redirect_uri;
+
+ /* Verifying the normal state of the property in a newly-constructed instance of GDataOAuth2Authorizer */
+ g_assert_cmpstr (gdata_oauth2_authorizer_get_redirect_uri (data->authorizer), ==, REDIRECT_URI);
+
+ g_object_get (data->authorizer, "redirect-uri", &redirect_uri, NULL);
+ g_assert_cmpstr (redirect_uri, ==, REDIRECT_URI);
+ g_free (redirect_uri);
+}
+
+/* Test getting and setting the locale property */
+static void
+test_oauth2_authorizer_properties_locale (OAuth2AuthorizerData *data, gconstpointer user_data)
+{
+ gchar *locale;
+
+ /* Verifying the normal state of the property in a newly-constructed instance of GDataOAuth2Authorizer */
+ g_assert_cmpstr (gdata_oauth2_authorizer_get_locale (data->authorizer), ==, NULL);
+
+ g_object_get (data->authorizer, "locale", &locale, NULL);
+ g_assert_cmpstr (locale, ==, NULL);
+ g_free (locale);
+
+ g_assert_cmpuint (data->locale_notification_count, ==, 0);
+
+ /* Check setting it works and emits a notification */
+ gdata_oauth2_authorizer_set_locale (data->authorizer, "en");
+
+ g_assert_cmpuint (data->locale_notification_count, ==, 1);
+
+ g_assert_cmpstr (gdata_oauth2_authorizer_get_locale (data->authorizer), ==, "en");
+
+ g_object_get (data->authorizer, "locale", &locale, NULL);
+ g_assert_cmpstr (locale, ==, "en");
+ g_free (locale);
+
+ /* Check setting it to the same value is a no-op */
+ gdata_oauth2_authorizer_set_locale (data->authorizer, "en");
+ g_assert_cmpuint (data->locale_notification_count, ==, 1);
+
+ /* Check setting it back to NULL works */
+ gdata_oauth2_authorizer_set_locale (data->authorizer, NULL);
+
+ g_assert_cmpuint (data->locale_notification_count, ==, 2);
+
+ g_assert_cmpstr (gdata_oauth2_authorizer_get_locale (data->authorizer), ==, NULL);
+
+ g_object_get (data->authorizer, "locale", &locale, NULL);
+ g_assert_cmpstr (locale, ==, NULL);
+ g_free (locale);
+
+ /* Test that setting it using g_object_set() works */
+ g_object_set (data->authorizer, "locale", "de", NULL);
+ g_assert_cmpstr (gdata_oauth2_authorizer_get_locale (data->authorizer), ==, "de");
+}
+
+/* Test getting and setting the timeout property */
+static void
+test_oauth2_authorizer_properties_timeout (OAuth2AuthorizerData *data, gconstpointer user_data)
+{
+ guint timeout;
+
+ /* Verifying the normal state of the property in a newly-constructed instance of GDataOAuth2Authorizer */
+ g_assert_cmpuint (gdata_oauth2_authorizer_get_timeout (data->authorizer), ==, 0);
+
+ g_object_get (data->authorizer, "timeout", &timeout, NULL);
+ g_assert_cmpuint (timeout, ==, 0);
+
+ g_assert_cmpuint (data->timeout_notification_count, ==, 0);
+
+ /* Check setting it works and emits a notification */
+ gdata_oauth2_authorizer_set_timeout (data->authorizer, 30);
+
+ g_assert_cmpuint (data->timeout_notification_count, ==, 1);
+
+ g_assert_cmpuint (gdata_oauth2_authorizer_get_timeout (data->authorizer), ==, 30);
+
+ g_object_get (data->authorizer, "timeout", &timeout, NULL);
+ g_assert_cmpuint (timeout, ==, 30);
+
+ /* Check setting it to the same value is a no-op */
+ gdata_oauth2_authorizer_set_timeout (data->authorizer, 30);
+ g_assert_cmpuint (data->timeout_notification_count, ==, 1);
+
+ /* Check setting it back to 0 works */
+ gdata_oauth2_authorizer_set_timeout (data->authorizer, 0);
+
+ g_assert_cmpuint (data->timeout_notification_count, ==, 2);
+
+ g_assert_cmpuint (gdata_oauth2_authorizer_get_timeout (data->authorizer), ==, 0);
+
+ g_object_get (data->authorizer, "timeout", &timeout, NULL);
+ g_assert_cmpuint (timeout, ==, 0);
+
+ /* Test that setting it using g_object_set() works */
+ g_object_set (data->authorizer, "timeout", 15, NULL);
+ g_assert_cmpuint (gdata_oauth2_authorizer_get_timeout (data->authorizer), ==, 15);
+}
+
+/* Test getting and setting the proxy-resolver property */
+static void
+test_oauth2_authorizer_properties_proxy_resolver (OAuth2AuthorizerData *data, gconstpointer user_data)
+{
+ GProxyResolver *old_proxy_resolver, *proxy_resolver, *new_proxy_resolver;
+
+ /* Verifying the normal state of the property in a newly-constructed instance of GDataOAuth2Authorizer.
+ * Since the resolver comes from the SoupSession, we don’t know whether it’s initially NULL. */
+ old_proxy_resolver = gdata_oauth2_authorizer_get_proxy_resolver (data->authorizer);
+
+ g_object_get (data->authorizer, "proxy-resolver", &proxy_resolver, NULL);
+ g_assert (proxy_resolver == old_proxy_resolver);
+
+ g_assert_cmpuint (data->proxy_resolver_notification_count, ==, 0);
+
+ /* Check setting it works and emits a notification */
+ new_proxy_resolver = g_object_ref (g_proxy_resolver_get_default ());
+ gdata_oauth2_authorizer_set_proxy_resolver (data->authorizer, new_proxy_resolver);
+
+ g_assert_cmpuint (data->proxy_resolver_notification_count, ==, 1);
+
+ g_assert (gdata_oauth2_authorizer_get_proxy_resolver (data->authorizer) != NULL);
+ g_assert (gdata_oauth2_authorizer_get_proxy_resolver (data->authorizer) == new_proxy_resolver);
+
+ g_object_get (data->authorizer, "proxy-resolver", &proxy_resolver, NULL);
+ g_assert (proxy_resolver != NULL);
+ g_assert (gdata_oauth2_authorizer_get_proxy_resolver (data->authorizer) == new_proxy_resolver);
+ g_object_unref (proxy_resolver);
+
+ g_object_unref (new_proxy_resolver);
+
+ /* Check setting it back to NULL works */
+ gdata_oauth2_authorizer_set_proxy_resolver (data->authorizer, NULL);
+
+ g_assert_cmpuint (data->proxy_resolver_notification_count, ==, 2);
+
+ g_assert (gdata_oauth2_authorizer_get_proxy_resolver (data->authorizer) == NULL);
+
+ g_object_get (data->authorizer, "proxy-resolver", &proxy_resolver, NULL);
+ g_assert (proxy_resolver == NULL);
+
+ /* Test that setting it using g_object_set() works */
+ new_proxy_resolver = g_object_ref (g_proxy_resolver_get_default ());
+ g_object_set (data->authorizer, "proxy-resolver", new_proxy_resolver, NULL);
+ g_object_unref (new_proxy_resolver);
+
+ g_assert (gdata_oauth2_authorizer_get_proxy_resolver (data->authorizer) != NULL);
+}
+
+/* Test that gdata_authorizer_refresh_authorization() is a no-op when
+ * unauthenticated. */
+static void
+test_oauth2_authorizer_refresh_authorization_unauthenticated (OAuth2AuthorizerData *data, gconstpointer user_data)
+{
+ gboolean *skip_test = (gboolean*) user_data;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "oauth2-authorizer-refresh-authorization-unauthorized");
+
+ /* Skip the test if the user's requested */
+ if (skip_test != NULL && *skip_test == TRUE) {
+ return;
+ }
+
+ g_assert (gdata_authorizer_refresh_authorization (GDATA_AUTHORIZER (data->authorizer), NULL, &error) == FALSE);
+ g_assert_no_error (error);
+ g_clear_error (&error);
+
+ uhm_server_end_trace (mock_server);
+}
+
+/* Test that gdata_authorizer_refresh_authorization() works when authenticated. */
+static void
+test_oauth2_authorizer_refresh_authorization_authenticated (OAuth2AuthorizerData *data, gconstpointer user_data)
+{
+ gboolean *skip_test = (gboolean*) user_data;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "oauth2-authorizer-refresh-authorization-authorized");
+
+ /* Skip the test if the user's requested */
+ if (skip_test != NULL && *skip_test == TRUE) {
+ return;
+ }
+
+ g_assert (gdata_authorizer_refresh_authorization (GDATA_AUTHORIZER (data->authorizer), NULL, &error) == TRUE);
+ g_assert_no_error (error);
+ g_clear_error (&error);
+
+ uhm_server_end_trace (mock_server);
+}
+
+/* Test that processing a request with a NULL domain will not change the request. */
+static void
+test_oauth2_authorizer_process_request_null (OAuth2AuthorizerData *data, gconstpointer user_data)
+{
+ SoupMessage *message;
+ SoupMessageHeadersIter iter;
+ guint header_count = 0;
+ const gchar *name, *value;
+
+ /* Create a new message with an empty set of request headers */
+ message = soup_message_new (SOUP_METHOD_GET, "https://example.com/");
+
+ /* Process the message */
+ gdata_authorizer_process_request (GDATA_AUTHORIZER (data->authorizer), NULL, message);
+
+ /* Check that the set of request headers is still empty */
+ soup_message_headers_iter_init (&iter, message->request_headers);
+
+ while (soup_message_headers_iter_next (&iter, &name, &value) == TRUE) {
+ header_count++;
+ }
+
+ g_assert_cmpuint (header_count, ==, 0);
+
+ g_object_unref (message);
+}
+
+/* Test that processing a request with an authorizer which hasn't been authenticated yet will not change the request. */
+static void
+test_oauth2_authorizer_process_request_unauthenticated (OAuth2AuthorizerData *data, gconstpointer user_data)
+{
+ SoupMessage *message;
+ SoupMessageHeadersIter iter;
+ guint header_count = 0;
+ const gchar *name, *value;
+
+ /* Create a new message with an empty set of request headers */
+ message = soup_message_new (SOUP_METHOD_GET, "https://example.com/");
+
+ /* Process the message */
+ gdata_authorizer_process_request (GDATA_AUTHORIZER (data->authorizer), gdata_tasks_service_get_primary_authorization_domain (), message);
+
+ /* Check that the set of request headers is still empty */
+ soup_message_headers_iter_init (&iter, message->request_headers);
+
+ while (soup_message_headers_iter_next (&iter, &name, &value) == TRUE) {
+ header_count++;
+ }
+
+ g_assert_cmpuint (header_count, ==, 0);
+
+ g_object_unref (message);
+}
+
+/* Test that processing a request with an authorizer which has been authenticated will change the request. */
+static void
+test_oauth2_authorizer_process_request_authenticated (OAuth2AuthorizerData *data, gconstpointer user_data)
+{
+ gboolean *skip_test = (gboolean*) user_data;
+ SoupMessage *message;
+ SoupMessageHeadersIter iter;
+ guint header_count = 0;
+ const gchar *name, *value;
+
+ /* Skip the test if the user's requested */
+ if (skip_test != NULL && *skip_test == TRUE) {
+ return;
+ }
+
+ /* Create a new message with an empty set of request headers */
+ message = soup_message_new (SOUP_METHOD_GET, "https://example.com/");
+
+ /* Process the message */
+ gdata_authorizer_process_request (GDATA_AUTHORIZER (data->authorizer), gdata_tasks_service_get_primary_authorization_domain (), message);
+
+ /* Check that at least one new header has been set */
+ soup_message_headers_iter_init (&iter, message->request_headers);
+
+ while (soup_message_headers_iter_next (&iter, &name, &value) == TRUE) {
+ header_count++;
+ }
+
+ g_assert_cmpuint (header_count, >, 0);
+
+ g_object_unref (message);
+}
+
+/* Test that building an authentication URI works correctly */
+static void
+test_oauth2_authorizer_build_authentication_uri_default (OAuth2AuthorizerData *data, gconstpointer user_data)
+{
+ gchar *authentication_uri;
+
+ authentication_uri = gdata_oauth2_authorizer_build_authentication_uri (data->authorizer, NULL, FALSE);
+ g_assert (authentication_uri != NULL && *authentication_uri != '\0');
+
+ g_test_message ("Building an authentication URI gave “%s”.",
+ authentication_uri);
+
+ g_free (authentication_uri);
+}
+
+/* Test that building an authentication URI with a login hint works
+ * correctly. */
+static void
+test_oauth2_authorizer_build_authentication_uri_hint (OAuth2AuthorizerData *data, gconstpointer user_data)
+{
+ gchar *authentication_uri;
+
+ authentication_uri = gdata_oauth2_authorizer_build_authentication_uri (data->authorizer, "test.user@gmail.com", FALSE);
+ g_assert (authentication_uri != NULL && *authentication_uri != '\0');
+
+ g_test_message ("Building an authentication URI gave “%s”.",
+ authentication_uri);
+
+ g_free (authentication_uri);
+}
+
+/* Test that buildig an authentication URI with a login hint and incremental
+ * authentication works correctly. */
+static void
+test_oauth2_authorizer_build_authentication_uri_incremental (OAuth2AuthorizerData *data, gconstpointer user_data)
+{
+ gchar *authentication_uri;
+
+ authentication_uri = gdata_oauth2_authorizer_build_authentication_uri (data->authorizer, "test.user@gmail.com", TRUE);
+ g_assert (authentication_uri != NULL && *authentication_uri != '\0');
+
+ g_test_message ("Building an authentication URI gave “%s”.",
+ authentication_uri);
+
+ g_free (authentication_uri);
+}
+
+typedef struct {
+ OAuth2AuthorizerData parent;
+ gchar *authorisation_code;
+} OAuth2AuthorizerInteractiveData;
+
+/* NOTE: Any consumer of this data has to check for (data->authorisation_code == NULL) and skip the test in that case */
+static void
+set_up_oauth2_authorizer_interactive_data (OAuth2AuthorizerInteractiveData *data, gconstpointer user_data)
+{
+ gchar *authentication_uri;
+
+ /* Chain up */
+ set_up_oauth2_authorizer_data ((OAuth2AuthorizerData*) data, user_data);
+
+ /* Get an authentication URI */
+ authentication_uri = gdata_oauth2_authorizer_build_authentication_uri (data->parent.authorizer, NULL, FALSE);
+ g_assert (authentication_uri != NULL);
+
+ /* Wait for the user to retrieve and enter the authorisation code. */
+ if (uhm_server_get_enable_online (mock_server)) {
+ data->authorisation_code = gdata_test_query_user_for_verifier (authentication_uri);
+ } else {
+ /* Hard-coded default to match the trace file. */
+ data->authorisation_code = g_strdup ((const gchar *) user_data);
+ }
+
+ g_free (authentication_uri);
+}
+
+static void
+set_up_oauth2_authorizer_interactive_data_bad_credentials (OAuth2AuthorizerInteractiveData *data, gconstpointer user_data)
+{
+ gchar *authentication_uri;
+
+ /* Chain up */
+ set_up_oauth2_authorizer_data ((OAuth2AuthorizerData*) data, user_data);
+
+ /* Get an authentication URI */
+ authentication_uri = gdata_oauth2_authorizer_build_authentication_uri (data->parent.authorizer, NULL, FALSE);
+ g_assert (authentication_uri != NULL);
+
+ /* Give a bogus authorisation code. */
+ data->authorisation_code = g_strdup ("test");
+
+ g_free (authentication_uri);
+}
+
+static void
+tear_down_oauth2_authorizer_interactive_data (OAuth2AuthorizerInteractiveData *data, gconstpointer user_data)
+{
+ g_free (data->authorisation_code);
+
+ /* Chain up */
+ tear_down_oauth2_authorizer_data ((OAuth2AuthorizerData*) data, user_data);
+}
+
+/* Test that synchronously authorizing an authorisation code is successful. Note
+ * that this test has to be interactive, as the user has to visit the
+ * authentication URI to retrieve an authorisation code. */
+static void
+test_oauth2_authorizer_request_authorization_sync (OAuth2AuthorizerInteractiveData *data, gconstpointer user_data)
+{
+ gboolean success;
+ GError *error = NULL;
+
+ /* Skip the test if the user's requested */
+ if (data->authorisation_code == NULL) {
+ return;
+ }
+
+ gdata_test_mock_server_start_trace (mock_server, "oauth2-authorizer-request-authorization-sync");
+
+ /* Check we're not authorised beforehand */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (data->parent.authorizer),
+ gdata_tasks_service_get_primary_authorization_domain ()) == FALSE);
+
+ /* Test that authorising the token retrieved previously is successful */
+ success = gdata_oauth2_authorizer_request_authorization (data->parent.authorizer, data->authorisation_code, NULL,
+ &error);
+ g_assert_no_error (error);
+ g_assert (success == TRUE);
+ g_clear_error (&error);
+
+ /* Are we authorised now? */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (data->parent.authorizer),
+ gdata_tasks_service_get_primary_authorization_domain ()) == TRUE);
+
+ uhm_server_end_trace (mock_server);
+}
+
+/* Test that synchronously authorizing fails if an invalid authorisation code is
+ * provided. */
+static void
+test_oauth2_authorizer_request_authorization_sync_bad_credentials (OAuth2AuthorizerInteractiveData *data, gconstpointer user_data)
+{
+ gboolean success;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "oauth2-authorizer-request-authorization-sync-bad-credentials");
+
+ /* Check we're not authorised beforehand */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (data->parent.authorizer),
+ gdata_tasks_service_get_primary_authorization_domain ()) == FALSE);
+
+ /* Test that authorising the token retrieved above fails */
+ success = gdata_oauth2_authorizer_request_authorization (data->parent.authorizer, data->authorisation_code, NULL,
+ &error);
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_FORBIDDEN);
+ g_assert (success == FALSE);
+ g_clear_error (&error);
+
+ /* Are we authorised now? */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (data->parent.authorizer),
+ gdata_tasks_service_get_primary_authorization_domain ()) == FALSE);
+
+ uhm_server_end_trace (mock_server);
+}
+
+/* Test that cancellation of synchronously authorizing works. Note that this
+ * test has to be interactive, as the user has to visit the authentication URI
+ * to retrieve an authorisation code. */
+static void
+test_oauth2_authorizer_request_authorization_sync_cancellation (OAuth2AuthorizerInteractiveData *data, gconstpointer user_data)
+{
+ gboolean success;
+ GCancellable *cancellable;
+ GError *error = NULL;
+
+ /* Skip the test if the user's requested */
+ if (data->authorisation_code == NULL) {
+ return;
+ }
+
+ gdata_test_mock_server_start_trace (mock_server, "oauth2-authorizer-request-authorization-sync-cancellation");
+
+ /* Check we're not authorised beforehand */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (data->parent.authorizer),
+ gdata_tasks_service_get_primary_authorization_domain ()) == FALSE);
+
+ /* Create the cancellable */
+ cancellable = g_cancellable_new ();
+
+ /* Test that authorising the code retrieved above is unsuccessful */
+ g_cancellable_cancel (cancellable);
+ success = gdata_oauth2_authorizer_request_authorization (data->parent.authorizer, data->authorisation_code,
+ cancellable, &error);
+ g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CANCELLED);
+ g_assert (success == FALSE);
+ g_clear_error (&error);
+
+ /* Are we authorised now? */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (data->parent.authorizer),
+ gdata_tasks_service_get_primary_authorization_domain ()) == FALSE);
+
+ g_object_unref (cancellable);
+
+ uhm_server_end_trace (mock_server);
+}
+
+typedef struct {
+ OAuth2AuthorizerInteractiveData parent;
+ GMainLoop *main_loop;
+} OAuth2AuthorizerInteractiveAsyncData;
+
+/* NOTE: Any consumer of this data has to check for
+ * (data->authorisation_code == NULL) and skip the test in that case */
+static void
+set_up_oauth2_authorizer_interactive_async_data (OAuth2AuthorizerInteractiveAsyncData *data, gconstpointer user_data)
+{
+ /* Chain up */
+ set_up_oauth2_authorizer_interactive_data ((OAuth2AuthorizerInteractiveData*) data, user_data);
+
+ /* Set up the main loop */
+ data->main_loop = g_main_loop_new (NULL, FALSE);
+}
+
+static void
+set_up_oauth2_authorizer_interactive_async_data_bad_credentials (OAuth2AuthorizerInteractiveAsyncData *data, gconstpointer user_data)
+{
+ /* Chain up */
+ set_up_oauth2_authorizer_interactive_data_bad_credentials ((OAuth2AuthorizerInteractiveData*) data, user_data);
+
+ /* Set up the main loop */
+ data->main_loop = g_main_loop_new (NULL, FALSE);
+}
+
+static void
+tear_down_oauth2_authorizer_interactive_async_data (OAuth2AuthorizerInteractiveAsyncData *data, gconstpointer user_data)
+{
+ g_main_loop_unref (data->main_loop);
+
+ /* Chain up */
+ tear_down_oauth2_authorizer_interactive_data ((OAuth2AuthorizerInteractiveData*) data, user_data);
+}
+
+static void
+test_oauth2_authorizer_request_authorization_async_cb (GDataOAuth2Authorizer *authorizer, GAsyncResult *async_result,
+ OAuth2AuthorizerInteractiveAsyncData *data)
+{
+ gboolean success;
+ GError *error = NULL;
+
+ success = gdata_oauth2_authorizer_request_authorization_finish (authorizer, async_result, &error);
+ g_assert_no_error (error);
+ g_assert (success == TRUE);
+ g_clear_error (&error);
+
+ /* Are we authorised now? */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (authorizer),
+ gdata_tasks_service_get_primary_authorization_domain ()) == TRUE);
+
+ g_main_loop_quit (data->main_loop);
+}
+
+/* Test that asynchronously authorizing works. Note that this test has to be
+ * interactive, as the user has to visit the authentication URI to retrieve an
+ * authorisation code. */
+static void
+test_oauth2_authorizer_request_authorization_async (OAuth2AuthorizerInteractiveAsyncData *data, gconstpointer user_data)
+{
+ /* Skip the test if the user's requested */
+ if (data->parent.authorisation_code == NULL) {
+ return;
+ }
+
+ gdata_test_mock_server_start_trace (mock_server, "oauth2-authorizer-request-authorization-async");
+
+ /* Check we're not authorised beforehand */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (data->parent.parent.authorizer),
+ gdata_tasks_service_get_primary_authorization_domain ()) == FALSE);
+
+ /* Create a main loop and request authorization */
+ gdata_oauth2_authorizer_request_authorization_async (data->parent.parent.authorizer,
+ data->parent.authorisation_code,
+ NULL,
+ (GAsyncReadyCallback) test_oauth2_authorizer_request_authorization_async_cb, data);
+
+ g_main_loop_run (data->main_loop);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_oauth2_authorizer_request_authorization_async_bad_credentials_cb (GDataOAuth2Authorizer *authorizer, GAsyncResult *async_result,
+ OAuth2AuthorizerInteractiveAsyncData *data)
+{
+ gboolean success;
+ GError *error = NULL;
+
+ success = gdata_oauth2_authorizer_request_authorization_finish (authorizer, async_result, &error);
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_FORBIDDEN);
+ g_assert (success == FALSE);
+ g_clear_error (&error);
+
+ /* Are we authorised now? */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (authorizer),
+ gdata_tasks_service_get_primary_authorization_domain ()) == FALSE);
+
+ g_main_loop_quit (data->main_loop);
+}
+
+/* Test that asynchronously authorizing fails if an invalid authorisation code
+ * is provided. */
+static void
+test_oauth2_authorizer_request_authorization_async_bad_credentials (OAuth2AuthorizerInteractiveAsyncData *data, gconstpointer user_data)
+{
+ gdata_test_mock_server_start_trace (mock_server, "oauth2-authorizer-request-authorization-async-bad-credentials");
+
+ /* Check we're not authorised beforehand */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (data->parent.parent.authorizer),
+ gdata_tasks_service_get_primary_authorization_domain ()) == FALSE);
+
+ /* Create a main loop and request authorization */
+ gdata_oauth2_authorizer_request_authorization_async (data->parent.parent.authorizer,
+ data->parent.authorisation_code,
+ NULL,
+ (GAsyncReadyCallback) test_oauth2_authorizer_request_authorization_async_bad_credentials_cb,
+ data);
+
+ g_main_loop_run (data->main_loop);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_oauth2_authorizer_request_authorization_async_cancellation_cb (GDataOAuth2Authorizer *authorizer, GAsyncResult *async_result,
+ OAuth2AuthorizerInteractiveAsyncData *data)
+{
+ gboolean success;
+ GError *error = NULL;
+
+ success = gdata_oauth2_authorizer_request_authorization_finish (authorizer, async_result, &error);
+ g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CANCELLED);
+ g_assert (success == FALSE);
+ g_clear_error (&error);
+
+ /* Are we authorised now? */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (authorizer),
+ gdata_tasks_service_get_primary_authorization_domain ()) == FALSE);
+
+ g_main_loop_quit (data->main_loop);
+}
+
+/* Test that cancelling asynchronously authorizing works. Note that this test
+ * has to be interactive, as the user has to visit the authentication URI to
+ * retrieve an authorisation code. */
+static void
+test_oauth2_authorizer_request_authorization_async_cancellation (OAuth2AuthorizerInteractiveAsyncData *data, gconstpointer user_data)
+{
+ GCancellable *cancellable;
+
+ /* Skip the test if the user's requested */
+ if (data->parent.authorisation_code == NULL) {
+ return;
+ }
+
+ gdata_test_mock_server_start_trace (mock_server, "oauth2-authorizer-request-authorization-async-cancellation");
+
+ /* Check we're not authorised beforehand */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (data->parent.parent.authorizer),
+ gdata_tasks_service_get_primary_authorization_domain ()) == FALSE);
+
+ /* Create the cancellable */
+ cancellable = g_cancellable_new ();
+
+ /* Create a main loop and request authorization */
+ gdata_oauth2_authorizer_request_authorization_async (data->parent.parent.authorizer,
+ data->parent.authorisation_code,
+ cancellable,
+ (GAsyncReadyCallback) test_oauth2_authorizer_request_authorization_async_cancellation_cb,
+ data);
+ g_cancellable_cancel (cancellable);
+
+ g_main_loop_run (data->main_loop);
+
+ g_object_unref (cancellable);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+mock_server_notify_resolver_cb (GObject *object, GParamSpec *pspec,
+ gpointer user_data)
+{
+ UhmServer *server;
+ UhmResolver *resolver;
+
+ server = UHM_SERVER (object);
+
+ /* Set up the expected domain names here. This should technically be
+ * split up between the different unit test suites, but that’s too much
+ * effort. */
+ resolver = uhm_server_get_resolver (server);
+
+ if (resolver != NULL) {
+ const gchar *ip_address = uhm_server_get_address (server);
+
+ uhm_resolver_add_A (resolver, "www.google.com", ip_address);
+ uhm_resolver_add_A (resolver,
+ "accounts.google.com", ip_address);
+ }
+}
+
+int
+main (int argc, char *argv[])
+{
+ GFile *trace_directory;
+ gchar *path = NULL;
+
+ gdata_test_init (argc, argv);
+
+ mock_server = gdata_test_get_mock_server ();
+ g_signal_connect (G_OBJECT (mock_server), "notify::resolver",
+ (GCallback) mock_server_notify_resolver_cb, NULL);
+ path = g_test_build_filename (G_TEST_DIST, "traces/oauth2-authorizer", NULL);
+ trace_directory = g_file_new_for_path (path);
+ g_free (path);
+ uhm_server_set_trace_directory (mock_server, trace_directory);
+ g_object_unref (trace_directory);
+
+ main_thread = g_thread_self ();
+
+ g_test_add_func ("/oauth2-authorizer/constructor", test_oauth2_authorizer_constructor);
+ g_test_add_func ("/oauth2-authorizer/constructor/for-domains", test_oauth2_authorizer_constructor_for_domains);
+
+ g_test_add ("/oauth2-authorizer/properties/client-id", OAuth2AuthorizerData, NULL, set_up_oauth2_authorizer_data,
+ test_oauth2_authorizer_properties_client_id, tear_down_oauth2_authorizer_data);
+ g_test_add ("/oauth2-authorizer/properties/client-secret", OAuth2AuthorizerData, NULL, set_up_oauth2_authorizer_data,
+ test_oauth2_authorizer_properties_client_secret, tear_down_oauth2_authorizer_data);
+ g_test_add ("/oauth2-authorizer/properties/redirect-uri", OAuth2AuthorizerData, NULL, set_up_oauth2_authorizer_data,
+ test_oauth2_authorizer_properties_redirect_uri, tear_down_oauth2_authorizer_data);
+ g_test_add ("/oauth2-authorizer/properties/locale", OAuth2AuthorizerData, NULL, set_up_oauth2_authorizer_data,
+ test_oauth2_authorizer_properties_locale, tear_down_oauth2_authorizer_data);
+ g_test_add ("/oauth2-authorizer/properties/timeout", OAuth2AuthorizerData, NULL, set_up_oauth2_authorizer_data,
+ test_oauth2_authorizer_properties_timeout, tear_down_oauth2_authorizer_data);
+ g_test_add ("/oauth2-authorizer/properties/proxy-resolver", OAuth2AuthorizerData, NULL, set_up_oauth2_authorizer_data,
+ test_oauth2_authorizer_properties_proxy_resolver, tear_down_oauth2_authorizer_data);
+
+ g_test_add ("/oauth2-authorizer/refresh-authorization/unauthenticated", OAuth2AuthorizerData, NULL,
+ set_up_oauth2_authorizer_data, test_oauth2_authorizer_refresh_authorization_unauthenticated, tear_down_oauth2_authorizer_data);
+
+ g_test_add ("/oauth2-authorizer/process-request/null", OAuth2AuthorizerData, NULL,
+ set_up_oauth2_authorizer_data, test_oauth2_authorizer_process_request_null, tear_down_oauth2_authorizer_data);
+ g_test_add ("/oauth2-authorizer/process-request/unauthenticated", OAuth2AuthorizerData, NULL,
+ set_up_oauth2_authorizer_data, test_oauth2_authorizer_process_request_unauthenticated, tear_down_oauth2_authorizer_data);
+
+ /* build-authentication-uri tests */
+ g_test_add ("/oauth2-authorizer/build-authentication-uri", OAuth2AuthorizerData, NULL, set_up_oauth2_authorizer_data,
+ test_oauth2_authorizer_build_authentication_uri_default, tear_down_oauth2_authorizer_data);
+ g_test_add ("/oauth2-authorizer/build-authentication-uri/multiple-domains", OAuth2AuthorizerData, NULL,
+ set_up_oauth2_authorizer_data_multiple_domains, test_oauth2_authorizer_build_authentication_uri_default,
+ tear_down_oauth2_authorizer_data);
+ g_test_add ("/oauth2-authorizer/build-authentication-uri/locale", OAuth2AuthorizerData, NULL,
+ set_up_oauth2_authorizer_data_locale, test_oauth2_authorizer_build_authentication_uri_default,
+ tear_down_oauth2_authorizer_data);
+ g_test_add ("/oauth2-authorizer/build-authentication-uri/hint", OAuth2AuthorizerData, NULL,
+ set_up_oauth2_authorizer_data, test_oauth2_authorizer_build_authentication_uri_hint,
+ tear_down_oauth2_authorizer_data);
+ g_test_add ("/oauth2-authorizer/build-authentication-uri/incremental", OAuth2AuthorizerData, NULL,
+ set_up_oauth2_authorizer_data, test_oauth2_authorizer_build_authentication_uri_incremental,
+ tear_down_oauth2_authorizer_data);
+
+ /* Sync request-authorization tests */
+ if (gdata_test_interactive () == TRUE) {
+ g_test_add ("/oauth2-authorizer/request-authorization/sync", OAuth2AuthorizerInteractiveData,
+ "4/P-pwMETnCh47w20wexdnflDFhXum.4qZ2A1pkUGsSoiIBeO6P2m8OUKkvkQI",
+ set_up_oauth2_authorizer_interactive_data, test_oauth2_authorizer_request_authorization_sync,
+ tear_down_oauth2_authorizer_interactive_data);
+ g_test_add ("/oauth2-authorizer/request-authorization/sync/cancellation", OAuth2AuthorizerInteractiveData,
+ "4/P-pwMETnCh47w20wexdnflDFhXum.4qZ2A1pkUGsSoiIBeO6P2m8OUKkvkQI",
+ set_up_oauth2_authorizer_interactive_data, test_oauth2_authorizer_request_authorization_sync_cancellation,
+ tear_down_oauth2_authorizer_interactive_data);
+ }
+
+ g_test_add ("/oauth2-authorizer/request-authorization/sync/bad-credentials", OAuth2AuthorizerInteractiveData, "",
+ set_up_oauth2_authorizer_interactive_data_bad_credentials,
+ test_oauth2_authorizer_request_authorization_sync_bad_credentials, tear_down_oauth2_authorizer_interactive_data);
+
+ /* Async request-authorization tests */
+ if (gdata_test_interactive () == TRUE) {
+ g_test_add ("/oauth2-authorizer/request-authorization/async", OAuth2AuthorizerInteractiveAsyncData,
+ "4/Gfha9-4IeN09ibTR2Sa2MtQrG9qz.ks8v0zlKR9ceoiIBeO6P2m92f6kvkQI",
+ set_up_oauth2_authorizer_interactive_async_data, test_oauth2_authorizer_request_authorization_async,
+ tear_down_oauth2_authorizer_interactive_async_data);
+ g_test_add ("/oauth2-authorizer/request-authorization/async/cancellation", OAuth2AuthorizerInteractiveAsyncData,
+ "4/Gfha9-4IeN09ibTR2Sa2MtQrG9qz.ks8v0zlKR9ceoiIBeO6P2m92f6kvkQI",
+ set_up_oauth2_authorizer_interactive_async_data, test_oauth2_authorizer_request_authorization_async_cancellation,
+ tear_down_oauth2_authorizer_interactive_async_data);
+ }
+
+ g_test_add ("/oauth2-authorizer/request-authorization/async/bad-credentials", OAuth2AuthorizerInteractiveAsyncData, "",
+ set_up_oauth2_authorizer_interactive_async_data_bad_credentials,
+ test_oauth2_authorizer_request_authorization_async_bad_credentials, tear_down_oauth2_authorizer_interactive_async_data);
+
+ /* Miscellaneous tests */
+ if (gdata_test_interactive () == TRUE) {
+ gboolean skip_test = FALSE;
+
+ g_test_add ("/oauth2-authorizer/refresh-authorization/authenticated", OAuth2AuthorizerData, &skip_test,
+ set_up_oauth2_authorizer_data_authenticated, test_oauth2_authorizer_refresh_authorization_authenticated,
+ tear_down_oauth2_authorizer_data);
+
+ g_test_add ("/oauth2-authorizer/process-request/authenticated", OAuth2AuthorizerData, &skip_test,
+ set_up_oauth2_authorizer_data_authenticated, test_oauth2_authorizer_process_request_authenticated,
+ tear_down_oauth2_authorizer_data);
+ }
+
+ return g_test_run ();
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010, 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib.h>
+#include <stdio.h>
+
+#include "gdata.h"
+#include "common.h"
+
+static void
+test_parse_feed (void)
+{
+ GDataFeed *feed;
+ GError *error = NULL;
+
+ feed = GDATA_FEED (gdata_parsable_new_from_xml (GDATA_TYPE_FEED,
+ "<feed xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' "
+ "xmlns:gd='http://schemas.google.com/g/2005' "
+ "gd:etag='W/\"D08FQn8-eil7ImA9WxZbFEw.\"'>"
+ "<id>http://example.com/id</id>"
+ "<updated>2009-02-25T14:07:37.880860Z</updated>"
+ "<title type='text'>Test feed</title>"
+ "<subtitle type='text'>Test subtitle</subtitle>"
+ "<logo>http://example.com/logo.png</logo>"
+ "<icon>http://example.com/icon.png</icon>"
+ "<link rel='alternate' type='text/html' href='http://alternate.example.com/'/>"
+ "<link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://example.com/id'/>"
+ "<link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='http://example.com/post'/>"
+ "<link rel='self' type='application/atom+xml' href='http://example.com/id'/>"
+ "<category scheme='http://example.com/categories' term='feed'/>"
+ "<author>"
+ "<name>Joe Smith</name>"
+ "<email>j.smith@example.com</email>"
+ "</author>"
+ "<generator version='0.6' uri='http://example.com/'>Example Generator</generator>"
+ "<openSearch:totalResults>2</openSearch:totalResults>"
+ "<openSearch:startIndex>0</openSearch:startIndex>"
+ "<openSearch:itemsPerPage>50</openSearch:itemsPerPage>"
+ "<entry>"
+ "<id>entry1</id>"
+ "<title type='text'>Testing unhandled XML</title>"
+ "<updated>2009-01-25T14:07:37.880860Z</updated>"
+ "<published>2009-01-23T14:06:37.880860Z</published>"
+ "<content type='text'>Here we test unhandled XML elements.</content>"
+ "</entry>"
+ "<entry>"
+ "<id>entry2</id>"
+ "<title type='text'>Testing unhandled XML 2</title>"
+ "<updated>2009-02-25T14:07:37.880860Z</updated>"
+ "<published>2009-02-23T14:06:37.880860Z</published>"
+ "<content type='text'>Here we test unhandled XML elements again.</content>"
+ "</entry>"
+ "</feed>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_FEED (feed));
+ g_clear_error (&error);
+
+ g_object_unref (feed);
+}
+
+static void
+test_perf_parsing (void)
+{
+ GTimeVal start_time, end_time;
+ guint i;
+ guint64 total_time; /* microseconds */
+ guint64 per_iteration_time; /* microseconds */
+
+ #define ITERATIONS 10000
+
+ /* Test feed parsing time */
+ g_get_current_time (&start_time);
+ for (i = 0; i < ITERATIONS; i++)
+ test_parse_feed ();
+ g_get_current_time (&end_time);
+
+ total_time = (end_time.tv_sec - start_time.tv_sec) * G_USEC_PER_SEC +
+ (end_time.tv_usec - start_time.tv_usec);
+ per_iteration_time = total_time / ITERATIONS;
+
+ /* Prefix with hashes to avoid the output being misinterpreted as TAP
+ * commands. */
+ printf ("# Parsing a feed %u times took:\n"
+ "# • Total: %.4fs\n"
+ "# • Per iteration: %.4fs\n",
+ ITERATIONS,
+ (gdouble) total_time / (gdouble) G_USEC_PER_SEC,
+ (gdouble) per_iteration_time / (gdouble) G_USEC_PER_SEC);
+
+ g_assert_cmpuint (per_iteration_time, <, 2000); /* 2ms */
+}
+
+int
+main (int argc, char *argv[])
+{
+ gdata_test_init (argc, argv);
+
+ g_test_add_func ("/perf/parsing", test_perf_parsing);
+
+ return g_test_run ();
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Richard Schwarting 2009 <aquarichy@gmail.com>
+ * Copyright (C) Philip Withnall 2009–2010 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib.h>
+#include <unistd.h>
+#include <string.h>
+#include <config.h>
+
+/* For the thumbnail size tests in test_download_thumbnails() */
+#ifdef HAVE_GDK_PIXBUF
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#endif
+
+#include "gdata.h"
+#include "common.h"
+#include "gdata-dummy-authorizer.h"
+
+#undef CLIENT_ID /* from common.h */
+
+#define CLIENT_ID "352818697630-nqu2cmt5quqd6lr17ouoqmb684u84l1f.apps.googleusercontent.com"
+#define CLIENT_SECRET "-fA4pHQJxR3zJ-FyAMPQsikg"
+#define REDIRECT_URI "urn:ietf:wg:oauth:2.0:oob"
+
+static UhmServer *mock_server = NULL;
+
+/* Assert that two albums have equal properties, but aren't the same object instance. For use in, e.g., comparing an inserted album from the server
+ * to the original instance which was inserted. */
+static void
+assert_albums_equal (GDataPicasaWebAlbum *album1, GDataPicasaWebAlbum *album2, gboolean compare_inserted_data)
+{
+ gdouble latitude1, longitude1, latitude2, longitude2;
+ const gchar * const *tags1, * const *tags2;
+
+ g_assert (GDATA_IS_PICASAWEB_ALBUM (album1));
+ g_assert (GDATA_IS_PICASAWEB_ALBUM (album2));
+
+ g_assert (album1 != album2);
+
+ g_assert_cmpstr (gdata_entry_get_title (GDATA_ENTRY (album1)), ==, gdata_entry_get_title (GDATA_ENTRY (album2)));
+ g_assert_cmpstr (gdata_entry_get_summary (GDATA_ENTRY (album1)), ==, gdata_entry_get_summary (GDATA_ENTRY (album2)));
+ g_assert_cmpstr (gdata_entry_get_content (GDATA_ENTRY (album1)), ==, gdata_entry_get_content (GDATA_ENTRY (album2)));
+ g_assert_cmpstr (gdata_entry_get_content_uri (GDATA_ENTRY (album1)), ==, gdata_entry_get_content_uri (GDATA_ENTRY (album2)));
+ g_assert_cmpstr (gdata_entry_get_rights (GDATA_ENTRY (album1)), ==, gdata_entry_get_rights (GDATA_ENTRY (album2)));
+
+ if (compare_inserted_data == TRUE) {
+ g_assert_cmpstr (gdata_entry_get_id (GDATA_ENTRY (album1)), ==, gdata_entry_get_id (GDATA_ENTRY (album2)));
+ g_assert_cmpstr (gdata_entry_get_etag (GDATA_ENTRY (album1)), ==, gdata_entry_get_etag (GDATA_ENTRY (album2)));
+ g_assert_cmpint (gdata_entry_get_updated (GDATA_ENTRY (album1)), ==, gdata_entry_get_updated (GDATA_ENTRY (album2)));
+ g_assert_cmpint (gdata_entry_get_published (GDATA_ENTRY (album1)), ==, gdata_entry_get_published (GDATA_ENTRY (album2)));
+ }
+
+ g_assert_cmpstr (gdata_picasaweb_album_get_location (album1), ==, gdata_picasaweb_album_get_location (album2));
+ g_assert_cmpint (gdata_picasaweb_album_get_visibility (album1), ==, gdata_picasaweb_album_get_visibility (album2));
+ g_assert_cmpint (gdata_picasaweb_album_get_timestamp (album1), ==, gdata_picasaweb_album_get_timestamp (album2));
+ g_assert (gdata_picasaweb_album_is_commenting_enabled (album1) == gdata_picasaweb_album_is_commenting_enabled (album2));
+
+ /* Compare coordinates */
+ gdata_picasaweb_album_get_coordinates (album1, &latitude1, &longitude1);
+ gdata_picasaweb_album_get_coordinates (album2, &latitude2, &longitude2);
+ g_assert_cmpfloat (latitude1, ==, latitude2);
+ g_assert_cmpfloat (longitude1, ==, longitude2);
+
+ /* Compare tags */
+ tags1 = gdata_picasaweb_album_get_tags (album1);
+ tags2 = gdata_picasaweb_album_get_tags (album2);
+
+ g_assert ((tags1 == NULL) == (tags2 == NULL));
+
+ if (tags1 != NULL && tags2 != NULL) {
+ guint i;
+
+ for (i = 0; tags1[i] != NULL; i++) {
+ g_assert_cmpstr (tags1[i], ==, tags2[i]);
+ }
+
+ g_assert (tags2[i] == NULL);
+ }
+
+ if (compare_inserted_data == TRUE) {
+ GList *contents1, *contents2, *thumbnails1, *thumbnails2, *i1, *i2;
+
+ g_assert_cmpstr (gdata_picasaweb_album_get_id (album1), ==, gdata_picasaweb_album_get_id (album2));
+ g_assert_cmpstr (gdata_picasaweb_album_get_user (album1), ==, gdata_picasaweb_album_get_user (album2));
+ g_assert_cmpstr (gdata_picasaweb_album_get_nickname (album1), ==, gdata_picasaweb_album_get_nickname (album2));
+ g_assert_cmpint (gdata_picasaweb_album_get_edited (album1), ==, gdata_picasaweb_album_get_edited (album2));
+ g_assert_cmpuint (gdata_picasaweb_album_get_num_photos (album1), ==, gdata_picasaweb_album_get_num_photos (album2));
+ g_assert_cmpuint (gdata_picasaweb_album_get_num_photos_remaining (album1), ==,
+ gdata_picasaweb_album_get_num_photos_remaining (album2));
+ g_assert_cmpuint (gdata_picasaweb_album_get_bytes_used (album1), ==, gdata_picasaweb_album_get_bytes_used (album2));
+ g_assert_cmpuint (gdata_picasaweb_album_get_comment_count (album1), ==, gdata_picasaweb_album_get_comment_count (album2));
+
+ /* Compare contents */
+ contents1 = gdata_picasaweb_album_get_contents (album1);
+ contents2 = gdata_picasaweb_album_get_contents (album2);
+
+ g_assert_cmpuint (g_list_length (contents1), ==, g_list_length (contents2));
+ g_assert_cmpuint (g_list_length (contents1), >=, 1);
+
+ for (i1 = contents1, i2 = contents2; i1 != NULL && i2 != NULL; i1 = i1->next, i2 = i2->next) {
+ GDataMediaContent *content1, *content2;
+
+ content1 = GDATA_MEDIA_CONTENT (i1->data);
+ content2 = GDATA_MEDIA_CONTENT (i2->data);
+
+ g_assert_cmpstr (gdata_media_content_get_uri (content1), ==, gdata_media_content_get_uri (content2));
+ g_assert (strstr (gdata_media_content_get_uri (content1), "googleusercontent.com") != NULL);
+ g_assert_cmpstr (gdata_media_content_get_content_type (content1), ==, gdata_media_content_get_content_type (content2));
+ g_assert_cmpstr (gdata_media_content_get_content_type (content1), ==, "image/jpeg");
+ g_assert_cmpuint (gdata_media_content_get_medium (content1), ==, gdata_media_content_get_medium (content2));
+ g_assert_cmpuint (gdata_media_content_get_medium (content1), ==, GDATA_MEDIA_IMAGE);
+
+ g_assert (gdata_media_content_is_default (content1) == gdata_media_content_is_default (content2));
+ g_assert (gdata_media_content_is_default (content1) == FALSE);
+ g_assert_cmpint (gdata_media_content_get_duration (content1), ==, gdata_media_content_get_duration (content2));
+ g_assert_cmpint (gdata_media_content_get_duration (content1), ==, 0); /* doesn't apply to photos */
+ g_assert_cmpuint (gdata_media_content_get_width (content1), ==, gdata_media_content_get_width (content2));
+ g_assert_cmpuint (gdata_media_content_get_width (content1), ==, 0); /* PicasaWeb doesn't set anything better */
+ g_assert_cmpuint (gdata_media_content_get_height (content1), ==, gdata_media_content_get_height (content2));
+ g_assert_cmpuint (gdata_media_content_get_height (content1), ==, 0); /* PicasaWeb doesn't set anything better */
+ g_assert_cmpuint (gdata_media_content_get_filesize (content1), ==, gdata_media_content_get_filesize (content2));
+ g_assert_cmpuint (gdata_media_content_get_filesize (content1), ==, 0); /* PicasaWeb doesn't set anything better */
+ g_assert_cmpuint (gdata_media_content_get_expression (content1), ==, gdata_media_content_get_expression (content2));
+ g_assert_cmpuint (gdata_media_content_get_expression (content1), ==, GDATA_MEDIA_EXPRESSION_FULL);
+ }
+
+ g_assert (i1 == NULL && i2 == NULL);
+
+ /* Compare thumbnails */
+ thumbnails1 = gdata_picasaweb_album_get_thumbnails (album1);
+ thumbnails2 = gdata_picasaweb_album_get_thumbnails (album2);
+
+ g_assert_cmpuint (g_list_length (thumbnails1), ==, g_list_length (thumbnails2));
+ g_assert_cmpuint (g_list_length (thumbnails1), >=, 1);
+
+ for (i1 = thumbnails1, i2 = thumbnails2; i1 != NULL && i2 != NULL; i1 = i1->next, i2 = i2->next) {
+ GDataMediaThumbnail *thumbnail1, *thumbnail2;
+
+ thumbnail1 = GDATA_MEDIA_THUMBNAIL (i1->data);
+ thumbnail2 = GDATA_MEDIA_THUMBNAIL (i2->data);
+
+ g_assert_cmpstr (gdata_media_thumbnail_get_uri (thumbnail1), ==, gdata_media_thumbnail_get_uri (thumbnail2));
+ g_assert (strstr (gdata_media_thumbnail_get_uri (thumbnail1), "googleusercontent.com") != NULL);
+ g_assert_cmpint (gdata_media_thumbnail_get_time (thumbnail1), ==, gdata_media_thumbnail_get_time (thumbnail2));
+ g_assert_cmpint (gdata_media_thumbnail_get_time (thumbnail1), ==, -1); /* PicasaWeb doesn't set anything better */
+ g_assert_cmpint (gdata_media_thumbnail_get_width (thumbnail1), ==, gdata_media_thumbnail_get_width (thumbnail2));
+ g_assert_cmpint (gdata_media_thumbnail_get_width (thumbnail1), ==, 160);
+ g_assert_cmpint (gdata_media_thumbnail_get_height (thumbnail1), ==, gdata_media_thumbnail_get_height (thumbnail2));
+ g_assert_cmpint (gdata_media_thumbnail_get_height (thumbnail1), ==, 160);
+ }
+
+ g_assert (i1 == NULL && i2 == NULL);
+ }
+
+ /* TODO: We don't compare categories or authors yet. */
+}
+
+/* Assert that two files have equal properties, but aren't the same object instance. For use in, e.g., comparing an inserted file from the server
+ * to the original instance which was inserted. */
+static void
+assert_files_equal (GDataPicasaWebFile *file1, GDataPicasaWebFile *file2, gboolean compare_inserted_data)
+{
+ gdouble latitude1, longitude1, latitude2, longitude2;
+ const gchar * const *tags1, * const *tags2;
+
+ g_assert (GDATA_IS_PICASAWEB_FILE (file1));
+ g_assert (GDATA_IS_PICASAWEB_FILE (file2));
+
+ g_assert (file1 != file2);
+
+ g_assert_cmpstr (gdata_entry_get_title (GDATA_ENTRY (file1)), ==, gdata_entry_get_title (GDATA_ENTRY (file2)));
+ g_assert_cmpstr (gdata_entry_get_summary (GDATA_ENTRY (file1)), ==, gdata_entry_get_summary (GDATA_ENTRY (file2)));
+ g_assert_cmpstr (gdata_entry_get_content (GDATA_ENTRY (file1)), ==, gdata_entry_get_content (GDATA_ENTRY (file2)));
+ g_assert_cmpstr (gdata_entry_get_content (GDATA_ENTRY (file1)), ==, NULL);
+ /* Apparently Google will arbitrarily change content URIs for things at various times. */
+ /*g_assert_cmpstr (gdata_entry_get_content_uri (GDATA_ENTRY (file1)), ==, gdata_entry_get_content_uri (GDATA_ENTRY (file2)));*/
+ g_assert (strstr (gdata_entry_get_content_uri (GDATA_ENTRY (file1)), "googleusercontent.com") != NULL);
+ g_assert_cmpstr (gdata_entry_get_rights (GDATA_ENTRY (file1)), ==, gdata_entry_get_rights (GDATA_ENTRY (file2)));
+
+ if (compare_inserted_data == TRUE) {
+ g_assert_cmpstr (gdata_entry_get_id (GDATA_ENTRY (file1)), ==, gdata_entry_get_id (GDATA_ENTRY (file2)));
+ g_assert_cmpstr (gdata_entry_get_id (GDATA_ENTRY (file1)), !=, NULL);
+ /* Note: We don't check the ETags are equal, because Google like to randomly change ETags without warning. */
+ g_assert_cmpstr (gdata_entry_get_etag (GDATA_ENTRY (file1)), !=, NULL);
+ g_assert_cmpstr (gdata_entry_get_etag (GDATA_ENTRY (file2)), !=, NULL);
+ /* Same for the updated times. */
+ g_assert_cmpint (gdata_entry_get_updated (GDATA_ENTRY (file1)), >, 0);
+ g_assert_cmpint (gdata_entry_get_updated (GDATA_ENTRY (file2)), >, 0);
+ g_assert_cmpint (gdata_entry_get_published (GDATA_ENTRY (file1)), ==, gdata_entry_get_published (GDATA_ENTRY (file2)));
+ g_assert_cmpint (gdata_entry_get_published (GDATA_ENTRY (file1)), >, 0);
+ }
+
+ g_assert_cmpstr (gdata_picasaweb_file_get_id (file1), ==, gdata_picasaweb_file_get_id (file2));
+ g_assert_cmpint (strlen (gdata_picasaweb_file_get_id (file1)), >, 0);
+ g_assert_cmpstr (gdata_picasaweb_file_get_checksum (file1), ==, gdata_picasaweb_file_get_checksum (file2));
+ g_assert (gdata_picasaweb_file_is_commenting_enabled (file1) == gdata_picasaweb_file_is_commenting_enabled (file2));
+ g_assert_cmpstr (gdata_picasaweb_file_get_credit (file1), ==, gdata_picasaweb_file_get_credit (file2));
+ g_assert_cmpstr (gdata_picasaweb_file_get_caption (file1), ==, gdata_picasaweb_file_get_caption (file2));
+
+ /* Compare coordinates */
+ gdata_picasaweb_file_get_coordinates (file1, &latitude1, &longitude1);
+ gdata_picasaweb_file_get_coordinates (file2, &latitude2, &longitude2);
+ g_assert_cmpfloat (latitude1, ==, latitude2);
+ g_assert_cmpfloat (longitude1, ==, longitude2);
+
+ /* Compare tags */
+ tags1 = gdata_picasaweb_file_get_tags (file1);
+ tags2 = gdata_picasaweb_file_get_tags (file2);
+
+ g_assert ((tags1 == NULL) == (tags2 == NULL));
+
+ if (tags1 != NULL && tags2 != NULL) {
+ guint i;
+
+ for (i = 0; tags1[i] != NULL; i++) {
+ g_assert_cmpstr (tags1[i], ==, tags2[i]);
+ }
+
+ g_assert (tags2[i] == NULL);
+ }
+
+ if (compare_inserted_data == TRUE) {
+ GList *contents1, *contents2, *thumbnails1, *thumbnails2, *i1, *i2;
+
+ /* Same as above; don't compare the edited times. */
+ g_assert_cmpint (gdata_picasaweb_file_get_edited (file1), >, 0);
+ g_assert_cmpint (gdata_picasaweb_file_get_edited (file2), >, 0);
+ /* See ETags and content URIs above. */
+ /*g_assert_cmpstr (gdata_picasaweb_file_get_version (file1), ==, gdata_picasaweb_file_get_version (file2));*/
+ g_assert_cmpuint (strlen (gdata_picasaweb_file_get_version (file1)), >, 0);
+ g_assert_cmpstr (gdata_picasaweb_file_get_album_id (file1), ==, gdata_picasaweb_file_get_album_id (file2));
+ g_assert_cmpuint (strlen (gdata_picasaweb_file_get_album_id (file1)), >, 0);
+ g_assert_cmpuint (gdata_picasaweb_file_get_width (file1), ==, gdata_picasaweb_file_get_width (file2));
+ g_assert_cmpuint (gdata_picasaweb_file_get_width (file1), >, 0);
+ g_assert_cmpuint (gdata_picasaweb_file_get_height (file1), ==, gdata_picasaweb_file_get_height (file2));
+ g_assert_cmpuint (gdata_picasaweb_file_get_height (file1), >, 0);
+ g_assert_cmpuint (gdata_picasaweb_file_get_size (file1), ==, gdata_picasaweb_file_get_size (file2));
+ g_assert_cmpuint (gdata_picasaweb_file_get_size (file1), >, 0);
+ g_assert_cmpint (gdata_picasaweb_file_get_timestamp (file1), ==, gdata_picasaweb_file_get_timestamp (file2));
+ g_assert_cmpint (gdata_picasaweb_file_get_timestamp (file1), >, 0);
+ g_assert_cmpuint (gdata_picasaweb_file_get_comment_count (file1), ==, gdata_picasaweb_file_get_comment_count (file2));
+ g_assert_cmpuint (gdata_picasaweb_file_get_rotation (file1), ==, gdata_picasaweb_file_get_rotation (file2));
+ g_assert_cmpstr (gdata_picasaweb_file_get_video_status (file1), ==, gdata_picasaweb_file_get_video_status (file2));
+
+ /* Compare contents */
+ contents1 = gdata_picasaweb_file_get_contents (file1);
+ contents2 = gdata_picasaweb_file_get_contents (file2);
+
+ g_assert_cmpuint (g_list_length (contents1), ==, g_list_length (contents2));
+ g_assert_cmpuint (g_list_length (contents1), >=, 1);
+
+ for (i1 = contents1, i2 = contents2; i1 != NULL && i2 != NULL; i1 = i1->next, i2 = i2->next) {
+ GDataMediaContent *content1, *content2;
+
+ content1 = GDATA_MEDIA_CONTENT (i1->data);
+ content2 = GDATA_MEDIA_CONTENT (i2->data);
+
+ /* And here: Google can arbitrarily change content URIs. */
+ /*g_assert_cmpstr (gdata_media_content_get_uri (content1), ==, gdata_media_content_get_uri (content2));*/
+ g_assert (strstr (gdata_media_content_get_uri (content1), "googleusercontent.com") != NULL);
+ g_assert_cmpstr (gdata_media_content_get_content_type (content1), ==, gdata_media_content_get_content_type (content2));
+ g_assert_cmpstr (gdata_media_content_get_content_type (content1), ==, "image/jpeg");
+ g_assert_cmpuint (gdata_media_content_get_medium (content1), ==, gdata_media_content_get_medium (content2));
+ g_assert_cmpuint (gdata_media_content_get_medium (content1), ==, GDATA_MEDIA_IMAGE);
+
+ g_assert (gdata_media_content_is_default (content1) == gdata_media_content_is_default (content2));
+ g_assert (gdata_media_content_is_default (content1) == FALSE);
+ g_assert_cmpint (gdata_media_content_get_duration (content1), ==, gdata_media_content_get_duration (content2));
+ g_assert_cmpint (gdata_media_content_get_duration (content1), ==, 0); /* doesn't apply to photos */
+ g_assert_cmpuint (gdata_media_content_get_width (content1), ==, gdata_media_content_get_width (content2));
+ g_assert_cmpuint (gdata_media_content_get_width (content1), >, 0);
+ g_assert_cmpuint (gdata_media_content_get_height (content1), ==, gdata_media_content_get_height (content2));
+ g_assert_cmpuint (gdata_media_content_get_height (content1), >, 0);
+ g_assert_cmpuint (gdata_media_content_get_filesize (content1), ==, gdata_media_content_get_filesize (content2));
+ g_assert_cmpuint (gdata_media_content_get_filesize (content1), ==, 0); /* PicasaWeb doesn't set anything better */
+ g_assert_cmpuint (gdata_media_content_get_expression (content1), ==, gdata_media_content_get_expression (content2));
+ g_assert_cmpuint (gdata_media_content_get_expression (content1), ==, GDATA_MEDIA_EXPRESSION_FULL);
+
+ /* TODO: really want to test these with a video clip */
+ }
+
+ g_assert (i1 == NULL && i2 == NULL);
+
+ /* Compare thumbnails */
+ thumbnails1 = gdata_picasaweb_file_get_thumbnails (file1);
+ thumbnails2 = gdata_picasaweb_file_get_thumbnails (file2);
+
+ g_assert_cmpuint (g_list_length (thumbnails1), ==, g_list_length (thumbnails2));
+ g_assert_cmpuint (g_list_length (thumbnails1), >=, 1);
+
+ for (i1 = thumbnails1, i2 = thumbnails2; i1 != NULL && i2 != NULL; i1 = i1->next, i2 = i2->next) {
+ GDataMediaThumbnail *thumbnail1, *thumbnail2;
+
+ thumbnail1 = GDATA_MEDIA_THUMBNAIL (i1->data);
+ thumbnail2 = GDATA_MEDIA_THUMBNAIL (i2->data);
+
+ /* And here: Google can arbitrarily change thumbnail URIs. */
+ /*g_assert_cmpstr (gdata_media_thumbnail_get_uri (thumbnail1), ==, gdata_media_thumbnail_get_uri (thumbnail2));*/
+ g_assert (strstr (gdata_media_thumbnail_get_uri (thumbnail1), "googleusercontent.com") != NULL);
+ g_assert_cmpint (gdata_media_thumbnail_get_time (thumbnail1), ==, gdata_media_thumbnail_get_time (thumbnail2));
+ g_assert_cmpint (gdata_media_thumbnail_get_time (thumbnail1), ==, -1); /* PicasaWeb doesn't set anything better */
+ g_assert_cmpint (gdata_media_thumbnail_get_width (thumbnail1), ==, gdata_media_thumbnail_get_width (thumbnail2));
+ g_assert_cmpint (gdata_media_thumbnail_get_width (thumbnail1), >, 0);
+ g_assert_cmpint (gdata_media_thumbnail_get_height (thumbnail1), ==, gdata_media_thumbnail_get_height (thumbnail2));
+ g_assert_cmpint (gdata_media_thumbnail_get_height (thumbnail1), >, 0);
+ }
+
+ g_assert (i1 == NULL && i2 == NULL);
+
+ /* Check EXIF values */
+ g_assert_cmpfloat (gdata_picasaweb_file_get_distance (file1), ==, gdata_picasaweb_file_get_distance (file2));
+ g_assert_cmpfloat (gdata_picasaweb_file_get_exposure (file1), ==, gdata_picasaweb_file_get_exposure (file2));
+ g_assert_cmpfloat (gdata_picasaweb_file_get_exposure (file1), >, 0.0);
+ g_assert (gdata_picasaweb_file_get_flash (file1) == gdata_picasaweb_file_get_flash (file2));
+ g_assert_cmpfloat (gdata_picasaweb_file_get_focal_length (file1), ==, gdata_picasaweb_file_get_focal_length (file2));
+ g_assert_cmpfloat (gdata_picasaweb_file_get_focal_length (file1), >, 0.0);
+ g_assert_cmpfloat (gdata_picasaweb_file_get_fstop (file1), ==, gdata_picasaweb_file_get_fstop (file2));
+ g_assert_cmpfloat (gdata_picasaweb_file_get_fstop (file1), >, 0.0);
+ g_assert_cmpstr (gdata_picasaweb_file_get_image_unique_id (file1), ==, gdata_picasaweb_file_get_image_unique_id (file2));
+ g_assert_cmpuint (strlen (gdata_picasaweb_file_get_image_unique_id (file1)), >, 0);
+ g_assert_cmpint (gdata_picasaweb_file_get_iso (file1), ==, gdata_picasaweb_file_get_iso (file2));
+ g_assert_cmpint (gdata_picasaweb_file_get_iso (file1), >, 0);
+ g_assert_cmpstr (gdata_picasaweb_file_get_make (file1), ==, gdata_picasaweb_file_get_make (file2));
+ g_assert_cmpuint (strlen (gdata_picasaweb_file_get_make (file1)), >, 0);
+ g_assert_cmpstr (gdata_picasaweb_file_get_model (file1), ==, gdata_picasaweb_file_get_model (file2));
+ g_assert_cmpuint (strlen (gdata_picasaweb_file_get_model (file1)), >, 0);
+ }
+
+ /* TODO: file wasn't uploaded with checksum assigned; g_assert_cmpstr (gdata_picasaweb_file_get_checksum (photo), ==, ??); */
+ /* TODO: not a good test of video status; want to upload a video for it */
+}
+
+static void
+test_authentication (void)
+{
+ GDataOAuth2Authorizer *authorizer = NULL; /* owned */
+ gchar *authentication_uri, *authorisation_code;
+
+ gdata_test_mock_server_start_trace (mock_server, "authentication");
+
+ authorizer = gdata_oauth2_authorizer_new (CLIENT_ID, CLIENT_SECRET,
+ REDIRECT_URI,
+ GDATA_TYPE_PICASAWEB_SERVICE);
+
+ /* Get an authentication URI. */
+ authentication_uri = gdata_oauth2_authorizer_build_authentication_uri (authorizer, NULL, FALSE);
+ g_assert (authentication_uri != NULL);
+
+ /* Get the authorisation code off the user. */
+ if (uhm_server_get_enable_online (mock_server)) {
+ authorisation_code = gdata_test_query_user_for_verifier (authentication_uri);
+ } else {
+ /* Hard coded, extracted from the trace file. */
+ authorisation_code = g_strdup ("4/OEX-S1iMbOA_dOnNgUlSYmGWh3TK.QrR73axcNMkWoiIBeO6P2m_su7cwkQI");
+ }
+
+ g_free (authentication_uri);
+
+ if (authorisation_code == NULL) {
+ /* Skip tests. */
+ goto skip_test;
+ }
+
+ /* Authorise the token */
+ g_assert (gdata_oauth2_authorizer_request_authorization (authorizer, authorisation_code, NULL, NULL) == TRUE);
+
+ /* Check all is as it should be */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (authorizer),
+ gdata_picasaweb_service_get_primary_authorization_domain ()) == TRUE);
+
+skip_test:
+ g_free (authorisation_code);
+ g_object_unref (authorizer);
+
+ uhm_server_end_trace (mock_server);
+}
+
+typedef struct {
+ GDataPicasaWebAlbum *album;
+ GDataPicasaWebFile *file1;
+ GDataPicasaWebFile *file2;
+ GDataPicasaWebFile *file3;
+ GDataPicasaWebFile *file4;
+} QueryFilesData;
+
+static GDataPicasaWebFile *
+upload_file (GDataPicasaWebService *service, const gchar *title, GDataPicasaWebAlbum *album)
+{
+ GDataPicasaWebFile *file, *uploaded_file;
+ GFile *photo_file;
+ GFileInfo *file_info;
+ GFileInputStream *input_stream;
+ GDataUploadStream *upload_stream;
+ gchar *path = NULL;
+
+ file = gdata_picasaweb_file_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (file), title);
+
+ /* File is public domain: http://en.wikipedia.org/wiki/File:German_garden_gnome_cropped.jpg */
+ path = g_test_build_filename (G_TEST_DIST, "photo.jpg", NULL);
+ photo_file = g_file_new_for_path (path);
+ g_free (path);
+
+ /* Get the file's info */
+ file_info = g_file_query_info (photo_file, G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME "," G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
+ G_FILE_QUERY_INFO_NONE, NULL, NULL);
+ g_assert (G_IS_FILE_INFO (file_info));
+
+ /* Get an input stream for the file */
+ input_stream = g_file_read (photo_file, NULL, NULL);
+ g_assert (G_IS_FILE_INPUT_STREAM (input_stream));
+
+ g_object_unref (photo_file);
+
+ /* Prepare the upload stream */
+ upload_stream = gdata_picasaweb_service_upload_file (GDATA_PICASAWEB_SERVICE (service), album, file, g_file_info_get_display_name (file_info),
+ g_file_info_get_content_type (file_info), NULL, NULL);
+ g_assert (GDATA_IS_UPLOAD_STREAM (upload_stream));
+
+ g_object_unref (file_info);
+ g_object_unref (file);
+
+ /* Upload the photo */
+ g_assert_cmpint (g_output_stream_splice (G_OUTPUT_STREAM (upload_stream), G_INPUT_STREAM (input_stream),
+ G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, NULL, NULL), >, 0);
+
+ g_object_unref (input_stream);
+
+ /* Finish off the upload */
+ uploaded_file = gdata_picasaweb_service_finish_file_upload (GDATA_PICASAWEB_SERVICE (service), upload_stream, NULL);
+
+ g_object_unref (upload_stream);
+
+ g_assert (GDATA_IS_PICASAWEB_FILE (uploaded_file));
+
+ return uploaded_file;
+}
+
+static void
+set_up_query_files (QueryFilesData *data, gconstpointer service)
+{
+ GDataPicasaWebAlbum *album;
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-query-files");
+
+ /* Album */
+ album = gdata_picasaweb_album_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (album), "Test album for QueryFiles");
+
+ data->album = gdata_picasaweb_service_insert_album (GDATA_PICASAWEB_SERVICE (service), album, NULL, NULL);
+ g_assert (data->album != NULL);
+
+ g_object_unref (album);
+
+ /* Upload the files */
+ data->file1 = upload_file (GDATA_PICASAWEB_SERVICE (service), "Test file 1", data->album);
+ data->file2 = upload_file (GDATA_PICASAWEB_SERVICE (service), "Test file 2", data->album);
+ data->file3 = upload_file (GDATA_PICASAWEB_SERVICE (service), "Test file 3", data->album);
+ data->file4 = upload_file (GDATA_PICASAWEB_SERVICE (service), "Test file 4", data->album);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+tear_down_query_files (QueryFilesData *data, gconstpointer service)
+{
+ GDataFeed *album_feed;
+ GDataEntry *album;
+
+ g_object_unref (data->file4);
+ g_object_unref (data->file3);
+ g_object_unref (data->file2);
+ g_object_unref (data->file1);
+
+ /* HACK! Wait for the distributed Google servers to synchronise. */
+ if (uhm_server_get_enable_online (mock_server) == TRUE) {
+ sleep (10);
+ }
+
+ gdata_test_mock_server_start_trace (mock_server, "teardown-query-files");
+
+ /* We have to re-query for the album, since its ETag will be out of date */
+ album_feed = gdata_picasaweb_service_query_all_albums (GDATA_PICASAWEB_SERVICE (service), NULL, NULL, NULL, NULL, NULL, NULL);
+ album = gdata_feed_look_up_entry (GDATA_FEED (album_feed), gdata_entry_get_id (GDATA_ENTRY (data->album)));
+ g_assert (GDATA_IS_PICASAWEB_ALBUM (album));
+
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_picasaweb_service_get_primary_authorization_domain (),
+ album, NULL, NULL) == TRUE);
+
+ g_object_unref (album_feed);
+ g_object_unref (data->album);
+
+ uhm_server_end_trace (mock_server);
+}
+
+/* Checks to perform on a photo feed from test_query_files() or test_query_files_async(). */
+static void
+_test_query_files (GDataFeed *photo_feed, QueryFilesData *data)
+{
+ GDataEntry *entry;
+ gchar *xml;
+
+ g_assert (GDATA_IS_FEED (photo_feed));
+
+ /* Check properties of the feed */
+ g_assert_cmpint (g_list_length (gdata_feed_get_entries (photo_feed)), ==, 4);
+
+ g_assert_cmpstr (gdata_feed_get_title (photo_feed), ==, "Test album for QueryFiles");
+ g_assert_cmpstr (gdata_feed_get_subtitle (photo_feed), ==, NULL);
+ g_assert_cmpstr (gdata_feed_get_id (photo_feed), !=, NULL);
+ g_assert_cmpstr (gdata_feed_get_etag (photo_feed), !=, NULL); /* this varies as the album changes, e.g. when new images are uploaded */
+ g_assert_cmpstr (gdata_feed_get_icon (photo_feed), !=, NULL); /* tested weakly because it changes fairly regularly */
+ g_assert_cmpuint (gdata_feed_get_items_per_page (photo_feed), ==, 1000);
+ g_assert_cmpuint (gdata_feed_get_start_index (photo_feed), ==, 1);
+ g_assert_cmpuint (gdata_feed_get_total_results (photo_feed), ==, 4);
+
+ /* Test the first file */
+ entry = gdata_feed_look_up_entry (photo_feed, gdata_entry_get_id (GDATA_ENTRY (data->file1)));
+ g_assert (entry != NULL);
+ g_assert (GDATA_IS_PICASAWEB_FILE (entry));
+
+ assert_files_equal (GDATA_PICASAWEB_FILE (entry), data->file1, TRUE);
+
+ xml = gdata_parsable_get_xml (GDATA_PARSABLE (entry));
+ g_assert_cmpstr (xml, !=, NULL);
+ g_assert_cmpuint (strlen (xml), >, 0);
+ g_free (xml);
+}
+
+static void
+test_query_files (QueryFilesData *data, gconstpointer service)
+{
+ GDataFeed *photo_feed;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "query-files");
+
+ photo_feed = gdata_picasaweb_service_query_files (GDATA_PICASAWEB_SERVICE (service), data->album, NULL, NULL, NULL, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_FEED (photo_feed));
+ g_clear_error (&error);
+
+ _test_query_files (photo_feed, data);
+
+ g_object_unref (photo_feed);
+
+ uhm_server_end_trace (mock_server);
+}
+
+GDATA_ASYNC_CLOSURE_FUNCTIONS (query_files, QueryFilesData);
+
+/* Test that asynchronously querying for all photos in an album lists them correctly. */
+GDATA_ASYNC_TEST_FUNCTIONS (query_files, QueryFilesData,
+G_STMT_START {
+ gdata_picasaweb_service_query_files_async (GDATA_PICASAWEB_SERVICE (service), data->album, NULL, cancellable, NULL, NULL, NULL,
+ async_ready_callback, async_data);
+} G_STMT_END,
+G_STMT_START {
+ GDataFeed *photo_feed;
+
+ /* Get the photo feed */
+ photo_feed = gdata_service_query_finish (GDATA_SERVICE (obj), async_result, &error);
+
+ if (error == NULL) {
+ _test_query_files (photo_feed, data);
+ g_object_unref (photo_feed);
+ } else {
+ g_assert (photo_feed == NULL);
+ }
+} G_STMT_END);
+
+/* Test that the progress callbacks from gdata_picasaweb_service_query_files_async() are called correctly.
+ * We take a QueryFilesData so that we can guarantee the album and at least one file exists (since it's created in the setup function for
+ * QueryFilesData), but we don't use it much as we don't actually care about the specific files. */
+static void
+test_query_files_async_progress_closure (QueryFilesData *query_data, gconstpointer service)
+{
+ GDataAsyncProgressClosure *data = g_slice_new0 (GDataAsyncProgressClosure);
+
+ gdata_test_mock_server_start_trace (mock_server, "query-files-async-progress-closure");
+
+ data->main_loop = g_main_loop_new (NULL, TRUE);
+
+ gdata_picasaweb_service_query_files_async (GDATA_PICASAWEB_SERVICE (service), query_data->album, NULL, NULL,
+ (GDataQueryProgressCallback) gdata_test_async_progress_callback,
+ data, (GDestroyNotify) gdata_test_async_progress_closure_free,
+ (GAsyncReadyCallback) gdata_test_async_progress_finish_callback, data);
+
+ g_main_loop_run (data->main_loop);
+ g_main_loop_unref (data->main_loop);
+
+ /* Check that both callbacks were called exactly once */
+ g_assert_cmpuint (data->progress_destroy_notify_count, ==, 1);
+ g_assert_cmpuint (data->async_ready_notify_count, ==, 1);
+
+ g_slice_free (GDataAsyncProgressClosure, data);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_query_files_single (QueryFilesData *data, gconstpointer service)
+{
+ GDataEntry *file;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "query-files-single");
+
+ file = gdata_service_query_single_entry (GDATA_SERVICE (service), gdata_picasaweb_service_get_primary_authorization_domain (),
+ gdata_entry_get_id (GDATA_ENTRY (data->file1)), NULL, GDATA_TYPE_PICASAWEB_FILE, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_PICASAWEB_FILE (file));
+ g_clear_error (&error);
+
+ assert_files_equal (GDATA_PICASAWEB_FILE (file), data->file1, TRUE);
+
+ g_object_unref (file);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_download_thumbnails (QueryFilesData *data, gconstpointer service)
+{
+ GList *thumbnails, *node;
+ GDataPicasaWebFile *photo;
+ GDataMediaThumbnail *thumbnail;
+ GDataDownloadStream *download_stream;
+ gchar *destination_file_name, *destination_file_path;
+ GFile *destination_file;
+ GFileOutputStream *file_stream;
+ gssize transfer_size;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "download-thumbnails");
+
+ photo = GDATA_PICASAWEB_FILE (data->file3);
+
+ thumbnails = gdata_picasaweb_file_get_thumbnails (photo);
+ thumbnail = GDATA_MEDIA_THUMBNAIL (thumbnails->data);
+
+ /* Download a single thumbnail to a file for testing (in case we weren't compiled with GdkPixbuf support) */
+ download_stream = gdata_media_thumbnail_download (thumbnail, GDATA_SERVICE (service), NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_DOWNLOAD_STREAM (download_stream));
+
+ /* Prepare a file to write the data to */
+ destination_file_name = g_strdup_printf ("%s_thumbnail_%ux%u.jpg", gdata_picasaweb_file_get_id (photo),
+ gdata_media_thumbnail_get_width (thumbnail), gdata_media_thumbnail_get_height (thumbnail));
+ destination_file_path = g_build_filename (g_get_tmp_dir (), destination_file_name, NULL);
+ g_free (destination_file_name);
+ destination_file = g_file_new_for_path (destination_file_path);
+ g_free (destination_file_path);
+
+ /* Download the file */
+ file_stream = g_file_replace (destination_file, NULL, FALSE, G_FILE_CREATE_REPLACE_DESTINATION, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (G_IS_FILE_OUTPUT_STREAM (file_stream));
+
+ transfer_size = g_output_stream_splice (G_OUTPUT_STREAM (file_stream), G_INPUT_STREAM (download_stream),
+ G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, NULL, &error);
+ g_assert_no_error (error);
+ g_assert_cmpint (transfer_size, >, 0);
+
+ g_object_unref (file_stream);
+ g_object_unref (download_stream);
+
+ /* Delete the file (shouldn't cause the test to fail if this fails) */
+ g_file_delete (destination_file, NULL, NULL);
+ g_object_unref (destination_file);
+
+#ifdef HAVE_GDK_PIXBUF
+ /* Test downloading all thumbnails directly into GdkPixbufs, and check that they're all the correct size */
+ for (node = thumbnails; node != NULL; node = node->next) {
+ GdkPixbuf *pixbuf;
+
+ thumbnail = GDATA_MEDIA_THUMBNAIL (node->data);
+
+ /* FIXME. The mock server currently doesn't support binary data, so we can't get JPEG files
+ * from it. Hence, only perform the GdkPixbuf tests when running tests online. */
+ if (uhm_server_get_enable_online (mock_server) == FALSE) {
+ break;
+ }
+
+ /* Prepare a download stream */
+ download_stream = gdata_media_thumbnail_download (thumbnail, GDATA_SERVICE (service), NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_DOWNLOAD_STREAM (download_stream));
+
+ /* Download into a new GdkPixbuf */
+ pixbuf = gdk_pixbuf_new_from_stream (G_INPUT_STREAM (download_stream), NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDK_IS_PIXBUF (pixbuf));
+
+ g_object_unref (download_stream);
+
+ /* PicasaWeb reported the height of a thumbnail as a pixel too large once, but otherwise correct */
+ g_assert_cmpint (abs (gdk_pixbuf_get_width (pixbuf) - (gint) gdata_media_thumbnail_get_width (thumbnail)) , <=, 1);
+ g_assert_cmpint (abs (gdk_pixbuf_get_height (pixbuf) - (gint) gdata_media_thumbnail_get_height (thumbnail)) , <=, 1);
+
+ g_object_unref (pixbuf);
+ }
+#endif /* HAVE_GDK_PIXBUF */
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_download_photo (QueryFilesData *data, gconstpointer service)
+{
+ GList *media_contents;
+ GDataPicasaWebFile *photo;
+ GDataMediaContent *content;
+ GDataDownloadStream *download_stream;
+ gchar *destination_file_name, *destination_file_path;
+ GFile *destination_file;
+ GFileOutputStream *file_stream;
+ gssize transfer_size;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "download-photo");
+
+ photo = GDATA_PICASAWEB_FILE (data->file3);
+
+ media_contents = gdata_picasaweb_file_get_contents (photo);
+ g_assert_cmpint (g_list_length (media_contents), ==, 1);
+ content = GDATA_MEDIA_CONTENT (media_contents->data);
+
+ /* Prepare a download stream */
+ download_stream = gdata_media_content_download (content, GDATA_SERVICE (service), NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_DOWNLOAD_STREAM (download_stream));
+
+ /* Prepare a file to write the data to */
+ destination_file_name = g_strdup_printf ("%s.jpg", gdata_picasaweb_file_get_id (photo));
+ destination_file_path = g_build_filename (g_get_tmp_dir (), destination_file_name, NULL);
+ g_free (destination_file_name);
+ destination_file = g_file_new_for_path (destination_file_path);
+ g_free (destination_file_path);
+
+ /* Download the file */
+ file_stream = g_file_replace (destination_file, NULL, FALSE, G_FILE_CREATE_REPLACE_DESTINATION, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (G_IS_FILE_OUTPUT_STREAM (file_stream));
+
+ transfer_size = g_output_stream_splice (G_OUTPUT_STREAM (file_stream), G_INPUT_STREAM (download_stream),
+ G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, NULL, &error);
+ g_assert_no_error (error);
+ g_assert_cmpint (transfer_size, >, 0);
+
+ g_object_unref (file_stream);
+ g_object_unref (download_stream);
+
+ /* Delete the file (shouldn't cause the test to fail if this fails) */
+ g_file_delete (destination_file, NULL, NULL);
+ g_object_unref (destination_file);
+
+ uhm_server_end_trace (mock_server);
+}
+
+typedef struct {
+ GDataPicasaWebAlbum *album;
+ GDataPicasaWebAlbum *inserted_album;
+} InsertAlbumData;
+
+static void
+set_up_insert_album (InsertAlbumData *data, gconstpointer service)
+{
+ GTimeVal timestamp;
+
+ data->album = gdata_picasaweb_album_new (NULL);
+ g_assert (GDATA_IS_PICASAWEB_ALBUM (data->album));
+
+ gdata_entry_set_title (GDATA_ENTRY (data->album), "Thanksgiving photos");
+ gdata_entry_set_summary (GDATA_ENTRY (data->album), "Family photos of the feast!");
+ gdata_picasaweb_album_set_location (data->album, "Winnipeg, MN");
+
+ g_time_val_from_iso8601 ("2002-10-14T09:58:59.643554Z", ×tamp);
+ gdata_picasaweb_album_set_timestamp (data->album, (gint64) timestamp.tv_sec * 1000);
+}
+
+static void
+tear_down_insert_album (InsertAlbumData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "teardown-insert-album");
+
+ /* Clean up the evidence */
+ gdata_service_delete_entry (GDATA_SERVICE (service), gdata_picasaweb_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->inserted_album), NULL, NULL);
+
+ g_object_unref (data->album);
+ g_object_unref (data->inserted_album);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_insert_album (InsertAlbumData *data, gconstpointer service)
+{
+ GDataPicasaWebAlbum *inserted_album;
+ GDataFeed *album_feed;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "insert-album");
+
+ /* Insert the album synchronously */
+ inserted_album = gdata_picasaweb_service_insert_album (GDATA_PICASAWEB_SERVICE (service), data->album, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_PICASAWEB_ALBUM (inserted_album));
+ g_clear_error (&error);
+
+ data->inserted_album = g_object_ref (inserted_album);
+
+ /* Test that it returns what we gave */
+ assert_albums_equal (inserted_album, data->album, FALSE);
+
+ /* Test that the album is actually on the server */
+ album_feed = gdata_picasaweb_service_query_all_albums (GDATA_PICASAWEB_SERVICE (service), NULL, NULL, NULL, NULL, NULL, &error);
+ g_assert_no_error (error);
+
+ assert_albums_equal (GDATA_PICASAWEB_ALBUM (gdata_feed_look_up_entry (album_feed, gdata_entry_get_id (GDATA_ENTRY (inserted_album)))),
+ inserted_album, TRUE);
+
+ g_object_unref (album_feed);
+
+ g_object_unref (inserted_album);
+
+ uhm_server_end_trace (mock_server);
+}
+
+GDATA_ASYNC_CLOSURE_FUNCTIONS (insert_album, InsertAlbumData);
+
+GDATA_ASYNC_TEST_FUNCTIONS (insert_album, InsertAlbumData,
+G_STMT_START {
+ gdata_picasaweb_service_insert_album_async (GDATA_PICASAWEB_SERVICE (service), data->album, cancellable,
+ async_ready_callback, async_data);
+} G_STMT_END,
+G_STMT_START {
+ GDataEntry *entry;
+
+ entry = gdata_service_insert_entry_finish (GDATA_SERVICE (obj), async_result, &error);
+
+ if (error == NULL) {
+ g_assert (GDATA_IS_PICASAWEB_ALBUM (entry));
+
+ /* Test the album was uploaded correctly */
+ assert_albums_equal (GDATA_PICASAWEB_ALBUM (entry), data->album, FALSE);
+
+ data->inserted_album = GDATA_PICASAWEB_ALBUM (entry);
+ } else {
+ g_assert (entry == NULL);
+ }
+} G_STMT_END);
+
+typedef struct {
+ GDataPicasaWebAlbum *album1;
+ GDataPicasaWebAlbum *album2;
+ GDataPicasaWebAlbum *album3;
+ GDataPicasaWebAlbum *album4;
+} QueryAllAlbumsData;
+
+static void
+set_up_query_all_albums (QueryAllAlbumsData *data, gconstpointer service)
+{
+ GDataPicasaWebAlbum *album;
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-query-all-albums");
+
+ /* First album */
+ album = gdata_picasaweb_album_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (album), "Test album 1 for QueryAllAlbums");
+
+ data->album1 = gdata_picasaweb_service_insert_album (GDATA_PICASAWEB_SERVICE (service), album, NULL, NULL);
+ g_assert (data->album1 != NULL);
+
+ g_object_unref (album);
+
+ /* Second album */
+ album = gdata_picasaweb_album_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (album), "Test album 2 for QueryAllAlbums");
+
+ data->album2 = gdata_picasaweb_service_insert_album (GDATA_PICASAWEB_SERVICE (service), album, NULL, NULL);
+ g_assert (data->album2 != NULL);
+
+ g_object_unref (album);
+
+ /* Third album */
+ album = gdata_picasaweb_album_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (album), "Test album 3 for QueryAllAlbums");
+
+ data->album3 = gdata_picasaweb_service_insert_album (GDATA_PICASAWEB_SERVICE (service), album, NULL, NULL);
+ g_assert (data->album3 != NULL);
+
+ g_object_unref (album);
+
+ /* Fourth album */
+ album = gdata_picasaweb_album_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (album), "Test album 4 for QueryAllAlbums");
+
+ data->album4 = gdata_picasaweb_service_insert_album (GDATA_PICASAWEB_SERVICE (service), album, NULL, NULL);
+ g_assert (data->album4 != NULL);
+
+ g_object_unref (album);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+tear_down_query_all_albums (QueryAllAlbumsData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "teardown-query-all-albums");
+
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_picasaweb_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->album1), NULL, NULL) == TRUE);
+ g_object_unref (data->album1);
+
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_picasaweb_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->album2), NULL, NULL) == TRUE);
+ g_object_unref (data->album2);
+
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_picasaweb_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->album3), NULL, NULL) == TRUE);
+ g_object_unref (data->album3);
+
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_picasaweb_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->album4), NULL, NULL) == TRUE);
+ g_object_unref (data->album4);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_query_all_albums_bad_query (gconstpointer service)
+{
+ GDataQuery *query;
+ GDataFeed *album_feed;
+ GError *error = NULL;
+
+ /* Test a query with a "q" parameter; it should fail */
+ query = GDATA_QUERY (gdata_picasaweb_query_new ("foobar"));
+
+ album_feed = gdata_picasaweb_service_query_all_albums (GDATA_PICASAWEB_SERVICE (service), query, NULL, NULL, NULL, NULL, &error);
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_BAD_QUERY_PARAMETER);
+ g_assert (album_feed == NULL);
+ g_clear_error (&error);
+
+ g_object_unref (query);
+}
+
+static void
+test_query_all_albums_bad_query_with_limits (gconstpointer service)
+{
+ GDataQuery *query;
+ GDataFeed *album_feed;
+ GError *error = NULL;
+
+ /* Test a query with a "q" parameter; it should fail */
+ query = GDATA_QUERY (gdata_picasaweb_query_new_with_limits ("foobar", 1, 1));
+
+ album_feed = gdata_picasaweb_service_query_all_albums (GDATA_PICASAWEB_SERVICE (service), query, NULL, NULL, NULL, NULL, &error);
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_BAD_QUERY_PARAMETER);
+ g_assert (album_feed == NULL);
+ g_clear_error (&error);
+
+ g_object_unref (query);
+}
+
+/* Checks to perform on an album feed from test_query_all_albums() or test_query_all_albums_async(). */
+static void
+_test_query_all_albums (GDataFeed *album_feed, QueryAllAlbumsData *data)
+{
+ GDataEntry *entry;
+ gchar *xml;
+
+ g_assert (GDATA_IS_FEED (album_feed));
+
+ /* Check properties of the feed */
+ g_assert_cmpint (g_list_length (gdata_feed_get_entries (album_feed)), >=, 4);
+
+ g_assert_cmpstr (gdata_feed_get_title (album_feed), ==, "libgdata.picasaweb");
+ g_assert_cmpstr (gdata_feed_get_subtitle (album_feed), ==, NULL);
+ g_assert_cmpstr (gdata_feed_get_id (album_feed), ==, "https://picasaweb.google.com/data/feed/user/libgdata.picasaweb");
+ g_assert_cmpstr (gdata_feed_get_etag (album_feed), !=, NULL); /* this varies as albums change, e.g. when new images are uploaded */
+ g_assert_cmpstr (gdata_feed_get_icon (album_feed), !=, NULL); /* tested weakly because it changes fairly regularly */
+ g_assert_cmpuint (gdata_feed_get_items_per_page (album_feed), ==, 1000);
+ g_assert_cmpuint (gdata_feed_get_start_index (album_feed), ==, 1);
+ g_assert_cmpuint (gdata_feed_get_total_results (album_feed), >=, 4);
+
+ /* Test the first album */
+ entry = gdata_feed_look_up_entry (album_feed, gdata_entry_get_id (GDATA_ENTRY (data->album1)));
+ g_assert (entry != NULL);
+ g_assert (GDATA_IS_PICASAWEB_ALBUM (entry));
+
+ assert_albums_equal (GDATA_PICASAWEB_ALBUM (entry), data->album1, TRUE);
+
+ xml = gdata_parsable_get_xml (GDATA_PARSABLE (entry));
+ g_assert_cmpstr (xml, !=, NULL);
+ g_assert_cmpuint (strlen (xml), >, 0);
+ g_free (xml);
+}
+
+/* Test that synchronously querying for all albums lists them correctly. */
+static void
+test_query_all_albums (QueryAllAlbumsData *data, gconstpointer service)
+{
+ GDataFeed *album_feed;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "query-all-albums");
+
+ /* Try a proper query */
+ album_feed = gdata_picasaweb_service_query_all_albums (GDATA_PICASAWEB_SERVICE (service), NULL, NULL, NULL, NULL, NULL, &error);
+ g_assert_no_error (error);
+ g_clear_error (&error);
+
+ _test_query_all_albums (album_feed, data);
+
+ g_object_unref (album_feed);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_query_all_albums_with_limits (QueryAllAlbumsData *data, gconstpointer service)
+{
+ GDataQuery *query;
+ GDataFeed *album_feed_1, *album_feed_2;
+ GError *error = NULL;
+ GList *albums_1, *albums_2;
+
+ gdata_test_mock_server_start_trace (mock_server, "query-all-albums-with-limits");
+
+ /* Test that two queries starting at different indices don't return the same content */
+ query = GDATA_QUERY (gdata_picasaweb_query_new_with_limits (NULL, 1, 1));
+ album_feed_1 = gdata_picasaweb_service_query_all_albums (GDATA_PICASAWEB_SERVICE (service), query, NULL, NULL, NULL, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_FEED (album_feed_1));
+ albums_1 = gdata_feed_get_entries (album_feed_1);
+ g_object_unref (query);
+
+ query = GDATA_QUERY (gdata_picasaweb_query_new_with_limits (NULL, 2, 1));
+ album_feed_2 = gdata_picasaweb_service_query_all_albums (GDATA_PICASAWEB_SERVICE (service), query, NULL, NULL, NULL, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_FEED (album_feed_2));
+ albums_2 = gdata_feed_get_entries (album_feed_2);
+ g_object_unref (query);
+
+ g_assert_cmpint (g_list_length (albums_1), ==, 1);
+ g_assert_cmpint (g_list_length (albums_2), ==, 1);
+ g_assert (GDATA_IS_ENTRY (albums_1->data));
+ g_assert (GDATA_IS_ENTRY (albums_2->data));
+ g_assert_cmpstr (gdata_entry_get_title (GDATA_ENTRY (albums_1->data)), !=, gdata_entry_get_title (GDATA_ENTRY (albums_2->data)));
+
+ g_object_unref (album_feed_1);
+ g_object_unref (album_feed_2);
+
+ /* Test that we get at most as many results as we requested */
+ query = GDATA_QUERY (gdata_picasaweb_query_new_with_limits (NULL, 1, 3));
+ album_feed_1 = gdata_picasaweb_service_query_all_albums (GDATA_PICASAWEB_SERVICE (service), query, NULL, NULL, NULL, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_FEED (album_feed_1));
+ albums_1 = gdata_feed_get_entries (album_feed_1);
+ g_object_unref (query);
+
+ g_assert_cmpint (g_list_length (albums_1), ==, 3);
+
+ g_object_unref (album_feed_1);
+
+ uhm_server_end_trace (mock_server);
+}
+
+GDATA_ASYNC_CLOSURE_FUNCTIONS (query_all_albums, QueryAllAlbumsData);
+
+/* Test that asynchronously querying for all albums lists them correctly. */
+GDATA_ASYNC_TEST_FUNCTIONS (query_all_albums, QueryAllAlbumsData,
+G_STMT_START {
+ gdata_picasaweb_service_query_all_albums_async (GDATA_PICASAWEB_SERVICE (service), NULL, NULL, cancellable, NULL,
+ NULL, NULL, async_ready_callback, async_data);
+} G_STMT_END,
+G_STMT_START {
+ GDataFeed *album_feed;
+
+ /* Get the album feed */
+ album_feed = gdata_service_query_finish (GDATA_SERVICE (obj), async_result, &error);
+
+ if (error == NULL) {
+ _test_query_all_albums (album_feed, (QueryAllAlbumsData*) data);
+
+ g_object_unref (album_feed);
+ } else {
+ g_assert (album_feed == NULL);
+ }
+} G_STMT_END);
+
+/* Test that the progress callbacks from gdata_picasaweb_service_query_all_albums_async() are called correctly.
+ * We take a QueryAllAlbumsData so that we can guarantee at least one album exists (since it's created in the setup function for
+ * QueryAllAlbumsData), but we don't use it as we don't actually care about the specific album. */
+static void
+test_query_all_albums_async_progress_closure (QueryAllAlbumsData *unused_data, gconstpointer service)
+{
+ GDataAsyncProgressClosure *data = g_slice_new0 (GDataAsyncProgressClosure);
+
+ gdata_test_mock_server_start_trace (mock_server, "query-all-albums-async-progress-closure");
+
+ data->main_loop = g_main_loop_new (NULL, TRUE);
+
+ gdata_picasaweb_service_query_all_albums_async (GDATA_PICASAWEB_SERVICE (service), NULL, NULL, NULL,
+ (GDataQueryProgressCallback) gdata_test_async_progress_callback,
+ data, (GDestroyNotify) gdata_test_async_progress_closure_free,
+ (GAsyncReadyCallback) gdata_test_async_progress_finish_callback, data);
+
+ g_main_loop_run (data->main_loop);
+ g_main_loop_unref (data->main_loop);
+
+ /* Check that both callbacks were called exactly once */
+ g_assert_cmpuint (data->progress_destroy_notify_count, ==, 1);
+ g_assert_cmpuint (data->async_ready_notify_count, ==, 1);
+
+ g_slice_free (GDataAsyncProgressClosure, data);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+check_authenticated_user_details (GDataPicasaWebUser *user)
+{
+ g_assert (GDATA_IS_PICASAWEB_USER (user));
+
+ g_assert_cmpstr (gdata_picasaweb_user_get_user (user), ==, "libgdata.picasaweb");
+ g_assert_cmpstr (gdata_picasaweb_user_get_nickname (user), ==, "libgdata.picasaweb");
+ /* 15GiB: it'll be a beautiful day when this assert gets tripped */
+ g_assert_cmpint (gdata_picasaweb_user_get_quota_limit (user), ==, 16106127360);
+ g_assert_cmpint (gdata_picasaweb_user_get_quota_current (user), >=, 0);
+ /* now it's 1000, testing this weakly to avoid having to regularly update it */
+ g_assert_cmpint (gdata_picasaweb_user_get_max_photos_per_album (user), >, 0);
+ /* tested weakly to avoid having to update it regularly */
+ g_assert_cmpstr (gdata_picasaweb_user_get_thumbnail_uri (user), !=, NULL);
+}
+
+typedef struct {
+ QueryFilesData parent;
+ GDataPicasaWebComment *comment1;
+ GDataPicasaWebComment *comment2;
+ GDataPicasaWebComment *comment3;
+} QueryCommentsData;
+
+static void
+set_up_query_comments (QueryCommentsData *data, gconstpointer service)
+{
+ GDataPicasaWebComment *comment_;
+
+ /* Set up some test albums and files. */
+ set_up_query_files ((QueryFilesData*) data, service);
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-query-comments");
+
+ /* Insert four test comments on the first test file. */
+ comment_ = gdata_picasaweb_comment_new (NULL);
+ gdata_entry_set_content (GDATA_ENTRY (comment_), "Test comment 1.");
+ data->comment1 = GDATA_PICASAWEB_COMMENT (gdata_commentable_insert_comment (GDATA_COMMENTABLE (data->parent.file1), GDATA_SERVICE (service),
+ GDATA_COMMENT (comment_), NULL, NULL));
+ g_assert (GDATA_IS_PICASAWEB_COMMENT (data->comment1));
+ g_object_unref (comment_);
+
+ comment_ = gdata_picasaweb_comment_new (NULL);
+ gdata_entry_set_content (GDATA_ENTRY (comment_), "Test comment 2.");
+ data->comment2 = GDATA_PICASAWEB_COMMENT (gdata_commentable_insert_comment (GDATA_COMMENTABLE (data->parent.file1), GDATA_SERVICE (service),
+ GDATA_COMMENT (comment_), NULL, NULL));
+ g_assert (GDATA_IS_PICASAWEB_COMMENT (data->comment1));
+ g_object_unref (comment_);
+
+ comment_ = gdata_picasaweb_comment_new (NULL);
+ gdata_entry_set_content (GDATA_ENTRY (comment_), "Test comment 3.");
+ data->comment3 = GDATA_PICASAWEB_COMMENT (gdata_commentable_insert_comment (GDATA_COMMENTABLE (data->parent.file1), GDATA_SERVICE (service),
+ GDATA_COMMENT (comment_), NULL, NULL));
+ g_assert (GDATA_IS_PICASAWEB_COMMENT (data->comment1));
+ g_object_unref (comment_);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+tear_down_query_comments (QueryCommentsData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "teardown-query-comments");
+
+ /* Delete the test comments. */
+ if (data->comment1 != NULL) {
+ gdata_commentable_delete_comment (GDATA_COMMENTABLE (data->parent.file1), GDATA_SERVICE (service),
+ GDATA_COMMENT (data->comment1), NULL, NULL);
+ g_object_unref (data->comment1);
+ }
+
+ if (data->comment2 != NULL) {
+ gdata_commentable_delete_comment (GDATA_COMMENTABLE (data->parent.file1), GDATA_SERVICE (service),
+ GDATA_COMMENT (data->comment2), NULL, NULL);
+ g_object_unref (data->comment2);
+ }
+
+ if (data->comment3 != NULL) {
+ gdata_commentable_delete_comment (GDATA_COMMENTABLE (data->parent.file1), GDATA_SERVICE (service),
+ GDATA_COMMENT (data->comment3), NULL, NULL);
+ g_object_unref (data->comment3);
+ }
+
+ uhm_server_end_trace (mock_server);
+
+ /* Delete the test files and albums. */
+ tear_down_query_files ((QueryFilesData*) data, service);
+}
+
+static void
+assert_comments_feed (QueryCommentsData *data, GDataFeed *comments_feed)
+{
+ gboolean comment1_seen = FALSE, comment2_seen = FALSE, comment3_seen = FALSE;
+ GList *comments;
+
+ g_assert (GDATA_IS_FEED (comments_feed));
+ g_assert_cmpuint (g_list_length (gdata_feed_get_entries (comments_feed)), >=, 3);
+
+ for (comments = gdata_feed_get_entries (comments_feed); comments != NULL; comments = comments->next) {
+ GList *authors;
+ GDataPicasaWebComment *expected_comment, *actual_comment;
+
+ actual_comment = GDATA_PICASAWEB_COMMENT (comments->data);
+
+ if (strcmp (gdata_entry_get_id (GDATA_ENTRY (data->comment1)), gdata_entry_get_id (GDATA_ENTRY (actual_comment))) == 0) {
+ g_assert (comment1_seen == FALSE);
+ comment1_seen = TRUE;
+ expected_comment = data->comment1;
+ } else if (strcmp (gdata_entry_get_id (GDATA_ENTRY (data->comment2)), gdata_entry_get_id (GDATA_ENTRY (actual_comment))) == 0) {
+ g_assert (comment2_seen == FALSE);
+ comment2_seen = TRUE;
+ expected_comment = data->comment2;
+ } else if (strcmp (gdata_entry_get_id (GDATA_ENTRY (data->comment3)), gdata_entry_get_id (GDATA_ENTRY (actual_comment))) == 0) {
+ g_assert (comment3_seen == FALSE);
+ comment3_seen = TRUE;
+ expected_comment = data->comment3;
+ } else {
+ /* Unknown comment; we'll assume it's been added externally to the test suite. */
+ continue;
+ }
+
+ g_assert_cmpstr (gdata_entry_get_title (GDATA_ENTRY (actual_comment)), ==, gdata_entry_get_title (GDATA_ENTRY (expected_comment)));
+ g_assert_cmpstr (gdata_entry_get_content (GDATA_ENTRY (actual_comment)), ==, gdata_entry_get_content (GDATA_ENTRY (expected_comment)));
+
+ g_assert_cmpuint (g_list_length (gdata_entry_get_authors (GDATA_ENTRY (actual_comment))), >, 0);
+
+ for (authors = gdata_entry_get_authors (GDATA_ENTRY (actual_comment)); authors != NULL; authors = authors->next) {
+ GDataAuthor *author = GDATA_AUTHOR (authors->data);
+
+ /* We can't test these much. */
+ g_assert_cmpstr (gdata_author_get_name (author), !=, NULL);
+ g_assert_cmpstr (gdata_author_get_uri (author), !=, NULL);
+ }
+ }
+}
+
+static void
+test_comment_query (QueryCommentsData *data, gconstpointer service)
+{
+ GDataFeed *comments_feed;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "comment-query");
+
+ comments_feed = gdata_commentable_query_comments (GDATA_COMMENTABLE (data->parent.file1), GDATA_SERVICE (service), NULL, NULL, NULL, NULL,
+ &error);
+ g_assert_no_error (error);
+ g_clear_error (&error);
+
+ assert_comments_feed (data, comments_feed);
+
+ g_object_unref (comments_feed);
+
+ uhm_server_end_trace (mock_server);
+}
+
+GDATA_ASYNC_CLOSURE_FUNCTIONS (query_comments, QueryCommentsData);
+
+/* Test that asynchronously querying for all albums lists them correctly. */
+GDATA_ASYNC_TEST_FUNCTIONS (comment_query, QueryCommentsData,
+G_STMT_START {
+ gdata_commentable_query_comments_async (GDATA_COMMENTABLE (data->parent.file1), GDATA_SERVICE (service), NULL, cancellable, NULL, NULL, NULL,
+ async_ready_callback, async_data);
+} G_STMT_END,
+G_STMT_START {
+ GDataFeed *comments_feed;
+
+ /* Get the comments feed */
+ comments_feed = gdata_commentable_query_comments_finish (GDATA_COMMENTABLE (obj), async_result, &error);
+
+ if (error == NULL) {
+ assert_comments_feed (data, comments_feed);
+
+ g_object_unref (comments_feed);
+ } else {
+ g_assert (comments_feed == NULL);
+ }
+} G_STMT_END);
+
+/* Test that the progress callbacks from gdata_commentable_query_comments_async() are called correctly.
+ * We take a QueryCommentsData so that we can guarantee the file exists, but we don't use it much as we don't actually care about the specific
+ * file. */
+static void
+test_comment_query_async_progress_closure (QueryCommentsData *query_data, gconstpointer service)
+{
+ GDataAsyncProgressClosure *data = g_slice_new0 (GDataAsyncProgressClosure);
+
+ gdata_test_mock_server_start_trace (mock_server, "comment-query-async-progress-closure");
+
+ data->main_loop = g_main_loop_new (NULL, TRUE);
+
+ gdata_commentable_query_comments_async (GDATA_COMMENTABLE (query_data->parent.file1), GDATA_SERVICE (service), NULL, NULL,
+ (GDataQueryProgressCallback) gdata_test_async_progress_callback,
+ data, (GDestroyNotify) gdata_test_async_progress_closure_free,
+ (GAsyncReadyCallback) gdata_test_async_progress_finish_callback, data);
+
+ g_main_loop_run (data->main_loop);
+ g_main_loop_unref (data->main_loop);
+
+ /* Check that both callbacks were called exactly once */
+ g_assert_cmpuint (data->progress_destroy_notify_count, ==, 1);
+ g_assert_cmpuint (data->async_ready_notify_count, ==, 1);
+
+ g_slice_free (GDataAsyncProgressClosure, data);
+
+ uhm_server_end_trace (mock_server);
+}
+
+typedef struct {
+ QueryFilesData parent;
+ GDataPicasaWebComment *comment;
+ GDataPicasaWebComment *new_comment;
+} InsertCommentData;
+
+static void
+set_up_insert_comment (InsertCommentData *data, gconstpointer service)
+{
+ set_up_query_files ((QueryFilesData*) data, service);
+
+ /* Create a test comment to be inserted. */
+ data->comment = gdata_picasaweb_comment_new (NULL);
+ g_assert (GDATA_IS_PICASAWEB_COMMENT (data->comment));
+
+ gdata_entry_set_content (GDATA_ENTRY (data->comment), "This is a test comment.");
+
+ data->new_comment = NULL;
+}
+
+static void
+tear_down_insert_comment (InsertCommentData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "teardown-insert-comment");
+
+ /* Delete the inserted comment. */
+ if (data->new_comment != NULL) {
+ g_assert (gdata_commentable_delete_comment (GDATA_COMMENTABLE (data->parent.file1), GDATA_SERVICE (service),
+ GDATA_COMMENT (data->new_comment), NULL, NULL) == TRUE);
+ g_object_unref (data->new_comment);
+ }
+
+ if (data->comment != NULL) {
+ g_object_unref (data->comment);
+ }
+
+ uhm_server_end_trace (mock_server);
+
+ tear_down_query_files ((QueryFilesData*) data, service);
+}
+
+static void
+assert_comments_equal (GDataComment *new_comment, GDataPicasaWebComment *original_comment)
+{
+ GList *authors;
+ GDataAuthor *author;
+
+ g_assert (GDATA_IS_PICASAWEB_COMMENT (new_comment));
+ g_assert (GDATA_IS_PICASAWEB_COMMENT (original_comment));
+ g_assert (GDATA_PICASAWEB_COMMENT (new_comment) != original_comment);
+
+ g_assert_cmpstr (gdata_entry_get_content (GDATA_ENTRY (new_comment)), ==, gdata_entry_get_content (GDATA_ENTRY (original_comment)));
+
+ /* Check the author of the new comment. */
+ authors = gdata_entry_get_authors (GDATA_ENTRY (new_comment));
+ g_assert_cmpuint (g_list_length (authors), ==, 1);
+
+ author = GDATA_AUTHOR (authors->data);
+
+ g_assert_cmpstr (gdata_author_get_name (author), ==, "libgdata.picasaweb");
+ g_assert_cmpstr (gdata_author_get_uri (author), ==, "https://picasaweb.google.com/libgdata.picasaweb");
+}
+
+static void
+test_comment_insert (InsertCommentData *data, gconstpointer service)
+{
+ GDataComment *new_comment;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "comment-insert");
+
+ new_comment = gdata_commentable_insert_comment (GDATA_COMMENTABLE (data->parent.file1), GDATA_SERVICE (service), GDATA_COMMENT (data->comment),
+ NULL, &error);
+ g_assert_no_error (error);
+ g_clear_error (&error);
+
+ assert_comments_equal (new_comment, data->comment);
+
+ data->new_comment = GDATA_PICASAWEB_COMMENT (new_comment);
+
+ uhm_server_end_trace (mock_server);
+}
+
+GDATA_ASYNC_CLOSURE_FUNCTIONS (insert_comment, InsertCommentData);
+
+GDATA_ASYNC_TEST_FUNCTIONS (comment_insert, InsertCommentData,
+G_STMT_START {
+ gdata_commentable_insert_comment_async (GDATA_COMMENTABLE (data->parent.file1), GDATA_SERVICE (service),
+ GDATA_COMMENT (data->comment), cancellable, async_ready_callback, async_data);
+} G_STMT_END,
+G_STMT_START {
+ GDataComment *new_comment;
+
+ new_comment = gdata_commentable_insert_comment_finish (GDATA_COMMENTABLE (obj), async_result, &error);
+
+ if (error == NULL) {
+ assert_comments_equal (new_comment, data->comment);
+
+ data->new_comment = GDATA_PICASAWEB_COMMENT (new_comment);
+ } else {
+ g_assert (new_comment == NULL);
+ }
+} G_STMT_END);
+
+static void
+test_comment_delete (QueryCommentsData *data, gconstpointer service)
+{
+ gboolean success;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "comment-delete");
+
+ success = gdata_commentable_delete_comment (GDATA_COMMENTABLE (data->parent.file1), GDATA_SERVICE (service), GDATA_COMMENT (data->comment1),
+ NULL, &error);
+ g_assert_no_error (error);
+ g_assert (success == TRUE);
+ g_clear_error (&error);
+
+ g_object_unref (data->comment1);
+ data->comment1 = NULL;
+
+ uhm_server_end_trace (mock_server);
+}
+
+GDATA_ASYNC_TEST_FUNCTIONS (comment_delete, QueryCommentsData,
+G_STMT_START {
+ gdata_commentable_delete_comment_async (GDATA_COMMENTABLE (data->parent.file1), GDATA_SERVICE (service),
+ GDATA_COMMENT (data->comment1), cancellable, async_ready_callback, async_data);
+} G_STMT_END,
+G_STMT_START {
+ gboolean success;
+
+ success = gdata_commentable_delete_comment_finish (GDATA_COMMENTABLE (obj), async_result, &error);
+
+ if (error == NULL) {
+ g_assert (success == TRUE);
+
+ /* Prevent the closure tear down function from trying to delete the comment again */
+ g_object_unref (data->comment1);
+ data->comment1 = NULL;
+ } else {
+ g_assert (success == FALSE);
+
+ /* The server's naughty and often deletes comments even if the connection's closed prematurely (when we cancel the operation). In
+ * this case, it returns an error 400, which we sneakily hide. */
+ if (g_error_matches (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR) == TRUE &&
+ async_data->cancellation_timeout > 0) {
+ async_data->cancellation_successful = FALSE;
+ g_clear_error (&error);
+ }
+ }
+} G_STMT_END);
+
+static void
+test_query_user (gconstpointer service)
+{
+ GDataPicasaWebUser *user;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "query-user");
+
+ user = gdata_picasaweb_service_get_user (GDATA_PICASAWEB_SERVICE (service), NULL, NULL, &error);
+ g_assert_no_error (error);
+ g_clear_error (&error);
+
+ check_authenticated_user_details (user);
+
+ g_object_unref (user);
+
+ uhm_server_end_trace (mock_server);
+}
+
+/* Check that asynchronously querying for the currently authenticated user's details works and returns the correct details. */
+GDATA_ASYNC_TEST_FUNCTIONS (query_user, void,
+G_STMT_START {
+ gdata_picasaweb_service_get_user_async (GDATA_PICASAWEB_SERVICE (service), NULL, cancellable, async_ready_callback, async_data);
+} G_STMT_END,
+G_STMT_START {
+ GDataPicasaWebUser *user;
+
+ user = gdata_picasaweb_service_get_user_finish (GDATA_PICASAWEB_SERVICE (obj), async_result, &error);
+
+ if (error == NULL) {
+ check_authenticated_user_details (user);
+
+ g_object_unref (user);
+ } else {
+ g_assert (user == NULL);
+ }
+} G_STMT_END);
+
+/* Check that querying for a user other than the currently authenticated user, asynchronously, gives us an appropriate result. This result should,
+ * for example, not contain any private information about the queried user. (That's a server-side consideration, but libgdata has to handle the
+ * lack of information correctly.) */
+GDATA_ASYNC_TEST_FUNCTIONS (query_user_by_username, void,
+G_STMT_START {
+ gdata_picasaweb_service_get_user_async (GDATA_PICASAWEB_SERVICE (service), "philip.withnall", cancellable, async_ready_callback, async_data);
+} G_STMT_END,
+G_STMT_START {
+ GDataPicasaWebUser *user;
+
+ user = gdata_picasaweb_service_get_user_finish (GDATA_PICASAWEB_SERVICE (obj), async_result, &error);
+
+ if (error == NULL) {
+ g_assert (GDATA_IS_PICASAWEB_USER (user));
+
+ g_assert_cmpstr (gdata_picasaweb_user_get_user (user), ==, "104200312198892774147");
+ g_assert_cmpstr (gdata_picasaweb_user_get_nickname (user), ==, "Philip Withnall");
+ g_assert_cmpint (gdata_picasaweb_user_get_quota_limit (user), ==, -1); /* not the logged in user */
+ g_assert_cmpint (gdata_picasaweb_user_get_quota_current (user), ==, -1); /* not the logged in user */
+ g_assert_cmpint (gdata_picasaweb_user_get_max_photos_per_album (user), ==, -1); /* not the logged in user */
+ /* tested weakly to avoid having to update it regularly */
+ g_assert_cmpstr (gdata_picasaweb_user_get_thumbnail_uri (user), !=, NULL);
+
+ g_object_unref (user);
+ } else {
+ g_assert (user == NULL);
+ }
+} G_STMT_END);
+
+typedef struct {
+ GDataPicasaWebService *service;
+ GDataPicasaWebFile *photo;
+ GDataPicasaWebFile *updated_photo;
+ GFile *photo_file;
+ gchar *slug;
+ gchar *content_type;
+ GFileInputStream *file_stream;
+} UploadData;
+
+static void
+set_up_upload (UploadData *data, gconstpointer service)
+{
+ GFileInfo *file_info;
+ const gchar * const tags[] = { "foo", "bar", ",,baz,baz", NULL };
+ gchar *path = NULL;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-upload");
+
+ data->service = g_object_ref ((gpointer) service);
+
+ /* Build the photo */
+ data->photo = gdata_picasaweb_file_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (data->photo), "Photo Entry Title");
+ gdata_picasaweb_file_set_caption (data->photo, "Photo Summary");
+ gdata_picasaweb_file_set_tags (data->photo, tags);
+ gdata_picasaweb_file_set_coordinates (data->photo, 17.127, -110.35);
+
+ /* File is public domain: http://en.wikipedia.org/wiki/File:German_garden_gnome_cropped.jpg */
+ path = g_test_build_filename (G_TEST_DIST, "photo.jpg", NULL);
+ data->photo_file = g_file_new_for_path (path);
+ g_free (path);
+
+ /* Get the file's info */
+ file_info = g_file_query_info (data->photo_file, G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME "," G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
+ G_FILE_QUERY_INFO_NONE, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (G_IS_FILE_INFO (file_info));
+
+ data->slug = g_strdup (g_file_info_get_display_name (file_info));
+ data->content_type = g_strdup (g_file_info_get_content_type (file_info));
+
+ g_object_unref (file_info);
+
+ /* Get an input stream for the file */
+ data->file_stream = g_file_read (data->photo_file, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (G_IS_FILE_INPUT_STREAM (data->file_stream));
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+tear_down_upload (UploadData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "teardown-upload");
+
+ /* Delete the uploaded photo (don't worry if this fails) */
+ if (data->updated_photo != NULL) {
+ gdata_service_delete_entry (GDATA_SERVICE (service), gdata_picasaweb_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->updated_photo), NULL, NULL);
+ g_object_unref (data->updated_photo);
+ }
+
+ g_object_unref (data->photo);
+ g_object_unref (data->photo_file);
+ g_free (data->slug);
+ g_free (data->content_type);
+ g_object_unref (data->file_stream);
+ g_object_unref (data->service);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_upload_default_album (UploadData *data, gconstpointer service)
+{
+ GDataUploadStream *upload_stream;
+ const gchar * const *tags, * const *tags2;
+ gssize transfer_size;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "upload-default-album");
+
+ /* Prepare the upload stream */
+ /* TODO right now, it will just go to the default album, we want an uploading one :| */
+ upload_stream = gdata_picasaweb_service_upload_file (GDATA_PICASAWEB_SERVICE (service), NULL, data->photo, data->slug, data->content_type,
+ NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_UPLOAD_STREAM (upload_stream));
+
+ /* Upload the photo */
+ transfer_size = g_output_stream_splice (G_OUTPUT_STREAM (upload_stream), G_INPUT_STREAM (data->file_stream),
+ G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, NULL, &error);
+ g_assert_no_error (error);
+ g_assert_cmpint (transfer_size, >, 0);
+
+ /* Finish off the upload */
+ data->updated_photo = gdata_picasaweb_service_finish_file_upload (GDATA_PICASAWEB_SERVICE (service), upload_stream, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_PICASAWEB_FILE (data->updated_photo));
+
+ /* Check the photo's properties */
+ g_assert (gdata_entry_is_inserted (GDATA_ENTRY (data->updated_photo)));
+ g_assert_cmpstr (gdata_entry_get_title (GDATA_ENTRY (data->updated_photo)), ==, gdata_entry_get_title (GDATA_ENTRY (data->photo)));
+ g_assert_cmpstr (gdata_picasaweb_file_get_caption (data->updated_photo), ==, gdata_picasaweb_file_get_caption (data->photo));
+
+ tags = gdata_picasaweb_file_get_tags (data->photo);
+ tags2 = gdata_picasaweb_file_get_tags (data->updated_photo);
+ g_assert_cmpuint (g_strv_length ((gchar**) tags2), ==, g_strv_length ((gchar**) tags));
+ g_assert_cmpstr (tags2[0], ==, tags[0]);
+ g_assert_cmpstr (tags2[1], ==, tags[1]);
+ g_assert_cmpstr (tags2[2], ==, tags[2]);
+
+ uhm_server_end_trace (mock_server);
+}
+
+#if 0
+FIXME: Port to v3 API and re-enable.
+GDATA_ASYNC_CLOSURE_FUNCTIONS (upload, UploadData);
+
+GDATA_ASYNC_TEST_FUNCTIONS (upload_default_album, UploadData,
+G_STMT_START {
+ GDataUploadStream *upload_stream;
+ GError *error = NULL;
+
+ /* Prepare the upload stream */
+ upload_stream = gdata_picasaweb_service_upload_file (GDATA_PICASAWEB_SERVICE (service), NULL, data->photo, data->slug,
+ data->content_type, cancellable, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_UPLOAD_STREAM (upload_stream));
+
+ /* Upload the photo asynchronously */
+ g_output_stream_splice_async (G_OUTPUT_STREAM (upload_stream), G_INPUT_STREAM (data->file_stream),
+ G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, G_PRIORITY_DEFAULT, NULL,
+ async_ready_callback, async_data);
+
+ g_object_unref (upload_stream);
+
+ /* Reset the input stream to the beginning. */
+ g_assert (g_seekable_seek (G_SEEKABLE (data->file_stream), 0, G_SEEK_SET, NULL, NULL) == TRUE);
+} G_STMT_END,
+G_STMT_START {
+ GOutputStream *stream = G_OUTPUT_STREAM (obj);
+ const gchar * const *tags;
+ const gchar * const *tags2;
+ gssize transfer_size;
+ GError *upload_error = NULL;
+
+ /* Finish off the transfer */
+ transfer_size = g_output_stream_splice_finish (stream, async_result, &error);
+
+ if (error == NULL) {
+ g_assert_cmpint (transfer_size, >, 0);
+
+ /* Finish off the upload */
+ data->updated_photo = gdata_picasaweb_service_finish_file_upload (data->service, GDATA_UPLOAD_STREAM (stream), &upload_error);
+ g_assert_no_error (upload_error);
+ g_assert (GDATA_IS_PICASAWEB_FILE (data->updated_photo));
+
+ /* Check the photo's properties */
+ g_assert (gdata_entry_is_inserted (GDATA_ENTRY (data->updated_photo)));
+ g_assert_cmpstr (gdata_entry_get_title (GDATA_ENTRY (data->updated_photo)), ==, gdata_entry_get_title (GDATA_ENTRY (data->photo)));
+ g_assert_cmpstr (gdata_picasaweb_file_get_caption (data->updated_photo), ==, gdata_picasaweb_file_get_caption (data->photo));
+
+ tags = gdata_picasaweb_file_get_tags (data->photo);
+ tags2 = gdata_picasaweb_file_get_tags (data->updated_photo);
+ g_assert_cmpuint (g_strv_length ((gchar**) tags2), ==, g_strv_length ((gchar**) tags));
+ g_assert_cmpstr (tags2[0], ==, tags[0]);
+ g_assert_cmpstr (tags2[1], ==, tags[1]);
+ g_assert_cmpstr (tags2[2], ==, tags[2]);
+ } else {
+ g_assert_cmpint (transfer_size, ==, -1);
+
+ /* Finish off the upload */
+ data->updated_photo = gdata_picasaweb_service_finish_file_upload (data->service, GDATA_UPLOAD_STREAM (stream), &upload_error);
+ g_assert_no_error (upload_error);
+ g_assert (data->updated_photo == NULL);
+ }
+
+ g_clear_error (&upload_error);
+} G_STMT_END);
+#endif
+
+static void
+test_album_new (void)
+{
+ GDataPicasaWebAlbum *album;
+ gchar *xml, *parsed_time_str;
+ GRegex *regex;
+ GMatchInfo *match_info;
+ gint64 delta;
+ GTimeVal timeval;
+
+ g_test_bug ("598893");
+
+ /* Get the current time */
+ g_get_current_time (&timeval);
+
+ /* Build a regex to match the timestamp from the XML, since we can't definitely say what it'll be. Note that we also assign any order to the
+ * namespace definitions, since due to a change in GLib's hashing algorithm, they could be in different orders with different GLib versions. */
+ regex = g_regex_new ("<entry (xmlns='http://www.w3.org/2005/Atom' ?|"
+ "xmlns:gphoto='http://schemas.google.com/photos/2007' ?|"
+ "xmlns:media='http://search.yahoo.com/mrss/' ?|"
+ "xmlns:gd='http://schemas.google.com/g/2005' ?|"
+ "xmlns:gml='http://www.opengis.net/gml' ?|"
+ "xmlns:app='http://www.w3.org/2007/app' ?|"
+ "xmlns:georss='http://www.georss.org/georss' ?){7}>"
+ "<title type='text'></title>"
+ "<id>http://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5328889949261497249</id>"
+ "<rights>private</rights>"
+ "<category term='http://schemas.google.com/photos/2007#album' "
+ "scheme='http://schemas.google.com/g/2005#kind'/>"
+ "<gphoto:id>5328889949261497249</gphoto:id>"
+ "<gphoto:access>private</gphoto:access>"
+ "<gphoto:timestamp>([0-9]+)</gphoto:timestamp>"
+ "<gphoto:commentingEnabled>false</gphoto:commentingEnabled>"
+ "<media:group/>"
+ "</entry>", 0, 0, NULL);
+
+ /* Build the album */
+ album = gdata_picasaweb_album_new ("http://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5328889949261497249");
+ g_assert (GDATA_IS_PICASAWEB_ALBUM (album));
+
+ /* Check the XML: match it against the regex built above, then check that the timestamp is within 100ms of the current time at the start of
+ * the test function. We can't check it exactly, as a few milliseconds may have passed between building the expected XML and building the XML
+ * for the photo. */
+ xml = gdata_parsable_get_xml (GDATA_PARSABLE (album));
+ g_assert (g_regex_match (regex, xml, 0, &match_info) == TRUE);
+ parsed_time_str = g_match_info_fetch (match_info, 2);
+ delta = g_ascii_strtoull (parsed_time_str, NULL, 10) - (((guint64) timeval.tv_sec) * 1000 + ((guint64) timeval.tv_usec) / 1000);
+ g_assert_cmpuint (ABS (delta), <, 1000);
+
+ g_free (parsed_time_str);
+ g_free (xml);
+ g_regex_unref (regex);
+ g_match_info_free (match_info);
+ g_object_unref (album);
+}
+
+static void
+test_album_escaping (void)
+{
+ GDataPicasaWebAlbum *album;
+ GError *error = NULL;
+ const gchar * const tags[] = { "<tag1>", "tag2 & stuff, things", NULL };
+
+ /* We have to create the album this way so that the album ID is set */
+ album = GDATA_PICASAWEB_ALBUM (gdata_parsable_new_from_xml (GDATA_TYPE_PICASAWEB_ALBUM,
+ "<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gphoto='http://schemas.google.com/photos/2007'>"
+ "<title type='text'></title>"
+ "<category term='http://schemas.google.com/photos/2007#album' scheme='http://schemas.google.com/g/2005#kind'/>"
+ "<gphoto:id><id></gphoto:id>"
+ "</entry>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_PICASAWEB_ALBUM (album));
+ g_clear_error (&error);
+
+ /* Set other properties */
+ gdata_picasaweb_album_set_location (album, "Everywhere & nowhere");
+ gdata_picasaweb_album_set_tags (album, tags);
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (album,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gphoto='http://schemas.google.com/photos/2007' "
+ "xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:gml='http://www.opengis.net/gml' xmlns:app='http://www.w3.org/2007/app' "
+ "xmlns:georss='http://www.georss.org/georss'>"
+ "<title type='text'></title>"
+ "<rights>private</rights>"
+ "<category term='http://schemas.google.com/photos/2007#album' scheme='http://schemas.google.com/g/2005#kind'/>"
+ "<gphoto:id><id></gphoto:id>"
+ "<gphoto:location>Everywhere & nowhere</gphoto:location>"
+ "<gphoto:access>private</gphoto:access>"
+ "<gphoto:commentingEnabled>false</gphoto:commentingEnabled>"
+ "<media:group><media:keywords><tag1>,tag2 & stuff%2C things</media:keywords></media:group>"
+ "</entry>");
+ g_object_unref (album);
+}
+
+static void
+test_album_properties_coordinates (void)
+{
+ GDataPicasaWebAlbum *album;
+ gdouble latitude, longitude, original_latitude, original_longitude;
+
+ /* Create a new album to test against */
+ album = gdata_picasaweb_album_new (NULL);
+ gdata_picasaweb_album_set_coordinates (album, 45.434336, 12.338784);
+
+ /* Getting the coordinates */
+ gdata_picasaweb_album_get_coordinates (album, &latitude, &longitude);
+ g_assert_cmpfloat (latitude, ==, 45.434336);
+ gdata_picasaweb_album_get_coordinates (album, &original_latitude, &original_longitude);
+ g_assert_cmpfloat (original_latitude, ==, 45.434336);
+ g_assert_cmpfloat (original_longitude, ==, 12.338784);
+
+ /* Providing NULL to either or both parameters */
+ gdata_picasaweb_album_get_coordinates (album, NULL, &longitude);
+ g_assert_cmpfloat (longitude, ==, 12.338784);
+ gdata_picasaweb_album_get_coordinates (album, &latitude, NULL);
+ g_assert_cmpfloat (latitude, ==, 45.434336);
+ gdata_picasaweb_album_get_coordinates (album, NULL, NULL);
+
+ /* Setting the coordinates */
+ gdata_picasaweb_album_set_coordinates (album, original_longitude, original_latitude);
+ gdata_picasaweb_album_get_coordinates (album, &latitude, &longitude);
+ g_assert_cmpfloat (latitude, ==, original_longitude);
+ g_assert_cmpfloat (longitude, ==, original_latitude);
+ gdata_picasaweb_album_set_coordinates (album, original_latitude, original_longitude);
+ gdata_picasaweb_album_get_coordinates (album, &original_latitude, &original_longitude);
+ g_assert_cmpfloat (original_latitude, ==, 45.434336);
+ g_assert_cmpfloat (original_longitude, ==, 12.338784);
+
+ g_object_unref (album);
+}
+
+static void
+test_album_properties_visibility (void)
+{
+ GDataPicasaWebAlbum *album;
+ gchar *original_rights;
+
+ /* Create a test album */
+ album = gdata_picasaweb_album_new (NULL);
+
+ /* Test visibility and its synchronisation with its GDataEntry's rights */
+ original_rights = g_strdup (gdata_entry_get_rights (GDATA_ENTRY (album)));
+
+ gdata_entry_set_rights (GDATA_ENTRY (album), "private");
+ g_assert_cmpstr (gdata_entry_get_rights (GDATA_ENTRY (album)), ==, "private");
+ g_assert_cmpint (gdata_picasaweb_album_get_visibility (album), ==, GDATA_PICASAWEB_PRIVATE);
+
+ gdata_entry_set_rights (GDATA_ENTRY (album), "public");
+ g_assert_cmpstr (gdata_entry_get_rights (GDATA_ENTRY (album)), ==, "public");
+ g_assert_cmpint (gdata_picasaweb_album_get_visibility (album), ==, GDATA_PICASAWEB_PUBLIC);
+
+ gdata_picasaweb_album_set_visibility (album, GDATA_PICASAWEB_PRIVATE);
+ g_assert_cmpstr (gdata_entry_get_rights (GDATA_ENTRY (album)), ==, "private");
+ g_assert_cmpint (gdata_picasaweb_album_get_visibility (album), ==, GDATA_PICASAWEB_PRIVATE);
+
+ gdata_picasaweb_album_set_visibility (album, GDATA_PICASAWEB_PUBLIC);
+ g_assert_cmpstr (gdata_entry_get_rights (GDATA_ENTRY (album)), ==, "public");
+ g_assert_cmpint (gdata_picasaweb_album_get_visibility (album), ==, GDATA_PICASAWEB_PUBLIC);
+
+ gdata_entry_set_rights (GDATA_ENTRY (album), original_rights);
+ g_free (original_rights);
+
+ g_object_unref (album);
+}
+
+static void
+test_file_escaping (void)
+{
+ GDataPicasaWebFile *file;
+ GError *error = NULL;
+ const gchar * const tags[] = { "<tag1>", "tag2 & stuff, things", NULL };
+
+ /* We have to create the file this way so that the photo ID and version are set */
+ file = GDATA_PICASAWEB_FILE (gdata_parsable_new_from_xml (GDATA_TYPE_PICASAWEB_FILE,
+ "<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gphoto='http://schemas.google.com/photos/2007'>"
+ "<title type='text'></title>"
+ "<category term='http://schemas.google.com/photos/2007#photo' scheme='http://schemas.google.com/g/2005#kind'/>"
+ "<gphoto:id><id></gphoto:id>"
+ "<gphoto:imageVersion><version></gphoto:imageVersion>"
+ "</entry>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_PICASAWEB_FILE (file));
+ g_clear_error (&error);
+
+ /* Set other properties */
+ gdata_picasaweb_file_set_album_id (file, "http://foo.com?foo&bar");
+ gdata_picasaweb_file_set_checksum (file, "<checksum>");
+ gdata_picasaweb_file_set_tags (file, tags);
+ gdata_picasaweb_file_set_caption (file, "Caption & stuff.");
+
+ /* Check the outputted XML is escaped properly */
+ gdata_test_assert_xml (file,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gphoto='http://schemas.google.com/photos/2007' "
+ "xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' "
+ "xmlns:exif='http://schemas.google.com/photos/exif/2007' xmlns:app='http://www.w3.org/2007/app' "
+ "xmlns:georss='http://www.georss.org/georss' xmlns:gml='http://www.opengis.net/gml'>"
+ "<title type='text'></title>"
+ "<summary type='text'>Caption & stuff.</summary>"
+ "<category term='http://schemas.google.com/photos/2007#photo' scheme='http://schemas.google.com/g/2005#kind'/>"
+ "<gphoto:id><id></gphoto:id>"
+ "<gphoto:imageVersion><version></gphoto:imageVersion>"
+ "<gphoto:albumid>http://foo.com?foo&bar</gphoto:albumid>"
+ "<gphoto:checksum><checksum></gphoto:checksum>"
+ "<gphoto:commentingEnabled>true</gphoto:commentingEnabled>"
+ "<media:group>"
+ "<media:description type='plain'>Caption & stuff.</media:description>"
+ "<media:keywords><tag1>,tag2 & stuff%2C things</media:keywords>"
+ "</media:group>"
+ "</entry>");
+ g_object_unref (file);
+}
+
+static void
+test_file_properties_coordinates (void)
+{
+ GDataPicasaWebFile *file;
+ gdouble latitude, longitude, original_latitude, original_longitude;
+
+ /* Create a new file to test against */
+ file = gdata_picasaweb_file_new (NULL);
+ gdata_picasaweb_file_set_coordinates (file, 45.4341173, 12.1289062);
+
+ /* Getting the coordinates */
+ gdata_picasaweb_file_get_coordinates (file, &original_latitude, &original_longitude);
+ g_assert_cmpfloat (original_latitude, ==, 45.4341173);
+ g_assert_cmpfloat (original_longitude, ==, 12.1289062);
+
+ /* Providing NULL to either or both parameters */
+ gdata_picasaweb_file_get_coordinates (file, NULL, &longitude);
+ g_assert_cmpfloat (longitude, ==, 12.1289062);
+ gdata_picasaweb_file_get_coordinates (file, &latitude, NULL);
+ g_assert_cmpfloat (latitude, ==, 45.4341173);
+ gdata_picasaweb_file_get_coordinates (file, NULL, NULL);
+
+ /* Setting the coordinates */
+ gdata_picasaweb_file_set_coordinates (file, original_longitude, original_latitude);
+ gdata_picasaweb_file_get_coordinates (file, &latitude, &longitude);
+ g_assert_cmpfloat (latitude, ==, original_longitude);
+ g_assert_cmpfloat (longitude, ==, original_latitude);
+ gdata_picasaweb_file_set_coordinates (file, original_latitude, original_longitude);
+ gdata_picasaweb_file_get_coordinates (file, &latitude, &longitude);
+ g_assert_cmpfloat (latitude, ==, 45.4341173);
+ g_assert_cmpfloat (longitude, ==, 12.1289062);
+
+ g_object_unref (file);
+}
+
+static void
+test_comment_get_xml (void)
+{
+ GDataPicasaWebComment *comment_;
+
+ comment_ = gdata_picasaweb_comment_new (NULL);
+ gdata_entry_set_content (GDATA_ENTRY (comment_), "This is a comment with <markup> & stüff.");
+
+ /* Check the outputted XML is OK */
+ gdata_test_assert_xml (comment_,
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'>"
+ "<title type='text'></title>"
+ "<content type='text'>This is a comment with <markup> & stüff.</content>"
+ "<category term='http://schemas.google.com/photos/2007#comment' scheme='http://schemas.google.com/g/2005#kind'/>"
+ "</entry>");
+
+ g_object_unref (comment_);
+}
+
+static void
+test_query_etag (void)
+{
+ GDataPicasaWebQuery *query = gdata_picasaweb_query_new (NULL);
+
+ /* Test that setting any property will unset the ETag */
+ g_test_bug ("613529");
+
+#define CHECK_ETAG(C) \
+ gdata_query_set_etag (GDATA_QUERY (query), "foobar"); \
+ (C); \
+ g_assert (gdata_query_get_etag (GDATA_QUERY (query)) == NULL);
+
+ CHECK_ETAG (gdata_picasaweb_query_set_visibility (query, GDATA_PICASAWEB_PUBLIC))
+ CHECK_ETAG (gdata_picasaweb_query_set_thumbnail_size (query, "500x430"))
+ CHECK_ETAG (gdata_picasaweb_query_set_image_size (query, "1024x768"))
+ CHECK_ETAG (gdata_picasaweb_query_set_tag (query, "tag"))
+ CHECK_ETAG (gdata_picasaweb_query_set_bounding_box (query, 0.0, 1.0, 20.0, 12.5))
+ CHECK_ETAG (gdata_picasaweb_query_set_location (query, "Somewhere near here"))
+
+#undef CHECK_ETAG
+
+ g_object_unref (query);
+}
+
+/* TODO: test private, public albums, test uploading */
+/* TODO: add queries to update albums, files on the server; test those */
+
+static void
+mock_server_notify_resolver_cb (GObject *object, GParamSpec *pspec, gpointer user_data)
+{
+ UhmServer *server;
+ UhmResolver *resolver;
+
+ server = UHM_SERVER (object);
+
+ /* Set up the expected domain names here. This should technically be split up between
+ * the different unit test suites, but that's too much effort. */
+ resolver = uhm_server_get_resolver (server);
+
+ if (resolver != NULL) {
+ const gchar *ip_address = uhm_server_get_address (server);
+
+ uhm_resolver_add_A (resolver, "www.google.com", ip_address);
+ uhm_resolver_add_A (resolver, "picasaweb.google.com", ip_address);
+ uhm_resolver_add_A (resolver, "lh3.googleusercontent.com", ip_address);
+ uhm_resolver_add_A (resolver, "lh5.googleusercontent.com", ip_address);
+ uhm_resolver_add_A (resolver, "lh6.googleusercontent.com", ip_address);
+ }
+}
+
+/* Set up a global GDataAuthorizer to be used for all the tests. Unfortunately,
+ * the Google PicasaWeb API is limited to OAuth1 and OAuth2 authorisation, so
+ * this requires user interaction when online.
+ *
+ * If not online, use a dummy authoriser. */
+static GDataAuthorizer *
+create_global_authorizer (void)
+{
+ GDataOAuth2Authorizer *authorizer = NULL; /* owned */
+ gchar *authentication_uri, *authorisation_code;
+ GError *error = NULL;
+
+ /* If not online, just return a dummy authoriser. */
+ if (!uhm_server_get_enable_online (mock_server)) {
+ return GDATA_AUTHORIZER (gdata_dummy_authorizer_new (GDATA_TYPE_PICASAWEB_SERVICE));
+ }
+
+ /* Otherwise, go through the interactive OAuth dance. */
+ gdata_test_mock_server_start_trace (mock_server, "global-authentication");
+ authorizer = gdata_oauth2_authorizer_new (CLIENT_ID, CLIENT_SECRET,
+ REDIRECT_URI,
+ GDATA_TYPE_PICASAWEB_SERVICE);
+
+ /* Get an authentication URI */
+ authentication_uri = gdata_oauth2_authorizer_build_authentication_uri (authorizer, NULL, FALSE);
+ g_assert (authentication_uri != NULL);
+
+ /* Get the authorisation code off the user. */
+ authorisation_code = gdata_test_query_user_for_verifier (authentication_uri);
+
+ g_free (authentication_uri);
+
+ if (authorisation_code == NULL) {
+ /* Skip tests. */
+ g_object_unref (authorizer);
+ authorizer = NULL;
+ goto skip_test;
+ }
+
+ /* Authorise the token */
+ g_assert (gdata_oauth2_authorizer_request_authorization (authorizer, authorisation_code, NULL, &error));
+ g_assert_no_error (error);
+
+skip_test:
+ g_free (authorisation_code);
+
+ uhm_server_end_trace (mock_server);
+
+ return GDATA_AUTHORIZER (authorizer);
+}
+
+int
+main (int argc, char *argv[])
+{
+ gint retval;
+ GDataAuthorizer *authorizer = NULL;
+ GDataService *service = NULL;
+ GFile *trace_directory;
+ gchar *path = NULL;
+
+ gdata_test_init (argc, argv);
+
+ mock_server = gdata_test_get_mock_server ();
+ g_signal_connect (G_OBJECT (mock_server), "notify::resolver", (GCallback) mock_server_notify_resolver_cb, NULL);
+ path = g_test_build_filename (G_TEST_DIST, "traces/picasaweb", NULL);
+ trace_directory = g_file_new_for_path (path);
+ g_free (path);
+ uhm_server_set_trace_directory (mock_server, trace_directory);
+ g_object_unref (trace_directory);
+
+ authorizer = create_global_authorizer ();
+
+ service = GDATA_SERVICE (gdata_picasaweb_service_new (authorizer));
+
+ g_test_add_func ("/picasaweb/authentication", test_authentication);
+
+ g_test_add ("/picasaweb/query/all_albums", QueryAllAlbumsData, service, set_up_query_all_albums, test_query_all_albums,
+ tear_down_query_all_albums);
+ g_test_add ("/picasaweb/query/all_albums/with_limits", QueryAllAlbumsData, service, set_up_query_all_albums,
+ test_query_all_albums_with_limits, tear_down_query_all_albums);
+ g_test_add ("/picasaweb/query/all_albums/async", GDataAsyncTestData, service, set_up_query_all_albums_async,
+ test_query_all_albums_async, tear_down_query_all_albums_async);
+ g_test_add ("/picasaweb/query/all_albums/async/progress_closure", QueryAllAlbumsData, service, set_up_query_all_albums,
+ test_query_all_albums_async_progress_closure, tear_down_query_all_albums);
+ g_test_add ("/picasaweb/query/all_albums/async/cancellation", GDataAsyncTestData, service, set_up_query_all_albums_async,
+ test_query_all_albums_async_cancellation, tear_down_query_all_albums_async);
+ g_test_add_data_func ("/picasaweb/query/all_albums/bad_query", service, test_query_all_albums_bad_query);
+ g_test_add_data_func ("/picasaweb/query/all_albums/bad_query/with_limits", service, test_query_all_albums_bad_query_with_limits);
+ g_test_add_data_func ("/picasaweb/query/user", service, test_query_user);
+ g_test_add ("/picasaweb/query/user/async", GDataAsyncTestData, service, gdata_set_up_async_test_data, test_query_user_async,
+ gdata_tear_down_async_test_data);
+ g_test_add ("/picasaweb/query/user/async/cancellation", GDataAsyncTestData, service, gdata_set_up_async_test_data,
+ test_query_user_async_cancellation, gdata_tear_down_async_test_data);
+ g_test_add ("/picasaweb/query/user/by-username/async", GDataAsyncTestData, service, gdata_set_up_async_test_data,
+ test_query_user_by_username_async, gdata_tear_down_async_test_data);
+ g_test_add ("/picasaweb/query/user/by-username/async/cancellation", GDataAsyncTestData, service, gdata_set_up_async_test_data,
+ test_query_user_by_username_async_cancellation, gdata_tear_down_async_test_data);
+
+ g_test_add ("/picasaweb/insert/album", InsertAlbumData, service, set_up_insert_album, test_insert_album, tear_down_insert_album);
+ g_test_add ("/picasaweb/insert/album/async", GDataAsyncTestData, service, set_up_insert_album_async, test_insert_album_async,
+ tear_down_insert_album_async);
+ g_test_add ("/picasaweb/insert/album/async/cancellation", GDataAsyncTestData, service, set_up_insert_album_async,
+ test_insert_album_async_cancellation, tear_down_insert_album_async);
+
+ g_test_add ("/picasaweb/query/files", QueryFilesData, service, set_up_query_files, test_query_files, tear_down_query_files);
+ g_test_add ("/picasaweb/query/files/async", GDataAsyncTestData, service, set_up_query_files_async, test_query_files_async,
+ tear_down_query_files_async);
+ g_test_add ("/picasaweb/query/files/async/progress_closure", QueryFilesData, service, set_up_query_files,
+ test_query_files_async_progress_closure, tear_down_query_files);
+ g_test_add ("/picasaweb/query/files/async/cancellation", GDataAsyncTestData, service, set_up_query_files_async,
+ test_query_files_async_cancellation, tear_down_query_files_async);
+ g_test_add ("/picasaweb/query/files/single", QueryFilesData, service, set_up_query_files, test_query_files_single,
+ tear_down_query_files);
+
+ g_test_add ("/picasaweb/comment/query", QueryCommentsData, service, set_up_query_comments, test_comment_query,
+ tear_down_query_comments);
+ g_test_add ("/picasaweb/comment/query/async", GDataAsyncTestData, service, set_up_query_comments_async, test_comment_query_async,
+ tear_down_query_comments_async);
+ g_test_add ("/picasaweb/comment/query/async/cancellation", GDataAsyncTestData, service, set_up_query_comments_async,
+ test_comment_query_async_cancellation, tear_down_query_comments_async);
+ g_test_add ("/picasaweb/comment/query/progress_closure", QueryCommentsData, service, set_up_query_comments,
+ test_comment_query_async_progress_closure, tear_down_query_comments);
+
+ g_test_add ("/picasaweb/comment/insert", InsertCommentData, service, set_up_insert_comment, test_comment_insert,
+ tear_down_insert_comment);
+ g_test_add ("/picasaweb/comment/insert/async", GDataAsyncTestData, service, set_up_insert_comment_async, test_comment_insert_async,
+ tear_down_insert_comment_async);
+ g_test_add ("/picasaweb/comment/insert/async/cancellation", GDataAsyncTestData, service, set_up_insert_comment_async,
+ test_comment_insert_async_cancellation, tear_down_insert_comment_async);
+
+ g_test_add ("/picasaweb/comment/delete", QueryCommentsData, service, set_up_query_comments, test_comment_delete,
+ tear_down_query_comments);
+ g_test_add ("/picasaweb/comment/delete/async", GDataAsyncTestData, service, set_up_query_comments_async, test_comment_delete_async,
+ tear_down_query_comments_async);
+ g_test_add ("/picasaweb/comment/delete/async/cancellation", GDataAsyncTestData, service, set_up_query_comments_async,
+ test_comment_delete_async_cancellation, tear_down_query_comments_async);
+
+ g_test_add ("/picasaweb/upload/default_album", UploadData, service, set_up_upload, test_upload_default_album, tear_down_upload);
+ /*g_test_add ("/picasaweb/upload/default_album/async", GDataAsyncTestData, service, set_up_upload_async, test_upload_default_album_async,
+ tear_down_upload_async);
+ g_test_add ("/picasaweb/upload/default_album/async/cancellation", GDataAsyncTestData, service, set_up_upload_async,
+ test_upload_default_album_async_cancellation, tear_down_upload_async);*/
+
+ g_test_add ("/picasaweb/download/photo", QueryFilesData, service, set_up_query_files, test_download_photo, tear_down_query_files);
+ g_test_add ("/picasaweb/download/thumbnails", QueryFilesData, service, set_up_query_files, test_download_thumbnails,
+ tear_down_query_files);
+
+ g_test_add_func ("/picasaweb/album/new", test_album_new);
+ g_test_add_func ("/picasaweb/album/escaping", test_album_escaping);
+ g_test_add_func ("/picasaweb/album/properties/coordinates", test_album_properties_coordinates);
+ g_test_add_func ("/picasaweb/album/properties/visibility", test_album_properties_visibility);
+
+ g_test_add_func ("/picasaweb/file/escaping", test_file_escaping);
+ g_test_add_func ("/picasaweb/file/properties/coordinates", test_file_properties_coordinates);
+
+ g_test_add_func ("/picasaweb/comment/get_xml", test_comment_get_xml);
+
+ g_test_add_func ("/picasaweb/query/etag", test_query_etag);
+
+ retval = g_test_run ();
+
+ if (service != NULL)
+ g_object_unref (service);
+
+ return retval;
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2010, 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+
+#include <glib.h>
+#include <locale.h>
+#include <string.h>
+#include <arpa/inet.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <sys/socket.h>
+
+#include "gdata.h"
+#include "common.h"
+
+#ifdef HAVE_LIBSOUP_2_55_90
+static gpointer
+run_server_thread (GMainLoop *loop)
+{
+ g_main_context_push_thread_default (g_main_loop_get_context (loop));
+ g_main_loop_run (loop);
+ g_main_context_pop_thread_default (g_main_loop_get_context (loop));
+
+ return NULL;
+}
+#else /* if !HAVE_LIBSOUP_2_55_90 */
+static gpointer
+run_server_thread (SoupServer *server)
+{
+ soup_server_run (server);
+
+ return NULL;
+}
+#endif /* !HAVE_LIBSOUP_2_55_90 */
+
+static GThread *
+run_server (SoupServer *server, GMainLoop *loop)
+{
+ GThread *thread;
+ gchar *port_string;
+ GError *error = NULL;
+ guint16 port;
+
+#ifdef HAVE_LIBSOUP_2_55_90
+ thread = g_thread_try_new ("server-thread", (GThreadFunc) run_server_thread, loop, &error);
+#else /* if !HAVE_LIBSOUP_2_55_90 */
+ thread = g_thread_try_new ("server-thread", (GThreadFunc) run_server_thread, server, &error);
+#endif /* !HAVE_LIBSOUP_2_55_90 */
+ g_assert_no_error (error);
+ g_assert (thread != NULL);
+
+ /* Set the port so that libgdata doesn't override it. */
+#ifdef HAVE_LIBSOUP_2_55_90
+{
+ GSList *uris; /* owned */
+
+ uris = soup_server_get_uris (server);
+ g_assert (uris != NULL);
+ port = soup_uri_get_port (uris->data);
+
+ g_slist_free_full (uris, (GDestroyNotify) soup_uri_free);
+}
+#else /* if !HAVE_LIBSOUP_2_55_90 */
+ port = soup_server_get_port (server);
+#endif /* !HAVE_LIBSOUP_2_55_90 */
+
+ port_string = g_strdup_printf ("%u", port);
+ g_setenv ("LIBGDATA_HTTPS_PORT", port_string, TRUE);
+ g_free (port_string);
+
+ return thread;
+}
+
+#ifdef HAVE_LIBSOUP_2_55_90
+static gboolean
+quit_server_cb (GMainLoop *loop)
+{
+ g_main_loop_quit (loop);
+
+ return FALSE;
+}
+
+static void
+stop_server (SoupServer *server, GMainLoop *loop)
+{
+ soup_add_completion (g_main_loop_get_context (loop),
+ (GSourceFunc) quit_server_cb, loop);
+}
+#else /* if !HAVE_LIBSOUP_2_55_90 */
+static gboolean
+quit_server_cb (SoupServer *server)
+{
+ soup_server_quit (server);
+
+ return FALSE;
+}
+
+static void
+stop_server (SoupServer *server, GMainLoop *loop)
+{
+ soup_add_completion (g_main_loop_get_context (loop),
+ (GSourceFunc) quit_server_cb, server);
+}
+#endif /* !HAVE_LIBSOUP_2_55_90 */
+
+static gchar *
+get_test_string (guint start_num, guint end_num)
+{
+ GString *test_string;
+ guint i;
+
+ g_return_val_if_fail (end_num < G_MAXUINT, NULL);
+
+ test_string = g_string_new (NULL);
+
+ for (i = start_num; i < end_num + 1; i++)
+ g_string_append_printf (test_string, "%u\n", i);
+
+ return g_string_free (test_string, FALSE);
+}
+
+static void
+test_download_stream_download_server_content_length_handler_cb (SoupServer *server, SoupMessage *message, const char *path, GHashTable *query,
+ SoupClientContext *client, gpointer user_data)
+{
+ gchar *test_string;
+ goffset test_string_length;
+
+ test_string = get_test_string (1, 1000);
+ test_string_length = strlen (test_string) + 1;
+
+ /* Add some response headers */
+ soup_message_set_status (message, SOUP_STATUS_OK);
+ soup_message_headers_set_content_type (message->response_headers, "text/plain", NULL);
+ soup_message_headers_set_content_length (message->response_headers, test_string_length);
+
+ /* Set the response body */
+ soup_message_body_append (message->response_body, SOUP_MEMORY_TAKE, test_string, test_string_length);
+}
+
+static SoupServer *
+create_server (SoupServerCallback callback, gpointer user_data, GMainLoop **main_loop)
+{
+ GMainContext *context;
+ SoupServer *server;
+#ifdef HAVE_LIBSOUP_2_55_90
+ gchar *cert_path = NULL, *key_path = NULL;
+ GError *error = NULL;
+#else /* if !HAVE_LIBSOUP_2_55_90 */
+ union {
+ struct sockaddr_in in;
+ struct sockaddr norm;
+ } sock;
+ SoupAddress *addr;
+#endif /* HAVE_LIBSOUP_2_55_90 */
+
+ /* Create the server */
+ g_assert (main_loop != NULL);
+ context = g_main_context_new ();
+ *main_loop = g_main_loop_new (context, FALSE);
+
+#ifdef HAVE_LIBSOUP_2_55_90
+ server = soup_server_new (NULL, NULL);
+
+ cert_path = g_test_build_filename (G_TEST_DIST, "cert.pem", NULL);
+ key_path = g_test_build_filename (G_TEST_DIST, "key.pem", NULL);
+
+ soup_server_set_ssl_cert_file (server, cert_path, key_path, &error);
+ g_assert_no_error (error);
+
+ g_free (key_path);
+ g_free (cert_path);
+
+ soup_server_add_handler (server, NULL, callback, user_data, NULL);
+
+ g_main_context_push_thread_default (context);
+
+ soup_server_listen_local (server, 0 /* random port */,
+ SOUP_SERVER_LISTEN_HTTPS, &error);
+ g_assert_no_error (error);
+
+ g_main_context_pop_thread_default (context);
+#else /* if !HAVE_LIBSOUP_2_55_90 */
+ memset (&sock, 0, sizeof (sock));
+ sock.in.sin_family = AF_INET;
+ sock.in.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
+ sock.in.sin_port = htons (0); /* random port */
+
+ addr = soup_address_new_from_sockaddr (&sock.norm, sizeof (sock.norm));
+ g_assert (addr != NULL);
+
+ server = soup_server_new (SOUP_SERVER_INTERFACE, addr,
+ SOUP_SERVER_ASYNC_CONTEXT, context,
+ NULL);
+
+ soup_server_add_handler (server, NULL, callback, user_data, NULL);
+
+ g_object_unref (addr);
+#endif /* !HAVE_LIBSOUP_2_55_90 */
+
+ g_assert (server != NULL);
+ g_main_context_unref (context);
+
+ return server;
+}
+
+static gchar *
+build_server_uri (SoupServer *server)
+{
+#ifdef HAVE_LIBSOUP_2_55_90
+ GSList *uris; /* owned */
+ GSList *l; /* unowned */
+ gchar *retval = NULL; /* owned */
+
+ uris = soup_server_get_uris (server);
+
+ for (l = uris; l != NULL && retval == NULL; l = l->next) {
+ if (soup_uri_get_scheme (l->data) == SOUP_URI_SCHEME_HTTPS) {
+ retval = soup_uri_to_string (l->data, FALSE);
+ }
+ }
+
+ g_slist_free_full (uris, (GDestroyNotify) soup_uri_free);
+
+ g_assert (retval != NULL);
+
+ return retval;
+#else /* if !HAVE_LIBSOUP_2_55_90 */
+ return g_strdup_printf ("https://%s:%u/",
+ soup_address_get_physical (soup_socket_get_local_address (soup_server_get_listener (server))),
+ soup_server_get_port (server));
+#endif /* !HAVE_LIBSOUP_2_55_90 */
+}
+
+static void
+test_download_stream_download_content_length (void)
+{
+ SoupServer *server;
+ GMainLoop *main_loop;
+ GThread *thread;
+ gchar *download_uri, *test_string;
+ GDataService *service;
+ GInputStream *download_stream;
+ gssize length_read;
+ GString *contents;
+ guint8 buffer[20];
+ gboolean success;
+ GError *error = NULL;
+
+ /* Create and run the server */
+ server = create_server ((SoupServerCallback) test_download_stream_download_server_content_length_handler_cb, NULL, &main_loop);
+ thread = run_server (server, main_loop);
+
+ /* Create a new download stream connected to the server */
+ download_uri = build_server_uri (server);
+ service = GDATA_SERVICE (gdata_youtube_service_new ("developer-key", NULL));
+ download_stream = gdata_download_stream_new (service, NULL, download_uri, NULL);
+ g_object_unref (service);
+ g_free (download_uri);
+
+ /* Read the entire stream into a string which we can later compare with what we expect. */
+ contents = g_string_new (NULL);
+
+ while ((length_read = g_input_stream_read (download_stream, buffer, sizeof (buffer), NULL, &error)) > 0) {
+ g_assert_cmpint (length_read, <=, sizeof (buffer));
+
+ g_string_append_len (contents, (const gchar*) buffer, length_read);
+ }
+
+ /* Check we've reached EOF successfully */
+ g_assert_no_error (error);
+ g_assert_cmpint (length_read, ==, 0);
+
+ /* Close the stream */
+ success = g_input_stream_close (download_stream, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (success == TRUE);
+
+ /* Compare the downloaded string to the original */
+ test_string = get_test_string (1, 1000);
+
+ g_assert_cmpint (contents->len, ==, strlen (test_string) + 1);
+ g_assert_cmpstr (contents->str, ==, test_string);
+
+ g_free (test_string);
+ g_string_free (contents, TRUE);
+
+ /* Kill the server and wait for it to die */
+ stop_server (server, main_loop);
+ g_thread_join (thread);
+
+ g_object_unref (download_stream);
+ g_object_unref (server);
+ g_main_loop_unref (main_loop);
+}
+
+static void
+test_download_stream_download_server_seek_handler_cb (SoupServer *server, SoupMessage *message, const char *path, GHashTable *query,
+ SoupClientContext *client, gpointer user_data)
+{
+ gchar *test_string;
+ goffset test_string_length;
+
+ test_string = get_test_string (1, 1000);
+ test_string_length = strlen (test_string) + 1;
+
+ /* Add some response headers */
+ soup_message_set_status (message, SOUP_STATUS_OK);
+ soup_message_body_append (message->response_body, SOUP_MEMORY_TAKE, test_string, test_string_length);
+}
+
+/* Test seeking before the first read */
+static void
+test_download_stream_download_seek_before_start (void)
+{
+ SoupServer *server;
+ GMainLoop *main_loop;
+ GThread *thread;
+ gchar *download_uri, *test_string;
+ goffset test_string_offset = 0;
+ guint test_string_length;
+ GDataService *service;
+ GInputStream *download_stream;
+ gssize length_read;
+ guint8 buffer[20];
+ gboolean success;
+ GError *error = NULL;
+
+ /* Create and run the server */
+ server = create_server ((SoupServerCallback) test_download_stream_download_server_seek_handler_cb, NULL, &main_loop);
+ thread = run_server (server, main_loop);
+
+ /* Create a new download stream connected to the server */
+ download_uri = build_server_uri (server);
+ service = GDATA_SERVICE (gdata_youtube_service_new ("developer-key", NULL));
+ download_stream = gdata_download_stream_new (service, NULL, download_uri, NULL);
+ g_object_unref (service);
+ g_free (download_uri);
+
+ /* Read alternating blocks into a string and compare with what we expect as we go. i.e. Skip 20 bytes, then read 20 bytes, etc. */
+ test_string = get_test_string (1, 1000);
+ test_string_length = strlen (test_string) + 1;
+
+ while (TRUE) {
+ /* Check the seek offset */
+ g_assert_cmpint (g_seekable_tell (G_SEEKABLE (download_stream)), ==, test_string_offset);
+
+ /* Seek forward a buffer length */
+ if (g_seekable_seek (G_SEEKABLE (download_stream), sizeof (buffer), G_SEEK_CUR, NULL, &error) == FALSE) {
+ /* Tried to seek past the end of the stream */
+ g_assert_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT);
+ g_clear_error (&error);
+ break;
+ }
+
+ test_string_offset += sizeof (buffer);
+ g_assert_no_error (error);
+
+ /* Check the seek offset again */
+ g_assert_cmpint (g_seekable_tell (G_SEEKABLE (download_stream)), ==, test_string_offset);
+
+ /* Read a buffer-load */
+ length_read = g_input_stream_read (download_stream, buffer, sizeof (buffer), NULL, &error);
+
+ g_assert_no_error (error);
+ g_assert_cmpint (length_read, <=, sizeof (buffer));
+
+ /* Check the buffer-load against the test string */
+ g_assert (memcmp (buffer, test_string + test_string_offset, length_read) == 0);
+ test_string_offset += length_read;
+
+ /* Check the seek offset again */
+ g_assert_cmpint (g_seekable_tell (G_SEEKABLE (download_stream)), ==, test_string_offset);
+
+ if (length_read < (gssize) sizeof (buffer)) {
+ /* Done */
+ break;
+ }
+ }
+
+ g_free (test_string);
+
+ /* Check the seek offset is within one buffer-load of the end */
+ g_assert_cmpint (g_seekable_tell (G_SEEKABLE (download_stream)), >, test_string_length - sizeof (buffer));
+ g_assert_cmpint (g_seekable_tell (G_SEEKABLE (download_stream)), <=, test_string_length);
+
+ /* Close the stream */
+ success = g_input_stream_close (download_stream, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (success == TRUE);
+
+ /* Kill the server and wait for it to die */
+ stop_server (server, main_loop);
+ g_thread_join (thread);
+
+ g_object_unref (download_stream);
+ g_object_unref (server);
+ g_main_loop_unref (main_loop);
+}
+
+/* Test seeking forwards after the first read */
+static void
+test_download_stream_download_seek_after_start_forwards (void)
+{
+ SoupServer *server;
+ GMainLoop *main_loop;
+ GThread *thread;
+ gchar *download_uri, *test_string;
+ goffset test_string_offset = 0;
+ guint test_string_length;
+ GDataService *service;
+ GInputStream *download_stream;
+ gssize length_read;
+ guint8 buffer[20];
+ gboolean success;
+ GError *error = NULL;
+
+ /* Create and run the server */
+ server = create_server ((SoupServerCallback) test_download_stream_download_server_seek_handler_cb, NULL, &main_loop);
+ thread = run_server (server, main_loop);
+
+ /* Create a new download stream connected to the server */
+ download_uri = build_server_uri (server);
+ service = GDATA_SERVICE (gdata_youtube_service_new ("developer-key", NULL));
+ download_stream = gdata_download_stream_new (service, NULL, download_uri, NULL);
+ g_object_unref (service);
+ g_free (download_uri);
+
+ /* Read alternating blocks into a string and compare with what we expect as we go. i.e. Read 20 bytes, then skip 20 bytes, etc. */
+ test_string = get_test_string (1, 1000);
+ test_string_length = strlen (test_string) + 1;
+
+ while (TRUE) {
+ /* Check the seek offset */
+ g_assert_cmpint (g_seekable_tell (G_SEEKABLE (download_stream)), ==, test_string_offset);
+
+ /* Read a buffer-load */
+ length_read = g_input_stream_read (download_stream, buffer, sizeof (buffer), NULL, &error);
+
+ g_assert_no_error (error);
+ g_assert_cmpint (length_read, <=, sizeof (buffer));
+
+ /* Check the buffer-load against the test string */
+ g_assert (memcmp (buffer, test_string + test_string_offset, length_read) == 0);
+ test_string_offset += length_read;
+
+ /* Check the seek offset again */
+ g_assert_cmpint (g_seekable_tell (G_SEEKABLE (download_stream)), ==, test_string_offset);
+
+ if (length_read < (gssize) sizeof (buffer)) {
+ /* Done */
+ break;
+ }
+
+ /* Seek forward a buffer length */
+ if (g_seekable_seek (G_SEEKABLE (download_stream), sizeof (buffer), G_SEEK_CUR, NULL, &error) == FALSE) {
+ /* Tried to seek past the end of the stream */
+ g_assert_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT);
+ g_clear_error (&error);
+ break;
+ }
+
+ test_string_offset += sizeof (buffer);
+ g_assert_no_error (error);
+
+ /* Check the seek offset again */
+ g_assert_cmpint (g_seekable_tell (G_SEEKABLE (download_stream)), ==, test_string_offset);
+ }
+
+ g_free (test_string);
+
+ /* Check the seek offset is within one buffer-load of the end */
+ g_assert_cmpint (g_seekable_tell (G_SEEKABLE (download_stream)), >, test_string_length - sizeof (buffer));
+ g_assert_cmpint (g_seekable_tell (G_SEEKABLE (download_stream)), <=, test_string_length);
+
+ /* Close the stream */
+ success = g_input_stream_close (download_stream, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (success == TRUE);
+
+ /* Kill the server and wait for it to die */
+ stop_server (server, main_loop);
+ g_thread_join (thread);
+
+ g_object_unref (download_stream);
+ g_object_unref (server);
+ g_main_loop_unref (main_loop);
+}
+
+/* Test seeking backwards after the first read */
+static void
+test_download_stream_download_seek_after_start_backwards (void)
+{
+ SoupServer *server;
+ GMainLoop *main_loop;
+ GThread *thread;
+ gchar *download_uri, *test_string;
+ goffset test_string_offset = 0;
+ guint repeat_count;
+ GDataService *service;
+ GInputStream *download_stream;
+ gssize length_read;
+ guint8 buffer[20];
+ gboolean success;
+ GError *error = NULL;
+
+ /* Create and run the server */
+ server = create_server ((SoupServerCallback) test_download_stream_download_server_seek_handler_cb, NULL, &main_loop);
+ thread = run_server (server, main_loop);
+
+ /* Create a new download stream connected to the server */
+ download_uri = build_server_uri (server);
+ service = GDATA_SERVICE (gdata_youtube_service_new ("developer-key", NULL));
+ download_stream = gdata_download_stream_new (service, NULL, download_uri, NULL);
+ g_object_unref (service);
+ g_free (download_uri);
+
+ /* Read a block in, then skip back over the block again. i.e. Read the first block, read the second block, skip back over the second block,
+ * read the second block again, skip back over it, etc. Close the stream after doing this several times. */
+ test_string = get_test_string (1, 1000);
+
+ /* Read a buffer-load to begin with */
+ length_read = g_input_stream_read (download_stream, buffer, sizeof (buffer), NULL, &error);
+
+ g_assert_no_error (error);
+ test_string_offset += length_read;
+
+ for (repeat_count = 6; repeat_count > 0; repeat_count--) {
+ /* Check the seek offset */
+ g_assert_cmpint (g_seekable_tell (G_SEEKABLE (download_stream)), ==, test_string_offset);
+
+ /* Read a buffer-load */
+ length_read = g_input_stream_read (download_stream, buffer, sizeof (buffer), NULL, &error);
+
+ g_assert_no_error (error);
+ g_assert_cmpint (length_read, <=, sizeof (buffer));
+
+ /* Check the buffer-load against the test string */
+ g_assert (memcmp (buffer, test_string + test_string_offset, length_read) == 0);
+ test_string_offset += length_read;
+
+ /* Check the seek offset again */
+ g_assert_cmpint (g_seekable_tell (G_SEEKABLE (download_stream)), ==, test_string_offset);
+
+ /* Seek backwards a buffer length */
+ success = g_seekable_seek (G_SEEKABLE (download_stream), -length_read, G_SEEK_CUR, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (success == TRUE);
+ test_string_offset -= length_read;
+
+ /* Check the seek offset again */
+ g_assert_cmpint (g_seekable_tell (G_SEEKABLE (download_stream)), ==, test_string_offset);
+ }
+
+ g_free (test_string);
+
+ /* Check the seek offset is at the end of the first buffer-load */
+ g_assert_cmpint (g_seekable_tell (G_SEEKABLE (download_stream)), ==, sizeof (buffer));
+
+ /* Close the stream */
+ success = g_input_stream_close (download_stream, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (success == TRUE);
+
+ /* Kill the server and wait for it to die */
+ stop_server (server, main_loop);
+ g_thread_join (thread);
+
+ g_object_unref (download_stream);
+ g_object_unref (server);
+ g_main_loop_unref (main_loop);
+}
+
+static void
+test_upload_stream_upload_no_entry_content_length_server_handler_cb (SoupServer *server, SoupMessage *message, const char *path, GHashTable *query,
+ SoupClientContext *client, gpointer user_data)
+{
+ gchar *test_string;
+ goffset test_string_length;
+
+ /* Check the Slug and Content-Type headers have been correctly set by the client */
+ g_assert_cmpstr (soup_message_headers_get_content_type (message->request_headers, NULL), ==, "text/plain");
+ g_assert_cmpstr (soup_message_headers_get_one (message->request_headers, "Slug"), ==, "slug");
+
+ /* Check the client sent the right data */
+ test_string = get_test_string (1, 1000);
+ test_string_length = strlen (test_string) + 1;
+
+ g_assert_cmpint (message->request_body->length, ==, test_string_length);
+ g_assert_cmpstr (message->request_body->data, ==, test_string);
+
+ g_free (test_string);
+
+ /* Add some response headers */
+ soup_message_set_status (message, SOUP_STATUS_OK);
+ soup_message_headers_set_content_type (message->response_headers, "text/plain", NULL);
+
+ /* Set the response body */
+ soup_message_body_append (message->response_body, SOUP_MEMORY_STATIC, "Test passed!", 13);
+}
+
+static void
+test_upload_stream_upload_no_entry_content_length (void)
+{
+ SoupServer *server;
+ GMainLoop *main_loop;
+ GThread *thread;
+ gchar *upload_uri, *test_string;
+ GDataService *service;
+ GOutputStream *upload_stream;
+ gssize length_written;
+ gsize total_length_written = 0;
+ goffset test_string_length;
+ gboolean success;
+ GError *error = NULL;
+
+ /* Create and run the server */
+ server = create_server ((SoupServerCallback) test_upload_stream_upload_no_entry_content_length_server_handler_cb, NULL, &main_loop);
+ thread = run_server (server, main_loop);
+
+ /* Create a new upload stream uploading to the server */
+ upload_uri = build_server_uri (server);
+ service = GDATA_SERVICE (gdata_youtube_service_new ("developer-key", NULL));
+ upload_stream = gdata_upload_stream_new (service, NULL, SOUP_METHOD_POST, upload_uri, NULL, "slug", "text/plain", NULL);
+ g_object_unref (service);
+ g_free (upload_uri);
+
+ /* Write the entire test string to the stream */
+ test_string = get_test_string (1, 1000);
+ test_string_length = strlen (test_string) + 1;
+
+ while ((length_written = g_output_stream_write (upload_stream, test_string + total_length_written,
+ test_string_length - total_length_written, NULL, &error)) > 0) {
+ g_assert_cmpint (length_written, <=, test_string_length - total_length_written);
+
+ total_length_written += length_written;
+ }
+
+ g_free (test_string);
+
+ /* Check we've had a successful return value */
+ g_assert_no_error (error);
+ g_assert_cmpint (length_written, ==, 0);
+ g_assert_cmpint (total_length_written, ==, test_string_length);
+
+ /* Close the stream */
+ success = g_output_stream_close (upload_stream, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (success == TRUE);
+
+ /* Kill the server and wait for it to die */
+ stop_server (server, main_loop);
+ g_thread_join (thread);
+
+ g_object_unref (upload_stream);
+ g_object_unref (server);
+ g_main_loop_unref (main_loop);
+}
+
+/* Test parameters for a run of test_upload_stream_resumable(). */
+typedef struct {
+ enum {
+ CONTENT_ONLY = 0,
+ CONTENT_AND_METADATA = 1,
+ METADATA_ONLY = 2,
+ } content_type;
+#define UPLOAD_STREAM_RESUMABLE_MAX_CONTENT_TYPE 2
+ gsize file_size;
+ enum {
+ ERROR_ON_INITIAL_REQUEST = 0,
+ ERROR_ON_SUBSEQUENT_REQUEST = 1,
+ ERROR_ON_FINAL_REQUEST = 2,
+ NO_ERROR = 3,
+ } error_type;
+#define UPLOAD_STREAM_RESUMABLE_MAX_ERROR_TYPE 3
+} UploadStreamResumableTestParams;
+
+static const gchar *upload_stream_resumable_content_type_names[] = {
+ "content-only",
+ "content-and-metadata",
+ "metadata-only",
+};
+
+static const gchar *upload_stream_resumable_error_type_names[] = {
+ "initial-error",
+ "subsequent-error",
+ "final-error",
+ "success",
+};
+
+typedef struct {
+ UploadStreamResumableTestParams *test_params;
+ gsize next_range_start;
+ gsize next_range_end;
+ guint next_path_index;
+ const gchar *test_string;
+} UploadStreamResumableServerData;
+
+static void
+test_upload_stream_resumable_server_handler_cb (SoupServer *server, SoupMessage *message, const char *path, GHashTable *query,
+ SoupClientContext *client, UploadStreamResumableServerData *server_data)
+{
+ UploadStreamResumableTestParams *test_params;
+
+ test_params = server_data->test_params;
+
+ /* Are we handling the initial request, or a subsequent one? */
+ if (strcmp (path, "/") == 0) {
+ /* Initial request. */
+ gchar *file_size_str;
+
+ /* Check the Slug and X-Upload-* headers. */
+ g_assert_cmpstr (soup_message_headers_get_one (message->request_headers, "Slug"), ==, "slug");
+
+ file_size_str = g_strdup_printf ("%" G_GSIZE_FORMAT, test_params->file_size);
+ g_assert_cmpstr (soup_message_headers_get_one (message->request_headers, "X-Upload-Content-Type"), ==, "text/plain");
+ g_assert_cmpstr (soup_message_headers_get_one (message->request_headers, "X-Upload-Content-Length"), ==, file_size_str);
+ g_free (file_size_str);
+
+ /* Check the Content-Type and content. */
+ switch (test_params->content_type) {
+ case CONTENT_ONLY:
+ /* Check nothing was sent. */
+ g_assert_cmpstr (soup_message_headers_get_content_type (message->request_headers, NULL), ==, NULL);
+ g_assert_cmpint (message->request_body->length, ==, 0);
+
+ break;
+ case CONTENT_AND_METADATA:
+ case METADATA_ONLY:
+ /* Check the JSON sent by the client. */
+ g_assert_cmpstr (soup_message_headers_get_content_type (message->request_headers, NULL), ==, "application/json");
+
+ g_assert (message->request_body->data[message->request_body->length] == '\0');
+ g_assert (gdata_test_compare_json_strings (message->request_body->data,
+ "{"
+ "'title': 'Test title!',"
+ "'kind': 'youtube#video',"
+ "'snippet': {"
+ "'title': 'Test title!'"
+ "},"
+ "'status': {"
+ "'privacyStatus': 'public'"
+ "},"
+ "'recordingDetails': {}"
+ "}", TRUE) == TRUE);
+
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ /* Send a response. */
+ switch (test_params->error_type) {
+ case ERROR_ON_INITIAL_REQUEST:
+ /* Error. */
+ goto error;
+ case ERROR_ON_SUBSEQUENT_REQUEST:
+ case ERROR_ON_FINAL_REQUEST:
+ case NO_ERROR:
+ /* Success. */
+ if (test_params->file_size == 0) {
+ goto completion;
+ } else {
+ goto continuation;
+ }
+
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+ } else if (*path == '/' && g_ascii_strtoull (path + 1, NULL, 10) == server_data->next_path_index) {
+ /* Subsequent request. */
+
+ /* Check the Slug and X-Upload-* headers. */
+ g_assert_cmpstr (soup_message_headers_get_one (message->request_headers, "Slug"), ==, NULL);
+ g_assert_cmpstr (soup_message_headers_get_one (message->request_headers, "X-Upload-Content-Type"), ==, NULL);
+ g_assert_cmpstr (soup_message_headers_get_one (message->request_headers, "X-Upload-Content-Length"), ==, NULL);
+
+ /* Check the Content-Type and content. */
+ switch (test_params->content_type) {
+ case CONTENT_ONLY:
+ case CONTENT_AND_METADATA: {
+ goffset range_start, range_end, range_length;
+
+ /* Check the headers. */
+ g_assert_cmpstr (soup_message_headers_get_content_type (message->request_headers, NULL), ==, "text/plain");
+ g_assert_cmpint (soup_message_headers_get_content_length (message->request_headers), ==, message->request_body->length);
+ g_assert_cmpint (message->request_body->length, >, 0);
+ g_assert_cmpint (message->request_body->length, <=, 512 * 1024 /* 512 KiB */);
+ g_assert (soup_message_headers_get_content_range (message->request_headers, &range_start, &range_end,
+ &range_length) == TRUE);
+ g_assert_cmpint (range_start, ==, server_data->next_range_start);
+ g_assert_cmpint (range_end, ==, server_data->next_range_end);
+ g_assert_cmpint (range_length, ==, test_params->file_size);
+
+ /* Check the content. */
+ g_assert (memcmp (server_data->test_string + range_start, message->request_body->data,
+ message->request_body->length) == 0);
+
+ /* Update the expected values. */
+ server_data->next_range_start = range_end + 1;
+ server_data->next_range_end = MIN (server_data->next_range_start + 512 * 1024, test_params->file_size) - 1;
+ server_data->next_path_index++;
+
+ break;
+ }
+ case METADATA_ONLY:
+ default:
+ g_assert_not_reached ();
+ }
+
+ /* Send a response. */
+ switch (test_params->error_type) {
+ case ERROR_ON_SUBSEQUENT_REQUEST:
+ case ERROR_ON_FINAL_REQUEST:
+ /* Skip the error if this isn't the final request. */
+ if (test_params->error_type == ERROR_ON_SUBSEQUENT_REQUEST ||
+ (test_params->error_type == ERROR_ON_FINAL_REQUEST && server_data->next_range_start == test_params->file_size)) {
+ goto error;
+ }
+
+ /* Fall through */
+ case NO_ERROR:
+ /* Success. */
+ if (server_data->next_range_start == test_params->file_size) {
+ goto completion;
+ } else {
+ goto continuation;
+ }
+
+ break;
+ case ERROR_ON_INITIAL_REQUEST:
+ default:
+ g_assert_not_reached ();
+ }
+ } else {
+ g_assert_not_reached ();
+ }
+
+ return;
+
+error: {
+ const gchar *error_response =
+ "{"
+ "'error': {"
+ "'errors': ["
+ "{"
+ "'domain': 'global',"
+ "'reason': 'authError',"
+ "'message': 'Invalid token.',"
+ "'location': 'Authorization: GoogleLogin'"
+ "}"
+ "],"
+ "'code': 400,"
+ "'message': 'Invalid token.'"
+ "}"
+ "}";
+
+ /* Error. */
+ soup_message_set_status (message, SOUP_STATUS_UNAUTHORIZED); /* arbitrary error status code */
+ soup_message_body_append (message->response_body, SOUP_MEMORY_STATIC, error_response, strlen (error_response));
+ }
+
+ return;
+
+continuation: {
+ gchar *upload_uri, *server_uri;
+
+ /* Continuation. */
+ if (server_data->next_path_index == 0) {
+ soup_message_set_status (message, SOUP_STATUS_OK);
+ } else {
+ soup_message_set_status (message, 308);
+ }
+
+ server_uri = build_server_uri (server);
+ g_assert_cmpstr (server_uri + strlen (server_uri) - 1, ==, "/");
+ upload_uri = g_strdup_printf ("%s%u", server_uri,
+ ++server_data->next_path_index);
+ soup_message_headers_replace (message->response_headers, "Location", upload_uri);
+ g_free (upload_uri);
+ g_free (server_uri);
+ }
+
+ return;
+
+completion: {
+ const gchar *completion_response =
+ "{"
+ "'kind': 'youtube#video',"
+ "'snippet': {"
+ "'title': 'Test title!',"
+ "'categoryId': '10'" /* Music */
+ "},"
+ "'status': {"
+ "'privacyStatus': 'public'"
+ "},"
+ "'recordingDetails': {"
+ "'recordingDate': '2005-10-02'"
+ "}"
+ "}";
+
+ /* Completion. */
+ soup_message_set_status (message, SOUP_STATUS_CREATED);
+ soup_message_headers_set_content_type (message->response_headers, "application/json", NULL);
+ soup_message_body_append (message->response_body, SOUP_MEMORY_STATIC, completion_response, strlen (completion_response));
+ }
+}
+
+static void
+test_upload_stream_resumable (gconstpointer user_data)
+{
+ UploadStreamResumableTestParams *test_params;
+ UploadStreamResumableServerData server_data;
+ SoupServer *server;
+ GMainLoop *main_loop;
+ GThread *thread;
+ gchar *upload_uri;
+ GDataService *service;
+ GDataEntry *entry = NULL;
+ GOutputStream *upload_stream;
+ gssize length_written;
+ gsize total_length_written = 0;
+ gchar *test_string;
+ goffset test_string_length;
+ gboolean success;
+ GError *error = NULL;
+
+ test_params = (UploadStreamResumableTestParams*) user_data;
+
+ /* Build the test string. */
+ if (test_params->file_size > 0) {
+ test_string = get_test_string (1, test_params->file_size / 4 /* arbitrary number which should generate enough data */);
+ g_assert (strlen (test_string) + 1 >= test_params->file_size);
+ test_string[test_params->file_size - 1] = '\0'; /* trim the string to the right length */
+ } else {
+ test_string = NULL;
+ }
+
+ test_string_length = test_params->file_size;
+
+ /* Create and run the server */
+ server_data.test_params = test_params;
+ server_data.next_range_start = 0;
+ server_data.next_range_end = MIN (test_params->file_size, 512 * 1024 /* 512 KiB */) - 1;
+ server_data.next_path_index = 0;
+ server_data.test_string = test_string;
+
+ server = create_server ((SoupServerCallback) test_upload_stream_resumable_server_handler_cb, &server_data, &main_loop);
+ thread = run_server (server, main_loop);
+
+ /* Create a new upload stream uploading to the server */
+ if (test_params->content_type == CONTENT_AND_METADATA || test_params->content_type == METADATA_ONLY) {
+ /* Build a test entry. */
+ entry = GDATA_ENTRY (gdata_youtube_video_new (NULL));
+ gdata_entry_set_title (entry, "Test title!");
+ }
+
+ upload_uri = build_server_uri (server);
+ service = GDATA_SERVICE (gdata_youtube_service_new ("developer-key", NULL));
+ upload_stream = gdata_upload_stream_new_resumable (service, NULL, SOUP_METHOD_POST, upload_uri, entry, "slug", "text/plain",
+ test_params->file_size, NULL);
+ g_object_unref (service);
+ g_free (upload_uri);
+ g_clear_object (&entry);
+
+ if (test_params->file_size > 0) {
+ while ((length_written = g_output_stream_write (upload_stream, test_string + total_length_written,
+ test_string_length - total_length_written, NULL, &error)) > 0) {
+ g_assert_cmpint (length_written, <=, test_string_length - total_length_written);
+
+ total_length_written += length_written;
+ }
+ } else {
+ /* Do an empty write to poke things into action. */
+ if ((length_written = g_output_stream_write (upload_stream, "", 0, NULL, &error)) > 0) {
+ total_length_written += length_written;
+ }
+ }
+
+ /* Check the return value. */
+ switch (test_params->error_type) {
+ case ERROR_ON_INITIAL_REQUEST:
+ case ERROR_ON_SUBSEQUENT_REQUEST:
+ case ERROR_ON_FINAL_REQUEST:
+ /* We can't check the write() call for errors, since whether it throws an error depends on whether the range it's writing
+ * overlaps a resumable upload chunk, which is entirely arbitrary and unpredictable. */
+ g_assert_cmpint (length_written, <=, 0);
+ g_assert_cmpint (total_length_written, <=, test_string_length);
+ g_clear_error (&error);
+
+ /* Close the stream */
+ success = g_output_stream_close (upload_stream, NULL, &error);
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED);
+ g_assert (success == FALSE);
+ g_clear_error (&error);
+
+ break;
+ case NO_ERROR:
+ /* Check we've had a successful return value */
+ g_assert_no_error (error);
+ g_assert_cmpint (length_written, ==, 0);
+ g_assert_cmpint (total_length_written, ==, test_string_length);
+
+ /* Close the stream */
+ success = g_output_stream_close (upload_stream, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (success == TRUE);
+
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ /* Kill the server and wait for it to die */
+ stop_server (server, main_loop);
+ g_thread_join (thread);
+
+ g_free (test_string);
+ g_object_unref (upload_stream);
+ g_object_unref (server);
+ g_main_loop_unref (main_loop);
+}
+
+int
+main (int argc, char *argv[])
+{
+ gdata_test_init (argc, argv);
+
+ /* Only print out headers, since we're sending a lot of data. */
+ g_setenv ("LIBGDATA_DEBUG", "2" /* GDATA_LOG_HEADERS */, TRUE);
+
+ g_test_add_func ("/download-stream/download_content_length", test_download_stream_download_content_length);
+ g_test_add_func ("/download-stream/download_seek/before_start", test_download_stream_download_seek_before_start);
+ g_test_add_func ("/download-stream/download_seek/after_start_forwards", test_download_stream_download_seek_after_start_forwards);
+ g_test_add_func ("/download-stream/download_seek/after_start_backwards", test_download_stream_download_seek_after_start_backwards);
+
+ g_test_add_func ("/upload-stream/upload_no_entry_content_length", test_upload_stream_upload_no_entry_content_length);
+
+ /* Test all possible combinations of conditions for resumable uploads. */
+ {
+ guint i, j, k;
+
+ const gsize file_sizes[] = { /* all in bytes */
+ 407 * 1024, /* < 512 KiB */
+ 512 * 1024, /* 512 KiB */
+ 666 * 1024, /* > 512 KiB, < 1024 KiB */
+ 1024 * 1024, /* 1024 KiB */
+ 1025 * 1024, /* > 1024 KiB */
+ };
+
+ for (i = 0; i < UPLOAD_STREAM_RESUMABLE_MAX_CONTENT_TYPE + 1; i++) {
+ for (j = 0; j < G_N_ELEMENTS (file_sizes); j++) {
+ for (k = 0; k < UPLOAD_STREAM_RESUMABLE_MAX_ERROR_TYPE + 1; k++) {
+ UploadStreamResumableTestParams *test_params;
+ gchar *test_name;
+ gsize file_size;
+
+ /* Ignore combinations of METADATA_ONLY with file_sizes or non-initial errors. */
+ if (i == METADATA_ONLY && (j != 0 || k != 0)) {
+ continue;
+ } else if (i == METADATA_ONLY) {
+ file_size = 0 /* bytes */;
+ } else {
+ file_size = file_sizes[j];
+ }
+
+ test_name = g_strdup_printf ("/upload-stream/resumable/%s/%s/%" G_GSIZE_FORMAT,
+ upload_stream_resumable_content_type_names[i],
+ upload_stream_resumable_error_type_names[k],
+ file_size);
+
+ /* Allocate a new struct. We leak this. */
+ test_params = g_slice_new (UploadStreamResumableTestParams);
+ test_params->content_type = i;
+ test_params->file_size = file_size;
+ test_params->error_type = k;
+
+ g_test_add_data_func (test_name, test_params, test_upload_stream_resumable);
+
+ g_free (test_name);
+ }
+ }
+ }
+ }
+
+ return g_test_run ();
+}
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2014 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib.h>
+#include <unistd.h>
+#include <string.h>
+
+#include "gdata.h"
+#include "common.h"
+#include "gdata-dummy-authorizer.h"
+
+static UhmServer *mock_server = NULL; /* owned */
+
+#undef CLIENT_ID /* from common.h */
+
+#define CLIENT_ID "352818697630-nqu2cmt5quqd6lr17ouoqmb684u84l1f.apps.googleusercontent.com"
+#define CLIENT_SECRET "-fA4pHQJxR3zJ-FyAMPQsikg"
+#define REDIRECT_URI "urn:ietf:wg:oauth:2.0:oob"
+
+static void
+test_authentication (void)
+{
+ GDataOAuth2Authorizer *authorizer = NULL; /* owned */
+ gchar *authentication_uri, *authorisation_code;
+
+ gdata_test_mock_server_start_trace (mock_server, "authentication");
+
+ authorizer = gdata_oauth2_authorizer_new (CLIENT_ID, CLIENT_SECRET,
+ REDIRECT_URI,
+ GDATA_TYPE_TASKS_SERVICE);
+
+ /* Get an authentication URI. */
+ authentication_uri = gdata_oauth2_authorizer_build_authentication_uri (authorizer, NULL, FALSE);
+ g_assert (authentication_uri != NULL);
+
+ /* Get the authorisation code off the user. */
+ if (uhm_server_get_enable_online (mock_server)) {
+ authorisation_code = gdata_test_query_user_for_verifier (authentication_uri);
+ } else {
+ /* Hard coded, extracted from the trace file. */
+ authorisation_code = g_strdup ("4/OEX-S1iMbOA_dOnNgUlSYmGWh3TK.QrR73axcNMkWoiIBeO6P2m_su7cwkQI");
+ }
+
+ g_free (authentication_uri);
+
+ if (authorisation_code == NULL) {
+ /* Skip tests. */
+ goto skip_test;
+ }
+
+ /* Authorise the token */
+ g_assert (gdata_oauth2_authorizer_request_authorization (authorizer, authorisation_code, NULL, NULL) == TRUE);
+
+ /* Check all is as it should be */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (authorizer),
+ gdata_tasks_service_get_primary_authorization_domain ()) == TRUE);
+
+skip_test:
+ g_free (authorisation_code);
+ g_object_unref (authorizer);
+
+ uhm_server_end_trace (mock_server);
+}
+
+/* Test that building a query URI works with the various parameters. */
+static void
+test_query_uri (void)
+{
+ gchar *query_uri;
+ GDataTasksQuery *query = gdata_tasks_query_new (NULL);
+
+ /* General properties. */
+ gdata_query_set_updated_min (GDATA_QUERY (query), 6789);
+ g_assert_cmpint (gdata_query_get_updated_min (GDATA_QUERY (query)), ==,
+ 6789);
+
+ gdata_query_set_max_results (GDATA_QUERY (query), 10);
+ g_assert_cmpint (gdata_query_get_max_results (GDATA_QUERY (query)), ==,
+ 10);
+
+ /* Google-Tasks-specific properties. */
+ gdata_tasks_query_set_completed_max (query, 1234);
+ g_assert_cmpint (gdata_tasks_query_get_completed_max (query), ==, 1234);
+
+ gdata_tasks_query_set_completed_min (query, 5678);
+ g_assert_cmpint (gdata_tasks_query_get_completed_min (query), ==, 5678);
+
+ gdata_tasks_query_set_due_max (query, 3456);
+ g_assert_cmpint (gdata_tasks_query_get_due_max (query), ==, 3456);
+
+ gdata_tasks_query_set_due_min (query, 2345);
+ g_assert_cmpint (gdata_tasks_query_get_due_min (query), ==, 2345);
+
+ gdata_tasks_query_set_show_completed (query, TRUE);
+ g_assert (gdata_tasks_query_get_show_completed (query));
+
+ gdata_tasks_query_set_show_deleted (query, TRUE);
+ g_assert (gdata_tasks_query_get_show_deleted (query));
+
+ gdata_tasks_query_set_show_hidden (query, TRUE);
+ g_assert (gdata_tasks_query_get_show_hidden (query));
+
+ /* Test the URI. */
+ query_uri = gdata_query_get_query_uri (GDATA_QUERY (query),
+ "http://example.com");
+ g_assert_cmpstr (query_uri, ==,
+ "http://example.com"
+ /* FIXME: First two are outdated fallbacks */
+ "?updated-min=1970-01-01T01:53:09Z"
+ "&max-results=10"
+ "&maxResults=10"
+ "&updatedMin=1970-01-01T01:53:09Z"
+ "&completedMin=1970-01-01T01:34:38Z"
+ "&completedMax=1970-01-01T00:20:34Z"
+ "&dueMin=1970-01-01T00:39:05Z"
+ "&dueMax=1970-01-01T00:57:36Z"
+ "&showCompleted=true"
+ "&showDeleted=true"
+ "&showHidden=true");
+ g_free (query_uri);
+
+ /* Flip the booleans and try again. */
+ gdata_tasks_query_set_show_completed (query, FALSE);
+ g_assert (!gdata_tasks_query_get_show_completed (query));
+
+ gdata_tasks_query_set_show_deleted (query, FALSE);
+ g_assert (!gdata_tasks_query_get_show_deleted (query));
+
+ gdata_tasks_query_set_show_hidden (query, FALSE);
+ g_assert (!gdata_tasks_query_get_show_hidden (query));
+
+ /* Test the URI. */
+ query_uri = gdata_query_get_query_uri (GDATA_QUERY (query),
+ "http://example.com");
+ g_assert_cmpstr (query_uri, ==,
+ "http://example.com"
+ "?updated-min=1970-01-01T01:53:09Z"
+ "&max-results=10"
+ "&maxResults=10"
+ "&updatedMin=1970-01-01T01:53:09Z"
+ "&completedMin=1970-01-01T01:34:38Z"
+ "&completedMax=1970-01-01T00:20:34Z"
+ "&dueMin=1970-01-01T00:39:05Z"
+ "&dueMax=1970-01-01T00:57:36Z"
+ "&showCompleted=false"
+ "&showDeleted=false"
+ "&showHidden=false");
+ g_free (query_uri);
+
+ /* TODO: pageToken */
+
+ g_object_unref (query);
+}
+
+/* Test that setting any property will unset the ETag on a query. */
+static void
+test_query_etag (void)
+{
+ GDataTasksQuery *query = NULL; /* owned */
+
+ query = gdata_tasks_query_new (NULL);
+
+#define CHECK_ETAG(C) \
+ gdata_query_set_etag (GDATA_QUERY (query), "foobar"); \
+ (C); \
+ g_assert (gdata_query_get_etag (GDATA_QUERY (query)) == NULL);
+
+ CHECK_ETAG (gdata_query_set_max_results (GDATA_QUERY (query), 50))
+ CHECK_ETAG (gdata_tasks_query_set_show_deleted (query, FALSE))
+ CHECK_ETAG (gdata_query_set_updated_min (GDATA_QUERY (query), 1234))
+ CHECK_ETAG (gdata_tasks_query_set_completed_min (query, 4567))
+
+#undef CHECK_ETAG
+
+ g_object_unref (query);
+}
+
+/* Test that getting/setting query properties works. */
+static void
+test_query_properties (void)
+{
+ GDataTasksQuery *query = NULL; /* owned */
+ gint64 completed_min, completed_max, due_min, due_max;
+ gboolean show_completed, show_deleted, show_hidden;
+
+ query = gdata_tasks_query_new (NULL);
+
+ /* Set the properties. */
+ g_object_set (G_OBJECT (query),
+ "completed-min", (gint64) 1234,
+ "completed-max", (gint64) 2345,
+ "due-min", (gint64) 3456,
+ "due-max", (gint64) 4567,
+ "show-completed", TRUE,
+ "show-deleted", TRUE,
+ "show-hidden", TRUE,
+ NULL);
+
+ /* Check the query’s properties. */
+ g_object_get (G_OBJECT (query),
+ "completed-min", &completed_min,
+ "completed-max", &completed_max,
+ "due-min", &due_min,
+ "due-max", &due_max,
+ "show-completed", &show_completed,
+ "show-deleted", &show_deleted,
+ "show-hidden", &show_hidden,
+ NULL);
+
+ g_assert_cmpint (completed_min, ==, 1234);
+ g_assert_cmpint (completed_max, ==, 2345);
+ g_assert_cmpint (due_min, ==, 3456);
+ g_assert_cmpint (due_max, ==, 4567);
+ g_assert (show_completed);
+ g_assert (show_deleted);
+ g_assert (show_hidden);
+
+ g_object_unref (query);
+}
+
+/* Test that getting/setting task properties works. */
+static void
+test_task_properties (void)
+{
+ GDataTasksTask *task;
+ gchar *id, *etag, *title, *parent, *position, *notes, *status;
+ gint64 updated, due, completed;
+ gboolean is_deleted, is_hidden;
+
+ task = gdata_tasks_task_new (NULL);
+
+ /* Check the kind is present and correct */
+ g_assert (GDATA_IS_TASKS_TASK (task));
+ gdata_test_compare_kind (GDATA_ENTRY (task), "tasks#task", NULL);
+
+ /* Set all the properties of the object. */
+ gdata_entry_set_title (GDATA_ENTRY (task), "some-title");
+ gdata_tasks_task_set_notes (task, "some-notes");
+ gdata_tasks_task_set_status (task, GDATA_TASKS_STATUS_NEEDS_ACTION);
+ gdata_tasks_task_set_due (task, 1409419209);
+ gdata_tasks_task_set_completed (task, 1409419200); /* 9 seconds to spare! */
+ gdata_tasks_task_set_is_deleted (task, FALSE);
+ gdata_tasks_task_set_position (task, "0");
+ gdata_tasks_task_set_parent (task, NULL);
+
+ /* Check the properties of the object */
+ g_object_get (G_OBJECT (task),
+ "id", &id,
+ "etag", &etag,
+ "title", &title,
+ "updated", &updated,
+ "parent", &parent,
+ "position", &position,
+ "notes", ¬es,
+ "status", &status,
+ "due", &due,
+ "completed", &completed,
+ "is-deleted", &is_deleted,
+ "is-hidden", &is_hidden,
+ NULL);
+
+ g_assert_cmpstr (id, ==, NULL);
+ g_assert_cmpstr (etag, ==, NULL);
+ g_assert_cmpstr (title, ==, "some-title");
+ g_assert_cmpint (updated, ==, -1);
+ g_assert_cmpstr (parent, ==, NULL);
+ g_assert_cmpstr (position, ==, "0");
+ g_assert_cmpstr (notes, ==, "some-notes");
+ g_assert_cmpstr (status, ==, GDATA_TASKS_STATUS_NEEDS_ACTION);
+ g_assert_cmpint (due, ==, 1409419209);
+ g_assert_cmpint (completed, ==, 1409419200);
+ g_assert (!is_deleted);
+ g_assert (!is_hidden);
+
+ g_free (status);
+ g_free (notes);
+ g_free (position);
+ g_free (parent);
+ g_free (title);
+ g_free (etag);
+ g_free (id);
+
+ /* Set the properties another way. */
+ g_object_set (G_OBJECT (task),
+ "title", "some-other-title",
+ "notes", "more-notes",
+ "status", GDATA_TASKS_STATUS_COMPLETED,
+ "due", (gint64) 1409419200,
+ "completed", (gint64) 1409419200, /* no time to spare! */
+ "is-deleted", TRUE,
+ "parent", "parent-uid",
+ "position", "1",
+ NULL);
+
+ /* Check the properties using the getters. */
+ g_assert_cmpstr (gdata_tasks_task_get_parent (task), ==, "parent-uid");
+ g_assert_cmpstr (gdata_tasks_task_get_position (task), ==, "1");
+ g_assert_cmpstr (gdata_tasks_task_get_notes (task), ==, "more-notes");
+ g_assert_cmpstr (gdata_tasks_task_get_status (task), ==,
+ GDATA_TASKS_STATUS_COMPLETED);
+ g_assert_cmpint (gdata_tasks_task_get_due (task), ==, 1409419200);
+ g_assert_cmpint (gdata_tasks_task_get_completed (task), ==, 1409419200);
+ g_assert (gdata_tasks_task_is_deleted (task));
+ g_assert (!gdata_tasks_task_is_hidden (task));
+
+ /* Check the JSON. */
+ gdata_test_assert_json (task,
+ "{"
+ "\"kind\": \"tasks#task\","
+ "\"title\": \"some-other-title\","
+ "\"notes\": \"more-notes\","
+ "\"status\": \"completed\","
+ "\"due\": \"2014-08-30T17:20:00Z\","
+ "\"completed\": \"2014-08-30T17:20:00Z\","
+ "\"deleted\": true,"
+ "\"position\": \"1\","
+ "\"parent\": \"parent-uid\","
+ "\"hidden\": false"
+ "}");
+
+ /* Try again, marking it as undeleted. */
+ gdata_tasks_task_set_is_deleted (task, FALSE);
+
+ gdata_test_assert_json (task,
+ "{"
+ "\"kind\": \"tasks#task\","
+ "\"title\": \"some-other-title\","
+ "\"notes\": \"more-notes\","
+ "\"status\": \"completed\","
+ "\"due\": \"2014-08-30T17:20:00Z\","
+ "\"completed\": \"2014-08-30T17:20:00Z\","
+ "\"deleted\": false,"
+ "\"position\": \"1\","
+ "\"parent\": \"parent-uid\","
+ "\"hidden\": false"
+ "}");
+
+ g_object_unref (task);
+}
+
+/* Test that escaping task properties for JSON works. */
+static void
+test_task_escaping (void)
+{
+ GDataTasksTask *task;
+
+ task = gdata_tasks_task_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (task), "Title \"with quotes\"");
+ gdata_tasks_task_set_notes (task, "Notes \"with quotes\" and Emoji 😂.");
+ gdata_tasks_task_set_status (task, "invalid status \"with quotes\"");
+
+ /* Check the outputted JSON is escaped properly. */
+ gdata_test_assert_json (task,
+ "{"
+ "\"kind\": \"tasks#task\","
+ "\"title\": \"Title \\\"with quotes\\\"\","
+ "\"notes\": \"Notes \\\"with quotes\\\" and Emoji 😂.\","
+ "\"status\": \"invalid status \\\"with quotes\\\"\","
+ "\"deleted\": false,"
+ "\"hidden\": false"
+ "}");
+
+ g_object_unref (task);
+}
+
+/* Test the task parser with the minimal number of properties specified. */
+static void
+test_task_parser_minimal (void)
+{
+ GDataTasksTask *task = NULL; /* owned */
+ GDataEntry *entry; /* unowned */
+ GDataLink *self_link; /* unowned */
+ GError *error = NULL;
+
+ task = GDATA_TASKS_TASK (gdata_parsable_new_from_json (GDATA_TYPE_TASKS_TASK,
+ "{"
+ "\"kind\": \"tasks#task\","
+ "\"id\": \"some-id\","
+ "\"title\": \"some-title \\\"with quotes\\\"\","
+ "\"updated\": \"2014-08-30T19:40:00Z\","
+ "\"selfLink\": \"http://some-uri/\","
+ "\"position\": \"some-position\","
+ "\"status\": \"needsAction\","
+ "\"deleted\": true,"
+ "\"hidden\": true"
+ "}", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_TASKS_TASK (task));
+ gdata_test_compare_kind (GDATA_ENTRY (task), "tasks#task", NULL);
+
+ entry = GDATA_ENTRY (task);
+
+ /* Check the task’s properties. */
+ g_assert_cmpstr (gdata_entry_get_id (entry), ==, "some-id");
+ g_assert_cmpstr (gdata_entry_get_etag (entry), ==, NULL);
+ g_assert_cmpstr (gdata_entry_get_title (entry), ==,
+ "some-title \"with quotes\"");
+ g_assert_cmpint (gdata_entry_get_updated (entry), ==, 1409427600);
+ g_assert_cmpstr (gdata_tasks_task_get_parent (task), ==, NULL);
+ g_assert_cmpstr (gdata_tasks_task_get_notes (task), ==, NULL);
+ g_assert_cmpstr (gdata_tasks_task_get_status (task), ==,
+ GDATA_TASKS_STATUS_NEEDS_ACTION);
+ g_assert_cmpint (gdata_tasks_task_get_due (task), ==, -1);
+ g_assert_cmpint (gdata_tasks_task_get_completed (task), ==, -1);
+ g_assert (gdata_tasks_task_is_deleted (task));
+ g_assert (gdata_tasks_task_is_hidden (task));
+
+ self_link = gdata_entry_look_up_link (entry, GDATA_LINK_SELF);
+ g_assert (GDATA_IS_LINK (self_link));
+ g_assert_cmpstr (gdata_link_get_uri (self_link), ==,
+ "http://some-uri/");
+ g_assert_cmpstr (gdata_link_get_relation_type (self_link), ==,
+ GDATA_LINK_SELF);
+ g_assert_cmpstr (gdata_link_get_content_type (self_link), ==, NULL);
+ g_assert_cmpstr (gdata_link_get_language (self_link), ==, NULL);
+ g_assert_cmpstr (gdata_link_get_title (self_link), ==, NULL);
+ g_assert_cmpint (gdata_link_get_length (self_link), ==, -1);
+
+ g_object_unref (task);
+}
+
+/* Test the task parser with a maximal number of properties specified. */
+static void
+test_task_parser_normal (void)
+{
+ GDataTasksTask *task = NULL; /* owned */
+ GDataEntry *entry; /* unowned */
+ GDataLink *self_link; /* unowned */
+ GError *error = NULL;
+
+ task = GDATA_TASKS_TASK (gdata_parsable_new_from_json (GDATA_TYPE_TASKS_TASK,
+ "{"
+ "\"kind\": \"tasks#task\","
+ "\"id\": \"some-id\","
+ "\"etag\": \"some-etag\","
+ "\"title\": \"some-title \\\"with quotes\\\"\","
+ "\"updated\": \"2014-08-30T19:40:00Z\","
+ "\"selfLink\": \"http://some-uri/\","
+ "\"parent\": \"some-parent-id\","
+ "\"position\": \"some-position\","
+ "\"notes\": \"Some notes!\","
+ "\"status\": \"needsAction\","
+ "\"due\": \"2014-08-30T20:00:00Z\","
+ "\"completed\": \"2014-08-30T20:10:05Z\","
+ "\"deleted\": false,"
+ "\"hidden\": true,"
+ /* Unhandled for the moment: */
+ "\"links\": ["
+ "{"
+ "\"type\": \"email\","
+ "\"description\": \"some-email\","
+ "\"link\": \"example@example.com\""
+ "}"
+ "]"
+ "}", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_TASKS_TASK (task));
+ gdata_test_compare_kind (GDATA_ENTRY (task), "tasks#task", NULL);
+
+ entry = GDATA_ENTRY (task);
+
+ /* Check the task’s properties. */
+ g_assert_cmpstr (gdata_entry_get_id (entry), ==, "some-id");
+ g_assert_cmpstr (gdata_entry_get_etag (entry), ==, "some-etag");
+ g_assert_cmpstr (gdata_entry_get_title (entry), ==,
+ "some-title \"with quotes\"");
+ g_assert_cmpint (gdata_entry_get_updated (entry), ==, 1409427600);
+ g_assert_cmpstr (gdata_tasks_task_get_parent (task), ==,
+ "some-parent-id");
+ g_assert_cmpstr (gdata_tasks_task_get_notes (task), ==, "Some notes!");
+ g_assert_cmpstr (gdata_tasks_task_get_status (task), ==,
+ GDATA_TASKS_STATUS_NEEDS_ACTION);
+ g_assert_cmpint (gdata_tasks_task_get_due (task), ==, 1409428800);
+ g_assert_cmpint (gdata_tasks_task_get_completed (task), ==, 1409429405);
+ g_assert (!gdata_tasks_task_is_deleted (task));
+ g_assert (gdata_tasks_task_is_hidden (task));
+
+ self_link = gdata_entry_look_up_link (entry, GDATA_LINK_SELF);
+ g_assert (GDATA_IS_LINK (self_link));
+ g_assert_cmpstr (gdata_link_get_uri (self_link), ==,
+ "http://some-uri/");
+ g_assert_cmpstr (gdata_link_get_relation_type (self_link), ==,
+ GDATA_LINK_SELF);
+ g_assert_cmpstr (gdata_link_get_content_type (self_link), ==, NULL);
+ g_assert_cmpstr (gdata_link_get_language (self_link), ==, NULL);
+ g_assert_cmpstr (gdata_link_get_title (self_link), ==, NULL);
+ g_assert_cmpint (gdata_link_get_length (self_link), ==, -1);
+
+ /* Check that the same JSON is re-generated. */
+ gdata_test_assert_json (task,
+ "{"
+ "\"kind\": \"tasks#task\","
+ "\"id\": \"some-id\","
+ "\"etag\": \"some-etag\","
+ "\"title\": \"some-title \\\"with quotes\\\"\","
+ "\"updated\": \"2014-08-30T19:40:00Z\","
+ "\"selfLink\": \"http://some-uri/\","
+ "\"parent\": \"some-parent-id\","
+ "\"position\": \"some-position\","
+ "\"notes\": \"Some notes!\","
+ "\"status\": \"needsAction\","
+ "\"due\": \"2014-08-30T20:00:00Z\","
+ "\"completed\": \"2014-08-30T20:10:05Z\","
+ "\"deleted\": false,"
+ "\"hidden\": true,"
+ /* Unhandled for the moment: */
+ "\"links\": ["
+ "{"
+ "\"type\": \"email\","
+ "\"description\": \"some-email\","
+ "\"link\": \"example@example.com\""
+ "}"
+ "]"
+ "}");
+
+ g_object_unref (task);
+}
+
+/* Test that inserting a tasklist works. */
+typedef struct {
+ GDataTasksTasklist *new_tasklist;
+} InsertTasklistData;
+
+static void
+set_up_insert_tasklist (InsertTasklistData *data, gconstpointer service)
+{
+ data->new_tasklist = NULL;
+}
+
+static void
+tear_down_insert_tasklist (InsertTasklistData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "teardown-insert-tasklist");
+
+ /* Delete the new tasklist. */
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_tasks_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->new_tasklist), NULL, NULL) == TRUE);
+
+ g_object_unref (data->new_tasklist);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_tasklist_insert (InsertTasklistData *data, gconstpointer service)
+{
+ GDataTasksTasklist *tasklist = NULL; /* owned */
+ GDataEntry *new_entry; /* unowned */
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "tasklist-insert");
+
+ /* Create the tasklist. */
+ tasklist = gdata_tasks_tasklist_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (tasklist), "My list of things");
+
+ /* Insert it. */
+ data->new_tasklist = gdata_tasks_service_insert_tasklist (GDATA_TASKS_SERVICE (service),
+ tasklist,
+ NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_TASKS_TASKLIST (data->new_tasklist));
+ gdata_test_compare_kind (GDATA_ENTRY (data->new_tasklist),
+ "tasks#taskList", NULL);
+
+ new_entry = GDATA_ENTRY (data->new_tasklist);
+
+ /* Check properties. */
+ g_assert_cmpstr (gdata_entry_get_id (new_entry), !=, NULL);
+ g_assert_cmpstr (gdata_entry_get_etag (new_entry), !=, NULL);
+ g_assert_cmpstr (gdata_entry_get_title (new_entry), ==,
+ gdata_entry_get_title (GDATA_ENTRY (tasklist)));
+ g_assert_cmpint (gdata_entry_get_updated (new_entry), >, -1);
+
+ g_object_unref (tasklist);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_tasklist_insert_unauthorised (gconstpointer service)
+{
+ GDataTasksTasklist *tasklist = NULL; /* owned */
+ GDataTasksTasklist *new_tasklist = NULL; /* owned */
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server,
+ "tasklist-insert-unauthorised");
+
+ /* Create the tasklist. */
+ tasklist = gdata_tasks_tasklist_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (tasklist), "My list of things");
+
+ /* Insert it. */
+ new_tasklist = gdata_tasks_service_insert_tasklist (GDATA_TASKS_SERVICE (service),
+ tasklist,
+ NULL, &error);
+ g_assert_error (error, GDATA_SERVICE_ERROR,
+ GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED);
+ g_assert (new_tasklist == NULL);
+
+ g_object_unref (tasklist);
+
+ uhm_server_end_trace (mock_server);
+}
+
+/* Test that listing tasklists works. */
+typedef struct {
+ GDataTasksTasklist *tasklist1;
+ GDataTasksTasklist *tasklist2;
+ GDataTasksTasklist *tasklist3;
+} ListTasklistData;
+
+static void
+set_up_list_tasklist (ListTasklistData *data, gconstpointer service)
+{
+ GDataTasksTasklist *tasklist = NULL; /* owned */
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-list-tasklist");
+
+ /* Create the tasklist. */
+ tasklist = gdata_tasks_tasklist_new (NULL);
+
+ /* Insert it. */
+ gdata_entry_set_title (GDATA_ENTRY (tasklist), "Tasklist 1");
+ data->tasklist1 = gdata_tasks_service_insert_tasklist (GDATA_TASKS_SERVICE (service),
+ tasklist,
+ NULL, &error);
+ g_assert_no_error (error);
+
+ gdata_entry_set_title (GDATA_ENTRY (tasklist), "Tasklist 2");
+ data->tasklist2 = gdata_tasks_service_insert_tasklist (GDATA_TASKS_SERVICE (service),
+ tasklist,
+ NULL, &error);
+ g_assert_no_error (error);
+
+ gdata_entry_set_title (GDATA_ENTRY (tasklist), "Tasklist 3");
+ data->tasklist3 = gdata_tasks_service_insert_tasklist (GDATA_TASKS_SERVICE (service),
+ tasklist,
+ NULL, &error);
+ g_assert_no_error (error);
+
+ g_object_unref (tasklist);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+tear_down_list_tasklist (ListTasklistData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "teardown-list-tasklist");
+
+ /* Delete the tasklists. */
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_tasks_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->tasklist1), NULL, NULL) == TRUE);
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_tasks_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->tasklist2), NULL, NULL) == TRUE);
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_tasks_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->tasklist3), NULL, NULL) == TRUE);
+
+ g_object_unref (data->tasklist1);
+ g_object_unref (data->tasklist2);
+ g_object_unref (data->tasklist3);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_tasklist_list (ListTasklistData *data, gconstpointer service)
+{
+ GDataFeed *feed = NULL; /* owned */
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "tasklist-list");
+
+ feed = gdata_tasks_service_query_all_tasklists (GDATA_TASKS_SERVICE (service),
+ NULL, NULL, NULL, NULL,
+ &error);
+ g_assert_no_error (error);
+
+ /* Check the three tasklists are present. */
+ g_assert (gdata_feed_look_up_entry (feed, gdata_entry_get_id (GDATA_ENTRY (data->tasklist1))) != NULL);
+ g_assert (gdata_feed_look_up_entry (feed, gdata_entry_get_id (GDATA_ENTRY (data->tasklist2))) != NULL);
+ g_assert (gdata_feed_look_up_entry (feed, gdata_entry_get_id (GDATA_ENTRY (data->tasklist3))) != NULL);
+
+ g_object_unref (feed);
+
+ uhm_server_end_trace (mock_server);
+}
+
+/* Test that updating a single tasklist works. */
+typedef struct {
+ GDataTasksTasklist *tasklist;
+} UpdateTasklistData;
+
+static void
+set_up_update_tasklist (UpdateTasklistData *data, gconstpointer service)
+{
+ GDataTasksTasklist *tasklist = NULL; /* owned */
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-update-tasklist");
+
+ /* Create the tasklist. */
+ tasklist = gdata_tasks_tasklist_new (NULL);
+
+ /* Insert it. */
+ gdata_entry_set_title (GDATA_ENTRY (tasklist), "Some tasklist");
+ data->tasklist = gdata_tasks_service_insert_tasklist (GDATA_TASKS_SERVICE (service),
+ tasklist,
+ NULL, &error);
+ g_assert_no_error (error);
+
+ g_object_unref (tasklist);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+tear_down_update_tasklist (UpdateTasklistData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "teardown-update-tasklist");
+
+ /* Delete the tasklist. */
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_tasks_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->tasklist), NULL, NULL) == TRUE);
+ g_object_unref (data->tasklist);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_tasklist_update (UpdateTasklistData *data, gconstpointer service)
+{
+ GDataTasksTasklist *updated_tasklist = NULL; /* owned */
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "tasklist-update");
+
+ /* Update the tasklist. */
+ gdata_entry_set_title (GDATA_ENTRY (data->tasklist), "New Title!");
+
+ updated_tasklist = gdata_tasks_service_update_tasklist (GDATA_TASKS_SERVICE (service),
+ data->tasklist,
+ NULL, &error);
+ g_assert_no_error (error);
+
+ /* Check the updated tasklist. */
+ g_assert (GDATA_IS_TASKS_TASKLIST (updated_tasklist));
+ g_assert_cmpstr (gdata_entry_get_title (GDATA_ENTRY (updated_tasklist)),
+ ==, "New Title!");
+
+ g_object_unref (data->tasklist);
+ data->tasklist = updated_tasklist;
+
+ uhm_server_end_trace (mock_server);
+}
+
+/* Test that deleting a single tasklist works. */
+typedef struct {
+ GDataTasksTasklist *tasklist;
+} DeleteTasklistData;
+
+static void
+set_up_delete_tasklist (DeleteTasklistData *data, gconstpointer service)
+{
+ GDataTasksTasklist *tasklist = NULL; /* owned */
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-delete-tasklist");
+
+ /* Create the tasklist. */
+ tasklist = gdata_tasks_tasklist_new (NULL);
+
+ /* Insert it. */
+ gdata_entry_set_title (GDATA_ENTRY (tasklist), "Some tasklist");
+ data->tasklist = gdata_tasks_service_insert_tasklist (GDATA_TASKS_SERVICE (service),
+ tasklist,
+ NULL, &error);
+ g_assert_no_error (error);
+
+ g_object_unref (tasklist);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+tear_down_delete_tasklist (DeleteTasklistData *data, gconstpointer service)
+{
+ g_object_unref (data->tasklist);
+}
+
+static void
+test_tasklist_delete (DeleteTasklistData *data, gconstpointer service)
+{
+ gboolean retval;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "tasklist-delete");
+
+ /* Delete the tasklist. */
+ retval = gdata_tasks_service_delete_tasklist (GDATA_TASKS_SERVICE (service),
+ data->tasklist,
+ NULL, &error);
+ g_assert_no_error (error);
+ g_assert (retval);
+
+ uhm_server_end_trace (mock_server);
+}
+
+/* Test that inserting a task works. */
+typedef struct {
+ GDataTasksTasklist *tasklist;
+ GDataTasksTask *new_task;
+} InsertTaskData;
+
+static void
+set_up_insert_task (InsertTaskData *data, gconstpointer service)
+{
+ GDataTasksTasklist *tasklist = NULL;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-insert-task");
+
+ /* Create a tasklist. */
+ tasklist = gdata_tasks_tasklist_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (tasklist), "Some tasklist");
+ data->tasklist = gdata_tasks_service_insert_tasklist (GDATA_TASKS_SERVICE (service),
+ tasklist,
+ NULL, &error);
+ g_assert_no_error (error);
+
+ data->new_task = NULL;
+
+ g_object_unref (tasklist);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+tear_down_insert_task (InsertTaskData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "teardown-insert-task");
+
+ /* Delete the new task. */
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_tasks_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->new_task), NULL, NULL) == TRUE);
+ g_object_unref (data->new_task);
+
+ /* Delete the tasklist. */
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_tasks_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->tasklist), NULL, NULL) == TRUE);
+ g_object_unref (data->tasklist);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_task_insert (InsertTaskData *data, gconstpointer service)
+{
+ GDataTasksTask *task = NULL; /* owned */
+ GDataEntry *new_entry; /* unowned */
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "task-insert");
+
+ /* Create the task. */
+ task = gdata_tasks_task_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (task), "My list of things");
+
+ /* Insert it. */
+ data->new_task = gdata_tasks_service_insert_task (GDATA_TASKS_SERVICE (service),
+ task, data->tasklist,
+ NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_TASKS_TASK (data->new_task));
+ gdata_test_compare_kind (GDATA_ENTRY (data->new_task),
+ "tasks#task", NULL);
+
+ new_entry = GDATA_ENTRY (data->new_task);
+
+ /* Check properties. */
+ g_assert_cmpstr (gdata_entry_get_id (new_entry), !=, NULL);
+ g_assert_cmpstr (gdata_entry_get_etag (new_entry), !=, NULL);
+ g_assert_cmpstr (gdata_entry_get_title (new_entry), ==,
+ gdata_entry_get_title (GDATA_ENTRY (task)));
+ g_assert_cmpint (gdata_entry_get_updated (new_entry), >, -1);
+
+ g_object_unref (task);
+
+ uhm_server_end_trace (mock_server);
+}
+
+/* Test that listing tasks works. */
+typedef struct {
+ GDataTasksTasklist *tasklist;
+ GDataTasksTask *task1;
+ GDataTasksTask *task2;
+ GDataTasksTask *task3;
+} ListTaskData;
+
+static void
+set_up_list_task (ListTaskData *data, gconstpointer service)
+{
+ GDataTasksTasklist *tasklist = NULL; /* owned */
+ GDataTasksTask *task = NULL; /* owned */
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-list-task");
+
+ /* Create a tasklist. */
+ tasklist = gdata_tasks_tasklist_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (tasklist), "Some tasklist");
+ data->tasklist = gdata_tasks_service_insert_tasklist (GDATA_TASKS_SERVICE (service),
+ tasklist,
+ NULL, &error);
+ g_assert_no_error (error);
+
+ /* Create the task. */
+ task = gdata_tasks_task_new (NULL);
+
+ /* Insert it. */
+ gdata_entry_set_title (GDATA_ENTRY (task), "Task 1");
+ data->task1 = gdata_tasks_service_insert_task (GDATA_TASKS_SERVICE (service),
+ task, data->tasklist,
+ NULL, &error);
+ g_assert_no_error (error);
+
+ gdata_entry_set_title (GDATA_ENTRY (task), "Task 2");
+ data->task2 = gdata_tasks_service_insert_task (GDATA_TASKS_SERVICE (service),
+ task, data->tasklist,
+ NULL, &error);
+ g_assert_no_error (error);
+
+ gdata_entry_set_title (GDATA_ENTRY (task), "Task 3");
+ data->task3 = gdata_tasks_service_insert_task (GDATA_TASKS_SERVICE (service),
+ task, data->tasklist,
+ NULL, &error);
+ g_assert_no_error (error);
+
+ g_object_unref (task);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+tear_down_list_task (ListTaskData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "teardown-list-task");
+
+ /* Delete the tasks. */
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_tasks_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->task1), NULL, NULL) == TRUE);
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_tasks_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->task2), NULL, NULL) == TRUE);
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_tasks_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->task3), NULL, NULL) == TRUE);
+
+ g_object_unref (data->task1);
+ g_object_unref (data->task2);
+ g_object_unref (data->task3);
+
+ /* Delete the tasklist. */
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_tasks_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->tasklist), NULL, NULL) == TRUE);
+ g_object_unref (data->tasklist);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_task_list (ListTaskData *data, gconstpointer service)
+{
+ GDataFeed *feed = NULL; /* owned */
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "task-list");
+
+ feed = gdata_tasks_service_query_tasks (GDATA_TASKS_SERVICE (service),
+ data->tasklist, NULL, NULL,
+ NULL, NULL, &error);
+ g_assert_no_error (error);
+
+ /* Check the three tasks are present. */
+ g_assert (gdata_feed_look_up_entry (feed, gdata_entry_get_id (GDATA_ENTRY (data->task1))) != NULL);
+ g_assert (gdata_feed_look_up_entry (feed, gdata_entry_get_id (GDATA_ENTRY (data->task2))) != NULL);
+ g_assert (gdata_feed_look_up_entry (feed, gdata_entry_get_id (GDATA_ENTRY (data->task3))) != NULL);
+
+ g_object_unref (feed);
+
+ uhm_server_end_trace (mock_server);
+}
+
+/* Test that updating a single task works. */
+typedef struct {
+ GDataTasksTasklist *tasklist;
+ GDataTasksTask *task;
+} UpdateTaskData;
+
+static void
+set_up_update_task (UpdateTaskData *data, gconstpointer service)
+{
+ GDataTasksTasklist *tasklist = NULL; /* owned */
+ GDataTasksTask *task = NULL; /* owned */
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-update-task");
+
+ /* Create a tasklist. */
+ tasklist = gdata_tasks_tasklist_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (tasklist), "Some tasklist");
+ data->tasklist = gdata_tasks_service_insert_tasklist (GDATA_TASKS_SERVICE (service),
+ tasklist,
+ NULL, &error);
+ g_assert_no_error (error);
+
+ /* Create the task. */
+ task = gdata_tasks_task_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (task), "Some task");
+ data->task = gdata_tasks_service_insert_task (GDATA_TASKS_SERVICE (service),
+ task, data->tasklist,
+ NULL, &error);
+ g_assert_no_error (error);
+
+ g_object_unref (task);
+ g_object_unref (tasklist);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+tear_down_update_task (UpdateTaskData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "teardown-update-task");
+
+ /* Delete the task. */
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_tasks_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->task), NULL, NULL) == TRUE);
+ g_object_unref (data->task);
+
+ /* Delete the tasklist. */
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_tasks_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->tasklist), NULL, NULL) == TRUE);
+ g_object_unref (data->tasklist);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_task_update (UpdateTaskData *data, gconstpointer service)
+{
+ GDataTasksTask *updated_task = NULL; /* owned */
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "task-update");
+
+ /* Update the task. */
+ gdata_entry_set_title (GDATA_ENTRY (data->task), "New Title!");
+
+ updated_task = gdata_tasks_service_update_task (GDATA_TASKS_SERVICE (service),
+ data->task,
+ NULL, &error);
+ g_assert_no_error (error);
+
+ /* Check the updated task. */
+ g_assert (GDATA_IS_TASKS_TASK (updated_task));
+ g_assert_cmpstr (gdata_entry_get_title (GDATA_ENTRY (updated_task)),
+ ==, "New Title!");
+
+ g_object_unref (data->task);
+ data->task = updated_task;
+
+ uhm_server_end_trace (mock_server);
+}
+
+/* Test that deleting a single task works. */
+typedef struct {
+ GDataTasksTasklist *tasklist;
+ GDataTasksTask *task;
+} DeleteTaskData;
+
+static void
+set_up_delete_task (DeleteTaskData *data, gconstpointer service)
+{
+ GDataTasksTasklist *tasklist = NULL; /* owned */
+ GDataTasksTask *task = NULL; /* owned */
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-delete-task");
+
+ /* Create a tasklist. */
+ tasklist = gdata_tasks_tasklist_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (tasklist), "Some tasklist");
+ data->tasklist = gdata_tasks_service_insert_tasklist (GDATA_TASKS_SERVICE (service),
+ tasklist,
+ NULL, &error);
+ g_assert_no_error (error);
+
+ /* Create the task. */
+ task = gdata_tasks_task_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (task), "Some task");
+ data->task = gdata_tasks_service_insert_task (GDATA_TASKS_SERVICE (service),
+ task, data->tasklist,
+ NULL, &error);
+ g_assert_no_error (error);
+
+ g_object_unref (task);
+ g_object_unref (tasklist);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+tear_down_delete_task (DeleteTaskData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "teardown-delete-task");
+
+ g_object_unref (data->task);
+
+ /* Delete the tasklist. */
+ g_assert (gdata_service_delete_entry (GDATA_SERVICE (service), gdata_tasks_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->tasklist), NULL, NULL) == TRUE);
+ g_object_unref (data->tasklist);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_task_delete (DeleteTaskData *data, gconstpointer service)
+{
+ gboolean retval;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "task-delete");
+
+ /* Delete the task. */
+ retval = gdata_tasks_service_delete_task (GDATA_TASKS_SERVICE (service),
+ data->task, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (retval);
+
+ uhm_server_end_trace (mock_server);
+}
+
+/* Test that getting/setting tasklist properties works. */
+static void
+test_tasklist_properties (void)
+{
+ GDataTasksTasklist *tasklist;
+ gchar *id, *etag, *title;
+ gint64 updated;
+
+ tasklist = gdata_tasks_tasklist_new (NULL);
+
+ /* Check the kind is present and correct */
+ g_assert (GDATA_IS_TASKS_TASKLIST (tasklist));
+ gdata_test_compare_kind (GDATA_ENTRY (tasklist),
+ "tasks#taskList", NULL);
+
+ /* Set all the properties of the object. */
+ gdata_entry_set_title (GDATA_ENTRY (tasklist), "some-title");
+
+ /* Check the properties of the object */
+ g_object_get (G_OBJECT (tasklist),
+ "id", &id,
+ "etag", &etag,
+ "title", &title,
+ "updated", &updated,
+ NULL);
+
+ g_assert_cmpstr (id, ==, NULL);
+ g_assert_cmpstr (etag, ==, NULL);
+ g_assert_cmpstr (title, ==, "some-title");
+ g_assert_cmpint (updated, ==, -1);
+
+ g_free (title);
+ g_free (etag);
+ g_free (id);
+
+ /* Check the properties using the getters. */
+ g_assert_cmpstr (gdata_entry_get_id (GDATA_ENTRY (tasklist)), ==, NULL);
+ g_assert_cmpstr (gdata_entry_get_etag (GDATA_ENTRY (tasklist)), ==,
+ NULL);
+ g_assert_cmpstr (gdata_entry_get_title (GDATA_ENTRY (tasklist)), ==,
+ "some-title");
+ g_assert_cmpint (gdata_entry_get_updated (GDATA_ENTRY (tasklist)), ==,
+ -1);
+
+ /* Check the JSON. */
+ gdata_test_assert_json (tasklist,
+ "{"
+ "\"kind\": \"tasks#taskList\","
+ "\"title\": \"some-title\""
+ "}");
+
+ g_object_unref (tasklist);
+}
+
+/* Test that escaping tasklist properties for JSON works. */
+static void
+test_tasklist_escaping (void)
+{
+ GDataTasksTasklist *tasklist;
+
+ tasklist = gdata_tasks_tasklist_new (NULL);
+ gdata_entry_set_title (GDATA_ENTRY (tasklist), "Title \"with quotes\"");
+
+ /* Check the outputted JSON is escaped properly. */
+ gdata_test_assert_json (tasklist,
+ "{"
+ "\"kind\": \"tasks#taskList\","
+ "\"title\": \"Title \\\"with quotes\\\"\""
+ "}");
+
+ g_object_unref (tasklist);
+}
+
+/* Test the tasklist parser with a maximal number of properties specified. */
+static void
+test_tasklist_parser_normal (void)
+{
+ GDataTasksTasklist *tasklist = NULL; /* owned */
+ GDataEntry *entry; /* unowned */
+ GDataLink *self_link; /* unowned */
+ GError *error = NULL;
+
+ tasklist = GDATA_TASKS_TASKLIST (gdata_parsable_new_from_json (GDATA_TYPE_TASKS_TASKLIST,
+ "{"
+ "\"kind\": \"tasks#taskList\","
+ "\"id\": \"some-id\","
+ "\"etag\": \"some-etag\","
+ "\"title\": \"some-title \\\"with quotes\\\"\","
+ "\"updated\": \"2014-08-30T19:40:00Z\","
+ "\"selfLink\": \"http://some-uri/\""
+ "}", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_TASKS_TASKLIST (tasklist));
+ gdata_test_compare_kind (GDATA_ENTRY (tasklist),
+ "tasks#taskList", NULL);
+
+ entry = GDATA_ENTRY (tasklist);
+
+ /* Check the tasklist’s properties. */
+ g_assert_cmpstr (gdata_entry_get_id (entry), ==, "some-id");
+ g_assert_cmpstr (gdata_entry_get_etag (entry), ==, "some-etag");
+ g_assert_cmpstr (gdata_entry_get_title (entry), ==,
+ "some-title \"with quotes\"");
+ g_assert_cmpint (gdata_entry_get_updated (entry), ==, 1409427600);
+
+ self_link = gdata_entry_look_up_link (entry, GDATA_LINK_SELF);
+ g_assert (GDATA_IS_LINK (self_link));
+ g_assert_cmpstr (gdata_link_get_uri (self_link), ==,
+ "http://some-uri/");
+ g_assert_cmpstr (gdata_link_get_relation_type (self_link), ==,
+ GDATA_LINK_SELF);
+ g_assert_cmpstr (gdata_link_get_content_type (self_link), ==, NULL);
+ g_assert_cmpstr (gdata_link_get_language (self_link), ==, NULL);
+ g_assert_cmpstr (gdata_link_get_title (self_link), ==, NULL);
+ g_assert_cmpint (gdata_link_get_length (self_link), ==, -1);
+
+ g_object_unref (tasklist);
+}
+
+static void
+mock_server_notify_resolver_cb (GObject *object, GParamSpec *pspec,
+ gpointer user_data)
+{
+ UhmServer *server;
+ UhmResolver *resolver;
+
+ server = UHM_SERVER (object);
+
+ /* Set up the expected domain names here. This should technically be
+ * split up between the different unit test suites, but that's too much
+ * effort. */
+ resolver = uhm_server_get_resolver (server);
+
+ if (resolver != NULL) {
+ const gchar *ip_address = uhm_server_get_address (server);
+
+ uhm_resolver_add_A (resolver, "www.google.com", ip_address);
+ uhm_resolver_add_A (resolver, "www.googleapis.com", ip_address);
+ uhm_resolver_add_A (resolver,
+ "accounts.google.com", ip_address);
+ }
+}
+
+/* Set up a global GDataAuthorizer to be used for all the tests. Unfortunately,
+ * the Google Tasks API is limited to OAuth1 and OAuth2 authorisation, so this
+ * requires user interaction when online.
+ *
+ * If not online, use a dummy authoriser. */
+static GDataAuthorizer *
+create_global_authorizer (void)
+{
+ GDataOAuth2Authorizer *authorizer = NULL; /* owned */
+ gchar *authentication_uri, *authorisation_code;
+ GError *error = NULL;
+
+ /* If not online, just return a dummy authoriser. */
+ if (!uhm_server_get_enable_online (mock_server)) {
+ return GDATA_AUTHORIZER (gdata_dummy_authorizer_new (GDATA_TYPE_TASKS_SERVICE));
+ }
+
+ /* Otherwise, go through the interactive OAuth dance. */
+ gdata_test_mock_server_start_trace (mock_server, "global-authentication");
+ authorizer = gdata_oauth2_authorizer_new (CLIENT_ID, CLIENT_SECRET,
+ REDIRECT_URI,
+ GDATA_TYPE_TASKS_SERVICE);
+
+ /* Get an authentication URI */
+ authentication_uri = gdata_oauth2_authorizer_build_authentication_uri (authorizer, NULL, FALSE);
+ g_assert (authentication_uri != NULL);
+
+ /* Get the authorisation code off the user. */
+ authorisation_code = gdata_test_query_user_for_verifier (authentication_uri);
+
+ g_free (authentication_uri);
+
+ if (authorisation_code == NULL) {
+ /* Skip tests. */
+ g_object_unref (authorizer);
+ authorizer = NULL;
+ goto skip_test;
+ }
+
+ /* Authorise the token */
+ g_assert (gdata_oauth2_authorizer_request_authorization (authorizer, authorisation_code, NULL, &error));
+ g_assert_no_error (error);
+
+skip_test:
+ g_free (authorisation_code);
+
+ uhm_server_end_trace (mock_server);
+
+ return GDATA_AUTHORIZER (authorizer);
+}
+
+int
+main (int argc, char *argv[])
+{
+ gint retval;
+ GDataAuthorizer *authorizer = NULL; /* owned */
+ GDataAuthorizer *unauthorised_authorizer = NULL; /* owned */
+ GDataService *service = NULL; /* owned */
+ GDataService *unauthorised_service = NULL; /* owned */
+ GFile *trace_directory = NULL; /* owned */
+ gchar *path = NULL;
+
+ gdata_test_init (argc, argv);
+
+ mock_server = gdata_test_get_mock_server ();
+ g_signal_connect (G_OBJECT (mock_server), "notify::resolver",
+ (GCallback) mock_server_notify_resolver_cb, NULL);
+ path = g_test_build_filename (G_TEST_DIST, "traces/tasks", NULL);
+ trace_directory = g_file_new_for_path (path);
+ g_free (path);
+ uhm_server_set_trace_directory (mock_server, trace_directory);
+ g_object_unref (trace_directory);
+
+ authorizer = create_global_authorizer ();
+ unauthorised_authorizer = GDATA_AUTHORIZER (gdata_oauth2_authorizer_new (CLIENT_ID,
+ CLIENT_SECRET,
+ REDIRECT_URI,
+ GDATA_TYPE_TASKS_SERVICE));
+
+ service = GDATA_SERVICE (gdata_tasks_service_new (authorizer));
+ unauthorised_service = GDATA_SERVICE (gdata_tasks_service_new (unauthorised_authorizer));
+
+ g_test_add_func ("/tasks/authentication", test_authentication);
+
+ g_test_add_data_func ("/tasks/tasklist/insert/unauthorised",
+ unauthorised_service,
+ test_tasklist_insert_unauthorised);
+
+ g_test_add ("/tasks/tasklist/insert", InsertTasklistData, service,
+ set_up_insert_tasklist, test_tasklist_insert,
+ tear_down_insert_tasklist);
+ g_test_add ("/tasks/tasklist/list", ListTasklistData, service,
+ set_up_list_tasklist, test_tasklist_list,
+ tear_down_list_tasklist);
+ g_test_add ("/tasks/tasklist/update", UpdateTasklistData, service,
+ set_up_update_tasklist, test_tasklist_update,
+ tear_down_update_tasklist);
+ g_test_add ("/tasks/tasklist/delete", DeleteTasklistData, service,
+ set_up_delete_tasklist, test_tasklist_delete,
+ tear_down_delete_tasklist);
+
+ g_test_add ("/tasks/task/insert", InsertTaskData, service,
+ set_up_insert_task, test_task_insert,
+ tear_down_insert_task);
+ g_test_add ("/tasks/task/list", ListTaskData, service,
+ set_up_list_task, test_task_list,
+ tear_down_list_task);
+ g_test_add ("/tasks/task/update", UpdateTaskData, service,
+ set_up_update_task, test_task_update,
+ tear_down_update_task);
+ g_test_add ("/tasks/task/delete", DeleteTaskData, service,
+ set_up_delete_task, test_task_delete,
+ tear_down_delete_task);
+
+ g_test_add_func ("/tasks/task/properties", test_task_properties);
+ g_test_add_func ("/tasks/task/escaping", test_task_escaping);
+ g_test_add_func ("/tasks/task/parser/minimal",
+ test_task_parser_minimal);
+ g_test_add_func ("/tasks/task/parser/normal", test_task_parser_normal);
+
+ g_test_add_func ("/tasks/tasklist/properties",
+ test_tasklist_properties);
+ g_test_add_func ("/tasks/tasklist/escaping", test_tasklist_escaping);
+ g_test_add_func ("/tasks/tasklist/parser/normal",
+ test_tasklist_parser_normal);
+
+ g_test_add_func ("/tasks/query/uri", test_query_uri);
+ g_test_add_func ("/tasks/query/etag", test_query_etag);
+ g_test_add_func ("/tasks/query/properties", test_query_properties);
+
+ retval = g_test_run ();
+
+ g_clear_object (&unauthorised_service);
+ g_clear_object (&service);
+ g_clear_object (&unauthorised_authorizer);
+ g_clear_object (&authorizer);
+
+ return retval;
+}
--- /dev/null
+[Test]
+Type=@TEST_TYPE@
+Exec=@TEST_ABS_PATH@ --tap
+Output=TAP
--- /dev/null
+> DELETE /calendar/v3/calendars/ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com/acl/user:darcy@gmail.com HTTP/1.1
+> Soup-Debug-Timestamp: 1432766374
+> Soup-Debug: SoupSession 1 (0x67c240), SoupMessage 17 (0xa550b0), SoupSocket 8 (0x7fffd8003780)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.gAFohzAjbcf9YCyjGbgHBTd3VFWTxECP5Um14DHl5eaMsx6UeCxMTAdaLmIO32vU6LgW7Ybe1Abmag
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1432766374
+< Soup-Debug: SoupMessage 17 (0xa550b0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Wed, 27 May 2015 22:39:34 GMT
+< Vary: Origin
+< Vary: X-Origin
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+<
+
--- /dev/null
+> GET /calendar/v3/calendars/ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com/acl HTTP/1.1
+> Soup-Debug-Timestamp: 1432766357
+> Soup-Debug: SoupSession 1 (0x67c240), SoupMessage 3 (0xa55470), SoupSocket 2 (0x7fffd8003780)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.gAFohzAjbcf9YCyjGbgHBTd3VFWTxECP5Um14DHl5eaMsx6UeCxMTAdaLmIO32vU6LgW7Ybe1Abmag
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1432766357
+< Soup-Debug: SoupMessage 3 (0xa55470)
+< Expires: Wed, 27 May 2015 22:39:17 GMT
+< Date: Wed, 27 May 2015 22:39:17 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "calendar#acl",
+< "etag": "\"1432766357173000\"",
+< "nextSyncToken": "00001432766357173000",
+< "items": [
+< {
+< "kind": "calendar#aclRule",
+< "etag": "\"00001432766357173000\"",
+< "id": "user:darcy@gmail.com",
+< "scope": {
+< "type": "user",
+< "value": "darcy@gmail.com"
+< },
+< "role": "writer"
+< },
+< {
+< "kind": "calendar#aclRule",
+< "etag": "\"00001432766351605000\"",
+< "id": "user:libgdata.test@googlemail.com",
+< "scope": {
+< "type": "user",
+< "value": "libgdata.test@googlemail.com"
+< },
+< "role": "owner"
+< },
+< {
+< "kind": "calendar#aclRule",
+< "etag": "\"00000000000000000000\"",
+< "id": "user:ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com",
+< "scope": {
+< "type": "user",
+< "value": "ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com"
+< },
+< "role": "owner"
+< }
+< ]
+< }
+
--- /dev/null
+> POST /calendar/v3/calendars/ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com/acl HTTP/1.1
+> Soup-Debug-Timestamp: 1432766363
+> Soup-Debug: SoupSession 1 (0x67c240), SoupMessage 7 (0xa55290), SoupSocket 4 (0x63b410)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.gAFohzAjbcf9YCyjGbgHBTd3VFWTxECP5Um14DHl5eaMsx6UeCxMTAdaLmIO32vU6LgW7Ybe1Abmag
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+>
+> {"kind":"calendar#aclRule","role":"writer","scope":{"type":"user","value":"darcy@gmail.com"}}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1432766363
+< Soup-Debug: SoupMessage 7 (0xa55290)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Wed, 27 May 2015 22:39:23 GMT
+< ETag: "00001432766363662000"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "calendar#aclRule",
+< "etag": "\"00001432766363662000\"",
+< "id": "user:darcy@gmail.com",
+< "scope": {
+< "type": "user",
+< "value": "darcy@gmail.com"
+< },
+< "role": "writer"
+< }
+
--- /dev/null
+> PUT /calendar/v3/calendars/ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com/acl/user:darcy@gmail.com HTTP/1.1
+> Soup-Debug-Timestamp: 1432766369
+> Soup-Debug: SoupSession 1 (0x67c240), SoupMessage 12 (0xa550b0), SoupSocket 6 (0x63b270)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.gAFohzAjbcf9YCyjGbgHBTd3VFWTxECP5Um14DHl5eaMsx6UeCxMTAdaLmIO32vU6LgW7Ybe1Abmag
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+>
+> {"id":"user:darcy@gmail.com","kind":"calendar#aclRule","role":"reader","scope":{"type":"user","value":"darcy@gmail.com"}}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1432766369
+< Soup-Debug: SoupMessage 12 (0xa550b0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Wed, 27 May 2015 22:39:29 GMT
+< ETag: "00001432766369644000"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "calendar#aclRule",
+< "etag": "\"00001432766369644000\"",
+< "id": "user:darcy@gmail.com",
+< "scope": {
+< "type": "user",
+< "value": "darcy@gmail.com"
+< },
+< "role": "reader"
+< }
+
--- /dev/null
+> POST /o/oauth2/token HTTP/1.1
+> Soup-Debug-Timestamp: 1430947656
+> Soup-Debug: SoupSession 1 (0x1b2f370), SoupMessage 1 (0x1d1f290), SoupSocket 1 (0x1aee1e0)
+> Host: accounts.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+>
+> client_id=352818697630-nqu2cmt5quqd6lr17ouoqmb684u84l1f.apps.googleusercontent.com&client_secret=-fA4pHQJxR3zJ-FyAMPQsikg&code=4%2F5roW7EwRf0CZ1gyvGE5pzN3ZoeccA-axrzP6sWDyRQo.0uwUXCB_LWUXoiIBeO6P2m8gykBWmgI&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&grant_type=authorization_code
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1430947656
+< Soup-Debug: SoupMessage 1 (0x1d1f290)
+< Content-Type: application/json; charset=utf-8
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Wed, 06 May 2015 21:27:36 GMT
+< Content-Disposition: attachment; filename="json.txt"; filename*=UTF-8''json.txt
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "access_token" : "ya29.awEMF6KA71utmWG8UXC3SWqF_JypKjJC-lyadkqa3NMq6_YhPB_fmzK3AFB8IcdcusuEBsxxW4t2rg",
+< "token_type" : "Bearer",
+< "expires_in" : 3600,
+< "refresh_token" : "1/BPLUSijlnWFRWfijKd_CU6AkB4xyvtXqaoMV-EfDISA"
+< }
+
--- /dev/null
+> POST /accounts/ClientLogin HTTP/1.1
+> Soup-Debug-Timestamp: 1375202668
+> Soup-Debug: SoupSession 1 (0x65a500), SoupMessage 1 (0x8c2e60), SoupSocket 1 (0x7756d0)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> accountType=HOSTED%5FOR%5FGOOGLE&Email=libgdata%2Etest%40gmail%2Ecom&Passwd=gdata%2Dgdata&service=cl&source=ytapi%2DGNOME%2Dlibgdata%2D444fubtt%2D0
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375202668
+< Soup-Debug: SoupMessage 1 (0x8c2e60)
+< Content-Type: text/plain
+< Cache-control: no-cache, no-store
+< Pragma: no-cache
+< Expires: Mon, 01-Jan-1990 00:00:00 GMT
+< Date: Tue, 30 Jul 2013 16:44:28 GMT
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 947
+< Server: GSE
+<
+< SID=DQAAANMAAAA5TPwiRzzfN-bEUkWGky14iBRMIYTVPyryEy482_49cZp1ss-tNw2ZZ7_OyHKlPRac6uitjFFR0s4XRoONU0jQDBf6TAOpyrgiF8FaPbpsJllZx3n4tqTalW9nqiu28NVJ9veQ14qHNYVZ1TWz314mqDO5vDE48epfPTZ8jTrOadJJE1MpG4kOgo2zz-rd2jAwIVhA83vC4zYDSIqQIaHooj-rbzKlxx1mItMieAV_haI52zFc4JsJZZN-V6bj1ENMfSkkfBc0gb5-KV9zXQoQmHmEFlCdildQVkKZJJ1j7w
+< LSID=DQAAANYAAACYBxfakfI_s1gA-VJMlyNjfNDHSGxLwpYVDPJdjuNBGwuiq5Zp5IaWMC9XqDqtDK4NfeJ_mNEzgKv1cjn35hR4waUtDj79p1xkEVGnJ8G7hNigazTmdRJPbNedibsDJJWIzio1dOd6RuRwN0TlsBZlIzXkEipGdqFoI8WFxhWDtzPnqikqZZT9ohdOsN0N9EeEk6l32W-XX-bZTR3StL_W6WE1JdpDtNAkb7wTn7aJ_sJ252nFd4e59ZUCylWsOYXmL9UhdxqF_hUE5MUfu6QyYpoh190x9vLWAkNZ9oRjrg
+< Auth=DQAAANUAAACYBxfakfI_s1gA-VJMlyNjfNDHSGxLwpYVDPJdjuNBGwuiq5Zp5IaWMC9XqDqtDK4C1iEFJRNexcHZKjGfnfGY-xd74hgOcQa1v4y7CEAhnsVFaU8IN5J--hCbBX_A_TF4GUT7f86c2FmMu-iijM5auD0HSiSRB9ukn-v5tNDo2b463botICaU9hqHiGSQIfwZXXOhxvAD2nYOZJkEH1FvPP_w7xZ3PxU1IZRIKrC8iw6alRzniO9E110PpJn2XGaC7ehk78awj0dkLsvMCqqhl4Ogg2qunG_wjAG4GmUlvA
+
--- /dev/null
+> POST /accounts/ClientLogin HTTP/1.1
+> Soup-Debug-Timestamp: 1375202668
+> Soup-Debug: SoupSession 1 (0x65a500), SoupMessage 1 (0x7fffe003f280), SoupSocket 1 (0x7fffe0040970)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> accountType=HOSTED%5FOR%5FGOOGLE&Email=libgdata%2Etest%40gmail%2Ecom&Passwd=gdata%2Dgdata&service=cl&source=ytapi%2DGNOME%2Dlibgdata%2D444fubtt%2D0
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375202669
+< Soup-Debug: SoupMessage 1 (0x7fffe003f280)
+< Content-Type: text/plain
+< Cache-control: no-cache, no-store
+< Pragma: no-cache
+< Expires: Mon, 01-Jan-1990 00:00:00 GMT
+< Date: Tue, 30 Jul 2013 16:44:29 GMT
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 947
+< Server: GSE
+<
+< SID=DQAAANMAAAAyO-iKtE02Q_l9mBV_VkGPtsaGLoeLeCugvUoYqPJNpnUTZUcaVUznR1vMC6IqZeRT3513ogVFRX3u5zGZ1rNCq-9rJOGx-XjUDpn0alcAlMk0V9H_g8YqDUlsqb6BUYGOFrRe0tiSlxzSjVbc4pkzR6N8aFtdMLkE0ZnLsr6C4kI5b7uQFzOFs8VEZVXszYKmA7aaUXwRzCVSGxpwJLP-xi7oEii9hvYl0fZxDh8K_Yp6lNRJ8KvwFxwXRFwXCtV0N-rpGrHCaovsB_EidZfyg_X7DpnQq13__JynSBLlUg
+< LSID=DQAAANUAAADuDg9XwUBJlDCpVKMT_ROpJmS6ipK7ZLORLq-LC_iPJ5iE3Ru7avVUsPrunH2vU6t5kifxaGQciIj8H52B_ELPh6TUQHT2UhlduAGPVodfknFlZCHd50U61o9IxIrLCMivD4m7QlYpfwNk7X5LdeHrcvtTWa2Pqr6KsCw1FW1UDpqdjCMp0oWDHgBQ0PpFk7Xbn-HjB9lljRAzaU2WfvC02jsm9Cuq8W0i3UZU8V_EhxHlbU5Fsq2BkRDu8w8VSxbzQU2nRsh1Nz1WWZN5QE2_CkRzAlr4ZnmMbkFXGT4Btg
+< Auth=DQAAANUAAADuDg9XwUBJlDCpVKMT_ROpJmS6ipK7ZLORLq-LC_iPJ5iE3Ru7avVUsPrunH2vU6tQqMVohDrg8kXN24jvLtl9JtZzaOoMrJnQ9gMpLPCuO4iHf-kD8Na8jgNVuSZxHs1zXJ1djtDif1R5v7KgMsAzyR-QTAtL4YSYNQvykgfOA3syU-3EvcOaLPMHVCcPe8XtDjb0fJD25IGynGAFQDU42bAOkb7Gw185GxiDtdABUaHJ9vWu4aIdG7v_5vL-D1e4r82O_UjfdGoIR-x7Qd_WhU9iAK09lDQCIAaQ1sj1FA
+
--- /dev/null
+> POST /calendar/v3/calendars/ndihjbq6agrl249fjqgd535qmk%40group.calendar.google.com/events HTTP/1.1
+> Soup-Debug-Timestamp: 1430948195
+> Soup-Debug: SoupSession 1 (0x1bfd240), SoupMessage 63 (0x1e1f0b0), SoupSocket 39 (0x7fbbf0036100)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.awGOOtAe8kqEXctjnpzBjl8WoWrJJUugtZDGHw1adbjI-Zo3QrMM66TvDNRGatGY9tjJCLnfap1jXQ
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+>
+> {"kind":"calendar#event","summary":"Tennis with Beth","description":"Meet for a quick lesson.","anyoneCanAddSelf":false,"guestsCanInviteOthers":false,"guestsCanModify":false,"guestsCanSeeOtherGuests":false,"transparency":"opaque","status":"confirmed","start":{"dateTime":"2009-04-17T15:00:00Z","timeZone":"UTC"},"end":{"dateTime":"2009-04-17T17:00:00Z","timeZone":"UTC"},"location":"Rolling Lawn Courts","attendees":[{"displayName":"John Smith‽","email":"john.smith@example.com","organizer":true}],"organizer":{"displayName":"John Smith‽","email":"john.smith@example.com"}}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1430948196
+< Soup-Debug: SoupMessage 63 (0x1e1f0b0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Wed, 06 May 2015 21:36:36 GMT
+< ETag: "2861896391802000"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "calendar#event",
+< "etag": "\"2861896391802000\"",
+< "id": "8ndrpt97cl0c9lkbpojq9tiquo",
+< "status": "confirmed",
+< "htmlLink": "https://www.google.com/calendar/event?eid=ODFiZW9xOHVxM2N1amVrMGdhbjlvYjdvMWsgYmVzbDByZ2phMjJzM3IyMG9uNmZmbTcyaDhAZw",
+< "created": "2015-05-06T21:36:35.000Z",
+< "updated": "2015-05-06T21:36:35.901Z",
+< "summary": "Tennis with Beth",
+< "description": "Meet for a quick lesson.",
+< "location": "Rolling Lawn Courts",
+< "creator": {
+< "email": "libgdata.test@googlemail.com",
+< "displayName": "GData Test"
+< },
+< "organizer": {
+< "email": "ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com",
+< "displayName": "Temp Test Calendar",
+< "self": true
+< },
+< "start": {
+< "dateTime": "2009-04-17T15:00:00Z",
+< "timeZone": "UTC"
+< },
+< "end": {
+< "dateTime": "2009-04-17T17:00:00Z",
+< "timeZone": "UTC"
+< },
+< "iCalUID": "8ndrpt97cl0c9lkbpojq9tiquo@google.com",
+< "sequence": 0,
+< "attendees": [
+< {
+< "email": "john.smith@example.com",
+< "displayName": "John Smith‽",
+< "responseStatus": "needsAction"
+< }
+< ],
+< "guestsCanInviteOthers": false,
+< "guestsCanSeeOtherGuests": false,
+< "reminders": {
+< "useDefault": true
+< }
+< }
+
--- /dev/null
+> POST /calendar/v3/calendars/ndihjbq6agrl249fjqgd535qmk%40group.calendar.google.com/events HTTP/1.1
+> Soup-Debug-Timestamp: 1430949583
+> Soup-Debug: SoupSession 1 (0xc32240), SoupMessage 2 (0xffbe50), SoupSocket 2 (0x7fe14c002b40)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.awGy-MEL7oZEh875MiCaHZKx6KNZcPN1FIFpJB2r_OlDKat0j_JfenP1BZb1Skk2cO5F6VaQkUo7wg
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+>
+> {"kind":"calendar#event","summary":"Tennis with Beth","description":"Meet for a quick lesson.","anyoneCanAddSelf":false,"guestsCanInviteOthers":false,"guestsCanModify":false,"guestsCanSeeOtherGuests":false,"transparency":"opaque","status":"confirmed","start":{"dateTime":"2009-04-17T15:00:00Z","timeZone":"UTC"},"end":{"dateTime":"2009-04-17T17:00:00Z","timeZone":"UTC"},"location":"Rolling Lawn Courts","attendees":[{"displayName":"John Smith‽","email":"john.smith@example.com","organizer":true}],"organizer":{"displayName":"John Smith‽","email":"john.smith@example.com"}}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1430949584
+< Soup-Debug: SoupMessage 2 (0xffbe50)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Wed, 06 May 2015 21:59:44 GMT
+< ETag: "2861899168028000"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "calendar#event",
+< "etag": "\"2861899168028000\"",
+< "id": "8ndrpt97cl0c9lkbpojq9tiquo",
+< "status": "confirmed",
+< "htmlLink": "https://www.google.com/calendar/event?eid=dGUxZTExYXIzYTQ0azlvaTM4cTg5ZWExcDAgYm1wN3RkZ2M1YmpnNGdpaHJ0cmxwOXJjb2tAZw",
+< "created": "2015-05-06T21:59:43.000Z",
+< "updated": "2015-05-06T21:59:44.014Z",
+< "summary": "Tennis with Beth",
+< "description": "Meet for a quick lesson.",
+< "location": "Rolling Lawn Courts",
+< "creator": {
+< "email": "libgdata.test@googlemail.com",
+< "displayName": "GData Test"
+< },
+< "organizer": {
+< "email": "ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com",
+< "displayName": "Temp Test Calendar",
+< "self": true
+< },
+< "start": {
+< "dateTime": "2009-04-17T15:00:00Z",
+< "timeZone": "UTC"
+< },
+< "end": {
+< "dateTime": "2009-04-17T17:00:00Z",
+< "timeZone": "UTC"
+< },
+< "iCalUID": "8ndrpt97cl0c9lkbpojq9tiquo@google.com",
+< "sequence": 0,
+< "attendees": [
+< {
+< "email": "john.smith@example.com",
+< "displayName": "John Smith‽",
+< "responseStatus": "needsAction"
+< }
+< ],
+< "guestsCanInviteOthers": false,
+< "guestsCanSeeOtherGuests": false,
+< "reminders": {
+< "useDefault": true
+< }
+< }
+
--- /dev/null
+> POST /calendar/v3/calendars/ndihjbq6agrl249fjqgd535qmk%40group.calendar.google.com/events HTTP/1.1
+> Soup-Debug-Timestamp: 1430949589
+> Soup-Debug: SoupSession 1 (0xc32240), SoupMessage 7 (0xffbe50), SoupSocket 5 (0x7fe15000d9e0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.awGy-MEL7oZEh875MiCaHZKx6KNZcPN1FIFpJB2r_OlDKat0j_JfenP1BZb1Skk2cO5F6VaQkUo7wg
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+>
+> {"kind":"calendar#event","summary":"Tennis with Beth","description":"Meet for a quick lesson.","anyoneCanAddSelf":false,"guestsCanInviteOthers":false,"guestsCanModify":false,"guestsCanSeeOtherGuests":false,"transparency":"opaque","status":"confirmed","start":{"dateTime":"2009-04-17T15:00:00Z","timeZone":"UTC"},"end":{"dateTime":"2009-04-17T17:00:00Z","timeZone":"UTC"},"location":"Rolling Lawn Courts","attendees":[{"displayName":"John Smith‽","email":"john.smith@example.com","organizer":true}],"organizer":{"displayName":"John Smith‽","email":"john.smith@example.com"}}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1430949589
+< Soup-Debug: SoupMessage 7 (0xffbe50)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Wed, 06 May 2015 21:59:49 GMT
+< ETag: "2861899178874000"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "calendar#event",
+< "etag": "\"2861899178874000\"",
+< "id": "8ndrpt97cl0c9lkbpojq9tiquo",
+< "status": "confirmed",
+< "htmlLink": "https://www.google.com/calendar/event?eid=OG5kcnB0OTdjbDBjOWxrYnBvanE5dGlxdW8gajU2ODM1bThscXF0OXUxb2E1bWIyZ284ODBAZw",
+< "created": "2015-05-06T21:59:49.000Z",
+< "updated": "2015-05-06T21:59:49.437Z",
+< "summary": "Tennis with Beth",
+< "description": "Meet for a quick lesson.",
+< "location": "Rolling Lawn Courts",
+< "creator": {
+< "email": "libgdata.test@googlemail.com",
+< "displayName": "GData Test"
+< },
+< "organizer": {
+< "email": "ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com",
+< "displayName": "Temp Test Calendar",
+< "self": true
+< },
+< "start": {
+< "dateTime": "2009-04-17T15:00:00Z",
+< "timeZone": "UTC"
+< },
+< "end": {
+< "dateTime": "2009-04-17T17:00:00Z",
+< "timeZone": "UTC"
+< },
+< "iCalUID": "8ndrpt97cl0c9lkbpojq9tiquo@google.com",
+< "sequence": 0,
+< "attendees": [
+< {
+< "email": "john.smith@example.com",
+< "displayName": "John Smith‽",
+< "responseStatus": "needsAction"
+< }
+< ],
+< "guestsCanInviteOthers": false,
+< "guestsCanSeeOtherGuests": false,
+< "reminders": {
+< "useDefault": true
+< }
+< }
+
--- /dev/null
+> POST /o/oauth2/token HTTP/1.1
+> Soup-Debug-Timestamp: 1431695653
+> Soup-Debug: SoupSession 1 (0x1562130), SoupMessage 1 (0x17eb8b0), SoupSocket 1 (0x7efddc0036b0)
+> Host: accounts.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+>
+> client_id=352818697630-nqu2cmt5quqd6lr17ouoqmb684u84l1f.apps.googleusercontent.com&client_secret=-fA4pHQJxR3zJ-FyAMPQsikg&code=4%2FTrFY0VbJzBRhT4r_kkyl39xFF15qserv8dER-e182eU.AjD_rrH7m_EUoiIBeO6P2m9a02uvmgI&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&grant_type=authorization_code
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1431695654
+< Soup-Debug: SoupMessage 1 (0x17eb8b0)
+< Content-Type: application/json; charset=utf-8
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Fri, 15 May 2015 13:14:14 GMT
+< Content-Disposition: attachment; filename="json.txt"; filename*=UTF-8''json.txt
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "access_token" : "ya29.dAFjwh3j5bnolAkoumk7nKv5Et2BPEF4uLxyUsDhp788Hs7E6P4W865ZrKn7PAcfe4X40GjC0xx3Wg",
+< "token_type" : "Bearer",
+< "expires_in" : 3600,
+< "refresh_token" : "1/NnqQoUbp8ZRdraXhZV_VxmYC72GtHl65vwf1h6OZ8ik"
+< }
+
--- /dev/null
+> GET /calendar/v3/users/me/calendarList HTTP/1.1
+> Soup-Debug-Timestamp: 1430947979
+> Soup-Debug: SoupSession 1 (0x12bc240), SoupMessage 3 (0x1553470), SoupSocket 2 (0x7fcbe4003780)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.awGpyfNPtG5DI_53Jiu2taI0Hq5ho1AELWfwHQ_qvmVHPbaeRDNFIstvm7c6JBFGe4wZTa6LaHrYYA
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1430947980
+< Soup-Debug: SoupMessage 3 (0x1553470)
+< Expires: Wed, 06 May 2015 21:33:00 GMT
+< Date: Wed, 06 May 2015 21:33:00 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "calendar#calendarList",
+< "etag": "\"1430947978342000\"",
+< "nextSyncToken": "00001430947978342000",
+< "items": [
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"0\"",
+< "id": "libgdata.test@googlemail.com",
+< "summary": "libgdata.test@gmail.com",
+< "timeZone": "Europe/London",
+< "colorId": "17",
+< "backgroundColor": "#9a9cff",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": [
+< {
+< "method": "email",
+< "minutes": 10
+< },
+< {
+< "method": "popup",
+< "minutes": 30
+< }
+< ],
+< "notificationSettings": {
+< "notifications": [
+< {
+< "type": "eventCreation",
+< "method": "email"
+< },
+< {
+< "type": "eventChange",
+< "method": "email"
+< },
+< {
+< "type": "eventCancellation",
+< "method": "email"
+< },
+< {
+< "type": "eventResponse",
+< "method": "email"
+< }
+< ]
+< },
+< "primary": true
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430947973540000\"",
+< "id": "h0g17fas6es1gt2obhhgs8bsro@group.calendar.google.com",
+< "summary": "Test Calendar 1",
+< "timeZone": "UTC",
+< "colorId": "11",
+< "backgroundColor": "#fbe983",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": []
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430947978342000\"",
+< "id": "tulvlm6fiatm3a32l7f3i98bek@group.calendar.google.com",
+< "summary": "Test Calendar 2",
+< "timeZone": "UTC",
+< "colorId": "16",
+< "backgroundColor": "#4986e7",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": []
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430947738744000\"",
+< "id": "4v0gftqkoct5skn7t3ushbnsfg@group.calendar.google.com",
+< "summary": "Test Calendar 1",
+< "timeZone": "UTC",
+< "colorId": "8",
+< "backgroundColor": "#16a765",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": []
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430670856222000\"",
+< "id": "#contacts@group.v.calendar.google.com",
+< "summary": "Birthdays",
+< "description": "Displays birthdays of people in Google Contacts and optionally 'Your Circles' from Google+. Also displays anniversary and other event dates from Google Contacts, if applicable.",
+< "timeZone": "Europe/London",
+< "colorId": "13",
+< "backgroundColor": "#92e1c0",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "reader",
+< "defaultReminders": []
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430670855908000\"",
+< "id": "en.uk#holiday@group.v.calendar.google.com",
+< "summary": "Holidays in United Kingdom",
+< "description": "Holidays and Observances in United Kingdom",
+< "timeZone": "Europe/London",
+< "colorId": "8",
+< "backgroundColor": "#16a765",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "reader",
+< "defaultReminders": []
+< }
+< ]
+< }
+
--- /dev/null
+> GET /calendar/v3/users/me/calendarList HTTP/1.1
+> Soup-Debug-Timestamp: 1430948003
+> Soup-Debug: SoupSession 1 (0x12bc240), SoupMessage 13 (0x7fcbdc0398b0), SoupSocket 6 (0x127b1a0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.awGpyfNPtG5DI_53Jiu2taI0Hq5ho1AELWfwHQ_qvmVHPbaeRDNFIstvm7c6JBFGe4wZTa6LaHrYYA
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1430948003
+< Soup-Debug: SoupMessage 13 (0x7fcbdc0398b0)
+< Expires: Wed, 06 May 2015 21:33:23 GMT
+< Date: Wed, 06 May 2015 21:33:23 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "calendar#calendarList",
+< "etag": "\"1430948002317000\"",
+< "nextSyncToken": "00001430948002317000",
+< "items": [
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430947998187000\"",
+< "id": "ldqvjo2garg65mee88q8r3ngr8@group.calendar.google.com",
+< "summary": "Test Calendar 1",
+< "timeZone": "UTC",
+< "colorId": "12",
+< "backgroundColor": "#fad165",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": []
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"0\"",
+< "id": "libgdata.test@googlemail.com",
+< "summary": "libgdata.test@gmail.com",
+< "timeZone": "Europe/London",
+< "colorId": "17",
+< "backgroundColor": "#9a9cff",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": [
+< {
+< "method": "email",
+< "minutes": 10
+< },
+< {
+< "method": "popup",
+< "minutes": 30
+< }
+< ],
+< "notificationSettings": {
+< "notifications": [
+< {
+< "type": "eventCreation",
+< "method": "email"
+< },
+< {
+< "type": "eventChange",
+< "method": "email"
+< },
+< {
+< "type": "eventCancellation",
+< "method": "email"
+< },
+< {
+< "type": "eventResponse",
+< "method": "email"
+< }
+< ]
+< },
+< "primary": true
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430948002317000\"",
+< "id": "f6npslr0gr8vo6r55gs98hmq0c@group.calendar.google.com",
+< "summary": "Test Calendar 2",
+< "timeZone": "UTC",
+< "colorId": "17",
+< "backgroundColor": "#9a9cff",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": []
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430947738744000\"",
+< "id": "4v0gftqkoct5skn7t3ushbnsfg@group.calendar.google.com",
+< "summary": "Test Calendar 1",
+< "timeZone": "UTC",
+< "colorId": "8",
+< "backgroundColor": "#16a765",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": []
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430670856222000\"",
+< "id": "#contacts@group.v.calendar.google.com",
+< "summary": "Birthdays",
+< "description": "Displays birthdays of people in Google Contacts and optionally 'Your Circles' from Google+. Also displays anniversary and other event dates from Google Contacts, if applicable.",
+< "timeZone": "Europe/London",
+< "colorId": "13",
+< "backgroundColor": "#92e1c0",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "reader",
+< "defaultReminders": []
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430670855908000\"",
+< "id": "en.uk#holiday@group.v.calendar.google.com",
+< "summary": "Holidays in United Kingdom",
+< "description": "Holidays and Observances in United Kingdom",
+< "timeZone": "Europe/London",
+< "colorId": "8",
+< "backgroundColor": "#16a765",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "reader",
+< "defaultReminders": []
+< }
+< ]
+< }
+
--- /dev/null
+> GET /calendar/v3/calendars/ndihjbq6agrl249fjqgd535qmk%40group.calendar.google.com/events HTTP/1.1
+> Soup-Debug-Timestamp: 1430948129
+> Soup-Debug: SoupSession 1 (0x1bfd240), SoupMessage 10 (0x1e1f290), SoupSocket 6 (0x1bbc270)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.awGOOtAe8kqEXctjnpzBjl8WoWrJJUugtZDGHw1adbjI-Zo3QrMM66TvDNRGatGY9tjJCLnfap1jXQ
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1430948129
+< Soup-Debug: SoupMessage 10 (0x1e1f290)
+< Expires: Wed, 06 May 2015 21:35:29 GMT
+< Date: Wed, 06 May 2015 21:35:29 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "calendar#events",
+< "etag": "\"1430948128920000\"",
+< "summary": "Temp Test Calendar",
+< "updated": "2015-05-06T21:35:28.920Z",
+< "timeZone": "UTC",
+< "accessRole": "owner",
+< "defaultReminders": [],
+< "nextSyncToken": "CMCjqpeJrsUCEMCjqpeJrsUCGAU=",
+< "items": [
+< {
+< "kind": "calendar#event",
+< "etag": "\"2861896255972000\"",
+< "id": "dsk9v6avumdakmikagf6bso60c",
+< "status": "confirmed",
+< "htmlLink": "https://www.google.com/calendar/event?eid=ZHNrOXY2YXZ1bWRha21pa2FnZjZic282MGMgMnVjcDlvZ21yZzJqY20yZzU5cGFpNnNkdGdAZw",
+< "created": "2015-05-06T21:35:27.000Z",
+< "updated": "2015-05-06T21:35:27.986Z",
+< "summary": "Test Event 1",
+< "creator": {
+< "email": "libgdata.test@googlemail.com",
+< "displayName": "GData Test"
+< },
+< "organizer": {
+< "email": "ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com",
+< "displayName": "Temp Test Calendar",
+< "self": true
+< },
+< "start": {
+< "dateTime": "2014-12-20T22:15:27Z",
+< "timeZone": "UTC"
+< },
+< "end": {
+< "dateTime": "2014-12-20T22:15:28Z",
+< "timeZone": "UTC"
+< },
+< "iCalUID": "dsk9v6avumdakmikagf6bso60c@google.com",
+< "sequence": 0,
+< "guestsCanInviteOthers": false,
+< "guestsCanSeeOtherGuests": false,
+< "reminders": {
+< "useDefault": true
+< }
+< },
+< {
+< "kind": "calendar#event",
+< "etag": "\"2861896257008000\"",
+< "id": "kp3h5adu1rivpi3cv1boi50u1s",
+< "status": "confirmed",
+< "htmlLink": "https://www.google.com/calendar/event?eid=a3AzaDVhZHUxcml2cGkzY3YxYm9pNTB1MXMgMnVjcDlvZ21yZzJqY20yZzU5cGFpNnNkdGdAZw",
+< "created": "2015-05-06T21:35:28.000Z",
+< "updated": "2015-05-06T21:35:28.504Z",
+< "summary": "Test Event 2",
+< "creator": {
+< "email": "libgdata.test@googlemail.com",
+< "displayName": "GData Test"
+< },
+< "organizer": {
+< "email": "ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com",
+< "displayName": "Temp Test Calendar",
+< "self": true
+< },
+< "start": {
+< "dateTime": "2014-12-20T22:03:20Z",
+< "timeZone": "UTC"
+< },
+< "end": {
+< "dateTime": "2014-12-20T22:20:00Z",
+< "timeZone": "UTC"
+< },
+< "iCalUID": "kp3h5adu1rivpi3cv1boi50u1s@google.com",
+< "sequence": 0,
+< "guestsCanInviteOthers": false,
+< "guestsCanSeeOtherGuests": false,
+< "reminders": {
+< "useDefault": true
+< }
+< },
+< {
+< "kind": "calendar#event",
+< "etag": "\"2861896257670000\"",
+< "id": "e6kep3e08m15gsbbilvp0a35fg",
+< "status": "confirmed",
+< "htmlLink": "https://www.google.com/calendar/event?eid=ZTZrZXAzZTA4bTE1Z3NiYmlsdnAwYTM1ZmcgMnVjcDlvZ21yZzJqY20yZzU5cGFpNnNkdGdAZw",
+< "created": "2015-05-06T21:35:28.000Z",
+< "updated": "2015-05-06T21:35:28.835Z",
+< "summary": "Test Event 3",
+< "creator": {
+< "email": "libgdata.test@googlemail.com",
+< "displayName": "GData Test"
+< },
+< "organizer": {
+< "email": "ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com",
+< "displayName": "Temp Test Calendar",
+< "self": true
+< },
+< "start": {
+< "date": "2014-12-20"
+< },
+< "end": {
+< "date": "2014-12-21"
+< },
+< "iCalUID": "e6kep3e08m15gsbbilvp0a35fg@google.com",
+< "sequence": 0,
+< "guestsCanInviteOthers": false,
+< "guestsCanSeeOtherGuests": false,
+< "reminders": {
+< "useDefault": true
+< }
+< }
+< ]
+< }
+
--- /dev/null
+> GET /calendar/v3/calendars/k2n1p44o1vnvgqm1gqaih1u2l4%40group.calendar.google.com/events HTTP/1.1
+> Soup-Debug-Timestamp: 1430948178
+> Soup-Debug: SoupSession 1 (0x1bfd240), SoupMessage 46 (0x7fbbf4011190), SoupSocket 27 (0x7fbbfc002df0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.awGOOtAe8kqEXctjnpzBjl8WoWrJJUugtZDGHw1adbjI-Zo3QrMM66TvDNRGatGY9tjJCLnfap1jXQ
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1430948178
+< Soup-Debug: SoupMessage 46 (0x7fbbf4011190)
+< Expires: Wed, 06 May 2015 21:36:18 GMT
+< Date: Wed, 06 May 2015 21:36:18 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "calendar#events",
+< "etag": "\"1430948178382000\"",
+< "summary": "Temp Test Calendar",
+< "updated": "2015-05-06T21:36:18.382Z",
+< "timeZone": "UTC",
+< "accessRole": "owner",
+< "defaultReminders": [],
+< "nextSyncToken": "CLCZ9a6JrsUCELCZ9a6JrsUCGAU=",
+< "items": [
+< {
+< "kind": "calendar#event",
+< "etag": "\"2861896355510000\"",
+< "id": "k99h2m7k5hgdvno8ef0vbl3q4g",
+< "status": "confirmed",
+< "htmlLink": "https://www.google.com/calendar/event?eid=azk5aDJtN2s1aGdkdm5vOGVmMHZibDNxNGcgazJuMXA0NG8xdm52Z3FtMWdxYWloMXUybDRAZw",
+< "created": "2015-05-06T21:36:17.000Z",
+< "updated": "2015-05-06T21:36:17.755Z",
+< "summary": "Test Event 1",
+< "creator": {
+< "email": "libgdata.test@googlemail.com",
+< "displayName": "GData Test"
+< },
+< "organizer": {
+< "email": "k2n1p44o1vnvgqm1gqaih1u2l4@group.calendar.google.com",
+< "displayName": "Temp Test Calendar",
+< "self": true
+< },
+< "start": {
+< "dateTime": "2014-12-20T22:15:27Z",
+< "timeZone": "UTC"
+< },
+< "end": {
+< "dateTime": "2014-12-20T22:15:28Z",
+< "timeZone": "UTC"
+< },
+< "iCalUID": "k99h2m7k5hgdvno8ef0vbl3q4g@google.com",
+< "sequence": 0,
+< "guestsCanInviteOthers": false,
+< "guestsCanSeeOtherGuests": false,
+< "reminders": {
+< "useDefault": true
+< }
+< },
+< {
+< "kind": "calendar#event",
+< "etag": "\"2861896356160000\"",
+< "id": "kl0kr2iuuhrdh4fdskdb86ed28",
+< "status": "confirmed",
+< "htmlLink": "https://www.google.com/calendar/event?eid=a2wwa3IyaXV1aHJkaDRmZHNrZGI4NmVkMjggazJuMXA0NG8xdm52Z3FtMWdxYWloMXUybDRAZw",
+< "created": "2015-05-06T21:36:18.000Z",
+< "updated": "2015-05-06T21:36:18.080Z",
+< "summary": "Test Event 2",
+< "creator": {
+< "email": "libgdata.test@googlemail.com",
+< "displayName": "GData Test"
+< },
+< "organizer": {
+< "email": "k2n1p44o1vnvgqm1gqaih1u2l4@group.calendar.google.com",
+< "displayName": "Temp Test Calendar",
+< "self": true
+< },
+< "start": {
+< "dateTime": "2014-12-20T22:03:20Z",
+< "timeZone": "UTC"
+< },
+< "end": {
+< "dateTime": "2014-12-20T22:20:00Z",
+< "timeZone": "UTC"
+< },
+< "iCalUID": "kl0kr2iuuhrdh4fdskdb86ed28@google.com",
+< "sequence": 0,
+< "guestsCanInviteOthers": false,
+< "guestsCanSeeOtherGuests": false,
+< "reminders": {
+< "useDefault": true
+< }
+< },
+< {
+< "kind": "calendar#event",
+< "etag": "\"2861896356646000\"",
+< "id": "vnsk4ts0gkt6tm6tfj3ligcnr4",
+< "status": "confirmed",
+< "htmlLink": "https://www.google.com/calendar/event?eid=dm5zazR0czBna3Q2dG02dGZqM2xpZ2NucjQgazJuMXA0NG8xdm52Z3FtMWdxYWloMXUybDRAZw",
+< "created": "2015-05-06T21:36:18.000Z",
+< "updated": "2015-05-06T21:36:18.323Z",
+< "summary": "Test Event 3",
+< "creator": {
+< "email": "libgdata.test@googlemail.com",
+< "displayName": "GData Test"
+< },
+< "organizer": {
+< "email": "k2n1p44o1vnvgqm1gqaih1u2l4@group.calendar.google.com",
+< "displayName": "Temp Test Calendar",
+< "self": true
+< },
+< "start": {
+< "date": "2014-12-20"
+< },
+< "end": {
+< "date": "2014-12-21"
+< },
+< "iCalUID": "vnsk4ts0gkt6tm6tfj3ligcnr4@google.com",
+< "sequence": 0,
+< "guestsCanInviteOthers": false,
+< "guestsCanSeeOtherGuests": false,
+< "reminders": {
+< "useDefault": true
+< }
+< }
+< ]
+< }
+
--- /dev/null
+> GET /calendar/v3/users/me/calendarList?minAccessRole=owner HTTP/1.1
+> Soup-Debug-Timestamp: 1430948119
+> Soup-Debug: SoupSession 1 (0x1bfd240), SoupMessage 3 (0x1e1f470), SoupSocket 2 (0x7fbbf8003780)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.awGOOtAe8kqEXctjnpzBjl8WoWrJJUugtZDGHw1adbjI-Zo3QrMM66TvDNRGatGY9tjJCLnfap1jXQ
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1430948119
+< Soup-Debug: SoupMessage 3 (0x1e1f470)
+< Expires: Wed, 06 May 2015 21:35:19 GMT
+< Date: Wed, 06 May 2015 21:35:19 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "calendar#calendarList",
+< "etag": "\"1430948118288000\"",
+< "nextSyncToken": "00001430948118288000",
+< "items": [
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"0\"",
+< "id": "libgdata.test@googlemail.com",
+< "summary": "libgdata.test@gmail.com",
+< "timeZone": "Europe/London",
+< "colorId": "17",
+< "backgroundColor": "#9a9cff",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": [
+< {
+< "method": "email",
+< "minutes": 10
+< },
+< {
+< "method": "popup",
+< "minutes": 30
+< }
+< ],
+< "notificationSettings": {
+< "notifications": [
+< {
+< "type": "eventCreation",
+< "method": "email"
+< },
+< {
+< "type": "eventChange",
+< "method": "email"
+< },
+< {
+< "type": "eventCancellation",
+< "method": "email"
+< },
+< {
+< "type": "eventResponse",
+< "method": "email"
+< }
+< ]
+< },
+< "primary": true
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430948114870000\"",
+< "id": "nv4r3trfm207gdgnj00h4n0aco@group.calendar.google.com",
+< "summary": "Test Calendar 1",
+< "timeZone": "UTC",
+< "colorId": "12",
+< "backgroundColor": "#fad165",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": []
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430948118288000\"",
+< "id": "nesef3i0vht0bgrm32fnkl4sf4@group.calendar.google.com",
+< "summary": "Test Calendar 2",
+< "timeZone": "UTC",
+< "colorId": "7",
+< "backgroundColor": "#42d692",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": []
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430947738744000\"",
+< "id": "4v0gftqkoct5skn7t3ushbnsfg@group.calendar.google.com",
+< "summary": "Test Calendar 1",
+< "timeZone": "UTC",
+< "colorId": "8",
+< "backgroundColor": "#16a765",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": []
+< }
+< ]
+< }
+
--- /dev/null
+> GET /calendar/v3/users/me/calendarList?minAccessRole=owner HTTP/1.1
+> Soup-Debug-Timestamp: 1430948151
+> Soup-Debug: SoupSession 1 (0x1bfd240), SoupMessage 22 (0x7fbbf00380c0), SoupSocket 12 (0x1bbc340)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.awGOOtAe8kqEXctjnpzBjl8WoWrJJUugtZDGHw1adbjI-Zo3QrMM66TvDNRGatGY9tjJCLnfap1jXQ
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1430948152
+< Soup-Debug: SoupMessage 22 (0x7fbbf00380c0)
+< Expires: Wed, 06 May 2015 21:35:52 GMT
+< Date: Wed, 06 May 2015 21:35:52 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "calendar#calendarList",
+< "etag": "\"1430948149620000\"",
+< "nextSyncToken": "00001430948149620000",
+< "items": [
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430948149620000\"",
+< "id": "tnmr3o45pbh7khv4cjfdlh2ovs@group.calendar.google.com",
+< "summary": "Test Calendar 2",
+< "timeZone": "UTC",
+< "colorId": "17",
+< "backgroundColor": "#9a9cff",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": []
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430948146361000\"",
+< "id": "ct3tu576bq2sf0u12desgioej4@group.calendar.google.com",
+< "summary": "Test Calendar 1",
+< "timeZone": "UTC",
+< "colorId": "22",
+< "backgroundColor": "#f691b2",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": []
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"0\"",
+< "id": "libgdata.test@googlemail.com",
+< "summary": "libgdata.test@gmail.com",
+< "timeZone": "Europe/London",
+< "colorId": "17",
+< "backgroundColor": "#9a9cff",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": [
+< {
+< "method": "email",
+< "minutes": 10
+< },
+< {
+< "method": "popup",
+< "minutes": 30
+< }
+< ],
+< "notificationSettings": {
+< "notifications": [
+< {
+< "type": "eventCreation",
+< "method": "email"
+< },
+< {
+< "type": "eventChange",
+< "method": "email"
+< },
+< {
+< "type": "eventCancellation",
+< "method": "email"
+< },
+< {
+< "type": "eventResponse",
+< "method": "email"
+< }
+< ]
+< },
+< "primary": true
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430947738744000\"",
+< "id": "4v0gftqkoct5skn7t3ushbnsfg@group.calendar.google.com",
+< "summary": "Test Calendar 1",
+< "timeZone": "UTC",
+< "colorId": "8",
+< "backgroundColor": "#16a765",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": []
+< }
+< ]
+< }
+
--- /dev/null
+> GET /calendar/v3/users/me/calendarList HTTP/1.1
+> Soup-Debug-Timestamp: 1430947991
+> Soup-Debug: SoupSession 1 (0x12bc240), SoupMessage 8 (0x1553650), SoupSocket 4 (0x127b410)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.awGpyfNPtG5DI_53Jiu2taI0Hq5ho1AELWfwHQ_qvmVHPbaeRDNFIstvm7c6JBFGe4wZTa6LaHrYYA
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1430947992
+< Soup-Debug: SoupMessage 8 (0x1553650)
+< Expires: Wed, 06 May 2015 21:33:12 GMT
+< Date: Wed, 06 May 2015 21:33:12 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "calendar#calendarList",
+< "etag": "\"1430947991186000\"",
+< "nextSyncToken": "00001430947991186000",
+< "items": [
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430947986743000\"",
+< "id": "rknuemffiacetoi5vhaqbbbcms@group.calendar.google.com",
+< "summary": "Test Calendar 1",
+< "timeZone": "UTC",
+< "colorId": "3",
+< "backgroundColor": "#f83a22",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": []
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"0\"",
+< "id": "libgdata.test@googlemail.com",
+< "summary": "libgdata.test@gmail.com",
+< "timeZone": "Europe/London",
+< "colorId": "17",
+< "backgroundColor": "#9a9cff",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": [
+< {
+< "method": "email",
+< "minutes": 10
+< },
+< {
+< "method": "popup",
+< "minutes": 30
+< }
+< ],
+< "notificationSettings": {
+< "notifications": [
+< {
+< "type": "eventCreation",
+< "method": "email"
+< },
+< {
+< "type": "eventChange",
+< "method": "email"
+< },
+< {
+< "type": "eventCancellation",
+< "method": "email"
+< },
+< {
+< "type": "eventResponse",
+< "method": "email"
+< }
+< ]
+< },
+< "primary": true
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430947991186000\"",
+< "id": "tukt7soavoc8j6ctm8cec7tddc@group.calendar.google.com",
+< "summary": "Test Calendar 2",
+< "timeZone": "UTC",
+< "colorId": "23",
+< "backgroundColor": "#cd74e6",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": []
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430947738744000\"",
+< "id": "4v0gftqkoct5skn7t3ushbnsfg@group.calendar.google.com",
+< "summary": "Test Calendar 1",
+< "timeZone": "UTC",
+< "colorId": "8",
+< "backgroundColor": "#16a765",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": []
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430670856222000\"",
+< "id": "#contacts@group.v.calendar.google.com",
+< "summary": "Birthdays",
+< "description": "Displays birthdays of people in Google Contacts and optionally 'Your Circles' from Google+. Also displays anniversary and other event dates from Google Contacts, if applicable.",
+< "timeZone": "Europe/London",
+< "colorId": "13",
+< "backgroundColor": "#92e1c0",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "reader",
+< "defaultReminders": []
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430670855908000\"",
+< "id": "en.uk#holiday@group.v.calendar.google.com",
+< "summary": "Holidays in United Kingdom",
+< "description": "Holidays and Observances in United Kingdom",
+< "timeZone": "Europe/London",
+< "colorId": "8",
+< "backgroundColor": "#16a765",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "reader",
+< "defaultReminders": []
+< }
+< ]
+< }
+
--- /dev/null
+> GET /calendar/v3/users/me/calendarList HTTP/1.1
+> Soup-Debug-Timestamp: 1430948018
+> Soup-Debug: SoupSession 1 (0x12bc240), SoupMessage 21 (0x1553740), SoupSocket 10 (0x7fcbe8002db0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.awGpyfNPtG5DI_53Jiu2taI0Hq5ho1AELWfwHQ_qvmVHPbaeRDNFIstvm7c6JBFGe4wZTa6LaHrYYA
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1430948018
+< Soup-Debug: SoupMessage 21 (0x1553740)
+< Expires: Wed, 06 May 2015 21:33:38 GMT
+< Date: Wed, 06 May 2015 21:33:38 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "calendar#calendarList",
+< "etag": "\"1430948012238000\"",
+< "nextSyncToken": "00001430948012238000",
+< "items": [
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430948008402000\"",
+< "id": "9d9fjltdot633i3puqr6gakja8@group.calendar.google.com",
+< "summary": "Test Calendar 1",
+< "timeZone": "UTC",
+< "colorId": "2",
+< "backgroundColor": "#d06b64",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": []
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"0\"",
+< "id": "libgdata.test@googlemail.com",
+< "summary": "libgdata.test@gmail.com",
+< "timeZone": "Europe/London",
+< "colorId": "17",
+< "backgroundColor": "#9a9cff",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": [
+< {
+< "method": "email",
+< "minutes": 10
+< },
+< {
+< "method": "popup",
+< "minutes": 30
+< }
+< ],
+< "notificationSettings": {
+< "notifications": [
+< {
+< "type": "eventCreation",
+< "method": "email"
+< },
+< {
+< "type": "eventChange",
+< "method": "email"
+< },
+< {
+< "type": "eventCancellation",
+< "method": "email"
+< },
+< {
+< "type": "eventResponse",
+< "method": "email"
+< }
+< ]
+< },
+< "primary": true
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430948012238000\"",
+< "id": "lovs1fjmbkrjur1df4u31odj30@group.calendar.google.com",
+< "summary": "Test Calendar 2",
+< "timeZone": "UTC",
+< "colorId": "5",
+< "backgroundColor": "#ff7537",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": []
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430947738744000\"",
+< "id": "4v0gftqkoct5skn7t3ushbnsfg@group.calendar.google.com",
+< "summary": "Test Calendar 1",
+< "timeZone": "UTC",
+< "colorId": "8",
+< "backgroundColor": "#16a765",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": []
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430670856222000\"",
+< "id": "#contacts@group.v.calendar.google.com",
+< "summary": "Birthdays",
+< "description": "Displays birthdays of people in Google Contacts and optionally 'Your Circles' from Google+. Also displays anniversary and other event dates from Google Contacts, if applicable.",
+< "timeZone": "Europe/London",
+< "colorId": "13",
+< "backgroundColor": "#92e1c0",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "reader",
+< "defaultReminders": []
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430670855908000\"",
+< "id": "en.uk#holiday@group.v.calendar.google.com",
+< "summary": "Holidays in United Kingdom",
+< "description": "Holidays and Observances in United Kingdom",
+< "timeZone": "Europe/London",
+< "colorId": "8",
+< "backgroundColor": "#16a765",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "reader",
+< "defaultReminders": []
+< }
+< ]
+< }
+
--- /dev/null
+> GET /calendar/v3/calendars/ndihjbq6agrl249fjqgd535qmk%40group.calendar.google.com/events HTTP/1.1
+> Soup-Debug-Timestamp: 1430948171
+> Soup-Debug: SoupSession 1 (0x1bfd240), SoupMessage 37 (0x7fbbf0038750), SoupSocket 21 (0x7fbbfc002df0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.awGOOtAe8kqEXctjnpzBjl8WoWrJJUugtZDGHw1adbjI-Zo3QrMM66TvDNRGatGY9tjJCLnfap1jXQ
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1430948171
+< Soup-Debug: SoupMessage 37 (0x7fbbf0038750)
+< Expires: Wed, 06 May 2015 21:36:11 GMT
+< Date: Wed, 06 May 2015 21:36:11 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "calendar#events",
+< "etag": "\"1430948171626000\"",
+< "summary": "Temp Test Calendar",
+< "updated": "2015-05-06T21:36:11.626Z",
+< "timeZone": "UTC",
+< "accessRole": "owner",
+< "defaultReminders": [],
+< "nextSyncToken": "CJDs2KuJrsUCEJDs2KuJrsUCGAU=",
+< "items": [
+< {
+< "kind": "calendar#event",
+< "etag": "\"2861896341554000\"",
+< "id": "hbea62g6r0itsmlehrh0u05hr4",
+< "status": "confirmed",
+< "htmlLink": "https://www.google.com/calendar/event?eid=aGJlYTYyZzZyMGl0c21sZWhyaDB1MDVocjQgc21jNGFjbjBhcnVvMGo0ZGljczU1N2hkMjhAZw",
+< "created": "2015-05-06T21:36:10.000Z",
+< "updated": "2015-05-06T21:36:10.777Z",
+< "summary": "Test Event 1",
+< "creator": {
+< "email": "libgdata.test@googlemail.com",
+< "displayName": "GData Test"
+< },
+< "organizer": {
+< "email": "ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com",
+< "displayName": "Temp Test Calendar",
+< "self": true
+< },
+< "start": {
+< "dateTime": "2014-12-20T22:15:27Z",
+< "timeZone": "UTC"
+< },
+< "end": {
+< "dateTime": "2014-12-20T22:15:28Z",
+< "timeZone": "UTC"
+< },
+< "iCalUID": "hbea62g6r0itsmlehrh0u05hr4@google.com",
+< "sequence": 0,
+< "guestsCanInviteOthers": false,
+< "guestsCanSeeOtherGuests": false,
+< "reminders": {
+< "useDefault": true
+< }
+< },
+< {
+< "kind": "calendar#event",
+< "etag": "\"2861896342412000\"",
+< "id": "5fg2p720ibusu67t7hdrrcdc38",
+< "status": "confirmed",
+< "htmlLink": "https://www.google.com/calendar/event?eid=NWZnMnA3MjBpYnVzdTY3dDdoZHJyY2RjMzggc21jNGFjbjBhcnVvMGo0ZGljczU1N2hkMjhAZw",
+< "created": "2015-05-06T21:36:11.000Z",
+< "updated": "2015-05-06T21:36:11.206Z",
+< "summary": "Test Event 2",
+< "creator": {
+< "email": "libgdata.test@googlemail.com",
+< "displayName": "GData Test"
+< },
+< "organizer": {
+< "email": "ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com",
+< "displayName": "Temp Test Calendar",
+< "self": true
+< },
+< "start": {
+< "dateTime": "2014-12-20T22:03:20Z",
+< "timeZone": "UTC"
+< },
+< "end": {
+< "dateTime": "2014-12-20T22:20:00Z",
+< "timeZone": "UTC"
+< },
+< "iCalUID": "5fg2p720ibusu67t7hdrrcdc38@google.com",
+< "sequence": 0,
+< "guestsCanInviteOthers": false,
+< "guestsCanSeeOtherGuests": false,
+< "reminders": {
+< "useDefault": true
+< }
+< },
+< {
+< "kind": "calendar#event",
+< "etag": "\"2861896343106000\"",
+< "id": "pme78iesfula0qr5iktlf2l4no",
+< "status": "confirmed",
+< "htmlLink": "https://www.google.com/calendar/event?eid=cG1lNzhpZXNmdWxhMHFyNWlrdGxmMmw0bm8gc21jNGFjbjBhcnVvMGo0ZGljczU1N2hkMjhAZw",
+< "created": "2015-05-06T21:36:11.000Z",
+< "updated": "2015-05-06T21:36:11.553Z",
+< "summary": "Test Event 3",
+< "creator": {
+< "email": "libgdata.test@googlemail.com",
+< "displayName": "GData Test"
+< },
+< "organizer": {
+< "email": "ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com",
+< "displayName": "Temp Test Calendar",
+< "self": true
+< },
+< "start": {
+< "date": "2014-12-20"
+< },
+< "end": {
+< "date": "2014-12-21"
+< },
+< "iCalUID": "pme78iesfula0qr5iktlf2l4no@google.com",
+< "sequence": 0,
+< "guestsCanInviteOthers": false,
+< "guestsCanSeeOtherGuests": false,
+< "reminders": {
+< "useDefault": true
+< }
+< }
+< ]
+< }
+
--- /dev/null
+> GET /calendar/v3/calendars/ndihjbq6agrl249fjqgd535qmk%40group.calendar.google.com/events HTTP/1.1
+> Soup-Debug-Timestamp: 1430948189
+> Soup-Debug: SoupSession 1 (0x1bfd240), SoupMessage 57 (0x1e1f650), SoupSocket 34 (0x7fbbf00366b0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.awGOOtAe8kqEXctjnpzBjl8WoWrJJUugtZDGHw1adbjI-Zo3QrMM66TvDNRGatGY9tjJCLnfap1jXQ
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1430948189
+< Soup-Debug: SoupMessage 57 (0x1e1f650)
+< Expires: Wed, 06 May 2015 21:36:29 GMT
+< Date: Wed, 06 May 2015 21:36:29 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "calendar#events",
+< "etag": "\"1430948189193000\"",
+< "summary": "Temp Test Calendar",
+< "updated": "2015-05-06T21:36:29.193Z",
+< "timeZone": "UTC",
+< "accessRole": "owner",
+< "defaultReminders": [],
+< "nextSyncToken": "CKiGibSJrsUCEKiGibSJrsUCGAU=",
+< "items": [
+< {
+< "kind": "calendar#event",
+< "etag": "\"2861896376542000\"",
+< "id": "2n570av5hfh1t86or4idi7fggc",
+< "status": "confirmed",
+< "htmlLink": "https://www.google.com/calendar/event?eid=Mm41NzBhdjVoZmgxdDg2b3I0aWRpN2ZnZ2MgbmRpaGpicTZhZ3JsMjQ5ZmpxZ2Q1MzVxbWtAZw",
+< "created": "2015-05-06T21:36:28.000Z",
+< "updated": "2015-05-06T21:36:28.271Z",
+< "summary": "Test Event 1",
+< "creator": {
+< "email": "libgdata.test@googlemail.com",
+< "displayName": "GData Test"
+< },
+< "organizer": {
+< "email": "ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com",
+< "displayName": "Temp Test Calendar",
+< "self": true
+< },
+< "start": {
+< "dateTime": "2014-12-20T22:15:27Z",
+< "timeZone": "UTC"
+< },
+< "end": {
+< "dateTime": "2014-12-20T22:15:28Z",
+< "timeZone": "UTC"
+< },
+< "iCalUID": "2n570av5hfh1t86or4idi7fggc@google.com",
+< "sequence": 0,
+< "guestsCanInviteOthers": false,
+< "guestsCanSeeOtherGuests": false,
+< "reminders": {
+< "useDefault": true
+< }
+< },
+< {
+< "kind": "calendar#event",
+< "etag": "\"2861896377638000\"",
+< "id": "dkbmejutdvtal2acso08hgca84",
+< "status": "confirmed",
+< "htmlLink": "https://www.google.com/calendar/event?eid=ZGtibWVqdXRkdnRhbDJhY3NvMDhoZ2NhODQgbmRpaGpicTZhZ3JsMjQ5ZmpxZ2Q1MzVxbWtAZw",
+< "created": "2015-05-06T21:36:28.000Z",
+< "updated": "2015-05-06T21:36:28.819Z",
+< "summary": "Test Event 2",
+< "creator": {
+< "email": "libgdata.test@googlemail.com",
+< "displayName": "GData Test"
+< },
+< "organizer": {
+< "email": "ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com",
+< "displayName": "Temp Test Calendar",
+< "self": true
+< },
+< "start": {
+< "dateTime": "2014-12-20T22:03:20Z",
+< "timeZone": "UTC"
+< },
+< "end": {
+< "dateTime": "2014-12-20T22:20:00Z",
+< "timeZone": "UTC"
+< },
+< "iCalUID": "dkbmejutdvtal2acso08hgca84@google.com",
+< "sequence": 0,
+< "guestsCanInviteOthers": false,
+< "guestsCanSeeOtherGuests": false,
+< "reminders": {
+< "useDefault": true
+< }
+< },
+< {
+< "kind": "calendar#event",
+< "etag": "\"2861896378226000\"",
+< "id": "qrg4bvlh9b6272o0du9p2rm75c",
+< "status": "confirmed",
+< "htmlLink": "https://www.google.com/calendar/event?eid=cXJnNGJ2bGg5YjYyNzJvMGR1OXAycm03NWMgbmRpaGpicTZhZ3JsMjQ5ZmpxZ2Q1MzVxbWtAZw",
+< "created": "2015-05-06T21:36:29.000Z",
+< "updated": "2015-05-06T21:36:29.113Z",
+< "summary": "Test Event 3",
+< "creator": {
+< "email": "libgdata.test@googlemail.com",
+< "displayName": "GData Test"
+< },
+< "organizer": {
+< "email": "ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com",
+< "displayName": "Temp Test Calendar",
+< "self": true
+< },
+< "start": {
+< "date": "2014-12-20"
+< },
+< "end": {
+< "date": "2014-12-21"
+< },
+< "iCalUID": "qrg4bvlh9b6272o0du9p2rm75c@google.com",
+< "sequence": 0,
+< "guestsCanInviteOthers": false,
+< "guestsCanSeeOtherGuests": false,
+< "reminders": {
+< "useDefault": true
+< }
+< }
+< ]
+< }
+
--- /dev/null
+> GET /calendar/v3/users/me/calendarList?minAccessRole=owner HTTP/1.1
+> Soup-Debug-Timestamp: 1430948141
+> Soup-Debug: SoupSession 1 (0x1bfd240), SoupMessage 17 (0x1e1f650), SoupSocket 10 (0x1bbc1a0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.awGOOtAe8kqEXctjnpzBjl8WoWrJJUugtZDGHw1adbjI-Zo3QrMM66TvDNRGatGY9tjJCLnfap1jXQ
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1430948142
+< Soup-Debug: SoupMessage 17 (0x1e1f650)
+< Expires: Wed, 06 May 2015 21:35:42 GMT
+< Date: Wed, 06 May 2015 21:35:42 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "calendar#calendarList",
+< "etag": "\"1430948141160000\"",
+< "nextSyncToken": "00001430948141160000",
+< "items": [
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430948135129000\"",
+< "id": "vu04ejgbitve8pp21t16t05ukg@group.calendar.google.com",
+< "summary": "Test Calendar 1",
+< "timeZone": "UTC",
+< "colorId": "6",
+< "backgroundColor": "#ffad46",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": []
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430948141160000\"",
+< "id": "ht16mct323684dtlejp0tptns8@group.calendar.google.com",
+< "summary": "Test Calendar 2",
+< "timeZone": "UTC",
+< "colorId": "9",
+< "backgroundColor": "#7bd148",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": []
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"0\"",
+< "id": "libgdata.test@googlemail.com",
+< "summary": "libgdata.test@gmail.com",
+< "timeZone": "Europe/London",
+< "colorId": "17",
+< "backgroundColor": "#9a9cff",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": [
+< {
+< "method": "email",
+< "minutes": 10
+< },
+< {
+< "method": "popup",
+< "minutes": 30
+< }
+< ],
+< "notificationSettings": {
+< "notifications": [
+< {
+< "type": "eventCreation",
+< "method": "email"
+< },
+< {
+< "type": "eventChange",
+< "method": "email"
+< },
+< {
+< "type": "eventCancellation",
+< "method": "email"
+< },
+< {
+< "type": "eventResponse",
+< "method": "email"
+< }
+< ]
+< },
+< "primary": true
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430947738744000\"",
+< "id": "4v0gftqkoct5skn7t3ushbnsfg@group.calendar.google.com",
+< "summary": "Test Calendar 1",
+< "timeZone": "UTC",
+< "colorId": "8",
+< "backgroundColor": "#16a765",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": []
+< }
+< ]
+< }
+
--- /dev/null
+> GET /calendar/v3/users/me/calendarList?minAccessRole=owner HTTP/1.1
+> Soup-Debug-Timestamp: 1430948164
+> Soup-Debug: SoupSession 1 (0x1bfd240), SoupMessage 30 (0x1e1f740), SoupSocket 16 (0x7fbbfc002df0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.awGOOtAe8kqEXctjnpzBjl8WoWrJJUugtZDGHw1adbjI-Zo3QrMM66TvDNRGatGY9tjJCLnfap1jXQ
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1430948164
+< Soup-Debug: SoupMessage 30 (0x1e1f740)
+< Expires: Wed, 06 May 2015 21:36:04 GMT
+< Date: Wed, 06 May 2015 21:36:04 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "calendar#calendarList",
+< "etag": "\"1430948160820000\"",
+< "nextSyncToken": "00001430948160820000",
+< "items": [
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430948160820000\"",
+< "id": "g0i0o30l2jitvb7tbipi26v94c@group.calendar.google.com",
+< "summary": "Test Calendar 2",
+< "timeZone": "UTC",
+< "colorId": "10",
+< "backgroundColor": "#b3dc6c",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": []
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"0\"",
+< "id": "libgdata.test@googlemail.com",
+< "summary": "libgdata.test@gmail.com",
+< "timeZone": "Europe/London",
+< "colorId": "17",
+< "backgroundColor": "#9a9cff",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": [
+< {
+< "method": "email",
+< "minutes": 10
+< },
+< {
+< "method": "popup",
+< "minutes": 30
+< }
+< ],
+< "notificationSettings": {
+< "notifications": [
+< {
+< "type": "eventCreation",
+< "method": "email"
+< },
+< {
+< "type": "eventChange",
+< "method": "email"
+< },
+< {
+< "type": "eventCancellation",
+< "method": "email"
+< },
+< {
+< "type": "eventResponse",
+< "method": "email"
+< }
+< ]
+< },
+< "primary": true
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430948157719000\"",
+< "id": "b9bd2rombumk4tgesbmejeoa4g@group.calendar.google.com",
+< "summary": "Test Calendar 1",
+< "timeZone": "UTC",
+< "colorId": "4",
+< "backgroundColor": "#fa573c",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": []
+< },
+< {
+< "kind": "calendar#calendarListEntry",
+< "etag": "\"1430947738744000\"",
+< "id": "4v0gftqkoct5skn7t3ushbnsfg@group.calendar.google.com",
+< "summary": "Test Calendar 1",
+< "timeZone": "UTC",
+< "colorId": "8",
+< "backgroundColor": "#16a765",
+< "foregroundColor": "#000000",
+< "selected": true,
+< "accessRole": "owner",
+< "defaultReminders": []
+< }
+< ]
+< }
+
--- /dev/null
+> POST /calendar/v3/calendars HTTP/1.1
+> Soup-Debug-Timestamp: 1430948154
+> Soup-Debug: SoupSession 1 (0x1bfd240), SoupMessage 25 (0x1e1f0b0), SoupSocket 13 (0x1bbc340)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.awGOOtAe8kqEXctjnpzBjl8WoWrJJUugtZDGHw1adbjI-Zo3QrMM66TvDNRGatGY9tjJCLnfap1jXQ
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+>
+> {"kind":"calendar#calendar","summary":"Test Calendar 1","hidden":false,"backgroundColor":"#7a367a","selected":false}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1430948158
+< Soup-Debug: SoupMessage 25 (0x1e1f0b0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Wed, 06 May 2015 21:35:58 GMT
+< ETag: "pc4WsFKtK0DPTzlsquzpd-pobYU/cnBjtGBXrPYba0jayIgaSUILJIM"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "calendar#calendar",
+< "etag": "\"pc4WsFKtK0DPTzlsquzpd-pobYU/cnBjtGBXrPYba0jayIgaSUILJIM\"",
+< "id": "b9bd2rombumk4tgesbmejeoa4g@group.calendar.google.com",
+< "summary": "Test Calendar 1"
+< }
+
+> POST /calendar/v3/calendars HTTP/1.1
+> Soup-Debug-Timestamp: 1430948158
+> Soup-Debug: SoupSession 1 (0x1bfd240), SoupMessage 26 (0x1e1f290), SoupSocket 14 (0x7fbbf8003780)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.awGOOtAe8kqEXctjnpzBjl8WoWrJJUugtZDGHw1adbjI-Zo3QrMM66TvDNRGatGY9tjJCLnfap1jXQ
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+>
+> {"kind":"calendar#calendar","summary":"Test Calendar 2","hidden":false,"backgroundColor":"#7a367a","selected":false}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1430948162
+< Soup-Debug: SoupMessage 26 (0x1e1f290)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Wed, 06 May 2015 21:36:02 GMT
+< ETag: "pc4WsFKtK0DPTzlsquzpd-pobYU/X-qSYBJECbfL3lquVEwIFUTSIaQ"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "calendar#calendar",
+< "etag": "\"pc4WsFKtK0DPTzlsquzpd-pobYU/X-qSYBJECbfL3lquVEwIFUTSIaQ\"",
+< "id": "g0i0o30l2jitvb7tbipi26v94c@group.calendar.google.com",
+< "summary": "Test Calendar 2"
+< }
+
--- /dev/null
+> POST /calendar/v3/calendars/ndihjbq6agrl249fjqgd535qmk%40group.calendar.google.com/events HTTP/1.1
+> Soup-Debug-Timestamp: 1430948187
+> Soup-Debug: SoupSession 1 (0x1bfd240), SoupMessage 52 (0x1e1f560), SoupSocket 31 (0x7fbbf0036510)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.awGOOtAe8kqEXctjnpzBjl8WoWrJJUugtZDGHw1adbjI-Zo3QrMM66TvDNRGatGY9tjJCLnfap1jXQ
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+>
+> {"kind":"calendar#event","summary":"Test Event 1","anyoneCanAddSelf":false,"guestsCanInviteOthers":false,"guestsCanModify":false,"guestsCanSeeOtherGuests":false,"start":{"dateTime":"2014-12-20T22:15:27Z","timeZone":"UTC"},"end":{"dateTime":"2014-12-20T22:15:28Z","timeZone":"UTC"},"attendees":[]}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1430948188
+< Soup-Debug: SoupMessage 52 (0x1e1f560)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Wed, 06 May 2015 21:36:28 GMT
+< ETag: "2861896376542000"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "calendar#event",
+< "etag": "\"2861896376542000\"",
+< "id": "2n570av5hfh1t86or4idi7fggc",
+< "status": "confirmed",
+< "htmlLink": "https://www.google.com/calendar/event?eid=Mm41NzBhdjVoZmgxdDg2b3I0aWRpN2ZnZ2MgbmRpaGpicTZhZ3JsMjQ5ZmpxZ2Q1MzVxbWtAZw",
+< "created": "2015-05-06T21:36:28.000Z",
+< "updated": "2015-05-06T21:36:28.271Z",
+< "summary": "Test Event 1",
+< "creator": {
+< "email": "libgdata.test@googlemail.com",
+< "displayName": "GData Test"
+< },
+< "organizer": {
+< "email": "ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com",
+< "displayName": "Temp Test Calendar",
+< "self": true
+< },
+< "start": {
+< "dateTime": "2014-12-20T22:15:27Z",
+< "timeZone": "UTC"
+< },
+< "end": {
+< "dateTime": "2014-12-20T22:15:28Z",
+< "timeZone": "UTC"
+< },
+< "iCalUID": "2n570av5hfh1t86or4idi7fggc@google.com",
+< "sequence": 0,
+< "guestsCanInviteOthers": false,
+< "guestsCanSeeOtherGuests": false,
+< "reminders": {
+< "useDefault": true
+< }
+< }
+
+> POST /calendar/v3/calendars/ndihjbq6agrl249fjqgd535qmk%40group.calendar.google.com/events HTTP/1.1
+> Soup-Debug-Timestamp: 1430948188
+> Soup-Debug: SoupSession 1 (0x1bfd240), SoupMessage 53 (0x1e1f290), SoupSocket 32 (0x7fbbfc002df0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.awGOOtAe8kqEXctjnpzBjl8WoWrJJUugtZDGHw1adbjI-Zo3QrMM66TvDNRGatGY9tjJCLnfap1jXQ
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+>
+> {"kind":"calendar#event","summary":"Test Event 2","anyoneCanAddSelf":false,"guestsCanInviteOthers":false,"guestsCanModify":false,"guestsCanSeeOtherGuests":false,"start":{"dateTime":"2014-12-20T22:03:20Z","timeZone":"UTC"},"end":{"dateTime":"2014-12-20T22:20:00Z","timeZone":"UTC"},"attendees":[]}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1430948188
+< Soup-Debug: SoupMessage 53 (0x1e1f290)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Wed, 06 May 2015 21:36:28 GMT
+< ETag: "2861896377638000"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "calendar#event",
+< "etag": "\"2861896377638000\"",
+< "id": "dkbmejutdvtal2acso08hgca84",
+< "status": "confirmed",
+< "htmlLink": "https://www.google.com/calendar/event?eid=ZGtibWVqdXRkdnRhbDJhY3NvMDhoZ2NhODQgbmRpaGpicTZhZ3JsMjQ5ZmpxZ2Q1MzVxbWtAZw",
+< "created": "2015-05-06T21:36:28.000Z",
+< "updated": "2015-05-06T21:36:28.819Z",
+< "summary": "Test Event 2",
+< "creator": {
+< "email": "libgdata.test@googlemail.com",
+< "displayName": "GData Test"
+< },
+< "organizer": {
+< "email": "ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com",
+< "displayName": "Temp Test Calendar",
+< "self": true
+< },
+< "start": {
+< "dateTime": "2014-12-20T22:03:20Z",
+< "timeZone": "UTC"
+< },
+< "end": {
+< "dateTime": "2014-12-20T22:20:00Z",
+< "timeZone": "UTC"
+< },
+< "iCalUID": "dkbmejutdvtal2acso08hgca84@google.com",
+< "sequence": 0,
+< "guestsCanInviteOthers": false,
+< "guestsCanSeeOtherGuests": false,
+< "reminders": {
+< "useDefault": true
+< }
+< }
+
+> POST /calendar/v3/calendars/ndihjbq6agrl249fjqgd535qmk%40group.calendar.google.com/events HTTP/1.1
+> Soup-Debug-Timestamp: 1430948189
+> Soup-Debug: SoupSession 1 (0x1bfd240), SoupMessage 54 (0x1e1f0b0), SoupSocket 33 (0x7fbbf0036100)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.awGOOtAe8kqEXctjnpzBjl8WoWrJJUugtZDGHw1adbjI-Zo3QrMM66TvDNRGatGY9tjJCLnfap1jXQ
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+>
+> {"kind":"calendar#event","summary":"Test Event 3","anyoneCanAddSelf":false,"guestsCanInviteOthers":false,"guestsCanModify":false,"guestsCanSeeOtherGuests":false,"start":{"date":"2014-12-20","timeZone":"UTC"},"end":{"date":"2014-12-21","timeZone":"UTC"},"attendees":[]}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1430948189
+< Soup-Debug: SoupMessage 54 (0x1e1f0b0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Wed, 06 May 2015 21:36:29 GMT
+< ETag: "2861896378226000"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "calendar#event",
+< "etag": "\"2861896378226000\"",
+< "id": "qrg4bvlh9b6272o0du9p2rm75c",
+< "status": "confirmed",
+< "htmlLink": "https://www.google.com/calendar/event?eid=cXJnNGJ2bGg5YjYyNzJvMGR1OXAycm03NWMgbmRpaGpicTZhZ3JsMjQ5ZmpxZ2Q1MzVxbWtAZw",
+< "created": "2015-05-06T21:36:29.000Z",
+< "updated": "2015-05-06T21:36:29.113Z",
+< "summary": "Test Event 3",
+< "creator": {
+< "email": "libgdata.test@googlemail.com",
+< "displayName": "GData Test"
+< },
+< "organizer": {
+< "email": "ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com",
+< "displayName": "Temp Test Calendar",
+< "self": true
+< },
+< "start": {
+< "date": "2014-12-20"
+< },
+< "end": {
+< "date": "2014-12-21"
+< },
+< "iCalUID": "qrg4bvlh9b6272o0du9p2rm75c@google.com",
+< "sequence": 0,
+< "guestsCanInviteOthers": false,
+< "guestsCanSeeOtherGuests": false,
+< "reminders": {
+< "useDefault": true
+< }
+< }
+
--- /dev/null
+> POST /calendar/v3/calendars HTTP/1.1
+> Soup-Debug-Timestamp: 1432766371
+> Soup-Debug: SoupSession 1 (0x67c240), SoupMessage 15 (0xa55470), SoupSocket 7 (0x63b0d0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.gAFohzAjbcf9YCyjGbgHBTd3VFWTxECP5Um14DHl5eaMsx6UeCxMTAdaLmIO32vU6LgW7Ybe1Abmag
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+>
+> {"kind":"calendar#calendar","summary":"Temp Test Calendar","hidden":false,"backgroundColor":"#7a367a","selected":false}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1432766373
+< Soup-Debug: SoupMessage 15 (0xa55470)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Wed, 27 May 2015 22:39:33 GMT
+< ETag: "pc4WsFKtK0DPTzlsquzpd-pobYU/dA-nwMO6Tel1lbt3WcBQAAl9e34"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "calendar#calendar",
+< "etag": "\"pc4WsFKtK0DPTzlsquzpd-pobYU/dA-nwMO6Tel1lbt3WcBQAAl9e34\"",
+< "id": "ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com",
+< "summary": "Temp Test Calendar"
+< }
+
--- /dev/null
+> POST /calendar/v3/calendars/ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com/acl HTTP/1.1
+> Soup-Debug-Timestamp: 1432766373
+> Soup-Debug: SoupSession 1 (0x67c240), SoupMessage 16 (0xa55290), SoupSocket 8 (0x7fffd8003780)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.gAFohzAjbcf9YCyjGbgHBTd3VFWTxECP5Um14DHl5eaMsx6UeCxMTAdaLmIO32vU6LgW7Ybe1Abmag
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+>
+> {"kind":"calendar#aclRule","role":"writer","scope":{"type":"user","value":"darcy@gmail.com"}}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1432766374
+< Soup-Debug: SoupMessage 16 (0xa55290)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Wed, 27 May 2015 22:39:34 GMT
+< ETag: "00001432766374263000"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "calendar#aclRule",
+< "etag": "\"00001432766374263000\"",
+< "id": "user:darcy@gmail.com",
+< "scope": {
+< "type": "user",
+< "value": "darcy@gmail.com"
+< },
+< "role": "writer"
+< }
+
--- /dev/null
+> DELETE /calendar/v3/calendars/ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com/events/8ndrpt97cl0c9lkbpojq9tiquo HTTP/1.1
+> Soup-Debug-Timestamp: 1430949589
+> Soup-Debug: SoupSession 1 (0xc32240), SoupMessage 8 (0xffb8b0), SoupSocket 5 (0x7fe15000d9e0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.awGy-MEL7oZEh875MiCaHZKx6KNZcPN1FIFpJB2r_OlDKat0j_JfenP1BZb1Skk2cO5F6VaQkUo7wg
+> GData-Version: 2
+> If-Match: "2861899178874000"
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1430949589
+< Soup-Debug: SoupMessage 8 (0xffb8b0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Wed, 06 May 2015 21:59:49 GMT
+< Vary: Origin
+< Vary: X-Origin
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+<
+
--- /dev/null
+> DELETE /calendar/v3/calendars/b9bd2rombumk4tgesbmejeoa4g@group.calendar.google.com HTTP/1.1
+> Soup-Debug-Timestamp: 1430948164
+> Soup-Debug: SoupSession 1 (0x1bfd240), SoupMessage 31 (0x1e1f560), SoupSocket 16 (0x7fbbfc002df0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.awGOOtAe8kqEXctjnpzBjl8WoWrJJUugtZDGHw1adbjI-Zo3QrMM66TvDNRGatGY9tjJCLnfap1jXQ
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1430948166
+< Soup-Debug: SoupMessage 31 (0x1e1f560)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Wed, 06 May 2015 21:36:06 GMT
+< ETag: "pc4WsFKtK0DPTzlsquzpd-pobYU/vyGp6PvFo4RvsFtPoIWeCReyIC8"
+< Vary: Origin
+< Vary: X-Origin
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+<
+
+> DELETE /calendar/v3/calendars/g0i0o30l2jitvb7tbipi26v94c@group.calendar.google.com HTTP/1.1
+> Soup-Debug-Timestamp: 1430948166
+> Soup-Debug: SoupSession 1 (0x1bfd240), SoupMessage 32 (0x1e1f560), SoupSocket 17 (0x7fbbfc002f90)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.awGOOtAe8kqEXctjnpzBjl8WoWrJJUugtZDGHw1adbjI-Zo3QrMM66TvDNRGatGY9tjJCLnfap1jXQ
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1430948167
+< Soup-Debug: SoupMessage 32 (0x1e1f560)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Wed, 06 May 2015 21:36:07 GMT
+< ETag: "pc4WsFKtK0DPTzlsquzpd-pobYU/vyGp6PvFo4RvsFtPoIWeCReyIC8"
+< Vary: Origin
+< Vary: X-Origin
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+<
+
--- /dev/null
+> DELETE /calendar/v3/calendars/ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com/events/2n570av5hfh1t86or4idi7fggc HTTP/1.1
+> Soup-Debug-Timestamp: 1430948189
+> Soup-Debug: SoupSession 1 (0x1bfd240), SoupMessage 58 (0x1e1f0b0), SoupSocket 34 (0x7fbbf00366b0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.awGOOtAe8kqEXctjnpzBjl8WoWrJJUugtZDGHw1adbjI-Zo3QrMM66TvDNRGatGY9tjJCLnfap1jXQ
+> GData-Version: 2
+> If-Match: "2861896376542000"
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1430948190
+< Soup-Debug: SoupMessage 58 (0x1e1f0b0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Wed, 06 May 2015 21:36:30 GMT
+< Vary: Origin
+< Vary: X-Origin
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+<
+
+> DELETE /calendar/v3/calendars/ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com/events/dkbmejutdvtal2acso08hgca84 HTTP/1.1
+> Soup-Debug-Timestamp: 1430948190
+> Soup-Debug: SoupSession 1 (0x1bfd240), SoupMessage 59 (0x1e1f290), SoupSocket 35 (0x7fbbf0036370)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.awGOOtAe8kqEXctjnpzBjl8WoWrJJUugtZDGHw1adbjI-Zo3QrMM66TvDNRGatGY9tjJCLnfap1jXQ
+> GData-Version: 2
+> If-Match: "2861896377638000"
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1430948190
+< Soup-Debug: SoupMessage 59 (0x1e1f290)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Wed, 06 May 2015 21:36:30 GMT
+< Vary: Origin
+< Vary: X-Origin
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+<
+
+> DELETE /calendar/v3/calendars/ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com/events/qrg4bvlh9b6272o0du9p2rm75c HTTP/1.1
+> Soup-Debug-Timestamp: 1430948190
+> Soup-Debug: SoupSession 1 (0x1bfd240), SoupMessage 60 (0x1e1f560), SoupSocket 36 (0x7fbbf0036440)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.awGOOtAe8kqEXctjnpzBjl8WoWrJJUugtZDGHw1adbjI-Zo3QrMM66TvDNRGatGY9tjJCLnfap1jXQ
+> GData-Version: 2
+> If-Match: "2861896378226000"
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1430948190
+< Soup-Debug: SoupMessage 60 (0x1e1f560)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Wed, 06 May 2015 21:36:30 GMT
+< Vary: Origin
+< Vary: X-Origin
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+<
+
--- /dev/null
+> DELETE /calendar/v3/calendars/ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com HTTP/1.1
+> Soup-Debug-Timestamp: 1432766374
+> Soup-Debug: SoupSession 1 (0x67c240), SoupMessage 18 (0xa550b0), SoupSocket 7 (0x63b0d0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.gAFohzAjbcf9YCyjGbgHBTd3VFWTxECP5Um14DHl5eaMsx6UeCxMTAdaLmIO32vU6LgW7Ybe1Abmag
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1432766375
+< Soup-Debug: SoupMessage 18 (0xa550b0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Wed, 27 May 2015 22:39:35 GMT
+< ETag: "pc4WsFKtK0DPTzlsquzpd-pobYU/vyGp6PvFo4RvsFtPoIWeCReyIC8"
+< Vary: Origin
+< Vary: X-Origin
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+<
+
--- /dev/null
+> DELETE /calendar/v3/calendars/ndihjbq6agrl249fjqgd535qmk@group.calendar.google.com/acl/user:darcy@gmail.com HTTP/1.1
+> Soup-Debug-Timestamp: 1432766619
+> Soup-Debug: SoupSession 1 (0x67c240), SoupMessage 13 (0x6efa90), SoupSocket 6 (0x63b270)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.gAHddfQWb9C4GiMShf_Y0IJh-yvldLrsnTlElpkVj6vzIPGfgSOOhva2ihZRFxK3FLmzu4RCCv_kHQ
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1432766619
+< Soup-Debug: SoupMessage 13 (0x6efa90)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Wed, 27 May 2015 22:43:39 GMT
+< Vary: Origin
+< Vary: X-Origin
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+<
+
--- /dev/null
+> POST /o/oauth2/token HTTP/1.1
+> Soup-Debug-Timestamp: 1415489529
+> Soup-Debug: SoupSession 1 (0x15cd370), SoupMessage 1 (0x182f190), SoupSocket 1 (0x18d5b40)
+> Host: accounts.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+>
+> client_id=352818697630-nqu2cmt5quqd6lr17ouoqmb684u84l1f.apps.googleusercontent.com&client_secret=-fA4pHQJxR3zJ-FyAMPQsikg&code=4%2FNua_ECWUtlC6qom7GcJTbcUM_EJPADvfiYd6rsaI2_I.8oJr4XcE9XsaoiIBeO6P2m_S24MjkwI&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&grant_type=authorization_code
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415489529
+< Soup-Debug: SoupMessage 1 (0x182f190)
+< Content-Type: application/json; charset=utf-8
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Sat, 08 Nov 2014 23:32:09 GMT
+< Content-Disposition: attachment; filename="json.txt"; filename*=UTF-8''json.txt
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< {
+< "access_token" : "ya29.uADGgjhB_J0BE91XytCcfZvo9_mpuMXuvZIgekCmnwsm7ibh5nDoFrZg5fsyc8dCR_xSYxaoaD061w",
+< "token_type" : "Bearer",
+< "expires_in" : 3600,
+< "refresh_token" : "1/oPu3xJaZU1U8fZhL9K6ZgvkoisVntA66PE7OuRs3pok"
+< }
+
--- /dev/null
+> POST /accounts/ClientLogin HTTP/1.1
+> Soup-Debug-Timestamp: 1375253707
+> Soup-Debug: SoupSession 1 (0x66f500), SoupMessage 1 (0x7d2e60), SoupSocket 1 (0x72a6d0)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> accountType=HOSTED%5FOR%5FGOOGLE&Email=libgdata%2Etest%40gmail%2Ecom&Passwd=gdata%2Dgdata&service=cp&source=ytapi%2DGNOME%2Dlibgdata%2D444fubtt%2D0
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375253707
+< Soup-Debug: SoupMessage 1 (0x7d2e60)
+< Content-Type: text/plain
+< Cache-control: no-cache, no-store
+< Pragma: no-cache
+< Expires: Mon, 01-Jan-1990 00:00:00 GMT
+< Date: Wed, 31 Jul 2013 06:55:07 GMT
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 947
+< Server: GSE
+<
+< SID=DQAAANMAAABLVNYA7llnN5GVblNPXi5xnUpfn_1Nt5rUGq5fgJHP3lGFHSyWeFu8iaAhhTy_IkFR4abU1u0PItdmErKC7BAb4yEUNfBsE_DAJW3QiSX9gsUN9Upn3OGfkWWE9rtc3SuMRRUtVa5uIrI3LFeFpTj-mDugsJ6eLNSXuBX_I2ZXut0cc2cye4-y6sIqgEa6bBitbGbEPUUWUaXzXJUu19acTECE-3-B2krVhb8vfG1AHN5rzSoc1Q_VyilznzxZBPVRfPhJw3Y5IebOCCnZIXPh7WmGG1ZD873sWpj-kpUpcg
+< LSID=DQAAANYAAAANiE0kPwbpbCxKR_R7h-ekhx_I6BM74CA7iCX0q8ILYiIGXDhjanJyMF8-YSr48czMnizyxddpEDZQL5v8W6CaLltlzVYSdSEegJ_p9G0_n6dfhQjgn-2d0prbi6g9_KoLs71vaMnTXGma8Honl3n1_cfdI7asujoOns4QUbs4vhk_n9Ag9wJzNjHW5h7dNerxKH4uzqeOMRifAefv3_ZWZdV1jE37C_HM4lrLBkVs4g5Nn7QGbEu4zBRfm6tbUsyGGArm184KaDmtlj56BazwIuMxn2vgWds0PoDaD--qFg
+< Auth=DQAAANUAAAANiE0kPwbpbCxKR_R7h-ekhx_I6BM74CA7iCX0q8ILYiIGXDhjanJyMF8-YSr48cy3WO11uK-_KLeoeuvXODGKn-9bqQT-KaNXSV63Iojd-SXaAiAhSaxuNwEGXj5Z7KO_QAebRcA_bmVZzZGO0vjwhBGmnYrukoKPnlexCe2AZeuEyqR-ZY-Hl1JHY3iQ30RK70nlQOM__saeNQYzVz3WzcUjGZQ_0atIQbbOPrlNJvWPUOKBHHVuHDl-TJPvFhdUmvTRCMke4EDhQGxWnq3kfeSnDCzg-OCkD4CAcaOWeQ
+
--- /dev/null
+> POST /accounts/ClientLogin HTTP/1.1
+> Soup-Debug-Timestamp: 1375253708
+> Soup-Debug: SoupSession 1 (0x66f500), SoupMessage 1 (0x7fffe00262a0), SoupSocket 1 (0x7fffe0028190)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> accountType=HOSTED%5FOR%5FGOOGLE&Email=libgdata%2Etest%40gmail%2Ecom&Passwd=gdata%2Dgdata&service=cp&source=ytapi%2DGNOME%2Dlibgdata%2D444fubtt%2D0
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375253708
+< Soup-Debug: SoupMessage 1 (0x7fffe00262a0)
+< Content-Type: text/plain
+< Cache-control: no-cache, no-store
+< Pragma: no-cache
+< Expires: Mon, 01-Jan-1990 00:00:00 GMT
+< Date: Wed, 31 Jul 2013 06:55:08 GMT
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 947
+< Server: GSE
+<
+< SID=DQAAANMAAAAunusdFJGM1KPwpqzc212kxe0mrSl2NxjpDEq5kCraje_aRE5F-vTgUxDFd2J3_7_snxzNa0pX8sGs-NTcnI2d-2q9fGyosn-1M6rPh3qQA8qy42qG0C2HnOOtogVSG4vWM1nI9upHtxzcGSw4npSifFmn1Rxnhv08ZIMjHNJpIfhaCM4fkeSvEsyxn4lFRdXO4xTrtrjhGlTVTG-Dyqw7vq_i-ngOJqNjcxB8Oxx_CwwgVo16TYC88VIyZp5jS_2btuWvoHYmO-fYxCdJVktq_uXbbxPshT32bfNcRxxroQ
+< LSID=DQAAANUAAADlUiDDxmgwYEQV4ONy1MTegorp3YgAKT-J--NcNIwz1nJvdKlhFWau_6plMST0IUMr9GoPEokwCv7v3YZnLtK1P7wvqIgdQkP6I22lFNIrINcizDYxO_03NJ0QBVsQ4bFCl_zSdILGLIEtUqeos12Z5RCIbgrYoYG_C4I2OoNH33QfeK4v9eFDgmycbDNIXvIkCVkVkN-UpYw6lgp4M-Mwz6UZ6JM5Ow0mzOXe_X-3ObjimaF0dZhTq4f8eqAvYUIZ9MKtRzfGpMRSnTqR5gC7u0F5aLNY78hcwi2-Jf2gqA
+< Auth=DQAAANUAAADlUiDDxmgwYEQV4ONy1MTegorp3YgAKT-J--NcNIwz1nJvdKlhFWau_6plMST0IUMunH-1EPsydhwp7D-n9RF5dIaQg8ezkxVCT2oit_CR7ZIWdyB7LF0F_Nn5fy8S7NWHepGq0pYhHNbCqMUBbr9KWZ6FH_MKT6TmqkrOeWXTuRujoiuv3_F22AIPwJ6coTIyDn5A2FW_YtxU2ZW9mTEbpdFkfwY5MWFoME3wBpxti1C3vVClkEhSr6ZBw5d1Ygiol1jCfzV3BcFtPeHQe6y-A6OAhtDUKb2eeOirjRPr0Q
+
--- /dev/null
+> POST /m8/feeds/contacts/default/full/batch HTTP/1.1
+> Soup-Debug-Timestamp: 1415490455
+> Soup-Debug: SoupSession 1 (0x1c05240), SoupMessage 1 (0x1ce91c0), SoupSocket 1 (0x1e32c40)
+> Host: www.google.com
+> Authorization: Bearer ya29.uAB1RRhn3TKLPSfFZeRgrzf68-Gb9tby5F20urDCBwC6B94UqINs1Hvh_iKX3FagPwd0QkLnrSyVRw
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' xmlns:app='http://www.w3.org/2007/app'><title type='text'>Batch operation feed</title><id>batch1</id><updated>2014-11-08T23:47:35Z</updated><entry><title type='text'>Fooish Bar</title><category term='http://schemas.google.com/contact/2008#contact' scheme='http://schemas.google.com/g/2005#kind'/><batch:id>1</batch:id><batch:operation type='insert'/><gd:name><gd:fullName>Fooish Bar</gd:fullName></gd:name></entry></feed>
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415490455
+< Soup-Debug: SoupMessage 1 (0x1ce91c0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Sat, 08 Nov 2014 23:47:35 GMT
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml; charset=UTF-8
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Content-Encoding: gzip
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version="1.0" encoding="UTF-8"?>
+< <feed xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005">
+< <id>https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/batch/1415490455683000</id>
+< <updated>2014-11-08T23:47:35.683Z</updated>
+< <title type="text">Batch operation feed</title>
+< <entry gd:etag=""RHs-fzVSLit7I2A9XRdWFEQKQwE."">
+< <batch:id>1</batch:id>
+< <batch:operation type="insert"/>
+< <batch:status code="201" reason="Created."/>
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/124aa0c708271161</id>
+< <updated>2014-11-08T23:47:35.557Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:47:35.557Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>Fooish Bar</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/124aa0c708271161"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/124aa0c708271161"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/124aa0c708271161"/>
+< <gd:name>
+< <gd:fullName>Fooish Bar</gd:fullName>
+< <gd:givenName>Fooish</gd:givenName>
+< <gd:familyName>Bar</gd:familyName>
+< </gd:name>
+< </entry>
+< </feed>
+
+> POST /m8/feeds/contacts/default/full/batch HTTP/1.1
+> Soup-Debug-Timestamp: 1415490455
+> Soup-Debug: SoupSession 1 (0x1c05240), SoupMessage 2 (0x1ce92b0), SoupSocket 2 (0x1e32b70)
+> Host: www.google.com
+> Authorization: Bearer ya29.uAB1RRhn3TKLPSfFZeRgrzf68-Gb9tby5F20urDCBwC6B94UqINs1Hvh_iKX3FagPwd0QkLnrSyVRw
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' xmlns:app='http://www.w3.org/2007/app'><title type='text'>Batch operation feed</title><id>batch1</id><updated>2014-11-08T23:47:35Z</updated><entry><title type='text'>Batch operation query</title><id>https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/124aa0c708271161</id><updated>2014-11-08T23:47:35Z</updated><batch:id>2</batch:id><batch:operation type='query'/></entry><entry><title type='text'>Brian</title><category term='http://schemas.google.com/contact/2008#contact' scheme='http://schemas.google.com/g/2005#kind'/><batch:id>1</batch:id><batch:operation type='insert'/><gd:name><gd:fullName>Brian</gd:fullName></gd:name></entry></feed>
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415490456
+< Soup-Debug: SoupMessage 2 (0x1ce92b0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Sat, 08 Nov 2014 23:47:36 GMT
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml; charset=UTF-8
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Content-Encoding: gzip
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version="1.0" encoding="UTF-8"?>
+< <feed xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005">
+< <id>https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/batch/1415490456062000</id>
+< <updated>2014-11-08T23:47:36.062Z</updated>
+< <title type="text">Batch operation feed</title>
+< <entry gd:etag=""RHs-fzVSLit7I2A9XRdWFEQKQwE."">
+< <batch:id>2</batch:id>
+< <batch:operation type="query"/>
+< <batch:status code="200" reason="Success"/>
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/124aa0c708271161</id>
+< <updated>2014-11-08T23:47:35.557Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:47:35.557Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>Fooish Bar</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/124aa0c708271161"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/124aa0c708271161"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/124aa0c708271161"/>
+< <gd:name>
+< <gd:fullName>Fooish Bar</gd:fullName>
+< <gd:givenName>Fooish</gd:givenName>
+< <gd:familyName>Bar</gd:familyName>
+< </gd:name>
+< </entry>
+< <entry gd:etag=""RHc4cDVSLyt7I2A9XRdWFEQKQwE."">
+< <batch:id>1</batch:id>
+< <batch:operation type="insert"/>
+< <batch:status code="201" reason="Created."/>
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/703f874088829e7d</id>
+< <updated>2014-11-08T23:47:35.938Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:47:35.938Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>Brian</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/703f874088829e7d"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/703f874088829e7d"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/703f874088829e7d"/>
+< <gd:name>
+< <gd:fullName>Brian</gd:fullName>
+< <gd:givenName>Brian</gd:givenName>
+< </gd:name>
+< </entry>
+< </feed>
+
+> POST /m8/feeds/contacts/default/full/batch HTTP/1.1
+> Soup-Debug-Timestamp: 1415490456
+> Soup-Debug: SoupSession 1 (0x1c05240), SoupMessage 3 (0x1ce93a0), SoupSocket 3 (0x1e32d10)
+> Host: www.google.com
+> Authorization: Bearer ya29.uAB1RRhn3TKLPSfFZeRgrzf68-Gb9tby5F20urDCBwC6B94UqINs1Hvh_iKX3FagPwd0QkLnrSyVRw
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' xmlns:app='http://www.w3.org/2007/app'><title type='text'>Batch operation feed</title><id>batch1</id><updated>2014-11-08T23:47:36Z</updated><entry xmlns:gContact='http://schemas.google.com/contact/2008' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"RHc4cDVSLyt7I2A9XRdWFEQKQwE."'><title type='text'>Toby</title><id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/703f874088829e7d</id><updated>2014-11-08T23:47:35Z</updated><category term='http://schemas.google.com/contact/2008#contact' scheme='http://schemas.google.com/g/2005#kind'/><link href='https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/703f874088829e7d' rel='http://schemas.google.com/contacts/2008/rel#photo' type='image/*'/><link href='https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/703f874088829e7d' rel='http://www.iana.org/assignments/relation/self' type='application/atom+xml'/><link href='https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/703f874088829e7d' rel='http://www.iana.org/assignments/relation/edit' type='application/atom+xml'/><batch:id>3</batch:id><batch:operation type='update'/><gd:name xmlns:gContact='http://schemas.google.com/contact/2008' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005'><gd:givenName>Brian</gd:givenName><gd:fullName>Toby</gd:fullName>
+>
+>
+> </gd:name>
+>
+>
+>
+>
+>
+>
+>
+>
+>
+>
+>
+>
+> </entry><entry><title type='text'></title><id>foobar</id><category term='http://schemas.google.com/contact/2008#contact' scheme='http://schemas.google.com/g/2005#kind'/><batch:id>2</batch:id><batch:operation type='delete'/><gd:name/></entry><entry xmlns:gContact='http://schemas.google.com/contact/2008' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"RHs-fzVSLit7I2A9XRdWFEQKQwE."'><title type='text'>Fooish Bar</title><id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/124aa0c708271161</id><updated>2014-11-08T23:47:35Z</updated><category term='http://schemas.google.com/contact/2008#contact' scheme='http://schemas.google.com/g/2005#kind'/><link href='https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/124aa0c708271161' rel='http://schemas.google.com/contacts/2008/rel#photo' type='image/*'/><link href='https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/124aa0c708271161' rel='http://www.iana.org/assignments/relation/self' type='application/atom+xml'/><link href='https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/124aa0c708271161' rel='http://www.iana.org/assignments/relation/edit' type='application/atom+xml'/><batch:id>1</batch:id><batch:operation type='delete'/><gd:name xmlns:gContact='http://schemas.google.com/contact/2008' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005'><gd:givenName>Fooish</gd:givenName><gd:familyName>Bar</gd:familyName><gd:fullName>Fooish Bar</gd:fullName>
+>
+>
+>
+> </gd:name>
+>
+>
+>
+>
+>
+>
+>
+>
+>
+>
+>
+>
+> </entry></feed>
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415490456
+< Soup-Debug: SoupMessage 3 (0x1ce93a0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Sat, 08 Nov 2014 23:47:36 GMT
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml; charset=UTF-8
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Content-Encoding: gzip
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version="1.0" encoding="UTF-8"?>
+< <feed xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005">
+< <id>https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/batch/1415490456389000</id>
+< <updated>2014-11-08T23:47:36.389Z</updated>
+< <title type="text">Batch operation feed</title>
+< <entry gd:etag=""R3w9fDVSLit7I2A9XRdWFEQKQwE."">
+< <batch:id>3</batch:id>
+< <batch:operation type="update"/>
+< <batch:status code="200" reason="Success"/>
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/703f874088829e7d</id>
+< <updated>2014-11-08T23:47:36.264Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:47:36.264Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>Toby</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/703f874088829e7d"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/703f874088829e7d"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/703f874088829e7d"/>
+< <gd:name>
+< <gd:fullName>Toby</gd:fullName>
+< <gd:givenName>Brian</gd:givenName>
+< </gd:name>
+< </entry>
+< <entry>
+< <batch:id>2</batch:id>
+< <batch:operation type="delete"/>
+< <batch:status code="400" reason="Invalid entry Id/Uri"/>
+< <id>foobar</id>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< </entry>
+< <entry gd:etag=""RHs-fzVSLit7I2A9XRdWFEQKQwE."">
+< <batch:id>1</batch:id>
+< <batch:operation type="delete"/>
+< <batch:status code="200" reason="Success"/>
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/124aa0c708271161</id>
+< <updated>2014-11-08T23:47:35Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:47:35Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>Fooish Bar</title>
+< <gd:name>
+< <gd:fullName>Fooish Bar</gd:fullName>
+< <gd:givenName>Fooish</gd:givenName>
+< <gd:familyName>Bar</gd:familyName>
+< </gd:name>
+< </entry>
+< </feed>
+
--- /dev/null
+> POST /m8/feeds/contacts/default/full/batch HTTP/1.1
+> Soup-Debug-Timestamp: 1415490479
+> Soup-Debug: SoupSession 1 (0x1c05240), SoupMessage 11 (0x1ce9760), SoupSocket 6 (0x1e329d0)
+> Host: www.google.com
+> Authorization: Bearer ya29.uAB1RRhn3TKLPSfFZeRgrzf68-Gb9tby5F20urDCBwC6B94UqINs1Hvh_iKX3FagPwd0QkLnrSyVRw
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>Batch operation feed</title><id>batch1</id><updated>2014-11-08T23:47:59Z</updated><entry><title type='text'>Batch operation query</title><id>https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/37dab6bd880c2b8e</id><updated>2014-11-08T23:47:59Z</updated><batch:id>1</batch:id><batch:operation type='query'/></entry></feed>
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415490479
+< Soup-Debug: SoupMessage 11 (0x1ce9760)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Sat, 08 Nov 2014 23:47:59 GMT
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml; charset=UTF-8
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Content-Encoding: gzip
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version="1.0" encoding="UTF-8"?>
+< <feed xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005">
+< <id>https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/batch/1415490479322000</id>
+< <updated>2014-11-08T23:47:59.322Z</updated>
+< <title type="text">Batch operation feed</title>
+< <entry gd:etag=""SXY_cDVSLit7I2A9XRdWFEQKQwM."">
+< <batch:id>1</batch:id>
+< <batch:operation type="query"/>
+< <batch:status code="200" reason="Success"/>
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/37dab6bd880c2b8e</id>
+< <updated>2014-11-08T23:47:58.848Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:47:58.848Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>Fooish Bar</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/37dab6bd880c2b8e"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/37dab6bd880c2b8e"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/37dab6bd880c2b8e"/>
+< <gd:name>
+< <gd:fullName>Fooish Bar</gd:fullName>
+< <gd:givenName>Fooish</gd:givenName>
+< <gd:familyName>Bar</gd:familyName>
+< </gd:name>
+< </entry>
+< </feed>
+
--- /dev/null
+> POST /m8/feeds/contacts/default/full HTTP/1.1
+> Soup-Debug-Timestamp: 1415489531
+> Soup-Debug: SoupSession 1 (0x15cd240), SoupMessage 4 (0x182f550), SoupSocket 4 (0x18d5c10)
+> Host: www.google.com
+> Authorization: Bearer ya29.uACgkznYPDckPkHNMU2MF2gRNGrNKqsjnalf5jZmQ0jV9jcp297YMiQop53msSbUJi5poX8LolhsSw
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' xmlns:gd='http://schemas.google.com/g/2005' xmlns:app='http://www.w3.org/2007/app'><title type='text'>John Smith</title><content type='text'>Notes</content><category term='http://schemas.google.com/contact/2008#contact' scheme='http://schemas.google.com/g/2005#kind'/><gd:name><gd:givenName>John</gd:givenName><gd:familyName>Smith</gd:familyName><gd:fullName>John Smith</gd:fullName></gd:name><gd:email address='liz@gmail.com' rel='http://schemas.google.com/g/2005#work' primary='false'/><gd:email address='liz@example.org' rel='http://schemas.google.com/g/2005#home' primary='false'/><gd:im address='liz@gmail.com' protocol='http://schemas.google.com/g/2005#GOOGLE_TALK' rel='http://schemas.google.com/g/2005#home' primary='false'/><gd:phoneNumber rel='http://schemas.google.com/g/2005#work' primary='true'>(206)555-1212</gd:phoneNumber><gd:phoneNumber rel='http://schemas.google.com/g/2005#home' primary='false'>(206)555-1213</gd:phoneNumber><gd:structuredPostalAddress rel='http://schemas.google.com/g/2005#work' primary='true'><gd:street>1600 Amphitheatre Pkwy Mountain View</gd:street></gd:structuredPostalAddress><gd:organization rel='http://schemas.google.com/g/2005#work' primary='false'><gd:orgName>OrgCorp</gd:orgName><gd:orgTitle>President</gd:orgTitle></gd:organization><gContact:jot rel='other'>This is a jot.</gContact:jot><gContact:relation rel='friend'>Brian Haddock</gContact:relation><gContact:website href='http://example.com/' rel='profile' primary='true'/><gContact:event rel='anniversary'><gd:when startTime='1900-01-01'/></gContact:event><gContact:calendarLink href='http://calendar.example.com/' rel='home' primary='true'/><gContact:externalId value='Number Six' rel='organization'/><gContact:language code='en-GB'/><gd:extendedProperty name='CALURI'>http://example.com/</gd:extendedProperty><gContact:userDefinedField key='Favourite colour' value='Blue'/><gContact:userDefinedField key='My notes' value=''/><gContact:userDefinedField key='Owes me' value='£10'/><gContact:userDefinedField key='' value='Foo'/><gContact:hobby>Rowing</gContact:hobby><gContact:nickname>Big J</gContact:nickname><gContact:fileAs>J, Big</gContact:fileAs><gContact:birthday when='--01-01'/><gContact:billingInformation>Big J Enterprises, Ltd.</gContact:billingInformation><gContact:directoryServer>This is a server</gContact:directoryServer><gContact:gender value='male'/><gContact:initials>A. B. C.</gContact:initials><gContact:maidenName>Smith</gContact:maidenName><gContact:mileage>12km</gContact:mileage><gContact:occupation>Professional bum</gContact:occupation><gContact:priority rel='high'/><gContact:sensitivity rel='personal'/><gContact:shortName>Jon</gContact:shortName><gContact:subject>Charity work</gContact:subject></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1415489531
+< Soup-Debug: SoupMessage 4 (0x182f550)
+< ETag: "QHo8cDVSLit7I2A9XRdWFEUDQgc."
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml; charset=UTF-8
+< Date: Sat, 08 Nov 2014 23:32:11 GMT
+< Expires: Sat, 08 Nov 2014 23:32:11 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Content-Encoding: gzip
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version="1.0" encoding="UTF-8"?>
+< <entry gd:etag=""QHo8cDVSLit7I2A9XRdWFEUDQgc."" xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/3d8219568aedc2a9</id>
+< <updated>2014-11-08T23:32:11.478Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:32:11.478Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>John Smith</title>
+< <content>Notes</content>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/3d8219568aedc2a9"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/3d8219568aedc2a9"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/3d8219568aedc2a9"/>
+< <gd:name>
+< <gd:fullName>John Smith</gd:fullName>
+< <gd:givenName>John</gd:givenName>
+< <gd:familyName>Smith</gd:familyName>
+< </gd:name>
+< <gContact:nickname>Big J</gContact:nickname>
+< <gContact:initials>A. B. C.</gContact:initials>
+< <gContact:shortName>Jon</gContact:shortName>
+< <gContact:maidenName>Smith</gContact:maidenName>
+< <gContact:gender value="male"/>
+< <gContact:birthday when="--01-01"/>
+< <gContact:occupation>Professional bum</gContact:occupation>
+< <gContact:billingInformation>Big J Enterprises, Ltd.</gContact:billingInformation>
+< <gContact:mileage>12km</gContact:mileage>
+< <gContact:directoryServer>This is a server</gContact:directoryServer>
+< <gContact:subject>Charity work</gContact:subject>
+< <gContact:fileAs>J, Big</gContact:fileAs>
+< <gd:organization rel="http://schemas.google.com/g/2005#work">
+< <gd:orgName>OrgCorp</gd:orgName>
+< <gd:orgTitle>President</gd:orgTitle>
+< </gd:organization>
+< <gd:email rel="http://schemas.google.com/g/2005#work" address="liz@gmail.com"/>
+< <gd:email rel="http://schemas.google.com/g/2005#home" address="liz@example.org"/>
+< <gd:im address="liz@gmail.com" protocol="http://schemas.google.com/g/2005#GOOGLE_TALK" rel="http://schemas.google.com/g/2005#home"/>
+< <gd:phoneNumber rel="http://schemas.google.com/g/2005#work" primary="true">(206)555-1212</gd:phoneNumber>
+< <gd:phoneNumber rel="http://schemas.google.com/g/2005#home">(206)555-1213</gd:phoneNumber>
+< <gd:structuredPostalAddress rel="http://schemas.google.com/g/2005#work" primary="true">
+< <gd:formattedAddress>1600 Amphitheatre Pkwy Mountain View</gd:formattedAddress>
+< <gd:street>1600 Amphitheatre Pkwy Mountain View</gd:street>
+< </gd:structuredPostalAddress>
+< <gContact:event rel="anniversary">
+< <gd:when startTime="1900-01-01"/>
+< </gContact:event>
+< <gContact:externalId rel="organization" value="Number Six"/>
+< <gContact:relation rel="friend">Brian Haddock</gContact:relation>
+< <gContact:userDefinedField key="Favourite colour" value="Blue"/>
+< <gContact:userDefinedField key="My notes" value=""/>
+< <gContact:userDefinedField key="Owes me" value="£10"/>
+< <gContact:userDefinedField key="" value="Foo"/>
+< <gContact:website href="http://example.com/" primary="true" rel="profile"/>
+< <gContact:calendarLink primary="true" href="http://calendar.example.com/" rel="home"/>
+< <gContact:language code="en-GB"/>
+< <gContact:jot rel="other">This is a jot.</gContact:jot>
+< <gContact:hobby>Rowing</gContact:hobby>
+< <gd:extendedProperty name="CALURI">http://example.com/</gd:extendedProperty>
+< </entry>
+
--- /dev/null
+> PUT /m8/feeds/contacts/libgdata.test%40googlemail.com/full/c8390ec0ef7f98a HTTP/1.1
+> Soup-Debug-Timestamp: 1415489543
+> Soup-Debug: SoupSession 1 (0x15cd240), SoupMessage 7 (0x182f370), SoupSocket 5 (0x18d5ce0)
+> Host: www.google.com
+> Authorization: Bearer ya29.uACgkznYPDckPkHNMU2MF2gRNGrNKqsjnalf5jZmQ0jV9jcp297YMiQop53msSbUJi5poX8LolhsSw
+> GData-Version: 3
+> If-Match: "Q3g7cTVSLit7I2A9XRdWFEUDQgc."
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' xmlns:gd='http://schemas.google.com/g/2005' xmlns:app='http://www.w3.org/2007/app' xmlns:batch='http://schemas.google.com/gdata/batch' gd:etag='"Q3g7cTVSLit7I2A9XRdWFEUDQgc."'><title type='text'>John Wilson</title><id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/c8390ec0ef7f98a</id><updated>2014-11-08T23:32:12Z</updated><category term='http://schemas.google.com/contact/2008#contact' scheme='http://schemas.google.com/g/2005#kind'/><link href='https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/c8390ec0ef7f98a' rel='http://schemas.google.com/contacts/2008/rel#photo' type='image/*'/><link href='https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/c8390ec0ef7f98a' rel='http://www.iana.org/assignments/relation/self' type='application/atom+xml'/><link href='https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/c8390ec0ef7f98a' rel='http://www.iana.org/assignments/relation/edit' type='application/atom+xml'/><gd:name><gd:fullName>John Wilson</gd:fullName></gd:name><gd:extendedProperty name='contact-test'>value</gd:extendedProperty><gContact:nickname>Test Contact Esq.</gContact:nickname>
+>
+>
+>
+>
+>
+>
+>
+>
+>
+> </entry>
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415489543
+< Soup-Debug: SoupMessage 7 (0x182f370)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Sat, 08 Nov 2014 23:32:23 GMT
+< ETag: "Qnw7fjVSLyt7I2A9XRdWFEUDQgA."
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml; charset=UTF-8
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Content-Encoding: gzip
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version="1.0" encoding="UTF-8"?>
+< <entry gd:etag=""Qnw7fjVSLyt7I2A9XRdWFEUDQgA."" xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/c8390ec0ef7f98a</id>
+< <updated>2014-11-08T23:32:23.206Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:32:23.206Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>John Wilson</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/c8390ec0ef7f98a"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/c8390ec0ef7f98a"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/c8390ec0ef7f98a"/>
+< <gd:name>
+< <gd:fullName>John Wilson</gd:fullName>
+< <gd:givenName>John</gd:givenName>
+< <gd:familyName>Wilson</gd:familyName>
+< </gd:name>
+< <gContact:nickname>Test Contact Esq.</gContact:nickname>
+< <gd:extendedProperty name="contact-test">value</gd:extendedProperty>
+< </entry>
+
--- /dev/null
+> POST /o/oauth2/token HTTP/1.1
+> Soup-Debug-Timestamp: 1415490454
+> Soup-Debug: SoupSession 1 (0x1c05110), SoupMessage 1 (0x1ce90d0), SoupSocket 1 (0x1e32900)
+> Host: accounts.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+>
+> client_id=352818697630-nqu2cmt5quqd6lr17ouoqmb684u84l1f.apps.googleusercontent.com&client_secret=-fA4pHQJxR3zJ-FyAMPQsikg&code=4%2FnMGN3dwZKY3b-GGcpyYpncY-GvKwp5cmM0lVqaJz1k0.knZS65dvk9gToiIBeO6P2m-IH6AjkwI&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&grant_type=authorization_code
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415490455
+< Soup-Debug: SoupMessage 1 (0x1ce90d0)
+< Content-Type: application/json; charset=utf-8
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Sat, 08 Nov 2014 23:47:35 GMT
+< Content-Disposition: attachment; filename="json.txt"; filename*=UTF-8''json.txt
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< {
+< "access_token" : "ya29.uAB1RRhn3TKLPSfFZeRgrzf68-Gb9tby5F20urDCBwC6B94UqINs1Hvh_iKX3FagPwd0QkLnrSyVRw",
+< "token_type" : "Bearer",
+< "expires_in" : 3600,
+< "refresh_token" : "1/OxplJowxtPHiKob9htjgcEh6VihajS9Zomx7y9ljWOI"
+< }
+
--- /dev/null
+> POST /m8/feeds/groups/default/full HTTP/1.1
+> Soup-Debug-Timestamp: 1415490492
+> Soup-Debug: SoupSession 1 (0x1c05240), SoupMessage 22 (0x1ce93a0), SoupSocket 11 (0x7f4510044f70)
+> Host: www.google.com
+> Authorization: Bearer ya29.uAB1RRhn3TKLPSfFZeRgrzf68-Gb9tby5F20urDCBwC6B94UqINs1Hvh_iKX3FagPwd0QkLnrSyVRw
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' xmlns:gd='http://schemas.google.com/g/2005' xmlns:app='http://www.w3.org/2007/app'><title type='text'>New Group!</title><content type='text'>New Group!</content><category term='http://schemas.google.com/contact/2008#group' scheme='http://schemas.google.com/g/2005#kind'/><gd:extendedProperty name='foobar'>barfoo</gd:extendedProperty></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1415490493
+< Soup-Debug: SoupMessage 22 (0x1ce93a0)
+< ETag: "Q3c-cTVSLSt7I2A9XRdWFEQKQw0."
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml; charset=UTF-8
+< Date: Sat, 08 Nov 2014 23:48:13 GMT
+< Expires: Sat, 08 Nov 2014 23:48:13 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Content-Encoding: gzip
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version="1.0" encoding="UTF-8"?>
+< <entry gd:etag=""Q3c-cTVSLSt7I2A9XRdWFEQKQw0."" xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6beff9268d4dbc1f</id>
+< <updated>2014-11-08T23:48:12.959Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:48:12.959Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>New Group!</title>
+< <content>New Group!</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/6beff9268d4dbc1f"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/6beff9268d4dbc1f"/>
+< <gd:extendedProperty name="foobar">barfoo</gd:extendedProperty>
+< </entry>
+
--- /dev/null
+> POST /m8/feeds/groups/default/full HTTP/1.1
+> Soup-Debug-Timestamp: 1415490541
+> Soup-Debug: SoupSession 1 (0x1c05240), SoupMessage 47 (0x7f451000f680), SoupSocket 22 (0x1e32de0)
+> Host: www.google.com
+> Authorization: Bearer ya29.uAB1RRhn3TKLPSfFZeRgrzf68-Gb9tby5F20urDCBwC6B94UqINs1Hvh_iKX3FagPwd0QkLnrSyVRw
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' xmlns:gd='http://schemas.google.com/g/2005' xmlns:app='http://www.w3.org/2007/app'><title type='text'>New Group!</title><content type='text'>New Group!</content><category term='http://schemas.google.com/contact/2008#group' scheme='http://schemas.google.com/g/2005#kind'/><gd:extendedProperty name='foobar'>barfoo</gd:extendedProperty></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1415490542
+< Soup-Debug: SoupMessage 47 (0x7f451000f680)
+< ETag: "Q34_eTVSLyt7I2A9XRdWFEQKQgA."
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml; charset=UTF-8
+< Date: Sat, 08 Nov 2014 23:49:02 GMT
+< Expires: Sat, 08 Nov 2014 23:49:02 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Content-Encoding: gzip
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version="1.0" encoding="UTF-8"?>
+< <entry gd:etag=""Q34_eTVSLyt7I2A9XRdWFEQKQgA."" xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6beff9268d4dbc1f</id>
+< <updated>2014-11-08T23:49:02.041Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:49:02.041Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>New Group!</title>
+< <content>New Group!</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/6beff9268d4dbc1f"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/6beff9268d4dbc1f"/>
+< <gd:extendedProperty name="foobar">barfoo</gd:extendedProperty>
+< </entry>
+
--- /dev/null
+> POST /m8/feeds/groups/default/full HTTP/1.1
+> Soup-Debug-Timestamp: 1415490553
+> Soup-Debug: SoupSession 1 (0x1c05240), SoupMessage 50 (0x7f451000f2c0), SoupSocket 24 (0x7f4510044dd0)
+> Host: www.google.com
+> Authorization: Bearer ya29.uAB1RRhn3TKLPSfFZeRgrzf68-Gb9tby5F20urDCBwC6B94UqINs1Hvh_iKX3FagPwd0QkLnrSyVRw
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' xmlns:gd='http://schemas.google.com/g/2005' xmlns:app='http://www.w3.org/2007/app'><title type='text'>New Group!</title><content type='text'>New Group!</content><category term='http://schemas.google.com/contact/2008#group' scheme='http://schemas.google.com/g/2005#kind'/><gd:extendedProperty name='foobar'>barfoo</gd:extendedProperty></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1415490553
+< Soup-Debug: SoupMessage 50 (0x7f451000f2c0)
+< ETag: "Qnw6fzVSLit7I2A9XRdWFEQKQgE."
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml; charset=UTF-8
+< Date: Sat, 08 Nov 2014 23:49:13 GMT
+< Expires: Sat, 08 Nov 2014 23:49:13 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Content-Encoding: gzip
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version="1.0" encoding="UTF-8"?>
+< <entry gd:etag=""Qnw6fzVSLit7I2A9XRdWFEQKQgE."" xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6beff9268d4dbc1f</id>
+< <updated>2014-11-08T23:49:13.217Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:49:13.217Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>New Group!</title>
+< <content>New Group!</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/6beff9268d4dbc1f"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/6beff9268d4dbc1f"/>
+< <gd:extendedProperty name="foobar">barfoo</gd:extendedProperty>
+< </entry>
+
--- /dev/null
+> PUT /m8/feeds/photos/media/libgdata.test%40googlemail.com/c8390ec0ef7f98a HTTP/1.1
+> Soup-Debug-Timestamp: 1415489586
+> Soup-Debug: SoupSession 1 (0x15cd240), SoupMessage 41 (0x182f190), SoupSocket 19 (0x7ff438057b20)
+> Host: www.google.com
+> Authorization: Bearer ya29.uACgkznYPDckPkHNMU2MF2gRNGrNKqsjnalf5jZmQ0jV9jcp297YMiQop53msSbUJi5poX8LolhsSw
+> GData-Version: 3
+> If-Match: *
+> Content-Type: image/jpeg
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+>
+> ÿØÿà
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415489588
+< Soup-Debug: SoupMessage 41 (0x182f190)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< GData-Version: 3.1
+< ETag: "RmtJPnAWSit7I2A9KxQuEiQCNkcWGnsvRA8."
+< Content-Encoding: gzip
+< Date: Sat, 08 Nov 2014 23:33:08 GMT
+< Expires: Sat, 08 Nov 2014 23:33:08 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"RmtJPnAWSit7I2A9KxQuEiQCNkcWGnsvRA8."'><id>http://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/c8390ec0ef7f98a</id><updated>2014-11-08T23:32:56.426Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2014-11-08T23:32:56.426Z</app:edited><link rel='self' type='application/atom+xml' href='https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/c8390ec0ef7f98a'/><link rel='edit' type='application/atom+xml' href='https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/c8390ec0ef7f98a'/></entry>
+
--- /dev/null
+> DELETE /m8/feeds/photos/media/libgdata.test%40googlemail.com/c8390ec0ef7f98a HTTP/1.1
+> Soup-Debug-Timestamp: 1415489633
+> Soup-Debug: SoupSession 1 (0x15cd240), SoupMessage 53 (0x182f190), SoupSocket 21 (0x7ff438057b20)
+> Host: www.google.com
+> Authorization: Bearer ya29.uACgkznYPDckPkHNMU2MF2gRNGrNKqsjnalf5jZmQ0jV9jcp297YMiQop53msSbUJi5poX8LolhsSw
+> GData-Version: 3
+> If-Match: "Lmt6BwoIbCt7I2BnCFc6EEx-JkY0N3wCaQ0."
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415489634
+< Soup-Debug: SoupMessage 53 (0x182f190)
+< GData-Version: 3.1
+< Date: Sat, 08 Nov 2014 23:33:54 GMT
+< Expires: Sat, 08 Nov 2014 23:33:54 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+< Alternate-Protocol: 443:quic,p=0.01
+<
+
--- /dev/null
+> GET /m8/feeds/photos/media/libgdata.test%40googlemail.com/c8390ec0ef7f98a HTTP/1.1
+> Soup-Debug-Timestamp: 1415489610
+> Soup-Debug: SoupSession 1 (0x15cd240), SoupMessage 47 (0x182f460), SoupSocket 20 (0x7ff438057d90)
+> Host: www.google.com
+> Authorization: Bearer ya29.uACgkznYPDckPkHNMU2MF2gRNGrNKqsjnalf5jZmQ0jV9jcp297YMiQop53msSbUJi5poX8LolhsSw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415489611
+< Soup-Debug: SoupMessage 47 (0x182f460)
+< Content-Type: image/jpeg
+< Expires: Sat, 08 Nov 2014 23:33:31 GMT
+< Date: Sat, 08 Nov 2014 23:33:31 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.1
+< ETag: "cwwgO1YRWit7I2A_BlwEZzt2IEISCkwmVBc."
+< Transfer-Encoding: chunked
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=0.01
+<
+< ÿØÿà
+
--- /dev/null
+> PUT /m8/feeds/photos/media/libgdata.test%40googlemail.com/c8390ec0ef7f98a HTTP/1.1
+> Soup-Debug-Timestamp: 1415489645
+> Soup-Debug: SoupSession 1 (0x15cd240), SoupMessage 57 (0x7ff43800ee40), SoupSocket 22 (0x7ff4380578b0)
+> Host: www.google.com
+> Authorization: Bearer ya29.uACgkznYPDckPkHNMU2MF2gRNGrNKqsjnalf5jZmQ0jV9jcp297YMiQop53msSbUJi5poX8LolhsSw
+> GData-Version: 3
+> If-Match: *
+> Content-Type: image/jpeg
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+>
+> ÿØÿà
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415489647
+< Soup-Debug: SoupMessage 57 (0x7ff43800ee40)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< GData-Version: 3.1
+< ETag: "RmtJPnAWSit7I2A9KxQuEiQCNkcWGnsvRA8."
+< Content-Encoding: gzip
+< Date: Sat, 08 Nov 2014 23:34:07 GMT
+< Expires: Sat, 08 Nov 2014 23:34:07 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"RmtJPnAWSit7I2A9KxQuEiQCNkcWGnsvRA8."'><id>http://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/c8390ec0ef7f98a</id><updated>2014-11-08T23:33:54.832Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2014-11-08T23:33:54.832Z</app:edited><link rel='self' type='application/atom+xml' href='https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/c8390ec0ef7f98a'/><link rel='edit' type='application/atom+xml' href='https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/c8390ec0ef7f98a'/></entry>
+
--- /dev/null
+> PUT /m8/feeds/photos/media/libgdata.test%40googlemail.com/c8390ec0ef7f98a HTTP/1.1
+> Soup-Debug-Timestamp: 1415489669
+> Soup-Debug: SoupSession 1 (0x15cd240), SoupMessage 65 (0x7ff42c0028a0), SoupSocket 27 (0x7ff438057d90)
+> Host: www.google.com
+> Authorization: Bearer ya29.uACgkznYPDckPkHNMU2MF2gRNGrNKqsjnalf5jZmQ0jV9jcp297YMiQop53msSbUJi5poX8LolhsSw
+> GData-Version: 3
+> If-Match: "Ry5LPl0dbCt7I2BfDnAkaEVyJFwcf00mcS0."
+> Content-Type: image/jpeg
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+>
+> ÿØÿà
+
+< HTTP/1.1 412 Precondition Failed
+< Soup-Debug-Timestamp: 1415489670
+< Soup-Debug: SoupMessage 65 (0x7ff42c0028a0)
+< Content-Type: text/html; charset=UTF-8
+< Content-Encoding: gzip
+< Date: Sat, 08 Nov 2014 23:34:30 GMT
+< Expires: Sat, 08 Nov 2014 23:34:30 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< Mismatch: etags = ["Ry5LPl0dbCt7I2BfDnAkaEVyJFwcf00mcS0."], version = [14VDGutoxXF-8UQT3fVFTQ]
+
--- /dev/null
+> DELETE /m8/feeds/photos/media/libgdata.test%40googlemail.com/c8390ec0ef7f98a HTTP/1.1
+> Soup-Debug-Timestamp: 1415490478
+> Soup-Debug: SoupSession 1 (0x1c05240), SoupMessage 7 (0x1ce9670), SoupSocket 4 (0x1e32b70)
+> Host: www.google.com
+> Authorization: Bearer ya29.uAB1RRhn3TKLPSfFZeRgrzf68-Gb9tby5F20urDCBwC6B94UqINs1Hvh_iKX3FagPwd0QkLnrSyVRw
+> GData-Version: 3
+> If-Match: "SQpAMGkCSit7I2BKMH8LVi5COFsJDFglViY."
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415490478
+< Soup-Debug: SoupMessage 7 (0x1ce9670)
+< GData-Version: 3.1
+< Date: Sat, 08 Nov 2014 23:47:58 GMT
+< Expires: Sat, 08 Nov 2014 23:47:58 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+< Alternate-Protocol: 443:quic,p=0.01
+<
+
--- /dev/null
+> DELETE /m8/feeds/photos/media/libgdata.test%40googlemail.com/465577d88b0afee8 HTTP/1.1
+> Soup-Debug-Timestamp: 1375362290
+> Soup-Debug: SoupSession 1 (0x66f2e0), SoupMessage 52 (0x7d2e50), SoupSocket 15 (0x70d480)
+> Host: www.google.com
+> Authorization: GoogleLogin auth=DQAAANUAAAABD9I2qzuaphzCwqlPN1nD-UVlDvXxpCfZZs2DpQs8CyuKugZr-827LLW6Se0g49UTlhYYurHxHCMNk3l9iJjeGlq6ZYd51VYAKkGzvyTnwj1fvWfFIkrj53HVYeTy0ER0oRBCi1BISjJtxb_EeYStuDF4mfHC9FSeHXqNUW_Qf3gtQl1WytVURmYC_H89IVrQB8UOZEzZXgjh3jNv1w9cQv8j3_dszdG0F6dLOehzkyPgckEHapxSOoFFvUzbawNaGQcNgFx1RVALkHKkBga-7PnPzzUEMfj7snBhGt53LQ
+> GData-Version: 3
+> If-Match: "VDd2MAY7Sit7I2BuKnEXWjN4L2wpH1IffSY."
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+> Soup-Debug-Timestamp: 1375362290
+> Soup-Debug: SoupSession 1 (0x66f2e0), SoupMessage 52 (0x7d2e50), SoupSocket 16 (0x70d480), restarted
+> Host: www.google.com
+> Authorization: GoogleLogin auth=DQAAANUAAAABD9I2qzuaphzCwqlPN1nD-UVlDvXxpCfZZs2DpQs8CyuKugZr-827LLW6Se0g49UTlhYYurHxHCMNk3l9iJjeGlq6ZYd51VYAKkGzvyTnwj1fvWfFIkrj53HVYeTy0ER0oRBCi1BISjJtxb_EeYStuDF4mfHC9FSeHXqNUW_Qf3gtQl1WytVURmYC_H89IVrQB8UOZEzZXgjh3jNv1w9cQv8j3_dszdG0F6dLOehzkyPgckEHapxSOoFFvUzbawNaGQcNgFx1RVALkHKkBga-7PnPzzUEMfj7snBhGt53LQ
+> GData-Version: 3
+> If-Match: "VDd2MAY7Sit7I2BuKnEXWjN4L2wpH1IffSY."
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375362290
+< Soup-Debug: SoupMessage 52 (0x7d2e50)
+< GData-Version: 3.1
+< Date: Thu, 01 Aug 2013 13:04:50 GMT
+< Expires: Thu, 01 Aug 2013 13:04:50 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /m8/feeds/photos/media/libgdata.test%40googlemail.com/c8390ec0ef7f98a HTTP/1.1
+> Soup-Debug-Timestamp: 1415489693
+> Soup-Debug: SoupSession 1 (0x15cd240), SoupMessage 71 (0x182f640), SoupSocket 28 (0x7ff42c01e9a0)
+> Host: www.google.com
+> Authorization: Bearer ya29.uACgkznYPDckPkHNMU2MF2gRNGrNKqsjnalf5jZmQ0jV9jcp297YMiQop53msSbUJi5poX8LolhsSw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415489693
+< Soup-Debug: SoupMessage 71 (0x182f640)
+< Content-Type: image/jpeg
+< Expires: Sat, 08 Nov 2014 23:34:53 GMT
+< Date: Sat, 08 Nov 2014 23:34:53 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.1
+< ETag: "dwpQD1cTfCt7I2B7XXUrWRhsEQAQKWElSDA."
+< Transfer-Encoding: chunked
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=0.01
+<
+< ÿØÿà
+
--- /dev/null
+> GET /m8/feeds/photos/media/libgdata.test%40googlemail.com/c8390ec0ef7f98a HTTP/1.1
+> Soup-Debug-Timestamp: 1415489717
+> Soup-Debug: SoupSession 1 (0x15cd240), SoupMessage 79 (0x7ff430010990), SoupSocket 31 (0x7ff42c01e9a0)
+> Host: www.google.com
+> Authorization: Bearer ya29.uACgkznYPDckPkHNMU2MF2gRNGrNKqsjnalf5jZmQ0jV9jcp297YMiQop53msSbUJi5poX8LolhsSw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415489717
+< Soup-Debug: SoupMessage 79 (0x7ff430010990)
+< Content-Type: image/jpeg
+< Expires: Sat, 08 Nov 2014 23:35:17 GMT
+< Date: Sat, 08 Nov 2014 23:35:17 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.1
+< ETag: "XCl1GngxWit7I2B7GVNaSw1DDwQjC2UENjM."
+< Transfer-Encoding: chunked
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=0.01
+<
+< ÿØÿà
+
--- /dev/null
+> GET /m8/feeds/contacts/default/full HTTP/1.1
+> Soup-Debug-Timestamp: 1415489550
+> Soup-Debug: SoupSession 1 (0x15cd240), SoupMessage 13 (0x182f280), SoupSocket 8 (0x18d59a0)
+> Host: www.google.com
+> Authorization: Bearer ya29.uACgkznYPDckPkHNMU2MF2gRNGrNKqsjnalf5jZmQ0jV9jcp297YMiQop53msSbUJi5poX8LolhsSw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415489550
+< Soup-Debug: SoupMessage 13 (0x182f280)
+< Expires: Sat, 08 Nov 2014 23:32:30 GMT
+< Date: Sat, 08 Nov 2014 23:32:30 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "QXk_cDVSLyt7I2A9XRdWFEUDQgE."
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml; charset=UTF-8
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Content-Encoding: gzip
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version="1.0" encoding="UTF-8"?>
+< <feed gd:etag=""QXk_cDVSLyt7I2A9XRdWFEUDQgE."" xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/">
+< <id>libgdata.test@googlemail.com</id>
+< <updated>2014-11-08T23:32:30.748Z</updated>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>GData Test's Contacts</title>
+< <link rel="alternate" type="text/html" href="https://www.google.com/"/>
+< <link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full"/>
+< <link rel="http://schemas.google.com/g/2005#post" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full"/>
+< <link rel="http://schemas.google.com/g/2005#batch" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/batch"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full?max-results=25"/>
+< <author>
+< <name>GData Test</name>
+< <email>libgdata.test@googlemail.com</email>
+< </author>
+< <generator version="1.0" uri="http://www.google.com/m8/feeds">Contacts</generator>
+< <openSearch:totalResults>16</openSearch:totalResults>
+< <openSearch:startIndex>1</openSearch:startIndex>
+< <openSearch:itemsPerPage>25</openSearch:itemsPerPage>
+< <entry gd:etag=""Q3gzejVSLyt7I2A9Wh9XGUwCQAY."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/a86b08c4621c7</id>
+< <updated>2014-03-15T21:25:22.682Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:25:22.682Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>AA</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/a86b08c4621c7"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/a86b08c4621c7"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/a86b08c4621c7"/>
+< <gd:name>
+< <gd:fullName>AA</gd:fullName>
+< <gd:givenName>AA</gd:givenName>
+< </gd:name>
+< <gContact:fileAs>AA</gContact:fileAs>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6"/>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/5a5615828e8c12dc"/>
+< <gd:extendedProperty name="X-MOZILLA-HTML">FALSE</gd:extendedProperty>
+< </entry>
+< <entry gd:etag=""RHc4fzVSLit7I2A9Wh9VF0oPQAU."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/1848d1b50ceff503</id>
+< <updated>2014-04-06T09:15:15.937Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-04-06T09:15:15.937Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>Test Mcfoobar</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/1848d1b50ceff503"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1848d1b50ceff503"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1848d1b50ceff503"/>
+< <gd:name>
+< <gd:fullName>Test Mcfoobar</gd:fullName>
+< <gd:givenName>Test</gd:givenName>
+< <gd:familyName>Mcfoobar</gd:familyName>
+< </gd:name>
+< <gContact:fileAs>Mcfoobar, Test</gContact:fileAs>
+< <gd:email rel="http://schemas.google.com/g/2005#work" address="test1@example.com" primary="true"/>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6"/>
+< <gd:extendedProperty name="X-MOZILLA-HTML">FALSE</gd:extendedProperty>
+< </entry>
+< <entry gd:etag=""R34zezVSLit7I2A9XRdWFEUDRQY."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/186ec44a0fc1ca9d</id>
+< <updated>2014-11-08T23:27:06.083Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:27:06.083Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>John Wilson</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/186ec44a0fc1ca9d"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/186ec44a0fc1ca9d"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/186ec44a0fc1ca9d"/>
+< <gd:name>
+< <gd:fullName>John Wilson</gd:fullName>
+< <gd:givenName>John</gd:givenName>
+< <gd:familyName>Wilson</gd:familyName>
+< </gd:name>
+< <gContact:nickname>Test Contact Esq.</gContact:nickname>
+< <gd:extendedProperty name="contact-test">value</gd:extendedProperty>
+< </entry>
+< <entry gd:etag=""RH05ezVSLit7I2A9XRdWFEUDQgA."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/1a7e535488e850f7</id>
+< <updated>2014-11-08T23:32:25.323Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:32:25.323Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title/>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/1a7e535488e850f7"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1a7e535488e850f7"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1a7e535488e850f7"/>
+< <gContact:nickname>Test Contact 3</gContact:nickname>
+< </entry>
+< <entry gd:etag=""RX0-cDVSLit7I2A9XRdWFEUDRgE."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/1ebe29f48b9167e1</id>
+< <updated>2014-11-08T23:25:54.358Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:25:54.358Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>John Smith</title>
+< <content>Notes</content>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/1ebe29f48b9167e1"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1ebe29f48b9167e1"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1ebe29f48b9167e1"/>
+< <gd:name>
+< <gd:fullName>John Smith</gd:fullName>
+< <gd:givenName>John</gd:givenName>
+< <gd:familyName>Smith</gd:familyName>
+< </gd:name>
+< <gContact:nickname>Big J</gContact:nickname>
+< <gContact:initials>A. B. C.</gContact:initials>
+< <gContact:shortName>Jon</gContact:shortName>
+< <gContact:maidenName>Smith</gContact:maidenName>
+< <gContact:gender value="male"/>
+< <gContact:birthday when="--01-01"/>
+< <gContact:occupation>Professional bum</gContact:occupation>
+< <gContact:billingInformation>Big J Enterprises, Ltd.</gContact:billingInformation>
+< <gContact:mileage>12km</gContact:mileage>
+< <gContact:directoryServer>This is a server</gContact:directoryServer>
+< <gContact:subject>Charity work</gContact:subject>
+< <gContact:fileAs>J, Big</gContact:fileAs>
+< <gd:organization rel="http://schemas.google.com/g/2005#work">
+< <gd:orgName>OrgCorp</gd:orgName>
+< <gd:orgTitle>President</gd:orgTitle>
+< </gd:organization>
+< <gd:email rel="http://schemas.google.com/g/2005#work" address="liz@gmail.com"/>
+< <gd:email rel="http://schemas.google.com/g/2005#home" address="liz@example.org"/>
+< <gd:im address="liz@gmail.com" protocol="http://schemas.google.com/g/2005#GOOGLE_TALK" rel="http://schemas.google.com/g/2005#home"/>
+< <gd:phoneNumber rel="http://schemas.google.com/g/2005#work" primary="true">(206)555-1212</gd:phoneNumber>
+< <gd:phoneNumber rel="http://schemas.google.com/g/2005#home">(206)555-1213</gd:phoneNumber>
+< <gd:structuredPostalAddress rel="http://schemas.google.com/g/2005#work" primary="true">
+< <gd:formattedAddress>1600 Amphitheatre Pkwy Mountain View</gd:formattedAddress>
+< <gd:street>1600 Amphitheatre Pkwy Mountain View</gd:street>
+< </gd:structuredPostalAddress>
+< <gContact:event rel="anniversary">
+< <gd:when startTime="1900-01-01"/>
+< </gContact:event>
+< <gContact:externalId rel="organization" value="Number Six"/>
+< <gContact:relation rel="friend">Brian Haddock</gContact:relation>
+< <gContact:userDefinedField key="Favourite colour" value="Blue"/>
+< <gContact:userDefinedField key="My notes" value=""/>
+< <gContact:userDefinedField key="Owes me" value="£10"/>
+< <gContact:userDefinedField key="" value="Foo"/>
+< <gContact:website href="http://example.com/" primary="true" rel="profile"/>
+< <gContact:calendarLink primary="true" href="http://calendar.example.com/" rel="home"/>
+< <gContact:language code="en-GB"/>
+< <gContact:jot rel="other">This is a jot.</gContact:jot>
+< <gContact:hobby>Rowing</gContact:hobby>
+< <gd:extendedProperty name="CALURI">http://example.com/</gd:extendedProperty>
+< </entry>
+< <entry gd:etag=""QH48fzVSLit7I2A9XRdWFEUDQgc."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/1fe897fa0c51ed2c</id>
+< <updated>2014-11-08T23:32:11.077Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:32:11.077Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>Toby</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/1fe897fa0c51ed2c"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1fe897fa0c51ed2c"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1fe897fa0c51ed2c"/>
+< <gd:name>
+< <gd:fullName>Toby</gd:fullName>
+< <gd:givenName>Brian</gd:givenName>
+< </gd:name>
+< </entry>
+< <entry gd:etag=""Qn0zcDVSLit7I2A9Wh9XGUwCQAA."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/2f943d4789cb93a9</id>
+< <updated>2014-03-15T21:25:43.388Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:25:43.388Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>AAA</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/2f943d4789cb93a9"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/2f943d4789cb93a9"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/2f943d4789cb93a9"/>
+< <gd:name>
+< <gd:fullName>AAA</gd:fullName>
+< <gd:givenName>AAA</gd:givenName>
+< </gd:name>
+< <gContact:fileAs>AAA</gContact:fileAs>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6"/>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/7b25d4e38c3f32b5"/>
+< <gd:extendedProperty name="X-MOZILLA-HTML">FALSE</gd:extendedProperty>
+< </entry>
+< <entry gd:etag=""SX89cTVSLit7I2A9Wh9XGUwCQg0."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/3531fe820d6801f3</id>
+< <updated>2014-03-15T21:23:18.169Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:23:18.169Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>AAAA</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/3531fe820d6801f3"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/3531fe820d6801f3"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/3531fe820d6801f3"/>
+< <gd:name>
+< <gd:fullName>AAAA</gd:fullName>
+< <gd:givenName>AAAA</gd:givenName>
+< </gd:name>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/115d0c4d0cd6f616"/>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6"/>
+< </entry>
+< <entry gd:etag=""RXY5fDVSLit7I2A9XRdWFEUCTgc."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/37c76f0508bed31f</id>
+< <updated>2014-11-08T23:22:14.824Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:22:14.824Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>John Smith</title>
+< <content>Notes</content>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/37c76f0508bed31f"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/37c76f0508bed31f"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/37c76f0508bed31f"/>
+< <gd:name>
+< <gd:fullName>John Smith</gd:fullName>
+< <gd:givenName>John</gd:givenName>
+< <gd:familyName>Smith</gd:familyName>
+< </gd:name>
+< <gContact:nickname>Big J</gContact:nickname>
+< <gContact:initials>A. B. C.</gContact:initials>
+< <gContact:shortName>Jon</gContact:shortName>
+< <gContact:maidenName>Smith</gContact:maidenName>
+< <gContact:gender value="male"/>
+< <gContact:birthday when="--01-01"/>
+< <gContact:occupation>Professional bum</gContact:occupation>
+< <gContact:billingInformation>Big J Enterprises, Ltd.</gContact:billingInformation>
+< <gContact:mileage>12km</gContact:mileage>
+< <gContact:directoryServer>This is a server</gContact:directoryServer>
+< <gContact:subject>Charity work</gContact:subject>
+< <gContact:fileAs>J, Big</gContact:fileAs>
+< <gd:organization rel="http://schemas.google.com/g/2005#work">
+< <gd:orgName>OrgCorp</gd:orgName>
+< <gd:orgTitle>President</gd:orgTitle>
+< </gd:organization>
+< <gd:email rel="http://schemas.google.com/g/2005#work" address="liz@gmail.com"/>
+< <gd:email rel="http://schemas.google.com/g/2005#home" address="liz@example.org"/>
+< <gd:im address="liz@gmail.com" protocol="http://schemas.google.com/g/2005#GOOGLE_TALK" rel="http://schemas.google.com/g/2005#home"/>
+< <gd:phoneNumber rel="http://schemas.google.com/g/2005#work" primary="true">(206)555-1212</gd:phoneNumber>
+< <gd:phoneNumber rel="http://schemas.google.com/g/2005#home">(206)555-1213</gd:phoneNumber>
+< <gd:structuredPostalAddress rel="http://schemas.google.com/g/2005#work" primary="true">
+< <gd:formattedAddress>1600 Amphitheatre Pkwy Mountain View</gd:formattedAddress>
+< <gd:street>1600 Amphitheatre Pkwy Mountain View</gd:street>
+< </gd:structuredPostalAddress>
+< <gContact:event rel="anniversary">
+< <gd:when startTime="1900-01-01"/>
+< </gContact:event>
+< <gContact:externalId rel="organization" value="Number Six"/>
+< <gContact:relation rel="friend">Brian Haddock</gContact:relation>
+< <gContact:userDefinedField key="Favourite colour" value="Blue"/>
+< <gContact:userDefinedField key="My notes" value=""/>
+< <gContact:userDefinedField key="Owes me" value="£10"/>
+< <gContact:userDefinedField key="" value="Foo"/>
+< <gContact:website href="http://example.com/" primary="true" rel="profile"/>
+< <gContact:calendarLink primary="true" href="http://calendar.example.com/" rel="home"/>
+< <gContact:language code="en-GB"/>
+< <gContact:jot rel="other">This is a jot.</gContact:jot>
+< <gContact:hobby>Rowing</gContact:hobby>
+< <gd:extendedProperty name="CALURI">http://example.com/</gd:extendedProperty>
+< </entry>
+< <entry gd:etag=""Rns7eDVSLyt7I2A9Wh9XGUwCQAI."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/3b0b0e8c8d6c81ef</id>
+< <updated>2014-03-15T21:26:07.500Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:26:07.500Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>AAAAA</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/3b0b0e8c8d6c81ef"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/3b0b0e8c8d6c81ef"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/3b0b0e8c8d6c81ef"/>
+< <gd:name>
+< <gd:fullName>AAAAA</gd:fullName>
+< <gd:givenName>AAAAA</gd:givenName>
+< </gd:name>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6"/>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/5aa4ff9a0de39ade"/>
+< </entry>
+< <entry gd:etag=""RXs4ejVSLit7I2A9XRdWFEUDRQU."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/415b6675090874ea</id>
+< <updated>2014-11-08T23:26:54.532Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:26:54.532Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>Toby</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/415b6675090874ea"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/415b6675090874ea"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/415b6675090874ea"/>
+< <gd:name>
+< <gd:fullName>Toby</gd:fullName>
+< <gd:givenName>Brian</gd:givenName>
+< </gd:name>
+< </entry>
+< <entry gd:etag=""Qnc4fjVSLit7I2A9XRdWFEUCTgc."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/505ad8890cd2744a</id>
+< <updated>2014-11-08T23:22:13.936Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:22:13.936Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>Toby</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/505ad8890cd2744a"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/505ad8890cd2744a"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/505ad8890cd2744a"/>
+< <gd:name>
+< <gd:fullName>Toby</gd:fullName>
+< <gd:givenName>Brian</gd:givenName>
+< </gd:name>
+< </entry>
+< <entry gd:etag=""RX88ezVSLit7I2A9XRdWFEUDQgA."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/5210ae648a3eda72</id>
+< <updated>2014-11-08T23:32:24.173Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:32:24.173Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title/>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/5210ae648a3eda72"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/5210ae648a3eda72"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/5210ae648a3eda72"/>
+< <gContact:nickname>Test Contact 1</gContact:nickname>
+< </entry>
+< <entry gd:etag=""RXk_ezVSLit7I2A9XRdWFEUDQgA."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/55877e440b373bc7</id>
+< <updated>2014-11-08T23:32:24.743Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:32:24.743Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title/>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/55877e440b373bc7"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/55877e440b373bc7"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/55877e440b373bc7"/>
+< <gContact:nickname>Test Contact 2</gContact:nickname>
+< </entry>
+< <entry gd:etag=""QnY4fDVSLyt7I2A9XRdWFEUDRgE."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/65834f618a9f8743</id>
+< <updated>2014-11-08T23:25:53.834Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:25:53.834Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>Toby</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/65834f618a9f8743"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/65834f618a9f8743"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/65834f618a9f8743"/>
+< <gd:name>
+< <gd:fullName>Toby</gd:fullName>
+< <gd:givenName>Brian</gd:givenName>
+< </gd:name>
+< </entry>
+< <entry gd:etag=""Rn4-ezVSLit7I2A9Wh9XGUwCQgw."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/6754f9cf8cbc042d</id>
+< <updated>2014-03-15T21:23:07.053Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:23:07.053Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>A</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/6754f9cf8cbc042d"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/6754f9cf8cbc042d"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/6754f9cf8cbc042d"/>
+< <gd:name>
+< <gd:fullName>A</gd:fullName>
+< <gd:givenName>A</gd:givenName>
+< </gd:name>
+< <gContact:fileAs>A</gContact:fileAs>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6"/>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/4558a0fc0f98a74a"/>
+< <gd:extendedProperty name="X-MOZILLA-HTML">FALSE</gd:extendedProperty>
+< </entry>
+< </feed>
+
--- /dev/null
+> GET /m8/feeds/contacts/default/full HTTP/1.1
+> Soup-Debug-Timestamp: 1415489574
+> Soup-Debug: SoupSession 1 (0x15cd240), SoupMessage 36 (0x7ff43800ed50), SoupSocket 18 (0x7ff438057cc0)
+> Host: www.google.com
+> Authorization: Bearer ya29.uACgkznYPDckPkHNMU2MF2gRNGrNKqsjnalf5jZmQ0jV9jcp297YMiQop53msSbUJi5poX8LolhsSw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415489575
+< Soup-Debug: SoupMessage 36 (0x7ff43800ed50)
+< Expires: Sat, 08 Nov 2014 23:32:55 GMT
+< Date: Sat, 08 Nov 2014 23:32:55 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "RH89eTVSLyt7I2A9XRdWFEUDQgM."
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml; charset=UTF-8
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Content-Encoding: gzip
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version="1.0" encoding="UTF-8"?>
+< <feed gd:etag=""RH89eTVSLyt7I2A9XRdWFEUDQgM."" xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/">
+< <id>libgdata.test@googlemail.com</id>
+< <updated>2014-11-08T23:32:55.161Z</updated>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>GData Test's Contacts</title>
+< <link rel="alternate" type="text/html" href="https://www.google.com/"/>
+< <link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full"/>
+< <link rel="http://schemas.google.com/g/2005#post" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full"/>
+< <link rel="http://schemas.google.com/g/2005#batch" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/batch"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full?max-results=25"/>
+< <author>
+< <name>GData Test</name>
+< <email>libgdata.test@googlemail.com</email>
+< </author>
+< <generator version="1.0" uri="http://www.google.com/m8/feeds">Contacts</generator>
+< <openSearch:totalResults>16</openSearch:totalResults>
+< <openSearch:startIndex>1</openSearch:startIndex>
+< <openSearch:itemsPerPage>25</openSearch:itemsPerPage>
+< <entry gd:etag=""Q3gzejVSLyt7I2A9Wh9XGUwCQAY."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/a86b08c4621c7</id>
+< <updated>2014-03-15T21:25:22.682Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:25:22.682Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>AA</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/a86b08c4621c7"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/a86b08c4621c7"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/a86b08c4621c7"/>
+< <gd:name>
+< <gd:fullName>AA</gd:fullName>
+< <gd:givenName>AA</gd:givenName>
+< </gd:name>
+< <gContact:fileAs>AA</gContact:fileAs>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6"/>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/5a5615828e8c12dc"/>
+< <gd:extendedProperty name="X-MOZILLA-HTML">FALSE</gd:extendedProperty>
+< </entry>
+< <entry gd:etag=""SXY_fjVSLit7I2A9XRdWFEUDQgI."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/10ba35c58c59d676</id>
+< <updated>2014-11-08T23:32:48.846Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:32:48.846Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title/>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/10ba35c58c59d676"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/10ba35c58c59d676"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/10ba35c58c59d676"/>
+< <gContact:nickname>Test Contact 2</gContact:nickname>
+< </entry>
+< <entry gd:etag=""RHc4fzVSLit7I2A9Wh9VF0oPQAU."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/1848d1b50ceff503</id>
+< <updated>2014-04-06T09:15:15.937Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-04-06T09:15:15.937Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>Test Mcfoobar</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/1848d1b50ceff503"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1848d1b50ceff503"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1848d1b50ceff503"/>
+< <gd:name>
+< <gd:fullName>Test Mcfoobar</gd:fullName>
+< <gd:givenName>Test</gd:givenName>
+< <gd:familyName>Mcfoobar</gd:familyName>
+< </gd:name>
+< <gContact:fileAs>Mcfoobar, Test</gContact:fileAs>
+< <gd:email rel="http://schemas.google.com/g/2005#work" address="test1@example.com" primary="true"/>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6"/>
+< <gd:extendedProperty name="X-MOZILLA-HTML">FALSE</gd:extendedProperty>
+< </entry>
+< <entry gd:etag=""R34zezVSLit7I2A9XRdWFEUDRQY."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/186ec44a0fc1ca9d</id>
+< <updated>2014-11-08T23:27:06.083Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:27:06.083Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>John Wilson</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/186ec44a0fc1ca9d"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/186ec44a0fc1ca9d"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/186ec44a0fc1ca9d"/>
+< <gd:name>
+< <gd:fullName>John Wilson</gd:fullName>
+< <gd:givenName>John</gd:givenName>
+< <gd:familyName>Wilson</gd:familyName>
+< </gd:name>
+< <gContact:nickname>Test Contact Esq.</gContact:nickname>
+< <gd:extendedProperty name="contact-test">value</gd:extendedProperty>
+< </entry>
+< <entry gd:etag=""RX0-cDVSLit7I2A9XRdWFEUDRgE."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/1ebe29f48b9167e1</id>
+< <updated>2014-11-08T23:25:54.358Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:25:54.358Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>John Smith</title>
+< <content>Notes</content>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/1ebe29f48b9167e1"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1ebe29f48b9167e1"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1ebe29f48b9167e1"/>
+< <gd:name>
+< <gd:fullName>John Smith</gd:fullName>
+< <gd:givenName>John</gd:givenName>
+< <gd:familyName>Smith</gd:familyName>
+< </gd:name>
+< <gContact:nickname>Big J</gContact:nickname>
+< <gContact:initials>A. B. C.</gContact:initials>
+< <gContact:shortName>Jon</gContact:shortName>
+< <gContact:maidenName>Smith</gContact:maidenName>
+< <gContact:gender value="male"/>
+< <gContact:birthday when="--01-01"/>
+< <gContact:occupation>Professional bum</gContact:occupation>
+< <gContact:billingInformation>Big J Enterprises, Ltd.</gContact:billingInformation>
+< <gContact:mileage>12km</gContact:mileage>
+< <gContact:directoryServer>This is a server</gContact:directoryServer>
+< <gContact:subject>Charity work</gContact:subject>
+< <gContact:fileAs>J, Big</gContact:fileAs>
+< <gd:organization rel="http://schemas.google.com/g/2005#work">
+< <gd:orgName>OrgCorp</gd:orgName>
+< <gd:orgTitle>President</gd:orgTitle>
+< </gd:organization>
+< <gd:email rel="http://schemas.google.com/g/2005#work" address="liz@gmail.com"/>
+< <gd:email rel="http://schemas.google.com/g/2005#home" address="liz@example.org"/>
+< <gd:im address="liz@gmail.com" protocol="http://schemas.google.com/g/2005#GOOGLE_TALK" rel="http://schemas.google.com/g/2005#home"/>
+< <gd:phoneNumber rel="http://schemas.google.com/g/2005#work" primary="true">(206)555-1212</gd:phoneNumber>
+< <gd:phoneNumber rel="http://schemas.google.com/g/2005#home">(206)555-1213</gd:phoneNumber>
+< <gd:structuredPostalAddress rel="http://schemas.google.com/g/2005#work" primary="true">
+< <gd:formattedAddress>1600 Amphitheatre Pkwy Mountain View</gd:formattedAddress>
+< <gd:street>1600 Amphitheatre Pkwy Mountain View</gd:street>
+< </gd:structuredPostalAddress>
+< <gContact:event rel="anniversary">
+< <gd:when startTime="1900-01-01"/>
+< </gContact:event>
+< <gContact:externalId rel="organization" value="Number Six"/>
+< <gContact:relation rel="friend">Brian Haddock</gContact:relation>
+< <gContact:userDefinedField key="Favourite colour" value="Blue"/>
+< <gContact:userDefinedField key="My notes" value=""/>
+< <gContact:userDefinedField key="Owes me" value="£10"/>
+< <gContact:userDefinedField key="" value="Foo"/>
+< <gContact:website href="http://example.com/" primary="true" rel="profile"/>
+< <gContact:calendarLink primary="true" href="http://calendar.example.com/" rel="home"/>
+< <gContact:language code="en-GB"/>
+< <gContact:jot rel="other">This is a jot.</gContact:jot>
+< <gContact:hobby>Rowing</gContact:hobby>
+< <gd:extendedProperty name="CALURI">http://example.com/</gd:extendedProperty>
+< </entry>
+< <entry gd:etag=""SXszcTVSLit7I2A9XRdWFEUDQgI."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/1fb657e58c9a2eb9</id>
+< <updated>2014-11-08T23:32:48.589Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:32:48.589Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title/>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/1fb657e58c9a2eb9"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1fb657e58c9a2eb9"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1fb657e58c9a2eb9"/>
+< <gContact:nickname>Test Contact 1</gContact:nickname>
+< </entry>
+< <entry gd:etag=""QH48fzVSLit7I2A9XRdWFEUDQgc."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/1fe897fa0c51ed2c</id>
+< <updated>2014-11-08T23:32:11.077Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:32:11.077Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>Toby</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/1fe897fa0c51ed2c"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1fe897fa0c51ed2c"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1fe897fa0c51ed2c"/>
+< <gd:name>
+< <gd:fullName>Toby</gd:fullName>
+< <gd:givenName>Brian</gd:givenName>
+< </gd:name>
+< </entry>
+< <entry gd:etag=""Qn0zcDVSLit7I2A9Wh9XGUwCQAA."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/2f943d4789cb93a9</id>
+< <updated>2014-03-15T21:25:43.388Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:25:43.388Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>AAA</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/2f943d4789cb93a9"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/2f943d4789cb93a9"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/2f943d4789cb93a9"/>
+< <gd:name>
+< <gd:fullName>AAA</gd:fullName>
+< <gd:givenName>AAA</gd:givenName>
+< </gd:name>
+< <gContact:fileAs>AAA</gContact:fileAs>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6"/>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/7b25d4e38c3f32b5"/>
+< <gd:extendedProperty name="X-MOZILLA-HTML">FALSE</gd:extendedProperty>
+< </entry>
+< <entry gd:etag=""SX89cTVSLit7I2A9Wh9XGUwCQg0."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/3531fe820d6801f3</id>
+< <updated>2014-03-15T21:23:18.169Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:23:18.169Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>AAAA</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/3531fe820d6801f3"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/3531fe820d6801f3"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/3531fe820d6801f3"/>
+< <gd:name>
+< <gd:fullName>AAAA</gd:fullName>
+< <gd:givenName>AAAA</gd:givenName>
+< </gd:name>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/115d0c4d0cd6f616"/>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6"/>
+< </entry>
+< <entry gd:etag=""RXY5fDVSLit7I2A9XRdWFEUCTgc."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/37c76f0508bed31f</id>
+< <updated>2014-11-08T23:22:14.824Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:22:14.824Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>John Smith</title>
+< <content>Notes</content>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/37c76f0508bed31f"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/37c76f0508bed31f"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/37c76f0508bed31f"/>
+< <gd:name>
+< <gd:fullName>John Smith</gd:fullName>
+< <gd:givenName>John</gd:givenName>
+< <gd:familyName>Smith</gd:familyName>
+< </gd:name>
+< <gContact:nickname>Big J</gContact:nickname>
+< <gContact:initials>A. B. C.</gContact:initials>
+< <gContact:shortName>Jon</gContact:shortName>
+< <gContact:maidenName>Smith</gContact:maidenName>
+< <gContact:gender value="male"/>
+< <gContact:birthday when="--01-01"/>
+< <gContact:occupation>Professional bum</gContact:occupation>
+< <gContact:billingInformation>Big J Enterprises, Ltd.</gContact:billingInformation>
+< <gContact:mileage>12km</gContact:mileage>
+< <gContact:directoryServer>This is a server</gContact:directoryServer>
+< <gContact:subject>Charity work</gContact:subject>
+< <gContact:fileAs>J, Big</gContact:fileAs>
+< <gd:organization rel="http://schemas.google.com/g/2005#work">
+< <gd:orgName>OrgCorp</gd:orgName>
+< <gd:orgTitle>President</gd:orgTitle>
+< </gd:organization>
+< <gd:email rel="http://schemas.google.com/g/2005#work" address="liz@gmail.com"/>
+< <gd:email rel="http://schemas.google.com/g/2005#home" address="liz@example.org"/>
+< <gd:im address="liz@gmail.com" protocol="http://schemas.google.com/g/2005#GOOGLE_TALK" rel="http://schemas.google.com/g/2005#home"/>
+< <gd:phoneNumber rel="http://schemas.google.com/g/2005#work" primary="true">(206)555-1212</gd:phoneNumber>
+< <gd:phoneNumber rel="http://schemas.google.com/g/2005#home">(206)555-1213</gd:phoneNumber>
+< <gd:structuredPostalAddress rel="http://schemas.google.com/g/2005#work" primary="true">
+< <gd:formattedAddress>1600 Amphitheatre Pkwy Mountain View</gd:formattedAddress>
+< <gd:street>1600 Amphitheatre Pkwy Mountain View</gd:street>
+< </gd:structuredPostalAddress>
+< <gContact:event rel="anniversary">
+< <gd:when startTime="1900-01-01"/>
+< </gContact:event>
+< <gContact:externalId rel="organization" value="Number Six"/>
+< <gContact:relation rel="friend">Brian Haddock</gContact:relation>
+< <gContact:userDefinedField key="Favourite colour" value="Blue"/>
+< <gContact:userDefinedField key="My notes" value=""/>
+< <gContact:userDefinedField key="Owes me" value="£10"/>
+< <gContact:userDefinedField key="" value="Foo"/>
+< <gContact:website href="http://example.com/" primary="true" rel="profile"/>
+< <gContact:calendarLink primary="true" href="http://calendar.example.com/" rel="home"/>
+< <gContact:language code="en-GB"/>
+< <gContact:jot rel="other">This is a jot.</gContact:jot>
+< <gContact:hobby>Rowing</gContact:hobby>
+< <gd:extendedProperty name="CALURI">http://example.com/</gd:extendedProperty>
+< </entry>
+< <entry gd:etag=""Rns7eDVSLyt7I2A9Wh9XGUwCQAI."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/3b0b0e8c8d6c81ef</id>
+< <updated>2014-03-15T21:26:07.500Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:26:07.500Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>AAAAA</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/3b0b0e8c8d6c81ef"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/3b0b0e8c8d6c81ef"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/3b0b0e8c8d6c81ef"/>
+< <gd:name>
+< <gd:fullName>AAAAA</gd:fullName>
+< <gd:givenName>AAAAA</gd:givenName>
+< </gd:name>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6"/>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/5aa4ff9a0de39ade"/>
+< </entry>
+< <entry gd:etag=""RXs4ejVSLit7I2A9XRdWFEUDRQU."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/415b6675090874ea</id>
+< <updated>2014-11-08T23:26:54.532Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:26:54.532Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>Toby</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/415b6675090874ea"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/415b6675090874ea"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/415b6675090874ea"/>
+< <gd:name>
+< <gd:fullName>Toby</gd:fullName>
+< <gd:givenName>Brian</gd:givenName>
+< </gd:name>
+< </entry>
+< <entry gd:etag=""Qnc4fjVSLit7I2A9XRdWFEUCTgc."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/505ad8890cd2744a</id>
+< <updated>2014-11-08T23:22:13.936Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:22:13.936Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>Toby</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/505ad8890cd2744a"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/505ad8890cd2744a"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/505ad8890cd2744a"/>
+< <gd:name>
+< <gd:fullName>Toby</gd:fullName>
+< <gd:givenName>Brian</gd:givenName>
+< </gd:name>
+< </entry>
+< <entry gd:etag=""SHo5fTVSLSt7I2A9XRdWFEUDQgI."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/5997be300d23115b</id>
+< <updated>2014-11-08T23:32:49.425Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:32:49.425Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title/>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/5997be300d23115b"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/5997be300d23115b"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/5997be300d23115b"/>
+< <gContact:nickname>Test Contact 3</gContact:nickname>
+< </entry>
+< <entry gd:etag=""QnY4fDVSLyt7I2A9XRdWFEUDRgE."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/65834f618a9f8743</id>
+< <updated>2014-11-08T23:25:53.834Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:25:53.834Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>Toby</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/65834f618a9f8743"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/65834f618a9f8743"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/65834f618a9f8743"/>
+< <gd:name>
+< <gd:fullName>Toby</gd:fullName>
+< <gd:givenName>Brian</gd:givenName>
+< </gd:name>
+< </entry>
+< <entry gd:etag=""Rn4-ezVSLit7I2A9Wh9XGUwCQgw."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/6754f9cf8cbc042d</id>
+< <updated>2014-03-15T21:23:07.053Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:23:07.053Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>A</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/6754f9cf8cbc042d"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/6754f9cf8cbc042d"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/6754f9cf8cbc042d"/>
+< <gd:name>
+< <gd:fullName>A</gd:fullName>
+< <gd:givenName>A</gd:givenName>
+< </gd:name>
+< <gContact:fileAs>A</gContact:fileAs>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6"/>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/4558a0fc0f98a74a"/>
+< <gd:extendedProperty name="X-MOZILLA-HTML">FALSE</gd:extendedProperty>
+< </entry>
+< </feed>
+
--- /dev/null
+> GET /m8/feeds/groups/default/full HTTP/1.1
+> Soup-Debug-Timestamp: 1415490491
+> Soup-Debug: SoupSession 1 (0x1c05240), SoupMessage 18 (0x1ce9490), SoupSocket 10 (0x1e32c40)
+> Host: www.google.com
+> Authorization: Bearer ya29.uAB1RRhn3TKLPSfFZeRgrzf68-Gb9tby5F20urDCBwC6B94UqINs1Hvh_iKX3FagPwd0QkLnrSyVRw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415490491
+< Soup-Debug: SoupMessage 18 (0x1ce9490)
+< Expires: Sat, 08 Nov 2014 23:48:11 GMT
+< Date: Sat, 08 Nov 2014 23:48:11 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "QHo_cDVSLyt7I2A9XRdWFEQKQw0."
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml; charset=UTF-8
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Content-Encoding: gzip
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version="1.0" encoding="UTF-8"?>
+< <feed gd:etag=""QHo_cDVSLyt7I2A9XRdWFEQKQw0."" xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/">
+< <id>libgdata.test@googlemail.com</id>
+< <updated>2014-11-08T23:48:11.448Z</updated>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>GData Test's Contact Groups</title>
+< <link rel="alternate" type="text/html" href="https://www.google.com/"/>
+< <link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full"/>
+< <link rel="http://schemas.google.com/g/2005#post" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full"/>
+< <link rel="http://schemas.google.com/g/2005#batch" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/batch"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full?max-results=25"/>
+< <author>
+< <name>GData Test</name>
+< <email>libgdata.test@googlemail.com</email>
+< </author>
+< <generator version="1.0" uri="http://www.google.com/m8/feeds">Contacts</generator>
+< <openSearch:totalResults>12</openSearch:totalResults>
+< <openSearch:startIndex>1</openSearch:startIndex>
+< <openSearch:itemsPerPage>25</openSearch:itemsPerPage>
+< <entry gd:etag=""YDwreyM."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6</id>
+< <updated>1970-01-01T00:00:00.000Z</updated>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>System Group: My Contacts</title>
+< <content>System Group: My Contacts</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/6"/>
+< <gContact:systemGroup id="Contacts"/>
+< </entry>
+< <entry gd:etag=""YDwreyM."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/d</id>
+< <updated>1970-01-01T00:00:00.000Z</updated>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>System Group: Friends</title>
+< <content>System Group: Friends</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/d"/>
+< <gContact:systemGroup id="Friends"/>
+< </entry>
+< <entry gd:etag=""YDwreyM."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/e</id>
+< <updated>1970-01-01T00:00:00.000Z</updated>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>System Group: Family</title>
+< <content>System Group: Family</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/e"/>
+< <gContact:systemGroup id="Family"/>
+< </entry>
+< <entry gd:etag=""YDwreyM."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/f</id>
+< <updated>1970-01-01T00:00:00.000Z</updated>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>System Group: Coworkers</title>
+< <content>System Group: Coworkers</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/f"/>
+< <gContact:systemGroup id="Coworkers"/>
+< </entry>
+< <entry gd:etag=""QX0zfjVSLyt7I2A9XRdWFEQKQww."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/1d5fa390c9a7fe3</id>
+< <updated>2014-11-08T23:48:00.386Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:48:00.386Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>Test Group 1</title>
+< <content>Test Group 1</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/1d5fa390c9a7fe3"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/1d5fa390c9a7fe3"/>
+< </entry>
+< <entry gd:etag=""QH49fzVSLit7I2A9XRdWFEQKQww."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/218e0110860fcd3</id>
+< <updated>2014-11-08T23:48:01.067Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:48:01.067Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>Test Group 3</title>
+< <content>Test Group 3</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/218e0110860fcd3"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/218e0110860fcd3"/>
+< </entry>
+< <entry gd:etag=""RXg9fTVSLit7I2A9Wh9XGUwNRAc."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/115d0c4d0cd6f616</id>
+< <updated>2014-03-15T21:02:14.665Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:02:14.665Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>D</title>
+< <content>D</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/115d0c4d0cd6f616"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/115d0c4d0cd6f616"/>
+< </entry>
+< <entry gd:etag=""R3s6ejVSLit7I2A9Wh9XGUwCQgw."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/4558a0fc0f98a74a</id>
+< <updated>2014-03-15T21:23:06.512Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:23:06.512Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>A</title>
+< <content>A</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/4558a0fc0f98a74a"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/4558a0fc0f98a74a"/>
+< </entry>
+< <entry gd:etag=""QXk5fzVSLit7I2A9XRdWFEQKQww."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/52ccac800d63785b</id>
+< <updated>2014-11-08T23:48:00.727Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:48:00.727Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>Test Group 2</title>
+< <content>Test Group 2</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/52ccac800d63785b"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/52ccac800d63785b"/>
+< </entry>
+< <entry gd:etag=""Q34zeTVSLit7I2A9Wh9XGUwCQAY."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/5a5615828e8c12dc</id>
+< <updated>2014-03-15T21:25:22.081Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:25:22.081Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>B</title>
+< <content>B</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/5a5615828e8c12dc"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/5a5615828e8c12dc"/>
+< </entry>
+< <entry gd:etag=""R3kyfzVSLyt7I2A9Wh9XGUwCQAI."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/5aa4ff9a0de39ade</id>
+< <updated>2014-03-15T21:26:06.797Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:26:06.797Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>E</title>
+< <content>E</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/5aa4ff9a0de39ade"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/5aa4ff9a0de39ade"/>
+< </entry>
+< <entry gd:etag=""Q3Y_fzVSLyt7I2A9Wh9XGUwCQAA."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/7b25d4e38c3f32b5</id>
+< <updated>2014-03-15T21:25:42.847Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:25:42.847Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>C</title>
+< <content>C</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/7b25d4e38c3f32b5"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/7b25d4e38c3f32b5"/>
+< </entry>
+< </feed>
+
--- /dev/null
+> GET /m8/feeds/groups/default/full HTTP/1.1
+> Soup-Debug-Timestamp: 1415490527
+> Soup-Debug: SoupSession 1 (0x1c05240), SoupMessage 34 (0x7f451000f1d0), SoupSocket 17 (0x7f45100449c0)
+> Host: www.google.com
+> Authorization: Bearer ya29.uAB1RRhn3TKLPSfFZeRgrzf68-Gb9tby5F20urDCBwC6B94UqINs1Hvh_iKX3FagPwd0QkLnrSyVRw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415490527
+< Soup-Debug: SoupMessage 34 (0x7f451000f1d0)
+< Expires: Sat, 08 Nov 2014 23:48:47 GMT
+< Date: Sat, 08 Nov 2014 23:48:47 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "Rnc4fDVSLyt7I2A9XRdWFEQKQgY."
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml; charset=UTF-8
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Content-Encoding: gzip
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version="1.0" encoding="UTF-8"?>
+< <feed gd:etag=""Rnc4fDVSLyt7I2A9XRdWFEQKQgY."" xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/">
+< <id>libgdata.test@googlemail.com</id>
+< <updated>2014-11-08T23:48:47.934Z</updated>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>GData Test's Contact Groups</title>
+< <link rel="alternate" type="text/html" href="https://www.google.com/"/>
+< <link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full"/>
+< <link rel="http://schemas.google.com/g/2005#post" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full"/>
+< <link rel="http://schemas.google.com/g/2005#batch" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/batch"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full?max-results=25"/>
+< <author>
+< <name>GData Test</name>
+< <email>libgdata.test@googlemail.com</email>
+< </author>
+< <generator version="1.0" uri="http://www.google.com/m8/feeds">Contacts</generator>
+< <openSearch:totalResults>12</openSearch:totalResults>
+< <openSearch:startIndex>1</openSearch:startIndex>
+< <openSearch:itemsPerPage>25</openSearch:itemsPerPage>
+< <entry gd:etag=""YDwreyM."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6</id>
+< <updated>1970-01-01T00:00:00.000Z</updated>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>System Group: My Contacts</title>
+< <content>System Group: My Contacts</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/6"/>
+< <gContact:systemGroup id="Contacts"/>
+< </entry>
+< <entry gd:etag=""YDwreyM."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/d</id>
+< <updated>1970-01-01T00:00:00.000Z</updated>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>System Group: Friends</title>
+< <content>System Group: Friends</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/d"/>
+< <gContact:systemGroup id="Friends"/>
+< </entry>
+< <entry gd:etag=""YDwreyM."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/e</id>
+< <updated>1970-01-01T00:00:00.000Z</updated>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>System Group: Family</title>
+< <content>System Group: Family</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/e"/>
+< <gContact:systemGroup id="Family"/>
+< </entry>
+< <entry gd:etag=""YDwreyM."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/f</id>
+< <updated>1970-01-01T00:00:00.000Z</updated>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>System Group: Coworkers</title>
+< <content>System Group: Coworkers</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/f"/>
+< <gContact:systemGroup id="Coworkers"/>
+< </entry>
+< <entry gd:etag=""Rn8yejVSLit7I2A9XRdWFEQKQgU."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/61d709b0a05798f</id>
+< <updated>2014-11-08T23:48:37.192Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:48:37.192Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>Test Group 2</title>
+< <content>Test Group 2</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/61d709b0a05798f"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/61d709b0a05798f"/>
+< </entry>
+< <entry gd:etag=""RXg9fTVSLit7I2A9Wh9XGUwNRAc."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/115d0c4d0cd6f616</id>
+< <updated>2014-03-15T21:02:14.665Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:02:14.665Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>D</title>
+< <content>D</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/115d0c4d0cd6f616"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/115d0c4d0cd6f616"/>
+< </entry>
+< <entry gd:etag=""R3s6ejVSLit7I2A9Wh9XGUwCQgw."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/4558a0fc0f98a74a</id>
+< <updated>2014-03-15T21:23:06.512Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:23:06.512Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>A</title>
+< <content>A</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/4558a0fc0f98a74a"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/4558a0fc0f98a74a"/>
+< </entry>
+< <entry gd:etag=""Q34zeTVSLit7I2A9Wh9XGUwCQAY."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/5a5615828e8c12dc</id>
+< <updated>2014-03-15T21:25:22.081Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:25:22.081Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>B</title>
+< <content>B</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/5a5615828e8c12dc"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/5a5615828e8c12dc"/>
+< </entry>
+< <entry gd:etag=""R3kyfzVSLyt7I2A9Wh9XGUwCQAI."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/5aa4ff9a0de39ade</id>
+< <updated>2014-03-15T21:26:06.797Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:26:06.797Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>E</title>
+< <content>E</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/5aa4ff9a0de39ade"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/5aa4ff9a0de39ade"/>
+< </entry>
+< <entry gd:etag=""Rns_fTVSLit7I2A9XRdWFEQKQgU."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6e75d86c0cd1b268</id>
+< <updated>2014-11-08T23:48:37.545Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:48:37.545Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>Test Group 3</title>
+< <content>Test Group 3</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/6e75d86c0cd1b268"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/6e75d86c0cd1b268"/>
+< </entry>
+< <entry gd:etag=""Q3Y_fzVSLyt7I2A9Wh9XGUwCQAA."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/7b25d4e38c3f32b5</id>
+< <updated>2014-03-15T21:25:42.847Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:25:42.847Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>C</title>
+< <content>C</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/7b25d4e38c3f32b5"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/7b25d4e38c3f32b5"/>
+< </entry>
+< <entry gd:etag=""R3s_eDVSLit7I2A9XRdWFEQKQgU."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/7c4fb3b60a62383b</id>
+< <updated>2014-11-08T23:48:36.540Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:48:36.540Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>Test Group 1</title>
+< <content>Test Group 1</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/7c4fb3b60a62383b"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/7c4fb3b60a62383b"/>
+< </entry>
+< </feed>
+
--- /dev/null
+> GET /m8/feeds/contacts/default/full HTTP/1.1
+> Soup-Debug-Timestamp: 1415489558
+> Soup-Debug: SoupSession 1 (0x15cd240), SoupMessage 20 (0x182f640), SoupSocket 11 (0x18d59a0)
+> Host: www.google.com
+> Authorization: Bearer ya29.uACgkznYPDckPkHNMU2MF2gRNGrNKqsjnalf5jZmQ0jV9jcp297YMiQop53msSbUJi5poX8LolhsSw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415489558
+< Soup-Debug: SoupMessage 20 (0x182f640)
+< Expires: Sat, 08 Nov 2014 23:32:38 GMT
+< Date: Sat, 08 Nov 2014 23:32:38 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "SXg9fTVSLyt7I2A9XRdWFEUDQgE."
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml; charset=UTF-8
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Content-Encoding: gzip
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version="1.0" encoding="UTF-8"?>
+< <feed gd:etag=""SXg9fTVSLyt7I2A9XRdWFEUDQgE."" xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/">
+< <id>libgdata.test@googlemail.com</id>
+< <updated>2014-11-08T23:32:38.665Z</updated>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>GData Test's Contacts</title>
+< <link rel="alternate" type="text/html" href="https://www.google.com/"/>
+< <link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full"/>
+< <link rel="http://schemas.google.com/g/2005#post" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full"/>
+< <link rel="http://schemas.google.com/g/2005#batch" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/batch"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full?max-results=25"/>
+< <author>
+< <name>GData Test</name>
+< <email>libgdata.test@googlemail.com</email>
+< </author>
+< <generator version="1.0" uri="http://www.google.com/m8/feeds">Contacts</generator>
+< <openSearch:totalResults>16</openSearch:totalResults>
+< <openSearch:startIndex>1</openSearch:startIndex>
+< <openSearch:itemsPerPage>25</openSearch:itemsPerPage>
+< <entry gd:etag=""Q3gzejVSLyt7I2A9Wh9XGUwCQAY."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/a86b08c4621c7</id>
+< <updated>2014-03-15T21:25:22.682Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:25:22.682Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>AA</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/a86b08c4621c7"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/a86b08c4621c7"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/a86b08c4621c7"/>
+< <gd:name>
+< <gd:fullName>AA</gd:fullName>
+< <gd:givenName>AA</gd:givenName>
+< </gd:name>
+< <gContact:fileAs>AA</gContact:fileAs>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6"/>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/5a5615828e8c12dc"/>
+< <gd:extendedProperty name="X-MOZILLA-HTML">FALSE</gd:extendedProperty>
+< </entry>
+< <entry gd:etag=""RHc4fzVSLit7I2A9Wh9VF0oPQAU."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/1848d1b50ceff503</id>
+< <updated>2014-04-06T09:15:15.937Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-04-06T09:15:15.937Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>Test Mcfoobar</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/1848d1b50ceff503"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1848d1b50ceff503"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1848d1b50ceff503"/>
+< <gd:name>
+< <gd:fullName>Test Mcfoobar</gd:fullName>
+< <gd:givenName>Test</gd:givenName>
+< <gd:familyName>Mcfoobar</gd:familyName>
+< </gd:name>
+< <gContact:fileAs>Mcfoobar, Test</gContact:fileAs>
+< <gd:email rel="http://schemas.google.com/g/2005#work" address="test1@example.com" primary="true"/>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6"/>
+< <gd:extendedProperty name="X-MOZILLA-HTML">FALSE</gd:extendedProperty>
+< </entry>
+< <entry gd:etag=""R34zezVSLit7I2A9XRdWFEUDRQY."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/186ec44a0fc1ca9d</id>
+< <updated>2014-11-08T23:27:06.083Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:27:06.083Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>John Wilson</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/186ec44a0fc1ca9d"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/186ec44a0fc1ca9d"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/186ec44a0fc1ca9d"/>
+< <gd:name>
+< <gd:fullName>John Wilson</gd:fullName>
+< <gd:givenName>John</gd:givenName>
+< <gd:familyName>Wilson</gd:familyName>
+< </gd:name>
+< <gContact:nickname>Test Contact Esq.</gContact:nickname>
+< <gd:extendedProperty name="contact-test">value</gd:extendedProperty>
+< </entry>
+< <entry gd:etag=""Qnw_fzVSLit7I2A9XRdWFEUDQgE."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/1ded2e498d3e6d35</id>
+< <updated>2014-11-08T23:32:33.247Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:32:33.247Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title/>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/1ded2e498d3e6d35"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1ded2e498d3e6d35"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1ded2e498d3e6d35"/>
+< <gContact:nickname>Test Contact 3</gContact:nickname>
+< </entry>
+< <entry gd:etag=""RX0-cDVSLit7I2A9XRdWFEUDRgE."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/1ebe29f48b9167e1</id>
+< <updated>2014-11-08T23:25:54.358Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:25:54.358Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>John Smith</title>
+< <content>Notes</content>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/1ebe29f48b9167e1"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1ebe29f48b9167e1"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1ebe29f48b9167e1"/>
+< <gd:name>
+< <gd:fullName>John Smith</gd:fullName>
+< <gd:givenName>John</gd:givenName>
+< <gd:familyName>Smith</gd:familyName>
+< </gd:name>
+< <gContact:nickname>Big J</gContact:nickname>
+< <gContact:initials>A. B. C.</gContact:initials>
+< <gContact:shortName>Jon</gContact:shortName>
+< <gContact:maidenName>Smith</gContact:maidenName>
+< <gContact:gender value="male"/>
+< <gContact:birthday when="--01-01"/>
+< <gContact:occupation>Professional bum</gContact:occupation>
+< <gContact:billingInformation>Big J Enterprises, Ltd.</gContact:billingInformation>
+< <gContact:mileage>12km</gContact:mileage>
+< <gContact:directoryServer>This is a server</gContact:directoryServer>
+< <gContact:subject>Charity work</gContact:subject>
+< <gContact:fileAs>J, Big</gContact:fileAs>
+< <gd:organization rel="http://schemas.google.com/g/2005#work">
+< <gd:orgName>OrgCorp</gd:orgName>
+< <gd:orgTitle>President</gd:orgTitle>
+< </gd:organization>
+< <gd:email rel="http://schemas.google.com/g/2005#work" address="liz@gmail.com"/>
+< <gd:email rel="http://schemas.google.com/g/2005#home" address="liz@example.org"/>
+< <gd:im address="liz@gmail.com" protocol="http://schemas.google.com/g/2005#GOOGLE_TALK" rel="http://schemas.google.com/g/2005#home"/>
+< <gd:phoneNumber rel="http://schemas.google.com/g/2005#work" primary="true">(206)555-1212</gd:phoneNumber>
+< <gd:phoneNumber rel="http://schemas.google.com/g/2005#home">(206)555-1213</gd:phoneNumber>
+< <gd:structuredPostalAddress rel="http://schemas.google.com/g/2005#work" primary="true">
+< <gd:formattedAddress>1600 Amphitheatre Pkwy Mountain View</gd:formattedAddress>
+< <gd:street>1600 Amphitheatre Pkwy Mountain View</gd:street>
+< </gd:structuredPostalAddress>
+< <gContact:event rel="anniversary">
+< <gd:when startTime="1900-01-01"/>
+< </gContact:event>
+< <gContact:externalId rel="organization" value="Number Six"/>
+< <gContact:relation rel="friend">Brian Haddock</gContact:relation>
+< <gContact:userDefinedField key="Favourite colour" value="Blue"/>
+< <gContact:userDefinedField key="My notes" value=""/>
+< <gContact:userDefinedField key="Owes me" value="£10"/>
+< <gContact:userDefinedField key="" value="Foo"/>
+< <gContact:website href="http://example.com/" primary="true" rel="profile"/>
+< <gContact:calendarLink primary="true" href="http://calendar.example.com/" rel="home"/>
+< <gContact:language code="en-GB"/>
+< <gContact:jot rel="other">This is a jot.</gContact:jot>
+< <gContact:hobby>Rowing</gContact:hobby>
+< <gd:extendedProperty name="CALURI">http://example.com/</gd:extendedProperty>
+< </entry>
+< <entry gd:etag=""QH48fzVSLit7I2A9XRdWFEUDQgc."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/1fe897fa0c51ed2c</id>
+< <updated>2014-11-08T23:32:11.077Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:32:11.077Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>Toby</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/1fe897fa0c51ed2c"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1fe897fa0c51ed2c"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1fe897fa0c51ed2c"/>
+< <gd:name>
+< <gd:fullName>Toby</gd:fullName>
+< <gd:givenName>Brian</gd:givenName>
+< </gd:name>
+< </entry>
+< <entry gd:etag=""Q34-fTVSLit7I2A9XRdWFEUDQgE."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/29c0dbee0da884ed</id>
+< <updated>2014-11-08T23:32:32.055Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:32:32.055Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title/>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/29c0dbee0da884ed"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/29c0dbee0da884ed"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/29c0dbee0da884ed"/>
+< <gContact:nickname>Test Contact 1</gContact:nickname>
+< </entry>
+< <entry gd:etag=""Qn0zcDVSLit7I2A9Wh9XGUwCQAA."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/2f943d4789cb93a9</id>
+< <updated>2014-03-15T21:25:43.388Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:25:43.388Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>AAA</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/2f943d4789cb93a9"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/2f943d4789cb93a9"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/2f943d4789cb93a9"/>
+< <gd:name>
+< <gd:fullName>AAA</gd:fullName>
+< <gd:givenName>AAA</gd:givenName>
+< </gd:name>
+< <gContact:fileAs>AAA</gContact:fileAs>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6"/>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/7b25d4e38c3f32b5"/>
+< <gd:extendedProperty name="X-MOZILLA-HTML">FALSE</gd:extendedProperty>
+< </entry>
+< <entry gd:etag=""SX89cTVSLit7I2A9Wh9XGUwCQg0."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/3531fe820d6801f3</id>
+< <updated>2014-03-15T21:23:18.169Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:23:18.169Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>AAAA</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/3531fe820d6801f3"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/3531fe820d6801f3"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/3531fe820d6801f3"/>
+< <gd:name>
+< <gd:fullName>AAAA</gd:fullName>
+< <gd:givenName>AAAA</gd:givenName>
+< </gd:name>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/115d0c4d0cd6f616"/>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6"/>
+< </entry>
+< <entry gd:etag=""RXY5fDVSLit7I2A9XRdWFEUCTgc."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/37c76f0508bed31f</id>
+< <updated>2014-11-08T23:22:14.824Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:22:14.824Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>John Smith</title>
+< <content>Notes</content>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/37c76f0508bed31f"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/37c76f0508bed31f"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/37c76f0508bed31f"/>
+< <gd:name>
+< <gd:fullName>John Smith</gd:fullName>
+< <gd:givenName>John</gd:givenName>
+< <gd:familyName>Smith</gd:familyName>
+< </gd:name>
+< <gContact:nickname>Big J</gContact:nickname>
+< <gContact:initials>A. B. C.</gContact:initials>
+< <gContact:shortName>Jon</gContact:shortName>
+< <gContact:maidenName>Smith</gContact:maidenName>
+< <gContact:gender value="male"/>
+< <gContact:birthday when="--01-01"/>
+< <gContact:occupation>Professional bum</gContact:occupation>
+< <gContact:billingInformation>Big J Enterprises, Ltd.</gContact:billingInformation>
+< <gContact:mileage>12km</gContact:mileage>
+< <gContact:directoryServer>This is a server</gContact:directoryServer>
+< <gContact:subject>Charity work</gContact:subject>
+< <gContact:fileAs>J, Big</gContact:fileAs>
+< <gd:organization rel="http://schemas.google.com/g/2005#work">
+< <gd:orgName>OrgCorp</gd:orgName>
+< <gd:orgTitle>President</gd:orgTitle>
+< </gd:organization>
+< <gd:email rel="http://schemas.google.com/g/2005#work" address="liz@gmail.com"/>
+< <gd:email rel="http://schemas.google.com/g/2005#home" address="liz@example.org"/>
+< <gd:im address="liz@gmail.com" protocol="http://schemas.google.com/g/2005#GOOGLE_TALK" rel="http://schemas.google.com/g/2005#home"/>
+< <gd:phoneNumber rel="http://schemas.google.com/g/2005#work" primary="true">(206)555-1212</gd:phoneNumber>
+< <gd:phoneNumber rel="http://schemas.google.com/g/2005#home">(206)555-1213</gd:phoneNumber>
+< <gd:structuredPostalAddress rel="http://schemas.google.com/g/2005#work" primary="true">
+< <gd:formattedAddress>1600 Amphitheatre Pkwy Mountain View</gd:formattedAddress>
+< <gd:street>1600 Amphitheatre Pkwy Mountain View</gd:street>
+< </gd:structuredPostalAddress>
+< <gContact:event rel="anniversary">
+< <gd:when startTime="1900-01-01"/>
+< </gContact:event>
+< <gContact:externalId rel="organization" value="Number Six"/>
+< <gContact:relation rel="friend">Brian Haddock</gContact:relation>
+< <gContact:userDefinedField key="Favourite colour" value="Blue"/>
+< <gContact:userDefinedField key="My notes" value=""/>
+< <gContact:userDefinedField key="Owes me" value="£10"/>
+< <gContact:userDefinedField key="" value="Foo"/>
+< <gContact:website href="http://example.com/" primary="true" rel="profile"/>
+< <gContact:calendarLink primary="true" href="http://calendar.example.com/" rel="home"/>
+< <gContact:language code="en-GB"/>
+< <gContact:jot rel="other">This is a jot.</gContact:jot>
+< <gContact:hobby>Rowing</gContact:hobby>
+< <gd:extendedProperty name="CALURI">http://example.com/</gd:extendedProperty>
+< </entry>
+< <entry gd:etag=""Rns7eDVSLyt7I2A9Wh9XGUwCQAI."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/3b0b0e8c8d6c81ef</id>
+< <updated>2014-03-15T21:26:07.500Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:26:07.500Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>AAAAA</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/3b0b0e8c8d6c81ef"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/3b0b0e8c8d6c81ef"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/3b0b0e8c8d6c81ef"/>
+< <gd:name>
+< <gd:fullName>AAAAA</gd:fullName>
+< <gd:givenName>AAAAA</gd:givenName>
+< </gd:name>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6"/>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/5aa4ff9a0de39ade"/>
+< </entry>
+< <entry gd:etag=""RXs4ejVSLit7I2A9XRdWFEUDRQU."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/415b6675090874ea</id>
+< <updated>2014-11-08T23:26:54.532Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:26:54.532Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>Toby</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/415b6675090874ea"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/415b6675090874ea"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/415b6675090874ea"/>
+< <gd:name>
+< <gd:fullName>Toby</gd:fullName>
+< <gd:givenName>Brian</gd:givenName>
+< </gd:name>
+< </entry>
+< <entry gd:etag=""Qnc4fjVSLit7I2A9XRdWFEUCTgc."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/505ad8890cd2744a</id>
+< <updated>2014-11-08T23:22:13.936Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:22:13.936Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>Toby</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/505ad8890cd2744a"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/505ad8890cd2744a"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/505ad8890cd2744a"/>
+< <gd:name>
+< <gd:fullName>Toby</gd:fullName>
+< <gd:givenName>Brian</gd:givenName>
+< </gd:name>
+< </entry>
+< <entry gd:etag=""Q3g6eTVSLit7I2A9XRdWFEUDQgE."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/514bdf588ee57f55</id>
+< <updated>2014-11-08T23:32:32.611Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:32:32.611Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title/>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/514bdf588ee57f55"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/514bdf588ee57f55"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/514bdf588ee57f55"/>
+< <gContact:nickname>Test Contact 2</gContact:nickname>
+< </entry>
+< <entry gd:etag=""QnY4fDVSLyt7I2A9XRdWFEUDRgE."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/65834f618a9f8743</id>
+< <updated>2014-11-08T23:25:53.834Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:25:53.834Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>Toby</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/65834f618a9f8743"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/65834f618a9f8743"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/65834f618a9f8743"/>
+< <gd:name>
+< <gd:fullName>Toby</gd:fullName>
+< <gd:givenName>Brian</gd:givenName>
+< </gd:name>
+< </entry>
+< <entry gd:etag=""Rn4-ezVSLit7I2A9Wh9XGUwCQgw."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/6754f9cf8cbc042d</id>
+< <updated>2014-03-15T21:23:07.053Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:23:07.053Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>A</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/6754f9cf8cbc042d"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/6754f9cf8cbc042d"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/6754f9cf8cbc042d"/>
+< <gd:name>
+< <gd:fullName>A</gd:fullName>
+< <gd:givenName>A</gd:givenName>
+< </gd:name>
+< <gContact:fileAs>A</gContact:fileAs>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6"/>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/4558a0fc0f98a74a"/>
+< <gd:extendedProperty name="X-MOZILLA-HTML">FALSE</gd:extendedProperty>
+< </entry>
+< </feed>
+
--- /dev/null
+> GET /m8/feeds/contacts/default/full HTTP/1.1
+> Soup-Debug-Timestamp: 1415489567
+> Soup-Debug: SoupSession 1 (0x15cd240), SoupMessage 29 (0x7ff43800ec60), SoupSocket 15 (0x7ff4380578b0)
+> Host: www.google.com
+> Authorization: Bearer ya29.uACgkznYPDckPkHNMU2MF2gRNGrNKqsjnalf5jZmQ0jV9jcp297YMiQop53msSbUJi5poX8LolhsSw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415489567
+< Soup-Debug: SoupMessage 29 (0x7ff43800ec60)
+< Expires: Sat, 08 Nov 2014 23:32:47 GMT
+< Date: Sat, 08 Nov 2014 23:32:47 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "Rn08eDVSLyt7I2A9XRdWFEUDQgI."
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml; charset=UTF-8
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Content-Encoding: gzip
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version="1.0" encoding="UTF-8"?>
+< <feed gd:etag=""Rn08eDVSLyt7I2A9XRdWFEUDQgI."" xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/">
+< <id>libgdata.test@googlemail.com</id>
+< <updated>2014-11-08T23:32:47.370Z</updated>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>GData Test's Contacts</title>
+< <link rel="alternate" type="text/html" href="https://www.google.com/"/>
+< <link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full"/>
+< <link rel="http://schemas.google.com/g/2005#post" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full"/>
+< <link rel="http://schemas.google.com/g/2005#batch" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/batch"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full?max-results=25"/>
+< <author>
+< <name>GData Test</name>
+< <email>libgdata.test@googlemail.com</email>
+< </author>
+< <generator version="1.0" uri="http://www.google.com/m8/feeds">Contacts</generator>
+< <openSearch:totalResults>16</openSearch:totalResults>
+< <openSearch:startIndex>1</openSearch:startIndex>
+< <openSearch:itemsPerPage>25</openSearch:itemsPerPage>
+< <entry gd:etag=""Q3gzejVSLyt7I2A9Wh9XGUwCQAY."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/a86b08c4621c7</id>
+< <updated>2014-03-15T21:25:22.682Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:25:22.682Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>AA</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/a86b08c4621c7"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/a86b08c4621c7"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/a86b08c4621c7"/>
+< <gd:name>
+< <gd:fullName>AA</gd:fullName>
+< <gd:givenName>AA</gd:givenName>
+< </gd:name>
+< <gContact:fileAs>AA</gContact:fileAs>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6"/>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/5a5615828e8c12dc"/>
+< <gd:extendedProperty name="X-MOZILLA-HTML">FALSE</gd:extendedProperty>
+< </entry>
+< <entry gd:etag=""QH47ezVSLit7I2A9XRdWFEUDQgI."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/e122bb38b3b8e3d</id>
+< <updated>2014-11-08T23:32:41.003Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:32:41.003Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title/>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/e122bb38b3b8e3d"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/e122bb38b3b8e3d"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/e122bb38b3b8e3d"/>
+< <gContact:nickname>Test Contact 3</gContact:nickname>
+< </entry>
+< <entry gd:etag=""RHc4fzVSLit7I2A9Wh9VF0oPQAU."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/1848d1b50ceff503</id>
+< <updated>2014-04-06T09:15:15.937Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-04-06T09:15:15.937Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>Test Mcfoobar</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/1848d1b50ceff503"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1848d1b50ceff503"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1848d1b50ceff503"/>
+< <gd:name>
+< <gd:fullName>Test Mcfoobar</gd:fullName>
+< <gd:givenName>Test</gd:givenName>
+< <gd:familyName>Mcfoobar</gd:familyName>
+< </gd:name>
+< <gContact:fileAs>Mcfoobar, Test</gContact:fileAs>
+< <gd:email rel="http://schemas.google.com/g/2005#work" address="test1@example.com" primary="true"/>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6"/>
+< <gd:extendedProperty name="X-MOZILLA-HTML">FALSE</gd:extendedProperty>
+< </entry>
+< <entry gd:etag=""R34zezVSLit7I2A9XRdWFEUDRQY."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/186ec44a0fc1ca9d</id>
+< <updated>2014-11-08T23:27:06.083Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:27:06.083Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>John Wilson</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/186ec44a0fc1ca9d"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/186ec44a0fc1ca9d"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/186ec44a0fc1ca9d"/>
+< <gd:name>
+< <gd:fullName>John Wilson</gd:fullName>
+< <gd:givenName>John</gd:givenName>
+< <gd:familyName>Wilson</gd:familyName>
+< </gd:name>
+< <gContact:nickname>Test Contact Esq.</gContact:nickname>
+< <gd:extendedProperty name="contact-test">value</gd:extendedProperty>
+< </entry>
+< <entry gd:etag=""QXgzeTVSLit7I2A9XRdWFEUDQgI."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/1b017a9e0aab84a8</id>
+< <updated>2014-11-08T23:32:40.681Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:32:40.681Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title/>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/1b017a9e0aab84a8"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1b017a9e0aab84a8"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1b017a9e0aab84a8"/>
+< <gContact:nickname>Test Contact 2</gContact:nickname>
+< </entry>
+< <entry gd:etag=""RX0-cDVSLit7I2A9XRdWFEUDRgE."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/1ebe29f48b9167e1</id>
+< <updated>2014-11-08T23:25:54.358Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:25:54.358Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>John Smith</title>
+< <content>Notes</content>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/1ebe29f48b9167e1"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1ebe29f48b9167e1"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1ebe29f48b9167e1"/>
+< <gd:name>
+< <gd:fullName>John Smith</gd:fullName>
+< <gd:givenName>John</gd:givenName>
+< <gd:familyName>Smith</gd:familyName>
+< </gd:name>
+< <gContact:nickname>Big J</gContact:nickname>
+< <gContact:initials>A. B. C.</gContact:initials>
+< <gContact:shortName>Jon</gContact:shortName>
+< <gContact:maidenName>Smith</gContact:maidenName>
+< <gContact:gender value="male"/>
+< <gContact:birthday when="--01-01"/>
+< <gContact:occupation>Professional bum</gContact:occupation>
+< <gContact:billingInformation>Big J Enterprises, Ltd.</gContact:billingInformation>
+< <gContact:mileage>12km</gContact:mileage>
+< <gContact:directoryServer>This is a server</gContact:directoryServer>
+< <gContact:subject>Charity work</gContact:subject>
+< <gContact:fileAs>J, Big</gContact:fileAs>
+< <gd:organization rel="http://schemas.google.com/g/2005#work">
+< <gd:orgName>OrgCorp</gd:orgName>
+< <gd:orgTitle>President</gd:orgTitle>
+< </gd:organization>
+< <gd:email rel="http://schemas.google.com/g/2005#work" address="liz@gmail.com"/>
+< <gd:email rel="http://schemas.google.com/g/2005#home" address="liz@example.org"/>
+< <gd:im address="liz@gmail.com" protocol="http://schemas.google.com/g/2005#GOOGLE_TALK" rel="http://schemas.google.com/g/2005#home"/>
+< <gd:phoneNumber rel="http://schemas.google.com/g/2005#work" primary="true">(206)555-1212</gd:phoneNumber>
+< <gd:phoneNumber rel="http://schemas.google.com/g/2005#home">(206)555-1213</gd:phoneNumber>
+< <gd:structuredPostalAddress rel="http://schemas.google.com/g/2005#work" primary="true">
+< <gd:formattedAddress>1600 Amphitheatre Pkwy Mountain View</gd:formattedAddress>
+< <gd:street>1600 Amphitheatre Pkwy Mountain View</gd:street>
+< </gd:structuredPostalAddress>
+< <gContact:event rel="anniversary">
+< <gd:when startTime="1900-01-01"/>
+< </gContact:event>
+< <gContact:externalId rel="organization" value="Number Six"/>
+< <gContact:relation rel="friend">Brian Haddock</gContact:relation>
+< <gContact:userDefinedField key="Favourite colour" value="Blue"/>
+< <gContact:userDefinedField key="My notes" value=""/>
+< <gContact:userDefinedField key="Owes me" value="£10"/>
+< <gContact:userDefinedField key="" value="Foo"/>
+< <gContact:website href="http://example.com/" primary="true" rel="profile"/>
+< <gContact:calendarLink primary="true" href="http://calendar.example.com/" rel="home"/>
+< <gContact:language code="en-GB"/>
+< <gContact:jot rel="other">This is a jot.</gContact:jot>
+< <gContact:hobby>Rowing</gContact:hobby>
+< <gd:extendedProperty name="CALURI">http://example.com/</gd:extendedProperty>
+< </entry>
+< <entry gd:etag=""QH48fzVSLit7I2A9XRdWFEUDQgc."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/1fe897fa0c51ed2c</id>
+< <updated>2014-11-08T23:32:11.077Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:32:11.077Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>Toby</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/1fe897fa0c51ed2c"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1fe897fa0c51ed2c"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1fe897fa0c51ed2c"/>
+< <gd:name>
+< <gd:fullName>Toby</gd:fullName>
+< <gd:givenName>Brian</gd:givenName>
+< </gd:name>
+< </entry>
+< <entry gd:etag=""Qn0zcDVSLit7I2A9Wh9XGUwCQAA."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/2f943d4789cb93a9</id>
+< <updated>2014-03-15T21:25:43.388Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:25:43.388Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>AAA</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/2f943d4789cb93a9"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/2f943d4789cb93a9"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/2f943d4789cb93a9"/>
+< <gd:name>
+< <gd:fullName>AAA</gd:fullName>
+< <gd:givenName>AAA</gd:givenName>
+< </gd:name>
+< <gContact:fileAs>AAA</gContact:fileAs>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6"/>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/7b25d4e38c3f32b5"/>
+< <gd:extendedProperty name="X-MOZILLA-HTML">FALSE</gd:extendedProperty>
+< </entry>
+< <entry gd:etag=""SX89cTVSLit7I2A9Wh9XGUwCQg0."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/3531fe820d6801f3</id>
+< <updated>2014-03-15T21:23:18.169Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:23:18.169Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>AAAA</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/3531fe820d6801f3"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/3531fe820d6801f3"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/3531fe820d6801f3"/>
+< <gd:name>
+< <gd:fullName>AAAA</gd:fullName>
+< <gd:givenName>AAAA</gd:givenName>
+< </gd:name>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/115d0c4d0cd6f616"/>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6"/>
+< </entry>
+< <entry gd:etag=""RXY5fDVSLit7I2A9XRdWFEUCTgc."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/37c76f0508bed31f</id>
+< <updated>2014-11-08T23:22:14.824Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:22:14.824Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>John Smith</title>
+< <content>Notes</content>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/37c76f0508bed31f"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/37c76f0508bed31f"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/37c76f0508bed31f"/>
+< <gd:name>
+< <gd:fullName>John Smith</gd:fullName>
+< <gd:givenName>John</gd:givenName>
+< <gd:familyName>Smith</gd:familyName>
+< </gd:name>
+< <gContact:nickname>Big J</gContact:nickname>
+< <gContact:initials>A. B. C.</gContact:initials>
+< <gContact:shortName>Jon</gContact:shortName>
+< <gContact:maidenName>Smith</gContact:maidenName>
+< <gContact:gender value="male"/>
+< <gContact:birthday when="--01-01"/>
+< <gContact:occupation>Professional bum</gContact:occupation>
+< <gContact:billingInformation>Big J Enterprises, Ltd.</gContact:billingInformation>
+< <gContact:mileage>12km</gContact:mileage>
+< <gContact:directoryServer>This is a server</gContact:directoryServer>
+< <gContact:subject>Charity work</gContact:subject>
+< <gContact:fileAs>J, Big</gContact:fileAs>
+< <gd:organization rel="http://schemas.google.com/g/2005#work">
+< <gd:orgName>OrgCorp</gd:orgName>
+< <gd:orgTitle>President</gd:orgTitle>
+< </gd:organization>
+< <gd:email rel="http://schemas.google.com/g/2005#work" address="liz@gmail.com"/>
+< <gd:email rel="http://schemas.google.com/g/2005#home" address="liz@example.org"/>
+< <gd:im address="liz@gmail.com" protocol="http://schemas.google.com/g/2005#GOOGLE_TALK" rel="http://schemas.google.com/g/2005#home"/>
+< <gd:phoneNumber rel="http://schemas.google.com/g/2005#work" primary="true">(206)555-1212</gd:phoneNumber>
+< <gd:phoneNumber rel="http://schemas.google.com/g/2005#home">(206)555-1213</gd:phoneNumber>
+< <gd:structuredPostalAddress rel="http://schemas.google.com/g/2005#work" primary="true">
+< <gd:formattedAddress>1600 Amphitheatre Pkwy Mountain View</gd:formattedAddress>
+< <gd:street>1600 Amphitheatre Pkwy Mountain View</gd:street>
+< </gd:structuredPostalAddress>
+< <gContact:event rel="anniversary">
+< <gd:when startTime="1900-01-01"/>
+< </gContact:event>
+< <gContact:externalId rel="organization" value="Number Six"/>
+< <gContact:relation rel="friend">Brian Haddock</gContact:relation>
+< <gContact:userDefinedField key="Favourite colour" value="Blue"/>
+< <gContact:userDefinedField key="My notes" value=""/>
+< <gContact:userDefinedField key="Owes me" value="£10"/>
+< <gContact:userDefinedField key="" value="Foo"/>
+< <gContact:website href="http://example.com/" primary="true" rel="profile"/>
+< <gContact:calendarLink primary="true" href="http://calendar.example.com/" rel="home"/>
+< <gContact:language code="en-GB"/>
+< <gContact:jot rel="other">This is a jot.</gContact:jot>
+< <gContact:hobby>Rowing</gContact:hobby>
+< <gd:extendedProperty name="CALURI">http://example.com/</gd:extendedProperty>
+< </entry>
+< <entry gd:etag=""Rns7eDVSLyt7I2A9Wh9XGUwCQAI."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/3b0b0e8c8d6c81ef</id>
+< <updated>2014-03-15T21:26:07.500Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:26:07.500Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>AAAAA</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/3b0b0e8c8d6c81ef"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/3b0b0e8c8d6c81ef"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/3b0b0e8c8d6c81ef"/>
+< <gd:name>
+< <gd:fullName>AAAAA</gd:fullName>
+< <gd:givenName>AAAAA</gd:givenName>
+< </gd:name>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6"/>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/5aa4ff9a0de39ade"/>
+< </entry>
+< <entry gd:etag=""RXs4ejVSLit7I2A9XRdWFEUDRQU."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/415b6675090874ea</id>
+< <updated>2014-11-08T23:26:54.532Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:26:54.532Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>Toby</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/415b6675090874ea"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/415b6675090874ea"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/415b6675090874ea"/>
+< <gd:name>
+< <gd:fullName>Toby</gd:fullName>
+< <gd:givenName>Brian</gd:givenName>
+< </gd:name>
+< </entry>
+< <entry gd:etag=""Qnc4fjVSLit7I2A9XRdWFEUCTgc."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/505ad8890cd2744a</id>
+< <updated>2014-11-08T23:22:13.936Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:22:13.936Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>Toby</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/505ad8890cd2744a"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/505ad8890cd2744a"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/505ad8890cd2744a"/>
+< <gd:name>
+< <gd:fullName>Toby</gd:fullName>
+< <gd:givenName>Brian</gd:givenName>
+< </gd:name>
+< </entry>
+< <entry gd:etag=""QX49cDVSLit7I2A9XRdWFEUDQgI."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/63644dd68c0e95be</id>
+< <updated>2014-11-08T23:32:40.068Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:32:40.068Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title/>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/63644dd68c0e95be"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/63644dd68c0e95be"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/63644dd68c0e95be"/>
+< <gContact:nickname>Test Contact 1</gContact:nickname>
+< </entry>
+< <entry gd:etag=""QnY4fDVSLyt7I2A9XRdWFEUDRgE."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/65834f618a9f8743</id>
+< <updated>2014-11-08T23:25:53.834Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:25:53.834Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>Toby</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/65834f618a9f8743"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/65834f618a9f8743"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/65834f618a9f8743"/>
+< <gd:name>
+< <gd:fullName>Toby</gd:fullName>
+< <gd:givenName>Brian</gd:givenName>
+< </gd:name>
+< </entry>
+< <entry gd:etag=""Rn4-ezVSLit7I2A9Wh9XGUwCQgw."">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/6754f9cf8cbc042d</id>
+< <updated>2014-03-15T21:23:07.053Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:23:07.053Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>A</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/6754f9cf8cbc042d"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/6754f9cf8cbc042d"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/6754f9cf8cbc042d"/>
+< <gd:name>
+< <gd:fullName>A</gd:fullName>
+< <gd:givenName>A</gd:givenName>
+< </gd:name>
+< <gContact:fileAs>A</gContact:fileAs>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6"/>
+< <gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/4558a0fc0f98a74a"/>
+< <gd:extendedProperty name="X-MOZILLA-HTML">FALSE</gd:extendedProperty>
+< </entry>
+< </feed>
+
--- /dev/null
+> GET /m8/feeds/groups/default/full HTTP/1.1
+> Soup-Debug-Timestamp: 1415490515
+> Soup-Debug: SoupSession 1 (0x1c05240), SoupMessage 27 (0x7f451000f0e0), SoupSocket 14 (0x7f4510044d00)
+> Host: www.google.com
+> Authorization: Bearer ya29.uAB1RRhn3TKLPSfFZeRgrzf68-Gb9tby5F20urDCBwC6B94UqINs1Hvh_iKX3FagPwd0QkLnrSyVRw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415490515
+< Soup-Debug: SoupMessage 27 (0x7f451000f0e0)
+< Expires: Sat, 08 Nov 2014 23:48:35 GMT
+< Date: Sat, 08 Nov 2014 23:48:35 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "RHo5fjVSLyt7I2A9XRdWFEQKQgU."
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml; charset=UTF-8
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Content-Encoding: gzip
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version="1.0" encoding="UTF-8"?>
+< <feed gd:etag=""RHo5fjVSLyt7I2A9XRdWFEQKQgU."" xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/">
+< <id>libgdata.test@googlemail.com</id>
+< <updated>2014-11-08T23:48:35.426Z</updated>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>GData Test's Contact Groups</title>
+< <link rel="alternate" type="text/html" href="https://www.google.com/"/>
+< <link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full"/>
+< <link rel="http://schemas.google.com/g/2005#post" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full"/>
+< <link rel="http://schemas.google.com/g/2005#batch" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/batch"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full?max-results=25"/>
+< <author>
+< <name>GData Test</name>
+< <email>libgdata.test@googlemail.com</email>
+< </author>
+< <generator version="1.0" uri="http://www.google.com/m8/feeds">Contacts</generator>
+< <openSearch:totalResults>12</openSearch:totalResults>
+< <openSearch:startIndex>1</openSearch:startIndex>
+< <openSearch:itemsPerPage>25</openSearch:itemsPerPage>
+< <entry gd:etag=""YDwreyM."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6</id>
+< <updated>1970-01-01T00:00:00.000Z</updated>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>System Group: My Contacts</title>
+< <content>System Group: My Contacts</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/6"/>
+< <gContact:systemGroup id="Contacts"/>
+< </entry>
+< <entry gd:etag=""YDwreyM."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/d</id>
+< <updated>1970-01-01T00:00:00.000Z</updated>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>System Group: Friends</title>
+< <content>System Group: Friends</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/d"/>
+< <gContact:systemGroup id="Friends"/>
+< </entry>
+< <entry gd:etag=""YDwreyM."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/e</id>
+< <updated>1970-01-01T00:00:00.000Z</updated>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>System Group: Family</title>
+< <content>System Group: Family</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/e"/>
+< <gContact:systemGroup id="Family"/>
+< </entry>
+< <entry gd:etag=""YDwreyM."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/f</id>
+< <updated>1970-01-01T00:00:00.000Z</updated>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>System Group: Coworkers</title>
+< <content>System Group: Coworkers</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/f"/>
+< <gContact:systemGroup id="Coworkers"/>
+< </entry>
+< <entry gd:etag=""RXs-eTVSLit7I2A9XRdWFEQKQgQ."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/5dce2cb8ad0779c</id>
+< <updated>2014-11-08T23:48:24.551Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:48:24.551Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>Test Group 2</title>
+< <content>Test Group 2</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/5dce2cb8ad0779c"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/5dce2cb8ad0779c"/>
+< </entry>
+< <entry gd:etag=""Qnk-fDVSLit7I2A9XRdWFEQKQgQ."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/cb554230816ff25</id>
+< <updated>2014-11-08T23:48:23.754Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:48:23.754Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>Test Group 1</title>
+< <content>Test Group 1</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/cb554230816ff25"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/cb554230816ff25"/>
+< </entry>
+< <entry gd:etag=""RXg9fTVSLit7I2A9Wh9XGUwNRAc."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/115d0c4d0cd6f616</id>
+< <updated>2014-03-15T21:02:14.665Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:02:14.665Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>D</title>
+< <content>D</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/115d0c4d0cd6f616"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/115d0c4d0cd6f616"/>
+< </entry>
+< <entry gd:etag=""RXc-fzVSLit7I2A9XRdWFEQKQgQ."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/3afd35230e8b293a</id>
+< <updated>2014-11-08T23:48:24.957Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:48:24.957Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>Test Group 3</title>
+< <content>Test Group 3</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/3afd35230e8b293a"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/3afd35230e8b293a"/>
+< </entry>
+< <entry gd:etag=""R3s6ejVSLit7I2A9Wh9XGUwCQgw."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/4558a0fc0f98a74a</id>
+< <updated>2014-03-15T21:23:06.512Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:23:06.512Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>A</title>
+< <content>A</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/4558a0fc0f98a74a"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/4558a0fc0f98a74a"/>
+< </entry>
+< <entry gd:etag=""Q34zeTVSLit7I2A9Wh9XGUwCQAY."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/5a5615828e8c12dc</id>
+< <updated>2014-03-15T21:25:22.081Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:25:22.081Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>B</title>
+< <content>B</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/5a5615828e8c12dc"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/5a5615828e8c12dc"/>
+< </entry>
+< <entry gd:etag=""R3kyfzVSLyt7I2A9Wh9XGUwCQAI."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/5aa4ff9a0de39ade</id>
+< <updated>2014-03-15T21:26:06.797Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:26:06.797Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>E</title>
+< <content>E</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/5aa4ff9a0de39ade"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/5aa4ff9a0de39ade"/>
+< </entry>
+< <entry gd:etag=""Q3Y_fzVSLyt7I2A9Wh9XGUwCQAA."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/7b25d4e38c3f32b5</id>
+< <updated>2014-03-15T21:25:42.847Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:25:42.847Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>C</title>
+< <content>C</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/7b25d4e38c3f32b5"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/7b25d4e38c3f32b5"/>
+< </entry>
+< </feed>
+
--- /dev/null
+> GET /m8/feeds/groups/default/full HTTP/1.1
+> Soup-Debug-Timestamp: 1415490540
+> Soup-Debug: SoupSession 1 (0x1c05240), SoupMessage 43 (0x7f451000f590), SoupSocket 21 (0x7f4510044ea0)
+> Host: www.google.com
+> Authorization: Bearer ya29.uAB1RRhn3TKLPSfFZeRgrzf68-Gb9tby5F20urDCBwC6B94UqINs1Hvh_iKX3FagPwd0QkLnrSyVRw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415490541
+< Soup-Debug: SoupMessage 43 (0x7f451000f590)
+< Expires: Sat, 08 Nov 2014 23:49:01 GMT
+< Date: Sat, 08 Nov 2014 23:49:01 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "QH44ejVSLyt7I2A9XRdWFEQKQgA."
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml; charset=UTF-8
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Content-Encoding: gzip
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version="1.0" encoding="UTF-8"?>
+< <feed gd:etag=""QH44ejVSLyt7I2A9XRdWFEQKQgA."" xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/">
+< <id>libgdata.test@googlemail.com</id>
+< <updated>2014-11-08T23:49:01.032Z</updated>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>GData Test's Contact Groups</title>
+< <link rel="alternate" type="text/html" href="https://www.google.com/"/>
+< <link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full"/>
+< <link rel="http://schemas.google.com/g/2005#post" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full"/>
+< <link rel="http://schemas.google.com/g/2005#batch" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/batch"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full?max-results=25"/>
+< <author>
+< <name>GData Test</name>
+< <email>libgdata.test@googlemail.com</email>
+< </author>
+< <generator version="1.0" uri="http://www.google.com/m8/feeds">Contacts</generator>
+< <openSearch:totalResults>12</openSearch:totalResults>
+< <openSearch:startIndex>1</openSearch:startIndex>
+< <openSearch:itemsPerPage>25</openSearch:itemsPerPage>
+< <entry gd:etag=""YDwreyM."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/6</id>
+< <updated>1970-01-01T00:00:00.000Z</updated>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>System Group: My Contacts</title>
+< <content>System Group: My Contacts</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/6"/>
+< <gContact:systemGroup id="Contacts"/>
+< </entry>
+< <entry gd:etag=""YDwreyM."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/d</id>
+< <updated>1970-01-01T00:00:00.000Z</updated>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>System Group: Friends</title>
+< <content>System Group: Friends</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/d"/>
+< <gContact:systemGroup id="Friends"/>
+< </entry>
+< <entry gd:etag=""YDwreyM."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/e</id>
+< <updated>1970-01-01T00:00:00.000Z</updated>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>System Group: Family</title>
+< <content>System Group: Family</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/e"/>
+< <gContact:systemGroup id="Family"/>
+< </entry>
+< <entry gd:etag=""YDwreyM."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/f</id>
+< <updated>1970-01-01T00:00:00.000Z</updated>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>System Group: Coworkers</title>
+< <content>System Group: Coworkers</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/f"/>
+< <gContact:systemGroup id="Coworkers"/>
+< </entry>
+< <entry gd:etag=""RXg9fTVSLit7I2A9Wh9XGUwNRAc."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/115d0c4d0cd6f616</id>
+< <updated>2014-03-15T21:02:14.665Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:02:14.665Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>D</title>
+< <content>D</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/115d0c4d0cd6f616"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/115d0c4d0cd6f616"/>
+< </entry>
+< <entry gd:etag=""SHY4cTVSLit7I2A9XRdWFEQKQgY."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/3bc435e78bb3779c</id>
+< <updated>2014-11-08T23:48:49.839Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:48:49.839Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>Test Group 3</title>
+< <content>Test Group 3</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/3bc435e78bb3779c"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/3bc435e78bb3779c"/>
+< </entry>
+< <entry gd:etag=""R3s6ejVSLit7I2A9Wh9XGUwCQgw."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/4558a0fc0f98a74a</id>
+< <updated>2014-03-15T21:23:06.512Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:23:06.512Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>A</title>
+< <content>A</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/4558a0fc0f98a74a"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/4558a0fc0f98a74a"/>
+< </entry>
+< <entry gd:etag=""SH44ejVSLit7I2A9XRdWFEQKQgY."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/53135b0d89099ac5</id>
+< <updated>2014-11-08T23:48:49.032Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:48:49.032Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>Test Group 1</title>
+< <content>Test Group 1</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/53135b0d89099ac5"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/53135b0d89099ac5"/>
+< </entry>
+< <entry gd:etag=""Q34zeTVSLit7I2A9Wh9XGUwCQAY."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/5a5615828e8c12dc</id>
+< <updated>2014-03-15T21:25:22.081Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:25:22.081Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>B</title>
+< <content>B</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/5a5615828e8c12dc"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/5a5615828e8c12dc"/>
+< </entry>
+< <entry gd:etag=""R3kyfzVSLyt7I2A9Wh9XGUwCQAI."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/5aa4ff9a0de39ade</id>
+< <updated>2014-03-15T21:26:06.797Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:26:06.797Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>E</title>
+< <content>E</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/5aa4ff9a0de39ade"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/5aa4ff9a0de39ade"/>
+< </entry>
+< <entry gd:etag=""SHo7ezVSLit7I2A9XRdWFEQKQgY."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/732309600b1cf616</id>
+< <updated>2014-11-08T23:48:49.403Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:48:49.403Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>Test Group 2</title>
+< <content>Test Group 2</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/732309600b1cf616"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/732309600b1cf616"/>
+< </entry>
+< <entry gd:etag=""Q3Y_fzVSLyt7I2A9Wh9XGUwCQAA."">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/7b25d4e38c3f32b5</id>
+< <updated>2014-03-15T21:25:42.847Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-03-15T21:25:42.847Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>C</title>
+< <content>C</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/7b25d4e38c3f32b5"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/7b25d4e38c3f32b5"/>
+< </entry>
+< </feed>
+
--- /dev/null
+> POST /m8/feeds/contacts/default/full HTTP/1.1
+> Soup-Debug-Timestamp: 1415490479
+> Soup-Debug: SoupSession 1 (0x1c05240), SoupMessage 13 (0x1ce90d0), SoupSocket 7 (0x1e32c40)
+> Host: www.google.com
+> Authorization: Bearer ya29.uAB1RRhn3TKLPSfFZeRgrzf68-Gb9tby5F20urDCBwC6B94UqINs1Hvh_iKX3FagPwd0QkLnrSyVRw
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' xmlns:gd='http://schemas.google.com/g/2005' xmlns:app='http://www.w3.org/2007/app'><title type='text'>Fooish Bar</title><category term='http://schemas.google.com/contact/2008#contact' scheme='http://schemas.google.com/g/2005#kind'/><gd:name><gd:fullName>Fooish Bar</gd:fullName></gd:name></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1415490479
+< Soup-Debug: SoupMessage 13 (0x1ce90d0)
+< ETag: "SHk8cTVSLit7I2A9XRdWFEQKQwM."
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml; charset=UTF-8
+< Date: Sat, 08 Nov 2014 23:47:59 GMT
+< Expires: Sat, 08 Nov 2014 23:47:59 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Content-Encoding: gzip
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version="1.0" encoding="UTF-8"?>
+< <entry gd:etag=""SHk8cTVSLit7I2A9XRdWFEQKQwM."" xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/702a2a2988f4835f</id>
+< <updated>2014-11-08T23:47:59.779Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:47:59.779Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title>Fooish Bar</title>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/702a2a2988f4835f"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/702a2a2988f4835f"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/702a2a2988f4835f"/>
+< <gd:name>
+< <gd:fullName>Fooish Bar</gd:fullName>
+< <gd:givenName>Fooish</gd:givenName>
+< <gd:familyName>Bar</gd:familyName>
+< </gd:name>
+< </entry>
+
--- /dev/null
+> POST /m8/feeds/contacts/default/full HTTP/1.1
+> Soup-Debug-Timestamp: 1415489568
+> Soup-Debug: SoupSession 1 (0x15cd240), SoupMessage 33 (0x182f550), SoupSocket 16 (0x18d5a70)
+> Host: www.google.com
+> Authorization: Bearer ya29.uACgkznYPDckPkHNMU2MF2gRNGrNKqsjnalf5jZmQ0jV9jcp297YMiQop53msSbUJi5poX8LolhsSw
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' xmlns:gd='http://schemas.google.com/g/2005' xmlns:app='http://www.w3.org/2007/app'><title type='text'></title><category term='http://schemas.google.com/contact/2008#contact' scheme='http://schemas.google.com/g/2005#kind'/><gd:name/><gContact:nickname>Test Contact 1</gContact:nickname></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1415489568
+< Soup-Debug: SoupMessage 33 (0x182f550)
+< ETag: "SXszcTVSLit7I2A9XRdWFEUDQgI."
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml; charset=UTF-8
+< Date: Sat, 08 Nov 2014 23:32:48 GMT
+< Expires: Sat, 08 Nov 2014 23:32:48 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Content-Encoding: gzip
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version="1.0" encoding="UTF-8"?>
+< <entry gd:etag=""SXszcTVSLit7I2A9XRdWFEUDQgI."" xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/1fb657e58c9a2eb9</id>
+< <updated>2014-11-08T23:32:48.589Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:32:48.589Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title/>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/1fb657e58c9a2eb9"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1fb657e58c9a2eb9"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/1fb657e58c9a2eb9"/>
+< <gContact:nickname>Test Contact 1</gContact:nickname>
+< </entry>
+
+> POST /m8/feeds/contacts/default/full HTTP/1.1
+> Soup-Debug-Timestamp: 1415489568
+> Soup-Debug: SoupSession 1 (0x15cd240), SoupMessage 34 (0x182f460), SoupSocket 17 (0x7ff4380578b0)
+> Host: www.google.com
+> Authorization: Bearer ya29.uACgkznYPDckPkHNMU2MF2gRNGrNKqsjnalf5jZmQ0jV9jcp297YMiQop53msSbUJi5poX8LolhsSw
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' xmlns:gd='http://schemas.google.com/g/2005' xmlns:app='http://www.w3.org/2007/app'><title type='text'></title><category term='http://schemas.google.com/contact/2008#contact' scheme='http://schemas.google.com/g/2005#kind'/><gd:name/><gContact:nickname>Test Contact 2</gContact:nickname></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1415489569
+< Soup-Debug: SoupMessage 34 (0x182f460)
+< ETag: "SXY_fjVSLit7I2A9XRdWFEUDQgI."
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml; charset=UTF-8
+< Date: Sat, 08 Nov 2014 23:32:49 GMT
+< Expires: Sat, 08 Nov 2014 23:32:49 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Content-Encoding: gzip
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version="1.0" encoding="UTF-8"?>
+< <entry gd:etag=""SXY_fjVSLit7I2A9XRdWFEUDQgI."" xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/10ba35c58c59d676</id>
+< <updated>2014-11-08T23:32:48.846Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:32:48.846Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title/>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/10ba35c58c59d676"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/10ba35c58c59d676"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/10ba35c58c59d676"/>
+< <gContact:nickname>Test Contact 2</gContact:nickname>
+< </entry>
+
+> POST /m8/feeds/contacts/default/full HTTP/1.1
+> Soup-Debug-Timestamp: 1415489569
+> Soup-Debug: SoupSession 1 (0x15cd240), SoupMessage 35 (0x182f370), SoupSocket 18 (0x7ff438057cc0)
+> Host: www.google.com
+> Authorization: Bearer ya29.uACgkznYPDckPkHNMU2MF2gRNGrNKqsjnalf5jZmQ0jV9jcp297YMiQop53msSbUJi5poX8LolhsSw
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' xmlns:gd='http://schemas.google.com/g/2005' xmlns:app='http://www.w3.org/2007/app'><title type='text'></title><category term='http://schemas.google.com/contact/2008#contact' scheme='http://schemas.google.com/g/2005#kind'/><gd:name/><gContact:nickname>Test Contact 3</gContact:nickname></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1415489569
+< Soup-Debug: SoupMessage 35 (0x182f370)
+< ETag: "SHo5fTVSLSt7I2A9XRdWFEUDQgI."
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml; charset=UTF-8
+< Date: Sat, 08 Nov 2014 23:32:49 GMT
+< Expires: Sat, 08 Nov 2014 23:32:49 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Content-Encoding: gzip
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version="1.0" encoding="UTF-8"?>
+< <entry gd:etag=""SHo5fTVSLSt7I2A9XRdWFEUDQgI."" xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/5997be300d23115b</id>
+< <updated>2014-11-08T23:32:49.425Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:32:49.425Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title/>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/5997be300d23115b"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/5997be300d23115b"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/5997be300d23115b"/>
+< <gContact:nickname>Test Contact 3</gContact:nickname>
+< </entry>
+
--- /dev/null
+> POST /m8/feeds/groups/default/full HTTP/1.1
+> Soup-Debug-Timestamp: 1415490528
+> Soup-Debug: SoupSession 1 (0x1c05240), SoupMessage 38 (0x1ce91c0), SoupSocket 18 (0x1e329d0)
+> Host: www.google.com
+> Authorization: Bearer ya29.uAB1RRhn3TKLPSfFZeRgrzf68-Gb9tby5F20urDCBwC6B94UqINs1Hvh_iKX3FagPwd0QkLnrSyVRw
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' xmlns:gd='http://schemas.google.com/g/2005' xmlns:app='http://www.w3.org/2007/app'><title type='text'>Test Group 1</title><content type='text'>Test Group 1</content><category term='http://schemas.google.com/contact/2008#group' scheme='http://schemas.google.com/g/2005#kind'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1415490529
+< Soup-Debug: SoupMessage 38 (0x1ce91c0)
+< ETag: "SH44ejVSLit7I2A9XRdWFEQKQgY."
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml; charset=UTF-8
+< Date: Sat, 08 Nov 2014 23:48:49 GMT
+< Expires: Sat, 08 Nov 2014 23:48:49 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Content-Encoding: gzip
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version="1.0" encoding="UTF-8"?>
+< <entry gd:etag=""SH44ejVSLit7I2A9XRdWFEQKQgY."" xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/53135b0d89099ac5</id>
+< <updated>2014-11-08T23:48:49.032Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:48:49.032Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>Test Group 1</title>
+< <content>Test Group 1</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/53135b0d89099ac5"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/53135b0d89099ac5"/>
+< </entry>
+
+> POST /m8/feeds/groups/default/full HTTP/1.1
+> Soup-Debug-Timestamp: 1415490529
+> Soup-Debug: SoupSession 1 (0x1c05240), SoupMessage 39 (0x1ce90d0), SoupSocket 19 (0x1d6ea70)
+> Host: www.google.com
+> Authorization: Bearer ya29.uAB1RRhn3TKLPSfFZeRgrzf68-Gb9tby5F20urDCBwC6B94UqINs1Hvh_iKX3FagPwd0QkLnrSyVRw
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' xmlns:gd='http://schemas.google.com/g/2005' xmlns:app='http://www.w3.org/2007/app'><title type='text'>Test Group 2</title><content type='text'>Test Group 2</content><category term='http://schemas.google.com/contact/2008#group' scheme='http://schemas.google.com/g/2005#kind'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1415490529
+< Soup-Debug: SoupMessage 39 (0x1ce90d0)
+< ETag: "SHo7ezVSLit7I2A9XRdWFEQKQgY."
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml; charset=UTF-8
+< Date: Sat, 08 Nov 2014 23:48:49 GMT
+< Expires: Sat, 08 Nov 2014 23:48:49 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Content-Encoding: gzip
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version="1.0" encoding="UTF-8"?>
+< <entry gd:etag=""SHo7ezVSLit7I2A9XRdWFEQKQgY."" xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/732309600b1cf616</id>
+< <updated>2014-11-08T23:48:49.403Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:48:49.403Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>Test Group 2</title>
+< <content>Test Group 2</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/732309600b1cf616"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/732309600b1cf616"/>
+< </entry>
+
+> POST /m8/feeds/groups/default/full HTTP/1.1
+> Soup-Debug-Timestamp: 1415490529
+> Soup-Debug: SoupSession 1 (0x1c05240), SoupMessage 40 (0x1ce90d0), SoupSocket 20 (0x1d6e9a0)
+> Host: www.google.com
+> Authorization: Bearer ya29.uAB1RRhn3TKLPSfFZeRgrzf68-Gb9tby5F20urDCBwC6B94UqINs1Hvh_iKX3FagPwd0QkLnrSyVRw
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' xmlns:gd='http://schemas.google.com/g/2005' xmlns:app='http://www.w3.org/2007/app'><title type='text'>Test Group 3</title><content type='text'>Test Group 3</content><category term='http://schemas.google.com/contact/2008#group' scheme='http://schemas.google.com/g/2005#kind'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1415490530
+< Soup-Debug: SoupMessage 40 (0x1ce90d0)
+< ETag: "SHY4cTVSLit7I2A9XRdWFEQKQgY."
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml; charset=UTF-8
+< Date: Sat, 08 Nov 2014 23:48:50 GMT
+< Expires: Sat, 08 Nov 2014 23:48:50 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Content-Encoding: gzip
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version="1.0" encoding="UTF-8"?>
+< <entry gd:etag=""SHY4cTVSLit7I2A9XRdWFEQKQgY."" xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005">
+< <id>http://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/base/3bc435e78bb3779c</id>
+< <updated>2014-11-08T23:48:49.839Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:48:49.839Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
+< <title>Test Group 3</title>
+< <content>Test Group 3</content>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/3bc435e78bb3779c"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/groups/libgdata.test%40googlemail.com/full/3bc435e78bb3779c"/>
+< </entry>
+
--- /dev/null
+> POST /m8/feeds/contacts/default/full HTTP/1.1
+> Soup-Debug-Timestamp: 1415490456
+> Soup-Debug: SoupSession 1 (0x1c05240), SoupMessage 4 (0x1ce9490), SoupSocket 4 (0x1e32b70)
+> Host: www.google.com
+> Authorization: Bearer ya29.uAB1RRhn3TKLPSfFZeRgrzf68-Gb9tby5F20urDCBwC6B94UqINs1Hvh_iKX3FagPwd0QkLnrSyVRw
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' xmlns:gd='http://schemas.google.com/g/2005' xmlns:app='http://www.w3.org/2007/app'><title type='text'></title><category term='http://schemas.google.com/contact/2008#contact' scheme='http://schemas.google.com/g/2005#kind'/><gd:name/><gContact:nickname>Test Contact Esq.</gContact:nickname></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1415490456
+< Soup-Debug: SoupMessage 4 (0x1ce9490)
+< ETag: "R3gzezVSLit7I2A9XRdWFEQKQwE."
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml; charset=UTF-8
+< Date: Sat, 08 Nov 2014 23:47:36 GMT
+< Expires: Sat, 08 Nov 2014 23:47:36 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Content-Encoding: gzip
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version="1.0" encoding="UTF-8"?>
+< <entry gd:etag=""R3gzezVSLit7I2A9XRdWFEQKQwE."" xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/c8390ec0ef7f98a</id>
+< <updated>2014-11-08T23:47:36.683Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:47:36.683Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title/>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/c8390ec0ef7f98a"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/c8390ec0ef7f98a"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/c8390ec0ef7f98a"/>
+< <gContact:nickname>Test Contact Esq.</gContact:nickname>
+< </entry>
+
--- /dev/null
+> PUT /m8/feeds/photos/media/libgdata.test%40googlemail.com/c8390ec0ef7f98a HTTP/1.1
+> Soup-Debug-Timestamp: 1415490466
+> Soup-Debug: SoupSession 1 (0x1c05240), SoupMessage 5 (0x1ce9580), SoupSocket 4 (0x1e32b70)
+> Host: www.google.com
+> Authorization: Bearer ya29.uAB1RRhn3TKLPSfFZeRgrzf68-Gb9tby5F20urDCBwC6B94UqINs1Hvh_iKX3FagPwd0QkLnrSyVRw
+> GData-Version: 3
+> If-Match: *
+> Content-Type: image/jpeg
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+>
+> ÿØÿà
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415490467
+< Soup-Debug: SoupMessage 5 (0x1ce9580)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< GData-Version: 3.1
+< ETag: "SQpAMGkCSit7I2BKMH8LVi5COFsJDFglViY."
+< Content-Encoding: gzip
+< Date: Sat, 08 Nov 2014 23:47:47 GMT
+< Expires: Sat, 08 Nov 2014 23:47:47 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"SQpAMGkCSit7I2BKMH8LVi5COFsJDFglViY."'><id>http://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/c8390ec0ef7f98a</id><updated>2014-11-08T23:47:46.987Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2014-11-08T23:47:46.987Z</app:edited><link rel='self' type='application/atom+xml' href='https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/c8390ec0ef7f98a'/><link rel='edit' type='application/atom+xml' href='https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/c8390ec0ef7f98a'/></entry>
+
+> GET /m8/feeds/contacts/libgdata.test%40googlemail.com/full/c8390ec0ef7f98a HTTP/1.1
+> Soup-Debug-Timestamp: 1415490477
+> Soup-Debug: SoupSession 1 (0x1c05240), SoupMessage 6 (0x1ce9580), SoupSocket 4 (0x1e32b70)
+> Host: www.google.com
+> Authorization: Bearer ya29.uAB1RRhn3TKLPSfFZeRgrzf68-Gb9tby5F20urDCBwC6B94UqINs1Hvh_iKX3FagPwd0QkLnrSyVRw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415490477
+< Soup-Debug: SoupMessage 6 (0x1ce9580)
+< Expires: Sat, 08 Nov 2014 23:47:57 GMT
+< Date: Sat, 08 Nov 2014 23:47:57 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "R3czfzVSLit7I2A9XRdWFEQKQwI."
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml; charset=UTF-8
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Content-Encoding: gzip
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version="1.0" encoding="UTF-8"?>
+< <entry gd:etag=""R3czfzVSLit7I2A9XRdWFEQKQwI."" xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/c8390ec0ef7f98a</id>
+< <updated>2014-11-08T23:47:46.987Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:47:46.987Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title/>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/c8390ec0ef7f98a" gd:etag=""SQpAMGkCSit7I2BKMH8LVi5COFsJDFglViY.""/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/c8390ec0ef7f98a"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/c8390ec0ef7f98a"/>
+< <gContact:nickname>Test Contact Esq.</gContact:nickname>
+< </entry>
+
--- /dev/null
+> DELETE /m8/feeds/contacts/libgdata.test%40googlemail.com/full/702a2a2988f4835f HTTP/1.1
+> Soup-Debug-Timestamp: 1415490480
+> Soup-Debug: SoupSession 1 (0x1c05240), SoupMessage 14 (0x1ce90d0), SoupSocket 7 (0x1e32c40)
+> Host: www.google.com
+> Authorization: Bearer ya29.uAB1RRhn3TKLPSfFZeRgrzf68-Gb9tby5F20urDCBwC6B94UqINs1Hvh_iKX3FagPwd0QkLnrSyVRw
+> GData-Version: 3
+> If-Match: "SHk8cTVSLit7I2A9XRdWFEQKQwM."
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415490480
+< Soup-Debug: SoupMessage 14 (0x1ce90d0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Sat, 08 Nov 2014 23:48:00 GMT
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=0.01
+<
+
--- /dev/null
+> DELETE /m8/feeds/contacts/libgdata.test%40googlemail.com/full/3d8219568aedc2a9 HTTP/1.1
+> Soup-Debug-Timestamp: 1415489531
+> Soup-Debug: SoupSession 1 (0x15cd240), SoupMessage 5 (0x182f550), SoupSocket 4 (0x18d5c10)
+> Host: www.google.com
+> Authorization: Bearer ya29.uACgkznYPDckPkHNMU2MF2gRNGrNKqsjnalf5jZmQ0jV9jcp297YMiQop53msSbUJi5poX8LolhsSw
+> GData-Version: 3
+> If-Match: "QHo8cDVSLit7I2A9XRdWFEUDQgc."
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415489532
+< Soup-Debug: SoupMessage 5 (0x182f550)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Sat, 08 Nov 2014 23:32:12 GMT
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=0.01
+<
+
--- /dev/null
+> DELETE /m8/feeds/groups/libgdata.test%40googlemail.com/full/6beff9268d4dbc1f HTTP/1.1
+> Soup-Debug-Timestamp: 1415490563
+> Soup-Debug: SoupSession 1 (0x1c05240), SoupMessage 51 (0x1ce9580), SoupSocket 24 (0x7f4510044dd0)
+> Host: www.google.com
+> Authorization: Bearer ya29.uAB1RRhn3TKLPSfFZeRgrzf68-Gb9tby5F20urDCBwC6B94UqINs1Hvh_iKX3FagPwd0QkLnrSyVRw
+> GData-Version: 3
+> If-Match: "Qnw6fzVSLit7I2A9XRdWFEQKQgE."
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415490563
+< Soup-Debug: SoupMessage 51 (0x1ce9580)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Sat, 08 Nov 2014 23:49:23 GMT
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=0.01
+<
+
--- /dev/null
+> DELETE /m8/feeds/contacts/libgdata.test%40googlemail.com/full/1fb657e58c9a2eb9 HTTP/1.1
+> Soup-Debug-Timestamp: 1415489575
+> Soup-Debug: SoupSession 1 (0x15cd240), SoupMessage 37 (0x182f280), SoupSocket 18 (0x7ff438057cc0)
+> Host: www.google.com
+> Authorization: Bearer ya29.uACgkznYPDckPkHNMU2MF2gRNGrNKqsjnalf5jZmQ0jV9jcp297YMiQop53msSbUJi5poX8LolhsSw
+> GData-Version: 3
+> If-Match: "SXszcTVSLit7I2A9XRdWFEUDQgI."
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415489575
+< Soup-Debug: SoupMessage 37 (0x182f280)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Sat, 08 Nov 2014 23:32:55 GMT
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=0.01
+<
+
+> DELETE /m8/feeds/contacts/libgdata.test%40googlemail.com/full/10ba35c58c59d676 HTTP/1.1
+> Soup-Debug-Timestamp: 1415489575
+> Soup-Debug: SoupSession 1 (0x15cd240), SoupMessage 38 (0x182f190), SoupSocket 18 (0x7ff438057cc0)
+> Host: www.google.com
+> Authorization: Bearer ya29.uACgkznYPDckPkHNMU2MF2gRNGrNKqsjnalf5jZmQ0jV9jcp297YMiQop53msSbUJi5poX8LolhsSw
+> GData-Version: 3
+> If-Match: "SXY_fjVSLit7I2A9XRdWFEUDQgI."
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415489575
+< Soup-Debug: SoupMessage 38 (0x182f190)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Sat, 08 Nov 2014 23:32:55 GMT
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=0.01
+<
+
+> DELETE /m8/feeds/contacts/libgdata.test%40googlemail.com/full/5997be300d23115b HTTP/1.1
+> Soup-Debug-Timestamp: 1415489575
+> Soup-Debug: SoupSession 1 (0x15cd240), SoupMessage 39 (0x182f0a0), SoupSocket 18 (0x7ff438057cc0)
+> Host: www.google.com
+> Authorization: Bearer ya29.uACgkznYPDckPkHNMU2MF2gRNGrNKqsjnalf5jZmQ0jV9jcp297YMiQop53msSbUJi5poX8LolhsSw
+> GData-Version: 3
+> If-Match: "SHo5fTVSLSt7I2A9XRdWFEUDQgI."
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415489576
+< Soup-Debug: SoupMessage 39 (0x182f0a0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Sat, 08 Nov 2014 23:32:56 GMT
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=0.01
+<
+
--- /dev/null
+> DELETE /m8/feeds/groups/libgdata.test%40googlemail.com/full/53135b0d89099ac5 HTTP/1.1
+> Soup-Debug-Timestamp: 1415490541
+> Soup-Debug: SoupSession 1 (0x1c05240), SoupMessage 44 (0x1ce91c0), SoupSocket 21 (0x7f4510044ea0)
+> Host: www.google.com
+> Authorization: Bearer ya29.uAB1RRhn3TKLPSfFZeRgrzf68-Gb9tby5F20urDCBwC6B94UqINs1Hvh_iKX3FagPwd0QkLnrSyVRw
+> GData-Version: 3
+> If-Match: "SH44ejVSLit7I2A9XRdWFEQKQgY."
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415490541
+< Soup-Debug: SoupMessage 44 (0x1ce91c0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Sat, 08 Nov 2014 23:49:01 GMT
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=0.01
+<
+
+> DELETE /m8/feeds/groups/libgdata.test%40googlemail.com/full/732309600b1cf616 HTTP/1.1
+> Soup-Debug-Timestamp: 1415490541
+> Soup-Debug: SoupSession 1 (0x1c05240), SoupMessage 45 (0x1ce92b0), SoupSocket 21 (0x7f4510044ea0)
+> Host: www.google.com
+> Authorization: Bearer ya29.uAB1RRhn3TKLPSfFZeRgrzf68-Gb9tby5F20urDCBwC6B94UqINs1Hvh_iKX3FagPwd0QkLnrSyVRw
+> GData-Version: 3
+> If-Match: "SHo7ezVSLit7I2A9XRdWFEQKQgY."
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415490541
+< Soup-Debug: SoupMessage 45 (0x1ce92b0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Sat, 08 Nov 2014 23:49:01 GMT
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=0.01
+<
+
+> DELETE /m8/feeds/groups/libgdata.test%40googlemail.com/full/3bc435e78bb3779c HTTP/1.1
+> Soup-Debug-Timestamp: 1415490541
+> Soup-Debug: SoupSession 1 (0x1c05240), SoupMessage 46 (0x1ce93a0), SoupSocket 21 (0x7f4510044ea0)
+> Host: www.google.com
+> Authorization: Bearer ya29.uAB1RRhn3TKLPSfFZeRgrzf68-Gb9tby5F20urDCBwC6B94UqINs1Hvh_iKX3FagPwd0QkLnrSyVRw
+> GData-Version: 3
+> If-Match: "SHY4cTVSLit7I2A9XRdWFEQKQgY."
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415490541
+< Soup-Debug: SoupMessage 46 (0x1ce93a0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Sat, 08 Nov 2014 23:49:01 GMT
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=0.01
+<
+
--- /dev/null
+> GET /m8/feeds/contacts/libgdata.test%40googlemail.com/full/c8390ec0ef7f98a HTTP/1.1
+> Soup-Debug-Timestamp: 1415490478
+> Soup-Debug: SoupSession 1 (0x1c05240), SoupMessage 8 (0x1ce9490), SoupSocket 4 (0x1e32b70)
+> Host: www.google.com
+> Authorization: Bearer ya29.uAB1RRhn3TKLPSfFZeRgrzf68-Gb9tby5F20urDCBwC6B94UqINs1Hvh_iKX3FagPwd0QkLnrSyVRw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415490478
+< Soup-Debug: SoupMessage 8 (0x1ce9490)
+< Expires: Sat, 08 Nov 2014 23:47:58 GMT
+< Date: Sat, 08 Nov 2014 23:47:58 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "SX4yeDVSLit7I2A9XRdWFEQKQwM."
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml; charset=UTF-8
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Content-Encoding: gzip
+< Alternate-Protocol: 443:quic,p=0.01
+< Transfer-Encoding: chunked
+<
+< <?xml version="1.0" encoding="UTF-8"?>
+< <entry gd:etag=""SX4yeDVSLit7I2A9XRdWFEQKQwM."" xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005">
+< <id>http://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/base/c8390ec0ef7f98a</id>
+< <updated>2014-11-08T23:47:58.090Z</updated>
+< <app:edited xmlns:app="http://www.w3.org/2007/app">2014-11-08T23:47:58.090Z</app:edited>
+< <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
+< <title/>
+< <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/libgdata.test%40googlemail.com/c8390ec0ef7f98a"/>
+< <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/c8390ec0ef7f98a"/>
+< <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/libgdata.test%40googlemail.com/full/c8390ec0ef7f98a"/>
+< <gContact:nickname>Test Contact Esq.</gContact:nickname>
+< </entry>
+
+> DELETE /m8/feeds/contacts/libgdata.test%40googlemail.com/full/c8390ec0ef7f98a HTTP/1.1
+> Soup-Debug-Timestamp: 1415490478
+> Soup-Debug: SoupSession 1 (0x1c05240), SoupMessage 9 (0x1ce93a0), SoupSocket 4 (0x1e32b70)
+> Host: www.google.com
+> Authorization: Bearer ya29.uAB1RRhn3TKLPSfFZeRgrzf68-Gb9tby5F20urDCBwC6B94UqINs1Hvh_iKX3FagPwd0QkLnrSyVRw
+> GData-Version: 3
+> If-Match: "SX4yeDVSLit7I2A9XRdWFEQKQwM."
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.0 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1415490478
+< Soup-Debug: SoupMessage 9 (0x1ce93a0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Sat, 08 Nov 2014 23:47:58 GMT
+< Vary: Origin
+< Vary: Referer
+< Vary: X-Origin
+< Content-Type: application/atom+xml
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=0.01
+<
+
--- /dev/null
+> POST /feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE/acl HTTP/1.1
+> Soup-Debug-Timestamp: 1375195907
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 53 (0x6d13a0), SoupSocket 19 (0x8dee20)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gAcl='http://schemas.google.com/acl/2007' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>writer</title><category term='http://schemas.google.com/acl/2007#accessRule' scheme='http://schemas.google.com/g/2005#kind'/><gAcl:role value='writer'/><gAcl:scope type='user' value='libgdata.test@gmail.com'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375195908
+< Soup-Debug: SoupMessage 53 (0x6d13a0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Tue, 30 Jul 2013 14:51:48 GMT
+< Date: Tue, 30 Jul 2013 14:51:48 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: W/"D04ESXg7eCt7ImA9WhFWEUQ."
+< Location: https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE/acl/user%3Alibgdata.test%40gmail.com
+< Content-Location: https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE/acl/user%3Alibgdata.test%40gmail.com
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gAcl='http://schemas.google.com/acl/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"D04ESXg7eCt7ImA9WhFWEUQ."'><id>https://docs.google.com/feeds/id/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE/acl/user%3Alibgdata.test%40gmail.com</id><updated>2013-07-30T14:51:48.600Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:51:48.600Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/acl/2007#accessRule'/><title>Document Permission - libgdata.test@gmail.com</title><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE/acl/user%3Alibgdata.test%40gmail.com'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE/acl/user%3Alibgdata.test%40gmail.com'/><gAcl:role value='none'/><gAcl:scope type='user' value='libgdata.test@gmail.com'/></entry>
+
--- /dev/null
+> POST /accounts/ClientLogin HTTP/1.1
+> Soup-Debug-Timestamp: 1375195833
+> Soup-Debug: SoupSession 1 (0x65a3f0), SoupMessage 1 (0x6d1490), SoupSocket 1 (0x8deb20)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> accountType=HOSTED%5FOR%5FGOOGLE&Email=libgdata%2Etest%40gmail%2Ecom&Passwd=gdata%2Dgdata&service=writely&source=ytapi%2DGNOME%2Dlibgdata%2D444fubtt%2D0
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195833
+< Soup-Debug: SoupMessage 1 (0x6d1490)
+< Content-Type: text/plain
+< Cache-control: no-cache, no-store
+< Pragma: no-cache
+< Expires: Mon, 01-Jan-1990 00:00:00 GMT
+< Date: Tue, 30 Jul 2013 14:50:33 GMT
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 881
+< Server: GSE
+<
+< SID=DQAAAM0AAABR0PKOBa7esJP9XOrVRNZWCMXo1R2gw8chiYr6kGt4Z_0RMh8y-xBPSdXyGyNvGvjd8iEPS86k8b2jtl2R9Sp3URUENJgQ04NF7-AISco_EE7UBMWGZgRCTESGwLRYJ_acOsEXQ6AXusQBeBAyzrJgmMPJ9jg2s7IYaOtoJ_hR0UotlYQ2UZ70oBEl_S79acKfk3MVpqpyc6XConRbJ7gCNDG5oUM-KDuKoz0jwNqHAT72OWF5flwEpxt0F3vWNXpVQuFNuGb6RUJHPvC8B_fp
+< LSID=DQAAAM8AAABlrAGRIe1TpN4-qQMSXbufE9uYMHjAgon5A76hNTuGXoQuVI942XJkJ_56Wix_omRGzMP60Gxatc5i8IxW3Vnti_jcd8OWazNDHdPEhtgjeCZpmQu0QIcIVfOiALEItMVfdiYGNyM9wx0cegg2N-rvAL7Sh1JKK4MgKEEhibgS-1FzNXpsesBHxcmsq_lwsfI2RzGRm7Akd197iENvM5dFFWnBRqlkbam_MUWxtb8IZQacURB9dTfLQ3luB0VTrAsEkAiiycSTTrKhrHzo_Diy
+< Auth=DQAAAM0AAABlrAGRIe1TpN4-qQMSXbufE9uYMHjAgon5A76hNTuGXoQuVI942XJkJ_56Wix_omTgdiqiLHO8Hh8vOknyPd56MTaYoaw5bX9siZPIAJQm4gmyu56U54gmEuQx1HyJW2_kB8a_5iQ93psMJLZ1nbvMSJ3czOmN9Q-cJ94cXDNAZPWkj3W21COYVYFU6EyLQjs62h3EP83ad_6yupxzfP2QLxPmoMUNeUhUO6mQllU5N9qDUHmn_5xw_HYRTzTeNCjCIr1lyk3uL0rAzxmP9ldr
+
+> POST /accounts/ClientLogin HTTP/1.1
+> Soup-Debug-Timestamp: 1375195833
+> Soup-Debug: SoupSession 1 (0x65a3f0), SoupMessage 2 (0x6d12b0), SoupSocket 2 (0x8debe0)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> accountType=HOSTED%5FOR%5FGOOGLE&Email=libgdata%2Etest%40gmail%2Ecom&Passwd=gdata%2Dgdata&service=wise&source=ytapi%2DGNOME%2Dlibgdata%2D444fubtt%2D0
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195833
+< Soup-Debug: SoupMessage 2 (0x6d12b0)
+< Content-Type: text/plain
+< Cache-control: no-cache, no-store
+< Pragma: no-cache
+< Expires: Mon, 01-Jan-1990 00:00:00 GMT
+< Date: Tue, 30 Jul 2013 14:50:33 GMT
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 881
+< Server: GSE
+<
+< SID=DQAAAM0AAABR0PKOBa7esJP9XOrVRNZWCMXo1R2gw8chiYr6kGt4Z_0RMh8y-xBPSdXyGyNvGvjd8iEPS86k8b2jtl2R9Sp3URUENJgQ04NF7-AISco_EE7UBMWGZgRCTESGwLRYJ_acOsEXQ6AXusQBeBAyzrJgmMPJ9jg2s7IYaOtoJ_hR0UotlYQ2UZ70oBEl_S79acKfk3MVpqpyc6XConRbJ7gC3ZPbGQziqz3yUagGeF8hZLdPFMpFidDZV9QJ6oVTL52Sb_M_UG5f5uHN3_uc5kH4
+< LSID=DQAAAM4AAABlrAGRIe1TpN4-qQMSXbufE9uYMHjAgon5A76hNTuGXoQuVI942XJkJ_56Wix_omRGzMP60Gxatc5i8IxW3Vnti_jcd8OWazNDHdPEhtgjeCZpmQu0QIcIVfOiALEItMVfdiYGNyM9wx0cegg2N-rvAL7Sh1JKK4MgKEEhibgS-1FzNXpsesBHxcmsq_lwsfLRdaVLrRRFyybz8TpvAsoE6J5DMRz-vPR2GjXTJX5-vxxXfUwKu1TXNfpdJCUdaVD_U6C7AJnZeLwQisK_uQAV
+< Auth=DQAAAM8AAABlrAGRIe1TpN4-qQMSXbufE9uYMHjAgon5A76hNTuGXoQuVI942XJkJ_56Wix_omR6M9SLRot8DlemUIkiPHjV2BhGdfGhy2_TZTQV8l6tjRsuLF1C_QOWGtMIhgRelwyTd2pN1z2tEINcsMbcN1DFb1clzS8VWQau3s-rFmh4YIOrMg4yCUmAhv4Zv31igmwMZ-CbXJA_pewMLarBj-YJg4wGsfKm5zD6OI347Qgs4X5vXDmShOdsY_tKxaKYzAOox6wcYp5fcKtnxI1mnwGK
+
+> POST /accounts/ClientLogin HTTP/1.1
+> Soup-Debug-Timestamp: 1375195833
+> Soup-Debug: SoupSession 1 (0x65a3f0), SoupMessage 3 (0x6d10d0), SoupSocket 3 (0x8deca0)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> accountType=HOSTED%5FOR%5FGOOGLE&Email=libgdata%2Etest%40gmail%2Ecom&Passwd=gdata%2Dgdata&service=writely&source=ytapi%2DGNOME%2Dlibgdata%2D444fubtt%2D0
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195834
+< Soup-Debug: SoupMessage 3 (0x6d10d0)
+< Content-Type: text/plain
+< Cache-control: no-cache, no-store
+< Pragma: no-cache
+< Expires: Mon, 01-Jan-1990 00:00:00 GMT
+< Date: Tue, 30 Jul 2013 14:50:34 GMT
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 881
+< Server: GSE
+<
+< SID=DQAAAMwAAAC-zD4kHs6TtFqVOJ04mhjzVkSazTAD43_Lo63-sorPX2KCJSdZg6RZzVRHVyK8DqVRp3hfFqovOamtXycHpvMJV_7JlsCoBxHfgRmrWGTNnjlaHy-T-POGFWaLpbEnIGvm7HofHDePpiAXk9QNHZHeRImIg3X1xt2CTHUEDv_9KVMsqUqPuJ3bvtYzvOuVjt2FXl_Ar5lrtezgjpSws_Gbd6YgLoLLM69qJ1T8a8PWd5Wurg_8T-1LRZLnJYtiisMNvacDxy8bLMYDNMJqRZlI
+< LSID=DQAAAM4AAABim8CWD0fXx4mes4pvBIrvC841pd9P-AAkn99bhmJLBoKN1lBarnu8j0250NTu0Ck8s8OMoPh1QL9tWKxiG3ljnazd0xXL5tjVJF83BPnScS9OgKyR2G8Eqhjwgsca2Kbi1GZKIHeqkIJ2jOpqHIc3clBatKmijNfEp5yg2gkuefOvozPQTI6aKWbOhCdNCFrTdnSU1YbrjU1O-rwkWwYcoQo_vCPV5l7NZBr8OQ5XAEXKWiqGRCm9S48MlqM7dn_vy-ErlaxLppON9V8YtPXW
+< Auth=DQAAAM4AAABim8CWD0fXx4mes4pvBIrvC841pd9P-AAkn99bhmJLBoKN1lBarnu8j0250NTu0Cmx4mMgKts5RPXjX9iebgQXBKgmBEWCE-yaYBg28tehVKTERDHkSd5LGpAD31WdJp6sPwojYmWRokaYSG7pXp0V1ywOyZq3VtAW4_gzM6rxRyhQ_YoNWRazNJMH0GlrcTrUK2k4ofEd1ANQrkTYiA4UcFTpRjct6p9bX6hviTkMNItXSzVdPXnMAy4ezNaClkMZkDQ2NqzdebKUt9XEwBE4
+
--- /dev/null
+> POST /accounts/ClientLogin HTTP/1.1
+> Soup-Debug-Timestamp: 1375195853
+> Soup-Debug: SoupSession 1 (0x65a500), SoupMessage 1 (0x6d1670), SoupSocket 1 (0x8defa0)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> accountType=HOSTED%5FOR%5FGOOGLE&Email=libgdata%2Etest%40gmail%2Ecom&Passwd=gdata%2Dgdata&service=writely&source=ytapi%2DGNOME%2Dlibgdata%2D444fubtt%2D0
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195854
+< Soup-Debug: SoupMessage 1 (0x6d1670)
+< Content-Type: text/plain
+< Cache-control: no-cache, no-store
+< Pragma: no-cache
+< Expires: Mon, 01-Jan-1990 00:00:00 GMT
+< Date: Tue, 30 Jul 2013 14:50:54 GMT
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 881
+< Server: GSE
+<
+< SID=DQAAAMwAAAApGCux8o0gQShhGzIOhk7JRsWzyI_BPCTT2eOVwESDoanccyxFGJzNDx9uzMKGHbwnkJrn2FmG3tKuYdd-nA89UX8JSs3GhkTWOCP_KKgPE1KoEh3jPISpnGTS-X3L8D21ayV863i6gqJTirjy02lgO34ng0FA7jmWGP0RtbrGR2bUmJgXlkNa0k_E_xlpyEcSpgSR7F-LD-XAYVvx84bOSMG7g9gIhahrH2nI-dJ1Sd360BhCzK9HoLqnnfJkobI26nMRzS5ZYlqIqZMLS5bJ
+< LSID=DQAAAM8AAAD120t5gwbKP8ZiE1vhooLXkIHB-06VF0mTDy62Cjvq1Pacwjf_ZML1wQT2gTgWjcLzcmJvrKSpj9dPo7aR_ISGuTUmM-r60BDHRw7PusF0DXsmBUs457fKexuR7Pj_q8afYugVXGlVx_O7H6LeyVx0GaZcXJZFVRxUCZnCLIE-6Fmi2oyMrooTiYyBz2VpfdijOnTuoIVc4JyiQE46BZSWInpiqIw84Kk51Iuo5n7Wxh16vzvaMUVGEXTo4rOaG4YVRIxuYKGhu3EW7LaMSKI6
+< Auth=DQAAAM8AAAD120t5gwbKP8ZiE1vhooLXkIHB-06VF0mTDy62Cjvq1Pacwjf_ZML1wQT2gTgWjcIoXDWQ-OaMF7gOISW2OfHJQ6V3f8lK5Ytt9txblEufaZnwZUzSubNQZb6N0dQRhONSCLTwFJbE7tMXdEUKVmACM5zsjjT6Q_G-wBA8JYgeW_6t3O4ONU6W7DxpXv2sW2uGRCDbILrnGKveNKvCdrg8gYvt73H31Udb5wZhlVvRpjka_09YQFEV5qQPYQhK8VExzvabmPtdpqEM-paZQkjI
+
+> POST /accounts/ClientLogin HTTP/1.1
+> Soup-Debug-Timestamp: 1375195854
+> Soup-Debug: SoupSession 1 (0x65a500), SoupMessage 2 (0x7fffe001c190), SoupSocket 2 (0x7fffe40038a0)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> accountType=HOSTED%5FOR%5FGOOGLE&Email=libgdata%2Etest%40gmail%2Ecom&Passwd=gdata%2Dgdata&service=wise&source=ytapi%2DGNOME%2Dlibgdata%2D444fubtt%2D0
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195854
+< Soup-Debug: SoupMessage 2 (0x7fffe001c190)
+< Content-Type: text/plain
+< Cache-control: no-cache, no-store
+< Pragma: no-cache
+< Expires: Mon, 01-Jan-1990 00:00:00 GMT
+< Date: Tue, 30 Jul 2013 14:50:54 GMT
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 881
+< Server: GSE
+<
+< SID=DQAAAM4AAAApGCux8o0gQShhGzIOhk7JRsWzyI_BPCTT2eOVwESDoanccyxFGJzNDx9uzMKGHbwnkJrn2FmG3tKuYdd-nA89UX8JSs3GhkTWOCP_KKgPE1KoEh3jPISpnGTS-X3L8D21ayV863i6gqJTirjy02lgO34ng0FA7jmWGP0RtbrGR2bUmJgXlkNa0k_E_xlpyEePXAP9Xmv0RI_jwPS7_jvvTrNkFJ6H26YG8YkgM17jBmsGMLdbwzSnaHdqWO7IxT6mBMtpQyZgxVXHfd_cRdsu
+< LSID=DQAAAM4AAAD120t5gwbKP8ZiE1vhooLXkIHB-06VF0mTDy62Cjvq1Pacwjf_ZML1wQT2gTgWjcLzcmJvrKSpj9dPo7aR_ISGuTUmM-r60BDHRw7PusF0DXsmBUs457fKexuR7Pj_q8afYugVXGlVx_O7H6LeyVx0GaZcXJZFVRxUCZnCLIE-6Fmi2oyMrooTiYyBz2Vpfdg6PXkcq0mgw5qTjB0cTIZalgp8otPragv86AnDgb9c8cITM6ff9EoC_0iZkTMgOy1v0OKQ4iXtmuy7wrbX4JF8
+< Auth=DQAAAM8AAAD120t5gwbKP8ZiE1vhooLXkIHB-06VF0mTDy62Cjvq1Pacwjf_ZML1wQT2gTgWjcLc5wRLTtpmZ4T_J_1BcmdQhZqIxID3KiIAxmt7uGA3X3Jzw6Kdj69zkeuPcyWLMuflRYYq45Ucv9gbAaOD6ylY_pG1iesDZN2XE3bT7ikydWpGce4KR22xrdgYPIsDPuvzGxwygs4IbiWq7jt94vFnYRodFhgpd-jIC1eyfghTmNpvlQe7EI7r_EypJDXLLeyioaqDL5dC4zWhVfNoq5S1
+
+> POST /accounts/ClientLogin HTTP/1.1
+> Soup-Debug-Timestamp: 1375195854
+> Soup-Debug: SoupSession 1 (0x65a500), SoupMessage 3 (0x7fffe001c370), SoupSocket 3 (0x7fffe4003960)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> accountType=HOSTED%5FOR%5FGOOGLE&Email=libgdata%2Etest%40gmail%2Ecom&Passwd=gdata%2Dgdata&service=writely&source=ytapi%2DGNOME%2Dlibgdata%2D444fubtt%2D0
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195854
+< Soup-Debug: SoupMessage 3 (0x7fffe001c370)
+< Content-Type: text/plain
+< Cache-control: no-cache, no-store
+< Pragma: no-cache
+< Expires: Mon, 01-Jan-1990 00:00:00 GMT
+< Date: Tue, 30 Jul 2013 14:50:54 GMT
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 881
+< Server: GSE
+<
+< SID=DQAAAMwAAAApGCux8o0gQShhGzIOhk7JRsWzyI_BPCTT2eOVwESDoanccyxFGJzNDx9uzMKGHbwnkJrn2FmG3tKuYdd-nA89UX8JSs3GhkTWOCP_KKgPE1KoEh3jPISpnGTS-X3L8D21ayV863i6gqJTirjy02lgO34ng0FA7jmWGP0RtbrGR2bUmJgXlkNa0k_E_xlpyEcSpgSR7F-LD-XAYVvx84bOE2bh4b-LVteLUkOReb2jiPsSNn2eT3oSTZpw3v5s1BqzwcKeE9OJZM2PF-WpGtL9
+< LSID=DQAAAM4AAAD120t5gwbKP8ZiE1vhooLXkIHB-06VF0mTDy62Cjvq1Pacwjf_ZML1wQT2gTgWjcLzcmJvrKSpj9dPo7aR_ISGuTUmM-r60BDHRw7PusF0DXsmBUs457fKexuR7Pj_q8afYugVXGlVx_O7H6LeyVx0GaZcXJZFVRxUCZnCLIE-6Fmi2oyMrooTiYyBz2Vpfdg6PXkcq0mgw5qTjB0cTIZajOomQqZHIXWXfB5MkhaknVwPQ4UiFn-I4PzxzpoLjZuZ3viE78-pyXMtWgOahrvr
+< Auth=DQAAAM4AAAD120t5gwbKP8ZiE1vhooLXkIHB-06VF0mTDy62Cjvq1Pacwjf_ZML1wQT2gTgWjcIoXDWQ-OaMF7gOISW2OfHJQ6V3f8lK5Ytt9txblEufaZnwZUzSubNQZb6N0dQRhONSCLTwFJbE7tMXdEUKVmACM5zsjjT6Q_G-wBA8JYgeW_6t3O4ONU6W7DxpXv2sW2vNTHet5IZoB7WP2MEg-N2Ln15t-_ay9uO867i5OEDto18d-aRApzHpF-Vs_ZyE8Gm8AN81Z9rY2oL1PiRW3JXI
+
--- /dev/null
+> POST /accounts/ClientLogin HTTP/1.1
+> Soup-Debug-Timestamp: 1375195855
+> Soup-Debug: SoupSession 1 (0x65a500), SoupMessage 1 (0x7fffe001c0a0), SoupSocket 1 (0x7fffe4003ba0)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> accountType=HOSTED%5FOR%5FGOOGLE&Email=libgdata%2Etest%40gmail%2Ecom&Passwd=gdata%2Dgdata&service=writely&source=ytapi%2DGNOME%2Dlibgdata%2D444fubtt%2D0
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195855
+< Soup-Debug: SoupMessage 1 (0x7fffe001c0a0)
+< Content-Type: text/plain
+< Cache-control: no-cache, no-store
+< Pragma: no-cache
+< Expires: Mon, 01-Jan-1990 00:00:00 GMT
+< Date: Tue, 30 Jul 2013 14:50:55 GMT
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 881
+< Server: GSE
+<
+< SID=DQAAAM0AAACF7CAeLMw77A4pqpYe-EqmFcxI_F_dEo_u6XKeWysBOY_6c4Grs1jx6p5EWvJvYedmhM9aXdcTF2ScmaQVpQx7lANr524sg1QWeMK5Xd8CuVPBNeQZ4Qdb-AF-tZxHMAFWJbKb4RIKwUJW_UIioPLwV2eGdLK7uJj7hKtfvwruNmhN-Xrz10l5uiWjv-gLrxGnwSJRwHH7nJ741_lVcpsYiAhK-UNV0DFNoGl-BNZ02ZRGa4aRHkmMYxBeCYGfyVuWKZf2dw3kEn4PuU97RKnU
+< LSID=DQAAAM4AAAD286DBF9oKo_rBYE0Ea2YICtsGlQUkDX0VWZP08E7iysIK9PG5sOalDG1ADDXpufY8qy0mPuUKyuGVvpimv2KKPen1J2NyJOPd-GxiD5jtxJyV7e2ClVURnK9eiKJZQj4-FEHP0qnmtTSEtdIDZv4S2R1LjrHHsGjj0thC7u3oYEYswC0mzGJ-YZYT_YAuU2331FKKar6Iy4Ce_r5vqaqVVZ0ViXTbMP7J7RqfIFEPteK8OZEbZYsY_HZ6TTsvUKyUx-ILUR0mxsnmi73gJpjQ
+< Auth=DQAAAM4AAAD286DBF9oKo_rBYE0Ea2YICtsGlQUkDX0VWZP08E7iysIK9PG5sOalDG1ADDXpufZmVPEt7KWFbthUe0JsLTpeD1RnFI3vZn0jhykEdcknaeml6LVdRc3ek484U6w_KWBI67zYjOz1pY7khu0MrjY08lFJbxA5G5YdnG_YsTWbKcjt5y2ibHGnQIymIiPFnk_aigL9RkEcgVO8vvklW9Pkz1Qy4H6eeRD9l7lWlkO7WTPyii3EgclE6MMt4PgA5JAILbHjirStw8Cb6X7qwfp9
+
+> POST /accounts/ClientLogin HTTP/1.1
+> Soup-Debug-Timestamp: 1375195855
+> Soup-Debug: SoupSession 1 (0x65a3f0), SoupMessage 1 (0x7fffdc0021c0), SoupSocket 1 (0x7fffdc004be0)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> accountType=HOSTED%5FOR%5FGOOGLE&Email=libgdata%2Etest%40gmail%2Ecom&Passwd=gdata%2Dgdata&service=writely&source=ytapi%2DGNOME%2Dlibgdata%2D444fubtt%2D0
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195856
+< Soup-Debug: SoupMessage 1 (0x7fffdc0021c0)
+< Content-Type: text/plain
+< Cache-control: no-cache, no-store
+< Pragma: no-cache
+< Expires: Mon, 01-Jan-1990 00:00:00 GMT
+< Date: Tue, 30 Jul 2013 14:50:56 GMT
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 881
+< Server: GSE
+<
+< SID=DQAAAM0AAACLFCOY70KpNEYroocCbqFUKjHcgsr7gImbwQGYa66tcr7x7qgHVZgRlzXSvTbQRQob_P-8PoKSXHe-wW4GooWssG4ZUYWrkr4pxAFuDeSp__Gp5whCkwMWPQlyexEYVdYbzFJmRnkxsycQ9DIJBRtfy9840iNcvDpofXNkZdTN7Onbuh2mWDRTuAb2dXBEQTmVyouaouI17YhQTBYYY_2SHRVBzPlRhgj_ivOmnTlatTAppp-ARxSmUG3b8RdQFkxDMBHTaGa0Ohh5Qh1SwsmJ
+< LSID=DQAAAM8AAABYgn3RRca16eF9fb1i6ePaHcMyZYNjt58C3aBzy2F6HURJiTXKcmKvu9rMlD0tHrEXjdbukn21uQKwcCCjiW6ZbbdtK3HQVZ-6C8PBflyLqV9rkjuL7wbcHuUQ-YyLBXfQ7T6mMnbcYnCnrewTyxfmW4SfdS6JmRKRRLxBGUABtcdappT6wmwGUncBwxVAk7K9s8xAMH8jdoiejkQp3Nm-MciwoYUxtQ5tNWejoGJFbQhqdgvOOHgmEyj0bqt5YWiNEiwuC2Ee-J5AdMYlfchG
+< Auth=DQAAAM4AAABYgn3RRca16eF9fb1i6ePaHcMyZYNjt58C3aBzy2F6HURJiTXKcmKvu9rMlD0tHrGHin2O3I0hYN2co5UH1WB1QRSfHjUZqjZ0RqLk0hXg2WdBMfW9GZGtkcfeUE4OOgD6WCCraodxPeqws8iwm5_sjfQtgz3hDFeUBEffJzrBzxAQzlrCHCo-l64JntcOHYr52T6c4S3hTpTTMyGmz1bEQ7gHTUAAKPHzakJNod-5RXiOCZU5DgM7rU15kYbhX9piZjrkJ4zl7ran55kvsQwz
+
+> POST /accounts/ClientLogin HTTP/1.1
+> Soup-Debug-Timestamp: 1375195856
+> Soup-Debug: SoupSession 1 (0x65a3f0), SoupMessage 2 (0x7fffdc0023a0), SoupSocket 2 (0x7fffdc004ca0)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> accountType=HOSTED%5FOR%5FGOOGLE&Email=libgdata%2Etest%40gmail%2Ecom&Passwd=gdata%2Dgdata&service=wise&source=ytapi%2DGNOME%2Dlibgdata%2D444fubtt%2D0
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195856
+< Soup-Debug: SoupMessage 2 (0x7fffdc0023a0)
+< Content-Type: text/plain
+< Cache-control: no-cache, no-store
+< Pragma: no-cache
+< Expires: Mon, 01-Jan-1990 00:00:00 GMT
+< Date: Tue, 30 Jul 2013 14:50:56 GMT
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 881
+< Server: GSE
+<
+< SID=DQAAAMwAAACLFCOY70KpNEYroocCbqFUKjHcgsr7gImbwQGYa66tcr7x7qgHVZgRlzXSvTbQRQob_P-8PoKSXHe-wW4GooWssG4ZUYWrkr4pxAFuDeSp__Gp5whCkwMWPQlyexEYVdYbzFJmRnkxsycQ9DIJBRtfy9840iNcvDpofXNkZdTN7Onbuh2mWDRTuAb2dXBEQTn-kbXgQwzqm6V-ifdzdezDPJ38lVYfd0z7kDSBZGEcv-4PmivQfrEvbhezI2ZeR41OBETNDoOuXh41JgC1w0lK
+< LSID=DQAAAM4AAABYgn3RRca16eF9fb1i6ePaHcMyZYNjt58C3aBzy2F6HURJiTXKcmKvu9rMlD0tHrEXjdbukn21uQKwcCCjiW6ZbbdtK3HQVZ-6C8PBflyLqV9rkjuL7wbcHuUQ-YyLBXfQ7T6mMnbcYnCnrewTyxfmW4SfdS6JmRKRRLxBGUABtcdappT6wmwGUncBwxVAk7KG4eCvVKnqJ24LXzEwSUaG-5iZxHIxJeYZwu7SDiD3ubTAsAL0UF30A5WQ_KkjxKXCWv1o076lRp5YdrVbsg5y
+< Auth=DQAAAM4AAABYgn3RRca16eF9fb1i6ePaHcMyZYNjt58C3aBzy2F6HURJiTXKcmKvu9rMlD0tHrEHlV92cq3ctRGtopUUKkaRX02pNJPRHFxM4klN-mlXJRljQdwOd0bJWoyFRcv9qA5qF-qacJs77OHTsd-6WiRQwyaCYJj-9CcU8eklqIWPlHfux8rOLAoC-BaVfWEu0e15jsQ08sXUjOeLzT2O2e8zJQCBGtmnrmIZKzbU2q40rw2p8h98dzo7YFkKS3wHll4A01CHhXYQ51OfpkwMha4k
+
+> POST /accounts/ClientLogin HTTP/1.1
+> Soup-Debug-Timestamp: 1375195856
+> Soup-Debug: SoupSession 1 (0x65a3f0), SoupMessage 3 (0x7fffdc002580), SoupSocket 3 (0x7fffdc004d60)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> accountType=HOSTED%5FOR%5FGOOGLE&Email=libgdata%2Etest%40gmail%2Ecom&Passwd=gdata%2Dgdata&service=writely&source=ytapi%2DGNOME%2Dlibgdata%2D444fubtt%2D0
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195856
+< Soup-Debug: SoupMessage 3 (0x7fffdc002580)
+< Content-Type: text/plain
+< Cache-control: no-cache, no-store
+< Pragma: no-cache
+< Expires: Mon, 01-Jan-1990 00:00:00 GMT
+< Date: Tue, 30 Jul 2013 14:50:57 GMT
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 881
+< Server: GSE
+<
+< SID=DQAAAMwAAABWp8RgbZReQn8A32S0SQGXcBS4NubkvNlwzlcCU3wkKQxkDhw9sLVUfitruSVfFuKqCZkJhOW9gJuGcqDkDr-EIGLtVGcwxv3zf5tRs6w0GCzB50YPazBJVxDBh-Y0YxfCnynT3n_0dA8EgqTGtHXYsh6qbPooeHt7fKxCP-bhCi-XA9EpPCY38pzhQGetP_g-7kEWtTaj5nhvbmQmKvtUpyYMZMhjmbq3Od5hH-2pI2iwplQt9LBpMXtuV5O2-jK7f4loHQSbPiPqyLqUuKY8
+< LSID=DQAAAM4AAAACPXhg7qQhHb6oYCMyDQqpJYpabRSBfHm9YTEfHMu_XRmhXajXIuaDkCX124nHoHnOcrc5WGAC4wHqUwsYqyd6yicOle36MPAIypNWm9giEUaJRw-b3seIRphsmZxn5f4vcen9PltUNv-DU4yvzYXFLTlLaF5H3hxvkWs8kIogr3TNyTmo-P850Wy9W0qrDXyMHGDaXZhIozeL6tIu9m5v9q_e8D1KrnU5qOTaBxc2VmJ61o6mJTcAbqPUPtnI26Lml10U3TjiOKNKS_b5Xv5C
+< Auth=DQAAAM4AAAACPXhg7qQhHb6oYCMyDQqpJYpabRSBfHm9YTEfHMu_XRmhXajXIuaDkCX124nHoHktDcCodFMl3w1kxDGAXs_BEzSu6S-kiuuZDQhA-OM5Rix78EXR47J_PJwtSSKm15cNhW6SHBBvCjJGlDUhJE_igkyuFl6_eH1Pkfe1Qcceb6SKWZGz5LTeJApxnJGeU6Pk9bcmSnPrOp0_2vQtICW2f3c9L2CL9kTODTje-kLgsldOHyuP86akj-MdVAeHogbU1mKNdLF5A9aQYq9_C7SY
+
+> POST /accounts/ClientLogin HTTP/1.1
+> Soup-Debug-Timestamp: 1375195856
+> Soup-Debug: SoupSession 1 (0x65a3f0), SoupMessage 3 (0x7fffdc002580), SoupSocket 3 (0x7fffdc004d60)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> accountType=HOSTED%5FOR%5FGOOGLE&Email=libgdata%2Etest%40gmail%2Ecom&Passwd=gdata%2Dgdata&service=writely&source=ytapi%2DGNOME%2Dlibgdata%2D444fubtt%2D0
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195856
+< Soup-Debug: SoupMessage 3 (0x7fffdc002580)
+< Content-Type: text/plain
+< Cache-control: no-cache, no-store
+< Pragma: no-cache
+< Expires: Mon, 01-Jan-1990 00:00:00 GMT
+< Date: Tue, 30 Jul 2013 14:50:57 GMT
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 881
+< Server: GSE
+<
+< SID=DQAAAMwAAABWp8RgbZReQn8A32S0SQGXcBS4NubkvNlwzlcCU3wkKQxkDhw9sLVUfitruSVfFuKqCZkJhOW9gJuGcqDkDr-EIGLtVGcwxv3zf5tRs6w0GCzB50YPazBJVxDBh-Y0YxfCnynT3n_0dA8EgqTGtHXYsh6qbPooeHt7fKxCP-bhCi-XA9EpPCY38pzhQGetP_g-7kEWtTaj5nhvbmQmKvtUpyYMZMhjmbq3Od5hH-2pI2iwplQt9LBpMXtuV5O2-jK7f4loHQSbPiPqyLqUuKY8
+< LSID=DQAAAM4AAAACPXhg7qQhHb6oYCMyDQqpJYpabRSBfHm9YTEfHMu_XRmhXajXIuaDkCX124nHoHnOcrc5WGAC4wHqUwsYqyd6yicOle36MPAIypNWm9giEUaJRw-b3seIRphsmZxn5f4vcen9PltUNv-DU4yvzYXFLTlLaF5H3hxvkWs8kIogr3TNyTmo-P850Wy9W0qrDXyMHGDaXZhIozeL6tIu9m5v9q_e8D1KrnU5qOTaBxc2VmJ61o6mJTcAbqPUPtnI26Lml10U3TjiOKNKS_b5Xv5C
+< Auth=DQAAAM4AAAACPXhg7qQhHb6oYCMyDQqpJYpabRSBfHm9YTEfHMu_XRmhXajXIuaDkCX124nHoHktDcCodFMl3w1kxDGAXs_BEzSu6S-kiuuZDQhA-OM5Rix78EXR47J_PJwtSSKm15cNhW6SHBBvCjJGlDUhJE_igkyuFl6_eH1Pkfe1Qcceb6SKWZGz5LTeJApxnJGeU6Pk9bcmSnPrOp0_2vQtICW2f3c9L2CL9kTODTje-kLgsldOHyuP86akj-MdVAeHogbU1mKNdLF5A9aQYq9_C7SY
+
--- /dev/null
+> POST /feeds/default/private/full/batch HTTP/1.1
+> Soup-Debug-Timestamp: 1375195846
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 9 (0x6d13a0), SoupSocket 3 (0x8dee20)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>Batch operation feed</title><id>batch1</id><updated>2013-07-30T14:50:46Z</updated><entry><title type='text'>My First Document</title><category term='http://schemas.google.com/docs/2007#document' scheme='http://schemas.google.com/g/2005#kind'/><batch:id>1</batch:id><batch:operation type='insert'/><docs:writersCanInvite value='false'/></entry></feed>
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195848
+< Soup-Debug: SoupMessage 9 (0x6d13a0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< GData-Version: 3.0
+< Date: Tue, 30 Jul 2013 14:50:48 GMT
+< Expires: Tue, 30 Jul 2013 14:50:48 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005'><id>https://docs.google.com/feeds/id/batch/1375195847168</id><updated>2013-07-30T14:50:48.572Z</updated><title>Batch operation feed</title><entry gd:etag='"A1RbExNUHyt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c</id><published>2013-07-30T14:50:47.241Z</published><updated>2013-07-30T14:50:48.262Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:50:48.317Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>My First Document</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:50:48.262Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:50:47.481Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><batch:id>1</batch:id><batch:status code='201' reason='Created'/><batch:operation type='insert'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c/revisions'/></entry></feed>
+
+> POST /feeds/default/private/full/batch HTTP/1.1
+> Soup-Debug-Timestamp: 1375195848
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 10 (0x6d1580), SoupSocket 4 (0x8deee0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>Batch operation feed</title><id>batch1</id><updated>2013-07-30T14:50:48Z</updated><entry><title type='text'>Batch operation query</title><id>https://docs.google.com/feeds/default/private/full/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c</id><updated>2013-07-30T14:50:48Z</updated><batch:id>2</batch:id><batch:operation type='query'/></entry><entry><title type='text'>I'm a poet and I didn't know it</title><category term='http://schemas.google.com/docs/2007#document' scheme='http://schemas.google.com/g/2005#kind'/><batch:id>1</batch:id><batch:operation type='insert'/><docs:writersCanInvite value='false'/></entry></feed>
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195850
+< Soup-Debug: SoupMessage 10 (0x6d1580)
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< GData-Version: 3.0
+< Date: Tue, 30 Jul 2013 14:50:50 GMT
+< Expires: Tue, 30 Jul 2013 14:50:50 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005'><id>https://docs.google.com/feeds/id/batch/1375195849100</id><updated>2013-07-30T14:50:49.170Z</updated><title>Batch operation feed</title><entry gd:etag='"A1RbExNKRCt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c</id><published>2013-07-30T14:50:47.241Z</published><updated>2013-07-30T14:50:47.693Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:50:48.375Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>My First Document</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c&v=1&s=AMedNnoAAAAAUffu6ZHdtIe7cBGANe-LRt9Tr9hWJx1w&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:50:47.693Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:50:47.693Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><batch:id>2</batch:id><batch:status code='200' reason='Success'/><batch:operation type='query'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c/revisions'/></entry><entry gd:etag='"A1RbExJNGit7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8</id><published>2013-07-30T14:50:49.254Z</published><updated>2013-07-30T14:50:49.899Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:50:49.942Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>I'm a poet and I didn't know it</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:50:49.899Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:50:49.490Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><batch:id>1</batch:id><batch:status code='201' reason='Created'/><batch:operation type='insert'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8/revisions'/></entry></feed>
+
+> POST /feeds/default/private/full/batch HTTP/1.1
+> Soup-Debug-Timestamp: 1375195850
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 11 (0x6d1490), SoupSocket 5 (0x8debe0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>Batch operation feed</title><id>batch1</id><updated>2013-07-30T14:50:50Z</updated><entry><title type='text'>Batch operation query</title><id>https://docs.google.com/feeds/default/private/full/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c</id><updated>2013-07-30T14:50:50Z</updated><batch:id>1</batch:id><batch:operation type='query'/></entry></feed>
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195850
+< Soup-Debug: SoupMessage 11 (0x6d1490)
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< GData-Version: 3.0
+< Date: Tue, 30 Jul 2013 14:50:50 GMT
+< Expires: Tue, 30 Jul 2013 14:50:50 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005'><id>https://docs.google.com/feeds/id/batch/1375195850648</id><updated>2013-07-30T14:50:50.704Z</updated><title>Batch operation feed</title><entry gd:etag='"A1RbExNKRCt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c</id><published>2013-07-30T14:50:47.241Z</published><updated>2013-07-30T14:50:47.693Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:50:48.375Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>My First Document</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c&v=1&s=AMedNnoAAAAAUffu6lnYxmLAXyHLWe5VvlftOA0cgUIs&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:50:47.693Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:50:47.693Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><batch:id>1</batch:id><batch:status code='200' reason='Success'/><batch:operation type='query'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c/revisions'/></entry></feed>
+
+> POST /feeds/default/private/full/batch HTTP/1.1
+> Soup-Debug-Timestamp: 1375195850
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 12 (0x6d12b0), SoupSocket 6 (0x8de8e0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>Batch operation feed</title><id>batch1</id><updated>2013-07-30T14:50:50Z</updated><entry><title type='text'>Batch operation query</title><id>https://docs.google.com/feeds/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8</id><updated>2013-07-30T14:50:50Z</updated><batch:id>1</batch:id><batch:operation type='query'/></entry></feed>
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195851
+< Soup-Debug: SoupMessage 12 (0x6d12b0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< GData-Version: 3.0
+< Date: Tue, 30 Jul 2013 14:50:51 GMT
+< Expires: Tue, 30 Jul 2013 14:50:51 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005'><id>https://docs.google.com/feeds/id/batch/1375195851232</id><updated>2013-07-30T14:50:51.299Z</updated><title>Batch operation feed</title><entry gd:etag='"A1RbEw0OByt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8</id><published>2013-07-30T14:50:49.254Z</published><updated>2013-07-30T14:50:49.710Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:50:50.233Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>I'm a poet and I didn't know it</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8&v=1&s=AMedNnoAAAAAUffu64rlONLO58QEH6zT-dEewr68D_BG&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:50:49.710Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:50:49.710Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><batch:id>1</batch:id><batch:status code='200' reason='Success'/><batch:operation type='query'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8/revisions'/></entry></feed>
+
+> POST /feeds/default/private/full/batch HTTP/1.1
+> Soup-Debug-Timestamp: 1375195851
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 13 (0x6d11c0), SoupSocket 7 (0x8de9a0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>Batch operation feed</title><id>batch1</id><updated>2013-07-30T14:50:51Z</updated><entry xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1RbEw0OByt7ImBk"'><title type='text'>War & Peace</title><id>https://docs.google.com/feeds/id/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8</id><updated>2013-07-30T14:50:49Z</updated><published>2013-07-30T14:50:49Z</published><content type='text/plain' src='https://docs.google.com/feeds/download/documents/export/Export?id=1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8'/><category term='http://schemas.google.com/docs/2007#document' scheme='http://schemas.google.com/g/2005#kind'/><category term='http://schemas.google.com/g/2005/labels#viewed' scheme='http://schemas.google.com/g/2005/labels' label='viewed'/><category term='http://schemas.google.com/g/2005/labels#modified-by-me' scheme='http://schemas.google.com/g/2005/labels' label='modified-by-me'/><link href='https://docs.google.com/document/d/1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8/edit?usp=docslist_api' rel='http://www.iana.org/assignments/relation/alternate' type='text/html'/><link href='https://docs.google.com/document/d/1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8/preview' rel='http://schemas.google.com/docs/2007#embed' type='text/html'/><link href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png' rel='http://schemas.google.com/docs/2007#icon' type='image/png'/><link href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8' rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml'/><link href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8' rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml'/><link href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8&v=1&s=AMedNnoAAAAAUffu64rlONLO58QEH6zT-dEewr68D_BG&sz=s220' rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8' rel='http://www.iana.org/assignments/relation/self' type='application/atom+xml'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8' rel='http://www.iana.org/assignments/relation/edit' type='application/atom+xml'/><link href='https://docs.google.com/feeds/default/media/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8' rel='http://www.iana.org/assignments/relation/edit-media' type='text/html'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8/acl' rel='http://schemas.google.com/acl/2007#accessControlList'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8/revisions' rel='http://schemas.google.com/docs/2007/revisions'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><batch:id>3</batch:id><batch:operation type='update'/><docs:writersCanInvite value='false'/><gd:resourceId>document:1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8</gd:resourceId><docs:isShareable value="true"/><docs:isShareableByMe value="true"/><docs:modifiedByMeDate>2013-07-30T14:50:49.710Z</docs:modifiedByMeDate></entry><entry><title type='text'></title><category term='http://schemas.google.com/docs/2007#document' scheme='http://schemas.google.com/g/2005#kind'/><batch:id>2</batch:id><batch:operation type='delete'/><docs:writersCanInvite value='false'/></entry><entry xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1RbExNKRCt7ImBk"'><title type='text'>My First Document</title><id>https://docs.google.com/feeds/id/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c</id><updated>2013-07-30T14:50:47Z</updated><published>2013-07-30T14:50:47Z</published><content type='text/plain' src='https://docs.google.com/feeds/download/documents/export/Export?id=1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c'/><category term='http://schemas.google.com/docs/2007#document' scheme='http://schemas.google.com/g/2005#kind'/><category term='http://schemas.google.com/g/2005/labels#viewed' scheme='http://schemas.google.com/g/2005/labels' label='viewed'/><category term='http://schemas.google.com/g/2005/labels#modified-by-me' scheme='http://schemas.google.com/g/2005/labels' label='modified-by-me'/><link href='https://docs.google.com/document/d/1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c/edit?usp=docslist_api' rel='http://www.iana.org/assignments/relation/alternate' type='text/html'/><link href='https://docs.google.com/document/d/1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c/preview' rel='http://schemas.google.com/docs/2007#embed' type='text/html'/><link href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png' rel='http://schemas.google.com/docs/2007#icon' type='image/png'/><link href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c' rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml'/><link href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c' rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml'/><link href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c&v=1&s=AMedNnoAAAAAUffu6lnYxmLAXyHLWe5VvlftOA0cgUIs&sz=s220' rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c' rel='http://www.iana.org/assignments/relation/self' type='application/atom+xml'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c' rel='http://www.iana.org/assignments/relation/edit' type='application/atom+xml'/><link href='https://docs.google.com/feeds/default/media/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c' rel='http://www.iana.org/assignments/relation/edit-media' type='text/html'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c/acl' rel='http://schemas.google.com/acl/2007#accessControlList'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c/revisions' rel='http://schemas.google.com/docs/2007/revisions'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><batch:id>1</batch:id><batch:operation type='delete'/><docs:writersCanInvite value='false'/><gd:resourceId>document:1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c</gd:resourceId><docs:isShareable value="true"/><docs:isShareableByMe value="true"/><docs:modifiedByMeDate>2013-07-30T14:50:47.693Z</docs:modifiedByMeDate></entry></feed>
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195852
+< Soup-Debug: SoupMessage 13 (0x6d11c0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< GData-Version: 3.0
+< Date: Tue, 30 Jul 2013 14:50:52 GMT
+< Expires: Tue, 30 Jul 2013 14:50:52 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005'><id>https://docs.google.com/feeds/id/batch/1375195851908</id><updated>2013-07-30T14:50:52.151Z</updated><title>Batch operation feed</title><entry gd:etag='"A1RbEwxSEyt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8</id><published>2013-07-30T14:50:49.254Z</published><updated>2013-07-30T14:50:51.977Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:50:51.985Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>War & Peace</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8&v=2&s=AMedNnoAAAAAUffu7CNH-y2a6W9_5yBTO3LCLSTl-BNQ&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:50:51.977Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:50:49.710Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><batch:id>3</batch:id><batch:status code='200' reason='Success'/><batch:operation type='update'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8/revisions'/></entry><entry><id>2</id><updated>2013-07-30T14:50:52.151Z</updated><title>Error</title><content>Missing entry id</content><batch:id>2</batch:id><batch:status code='400' reason='Missing entry id'/><batch:operation type='delete'/></entry><entry><id>https://docs.google.com/feeds/id/document%3A1iqWY5wasGASdQt3Wyn4RrD23e-YPQ3_3Kd6ehj4vU4c</id><updated>2013-07-30T14:50:52.436Z</updated><title>My First Document</title><content>Deleted</content><batch:id>1</batch:id><batch:status code='200' reason='Success'/><batch:operation type='delete'/></entry></feed>
+
+> POST /feeds/default/private/full/batch HTTP/1.1
+> Soup-Debug-Timestamp: 1375195852
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 14 (0x6d13a0), SoupSocket 8 (0x8de8e0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>Batch operation feed</title><id>batch1</id><updated>2013-07-30T14:50:52Z</updated><entry xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1RbExJNGit7ImBk"'><title type='text'>I'm a poet and I didn't know it</title><id>https://docs.google.com/feeds/id/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8</id><updated>2013-07-30T14:50:49Z</updated><published>2013-07-30T14:50:49Z</published><content type='text/plain' src='https://docs.google.com/feeds/download/documents/export/Export?id=1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8'/><category term='http://schemas.google.com/docs/2007#document' scheme='http://schemas.google.com/g/2005#kind'/><category term='http://schemas.google.com/g/2005/labels#viewed' scheme='http://schemas.google.com/g/2005/labels' label='viewed'/><category term='http://schemas.google.com/g/2005/labels#modified-by-me' scheme='http://schemas.google.com/g/2005/labels' label='modified-by-me'/><link href='https://docs.google.com/document/d/1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8/edit?usp=docslist_api' rel='http://www.iana.org/assignments/relation/alternate' type='text/html'/><link href='https://docs.google.com/document/d/1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8/preview' rel='http://schemas.google.com/docs/2007#embed' type='text/html'/><link href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png' rel='http://schemas.google.com/docs/2007#icon' type='image/png'/><link href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8' rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml'/><link href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8' rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8' rel='http://www.iana.org/assignments/relation/self' type='application/atom+xml'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8' rel='http://www.iana.org/assignments/relation/edit' type='application/atom+xml'/><link href='https://docs.google.com/feeds/default/media/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8' rel='http://www.iana.org/assignments/relation/edit-media' type='text/html'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8/acl' rel='http://schemas.google.com/acl/2007#accessControlList'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8/revisions' rel='http://schemas.google.com/docs/2007/revisions'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><batch:id>1</batch:id><batch:operation type='update'/><docs:writersCanInvite value='false'/><gd:resourceId>document:1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8</gd:resourceId><docs:isShareable value="true"/><docs:isShareableByMe value="true"/><docs:modifiedByMeDate>2013-07-30T14:50:49.899Z</docs:modifiedByMeDate></entry></feed>
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195852
+< Soup-Debug: SoupMessage 14 (0x6d13a0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< GData-Version: 3.0
+< Date: Tue, 30 Jul 2013 14:50:52 GMT
+< Expires: Tue, 30 Jul 2013 14:50:52 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005'><id>https://docs.google.com/feeds/id/batch/1375195852918</id><updated>2013-07-30T14:50:52.977Z</updated><title>Batch operation feed</title><entry><id>https://docs.google.com/feeds/id/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8</id><updated>2013-07-30T14:50:52.977Z</updated><title>Error</title><content>Mismatch: etags = ["A1RbExJNGit7ImBk"], version = [hjr83qhd]</content><batch:id>1</batch:id><batch:status code='412' reason='Mismatch: etags = ["A1RbExJNGit7ImBk"], version = [hjr83qhd]'/><batch:operation type='update'/></entry></feed>
+
+> POST /feeds/default/private/full/batch HTTP/1.1
+> Soup-Debug-Timestamp: 1375195853
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 15 (0x6d1580), SoupSocket 9 (0x8debe0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>Batch operation feed</title><id>batch1</id><updated>2013-07-30T14:50:52Z</updated><entry xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1RbEwxSEyt7ImBk"'><title type='text'>War & Peace</title><id>https://docs.google.com/feeds/id/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8</id><updated>2013-07-30T14:50:51Z</updated><published>2013-07-30T14:50:49Z</published><content type='text/plain' src='https://docs.google.com/feeds/download/documents/export/Export?id=1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8'/><category term='http://schemas.google.com/docs/2007#document' scheme='http://schemas.google.com/g/2005#kind'/><category term='http://schemas.google.com/g/2005/labels#viewed' scheme='http://schemas.google.com/g/2005/labels' label='viewed'/><category term='http://schemas.google.com/g/2005/labels#modified-by-me' scheme='http://schemas.google.com/g/2005/labels' label='modified-by-me'/><link href='https://docs.google.com/document/d/1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8/edit?usp=docslist_api' rel='http://www.iana.org/assignments/relation/alternate' type='text/html'/><link href='https://docs.google.com/document/d/1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8/preview' rel='http://schemas.google.com/docs/2007#embed' type='text/html'/><link href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png' rel='http://schemas.google.com/docs/2007#icon' type='image/png'/><link href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8' rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml'/><link href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8' rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml'/><link href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8&v=2&s=AMedNnoAAAAAUffu7CNH-y2a6W9_5yBTO3LCLSTl-BNQ&sz=s220' rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8' rel='http://www.iana.org/assignments/relation/self' type='application/atom+xml'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8' rel='http://www.iana.org/assignments/relation/edit' type='application/atom+xml'/><link href='https://docs.google.com/feeds/default/media/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8' rel='http://www.iana.org/assignments/relation/edit-media' type='text/html'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8/acl' rel='http://schemas.google.com/acl/2007#accessControlList'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8/revisions' rel='http://schemas.google.com/docs/2007/revisions'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><batch:id>1</batch:id><batch:operation type='delete'/><docs:writersCanInvite value='false'/><gd:resourceId>document:1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8</gd:resourceId><docs:isShareable value="true"/><docs:isShareableByMe value="true"/><docs:modifiedByMeDate>2013-07-30T14:50:51.977Z</docs:modifiedByMeDate></entry></feed>
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195853
+< Soup-Debug: SoupMessage 15 (0x6d1580)
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< GData-Version: 3.0
+< Date: Tue, 30 Jul 2013 14:50:53 GMT
+< Expires: Tue, 30 Jul 2013 14:50:53 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005'><id>https://docs.google.com/feeds/id/batch/1375195853468</id><updated>2013-07-30T14:50:53.696Z</updated><title>Batch operation feed</title><entry><id>https://docs.google.com/feeds/id/document%3A1y64NGPQKt4INlQx3kP0lNqTgch7DcoePnQCj8ltAKM8</id><updated>2013-07-30T14:50:53.696Z</updated><title>War & Peace</title><content>Deleted</content><batch:id>1</batch:id><batch:status code='200' reason='Success'/><batch:operation type='delete'/></entry></feed>
+
--- /dev/null
+> POST /feeds/default/private/full/batch HTTP/1.1
+> Soup-Debug-Timestamp: 1375196002
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 150 (0x7fffe001c730), SoupSocket 48 (0x7fffd80106e0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>Batch operation feed</title><id>batch1</id><updated>2013-07-30T14:53:22Z</updated><entry><title type='text'>Batch operation query</title><id>https://docs.google.com/feeds/default/private/full/document%3A1IIWMXK-F9LvFkSAfZeJpdUObsURIlO2NWQ-YI8SO9Zs</id><updated>2013-07-30T14:53:22Z</updated><batch:id>1</batch:id><batch:operation type='query'/></entry></feed>
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375196002
+< Soup-Debug: SoupMessage 150 (0x7fffe001c730)
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< GData-Version: 3.0
+< Date: Tue, 30 Jul 2013 14:53:22 GMT
+< Expires: Tue, 30 Jul 2013 14:53:22 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005'><id>https://docs.google.com/feeds/id/batch/1375196002763</id><updated>2013-07-30T14:53:22.830Z</updated><title>Batch operation feed</title><entry gd:etag='"A1RbFgReFCt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY</id><published>2013-07-30T14:53:24.109Z</published><updated>2013-07-30T14:53:24.800Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:24.844Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>A View from the Bridge</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:24.800Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:24.370Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><batch:id>1</batch:id><batch:status code='200' reason='Success'/><batch:operation type='query'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY/revisions'/></entry></feed>
+
--- /dev/null
+> POST /feeds/default/private/full HTTP/1.1
+> Soup-Debug-Timestamp: 1375195842
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 4 (0x6d13a0), SoupSocket 2 (0x8ded60)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005' xmlns:batch='http://schemas.google.com/gdata/batch' gd:etag='"A1RbExsIHit7ImBk"'><title type='text'>Temporary Document (Spreadsheet)</title><id>https://docs.google.com/feeds/id/spreadsheet%3A0AjY2jgHHwMwYdDJya2c0TFVPOU1ycVhiZm5BdFRMYVE</id><updated>2013-07-30T14:50:35Z</updated><published>2013-07-30T14:50:35Z</published><content type='text/plain' src='https://docs.google.com/feeds/download/spreadsheets/Export?key=0AjY2jgHHwMwYdDJya2c0TFVPOU1ycVhiZm5BdFRMYVE'/><category term='http://schemas.google.com/docs/2007#spreadsheet' scheme='http://schemas.google.com/g/2005#kind'/><category term='http://schemas.google.com/g/2005/labels#viewed' scheme='http://schemas.google.com/g/2005/labels' label='viewed'/><link href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdDJya2c0TFVPOU1ycVhiZm5BdFRMYVE&usp=docslist_api' rel='http://www.iana.org/assignments/relation/alternate' type='text/html'/><link href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdDJya2c0TFVPOU1ycVhiZm5BdFRMYVE&output=html&chrome=false&widget=true' rel='http://schemas.google.com/docs/2007#embed' type='text/html'/><link href='https://ssl.gstatic.com/docs/doclist/images/icon_11_spreadsheet_list.png' rel='http://schemas.google.com/docs/2007#icon' type='image/png'/><link href='https://docs.google.com/feeds/upload/create-session/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdDJya2c0TFVPOU1ycVhiZm5BdFRMYVE' rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml'/><link href='https://docs.google.com/feeds/upload/file/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdDJya2c0TFVPOU1ycVhiZm5BdFRMYVE' rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml'/><link href='https://spreadsheets.google.com/feeds/worksheets/0AjY2jgHHwMwYdDJya2c0TFVPOU1ycVhiZm5BdFRMYVE/private/full' rel='http://schemas.google.com/spreadsheets/2006#worksheetsfeed' type='application/atom+xml'/><link href='https://spreadsheets.google.com/feeds/0AjY2jgHHwMwYdDJya2c0TFVPOU1ycVhiZm5BdFRMYVE/tables' rel='http://schemas.google.com/spreadsheets/2006#tablesfeed' type='application/atom+xml'/><link href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdDJya2c0TFVPOU1ycVhiZm5BdFRMYVE' rel='http://www.iana.org/assignments/relation/self' type='application/atom+xml'/><link href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdDJya2c0TFVPOU1ycVhiZm5BdFRMYVE' rel='http://www.iana.org/assignments/relation/edit' type='application/atom+xml'/><link href='https://docs.google.com/feeds/default/media/spreadsheet%3A0AjY2jgHHwMwYdDJya2c0TFVPOU1ycVhiZm5BdFRMYVE' rel='http://www.iana.org/assignments/relation/edit-media' type='text/html'/><link href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdDJya2c0TFVPOU1ycVhiZm5BdFRMYVE/acl' rel='http://schemas.google.com/acl/2007#accessControlList'/><link href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdDJya2c0TFVPOU1ycVhiZm5BdFRMYVE/revisions' rel='http://schemas.google.com/docs/2007/revisions'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><docs:writersCanInvite value='false'/><gd:resourceId>spreadsheet:0AjY2jgHHwMwYdDJya2c0TFVPOU1ycVhiZm5BdFRMYVE</gd:resourceId><docs:isShareable value="true"/><docs:isShareableByMe value="true"/><docs:hasForm value="false"/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375195844
+< Soup-Debug: SoupMessage 4 (0x6d13a0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Tue, 30 Jul 2013 14:50:44 GMT
+< Date: Tue, 30 Jul 2013 14:50:44 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1RbExYMECt7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE
+< Content-Location: https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1RbExYMECt7ImBk"'><id>https://docs.google.com/feeds/id/spreadsheet%3A0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE</id><published>2013-07-30T14:50:43.812Z</published><updated>2013-07-30T14:50:43.403Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:50:43.816Z</app:edited><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#spreadsheet' label='spreadsheet'/><title>Temporary Document (Spreadsheet)</title><content type='text/html' src='https://docs.google.com/feeds/download/spreadsheets/Export?key=0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE'/><link rel='alternate' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE&output=html&chrome=false&widget=true'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_spreadsheet_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE'/><link rel='http://schemas.google.com/spreadsheets/2006#worksheetsfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/worksheets/0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE/private/full'/><link rel='http://schemas.google.com/spreadsheets/2006#tablesfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE/tables'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/spreadsheet%3A0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>spreadsheet:0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:50:43.613Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><docs:hasForm value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE/revisions'/></entry>
+
--- /dev/null
+> DELETE /feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE HTTP/1.1
+> Soup-Debug-Timestamp: 1375195864
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 19 (0x6d11c0), SoupSocket 10 (0x7fffd8010260)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> If-Match: "A1RbEwtDBSt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195865
+< Soup-Debug: SoupMessage 19 (0x6d11c0)
+< GData-Version: 3.0
+< Date: Tue, 30 Jul 2013 14:51:05 GMT
+< Expires: Tue, 30 Jul 2013 14:51:05 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
+> GET /feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE HTTP/1.1
+> Soup-Debug-Timestamp: 1375195865
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 20 (0x6d1760), SoupSocket 10 (0x7fffd8010260)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195865
+< Soup-Debug: SoupMessage 20 (0x6d1760)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Tue, 30 Jul 2013 14:51:05 GMT
+< Date: Tue, 30 Jul 2013 14:51:05 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1RbFE1RRSt7ImBk"
+< Last-Modified: Tue, 30 Jul 2013 14:51:05 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1RbFAkMBit7ImBk"'><id>https://docs.google.com/feeds/id/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE</id><published>2013-07-30T14:51:41.329Z</published><updated>2013-07-30T14:51:41.329Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:51:42.146Z</app:edited><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#spreadsheet' label='spreadsheet'/><title>Temporary Document (Spreadsheet)</title><content type='text/html' src='https://docs.google.com/feeds/download/spreadsheets/Export?key=0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE'/><link rel='alternate' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE&output=html&chrome=false&widget=true'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_spreadsheet_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE'/><link rel='http://schemas.google.com/spreadsheets/2006#worksheetsfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/worksheets/0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE/private/full'/><link rel='http://schemas.google.com/spreadsheets/2006#tablesfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE/tables'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>spreadsheet:0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE</gd:resourceId><gd:deleted/><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:51:41.329Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><docs:isExplicitlyTrashed value='true'/><docs:hasForm value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE/revisions'/></entry>
+
--- /dev/null
+> DELETE /feeds/default/private/full/folder%3A0BzY2jgHHwMwYRHphWkhpNVZQZG8 HTTP/1.1
+> Soup-Debug-Timestamp: 1375195866
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 22 (0x6d1580), SoupSocket 11 (0x8deb20)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> If-Match: "A1RbFExWHit7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195867
+< Soup-Debug: SoupMessage 22 (0x6d1580)
+< GData-Version: 3.0
+< Date: Tue, 30 Jul 2013 14:51:07 GMT
+< Expires: Tue, 30 Jul 2013 14:51:07 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
+> GET /feeds/default/private/full/folder%3A0BzY2jgHHwMwYRHphWkhpNVZQZG8 HTTP/1.1
+> Soup-Debug-Timestamp: 1375195867
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 23 (0x6d1760), SoupSocket 11 (0x8deb20)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195867
+< Soup-Debug: SoupMessage 23 (0x6d1760)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Tue, 30 Jul 2013 14:51:07 GMT
+< Date: Tue, 30 Jul 2013 14:51:07 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1RbFE9eGSt7ImBk"
+< Last-Modified: Tue, 30 Jul 2013 14:51:07 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1RbFhdWBSt7ImBk"'><id>https://docs.google.com/feeds/id/folder%3A0BzY2jgHHwMwYRHphWkhpNVZQZG8</id><published>2013-07-30T14:53:02.725Z</published><updated>2013-07-30T14:53:02.725Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:03.039Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#folder' label='folder'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#trashed' label='trashed'/><title>Temporary Folder</title><content type='application/atom+xml;type=feed' src='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYRHphWkhpNVZQZG8/contents'/><link rel='alternate' type='text/html' href='https://docs.google.com/folderview?id=0BzY2jgHHwMwYRHphWkhpNVZQZG8&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_collection_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYRHphWkhpNVZQZG8/contents'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/folder%3A0BzY2jgHHwMwYRHphWkhpNVZQZG8/contents'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYRHphWkhpNVZQZG8'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYRHphWkhpNVZQZG8'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>folder:0BzY2jgHHwMwYRHphWkhpNVZQZG8</gd:resourceId><gd:deleted/><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><docs:isExplicitlyTrashed value='true'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYRHphWkhpNVZQZG8/acl'/></entry>
+
--- /dev/null
+> GET /feeds/download/spreadsheets/Export?key=0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E&exportFormat=ods HTTP/1.1
+> Soup-Debug-Timestamp: 1375195883
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 31 (0x6d10d0), SoupSocket 16 (0x7fffd8010320)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAACMkK1s6OCFjFcAxKUU5mEIajhtGaUhpMwSRvKWhDeSTIEJwXn7F-7HEsI77gfqmmaos6z2_KcJteB_2mcDgHRq7GMJr8hC6GtoSlcMmQC_NUNKEA50gDu5edh-iZJZQv2mlM32ozxcJ-_7Blg84dKUDCNdrtMHgz4tQk28iKyoEBohv7svUi_qhyoqCNaM9R6OlFSwAT3pXrYwKBJ2i3MvyqpMvjIl97GPgqBIN5ZsOpDoIg94Gr4NncSOQ6VkmzxbKRZjLYx8nnNj5HYNGpDZ
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195885
+< Soup-Debug: SoupMessage 31 (0x6d10d0)
+< Content-Type: application/x-vnd.oasis.opendocument.spreadsheet; charset=UTF-8
+< Content-Length: 4035
+< Content-Disposition: attachment; filename="Temporary%20Spreadsheet.ods"
+< Set-Cookie: NID=67=vhPVtzuBWc4yYfTGngSst5BcSCPUBKJswk3GDWUqaf1xRWqkzu9QgAHpjrsqDkdNYJGMUT1s7rz1Tjz3AReQU27WfSS63a6q70jf0VFiSbpVyVrIe3gq9rhmeB--O3gO;Domain=.google.com;Path=/;Expires=Wed, 29-Jan-2014 14:51:25 GMT;HttpOnly
+< P3P: CP="This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657 for more info."
+< Date: Tue, 30 Jul 2013 14:51:25 GMT
+< Expires: Tue, 30 Jul 2013 14:51:25 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+<
+< PK\ 3\ 4\14
+
+> GET /feeds/download/presentations/Export?id=1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA&exportFormat=ppt HTTP/1.1
+> Soup-Debug-Timestamp: 1375195885
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 32 (0x6d11c0), SoupSocket 16 (0x7fffd8010320)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195886
+< Soup-Debug: SoupMessage 32 (0x6d11c0)
+< Content-Type: application/vnd.openxmlformats-officedocument.presentationml.presentation
+< X-Robots-Tag: noindex, nofollow, nosnippet
+< Cache-control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Tue, 30 Jul 2013 14:51:26 GMT
+< Content-Disposition: attachment; filename="TemporaryPresentation.pptx"; filename*=UTF-8''Temporary%20Presentation.pptx
+< Transfer-Encoding: chunked
+< Set-Cookie: NID=67=dzknxH0TWJNvzbyjapSXqOQDiH08Zxtl2LAXY4uxQdtKSVE2WHhQqntr1Yr-Fk5badiNhDhfYwUzNQHxJQQqDD2FT-3-JKKVB9yc-hAsiNZ8YBNu2gae-F4E6FRGmy4E;Domain=.google.com;Path=/;Expires=Wed, 29-Jan-2014 14:51:26 GMT;HttpOnly
+< P3P: CP="This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657 for more info."
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+<
+< PK\ 3\ 4\14
+
+> GET /feeds/download/documents/export/Export?id=1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI&exportFormat=odt HTTP/1.1
+> Soup-Debug-Timestamp: 1375195886
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 33 (0x6d12b0), SoupSocket 16 (0x7fffd8010320)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195886
+< Soup-Debug: SoupMessage 33 (0x6d12b0)
+< Content-Type: application/vnd.oasis.opendocument.text; charset=utf-8
+< X-Robots-Tag: noindex, nofollow, nosnippet
+< Content-Disposition: attachment;filename="TemporaryTextDocument.odt"
+< Transfer-Encoding: chunked
+< Set-Cookie: NID=67=D-3LDP9kisd9o3QFZiwo2pua5Z2gwlduhIdkWM2utCqsJdM-Pc3WvfAbKMA2WgdeYvu0mF0vUg4uPodp1XEmBwAixL6rvxZAQK-LJ-hdbofER4o5EcpMe6qetNrJnwlg;Domain=.google.com;Path=/;Expires=Wed, 29-Jan-2014 14:51:27 GMT;HttpOnly
+< P3P: CP="This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657 for more info."
+< Date: Tue, 30 Jul 2013 14:51:27 GMT
+< Expires: Tue, 30 Jul 2013 14:51:27 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+<
+< PK\ 3\ 4
+
+> GET /feeds/download/documents/export/Export?id=1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc&exportFormat=odt HTTP/1.1
+> Soup-Debug-Timestamp: 1375195886
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 34 (0x6d12b0), SoupSocket 16 (0x7fffd8010320)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195887
+< Soup-Debug: SoupMessage 34 (0x6d12b0)
+< Content-Type: application/vnd.oasis.opendocument.text; charset=utf-8
+< X-Robots-Tag: noindex, nofollow, nosnippet
+< Content-Disposition: attachment;filename="TemporaryArbitraryDocument.odt"
+< Transfer-Encoding: chunked
+< Set-Cookie: NID=67=WqAo8_yOrXKTmv1DFV5HvHy6cQJCjld-oixqIPGDElFOqnPirwAwGVHb5HKsHDsHhQrCsbG22vWfT5aRlXc8uJ3TNN_Wifct8RnKeA1nnZhnvmnLsjsYQqQX2xxweM_v;Domain=.google.com;Path=/;Expires=Wed, 29-Jan-2014 14:51:27 GMT;HttpOnly
+< P3P: CP="This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657 for more info."
+< Date: Tue, 30 Jul 2013 14:51:27 GMT
+< Expires: Tue, 30 Jul 2013 14:51:27 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+<
+< PK\ 3\ 4
+
--- /dev/null
+> POST /feeds/default/private/full/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE/contents HTTP/1.1
+> Soup-Debug-Timestamp: 1375345534
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 4 (0x922190), SoupSocket 3 (0x7be3b0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAACKhOa-WK3N6akB7d7kKA0laUmnO2zgJ6O4seqRp4zTd7KBlc6xHcjduCp-bFT9vlSm4Z0ofb0s5sLLE2WlntM9TyOIVsQvhiq-Vp7hgMUcmhbj68uTp8IWx17waXHY8zAdgC-AU_5BpYj07dAr2TiEHALTFabaz75_tlNZyWiNJbnb9DbKfUfHOFI8WnE5ueYrwUvevYqZ9KPq6BPOnPHluKUlt4wFyZ2_PqyFEjgsvpr4xzmNjLGWuH75fDQef9D7YcrEIHArYGHxIbiElG-x
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005' xmlns:batch='http://schemas.google.com/gdata/batch' gd:etag='"A1ITFwlIGSt7ImBk"'><title type='text'>add_file_folder_move_text</title><id>https://docs.google.com/feeds/id/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc</id><updated>2013-08-01T08:25:28Z</updated><published>2013-08-01T08:25:27Z</published><content type='text/plain' src='https://docs.google.com/feeds/download/documents/export/Export?id=1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><category term='http://schemas.google.com/docs/2007#document' scheme='http://schemas.google.com/g/2005#kind'/><category term='http://schemas.google.com/g/2005/labels#viewed' scheme='http://schemas.google.com/g/2005/labels' label='viewed'/><category term='http://schemas.google.com/g/2005/labels#modified-by-me' scheme='http://schemas.google.com/g/2005/labels' label='modified-by-me'/><link href='https://docs.google.com/document/d/1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/edit?usp=docslist_api' rel='http://www.iana.org/assignments/relation/alternate' type='text/html'/><link href='https://docs.google.com/document/d/1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/preview' rel='http://schemas.google.com/docs/2007#embed' type='text/html'/><link href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png' rel='http://schemas.google.com/docs/2007#icon' type='image/png'/><link href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc' rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml'/><link href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc' rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml'/><link href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc&v=1&s=AMedNnoAAAAAUfo3nRv4ToTMmD8k5BosEeVOhxLDhL8W&sz=s220' rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc' rel='http://www.iana.org/assignments/relation/self' type='application/atom+xml'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc' rel='http://www.iana.org/assignments/relation/edit' type='application/atom+xml'/><link href='https://docs.google.com/feeds/default/media/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc' rel='http://www.iana.org/assignments/relation/edit-media' type='text/html'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/acl' rel='http://schemas.google.com/acl/2007#accessControlList'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/revisions' rel='http://schemas.google.com/docs/2007/revisions'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><docs:writersCanInvite value='false'/><gd:resourceId>document:1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc</gd:resourceId><docs:isShareable value="true"/><docs:isShareableByMe value="true"/><docs:modifiedByMeDate>2013-08-01T08:25:28.237Z</docs:modifiedByMeDate></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375345534
+< Soup-Debug: SoupMessage 4 (0x922190)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:25:34 GMT
+< Date: Thu, 01 Aug 2013 08:25:34 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1ITFwQIBCt7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE/contents/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc
+< Content-Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE/contents/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1ITFwQIBCt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc</id><published>2013-08-01T08:25:27.732Z</published><updated>2013-08-01T08:25:28.237Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:25:34.276Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>add_file_folder_move_text</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='http://schemas.google.com/docs/2007#parent' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE' title='add_file_folder_move_folder'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc&v=1&s=AMedNnoAAAAAUfo3nqqaTU_LNA-TFCsxwffSEEEDx2eP&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE/contents/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE/contents/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/contentmedia/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:25:28.237Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:25:28.237Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/revisions'/></entry>
+
--- /dev/null
+> DELETE /feeds/default/private/full/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0/contents/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc HTTP/1.1
+> Soup-Debug-Timestamp: 1375345544
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 12 (0x922280), SoupSocket 5 (0x7be470)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAACKhOa-WK3N6akB7d7kKA0laUmnO2zgJ6O4seqRp4zTd7KBlc6xHcjduCp-bFT9vlSm4Z0ofb0s5sLLE2WlntM9TyOIVsQvhiq-Vp7hgMUcmhbj68uTp8IWx17waXHY8zAdgC-AU_5BpYj07dAr2TiEHALTFabaz75_tlNZyWiNJbnb9DbKfUfHOFI8WnE5ueYrwUvevYqZ9KPq6BPOnPHluKUlt4wFyZ2_PqyFEjgsvpr4xzmNjLGWuH75fDQef9D7YcrEIHArYGHxIbiElG-x
+> GData-Version: 3
+> If-Match: "A1ITGExXBit7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375345544
+< Soup-Debug: SoupMessage 12 (0x922280)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 08:25:44 GMT
+< Expires: Thu, 01 Aug 2013 08:25:44 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
+> GET /feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc HTTP/1.1
+> Soup-Debug-Timestamp: 1375345544
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 13 (0x922550), SoupSocket 5 (0x7be470)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAACKhOa-WK3N6akB7d7kKA0laUmnO2zgJ6O4seqRp4zTd7KBlc6xHcjduCp-bFT9vlSm4Z0ofb0s5sLLE2WlntM9TyOIVsQvhiq-Vp7hgMUcmhbj68uTp8IWx17waXHY8zAdgC-AU_5BpYj07dAr2TiEHALTFabaz75_tlNZyWiNJbnb9DbKfUfHOFI8WnE5ueYrwUvevYqZ9KPq6BPOnPHluKUlt4wFyZ2_PqyFEjgsvpr4xzmNjLGWuH75fDQef9D7YcrEIHArYGHxIbiElG-x
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375345544
+< Soup-Debug: SoupMessage 13 (0x922550)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:25:44 GMT
+< Date: Thu, 01 Aug 2013 08:25:44 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1ITGEhPQCt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 08:25:44 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1ITGEhPQCt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc</id><published>2013-08-01T08:25:37.674Z</published><updated>2013-08-01T08:25:38.117Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:25:44.335Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>add_file_folder_move_text</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc&v=1&s=AMedNnoAAAAAUfo3qAW7ITd4PVLgFrWf6qLDse-NfL8W&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:25:38.117Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:25:38.117Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/default/private/full/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE/contents HTTP/1.1
+> Soup-Debug-Timestamp: 1375345554
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 21 (0x922730), SoupSocket 8 (0x7be770)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAACKhOa-WK3N6akB7d7kKA0laUmnO2zgJ6O4seqRp4zTd7KBlc6xHcjduCp-bFT9vlSm4Z0ofb0s5sLLE2WlntM9TyOIVsQvhiq-Vp7hgMUcmhbj68uTp8IWx17waXHY8zAdgC-AU_5BpYj07dAr2TiEHALTFabaz75_tlNZyWiNJbnb9DbKfUfHOFI8WnE5ueYrwUvevYqZ9KPq6BPOnPHluKUlt4wFyZ2_PqyFEjgsvpr4xzmNjLGWuH75fDQef9D7YcrEIHArYGHxIbiElG-x
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005' xmlns:batch='http://schemas.google.com/gdata/batch' gd:etag='"A1ITGEQCEit7ImBk"'><title type='text'>add_file_folder_move_text</title><id>https://docs.google.com/feeds/id/document%3A1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g</id><updated>2013-08-01T08:25:48Z</updated><published>2013-08-01T08:25:47Z</published><content type='text/plain' src='https://docs.google.com/feeds/download/documents/export/Export?id=1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g'/><category term='http://schemas.google.com/docs/2007#document' scheme='http://schemas.google.com/g/2005#kind'/><category term='http://schemas.google.com/g/2005/labels#viewed' scheme='http://schemas.google.com/g/2005/labels' label='viewed'/><category term='http://schemas.google.com/g/2005/labels#modified-by-me' scheme='http://schemas.google.com/g/2005/labels' label='modified-by-me'/><link href='https://docs.google.com/document/d/1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g/edit?usp=docslist_api' rel='http://www.iana.org/assignments/relation/alternate' type='text/html'/><link href='https://docs.google.com/document/d/1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g/preview' rel='http://schemas.google.com/docs/2007#embed' type='text/html'/><link href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png' rel='http://schemas.google.com/docs/2007#icon' type='image/png'/><link href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g' rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml'/><link href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g' rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml'/><link href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g&v=1&s=AMedNnoAAAAAUfo3saFWgkcN1pxIboct8XtS6YSi6iXA&sz=s220' rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g' rel='http://www.iana.org/assignments/relation/self' type='application/atom+xml'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g' rel='http://www.iana.org/assignments/relation/edit' type='application/atom+xml'/><link href='https://docs.google.com/feeds/default/media/document%3A1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g' rel='http://www.iana.org/assignments/relation/edit-media' type='text/html'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g/acl' rel='http://schemas.google.com/acl/2007#accessControlList'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g/revisions' rel='http://schemas.google.com/docs/2007/revisions'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><docs:writersCanInvite value='false'/><gd:resourceId>document:1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g</gd:resourceId><docs:isShareable value="true"/><docs:isShareableByMe value="true"/><docs:modifiedByMeDate>2013-08-01T08:25:48.292Z</docs:modifiedByMeDate></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375345554
+< Soup-Debug: SoupMessage 21 (0x922730)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:25:54 GMT
+< Date: Thu, 01 Aug 2013 08:25:54 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1ITGBlXHit7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE/contents/document%3A1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g
+< Content-Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE/contents/document%3A1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1ITGBlXHit7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g</id><published>2013-08-01T08:25:47.369Z</published><updated>2013-08-01T08:25:48.292Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:25:54.426Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>add_file_folder_move_text</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g'/><link rel='http://schemas.google.com/docs/2007#parent' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE' title='add_file_folder_move_folder'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g&v=1&s=AMedNnoAAAAAUfo3sn1IUqdFVrczicf9kjBPOoiohqiY&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE/contents/document%3A1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE/contents/document%3A1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/contentmedia/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE/document%3A1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:25:48.292Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:25:48.292Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1mao-yWrxtpQ895pJ4eVI_0772IwNb7bDNYbdAVOv37g/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/default/private/full/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE/contents HTTP/1.1
+> Soup-Debug-Timestamp: 1375345565
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 31 (0x7fffe40319d0), SoupSocket 13 (0x7fffe40048c0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAACKhOa-WK3N6akB7d7kKA0laUmnO2zgJ6O4seqRp4zTd7KBlc6xHcjduCp-bFT9vlSm4Z0ofb0s5sLLE2WlntM9TyOIVsQvhiq-Vp7hgMUcmhbj68uTp8IWx17waXHY8zAdgC-AU_5BpYj07dAr2TiEHALTFabaz75_tlNZyWiNJbnb9DbKfUfHOFI8WnE5ueYrwUvevYqZ9KPq6BPOnPHluKUlt4wFyZ2_PqyFEjgsvpr4xzmNjLGWuH75fDQef9D7YcrEIHArYGHxIbiElG-x
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005' xmlns:batch='http://schemas.google.com/gdata/batch' gd:etag='"A1ITGBVTEit7ImBk"'><title type='text'>add_file_folder_move_text</title><id>https://docs.google.com/feeds/id/document%3A1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc</id><updated>2013-08-01T08:25:58Z</updated><published>2013-08-01T08:25:57Z</published><content type='text/plain' src='https://docs.google.com/feeds/download/documents/export/Export?id=1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc'/><category term='http://schemas.google.com/docs/2007#document' scheme='http://schemas.google.com/g/2005#kind'/><category term='http://schemas.google.com/g/2005/labels#viewed' scheme='http://schemas.google.com/g/2005/labels' label='viewed'/><category term='http://schemas.google.com/g/2005/labels#modified-by-me' scheme='http://schemas.google.com/g/2005/labels' label='modified-by-me'/><link href='https://docs.google.com/document/d/1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc/edit?usp=docslist_api' rel='http://www.iana.org/assignments/relation/alternate' type='text/html'/><link href='https://docs.google.com/document/d/1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc/preview' rel='http://schemas.google.com/docs/2007#embed' type='text/html'/><link href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png' rel='http://schemas.google.com/docs/2007#icon' type='image/png'/><link href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc' rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml'/><link href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc' rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml'/><link href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc&v=1&s=AMedNnoAAAAAUfo3vOOV_1V1WJEYAQzyegHcjhiaGIrO&sz=s220' rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc' rel='http://www.iana.org/assignments/relation/self' type='application/atom+xml'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc' rel='http://www.iana.org/assignments/relation/edit' type='application/atom+xml'/><link href='https://docs.google.com/feeds/default/media/document%3A1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc' rel='http://www.iana.org/assignments/relation/edit-media' type='text/html'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc/acl' rel='http://schemas.google.com/acl/2007#accessControlList'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc/revisions' rel='http://schemas.google.com/docs/2007/revisions'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><docs:writersCanInvite value='false'/><gd:resourceId>document:1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc</gd:resourceId><docs:isShareable value="true"/><docs:isShareableByMe value="true"/><docs:modifiedByMeDate>2013-08-01T08:25:58.773Z</docs:modifiedByMeDate></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375345566
+< Soup-Debug: SoupMessage 31 (0x7fffe40319d0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:26:06 GMT
+< Date: Thu, 01 Aug 2013 08:26:06 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1ITGBBRDSt7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE/contents/document%3A1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc
+< Content-Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE/contents/document%3A1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1ITGBBRDSt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc</id><published>2013-08-01T08:25:57.548Z</published><updated>2013-08-01T08:25:58.773Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:26:06.035Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>add_file_folder_move_text</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc'/><link rel='http://schemas.google.com/docs/2007#parent' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE' title='add_file_folder_move_folder'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc&v=1&s=AMedNnoAAAAAUfo3vjp_GBaTCv1z9hhbb1m8VivmUXXj&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE/contents/document%3A1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE/contents/document%3A1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/contentmedia/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE/document%3A1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:25:58.773Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:25:58.773Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1-tQ13xX6sorg3F8RpKWjZswUPlb4igS5XNMU9JUdnXc/revisions'/></entry>
+
--- /dev/null
+> DELETE /feeds/default/private/full/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0/contents/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc HTTP/1.1
+> Soup-Debug-Timestamp: 1375345576
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 39 (0x7fffe4031ac0), SoupSocket 15 (0x7fffe40048c0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAACKhOa-WK3N6akB7d7kKA0laUmnO2zgJ6O4seqRp4zTd7KBlc6xHcjduCp-bFT9vlSm4Z0ofb0s5sLLE2WlntM9TyOIVsQvhiq-Vp7hgMUcmhbj68uTp8IWx17waXHY8zAdgC-AU_5BpYj07dAr2TiEHALTFabaz75_tlNZyWiNJbnb9DbKfUfHOFI8WnE5ueYrwUvevYqZ9KPq6BPOnPHluKUlt4wFyZ2_PqyFEjgsvpr4xzmNjLGWuH75fDQef9D7YcrEIHArYGHxIbiElG-x
+> GData-Version: 3
+> If-Match: "A1ITGAxfRyt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375345576
+< Soup-Debug: SoupMessage 39 (0x7fffe4031ac0)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 08:26:16 GMT
+< Expires: Thu, 01 Aug 2013 08:26:16 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
+> GET /feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc HTTP/1.1
+> Soup-Debug-Timestamp: 1375345576
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 40 (0x7fffe40318e0), SoupSocket 15 (0x7fffe40048c0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAACKhOa-WK3N6akB7d7kKA0laUmnO2zgJ6O4seqRp4zTd7KBlc6xHcjduCp-bFT9vlSm4Z0ofb0s5sLLE2WlntM9TyOIVsQvhiq-Vp7hgMUcmhbj68uTp8IWx17waXHY8zAdgC-AU_5BpYj07dAr2TiEHALTFabaz75_tlNZyWiNJbnb9DbKfUfHOFI8WnE5ueYrwUvevYqZ9KPq6BPOnPHluKUlt4wFyZ2_PqyFEjgsvpr4xzmNjLGWuH75fDQef9D7YcrEIHArYGHxIbiElG-x
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375345576
+< Soup-Debug: SoupMessage 40 (0x7fffe40318e0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:26:16 GMT
+< Date: Thu, 01 Aug 2013 08:26:16 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1ITGAhQQit7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 08:26:16 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1ITGAhQQit7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc</id><published>2013-08-01T08:26:09.580Z</published><updated>2013-08-01T08:26:10.045Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:26:16.337Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>add_file_folder_move_text</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc&v=1&s=AMedNnoAAAAAUfo3yDecmP7o92nowatld0tAnhFqIHRK&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:26:10.045Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:26:10.045Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/revisions'/></entry>
+
--- /dev/null
+> DELETE /feeds/default/private/full/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0/contents/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc HTTP/1.1
+> Soup-Debug-Timestamp: 1375345588
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 56 (0x922640), SoupSocket 20 (0x7fffe40048c0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAACKhOa-WK3N6akB7d7kKA0laUmnO2zgJ6O4seqRp4zTd7KBlc6xHcjduCp-bFT9vlSm4Z0ofb0s5sLLE2WlntM9TyOIVsQvhiq-Vp7hgMUcmhbj68uTp8IWx17waXHY8zAdgC-AU_5BpYj07dAr2TiEHALTFabaz75_tlNZyWiNJbnb9DbKfUfHOFI8WnE5ueYrwUvevYqZ9KPq6BPOnPHluKUlt4wFyZ2_PqyFEjgsvpr4xzmNjLGWuH75fDQef9D7YcrEIHArYGHxIbiElG-x
+> GData-Version: 3
+> If-Match: "A1ITGU5LRit7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375345589
+< Soup-Debug: SoupMessage 56 (0x922640)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 08:26:29 GMT
+< Expires: Thu, 01 Aug 2013 08:26:29 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
+> GET /feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc HTTP/1.1
+> Soup-Debug-Timestamp: 1375345589
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 57 (0x7fffe4031ac0), SoupSocket 20 (0x7fffe40048c0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAACKhOa-WK3N6akB7d7kKA0laUmnO2zgJ6O4seqRp4zTd7KBlc6xHcjduCp-bFT9vlSm4Z0ofb0s5sLLE2WlntM9TyOIVsQvhiq-Vp7hgMUcmhbj68uTp8IWx17waXHY8zAdgC-AU_5BpYj07dAr2TiEHALTFabaz75_tlNZyWiNJbnb9DbKfUfHOFI8WnE5ueYrwUvevYqZ9KPq6BPOnPHluKUlt4wFyZ2_PqyFEjgsvpr4xzmNjLGWuH75fDQef9D7YcrEIHArYGHxIbiElG-x
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375345589
+< Soup-Debug: SoupMessage 57 (0x7fffe4031ac0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:26:29 GMT
+< Date: Thu, 01 Aug 2013 08:26:29 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1ITGUlZASt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 08:26:29 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1ITGUlZASt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc</id><published>2013-08-01T08:26:19.839Z</published><updated>2013-08-01T08:26:20.629Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:26:29.071Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>add_file_folder_move_text</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc&v=2&s=AMedNnoAAAAAUfo31SoZ9Tv0o1wmm59td5u-lRN3LJF6&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:26:20.629Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:26:20.282Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/revisions'/></entry>
+
--- /dev/null
+> GET /feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc HTTP/1.1
+> Soup-Debug-Timestamp: 1375345576
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 41 (0x922190), SoupSocket 15 (0x7fffe40048c0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAACKhOa-WK3N6akB7d7kKA0laUmnO2zgJ6O4seqRp4zTd7KBlc6xHcjduCp-bFT9vlSm4Z0ofb0s5sLLE2WlntM9TyOIVsQvhiq-Vp7hgMUcmhbj68uTp8IWx17waXHY8zAdgC-AU_5BpYj07dAr2TiEHALTFabaz75_tlNZyWiNJbnb9DbKfUfHOFI8WnE5ueYrwUvevYqZ9KPq6BPOnPHluKUlt4wFyZ2_PqyFEjgsvpr4xzmNjLGWuH75fDQef9D7YcrEIHArYGHxIbiElG-x
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375345577
+< Soup-Debug: SoupMessage 41 (0x922190)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:26:16 GMT
+< Date: Thu, 01 Aug 2013 08:26:16 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1ITGAhQQit7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 08:26:16 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1ITGAhQQit7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc</id><published>2013-08-01T08:26:09.580Z</published><updated>2013-08-01T08:26:10.045Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:26:16.337Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>add_file_folder_move_text</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc&v=1&s=AMedNnoAAAAAUfo3yDecmP7o92nowatld0tAnhFqIHRK&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:26:10.045Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:26:10.045Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/revisions'/></entry>
+
+> GET /feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc HTTP/1.1
+> Soup-Debug-Timestamp: 1375345576
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 41 (0x922190), SoupSocket 15 (0x7fffe40048c0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAACKhOa-WK3N6akB7d7kKA0laUmnO2zgJ6O4seqRp4zTd7KBlc6xHcjduCp-bFT9vlSm4Z0ofb0s5sLLE2WlntM9TyOIVsQvhiq-Vp7hgMUcmhbj68uTp8IWx17waXHY8zAdgC-AU_5BpYj07dAr2TiEHALTFabaz75_tlNZyWiNJbnb9DbKfUfHOFI8WnE5ueYrwUvevYqZ9KPq6BPOnPHluKUlt4wFyZ2_PqyFEjgsvpr4xzmNjLGWuH75fDQef9D7YcrEIHArYGHxIbiElG-x
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375345577
+< Soup-Debug: SoupMessage 41 (0x922190)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:26:16 GMT
+< Date: Thu, 01 Aug 2013 08:26:16 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1ITGAhQQit7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 08:26:16 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1ITGAhQQit7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc</id><published>2013-08-01T08:26:09.580Z</published><updated>2013-08-01T08:26:10.045Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:26:16.337Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>add_file_folder_move_text</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc&v=1&s=AMedNnoAAAAAUfo3yDecmP7o92nowatld0tAnhFqIHRK&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:26:10.045Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:26:10.045Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/revisions'/></entry>
+
--- /dev/null
+> POST /accounts/ClientLogin HTTP/1.1
+> Soup-Debug-Timestamp: 1375345525
+> Soup-Debug: SoupSession 1 (0x65a1d0), SoupMessage 1 (0x9220a0), SoupSocket 1 (0x7be0b0)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> accountType=HOSTED%5FOR%5FGOOGLE&Email=libgdata%2Edocuments%40gmail%2Ecom&Passwd=gdata%2Dgdata&service=writely&source=ytapi%2DGNOME%2Dlibgdata%2D444fubtt%2D0
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375345525
+< Soup-Debug: SoupMessage 1 (0x9220a0)
+< Content-Type: text/plain
+< Cache-control: no-cache, no-store
+< Pragma: no-cache
+< Expires: Mon, 01-Jan-1990 00:00:00 GMT
+< Date: Thu, 01 Aug 2013 08:25:25 GMT
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 881
+< Server: GSE
+<
+< SID=DQAAAM8AAAAutObMG_wXQs53bvQOY3IJDSU_GIDqTSwhyL1XQZLWlBagrCLzocFoNJA4fUISk77o9-9BVemmtTFyswtvifdZeVLmJUgnqUBQYl7EnrJIOV0H-xom7Xx4JKCz8SYHhXaxCEUKNTDX5TFb_aUs1dWectcr_mqPvbS-lowb-ZHU11GSdmdOvTZEIr5DZv6wP6SIpD7LhTUYsTxw9Wv3KxYz56QMlcd1YATeN1l7tVxUEXfabIARzJFjJTvxErXnbDCtts1bXxHTdUR32QRlEcOD
+< LSID=DQAAANAAAACKhOa-WK3N6akB7d7kKA0laUmnO2zgJ6O4seqRp4zTd7KBlc6xHcjduCp-bFT9vlSm4Z0ofb0s5sLLE2WlntM94n0X-tsiCP8XQtfRqMKsq6U9D526xR3lj7hi99rVyz-uiF3eCgkO0JKPxoQ-R1DkI07b08WF3wLGJYjwzNM9bDm9eufa-pCIzhs3IYmDpOJOVnZA4TQmJ3uZQiKgCZuc6nroBEJkpWw7fWkok8Cq6sqeaJ0fGpRR6G7NaWevUyrRGuJnOeHNVC_cLnnaTho8
+< Auth=DQAAANAAAACKhOa-WK3N6akB7d7kKA0laUmnO2zgJ6O4seqRp4zTd7KBlc6xHcjduCp-bFT9vlSm4Z0ofb0s5sLLE2WlntM9TyOIVsQvhiq-Vp7hgMUcmhbj68uTp8IWx17waXHY8zAdgC-AU_5BpYj07dAr2TiEHALTFabaz75_tlNZyWiNJbnb9DbKfUfHOFI8WnE5ueYrwUvevYqZ9KPq6BPOnPHluKUlt4wFyZ2_PqyFEjgsvpr4xzmNjLGWuH75fDQef9D7YcrEIHArYGHxIbiElG-x
+
+> POST /accounts/ClientLogin HTTP/1.1
+> Soup-Debug-Timestamp: 1375345525
+> Soup-Debug: SoupSession 1 (0x65a1d0), SoupMessage 2 (0x922280), SoupSocket 2 (0x7be170)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> accountType=HOSTED%5FOR%5FGOOGLE&Email=libgdata%2Edocuments%40gmail%2Ecom&Passwd=gdata%2Dgdata&service=wise&source=ytapi%2DGNOME%2Dlibgdata%2D444fubtt%2D0
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375345525
+< Soup-Debug: SoupMessage 2 (0x922280)
+< Content-Type: text/plain
+< Cache-control: no-cache, no-store
+< Pragma: no-cache
+< Expires: Mon, 01-Jan-1990 00:00:00 GMT
+< Date: Thu, 01 Aug 2013 08:25:25 GMT
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 903
+< Server: GSE
+<
+< SID=DQAAAM8AAAAutObMG_wXQs53bvQOY3IJDSU_GIDqTSwhyL1XQZLWlBagrCLzocFoNJA4fUISk77o9-9BVemmtTFyswtvifdZeVLmJUgnqUBQYl7EnrJIOV0H-xom7Xx4JKCz8SYHhXaxCEUKNTDX5TFb_aUs1dWectcr_mqPvbS-lowb-ZHU11GSdmdOvTZEIr5DZv6wP6SIpD7LhTUYsTxw9Wv3KxYzx7IBOYPs55B9Vpug49O4Zc5_hjQjq_awBljmIV68sVoz3DWsX4hF83VArJGbLayv
+< LSID=DQAAANEAAACKhOa-WK3N6akB7d7kKA0laUmnO2zgJ6O4seqRp4zTd7KBlc6xHcjduCp-bFT9vlSm4Z0ofb0s5sLLE2WlntM94n0X-tsiCP8XQtfRqMKsq6U9D526xR3lj7hi99rVyz-uiF3eCgkO0JKPxoQ-R1DkI07b08WF3wLGJYjwzNM9bDm9eufa-pCIzhs3IYmDpOJOVnZA4TQmJ3uZQiKgCZucgC-VMj4L0hv2eDlKI4M1F-1DUO6fsizfEv7dJB8YROaTCUJbh8NUTkm-bOQhWNPqVVKyunrUg5qcQ5ACl3Z9yg
+< Auth=DQAAANAAAACKhOa-WK3N6akB7d7kKA0laUmnO2zgJ6O4seqRp4zTd7KBlc6xHcjduCp-bFT9vlSm4Z0ofb0s5sLLE2WlntM9z6N6FjULYN8pUpoiPutRjtDfnDlN8MzAHHcYN6NGEAVFVa0ETaIuBzqIWfpO66ez4uWh0tKP4NHts1TcXsu24OICaC8SGQ7QihgB_kPvd28HKFnFEyJKoG68vADUWOO7NKgRxYGeL0xrieNeGxYhqGDBc4vxbAt9Cqp3uti9zJ0-Z8-g4i36UEkJBhdPbaHi
+
+> POST /accounts/ClientLogin HTTP/1.1
+> Soup-Debug-Timestamp: 1375345525
+> Soup-Debug: SoupSession 1 (0x65a1d0), SoupMessage 3 (0x922460), SoupSocket 3 (0x7be230)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> accountType=HOSTED%5FOR%5FGOOGLE&Email=libgdata%2Edocuments%40gmail%2Ecom&Passwd=gdata%2Dgdata&service=writely&source=ytapi%2DGNOME%2Dlibgdata%2D444fubtt%2D0
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375345525
+< Soup-Debug: SoupMessage 3 (0x922460)
+< Content-Type: text/plain
+< Cache-control: no-cache, no-store
+< Pragma: no-cache
+< Expires: Mon, 01-Jan-1990 00:00:00 GMT
+< Date: Thu, 01 Aug 2013 08:25:25 GMT
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 925
+< Server: GSE
+<
+< SID=DQAAAM8AAAAutObMG_wXQs53bvQOY3IJDSU_GIDqTSwhyL1XQZLWlBagrCLzocFoNJA4fUISk77o9-9BVemmtTFyswtvifdZeVLmJUgnqUBQYl7EnrJIOV0H-xom7Xx4JKCz8SYHhXaxCEUKNTDX5TFb_aUs1dWectcr_mqPvbS-lowb-ZHU11GSdmdOvTZEIr5DZv6wP6SIpD7LhTUYsTxw9Wv3KxYzk89GtCD7uWwjv901EJEoGtVnSCxrTHUIhjpVYIhoG_KwZyvSBVMddiZeE0MwOonp
+< LSID=DQAAANEAAACKhOa-WK3N6akB7d7kKA0laUmnO2zgJ6O4seqRp4zTd7KBlc6xHcjduCp-bFT9vlSm4Z0ofb0s5sLLE2WlntM94n0X-tsiCP8XQtfRqMKsq6U9D526xR3lj7hi99rVyz-uiF3eCgkO0JKPxoQ-R1DkI07b08WF3wLGJYjwzNM9bDm9eufa-pCIzhs3IYmDpOJOVnZA4TQmJ3uZQiKgCZucgnKnX6jrxp5D0TvOat29yM_6Rxgks7YSw0_kApdxQT-yJ3AphiYeCdg_L-5NrRgSVUYAdtAbrhEUTtxneITeTQ
+< Auth=DQAAANEAAACKhOa-WK3N6akB7d7kKA0laUmnO2zgJ6O4seqRp4zTd7KBlc6xHcjduCp-bFT9vlSm4Z0ofb0s5sLLE2WlntM9TyOIVsQvhiq-Vp7hgMUcmhbj68uTp8IWx17waXHY8zAdgC-AU_5BpYj07dAr2TiEHALTFabaz75_tlNZyWiNJbnb9DbKfUfHOFI8WnE5ueYrwUvevYqZ9KPq6BPOnPHlqqyr-A0OzVFcIodQIUHtemgUx13cF2UabnFqKTcs7BTWtiT0P4vOhsOvjru0S-FTf5BU2U0Ey_gqPeoEj7Ey3A
+
--- /dev/null
+> GET /feeds/default/private/full HTTP/1.1
+> Soup-Debug-Timestamp: 1375195924
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 63 (0x6d13a0), SoupSocket 24 (0x7fffd80104a0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195924
+< Soup-Debug: SoupMessage 63 (0x6d13a0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< Expires: Tue, 30 Jul 2013 14:52:04 GMT
+< Date: Tue, 30 Jul 2013 14:52:04 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: W/"D04GRX05eyt7ImA9WhFWEUQ."
+< Last-Modified: Tue, 30 Jul 2013 14:52:04 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"D04GRX05eyt7ImA9WhFWEUQ."'><id>https://docs.google.com/feeds/default/private/full</id><updated>2013-07-30T14:52:04.323Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#item' label='item'/><title>Available Documents - libgdata.documents@gmail.com</title><link rel='alternate' type='text/html' href='https://docs.google.com'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full'/><link rel='http://schemas.google.com/g/2005#batch' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/batch'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><openSearch:startIndex>1</openSearch:startIndex><entry gd:etag='"A1RbFUkOEit7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1EB4S13wAy5PPmmQXfv-jqctL39HvwzvR2RskTK_12Vs</id><published>2013-07-30T14:51:55.336Z</published><updated>2013-07-30T14:51:55.766Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:51:56.318Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Text Document</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1EB4S13wAy5PPmmQXfv-jqctL39HvwzvR2RskTK_12Vs'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1EB4S13wAy5PPmmQXfv-jqctL39HvwzvR2RskTK_12Vs/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1EB4S13wAy5PPmmQXfv-jqctL39HvwzvR2RskTK_12Vs/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1EB4S13wAy5PPmmQXfv-jqctL39HvwzvR2RskTK_12Vs'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1EB4S13wAy5PPmmQXfv-jqctL39HvwzvR2RskTK_12Vs'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1EB4S13wAy5PPmmQXfv-jqctL39HvwzvR2RskTK_12Vs&v=1&s=AMedNnoAAAAAUffvNAQlMJ2xIlRib8NOUBdKcX06lw8b&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1EB4S13wAy5PPmmQXfv-jqctL39HvwzvR2RskTK_12Vs'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1EB4S13wAy5PPmmQXfv-jqctL39HvwzvR2RskTK_12Vs'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1EB4S13wAy5PPmmQXfv-jqctL39HvwzvR2RskTK_12Vs'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1EB4S13wAy5PPmmQXfv-jqctL39HvwzvR2RskTK_12Vs</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:51:55.766Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:51:55.766Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1EB4S13wAy5PPmmQXfv-jqctL39HvwzvR2RskTK_12Vs/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1EB4S13wAy5PPmmQXfv-jqctL39HvwzvR2RskTK_12Vs/revisions'/></entry><entry gd:etag='"A1RbFUwJTit7ImBk"'><id>https://docs.google.com/feeds/id/spreadsheet%3A0AjY2jgHHwMwYdEJaa3FnZ3RSbzZOcVVaYXVzUnM0b3c</id><published>2013-07-30T14:51:51.434Z</published><updated>2013-07-30T14:51:52.347Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:51:52.389Z</app:edited><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#spreadsheet' label='spreadsheet'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Spreadsheet</title><content type='text/html' src='https://docs.google.com/feeds/download/spreadsheets/Export?key=0AjY2jgHHwMwYdEJaa3FnZ3RSbzZOcVVaYXVzUnM0b3c'/><link rel='alternate' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdEJaa3FnZ3RSbzZOcVVaYXVzUnM0b3c&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdEJaa3FnZ3RSbzZOcVVaYXVzUnM0b3c&output=html&chrome=false&widget=true'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_spreadsheet_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdEJaa3FnZ3RSbzZOcVVaYXVzUnM0b3c'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdEJaa3FnZ3RSbzZOcVVaYXVzUnM0b3c'/><link rel='http://schemas.google.com/spreadsheets/2006#worksheetsfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/worksheets/0AjY2jgHHwMwYdEJaa3FnZ3RSbzZOcVVaYXVzUnM0b3c/private/full'/><link rel='http://schemas.google.com/spreadsheets/2006#tablesfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/0AjY2jgHHwMwYdEJaa3FnZ3RSbzZOcVVaYXVzUnM0b3c/tables'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdEJaa3FnZ3RSbzZOcVVaYXVzUnM0b3c'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdEJaa3FnZ3RSbzZOcVVaYXVzUnM0b3c'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/spreadsheet%3A0AjY2jgHHwMwYdEJaa3FnZ3RSbzZOcVVaYXVzUnM0b3c'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>spreadsheet:0AjY2jgHHwMwYdEJaa3FnZ3RSbzZOcVVaYXVzUnM0b3c</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:51:52.347Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:51:51.434Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><docs:hasForm value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdEJaa3FnZ3RSbzZOcVVaYXVzUnM0b3c/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdEJaa3FnZ3RSbzZOcVVaYXVzUnM0b3c/revisions'/></entry><entry gd:etag='"A1RbFUsLACt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1NjxwfgJmgOyVtkrBmJlx1GB1qY31k3AVDDpRRZZOeOs</id><published>2013-07-30T14:51:57.660Z</published><updated>2013-07-30T14:51:58.260Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:51:58.820Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Arbitrary Document</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1NjxwfgJmgOyVtkrBmJlx1GB1qY31k3AVDDpRRZZOeOs'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1NjxwfgJmgOyVtkrBmJlx1GB1qY31k3AVDDpRRZZOeOs/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1NjxwfgJmgOyVtkrBmJlx1GB1qY31k3AVDDpRRZZOeOs/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1NjxwfgJmgOyVtkrBmJlx1GB1qY31k3AVDDpRRZZOeOs'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1NjxwfgJmgOyVtkrBmJlx1GB1qY31k3AVDDpRRZZOeOs'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1NjxwfgJmgOyVtkrBmJlx1GB1qY31k3AVDDpRRZZOeOs&v=1&s=AMedNnoAAAAAUffvNOwpVP8tbNhtmcq9ff1YXP_tueO1&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1NjxwfgJmgOyVtkrBmJlx1GB1qY31k3AVDDpRRZZOeOs'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1NjxwfgJmgOyVtkrBmJlx1GB1qY31k3AVDDpRRZZOeOs'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1NjxwfgJmgOyVtkrBmJlx1GB1qY31k3AVDDpRRZZOeOs'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1NjxwfgJmgOyVtkrBmJlx1GB1qY31k3AVDDpRRZZOeOs</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:51:58.260Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:51:58.260Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1NjxwfgJmgOyVtkrBmJlx1GB1qY31k3AVDDpRRZZOeOs/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1NjxwfgJmgOyVtkrBmJlx1GB1qY31k3AVDDpRRZZOeOs/revisions'/></entry><entry gd:etag='"A1RbFU9UDyt7ImBk"'><id>https://docs.google.com/feeds/id/presentation%3A1NJHPCrFRs0l2XHOPAJDWtghSA2XYNuAN-jOnbOcDsaE</id><published>2013-07-30T14:51:53.664Z</published><updated>2013-07-30T14:51:54.386Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:51:54.429Z</app:edited><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#presentation' label='presentation'/><title>Temporary Presentation</title><content type='text/html' src='https://docs.google.com/feeds/download/presentations/Export?id=1NJHPCrFRs0l2XHOPAJDWtghSA2XYNuAN-jOnbOcDsaE'/><link rel='alternate' type='text/html' href='https://docs.google.com/presentation/d/1NJHPCrFRs0l2XHOPAJDWtghSA2XYNuAN-jOnbOcDsaE/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/presentation/d/1NJHPCrFRs0l2XHOPAJDWtghSA2XYNuAN-jOnbOcDsaE/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_presentation_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/presentation%3A1NJHPCrFRs0l2XHOPAJDWtghSA2XYNuAN-jOnbOcDsaE'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/presentation%3A1NJHPCrFRs0l2XHOPAJDWtghSA2XYNuAN-jOnbOcDsaE'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1NJHPCrFRs0l2XHOPAJDWtghSA2XYNuAN-jOnbOcDsaE&v=2&s=AMedNnoAAAAAUffvNMmIe8-dfkmuKP2tWNVDqHbBK9dL&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/presentation%3A1NJHPCrFRs0l2XHOPAJDWtghSA2XYNuAN-jOnbOcDsaE'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/presentation%3A1NJHPCrFRs0l2XHOPAJDWtghSA2XYNuAN-jOnbOcDsaE'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/presentation%3A1NJHPCrFRs0l2XHOPAJDWtghSA2XYNuAN-jOnbOcDsaE'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>presentation:1NJHPCrFRs0l2XHOPAJDWtghSA2XYNuAN-jOnbOcDsaE</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:51:54.386Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:51:54.131Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/presentation%3A1NJHPCrFRs0l2XHOPAJDWtghSA2XYNuAN-jOnbOcDsaE/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/presentation%3A1NJHPCrFRs0l2XHOPAJDWtghSA2XYNuAN-jOnbOcDsaE/revisions'/></entry></feed>
+
--- /dev/null
+> GET /feeds/default/private/full HTTP/1.1
+> Soup-Debug-Timestamp: 1375195978
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 117 (0x7fffe401faa0), SoupSocket 39 (0x7fffdc004d60)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195978
+< Soup-Debug: SoupMessage 117 (0x7fffe401faa0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< Expires: Tue, 30 Jul 2013 14:52:58 GMT
+< Date: Tue, 30 Jul 2013 14:52:58 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: W/"D04DSXs4fit7ImA9WhFWEUQ."
+< Last-Modified: Tue, 30 Jul 2013 14:52:58 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"D04DSXs4fit7ImA9WhFWEUQ."'><id>https://docs.google.com/feeds/default/private/full</id><updated>2013-07-30T14:52:58.536Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#item' label='item'/><title>Available Documents - libgdata.documents@gmail.com</title><link rel='alternate' type='text/html' href='https://docs.google.com'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full'/><link rel='http://schemas.google.com/g/2005#batch' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/batch'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><openSearch:startIndex>1</openSearch:startIndex><entry gd:etag='"A1RbFkRbQCt7ImBk"'><id>https://docs.google.com/feeds/id/presentation%3A1aOMOKw5Zr7QvJsenJc7XGPaDKa8i9BjlOh7L4CeFEGI</id><published>2013-07-30T14:52:48.975Z</published><updated>2013-07-30T14:52:49.513Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:52:49.663Z</app:edited><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#presentation' label='presentation'/><title>Temporary Presentation</title><content type='text/html' src='https://docs.google.com/feeds/download/presentations/Export?id=1aOMOKw5Zr7QvJsenJc7XGPaDKa8i9BjlOh7L4CeFEGI'/><link rel='alternate' type='text/html' href='https://docs.google.com/presentation/d/1aOMOKw5Zr7QvJsenJc7XGPaDKa8i9BjlOh7L4CeFEGI/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/presentation/d/1aOMOKw5Zr7QvJsenJc7XGPaDKa8i9BjlOh7L4CeFEGI/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_presentation_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/presentation%3A1aOMOKw5Zr7QvJsenJc7XGPaDKa8i9BjlOh7L4CeFEGI'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/presentation%3A1aOMOKw5Zr7QvJsenJc7XGPaDKa8i9BjlOh7L4CeFEGI'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1aOMOKw5Zr7QvJsenJc7XGPaDKa8i9BjlOh7L4CeFEGI&v=2&s=AMedNnoAAAAAUffvarAVbTZJFl-XW-LaNFdNYGFouX4T&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/presentation%3A1aOMOKw5Zr7QvJsenJc7XGPaDKa8i9BjlOh7L4CeFEGI'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/presentation%3A1aOMOKw5Zr7QvJsenJc7XGPaDKa8i9BjlOh7L4CeFEGI'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/presentation%3A1aOMOKw5Zr7QvJsenJc7XGPaDKa8i9BjlOh7L4CeFEGI'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>presentation:1aOMOKw5Zr7QvJsenJc7XGPaDKa8i9BjlOh7L4CeFEGI</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:52:49.513Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:52:49.268Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/presentation%3A1aOMOKw5Zr7QvJsenJc7XGPaDKa8i9BjlOh7L4CeFEGI/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/presentation%3A1aOMOKw5Zr7QvJsenJc7XGPaDKa8i9BjlOh7L4CeFEGI/revisions'/></entry><entry gd:etag='"A1RbFkpQQyt7ImBk"'><id>https://docs.google.com/feeds/id/spreadsheet%3A0AjY2jgHHwMwYdENid3p5b3pKTEJWQzRUQ3BsVkFZS3c</id><published>2013-07-30T14:52:46.342Z</published><updated>2013-07-30T14:52:47.237Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:52:47.392Z</app:edited><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#spreadsheet' label='spreadsheet'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Spreadsheet</title><content type='text/html' src='https://docs.google.com/feeds/download/spreadsheets/Export?key=0AjY2jgHHwMwYdENid3p5b3pKTEJWQzRUQ3BsVkFZS3c'/><link rel='alternate' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdENid3p5b3pKTEJWQzRUQ3BsVkFZS3c&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdENid3p5b3pKTEJWQzRUQ3BsVkFZS3c&output=html&chrome=false&widget=true'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_spreadsheet_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENid3p5b3pKTEJWQzRUQ3BsVkFZS3c'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENid3p5b3pKTEJWQzRUQ3BsVkFZS3c'/><link rel='http://schemas.google.com/spreadsheets/2006#worksheetsfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/worksheets/0AjY2jgHHwMwYdENid3p5b3pKTEJWQzRUQ3BsVkFZS3c/private/full'/><link rel='http://schemas.google.com/spreadsheets/2006#tablesfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/0AjY2jgHHwMwYdENid3p5b3pKTEJWQzRUQ3BsVkFZS3c/tables'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENid3p5b3pKTEJWQzRUQ3BsVkFZS3c'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENid3p5b3pKTEJWQzRUQ3BsVkFZS3c'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/spreadsheet%3A0AjY2jgHHwMwYdENid3p5b3pKTEJWQzRUQ3BsVkFZS3c'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>spreadsheet:0AjY2jgHHwMwYdENid3p5b3pKTEJWQzRUQ3BsVkFZS3c</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:52:47.237Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:52:46.342Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><docs:hasForm value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENid3p5b3pKTEJWQzRUQ3BsVkFZS3c/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENid3p5b3pKTEJWQzRUQ3BsVkFZS3c/revisions'/></entry><entry gd:etag='"A1RbFh9CByt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1w8YQLNCft5vzfQH4beRGlzLDkguHFvaK4cKMjuC-j2E</id><published>2013-07-30T14:52:52.145Z</published><updated>2013-07-30T14:52:52.608Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:52:53.101Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Arbitrary Document</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1w8YQLNCft5vzfQH4beRGlzLDkguHFvaK4cKMjuC-j2E'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1w8YQLNCft5vzfQH4beRGlzLDkguHFvaK4cKMjuC-j2E/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1w8YQLNCft5vzfQH4beRGlzLDkguHFvaK4cKMjuC-j2E/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1w8YQLNCft5vzfQH4beRGlzLDkguHFvaK4cKMjuC-j2E'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1w8YQLNCft5vzfQH4beRGlzLDkguHFvaK4cKMjuC-j2E'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1w8YQLNCft5vzfQH4beRGlzLDkguHFvaK4cKMjuC-j2E&v=1&s=AMedNnoAAAAAUffvavOK-sEtxfIJuhBPsTHFZrRGlBd_&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1w8YQLNCft5vzfQH4beRGlzLDkguHFvaK4cKMjuC-j2E'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1w8YQLNCft5vzfQH4beRGlzLDkguHFvaK4cKMjuC-j2E'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1w8YQLNCft5vzfQH4beRGlzLDkguHFvaK4cKMjuC-j2E'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1w8YQLNCft5vzfQH4beRGlzLDkguHFvaK4cKMjuC-j2E</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:52:52.608Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:52:52.608Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1w8YQLNCft5vzfQH4beRGlzLDkguHFvaK4cKMjuC-j2E/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1w8YQLNCft5vzfQH4beRGlzLDkguHFvaK4cKMjuC-j2E/revisions'/></entry><entry gd:etag='"A1RbFhxSFSt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1mIk0JhCqrufG5Ieq4YICOfFwD9HTHLYN2WJKVmQWAIU</id><published>2013-07-30T14:52:50.338Z</published><updated>2013-07-30T14:52:50.790Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:52:51.215Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Text Document</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1mIk0JhCqrufG5Ieq4YICOfFwD9HTHLYN2WJKVmQWAIU'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1mIk0JhCqrufG5Ieq4YICOfFwD9HTHLYN2WJKVmQWAIU/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1mIk0JhCqrufG5Ieq4YICOfFwD9HTHLYN2WJKVmQWAIU/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1mIk0JhCqrufG5Ieq4YICOfFwD9HTHLYN2WJKVmQWAIU'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1mIk0JhCqrufG5Ieq4YICOfFwD9HTHLYN2WJKVmQWAIU'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1mIk0JhCqrufG5Ieq4YICOfFwD9HTHLYN2WJKVmQWAIU&v=1&s=AMedNnoAAAAAUffvaqghwGcmw7a5U05hCIFbhPNKlkT2&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1mIk0JhCqrufG5Ieq4YICOfFwD9HTHLYN2WJKVmQWAIU'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1mIk0JhCqrufG5Ieq4YICOfFwD9HTHLYN2WJKVmQWAIU'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1mIk0JhCqrufG5Ieq4YICOfFwD9HTHLYN2WJKVmQWAIU'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1mIk0JhCqrufG5Ieq4YICOfFwD9HTHLYN2WJKVmQWAIU</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:52:50.790Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:52:50.790Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1mIk0JhCqrufG5Ieq4YICOfFwD9HTHLYN2WJKVmQWAIU/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1mIk0JhCqrufG5Ieq4YICOfFwD9HTHLYN2WJKVmQWAIU/revisions'/></entry></feed>
+
--- /dev/null
+> GET /feeds/default/private/full?showdeleted=false&showfolders=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375195943
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 81 (0x7fffe001c370), SoupSocket 29 (0x8deb20)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195943
+< Soup-Debug: SoupMessage 81 (0x7fffe001c370)
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< Expires: Tue, 30 Jul 2013 14:52:23 GMT
+< Date: Tue, 30 Jul 2013 14:52:23 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: W/"D04AQno_eyt7ImA9WhFWEUQ."
+< Last-Modified: Tue, 30 Jul 2013 14:52:23 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"D04AQno_eyt7ImA9WhFWEUQ."'><id>https://docs.google.com/feeds/default/private/full</id><updated>2013-07-30T14:52:23.443Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#item' label='item'/><title>Available Documents - libgdata.documents@gmail.com</title><link rel='alternate' type='text/html' href='https://docs.google.com'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full'/><link rel='http://schemas.google.com/g/2005#batch' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/batch'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full?showdeleted=false&showfolders=true'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><openSearch:startIndex>1</openSearch:startIndex><entry gd:etag='"A1RbFRVRQCt7ImBk"'><id>https://docs.google.com/feeds/id/presentation%3A1pcBUkv9mRQa9dQmOnvUvQXD1ZHlwsuc8CI7dPJ9e8RI</id><published>2013-07-30T14:52:13.096Z</published><updated>2013-07-30T14:52:13.696Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:52:13.735Z</app:edited><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#presentation' label='presentation'/><title>Temporary Presentation</title><content type='text/html' src='https://docs.google.com/feeds/download/presentations/Export?id=1pcBUkv9mRQa9dQmOnvUvQXD1ZHlwsuc8CI7dPJ9e8RI'/><link rel='alternate' type='text/html' href='https://docs.google.com/presentation/d/1pcBUkv9mRQa9dQmOnvUvQXD1ZHlwsuc8CI7dPJ9e8RI/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/presentation/d/1pcBUkv9mRQa9dQmOnvUvQXD1ZHlwsuc8CI7dPJ9e8RI/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_presentation_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/presentation%3A1pcBUkv9mRQa9dQmOnvUvQXD1ZHlwsuc8CI7dPJ9e8RI'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/presentation%3A1pcBUkv9mRQa9dQmOnvUvQXD1ZHlwsuc8CI7dPJ9e8RI'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1pcBUkv9mRQa9dQmOnvUvQXD1ZHlwsuc8CI7dPJ9e8RI&v=2&s=AMedNnoAAAAAUffvR36z4ae0__ZYqBcl56n9Rg6ahmwd&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/presentation%3A1pcBUkv9mRQa9dQmOnvUvQXD1ZHlwsuc8CI7dPJ9e8RI'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/presentation%3A1pcBUkv9mRQa9dQmOnvUvQXD1ZHlwsuc8CI7dPJ9e8RI'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/presentation%3A1pcBUkv9mRQa9dQmOnvUvQXD1ZHlwsuc8CI7dPJ9e8RI'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>presentation:1pcBUkv9mRQa9dQmOnvUvQXD1ZHlwsuc8CI7dPJ9e8RI</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:52:13.696Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:52:13.357Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/presentation%3A1pcBUkv9mRQa9dQmOnvUvQXD1ZHlwsuc8CI7dPJ9e8RI/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/presentation%3A1pcBUkv9mRQa9dQmOnvUvQXD1ZHlwsuc8CI7dPJ9e8RI/revisions'/></entry><entry gd:etag='"A1RbFRRDHit7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1D5ppHlA5SnC9bCX3P7e83EOpuLslecd78JRXn6tGKg8</id><published>2013-07-30T14:52:14.837Z</published><updated>2013-07-30T14:52:15.193Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:52:15.546Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Text Document</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1D5ppHlA5SnC9bCX3P7e83EOpuLslecd78JRXn6tGKg8'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1D5ppHlA5SnC9bCX3P7e83EOpuLslecd78JRXn6tGKg8/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1D5ppHlA5SnC9bCX3P7e83EOpuLslecd78JRXn6tGKg8/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1D5ppHlA5SnC9bCX3P7e83EOpuLslecd78JRXn6tGKg8'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1D5ppHlA5SnC9bCX3P7e83EOpuLslecd78JRXn6tGKg8'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1D5ppHlA5SnC9bCX3P7e83EOpuLslecd78JRXn6tGKg8&v=1&s=AMedNnoAAAAAUffvR9n3LPuq28LbauYy6tEVKg1H8OeX&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1D5ppHlA5SnC9bCX3P7e83EOpuLslecd78JRXn6tGKg8'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1D5ppHlA5SnC9bCX3P7e83EOpuLslecd78JRXn6tGKg8'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1D5ppHlA5SnC9bCX3P7e83EOpuLslecd78JRXn6tGKg8'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1D5ppHlA5SnC9bCX3P7e83EOpuLslecd78JRXn6tGKg8</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:52:15.193Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:52:15.193Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1D5ppHlA5SnC9bCX3P7e83EOpuLslecd78JRXn6tGKg8/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1D5ppHlA5SnC9bCX3P7e83EOpuLslecd78JRXn6tGKg8/revisions'/></entry><entry gd:etag='"A1RbFRoNBSt7ImBk"'><id>https://docs.google.com/feeds/id/spreadsheet%3A0AjY2jgHHwMwYdENwRGV0ZEhXYXpWVWk4VUxhaW1Pdnc</id><published>2013-07-30T14:52:10.727Z</published><updated>2013-07-30T14:52:11.932Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:52:11.991Z</app:edited><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#spreadsheet' label='spreadsheet'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Spreadsheet</title><content type='text/html' src='https://docs.google.com/feeds/download/spreadsheets/Export?key=0AjY2jgHHwMwYdENwRGV0ZEhXYXpWVWk4VUxhaW1Pdnc'/><link rel='alternate' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdENwRGV0ZEhXYXpWVWk4VUxhaW1Pdnc&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdENwRGV0ZEhXYXpWVWk4VUxhaW1Pdnc&output=html&chrome=false&widget=true'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_spreadsheet_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENwRGV0ZEhXYXpWVWk4VUxhaW1Pdnc'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENwRGV0ZEhXYXpWVWk4VUxhaW1Pdnc'/><link rel='http://schemas.google.com/spreadsheets/2006#worksheetsfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/worksheets/0AjY2jgHHwMwYdENwRGV0ZEhXYXpWVWk4VUxhaW1Pdnc/private/full'/><link rel='http://schemas.google.com/spreadsheets/2006#tablesfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/0AjY2jgHHwMwYdENwRGV0ZEhXYXpWVWk4VUxhaW1Pdnc/tables'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENwRGV0ZEhXYXpWVWk4VUxhaW1Pdnc'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENwRGV0ZEhXYXpWVWk4VUxhaW1Pdnc'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/spreadsheet%3A0AjY2jgHHwMwYdENwRGV0ZEhXYXpWVWk4VUxhaW1Pdnc'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>spreadsheet:0AjY2jgHHwMwYdENwRGV0ZEhXYXpWVWk4VUxhaW1Pdnc</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:52:11.932Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:52:10.727Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><docs:hasForm value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENwRGV0ZEhXYXpWVWk4VUxhaW1Pdnc/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENwRGV0ZEhXYXpWVWk4VUxhaW1Pdnc/revisions'/></entry><entry gd:etag='"A1RbFRZXACt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1cfaIZEdiwdmzBvn4tmrklZPJ2Fi5ueiEe3uaFrULJgY</id><published>2013-07-30T14:52:16.701Z</published><updated>2013-07-30T14:52:17.296Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:52:17.720Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Arbitrary Document</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1cfaIZEdiwdmzBvn4tmrklZPJ2Fi5ueiEe3uaFrULJgY'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1cfaIZEdiwdmzBvn4tmrklZPJ2Fi5ueiEe3uaFrULJgY/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1cfaIZEdiwdmzBvn4tmrklZPJ2Fi5ueiEe3uaFrULJgY/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1cfaIZEdiwdmzBvn4tmrklZPJ2Fi5ueiEe3uaFrULJgY'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1cfaIZEdiwdmzBvn4tmrklZPJ2Fi5ueiEe3uaFrULJgY'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1cfaIZEdiwdmzBvn4tmrklZPJ2Fi5ueiEe3uaFrULJgY&v=1&s=AMedNnoAAAAAUffvR2KYO59q2tuEH189hQTXrp6YGWUs&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1cfaIZEdiwdmzBvn4tmrklZPJ2Fi5ueiEe3uaFrULJgY'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1cfaIZEdiwdmzBvn4tmrklZPJ2Fi5ueiEe3uaFrULJgY'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1cfaIZEdiwdmzBvn4tmrklZPJ2Fi5ueiEe3uaFrULJgY'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1cfaIZEdiwdmzBvn4tmrklZPJ2Fi5ueiEe3uaFrULJgY</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:52:17.296Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:52:17.296Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1cfaIZEdiwdmzBvn4tmrklZPJ2Fi5ueiEe3uaFrULJgY/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1cfaIZEdiwdmzBvn4tmrklZPJ2Fi5ueiEe3uaFrULJgY/revisions'/></entry><entry gd:etag='"A1RbFRhZQyt7ImBk"'><id>https://docs.google.com/feeds/id/folder%3A0BzY2jgHHwMwYdVQtQzVYejA5dmc</id><published>2013-07-30T14:52:09.286Z</published><updated>2013-07-30T14:52:09.286Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:52:09.556Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#folder' label='folder'/><title>Temporary Folder</title><content type='application/atom+xml;type=feed' src='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYdVQtQzVYejA5dmc/contents'/><link rel='alternate' type='text/html' href='https://docs.google.com/folderview?id=0BzY2jgHHwMwYdVQtQzVYejA5dmc&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_collection_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYdVQtQzVYejA5dmc/contents'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/folder%3A0BzY2jgHHwMwYdVQtQzVYejA5dmc/contents'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYdVQtQzVYejA5dmc'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYdVQtQzVYejA5dmc'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>folder:0BzY2jgHHwMwYdVQtQzVYejA5dmc</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYdVQtQzVYejA5dmc/acl'/></entry></feed>
+
--- /dev/null
+> GET /feeds/default/private/full HTTP/1.1
+> Soup-Debug-Timestamp: 1375195960
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 99 (0x7fffe401f8c0), SoupSocket 34 (0x7fffd8010560)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195960
+< Soup-Debug: SoupMessage 99 (0x7fffe401f8c0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< Expires: Tue, 30 Jul 2013 14:52:40 GMT
+< Date: Tue, 30 Jul 2013 14:52:40 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: W/"D04CQXYycCt7ImA9WhFWEUQ."
+< Last-Modified: Tue, 30 Jul 2013 14:52:40 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"D04CQXYycCt7ImA9WhFWEUQ."'><id>https://docs.google.com/feeds/default/private/full</id><updated>2013-07-30T14:52:40.898Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#item' label='item'/><title>Available Documents - libgdata.documents@gmail.com</title><link rel='alternate' type='text/html' href='https://docs.google.com'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full'/><link rel='http://schemas.google.com/g/2005#batch' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/batch'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><openSearch:startIndex>1</openSearch:startIndex><entry gd:etag='"A1RbFQtQHCt7ImBk"'><id>https://docs.google.com/feeds/id/presentation%3A16KwE2jyxCZZDehkRK_cZmbfI6s9-YT7rIcqgmcHMkiQ</id><published>2013-07-30T14:52:31.280Z</published><updated>2013-07-30T14:52:31.815Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:52:31.856Z</app:edited><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#presentation' label='presentation'/><title>Temporary Presentation</title><content type='text/html' src='https://docs.google.com/feeds/download/presentations/Export?id=16KwE2jyxCZZDehkRK_cZmbfI6s9-YT7rIcqgmcHMkiQ'/><link rel='alternate' type='text/html' href='https://docs.google.com/presentation/d/16KwE2jyxCZZDehkRK_cZmbfI6s9-YT7rIcqgmcHMkiQ/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/presentation/d/16KwE2jyxCZZDehkRK_cZmbfI6s9-YT7rIcqgmcHMkiQ/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_presentation_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/presentation%3A16KwE2jyxCZZDehkRK_cZmbfI6s9-YT7rIcqgmcHMkiQ'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/presentation%3A16KwE2jyxCZZDehkRK_cZmbfI6s9-YT7rIcqgmcHMkiQ'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=16KwE2jyxCZZDehkRK_cZmbfI6s9-YT7rIcqgmcHMkiQ&v=2&s=AMedNnoAAAAAUffvWC9AcMJjGZixkw1AxaZMJIrK2ph8&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/presentation%3A16KwE2jyxCZZDehkRK_cZmbfI6s9-YT7rIcqgmcHMkiQ'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/presentation%3A16KwE2jyxCZZDehkRK_cZmbfI6s9-YT7rIcqgmcHMkiQ'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/presentation%3A16KwE2jyxCZZDehkRK_cZmbfI6s9-YT7rIcqgmcHMkiQ'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>presentation:16KwE2jyxCZZDehkRK_cZmbfI6s9-YT7rIcqgmcHMkiQ</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:52:31.815Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:52:31.594Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/presentation%3A16KwE2jyxCZZDehkRK_cZmbfI6s9-YT7rIcqgmcHMkiQ/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/presentation%3A16KwE2jyxCZZDehkRK_cZmbfI6s9-YT7rIcqgmcHMkiQ/revisions'/></entry><entry gd:etag='"A1RbFQpDBCt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1c8K7AU4ZIxIG9JRs-r_hsD3GQpMNwaxxpyfX4UYsdZg</id><published>2013-07-30T14:52:32.754Z</published><updated>2013-07-30T14:52:33.229Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:52:33.700Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Text Document</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1c8K7AU4ZIxIG9JRs-r_hsD3GQpMNwaxxpyfX4UYsdZg'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1c8K7AU4ZIxIG9JRs-r_hsD3GQpMNwaxxpyfX4UYsdZg/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1c8K7AU4ZIxIG9JRs-r_hsD3GQpMNwaxxpyfX4UYsdZg/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1c8K7AU4ZIxIG9JRs-r_hsD3GQpMNwaxxpyfX4UYsdZg'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1c8K7AU4ZIxIG9JRs-r_hsD3GQpMNwaxxpyfX4UYsdZg'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1c8K7AU4ZIxIG9JRs-r_hsD3GQpMNwaxxpyfX4UYsdZg&v=1&s=AMedNnoAAAAAUffvWNHCOb94JyD06gavxTKblnpafc48&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1c8K7AU4ZIxIG9JRs-r_hsD3GQpMNwaxxpyfX4UYsdZg'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1c8K7AU4ZIxIG9JRs-r_hsD3GQpMNwaxxpyfX4UYsdZg'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1c8K7AU4ZIxIG9JRs-r_hsD3GQpMNwaxxpyfX4UYsdZg'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1c8K7AU4ZIxIG9JRs-r_hsD3GQpMNwaxxpyfX4UYsdZg</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:52:33.229Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:52:33.229Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1c8K7AU4ZIxIG9JRs-r_hsD3GQpMNwaxxpyfX4UYsdZg/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1c8K7AU4ZIxIG9JRs-r_hsD3GQpMNwaxxpyfX4UYsdZg/revisions'/></entry><entry gd:etag='"A1RbFQRRBSt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1VEhw9yHuEL9NfSXaQJn-1x1kt-AWHJeVtACHerFwbTI</id><published>2013-07-30T14:52:34.528Z</published><updated>2013-07-30T14:52:35.022Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:52:35.787Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Arbitrary Document</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1VEhw9yHuEL9NfSXaQJn-1x1kt-AWHJeVtACHerFwbTI'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1VEhw9yHuEL9NfSXaQJn-1x1kt-AWHJeVtACHerFwbTI/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1VEhw9yHuEL9NfSXaQJn-1x1kt-AWHJeVtACHerFwbTI/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1VEhw9yHuEL9NfSXaQJn-1x1kt-AWHJeVtACHerFwbTI'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1VEhw9yHuEL9NfSXaQJn-1x1kt-AWHJeVtACHerFwbTI'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1VEhw9yHuEL9NfSXaQJn-1x1kt-AWHJeVtACHerFwbTI&v=1&s=AMedNnoAAAAAUffvWP63ijsYeWWzVmYLDm1RjkkpUgc_&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1VEhw9yHuEL9NfSXaQJn-1x1kt-AWHJeVtACHerFwbTI'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1VEhw9yHuEL9NfSXaQJn-1x1kt-AWHJeVtACHerFwbTI'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1VEhw9yHuEL9NfSXaQJn-1x1kt-AWHJeVtACHerFwbTI'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1VEhw9yHuEL9NfSXaQJn-1x1kt-AWHJeVtACHerFwbTI</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:52:35.022Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:52:35.022Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1VEhw9yHuEL9NfSXaQJn-1x1kt-AWHJeVtACHerFwbTI/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1VEhw9yHuEL9NfSXaQJn-1x1kt-AWHJeVtACHerFwbTI/revisions'/></entry><entry gd:etag='"A1RbFQgJACt7ImBk"'><id>https://docs.google.com/feeds/id/spreadsheet%3A0AjY2jgHHwMwYdC1FQWY0clBaTFo1LWU2Wm9mSlZjdHc</id><published>2013-07-30T14:52:29.174Z</published><updated>2013-07-30T14:52:29.951Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:52:29.996Z</app:edited><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#spreadsheet' label='spreadsheet'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Spreadsheet</title><content type='text/html' src='https://docs.google.com/feeds/download/spreadsheets/Export?key=0AjY2jgHHwMwYdC1FQWY0clBaTFo1LWU2Wm9mSlZjdHc'/><link rel='alternate' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdC1FQWY0clBaTFo1LWU2Wm9mSlZjdHc&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdC1FQWY0clBaTFo1LWU2Wm9mSlZjdHc&output=html&chrome=false&widget=true'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_spreadsheet_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdC1FQWY0clBaTFo1LWU2Wm9mSlZjdHc'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdC1FQWY0clBaTFo1LWU2Wm9mSlZjdHc'/><link rel='http://schemas.google.com/spreadsheets/2006#worksheetsfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/worksheets/0AjY2jgHHwMwYdC1FQWY0clBaTFo1LWU2Wm9mSlZjdHc/private/full'/><link rel='http://schemas.google.com/spreadsheets/2006#tablesfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/0AjY2jgHHwMwYdC1FQWY0clBaTFo1LWU2Wm9mSlZjdHc/tables'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdC1FQWY0clBaTFo1LWU2Wm9mSlZjdHc'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdC1FQWY0clBaTFo1LWU2Wm9mSlZjdHc'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/spreadsheet%3A0AjY2jgHHwMwYdC1FQWY0clBaTFo1LWU2Wm9mSlZjdHc'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>spreadsheet:0AjY2jgHHwMwYdC1FQWY0clBaTFo1LWU2Wm9mSlZjdHc</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:52:29.951Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:52:29.174Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><docs:hasForm value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdC1FQWY0clBaTFo1LWU2Wm9mSlZjdHc/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdC1FQWY0clBaTFo1LWU2Wm9mSlZjdHc/revisions'/></entry></feed>
+
--- /dev/null
+> GET /feeds/default/private/full HTTP/1.1
+> Soup-Debug-Timestamp: 1375195995
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 135 (0x7fffe401f9b0), SoupSocket 44 (0x7fffd8010260)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195996
+< Soup-Debug: SoupMessage 135 (0x7fffe401f9b0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< Expires: Tue, 30 Jul 2013 14:53:16 GMT
+< Date: Tue, 30 Jul 2013 14:53:16 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: W/"D04NR346cCt7ImA9WhFWEUQ."
+< Last-Modified: Tue, 30 Jul 2013 14:53:16 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"D04NR346cCt7ImA9WhFWEUQ."'><id>https://docs.google.com/feeds/default/private/full</id><updated>2013-07-30T14:53:16.018Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#item' label='item'/><title>Available Documents - libgdata.documents@gmail.com</title><link rel='alternate' type='text/html' href='https://docs.google.com'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full'/><link rel='http://schemas.google.com/g/2005#batch' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/batch'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><openSearch:startIndex>1</openSearch:startIndex><entry gd:etag='"A1RbFhNDESt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI</id><published>2013-07-30T14:53:07.822Z</published><updated>2013-07-30T14:53:08.314Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:08.679Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Text Document</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI&v=1&s=AMedNnoAAAAAUffvfPhMYsivHk5npRCUWgTwCw8gHwxF&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:08.314Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:08.314Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI/revisions'/></entry><entry gd:etag='"A1RbFhEDTit7ImBk"'><id>https://docs.google.com/feeds/id/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E</id><published>2013-07-30T14:53:04.070Z</published><updated>2013-07-30T14:53:05.136Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:05.181Z</app:edited><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#spreadsheet' label='spreadsheet'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Spreadsheet</title><content type='text/html' src='https://docs.google.com/feeds/download/spreadsheets/Export?key=0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='alternate' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E&output=html&chrome=false&widget=true'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_spreadsheet_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='http://schemas.google.com/spreadsheets/2006#worksheetsfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/worksheets/0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E/private/full'/><link rel='http://schemas.google.com/spreadsheets/2006#tablesfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E/tables'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>spreadsheet:0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:05.136Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:04.070Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><docs:hasForm value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E/revisions'/></entry><entry gd:etag='"A1RbFg1dGit7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc</id><published>2013-07-30T14:53:09.625Z</published><updated>2013-07-30T14:53:10.144Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:10.630Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Arbitrary Document</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc&v=1&s=AMedNnoAAAAAUffvfI-ajXeej1qbrpaoEMWQRDIRYGBd&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:10.144Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:10.144Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/revisions'/></entry><entry gd:etag='"A1RbFhBURSt7ImBk"'><id>https://docs.google.com/feeds/id/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA</id><published>2013-07-30T14:53:06.357Z</published><updated>2013-07-30T14:53:06.895Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:06.974Z</app:edited><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#presentation' label='presentation'/><title>Temporary Presentation</title><content type='text/html' src='https://docs.google.com/feeds/download/presentations/Export?id=1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='alternate' type='text/html' href='https://docs.google.com/presentation/d/1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/presentation/d/1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_presentation_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA&v=2&s=AMedNnoAAAAAUffvfIZ3SRcTRLSd9ceQ4fwKvLDrSk6e&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>presentation:1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:06.895Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:06.670Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA/revisions'/></entry></feed>
+
+> GET /feeds/default/private/full HTTP/1.1
+> Soup-Debug-Timestamp: 1375195996
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 136 (0x7fffe001c550), SoupSocket 43 (0x8dee20)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195996
+< Soup-Debug: SoupMessage 136 (0x7fffe001c550)
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< Expires: Tue, 30 Jul 2013 14:53:16 GMT
+< Date: Tue, 30 Jul 2013 14:53:16 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: W/"D04NR3g7eCt7ImA9WhFWEUQ."
+< Last-Modified: Tue, 30 Jul 2013 14:53:16 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"D04NR3g7eCt7ImA9WhFWEUQ."'><id>https://docs.google.com/feeds/default/private/full</id><updated>2013-07-30T14:53:16.600Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#item' label='item'/><title>Available Documents - libgdata.documents@gmail.com</title><link rel='alternate' type='text/html' href='https://docs.google.com'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full'/><link rel='http://schemas.google.com/g/2005#batch' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/batch'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><openSearch:startIndex>1</openSearch:startIndex><entry gd:etag='"A1RbFhNDESt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI</id><published>2013-07-30T14:53:07.822Z</published><updated>2013-07-30T14:53:08.314Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:08.679Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Text Document</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI&v=1&s=AMedNnoAAAAAUffvfPhMYsivHk5npRCUWgTwCw8gHwxF&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:08.314Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:08.314Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI/revisions'/></entry><entry gd:etag='"A1RbFhEDTit7ImBk"'><id>https://docs.google.com/feeds/id/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E</id><published>2013-07-30T14:53:04.070Z</published><updated>2013-07-30T14:53:05.136Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:05.181Z</app:edited><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#spreadsheet' label='spreadsheet'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Spreadsheet</title><content type='text/html' src='https://docs.google.com/feeds/download/spreadsheets/Export?key=0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='alternate' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E&output=html&chrome=false&widget=true'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_spreadsheet_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='http://schemas.google.com/spreadsheets/2006#worksheetsfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/worksheets/0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E/private/full'/><link rel='http://schemas.google.com/spreadsheets/2006#tablesfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E/tables'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>spreadsheet:0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:05.136Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:04.070Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><docs:hasForm value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E/revisions'/></entry><entry gd:etag='"A1RbFg1dGit7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc</id><published>2013-07-30T14:53:09.625Z</published><updated>2013-07-30T14:53:10.144Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:10.630Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Arbitrary Document</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc&v=1&s=AMedNnoAAAAAUffvfI-ajXeej1qbrpaoEMWQRDIRYGBd&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:10.144Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:10.144Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/revisions'/></entry><entry gd:etag='"A1RbFhBURSt7ImBk"'><id>https://docs.google.com/feeds/id/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA</id><published>2013-07-30T14:53:06.357Z</published><updated>2013-07-30T14:53:06.895Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:06.974Z</app:edited><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#presentation' label='presentation'/><title>Temporary Presentation</title><content type='text/html' src='https://docs.google.com/feeds/download/presentations/Export?id=1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='alternate' type='text/html' href='https://docs.google.com/presentation/d/1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/presentation/d/1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_presentation_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA&v=2&s=AMedNnoAAAAAUffvfIZ3SRcTRLSd9ceQ4fwKvLDrSk6e&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>presentation:1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:06.895Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:06.670Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA/revisions'/></entry></feed>
+
+> GET /feeds/default/private/full HTTP/1.1
+> Soup-Debug-Timestamp: 1375195996
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 137 (0x7fffe401fc80), SoupSocket 45 (0x8dee20)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195997
+< Soup-Debug: SoupMessage 137 (0x7fffe401fc80)
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< Expires: Tue, 30 Jul 2013 14:53:17 GMT
+< Date: Tue, 30 Jul 2013 14:53:17 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: W/"D04NRn07eit7ImA9WhFWEUQ."
+< Last-Modified: Tue, 30 Jul 2013 14:53:17 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"D04NRn07eit7ImA9WhFWEUQ."'><id>https://docs.google.com/feeds/default/private/full</id><updated>2013-07-30T14:53:17.302Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#item' label='item'/><title>Available Documents - libgdata.documents@gmail.com</title><link rel='alternate' type='text/html' href='https://docs.google.com'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full'/><link rel='http://schemas.google.com/g/2005#batch' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/batch'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><openSearch:startIndex>1</openSearch:startIndex><entry gd:etag='"A1RbFhNDESt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI</id><published>2013-07-30T14:53:07.822Z</published><updated>2013-07-30T14:53:08.314Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:08.679Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Text Document</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI&v=1&s=AMedNnoAAAAAUffvfe3r8_qfSWisSUWCJq8eawdebDYG&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:08.314Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:08.314Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI/revisions'/></entry><entry gd:etag='"A1RbFhEDTit7ImBk"'><id>https://docs.google.com/feeds/id/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E</id><published>2013-07-30T14:53:04.070Z</published><updated>2013-07-30T14:53:05.136Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:05.181Z</app:edited><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#spreadsheet' label='spreadsheet'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Spreadsheet</title><content type='text/html' src='https://docs.google.com/feeds/download/spreadsheets/Export?key=0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='alternate' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E&output=html&chrome=false&widget=true'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_spreadsheet_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='http://schemas.google.com/spreadsheets/2006#worksheetsfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/worksheets/0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E/private/full'/><link rel='http://schemas.google.com/spreadsheets/2006#tablesfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E/tables'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>spreadsheet:0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:05.136Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:04.070Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><docs:hasForm value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E/revisions'/></entry><entry gd:etag='"A1RbFg1dGit7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc</id><published>2013-07-30T14:53:09.625Z</published><updated>2013-07-30T14:53:10.144Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:10.630Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Arbitrary Document</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc&v=1&s=AMedNnoAAAAAUffvfS0SOlTRoxWUaMfFbpzGyJo9qvau&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:10.144Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:10.144Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/revisions'/></entry><entry gd:etag='"A1RbFhBURSt7ImBk"'><id>https://docs.google.com/feeds/id/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA</id><published>2013-07-30T14:53:06.357Z</published><updated>2013-07-30T14:53:06.895Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:06.974Z</app:edited><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#presentation' label='presentation'/><title>Temporary Presentation</title><content type='text/html' src='https://docs.google.com/feeds/download/presentations/Export?id=1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='alternate' type='text/html' href='https://docs.google.com/presentation/d/1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/presentation/d/1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_presentation_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA&v=2&s=AMedNnoAAAAAUffvfSyG2jRvP5KSkshjhNHiOchzY0Bv&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>presentation:1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:06.895Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:06.670Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA/revisions'/></entry></feed>
+
+> GET /feeds/default/private/full HTTP/1.1
+> Soup-Debug-Timestamp: 1375195997
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 138 (0x7fffe001c730), SoupSocket 46 (0x8dee20)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195997
+< Soup-Debug: SoupMessage 138 (0x7fffe001c730)
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< Expires: Tue, 30 Jul 2013 14:53:17 GMT
+< Date: Tue, 30 Jul 2013 14:53:17 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: W/"D04NRnsyeit7ImA9WhFWEUQ."
+< Last-Modified: Tue, 30 Jul 2013 14:53:17 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"D04NRnsyeit7ImA9WhFWEUQ."'><id>https://docs.google.com/feeds/default/private/full</id><updated>2013-07-30T14:53:17.592Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#item' label='item'/><title>Available Documents - libgdata.documents@gmail.com</title><link rel='alternate' type='text/html' href='https://docs.google.com'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full'/><link rel='http://schemas.google.com/g/2005#batch' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/batch'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><openSearch:startIndex>1</openSearch:startIndex><entry gd:etag='"A1RbFhNDESt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI</id><published>2013-07-30T14:53:07.822Z</published><updated>2013-07-30T14:53:08.314Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:08.679Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Text Document</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI&v=1&s=AMedNnoAAAAAUffvfe3r8_qfSWisSUWCJq8eawdebDYG&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:08.314Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:08.314Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI/revisions'/></entry><entry gd:etag='"A1RbFhEDTit7ImBk"'><id>https://docs.google.com/feeds/id/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E</id><published>2013-07-30T14:53:04.070Z</published><updated>2013-07-30T14:53:05.136Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:05.181Z</app:edited><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#spreadsheet' label='spreadsheet'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Spreadsheet</title><content type='text/html' src='https://docs.google.com/feeds/download/spreadsheets/Export?key=0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='alternate' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E&output=html&chrome=false&widget=true'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_spreadsheet_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='http://schemas.google.com/spreadsheets/2006#worksheetsfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/worksheets/0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E/private/full'/><link rel='http://schemas.google.com/spreadsheets/2006#tablesfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E/tables'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>spreadsheet:0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:05.136Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:04.070Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><docs:hasForm value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E/revisions'/></entry><entry gd:etag='"A1RbFg1dGit7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc</id><published>2013-07-30T14:53:09.625Z</published><updated>2013-07-30T14:53:10.144Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:10.630Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Arbitrary Document</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc&v=1&s=AMedNnoAAAAAUffvfS0SOlTRoxWUaMfFbpzGyJo9qvau&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:10.144Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:10.144Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/revisions'/></entry><entry gd:etag='"A1RbFhBURSt7ImBk"'><id>https://docs.google.com/feeds/id/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA</id><published>2013-07-30T14:53:06.357Z</published><updated>2013-07-30T14:53:06.895Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:06.974Z</app:edited><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#presentation' label='presentation'/><title>Temporary Presentation</title><content type='text/html' src='https://docs.google.com/feeds/download/presentations/Export?id=1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='alternate' type='text/html' href='https://docs.google.com/presentation/d/1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/presentation/d/1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_presentation_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA&v=2&s=AMedNnoAAAAAUffvfSyG2jRvP5KSkshjhNHiOchzY0Bv&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>presentation:1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:06.895Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:06.670Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA/revisions'/></entry></feed>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375196003
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 153 (0x6d1670), SoupSocket 49 (0x8deee0)
+> Host: docs.google.com
+> X-Upload-Content-Length: 0
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>A View from the Bridge</title><category term='http://schemas.google.com/docs/2007#document' scheme='http://schemas.google.com/g/2005#kind'/><docs:writersCanInvite value='false'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375196004
+< Soup-Debug: SoupMessage 153 (0x6d1670)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Tue, 30 Jul 2013 14:53:24 GMT
+< Date: Tue, 30 Jul 2013 14:53:24 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1RbF01cECt7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY
+< Content-Location: https://docs.google.com/feeds/default/private/full/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1RbF01cECt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY</id><published>2013-07-30T14:53:24.109Z</published><updated>2013-07-30T14:53:24.800Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:24.844Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>A View from the Bridge</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:24.800Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:24.370Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375345556
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 26 (0x922460), SoupSocket 9 (0x7be5f0)
+> Host: docs.google.com
+> X-Upload-Content-Length: 0
+> Authorization: GoogleLogin auth=DQAAANAAAACKhOa-WK3N6akB7d7kKA0laUmnO2zgJ6O4seqRp4zTd7KBlc6xHcjduCp-bFT9vlSm4Z0ofb0s5sLLE2WlntM9TyOIVsQvhiq-Vp7hgMUcmhbj68uTp8IWx17waXHY8zAdgC-AU_5BpYj07dAr2TiEHALTFabaz75_tlNZyWiNJbnb9DbKfUfHOFI8WnE5ueYrwUvevYqZ9KPq6BPOnPHluKUlt4wFyZ2_PqyFEjgsvpr4xzmNjLGWuH75fDQef9D7YcrEIHArYGHxIbiElG-x
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>add_file_folder_move_folder</title><category term='http://schemas.google.com/docs/2007#folder' scheme='http://schemas.google.com/g/2005#kind'/><docs:writersCanInvite value='false'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375345557
+< Soup-Debug: SoupMessage 26 (0x922460)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:25:57 GMT
+< Date: Thu, 01 Aug 2013 08:25:57 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1ITGBtREit7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE
+< Content-Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1ITGBtREit7ImBk"'><id>https://docs.google.com/feeds/id/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE</id><published>2013-08-01T08:25:56.758Z</published><updated>2013-08-01T08:25:56.758Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:25:56.942Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#folder' label='folder'/><title>add_file_folder_move_folder</title><content type='application/atom+xml;type=feed' src='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE/contents'/><link rel='alternate' type='text/html' href='https://docs.google.com/folderview?id=0BzY2jgHHwMwYZGpMTnlqNjJWUU0&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_collection_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE/contents'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE/contents'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>folder:0BzY2jgHHwMwYZGpMTnlqNjJWUU0</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYR2FQVDg1X3ZqQlE/acl'/></entry>
+
+> POST /feeds/default/private/full HTTP/1.1
+> Soup-Debug-Timestamp: 1375345557
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 27 (0x9220a0), SoupSocket 10 (0x7fffe40048c0)
+> Host: docs.google.com
+> Slug: test.odt
+> Transfer-Encoding: chunked
+> Content-Type: multipart/related; boundary=0003Z5W789deadbeefRTE456KlemsnoZV
+> Authorization: GoogleLogin auth=DQAAANAAAACKhOa-WK3N6akB7d7kKA0laUmnO2zgJ6O4seqRp4zTd7KBlc6xHcjduCp-bFT9vlSm4Z0ofb0s5sLLE2WlntM9TyOIVsQvhiq-Vp7hgMUcmhbj68uTp8IWx17waXHY8zAdgC-AU_5BpYj07dAr2TiEHALTFabaz75_tlNZyWiNJbnb9DbKfUfHOFI8WnE5ueYrwUvevYqZ9KPq6BPOnPHluKUlt4wFyZ2_PqyFEjgsvpr4xzmNjLGWuH75fDQef9D7YcrEIHArYGHxIbiElG-x
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375345559
+< Soup-Debug: SoupMessage 27 (0x9220a0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:25:59 GMT
+< Date: Thu, 01 Aug 2013 08:25:59 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1ITGBUCRyt7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc
+< Content-Location: https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1ITGBUCRyt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc</id><published>2013-08-01T08:25:57.548Z</published><updated>2013-08-01T08:25:59.057Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:25:59.088Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>add_file_folder_move_text</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:25:59.057Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:25:58.532Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/revisions'/></entry>
+
+> GET /feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc HTTP/1.1
+> Soup-Debug-Timestamp: 1375345564
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 28 (0x922280), SoupSocket 10 (0x7fffe40048c0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAACKhOa-WK3N6akB7d7kKA0laUmnO2zgJ6O4seqRp4zTd7KBlc6xHcjduCp-bFT9vlSm4Z0ofb0s5sLLE2WlntM9TyOIVsQvhiq-Vp7hgMUcmhbj68uTp8IWx17waXHY8zAdgC-AU_5BpYj07dAr2TiEHALTFabaz75_tlNZyWiNJbnb9DbKfUfHOFI8WnE5ueYrwUvevYqZ9KPq6BPOnPHluKUlt4wFyZ2_PqyFEjgsvpr4xzmNjLGWuH75fDQef9D7YcrEIHArYGHxIbiElG-x
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375345564
+< Soup-Debug: SoupMessage 28 (0x922280)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:26:04 GMT
+< Date: Thu, 01 Aug 2013 08:26:04 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1ITGBVTEit7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 08:25:59 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1ITGBVTEit7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc</id><published>2013-08-01T08:25:57.548Z</published><updated>2013-08-01T08:25:58.773Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:25:59.462Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>add_file_folder_move_text</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc&v=1&s=AMedNnoAAAAAUfo3vOOV_1V1WJEYAQzyegHcjhiaGIrO&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:25:58.773Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:25:58.773Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375345578
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 46 (0x922280), SoupSocket 16 (0x7be770)
+> Host: docs.google.com
+> X-Upload-Content-Length: 0
+> Authorization: GoogleLogin auth=DQAAANAAAACKhOa-WK3N6akB7d7kKA0laUmnO2zgJ6O4seqRp4zTd7KBlc6xHcjduCp-bFT9vlSm4Z0ofb0s5sLLE2WlntM9TyOIVsQvhiq-Vp7hgMUcmhbj68uTp8IWx17waXHY8zAdgC-AU_5BpYj07dAr2TiEHALTFabaz75_tlNZyWiNJbnb9DbKfUfHOFI8WnE5ueYrwUvevYqZ9KPq6BPOnPHluKUlt4wFyZ2_PqyFEjgsvpr4xzmNjLGWuH75fDQef9D7YcrEIHArYGHxIbiElG-x
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>add_file_folder_move_folder</title><category term='http://schemas.google.com/docs/2007#folder' scheme='http://schemas.google.com/g/2005#kind'/><docs:writersCanInvite value='false'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375345579
+< Soup-Debug: SoupMessage 46 (0x922280)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:26:19 GMT
+< Date: Thu, 01 Aug 2013 08:26:19 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1ITGApXEyt7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0
+< Content-Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1ITGApXEyt7ImBk"'><id>https://docs.google.com/feeds/id/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0</id><published>2013-08-01T08:26:18.669Z</published><updated>2013-08-01T08:26:18.669Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:26:19.045Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#folder' label='folder'/><title>add_file_folder_move_folder</title><content type='application/atom+xml;type=feed' src='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0/contents'/><link rel='alternate' type='text/html' href='https://docs.google.com/folderview?id=0BzY2jgHHwMwYZGpMTnlqNjJWUU0&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_collection_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0/contents'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0/contents'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>folder:0BzY2jgHHwMwYZGpMTnlqNjJWUU0</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0/acl'/></entry>
+
+> POST /feeds/default/private/full/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0/contents HTTP/1.1
+> Soup-Debug-Timestamp: 1375345579
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 47 (0x922190), SoupSocket 17 (0x7fffe40048c0)
+> Host: docs.google.com
+> Slug: test.odt
+> Transfer-Encoding: chunked
+> Content-Type: multipart/related; boundary=0003Z5W789deadbeefRTE456KlemsnoZV
+> Authorization: GoogleLogin auth=DQAAANAAAACKhOa-WK3N6akB7d7kKA0laUmnO2zgJ6O4seqRp4zTd7KBlc6xHcjduCp-bFT9vlSm4Z0ofb0s5sLLE2WlntM9TyOIVsQvhiq-Vp7hgMUcmhbj68uTp8IWx17waXHY8zAdgC-AU_5BpYj07dAr2TiEHALTFabaz75_tlNZyWiNJbnb9DbKfUfHOFI8WnE5ueYrwUvevYqZ9KPq6BPOnPHluKUlt4wFyZ2_PqyFEjgsvpr4xzmNjLGWuH75fDQef9D7YcrEIHArYGHxIbiElG-x
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375345581
+< Soup-Debug: SoupMessage 47 (0x922190)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:26:20 GMT
+< Date: Thu, 01 Aug 2013 08:26:20 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1ITGAVNRCt7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0/contents/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc
+< Content-Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0/contents/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1ITGAVNRCt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc</id><published>2013-08-01T08:26:19.839Z</published><updated>2013-08-01T08:26:20.629Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:26:20.691Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>add_file_folder_move_text</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='http://schemas.google.com/docs/2007#parent' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0' title='add_file_folder_move_folder'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc&v=2&s=AMedNnoAAAAAUfo3zMnWmjRw7luV_amuYNcp5fKDXwZD&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0/contents/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0/contents/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/contentmedia/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:26:20.629Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:26:20.282Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/revisions'/></entry>
+
+> GET /feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc HTTP/1.1
+> Soup-Debug-Timestamp: 1375345586
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 48 (0x9220a0), SoupSocket 17 (0x7fffe40048c0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAACKhOa-WK3N6akB7d7kKA0laUmnO2zgJ6O4seqRp4zTd7KBlc6xHcjduCp-bFT9vlSm4Z0ofb0s5sLLE2WlntM9TyOIVsQvhiq-Vp7hgMUcmhbj68uTp8IWx17waXHY8zAdgC-AU_5BpYj07dAr2TiEHALTFabaz75_tlNZyWiNJbnb9DbKfUfHOFI8WnE5ueYrwUvevYqZ9KPq6BPOnPHluKUlt4wFyZ2_PqyFEjgsvpr4xzmNjLGWuH75fDQef9D7YcrEIHArYGHxIbiElG-x
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375345586
+< Soup-Debug: SoupMessage 48 (0x9220a0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:26:26 GMT
+< Date: Thu, 01 Aug 2013 08:26:26 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1ITGAVNRCt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 08:26:20 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1ITGAVNRCt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc</id><published>2013-08-01T08:26:19.839Z</published><updated>2013-08-01T08:26:20.629Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:26:20.691Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>add_file_folder_move_text</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='http://schemas.google.com/docs/2007#parent' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0' title='add_file_folder_move_folder'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc&v=2&s=AMedNnoAAAAAUfo30pscv-p3yxm8AHNSptjocfnbTXFR&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:26:20.629Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:26:20.282Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375195900
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 50 (0x6d12b0), SoupSocket 18 (0x7fffd80103e0)
+> Host: docs.google.com
+> Slug: test.ods
+> X-Upload-Content-Type: application/x-vnd.oasis.opendocument.spreadsheet
+> X-Upload-Content-Length: 7564
+> Content-Type: application/atom+xml; charset=UTF-8
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195900
+< Soup-Debug: SoupMessage 50 (0x6d12b0)
+< Location: https://docs.google.com/feeds/upload/create-session/default/private/full?convert=true&upload_id=AEnB2UqpcAmPnzJ0j-RLAvyHewAisZ0S9fCmpH-j0b8pcrxI1aQUIPFVcNPqbo1D6uL3tPDcJw5lUeirnslXIAkG_HuO05Mpaw
+< Date: Tue, 30 Jul 2013 14:51:40 GMT
+< Server: HTTP Upload Server Built on Jul 21 2013 19:20:38 (1374459638)
+< Content-Length: 0
+< Content-Type: text/html; charset=UTF-8
+<
+
+> PUT /feeds/upload/create-session/default/private/full?convert=true&upload_id=AEnB2UqpcAmPnzJ0j-RLAvyHewAisZ0S9fCmpH-j0b8pcrxI1aQUIPFVcNPqbo1D6uL3tPDcJw5lUeirnslXIAkG_HuO05Mpaw HTTP/1.1
+> Soup-Debug-Timestamp: 1375195900
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 51 (0x7fffe401fe60), SoupSocket 18 (0x7fffd80103e0)
+> Host: docs.google.com
+> Content-Type: application/x-vnd.oasis.opendocument.spreadsheet
+> Content-Length: 7564
+> Content-Range: bytes 0-7563/7564
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375195902
+< Soup-Debug: SoupMessage 51 (0x7fffe401fe60)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Tue, 30 Jul 2013 14:51:42 GMT
+< Date: Tue, 30 Jul 2013 14:51:42 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1RbFAkMBit7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE
+< Content-Location: https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE
+< Content-Length: 3773
+< Server: HTTP Upload Server Built on Jul 21 2013 19:20:38 (1374459638)
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1RbFAkMBit7ImBk"'><id>https://docs.google.com/feeds/id/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE</id><published>2013-07-30T14:51:41.329Z</published><updated>2013-07-30T14:51:41.329Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:51:42.146Z</app:edited><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#spreadsheet' label='spreadsheet'/><title>Temporary Document (Spreadsheet)</title><content type='text/html' src='https://docs.google.com/feeds/download/spreadsheets/Export?key=0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE'/><link rel='alternate' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE&output=html&chrome=false&widget=true'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_spreadsheet_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE'/><link rel='http://schemas.google.com/spreadsheets/2006#worksheetsfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/worksheets/0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE/private/full'/><link rel='http://schemas.google.com/spreadsheets/2006#tablesfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE/tables'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>spreadsheet:0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:51:41.329Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><docs:hasForm value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE/revisions'/></entry>
+
+> GET /feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE HTTP/1.1
+> Soup-Debug-Timestamp: 1375195907
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 52 (0x6d1760), SoupSocket 18 (0x7fffd80103e0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195907
+< Soup-Debug: SoupMessage 52 (0x6d1760)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Tue, 30 Jul 2013 14:51:47 GMT
+< Date: Tue, 30 Jul 2013 14:51:47 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1RbFAkMBit7ImBk"
+< Last-Modified: Tue, 30 Jul 2013 14:51:42 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1RbFAkMBit7ImBk"'><id>https://docs.google.com/feeds/id/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE</id><published>2013-07-30T14:51:41.329Z</published><updated>2013-07-30T14:51:41.329Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:51:42.146Z</app:edited><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#spreadsheet' label='spreadsheet'/><title>Temporary Document (Spreadsheet)</title><content type='text/html' src='https://docs.google.com/feeds/download/spreadsheets/Export?key=0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE'/><link rel='alternate' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE&output=html&chrome=false&widget=true'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_spreadsheet_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE'/><link rel='http://schemas.google.com/spreadsheets/2006#worksheetsfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/worksheets/0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE/private/full'/><link rel='http://schemas.google.com/spreadsheets/2006#tablesfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE/tables'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>spreadsheet:0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:51:41.329Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><docs:hasForm value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375195983
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 129 (0x6d13a0), SoupSocket 41 (0x7fffd8010560)
+> Host: docs.google.com
+> X-Upload-Content-Length: 0
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>Temporary Spreadsheet</title><category term='http://schemas.google.com/docs/2007#spreadsheet' scheme='http://schemas.google.com/g/2005#kind'/><docs:writersCanInvite value='false'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375195985
+< Soup-Debug: SoupMessage 129 (0x6d13a0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Tue, 30 Jul 2013 14:53:05 GMT
+< Date: Tue, 30 Jul 2013 14:53:05 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1RbFhEDTit7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E
+< Content-Location: https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1RbFhEDTit7ImBk"'><id>https://docs.google.com/feeds/id/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E</id><published>2013-07-30T14:53:04.070Z</published><updated>2013-07-30T14:53:05.136Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:05.181Z</app:edited><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#spreadsheet' label='spreadsheet'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Spreadsheet</title><content type='text/html' src='https://docs.google.com/feeds/download/spreadsheets/Export?key=0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='alternate' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E&output=html&chrome=false&widget=true'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_spreadsheet_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='http://schemas.google.com/spreadsheets/2006#worksheetsfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/worksheets/0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E/private/full'/><link rel='http://schemas.google.com/spreadsheets/2006#tablesfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E/tables'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>spreadsheet:0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:05.136Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:04.070Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><docs:hasForm value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E/revisions'/></entry>
+
+> POST /feeds/upload/create-session/default/private/full?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375195985
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 130 (0x6d11c0), SoupSocket 42 (0x8dea60)
+> Host: docs.google.com
+> X-Upload-Content-Length: 0
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>Temporary Presentation</title><category term='http://schemas.google.com/docs/2007#presentation' scheme='http://schemas.google.com/g/2005#kind'/><docs:writersCanInvite value='false'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375195987
+< Soup-Debug: SoupMessage 130 (0x6d11c0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Tue, 30 Jul 2013 14:53:07 GMT
+< Date: Tue, 30 Jul 2013 14:53:07 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1RbFhBURSt7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA
+< Content-Location: https://docs.google.com/feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1RbFhBURSt7ImBk"'><id>https://docs.google.com/feeds/id/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA</id><published>2013-07-30T14:53:06.357Z</published><updated>2013-07-30T14:53:06.895Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:06.974Z</app:edited><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#presentation' label='presentation'/><title>Temporary Presentation</title><content type='text/html' src='https://docs.google.com/feeds/download/presentations/Export?id=1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='alternate' type='text/html' href='https://docs.google.com/presentation/d/1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/presentation/d/1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_presentation_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA&v=2&s=AMedNnoAAAAAUffvc1OHsMxzCScgmFslNDr_42YSIYP1&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>presentation:1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:06.895Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:06.670Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA/revisions'/></entry>
+
+> POST /feeds/upload/create-session/default/private/full?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375195987
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 131 (0x6d10d0), SoupSocket 43 (0x8dee20)
+> Host: docs.google.com
+> X-Upload-Content-Length: 0
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>Temporary Text Document</title><category term='http://schemas.google.com/docs/2007#document' scheme='http://schemas.google.com/g/2005#kind'/><docs:writersCanInvite value='false'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375195988
+< Soup-Debug: SoupMessage 131 (0x6d10d0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Tue, 30 Jul 2013 14:53:08 GMT
+< Date: Tue, 30 Jul 2013 14:53:08 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1RbFhNNQit7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI
+< Content-Location: https://docs.google.com/feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1RbFhNNQit7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI</id><published>2013-07-30T14:53:07.822Z</published><updated>2013-07-30T14:53:08.514Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:08.597Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Text Document</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:08.514Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:08.047Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI/revisions'/></entry>
+
+> POST /feeds/upload/create-session/default/private/full?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375195988
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 132 (0x7fffe401fe60), SoupSocket 44 (0x7fffd8010260)
+> Host: docs.google.com
+> Slug: test.odt
+> X-Upload-Content-Type: application/vnd.oasis.opendocument.text
+> X-Upload-Content-Length: 8033
+> Content-Type: application/atom+xml; charset=UTF-8
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195989
+< Soup-Debug: SoupMessage 132 (0x7fffe401fe60)
+< Location: https://docs.google.com/feeds/upload/create-session/default/private/full?convert=true&upload_id=AEnB2UpyeGO5mWvJJxP8i9RErPfsDl51mSjN-CGxSSD2M7cox5ATYATcIzlPyScPhz7jwvBdQfYnKV1F8Nsz76MrGj2z2RlRyw
+< Date: Tue, 30 Jul 2013 14:53:09 GMT
+< Server: HTTP Upload Server Built on Jul 21 2013 19:20:38 (1374459638)
+< Content-Length: 0
+< Content-Type: text/html; charset=UTF-8
+<
+
+> PUT /feeds/upload/create-session/default/private/full?convert=true&upload_id=AEnB2UpyeGO5mWvJJxP8i9RErPfsDl51mSjN-CGxSSD2M7cox5ATYATcIzlPyScPhz7jwvBdQfYnKV1F8Nsz76MrGj2z2RlRyw HTTP/1.1
+> Soup-Debug-Timestamp: 1375195989
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 133 (0x6d1490), SoupSocket 44 (0x7fffd8010260)
+> Host: docs.google.com
+> Content-Type: application/vnd.oasis.opendocument.text
+> Content-Length: 8033
+> Content-Range: bytes 0-8032/8033
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375195990
+< Soup-Debug: SoupMessage 133 (0x6d1490)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Tue, 30 Jul 2013 14:53:10 GMT
+< Date: Tue, 30 Jul 2013 14:53:10 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1RbFg1bGit7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc
+< Content-Location: https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc
+< Content-Length: 3458
+< Server: HTTP Upload Server Built on Jul 21 2013 19:20:38 (1374459638)
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1RbFg1bGit7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc</id><published>2013-07-30T14:53:09.625Z</published><updated>2013-07-30T14:53:09.625Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:10.414Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Arbitrary Document</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:09.625Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:09.884Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/revisions'/></entry>
+
+> GET /feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc HTTP/1.1
+> Soup-Debug-Timestamp: 1375195995
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 134 (0x6d11c0), SoupSocket 44 (0x7fffd8010260)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195995
+< Soup-Debug: SoupMessage 134 (0x6d11c0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Tue, 30 Jul 2013 14:53:15 GMT
+< Date: Tue, 30 Jul 2013 14:53:15 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1RbFg1dGit7ImBk"
+< Last-Modified: Tue, 30 Jul 2013 14:53:10 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1RbFg1dGit7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc</id><published>2013-07-30T14:53:09.625Z</published><updated>2013-07-30T14:53:10.144Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:10.630Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Arbitrary Document</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc&v=1&s=AMedNnoAAAAAUffve3H4FAdq_QVA0eu-4AQbwb0gupeC&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:10.144Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:10.144Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375195982
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 128 (0x6d1670), SoupSocket 40 (0x7fffd8010560)
+> Host: docs.google.com
+> X-Upload-Content-Length: 0
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>Temporary Folder</title><category term='http://schemas.google.com/docs/2007#folder' scheme='http://schemas.google.com/g/2005#kind'/><docs:writersCanInvite value='false'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375195983
+< Soup-Debug: SoupMessage 128 (0x6d1670)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Tue, 30 Jul 2013 14:53:03 GMT
+< Date: Tue, 30 Jul 2013 14:53:03 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1RbFhdWBSt7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYRHphWkhpNVZQZG8
+< Content-Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYRHphWkhpNVZQZG8
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1RbFhdWBSt7ImBk"'><id>https://docs.google.com/feeds/id/folder%3A0BzY2jgHHwMwYRHphWkhpNVZQZG8</id><published>2013-07-30T14:53:02.725Z</published><updated>2013-07-30T14:53:02.725Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:03.039Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#folder' label='folder'/><title>Temporary Folder</title><content type='application/atom+xml;type=feed' src='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYRHphWkhpNVZQZG8/contents'/><link rel='alternate' type='text/html' href='https://docs.google.com/folderview?id=0BzY2jgHHwMwYRHphWkhpNVZQZG8&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_collection_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYRHphWkhpNVZQZG8/contents'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/folder%3A0BzY2jgHHwMwYRHphWkhpNVZQZG8/contents'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYRHphWkhpNVZQZG8'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYRHphWkhpNVZQZG8'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>folder:0BzY2jgHHwMwYRHphWkhpNVZQZG8</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYRHphWkhpNVZQZG8/acl'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375344868
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 27 (0x6d14a0), SoupSocket 5 (0x7fffe40038a0)
+> Host: docs.google.com
+> Slug: test.odt
+> X-Upload-Content-Type: application/vnd.oasis.opendocument.text
+> X-Upload-Content-Length: 8033
+> Content-Type: application/atom+xml; charset=UTF-8
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375344868
+< Soup-Debug: SoupMessage 27 (0x6d14a0)
+< Location: https://docs.google.com/feeds/upload/create-session/default/private/full?convert=true&upload_id=AEnB2Urn6R_PoSPJpOfoOBGMG3mNZpSioLEqLOzEjSBZByxBa51kg9dSSRsyZbWb5ao8po0BLuk5GZ5RK7mjhZLVbAIyHHP85w
+< Date: Thu, 01 Aug 2013 08:14:28 GMT
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+< Content-Length: 0
+< Content-Type: text/html; charset=UTF-8
+<
+
+> PUT /feeds/upload/create-session/default/private/full?convert=true&upload_id=AEnB2Urn6R_PoSPJpOfoOBGMG3mNZpSioLEqLOzEjSBZByxBa51kg9dSSRsyZbWb5ao8po0BLuk5GZ5RK7mjhZLVbAIyHHP85w HTTP/1.1
+> Soup-Debug-Timestamp: 1375344868
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 28 (0x6d1770), SoupSocket 5 (0x7fffe40038a0)
+> Host: docs.google.com
+> Content-Type: application/vnd.oasis.opendocument.text
+> Content-Length: 8033
+> Content-Range: bytes 0-8032/8033
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375344869
+< Soup-Debug: SoupMessage 28 (0x6d1770)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:14:29 GMT
+< Date: Thu, 01 Aug 2013 08:14:29 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1IMVA0MTyt7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8
+< Content-Location: https://docs.google.com/feeds/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8
+< Content-Length: 3501
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1IMVA0MTyt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8</id><published>2013-08-01T08:14:28.895Z</published><updated>2013-08-01T08:14:28.895Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:14:29.552Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Update file (/documents/update/content-and-metadata/non-resumable)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:14:28.895Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:14:29.131Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8/revisions'/></entry>
+
+> GET /feeds/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8 HTTP/1.1
+> Soup-Debug-Timestamp: 1375344874
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 29 (0x6d13b0), SoupSocket 5 (0x7fffe40038a0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375344874
+< Soup-Debug: SoupMessage 29 (0x6d13b0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:14:34 GMT
+< Date: Thu, 01 Aug 2013 08:14:34 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1IMVA1ZBSt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 08:14:29 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1IMVA1ZBSt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8</id><published>2013-08-01T08:14:28.895Z</published><updated>2013-08-01T08:14:29.328Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:14:29.787Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Update file (/documents/update/content-and-metadata/non-resumable)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8&v=1&s=AMedNnoAAAAAUfo1CuiBVc3h4cYmQviVM6faS9oqo7cg&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:14:29.328Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:14:29.328Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375344852
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 20 (0x6d13b0), SoupSocket 4 (0x7fffe40038a0)
+> Host: docs.google.com
+> Slug: test.odt
+> X-Upload-Content-Type: application/vnd.oasis.opendocument.text
+> X-Upload-Content-Length: 8033
+> Content-Type: application/atom+xml; charset=UTF-8
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375344853
+< Soup-Debug: SoupMessage 20 (0x6d13b0)
+< Location: https://docs.google.com/feeds/upload/create-session/default/private/full?convert=true&upload_id=AEnB2UoNYWSCaqNU_2q1HfbKKcC9AWsGqVgJr5_6IMPziZuNPnHx-2prQh6o7rkZrjVFiJ9I7dgyBmRu_pSo91s9A9BpYa_NjA
+< Date: Thu, 01 Aug 2013 08:14:13 GMT
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+< Content-Length: 0
+< Content-Type: text/html; charset=UTF-8
+<
+
+> PUT /feeds/upload/create-session/default/private/full?convert=true&upload_id=AEnB2UoNYWSCaqNU_2q1HfbKKcC9AWsGqVgJr5_6IMPziZuNPnHx-2prQh6o7rkZrjVFiJ9I7dgyBmRu_pSo91s9A9BpYa_NjA HTTP/1.1
+> Soup-Debug-Timestamp: 1375344853
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 21 (0x7fffe40088d0), SoupSocket 4 (0x7fffe40038a0)
+> Host: docs.google.com
+> Content-Type: application/vnd.oasis.opendocument.text
+> Content-Length: 8033
+> Content-Range: bytes 0-8032/8033
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375344855
+< Soup-Debug: SoupMessage 21 (0x7fffe40088d0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:14:15 GMT
+< Date: Thu, 01 Aug 2013 08:14:15 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1IMVBhSAit7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g
+< Content-Location: https://docs.google.com/feeds/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g
+< Content-Length: 3497
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1IMVBhSAit7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g</id><published>2013-08-01T08:14:14.275Z</published><updated>2013-08-01T08:14:14.275Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:14:15.714Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Update file (/documents/update/content-and-metadata/resumable)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:14:14.275Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:14:15.192Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g/revisions'/></entry>
+
+> GET /feeds/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g HTTP/1.1
+> Soup-Debug-Timestamp: 1375344860
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 22 (0x6d1590), SoupSocket 4 (0x7fffe40038a0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375344861
+< Soup-Debug: SoupMessage 22 (0x6d1590)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:14:21 GMT
+< Date: Thu, 01 Aug 2013 08:14:21 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1IMVBhRFit7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 08:14:15 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1IMVBhRFit7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g</id><published>2013-08-01T08:14:14.275Z</published><updated>2013-08-01T08:14:15.414Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:14:15.802Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Update file (/documents/update/content-and-metadata/resumable)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g&v=1&s=AMedNnoAAAAAUfo0_Q4mfKrs_nf4VcJUj61ILy9qy_50&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:14:15.414Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:14:15.414Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375344839
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 14 (0x6d11d0), SoupSocket 3 (0x97e760)
+> Host: docs.google.com
+> Slug: test.odt
+> X-Upload-Content-Type: application/vnd.oasis.opendocument.text
+> X-Upload-Content-Length: 8033
+> Content-Type: application/atom+xml; charset=UTF-8
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375344839
+< Soup-Debug: SoupMessage 14 (0x6d11d0)
+< Location: https://docs.google.com/feeds/upload/create-session/default/private/full?convert=true&upload_id=AEnB2UqbPcgQ2ijaNT3or3nFAyQjnTJuTbn-ioeEvlpy9RcPQ2RBqNe53b8YpL_29gKc8nwKGHxZS5g6rXZX-JaNUfWKEm1-Kg
+< Date: Thu, 01 Aug 2013 08:13:59 GMT
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+< Content-Length: 0
+< Content-Type: text/html; charset=UTF-8
+<
+
+> PUT /feeds/upload/create-session/default/private/full?convert=true&upload_id=AEnB2UqbPcgQ2ijaNT3or3nFAyQjnTJuTbn-ioeEvlpy9RcPQ2RBqNe53b8YpL_29gKc8nwKGHxZS5g6rXZX-JaNUfWKEm1-Kg HTTP/1.1
+> Soup-Debug-Timestamp: 1375344839
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 15 (0x6d10e0), SoupSocket 3 (0x97e760)
+> Host: docs.google.com
+> Content-Type: application/vnd.oasis.opendocument.text
+> Content-Length: 8033
+> Content-Range: bytes 0-8032/8033
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375344841
+< Soup-Debug: SoupMessage 15 (0x6d10e0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:14:01 GMT
+< Date: Thu, 01 Aug 2013 08:14:01 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1IMVE4KQSt7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo
+< Content-Location: https://docs.google.com/feeds/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo
+< Content-Length: 3493
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1IMVE4KQSt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo</id><published>2013-08-01T08:13:59.925Z</published><updated>2013-08-01T08:13:59.925Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:14:00.822Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Update file (/documents/update/content-only/non-resumable)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:13:59.925Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:14:00.350Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo/revisions'/></entry>
+
+> GET /feeds/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo HTTP/1.1
+> Soup-Debug-Timestamp: 1375344846
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 16 (0x6d12c0), SoupSocket 3 (0x97e760)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375344846
+< Soup-Debug: SoupMessage 16 (0x6d12c0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:14:06 GMT
+< Date: Thu, 01 Aug 2013 08:14:06 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1IMVE4MQSt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 08:14:01 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1IMVE4MQSt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo</id><published>2013-08-01T08:13:59.925Z</published><updated>2013-08-01T08:14:00.573Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:14:01.038Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Update file (/documents/update/content-only/non-resumable)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo&v=1&s=AMedNnoAAAAAUfo07u8nhODAOKw6eC4PiDAIWfbi9Ffp&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:14:00.573Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:14:00.573Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375344825
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 7 (0x6d12c0), SoupSocket 2 (0x97e760)
+> Host: docs.google.com
+> Slug: test.odt
+> X-Upload-Content-Type: application/vnd.oasis.opendocument.text
+> X-Upload-Content-Length: 8033
+> Content-Type: application/atom+xml; charset=UTF-8
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375344825
+< Soup-Debug: SoupMessage 7 (0x6d12c0)
+< Location: https://docs.google.com/feeds/upload/create-session/default/private/full?convert=true&upload_id=AEnB2UrXRTB4VOxWN5Xuw0a9FivyKMOwWe0j5cJa51mwDBADDpgm31BRo0kIblTc_0VG4jXuI82yc854IOF0h1h5lIyjzEh2hg
+< Date: Thu, 01 Aug 2013 08:13:45 GMT
+< Server: HTTP Upload Server Built on Jul 21 2013 19:20:38 (1374459638)
+< Content-Length: 0
+< Content-Type: text/html; charset=UTF-8
+<
+
+> PUT /feeds/upload/create-session/default/private/full?convert=true&upload_id=AEnB2UrXRTB4VOxWN5Xuw0a9FivyKMOwWe0j5cJa51mwDBADDpgm31BRo0kIblTc_0VG4jXuI82yc854IOF0h1h5lIyjzEh2hg HTTP/1.1
+> Soup-Debug-Timestamp: 1375344825
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 8 (0x6d14a0), SoupSocket 2 (0x97e760)
+> Host: docs.google.com
+> Content-Type: application/vnd.oasis.opendocument.text
+> Content-Length: 8033
+> Content-Range: bytes 0-8032/8033
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375344827
+< Soup-Debug: SoupMessage 8 (0x6d14a0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:13:46 GMT
+< Date: Thu, 01 Aug 2013 08:13:46 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1IMUw4MHit7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM
+< Content-Location: https://docs.google.com/feeds/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM
+< Content-Length: 3489
+< Server: HTTP Upload Server Built on Jul 21 2013 19:20:38 (1374459638)
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1IMUw4MHit7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM</id><published>2013-08-01T08:13:45.873Z</published><updated>2013-08-01T08:13:45.873Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:13:46.794Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Update file (/documents/update/content-only/resumable)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:13:45.873Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:13:46.307Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM/revisions'/></entry>
+
+> GET /feeds/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM HTTP/1.1
+> Soup-Debug-Timestamp: 1375344832
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 9 (0x6d1770), SoupSocket 2 (0x97e760)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375344832
+< Soup-Debug: SoupMessage 9 (0x6d1770)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:13:52 GMT
+< Date: Thu, 01 Aug 2013 08:13:52 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1IMUw5dByt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 08:13:47 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1IMUw5dByt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM</id><published>2013-08-01T08:13:45.873Z</published><updated>2013-08-01T08:13:46.506Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:13:47.161Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Update file (/documents/update/content-only/resumable)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM&v=1&s=AMedNnoAAAAAUfo04A9prrtLZkDxgxMJ3erVDa6109Ma&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:13:46.506Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:13:46.506Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375344812
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 1 (0x6d14a0), SoupSocket 1 (0x97e6a0)
+> Host: docs.google.com
+> Slug: test.odt
+> X-Upload-Content-Type: application/vnd.oasis.opendocument.text
+> X-Upload-Content-Length: 8033
+> Content-Type: application/atom+xml; charset=UTF-8
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375344812
+< Soup-Debug: SoupMessage 1 (0x6d14a0)
+< Location: https://docs.google.com/feeds/upload/create-session/default/private/full?convert=true&upload_id=AEnB2Urn6ymBKOJ7RHLF854rhm8y5YUAKJb7n8VjNfbCl_RRYLASrxMgRomvWQqlZ75mlBF-kX02mS0-OISvzYSWy1r4yLkRCw
+< Date: Thu, 01 Aug 2013 08:13:32 GMT
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+< Content-Length: 0
+< Content-Type: text/html; charset=UTF-8
+<
+
+> PUT /feeds/upload/create-session/default/private/full?convert=true&upload_id=AEnB2Urn6ymBKOJ7RHLF854rhm8y5YUAKJb7n8VjNfbCl_RRYLASrxMgRomvWQqlZ75mlBF-kX02mS0-OISvzYSWy1r4yLkRCw HTTP/1.1
+> Soup-Debug-Timestamp: 1375344812
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 2 (0x6d1770), SoupSocket 1 (0x97e6a0)
+> Host: docs.google.com
+> Content-Type: application/vnd.oasis.opendocument.text
+> Content-Length: 8033
+> Content-Range: bytes 0-8032/8033
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375344813
+< Soup-Debug: SoupMessage 2 (0x6d1770)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:13:33 GMT
+< Date: Thu, 01 Aug 2013 08:13:33 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1IMUxQLTyt7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME
+< Content-Location: https://docs.google.com/feeds/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME
+< Content-Length: 3494
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1IMUxQLTyt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME</id><published>2013-08-01T08:13:32.650Z</published><updated>2013-08-01T08:13:32.650Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:13:33.644Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Update file (/documents/update/metadata-only/non-resumable)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:13:32.650Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:13:33.206Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME/revisions'/></entry>
+
+> GET /feeds/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME HTTP/1.1
+> Soup-Debug-Timestamp: 1375344818
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 3 (0x6d1590), SoupSocket 1 (0x97e6a0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375344819
+< Soup-Debug: SoupMessage 3 (0x6d1590)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:13:38 GMT
+< Date: Thu, 01 Aug 2013 08:13:38 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1IMUxQNTyt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 08:13:33 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1IMUxQNTyt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME</id><published>2013-08-01T08:13:32.650Z</published><updated>2013-08-01T08:13:33.409Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:13:33.860Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Update file (/documents/update/metadata-only/non-resumable)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME&v=1&s=AMedNnoAAAAAUfo00p_Hh9CA5B0s-37_bNLLBnHbmW34&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:13:33.409Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:13:33.409Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375342570
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 73 (0x8620a0), SoupSocket 22 (0x7dbc70)
+> Host: docs.google.com
+> X-Upload-Content-Length: 0
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>Temporary Folder for Uploading Documents</title><category term='http://schemas.google.com/docs/2007#folder' scheme='http://schemas.google.com/g/2005#kind'/><docs:writersCanInvite value='false'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375342574
+< Soup-Debug: SoupMessage 73 (0x8620a0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:36:14 GMT
+< Date: Thu, 01 Aug 2013 07:36:14 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRxVOBSt7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYTmEyZGp5MF9OdzA
+< Content-Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYTmEyZGp5MF9OdzA
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRxVOBSt7ImBk"'><id>https://docs.google.com/feeds/id/folder%3A0BzY2jgHHwMwYTmEyZGp5MF9OdzA</id><published>2013-08-01T07:36:10.307Z</published><updated>2013-08-01T07:36:10.307Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:36:13.887Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#folder' label='folder'/><title>Temporary Folder for Uploading Documents</title><content type='application/atom+xml;type=feed' src='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYTmEyZGp5MF9OdzA/contents'/><link rel='alternate' type='text/html' href='https://docs.google.com/folderview?id=0BzY2jgHHwMwYTmEyZGp5MF9OdzA&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_collection_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYTmEyZGp5MF9OdzA/contents'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/folder%3A0BzY2jgHHwMwYTmEyZGp5MF9OdzA/contents'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYTmEyZGp5MF9OdzA'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYTmEyZGp5MF9OdzA'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>folder:0BzY2jgHHwMwYTmEyZGp5MF9OdzA</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYTmEyZGp5MF9OdzA/acl'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375342561
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 66 (0x862370), SoupSocket 20 (0x7dbd30)
+> Host: docs.google.com
+> X-Upload-Content-Length: 0
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>Temporary Folder for Uploading Documents</title><category term='http://schemas.google.com/docs/2007#folder' scheme='http://schemas.google.com/g/2005#kind'/><docs:writersCanInvite value='false'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375342562
+< Soup-Debug: SoupMessage 66 (0x862370)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:36:02 GMT
+< Date: Thu, 01 Aug 2013 07:36:02 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INR0VPRCt7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k
+< Content-Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INR0VPRCt7ImBk"'><id>https://docs.google.com/feeds/id/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k</id><published>2013-08-01T07:36:02.019Z</published><updated>2013-08-01T07:36:02.019Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:36:02.235Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#folder' label='folder'/><title>Temporary Folder for Uploading Documents</title><content type='application/atom+xml;type=feed' src='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k/contents'/><link rel='alternate' type='text/html' href='https://docs.google.com/folderview?id=0BzY2jgHHwMwYN0pZNnFVRXMxd1k&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_collection_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k/contents'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k/contents'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>folder:0BzY2jgHHwMwYN0pZNnFVRXMxd1k</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k/acl'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375342542
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 52 (0x7fffe40050c0), SoupSocket 16 (0x7db8b0)
+> Host: docs.google.com
+> X-Upload-Content-Length: 0
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>Temporary Folder for Uploading Documents</title><category term='http://schemas.google.com/docs/2007#folder' scheme='http://schemas.google.com/g/2005#kind'/><docs:writersCanInvite value='false'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375342543
+< Soup-Debug: SoupMessage 52 (0x7fffe40050c0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:35:43 GMT
+< Date: Thu, 01 Aug 2013 07:35:43 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRglLQit7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k
+< Content-Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRglLQit7ImBk"'><id>https://docs.google.com/feeds/id/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k</id><published>2013-08-01T07:35:42.422Z</published><updated>2013-08-01T07:35:42.422Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:35:42.653Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#folder' label='folder'/><title>Temporary Folder for Uploading Documents</title><content type='application/atom+xml;type=feed' src='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k/contents'/><link rel='alternate' type='text/html' href='https://docs.google.com/folderview?id=0BzY2jgHHwMwYenBFRVhodkxJY0k&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_collection_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k/contents'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k/contents'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>folder:0BzY2jgHHwMwYenBFRVhodkxJY0k</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k/acl'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375342552
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 59 (0x862280), SoupSocket 18 (0x7db970)
+> Host: docs.google.com
+> X-Upload-Content-Length: 0
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>Temporary Folder for Uploading Documents</title><category term='http://schemas.google.com/docs/2007#folder' scheme='http://schemas.google.com/g/2005#kind'/><docs:writersCanInvite value='false'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375342553
+< Soup-Debug: SoupMessage 59 (0x862280)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:35:53 GMT
+< Date: Thu, 01 Aug 2013 07:35:53 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INR0xOBSt7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM
+< Content-Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INR0xOBSt7ImBk"'><id>https://docs.google.com/feeds/id/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM</id><published>2013-08-01T07:35:52.832Z</published><updated>2013-08-01T07:35:52.832Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:35:53.151Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#folder' label='folder'/><title>Temporary Folder for Uploading Documents</title><content type='application/atom+xml;type=feed' src='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM/contents'/><link rel='alternate' type='text/html' href='https://docs.google.com/folderview?id=0BzY2jgHHwMwYXzkyMGhELWdsamM&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_collection_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM/contents'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM/contents'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>folder:0BzY2jgHHwMwYXzkyMGhELWdsamM</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM/acl'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375342503
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 31 (0x8620a0), SoupSocket 10 (0x7dbaf0)
+> Host: docs.google.com
+> X-Upload-Content-Length: 0
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>Temporary Folder for Uploading Documents</title><category term='http://schemas.google.com/docs/2007#folder' scheme='http://schemas.google.com/g/2005#kind'/><docs:writersCanInvite value='false'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375342503
+< Soup-Debug: SoupMessage 31 (0x8620a0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:35:03 GMT
+< Date: Thu, 01 Aug 2013 07:35:03 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRQdQHit7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0
+< Content-Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRQdQHit7ImBk"'><id>https://docs.google.com/feeds/id/folder%3A0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0</id><published>2013-08-01T07:35:03.188Z</published><updated>2013-08-01T07:35:03.188Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:35:03.534Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#folder' label='folder'/><title>Temporary Folder for Uploading Documents</title><content type='application/atom+xml;type=feed' src='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0/contents'/><link rel='alternate' type='text/html' href='https://docs.google.com/folderview?id=0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_collection_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0/contents'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/folder%3A0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0/contents'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>folder:0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0/acl'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375342494
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 24 (0x8620a0), SoupSocket 8 (0x7dbbb0)
+> Host: docs.google.com
+> X-Upload-Content-Length: 0
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>Temporary Folder for Uploading Documents</title><category term='http://schemas.google.com/docs/2007#folder' scheme='http://schemas.google.com/g/2005#kind'/><docs:writersCanInvite value='false'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375342494
+< Soup-Debug: SoupMessage 24 (0x8620a0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:34:54 GMT
+< Date: Thu, 01 Aug 2013 07:34:54 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRQ5LGit7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms
+< Content-Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRQ5LGit7ImBk"'><id>https://docs.google.com/feeds/id/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms</id><published>2013-08-01T07:34:54.426Z</published><updated>2013-08-01T07:34:54.426Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:34:54.718Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#folder' label='folder'/><title>Temporary Folder for Uploading Documents</title><content type='application/atom+xml;type=feed' src='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms/contents'/><link rel='alternate' type='text/html' href='https://docs.google.com/folderview?id=0BzY2jgHHwMwYd1htUDJKMlA4Yms&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_collection_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms/contents'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms/contents'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>folder:0BzY2jgHHwMwYd1htUDJKMlA4Yms</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms/acl'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375342475
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 10 (0x8620a0), SoupSocket 4 (0x7dbd30)
+> Host: docs.google.com
+> X-Upload-Content-Length: 0
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>Temporary Folder for Uploading Documents</title><category term='http://schemas.google.com/docs/2007#folder' scheme='http://schemas.google.com/g/2005#kind'/><docs:writersCanInvite value='false'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375342476
+< Soup-Debug: SoupMessage 10 (0x8620a0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:34:36 GMT
+< Date: Thu, 01 Aug 2013 07:34:36 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRRhSAit7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYbE1zZ0xZOU8ybW8
+< Content-Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYbE1zZ0xZOU8ybW8
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRRhSAit7ImBk"'><id>https://docs.google.com/feeds/id/folder%3A0BzY2jgHHwMwYbE1zZ0xZOU8ybW8</id><published>2013-08-01T07:34:35.991Z</published><updated>2013-08-01T07:34:35.991Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:34:36.258Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#folder' label='folder'/><title>Temporary Folder for Uploading Documents</title><content type='application/atom+xml;type=feed' src='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYbE1zZ0xZOU8ybW8/contents'/><link rel='alternate' type='text/html' href='https://docs.google.com/folderview?id=0BzY2jgHHwMwYbE1zZ0xZOU8ybW8&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_collection_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYbE1zZ0xZOU8ybW8/contents'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/folder%3A0BzY2jgHHwMwYbE1zZ0xZOU8ybW8/contents'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYbE1zZ0xZOU8ybW8'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYbE1zZ0xZOU8ybW8'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>folder:0BzY2jgHHwMwYbE1zZ0xZOU8ybW8</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYbE1zZ0xZOU8ybW8/acl'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375342485
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 17 (0x8620a0), SoupSocket 6 (0x7dbdf0)
+> Host: docs.google.com
+> X-Upload-Content-Length: 0
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>Temporary Folder for Uploading Documents</title><category term='http://schemas.google.com/docs/2007#folder' scheme='http://schemas.google.com/g/2005#kind'/><docs:writersCanInvite value='false'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375342486
+< Soup-Debug: SoupMessage 17 (0x8620a0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:34:46 GMT
+< Date: Thu, 01 Aug 2013 07:34:46 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRRFMESt7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM
+< Content-Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRRFMESt7ImBk"'><id>https://docs.google.com/feeds/id/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM</id><published>2013-08-01T07:34:45.549Z</published><updated>2013-08-01T07:34:45.549Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:34:45.819Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#folder' label='folder'/><title>Temporary Folder for Uploading Documents</title><content type='application/atom+xml;type=feed' src='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM/contents'/><link rel='alternate' type='text/html' href='https://docs.google.com/folderview?id=0BzY2jgHHwMwYYk9PVDB5Q0FaanM&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_collection_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM/contents'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM/contents'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>folder:0BzY2jgHHwMwYYk9PVDB5Q0FaanM</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM/acl'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375342459
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 1 (0x862460), SoupSocket 1 (0x7dbaf0)
+> Host: docs.google.com
+> X-Upload-Content-Length: 0
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>Temporary Folder for Uploading Documents</title><category term='http://schemas.google.com/docs/2007#folder' scheme='http://schemas.google.com/g/2005#kind'/><docs:writersCanInvite value='false'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375342460
+< Soup-Debug: SoupMessage 1 (0x862460)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:34:20 GMT
+< Date: Thu, 01 Aug 2013 07:34:20 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRU8NDSt7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYLXAwdC1WcTNqajA
+< Content-Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYLXAwdC1WcTNqajA
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRU8NDSt7ImBk"'><id>https://docs.google.com/feeds/id/folder%3A0BzY2jgHHwMwYLXAwdC1WcTNqajA</id><published>2013-08-01T07:34:20.080Z</published><updated>2013-08-01T07:34:20.080Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:34:20.351Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#folder' label='folder'/><title>Temporary Folder for Uploading Documents</title><content type='application/atom+xml;type=feed' src='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYLXAwdC1WcTNqajA/contents'/><link rel='alternate' type='text/html' href='https://docs.google.com/folderview?id=0BzY2jgHHwMwYLXAwdC1WcTNqajA&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_collection_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYLXAwdC1WcTNqajA/contents'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/folder%3A0BzY2jgHHwMwYLXAwdC1WcTNqajA/contents'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYLXAwdC1WcTNqajA'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYLXAwdC1WcTNqajA'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>folder:0BzY2jgHHwMwYLXAwdC1WcTNqajA</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYLXAwdC1WcTNqajA/acl'/></entry>
+
--- /dev/null
+> GET /feeds/default/private/full/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY HTTP/1.1
+> Soup-Debug-Timestamp: 1375196004
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 154 (0x7fffe401fe60), SoupSocket 49 (0x8deee0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375196005
+< Soup-Debug: SoupMessage 154 (0x7fffe401fe60)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Tue, 30 Jul 2013 14:53:25 GMT
+< Date: Tue, 30 Jul 2013 14:53:25 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1RbF01RGit7ImBk"
+< Last-Modified: Tue, 30 Jul 2013 14:53:25 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1RbF01RGit7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY</id><published>2013-07-30T14:53:24.109Z</published><updated>2013-07-30T14:53:24.566Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:25.030Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>A View from the Bridge</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY&v=1&s=AMedNnoAAAAAUffvhR_qo-XqgDIgTMlnW1xrGnl6CdQZ&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:24.566Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:24.566Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/document%3A1ZB19Xrl4p7Pu5FKHby8S6NmBMwWLMFs7rQ9JPRGwlUY HTTP/1.1
+> Soup-Debug-Timestamp: 1375196005
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 155 (0x6d1490), SoupSocket 49 (0x8deee0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> If-Match: "A1RbF01RGit7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375196005
+< Soup-Debug: SoupMessage 155 (0x6d1490)
+< GData-Version: 3.0
+< Date: Tue, 30 Jul 2013 14:53:25 GMT
+< Expires: Tue, 30 Jul 2013 14:53:25 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE HTTP/1.1
+> Soup-Debug-Timestamp: 1375195844
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 5 (0x6d1580), SoupSocket 2 (0x8ded60)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195844
+< Soup-Debug: SoupMessage 5 (0x6d1580)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Tue, 30 Jul 2013 14:50:44 GMT
+< Date: Tue, 30 Jul 2013 14:50:44 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1RbExZKASt7ImBk"
+< Last-Modified: Tue, 30 Jul 2013 14:50:44 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1RbExZKASt7ImBk"'><id>https://docs.google.com/feeds/id/spreadsheet%3A0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE</id><published>2013-07-30T14:50:43.812Z</published><updated>2013-07-30T14:50:44.073Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:50:44.515Z</app:edited><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#spreadsheet' label='spreadsheet'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Document (Spreadsheet)</title><content type='text/html' src='https://docs.google.com/feeds/download/spreadsheets/Export?key=0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE'/><link rel='alternate' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE&output=html&chrome=false&widget=true'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_spreadsheet_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/jpeg' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE&v=1&s=AMedNnoAAAAAUffu5LrmVNjYxcKPSIoUW9KqSQhun8C5&sz=s220'/><link rel='http://schemas.google.com/spreadsheets/2006#worksheetsfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/worksheets/0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE/private/full'/><link rel='http://schemas.google.com/spreadsheets/2006#tablesfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE/tables'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/spreadsheet%3A0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>spreadsheet:0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:50:44.073Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:50:43.613Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><docs:hasForm value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdDE4Zk9QaXJyRWtfN28zRl9GVzk0WFE HTTP/1.1
+> Soup-Debug-Timestamp: 1375195844
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 6 (0x6d1490), SoupSocket 2 (0x8ded60)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> If-Match: "A1RbExZKASt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195845
+< Soup-Debug: SoupMessage 6 (0x6d1490)
+< GData-Version: 3.0
+< Date: Tue, 30 Jul 2013 14:50:45 GMT
+< Expires: Tue, 30 Jul 2013 14:50:45 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc HTTP/1.1
+> Soup-Debug-Timestamp: 1375345589
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 59 (0x922550), SoupSocket 20 (0x7fffe40048c0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAACKhOa-WK3N6akB7d7kKA0laUmnO2zgJ6O4seqRp4zTd7KBlc6xHcjduCp-bFT9vlSm4Z0ofb0s5sLLE2WlntM9TyOIVsQvhiq-Vp7hgMUcmhbj68uTp8IWx17waXHY8zAdgC-AU_5BpYj07dAr2TiEHALTFabaz75_tlNZyWiNJbnb9DbKfUfHOFI8WnE5ueYrwUvevYqZ9KPq6BPOnPHluKUlt4wFyZ2_PqyFEjgsvpr4xzmNjLGWuH75fDQef9D7YcrEIHArYGHxIbiElG-x
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375345589
+< Soup-Debug: SoupMessage 59 (0x922550)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:26:29 GMT
+< Date: Thu, 01 Aug 2013 08:26:29 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1ITGUlZASt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 08:26:29 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1ITGUlZASt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc</id><published>2013-08-01T08:26:19.839Z</published><updated>2013-08-01T08:26:20.629Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:26:29.071Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>add_file_folder_move_text</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc&v=2&s=AMedNnoAAAAAUfo31SoZ9Tv0o1wmm59td5u-lRN3LJF6&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:26:20.629Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:26:20.282Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/document%3A1DBQVAGZv3T1L0dLq2h-ombjmTJBqy7gw4eEO1brQOBc HTTP/1.1
+> Soup-Debug-Timestamp: 1375345589
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 60 (0x922550), SoupSocket 20 (0x7fffe40048c0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAACKhOa-WK3N6akB7d7kKA0laUmnO2zgJ6O4seqRp4zTd7KBlc6xHcjduCp-bFT9vlSm4Z0ofb0s5sLLE2WlntM9TyOIVsQvhiq-Vp7hgMUcmhbj68uTp8IWx17waXHY8zAdgC-AU_5BpYj07dAr2TiEHALTFabaz75_tlNZyWiNJbnb9DbKfUfHOFI8WnE5ueYrwUvevYqZ9KPq6BPOnPHluKUlt4wFyZ2_PqyFEjgsvpr4xzmNjLGWuH75fDQef9D7YcrEIHArYGHxIbiElG-x
+> GData-Version: 3
+> If-Match: "A1ITGUlZASt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375345590
+< Soup-Debug: SoupMessage 60 (0x922550)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 08:26:30 GMT
+< Expires: Thu, 01 Aug 2013 08:26:30 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
+> GET /feeds/default/private/full/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0 HTTP/1.1
+> Soup-Debug-Timestamp: 1375345590
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 61 (0x922460), SoupSocket 20 (0x7fffe40048c0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAACKhOa-WK3N6akB7d7kKA0laUmnO2zgJ6O4seqRp4zTd7KBlc6xHcjduCp-bFT9vlSm4Z0ofb0s5sLLE2WlntM9TyOIVsQvhiq-Vp7hgMUcmhbj68uTp8IWx17waXHY8zAdgC-AU_5BpYj07dAr2TiEHALTFabaz75_tlNZyWiNJbnb9DbKfUfHOFI8WnE5ueYrwUvevYqZ9KPq6BPOnPHluKUlt4wFyZ2_PqyFEjgsvpr4xzmNjLGWuH75fDQef9D7YcrEIHArYGHxIbiElG-x
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375345590
+< Soup-Debug: SoupMessage 61 (0x922460)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:26:30 GMT
+< Date: Thu, 01 Aug 2013 08:26:30 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1ITGUlZASt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 08:26:29 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1ITGUlZASt7ImBk"'><id>https://docs.google.com/feeds/id/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0</id><published>2013-08-01T08:26:18.669Z</published><updated>2013-08-01T08:26:29.064Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:26:29.071Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#folder' label='folder'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>add_file_folder_move_folder</title><content type='application/atom+xml;type=feed' src='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0/contents'/><link rel='alternate' type='text/html' href='https://docs.google.com/folderview?id=0BzY2jgHHwMwYZGpMTnlqNjJWUU0&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_collection_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0/contents'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0/contents'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>folder:0BzY2jgHHwMwYZGpMTnlqNjJWUU0</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:26:29.064Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0/acl'/></entry>
+
+> DELETE /feeds/default/private/full/folder%3A0BzY2jgHHwMwYZGpMTnlqNjJWUU0 HTTP/1.1
+> Soup-Debug-Timestamp: 1375345590
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 62 (0x922280), SoupSocket 20 (0x7fffe40048c0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAACKhOa-WK3N6akB7d7kKA0laUmnO2zgJ6O4seqRp4zTd7KBlc6xHcjduCp-bFT9vlSm4Z0ofb0s5sLLE2WlntM9TyOIVsQvhiq-Vp7hgMUcmhbj68uTp8IWx17waXHY8zAdgC-AU_5BpYj07dAr2TiEHALTFabaz75_tlNZyWiNJbnb9DbKfUfHOFI8WnE5ueYrwUvevYqZ9KPq6BPOnPHluKUlt4wFyZ2_PqyFEjgsvpr4xzmNjLGWuH75fDQef9D7YcrEIHArYGHxIbiElG-x
+> GData-Version: 3
+> If-Match: "A1ITGUlZASt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375345590
+< Soup-Debug: SoupMessage 62 (0x922280)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 08:26:30 GMT
+< Expires: Thu, 01 Aug 2013 08:26:30 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE HTTP/1.1
+> Soup-Debug-Timestamp: 1375195908
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 54 (0x6d11c0), SoupSocket 19 (0x8dee20)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195908
+< Soup-Debug: SoupMessage 54 (0x6d11c0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Tue, 30 Jul 2013 14:51:48 GMT
+< Date: Tue, 30 Jul 2013 14:51:48 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1RbFAVDAit7ImBk"
+< Last-Modified: Tue, 30 Jul 2013 14:51:48 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1RbFAVDAit7ImBk"'><id>https://docs.google.com/feeds/id/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE</id><published>2013-07-30T14:51:41.329Z</published><updated>2013-07-30T14:51:48.334Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:51:48.342Z</app:edited><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#spreadsheet' label='spreadsheet'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#shared' label='shared'/><title>Temporary Document (Spreadsheet)</title><content type='text/html' src='https://docs.google.com/feeds/download/spreadsheets/Export?key=0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE'/><link rel='alternate' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE&output=html&chrome=false&widget=true'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_spreadsheet_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE'/><link rel='http://schemas.google.com/spreadsheets/2006#worksheetsfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/worksheets/0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE/private/full'/><link rel='http://schemas.google.com/spreadsheets/2006#tablesfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE/tables'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>spreadsheet:0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:51:41.329Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><docs:hasForm value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdE1jT2dtVXUwVTJVVFNDQUF2ZHdDMUE HTTP/1.1
+> Soup-Debug-Timestamp: 1375195908
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 55 (0x6d1760), SoupSocket 19 (0x8dee20)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> If-Match: "A1RbFAVDAit7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195909
+< Soup-Debug: SoupMessage 55 (0x6d1760)
+< GData-Version: 3.0
+< Date: Tue, 30 Jul 2013 14:51:49 GMT
+< Expires: Tue, 30 Jul 2013 14:51:49 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E HTTP/1.1
+> Soup-Debug-Timestamp: 1375195997
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 139 (0x7fffe401fe60), SoupSocket 46 (0x8dee20)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195997
+< Soup-Debug: SoupMessage 139 (0x7fffe401fe60)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Tue, 30 Jul 2013 14:53:17 GMT
+< Date: Tue, 30 Jul 2013 14:53:17 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1RbFhEDTit7ImBk"
+< Last-Modified: Tue, 30 Jul 2013 14:53:05 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1RbFhEDTit7ImBk"'><id>https://docs.google.com/feeds/id/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E</id><published>2013-07-30T14:53:04.070Z</published><updated>2013-07-30T14:53:05.136Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:05.181Z</app:edited><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#spreadsheet' label='spreadsheet'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Spreadsheet</title><content type='text/html' src='https://docs.google.com/feeds/download/spreadsheets/Export?key=0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='alternate' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/spreadsheet/ccc?key=0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E&output=html&chrome=false&widget=true'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_spreadsheet_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='http://schemas.google.com/spreadsheets/2006#worksheetsfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/worksheets/0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E/private/full'/><link rel='http://schemas.google.com/spreadsheets/2006#tablesfeed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E/tables'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>spreadsheet:0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:05.136Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:04.070Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><docs:hasForm value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/spreadsheet%3A0AjY2jgHHwMwYdENmRGxyejlDSTlMTzRQbFpqV1BvZ1E HTTP/1.1
+> Soup-Debug-Timestamp: 1375195997
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 140 (0x6d1670), SoupSocket 46 (0x8dee20)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> If-Match: "A1RbFhEDTit7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195998
+< Soup-Debug: SoupMessage 140 (0x6d1670)
+< GData-Version: 3.0
+< Date: Tue, 30 Jul 2013 14:53:18 GMT
+< Expires: Tue, 30 Jul 2013 14:53:18 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
+> GET /feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA HTTP/1.1
+> Soup-Debug-Timestamp: 1375195998
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 141 (0x7fffe401fe60), SoupSocket 46 (0x8dee20)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195998
+< Soup-Debug: SoupMessage 141 (0x7fffe401fe60)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Tue, 30 Jul 2013 14:53:18 GMT
+< Date: Tue, 30 Jul 2013 14:53:18 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1RbFhBURSt7ImBk"
+< Last-Modified: Tue, 30 Jul 2013 14:53:06 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1RbFhBURSt7ImBk"'><id>https://docs.google.com/feeds/id/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA</id><published>2013-07-30T14:53:06.357Z</published><updated>2013-07-30T14:53:06.895Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:06.974Z</app:edited><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#presentation' label='presentation'/><title>Temporary Presentation</title><content type='text/html' src='https://docs.google.com/feeds/download/presentations/Export?id=1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='alternate' type='text/html' href='https://docs.google.com/presentation/d/1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/presentation/d/1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_presentation_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA&v=2&s=AMedNnoAAAAAUffvfh8BCPwdbHBpCObL9Fvtmb34uWEU&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>presentation:1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:06.895Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:06.670Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/presentation%3A1hdOlASlW0RVdMTt8VhOcuRlpTEp7H22H9VSGqWVE_jA HTTP/1.1
+> Soup-Debug-Timestamp: 1375195998
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 142 (0x6d1490), SoupSocket 46 (0x8dee20)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> If-Match: "A1RbFhBURSt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195998
+< Soup-Debug: SoupMessage 142 (0x6d1490)
+< GData-Version: 3.0
+< Date: Tue, 30 Jul 2013 14:53:18 GMT
+< Expires: Tue, 30 Jul 2013 14:53:18 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
+> GET /feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI HTTP/1.1
+> Soup-Debug-Timestamp: 1375195998
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 143 (0x7fffe401fe60), SoupSocket 46 (0x8dee20)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195998
+< Soup-Debug: SoupMessage 143 (0x7fffe401fe60)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Tue, 30 Jul 2013 14:53:19 GMT
+< Date: Tue, 30 Jul 2013 14:53:19 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1RbFhNDESt7ImBk"
+< Last-Modified: Tue, 30 Jul 2013 14:53:08 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1RbFhNDESt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI</id><published>2013-07-30T14:53:07.822Z</published><updated>2013-07-30T14:53:08.314Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:08.679Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Text Document</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI&v=1&s=AMedNnoAAAAAUffvf55ybKCG3FnzQ_z2szQN9_Y1KWo_&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:08.314Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:08.314Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/document%3A1bdY9c5KVN8WFgYIxiPwzMn0u2bpr3eCfgA5As7QiVSI HTTP/1.1
+> Soup-Debug-Timestamp: 1375195998
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 144 (0x6d1670), SoupSocket 46 (0x8dee20)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> If-Match: "A1RbFhNDESt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195999
+< Soup-Debug: SoupMessage 144 (0x6d1670)
+< GData-Version: 3.0
+< Date: Tue, 30 Jul 2013 14:53:19 GMT
+< Expires: Tue, 30 Jul 2013 14:53:19 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
+> GET /feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc HTTP/1.1
+> Soup-Debug-Timestamp: 1375195999
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 145 (0x7fffe401fe60), SoupSocket 46 (0x8dee20)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195999
+< Soup-Debug: SoupMessage 145 (0x7fffe401fe60)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Tue, 30 Jul 2013 14:53:19 GMT
+< Date: Tue, 30 Jul 2013 14:53:19 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1RbFg1dGit7ImBk"
+< Last-Modified: Tue, 30 Jul 2013 14:53:10 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1RbFg1dGit7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc</id><published>2013-07-30T14:53:09.625Z</published><updated>2013-07-30T14:53:10.144Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:10.630Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Arbitrary Document</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc&v=1&s=AMedNnoAAAAAUffvf7nEcjl5FDM1loK1fmIlFqPxEGiC&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-07-30T14:53:10.144Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-07-30T14:53:10.144Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/document%3A1trsVUkfFwPAI3pxmtFAN_wcNXG7ztlccDr-fUga1Thc HTTP/1.1
+> Soup-Debug-Timestamp: 1375195999
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 146 (0x6d1490), SoupSocket 46 (0x8dee20)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> If-Match: "A1RbFg1dGit7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375195999
+< Soup-Debug: SoupMessage 146 (0x6d1490)
+< GData-Version: 3.0
+< Date: Tue, 30 Jul 2013 14:53:20 GMT
+< Expires: Tue, 30 Jul 2013 14:53:20 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/folder%3A0BzY2jgHHwMwYRHphWkhpNVZQZG8 HTTP/1.1
+> Soup-Debug-Timestamp: 1375196000
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 147 (0x7fffe401fe60), SoupSocket 46 (0x8dee20)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375196000
+< Soup-Debug: SoupMessage 147 (0x7fffe401fe60)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Tue, 30 Jul 2013 14:53:20 GMT
+< Date: Tue, 30 Jul 2013 14:53:20 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1RbFhdWBSt7ImBk"
+< Last-Modified: Tue, 30 Jul 2013 14:53:03 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1RbFhdWBSt7ImBk"'><id>https://docs.google.com/feeds/id/folder%3A0BzY2jgHHwMwYRHphWkhpNVZQZG8</id><published>2013-07-30T14:53:02.725Z</published><updated>2013-07-30T14:53:02.725Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-07-30T14:53:03.039Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#folder' label='folder'/><title>Temporary Folder</title><content type='application/atom+xml;type=feed' src='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYRHphWkhpNVZQZG8/contents'/><link rel='alternate' type='text/html' href='https://docs.google.com/folderview?id=0BzY2jgHHwMwYRHphWkhpNVZQZG8&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_collection_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYRHphWkhpNVZQZG8/contents'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/folder%3A0BzY2jgHHwMwYRHphWkhpNVZQZG8/contents'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYRHphWkhpNVZQZG8'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYRHphWkhpNVZQZG8'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>folder:0BzY2jgHHwMwYRHphWkhpNVZQZG8</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYRHphWkhpNVZQZG8/acl'/></entry>
+
+> DELETE /feeds/default/private/full/folder%3A0BzY2jgHHwMwYRHphWkhpNVZQZG8 HTTP/1.1
+> Soup-Debug-Timestamp: 1375196000
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 148 (0x6d1670), SoupSocket 46 (0x8dee20)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAAAFzZ2JgwyC1wh66lYjFfP12KtZQmAwT2Wxq8SWXN4u0YVYFqx9okpt4N2dGG2y3hINLnS7UKlGh8CJ_i0lcnBh_-YpulTcpdTmRjuetKC4CualOHergdpJvT9PhXo2cJOvHdqODCVGaq5Bg4thZaKgLAcKREEiDjkUy_8_vIFF3_k0HZTJhqRhoJh75vQ6EULFpM5DV8YuoWSiFSues1gvc0wqzrj8hdOkXLtw89m2CytgLb5zOtTB4wb3Kxi1n9YNCHpNvkQWbuyNyXD870Rs2gd8wbUdeCzO3JMBVriN8w
+> GData-Version: 3
+> If-Match: "A1RbFhdWBSt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375196000
+< Soup-Debug: SoupMessage 148 (0x6d1670)
+< GData-Version: 3.0
+< Date: Tue, 30 Jul 2013 14:53:20 GMT
+< Expires: Tue, 30 Jul 2013 14:53:20 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8 HTTP/1.1
+> Soup-Debug-Timestamp: 1375344881
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 31 (0x7fffe40088d0), SoupSocket 5 (0x7fffe40038a0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375344881
+< Soup-Debug: SoupMessage 31 (0x7fffe40088d0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:14:41 GMT
+< Date: Thu, 01 Aug 2013 08:14:41 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1IMVAlPRyt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 08:14:35 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1IMVAlPRyt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8</id><published>2013-08-01T08:14:28.895Z</published><updated>2013-08-01T08:14:35.587Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:14:35.592Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Updated Test Update file (/documents/update/content-and-metadata/non-resumable)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8&v=2&s=AMedNnoAAAAAUfo1EXmG-qGzuS6tioCtafSx1IPSr52G&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:14:35.587Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:14:29.328Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8 HTTP/1.1
+> Soup-Debug-Timestamp: 1375344881
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 32 (0x6d1590), SoupSocket 5 (0x7fffe40038a0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> If-Match: "A1IMVAlPRyt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375344881
+< Soup-Debug: SoupMessage 32 (0x6d1590)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 08:14:41 GMT
+< Expires: Thu, 01 Aug 2013 08:14:41 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g HTTP/1.1
+> Soup-Debug-Timestamp: 1375344867
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 25 (0x6d10e0), SoupSocket 4 (0x7fffe40038a0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375344867
+< Soup-Debug: SoupMessage 25 (0x6d10e0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:14:27 GMT
+< Date: Thu, 01 Aug 2013 08:14:27 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1IMVBdcDyt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 08:14:22 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1IMVBdcDyt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g</id><published>2013-08-01T08:14:14.275Z</published><updated>2013-08-01T08:14:22.122Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:14:22.125Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Updated Test Update file (/documents/update/content-and-metadata/resumable)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g&v=2&s=AMedNnoAAAAAUfo1A7aCv28hJDB2DgfVup7Nd09-_PQR&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:14:22.122Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:14:15.414Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g HTTP/1.1
+> Soup-Debug-Timestamp: 1375344867
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 26 (0x6d12c0), SoupSocket 4 (0x7fffe40038a0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> If-Match: "A1IMVBdcDyt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375344868
+< Soup-Debug: SoupMessage 26 (0x6d12c0)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 08:14:28 GMT
+< Expires: Thu, 01 Aug 2013 08:14:28 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo HTTP/1.1
+> Soup-Debug-Timestamp: 1375344852
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 18 (0x6d14a0), SoupSocket 3 (0x97e760)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375344852
+< Soup-Debug: SoupMessage 18 (0x6d14a0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:14:12 GMT
+< Date: Thu, 01 Aug 2013 08:14:12 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1IMVEpPFCt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 08:14:07 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1IMVEpPFCt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo</id><published>2013-08-01T08:13:59.925Z</published><updated>2013-08-01T08:14:00.573Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:14:07.092Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Update file (/documents/update/content-only/non-resumable)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo&v=1&s=AMedNnoAAAAAUfo09GrIR1E_p5Qd_wHaeo77to4b0mt9&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:14:00.573Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:14:00.573Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo HTTP/1.1
+> Soup-Debug-Timestamp: 1375344852
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 19 (0x6d1770), SoupSocket 3 (0x97e760)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> If-Match: "A1IMVEpPFCt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375344852
+< Soup-Debug: SoupMessage 19 (0x6d1770)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 08:14:12 GMT
+< Expires: Thu, 01 Aug 2013 08:14:12 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM HTTP/1.1
+> Soup-Debug-Timestamp: 1375344838
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 12 (0x6d1590), SoupSocket 2 (0x97e760)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375344838
+< Soup-Debug: SoupMessage 12 (0x6d1590)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:13:58 GMT
+< Date: Thu, 01 Aug 2013 08:13:58 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1IMUwUPRit7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 08:13:53 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1IMUwUPRit7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM</id><published>2013-08-01T08:13:45.873Z</published><updated>2013-08-01T08:13:46.506Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:13:53.221Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Update file (/documents/update/content-only/resumable)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM&v=1&s=AMedNnoAAAAAUfo05pRCUtnWanWrgbULQTLI1GjlJS1b&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:13:46.506Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:13:46.506Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM HTTP/1.1
+> Soup-Debug-Timestamp: 1375344838
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 13 (0x6d13b0), SoupSocket 2 (0x97e760)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> If-Match: "A1IMUwUPRit7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375344839
+< Soup-Debug: SoupMessage 13 (0x6d13b0)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 08:13:59 GMT
+< Expires: Thu, 01 Aug 2013 08:13:59 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME HTTP/1.1
+> Soup-Debug-Timestamp: 1375344824
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 5 (0x6d11d0), SoupSocket 1 (0x97e6a0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375344824
+< Soup-Debug: SoupMessage 5 (0x6d11d0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 08:13:44 GMT
+< Date: Thu, 01 Aug 2013 08:13:44 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1IMUxBYHSt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 08:13:39 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1IMUxBYHSt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME</id><published>2013-08-01T08:13:32.650Z</published><updated>2013-08-01T08:13:39.196Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:13:39.199Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Updated Test Update file (/documents/update/metadata-only/non-resumable)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME&v=2&s=AMedNnoAAAAAUfo02BdWHKoitI8Gs5rZjxYzinZGcmgM&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:13:39.196Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:13:33.409Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME HTTP/1.1
+> Soup-Debug-Timestamp: 1375344824
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 6 (0x6d10e0), SoupSocket 1 (0x97e6a0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> If-Match: "A1IMUxBYHSt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375344824
+< Soup-Debug: SoupMessage 6 (0x6d10e0)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 08:13:44 GMT
+< Expires: Thu, 01 Aug 2013 08:13:44 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/document%3A1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4 HTTP/1.1
+> Soup-Debug-Timestamp: 1375342580
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 75 (0x862280), SoupSocket 23 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342580
+< Soup-Debug: SoupMessage 75 (0x862280)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:36:20 GMT
+< Date: Thu, 01 Aug 2013 07:36:20 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRxRAHSt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 07:36:15 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRxRAHSt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4</id><published>2013-08-01T07:36:14.386Z</published><updated>2013-08-01T07:36:14.925Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:36:15.391Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Upload file (/documents/upload/content-and-metadata/in-folder/non-resumable/odt-convert)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4'/><link rel='http://schemas.google.com/docs/2007#parent' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYTmEyZGp5MF9OdzA' title='Temporary Folder for Uploading Documents'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4&v=1&s=AMedNnoAAAAAUfosFCIXB0mQ0EHOnBtw4b6nB8L6T-g8&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:36:14.925Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T07:36:14.925Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/document%3A1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4 HTTP/1.1
+> Soup-Debug-Timestamp: 1375342580
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 76 (0x862550), SoupSocket 23 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> If-Match: "A1INRxRAHSt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342581
+< Soup-Debug: SoupMessage 76 (0x862550)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 07:36:21 GMT
+< Expires: Thu, 01 Aug 2013 07:36:21 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
+> GET /feeds/default/private/full/folder%3A0BzY2jgHHwMwYTmEyZGp5MF9OdzA HTTP/1.1
+> Soup-Debug-Timestamp: 1375342581
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 77 (0x862640), SoupSocket 23 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342581
+< Soup-Debug: SoupMessage 77 (0x862640)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:36:21 GMT
+< Date: Thu, 01 Aug 2013 07:36:21 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRxRVEyt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 07:36:14 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRxRVEyt7ImBk"'><id>https://docs.google.com/feeds/id/folder%3A0BzY2jgHHwMwYTmEyZGp5MF9OdzA</id><published>2013-08-01T07:36:10.307Z</published><updated>2013-08-01T07:36:14.982Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:36:14.989Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#folder' label='folder'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Folder for Uploading Documents</title><content type='application/atom+xml;type=feed' src='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYTmEyZGp5MF9OdzA/contents'/><link rel='alternate' type='text/html' href='https://docs.google.com/folderview?id=0BzY2jgHHwMwYTmEyZGp5MF9OdzA&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_collection_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYTmEyZGp5MF9OdzA/contents'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/folder%3A0BzY2jgHHwMwYTmEyZGp5MF9OdzA/contents'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYTmEyZGp5MF9OdzA'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYTmEyZGp5MF9OdzA'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>folder:0BzY2jgHHwMwYTmEyZGp5MF9OdzA</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:36:14.982Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYTmEyZGp5MF9OdzA/acl'/></entry>
+
+> DELETE /feeds/default/private/full/folder%3A0BzY2jgHHwMwYTmEyZGp5MF9OdzA HTTP/1.1
+> Soup-Debug-Timestamp: 1375342581
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 78 (0x862460), SoupSocket 23 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> If-Match: "A1INRxRVEyt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342582
+< Soup-Debug: SoupMessage 78 (0x862460)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 07:36:22 GMT
+< Expires: Thu, 01 Aug 2013 07:36:22 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/file%3A0BzY2jgHHwMwYMkdSNTdVNWhOVnM HTTP/1.1
+> Soup-Debug-Timestamp: 1375342568
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 69 (0x862550), SoupSocket 21 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342569
+< Soup-Debug: SoupMessage 69 (0x862550)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:36:08 GMT
+< Date: Thu, 01 Aug 2013 07:36:08 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRx9IQSt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 07:36:06 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRx9IQSt7ImBk"'><id>https://docs.google.com/feeds/id/file%3A0BzY2jgHHwMwYMkdSNTdVNWhOVnM</id><published>2013-08-01T07:36:03.220Z</published><updated>2013-08-01T07:36:03.220Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:36:06.018Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#file' label='video/x-theora+ogg'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Upload file (/documents/upload/content-and-metadata/in-folder/resumable/bin-no-convert)</title><content type='video/x-theora+ogg' src='https://doc-0c-4o-docs.googleusercontent.com/docs/securesc/p3gkcpm4vekih3vn1285g2jn1spuiriq/16i8229o5srbuc78vpk92d2t4lh3oc25/1375336800000/04693666875216770588/04693666875216770588/0BzY2jgHHwMwYMkdSNTdVNWhOVnM?h=16653014193614665626&e=download&gd=true'/><link rel='http://schemas.google.com/docs/2007#parent' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k' title='Temporary Folder for Uploading Documents'/><link rel='alternate' type='text/html' href='https://docs.google.com/file/d/0BzY2jgHHwMwYMkdSNTdVNWhOVnM/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://video.google.com/get_player?ps=docs&partnerid=30&docid=0BzY2jgHHwMwYMkdSNTdVNWhOVnM&BASE_URL=https://docs.google.com/'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_video_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/file%3A0BzY2jgHHwMwYMkdSNTdVNWhOVnM'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/file%3A0BzY2jgHHwMwYMkdSNTdVNWhOVnM'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYMkdSNTdVNWhOVnM'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYMkdSNTdVNWhOVnM'/><link rel='edit-media' type='video/x-theora+ogg' href='https://docs.google.com/feeds/default/media/file%3A0BzY2jgHHwMwYMkdSNTdVNWhOVnM'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>file:0BzY2jgHHwMwYMkdSNTdVNWhOVnM</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:36:03.215Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>96839</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><docs:md5Checksum>75ad4a55b679b86502ccc0ecd1731622</docs:md5Checksum><docs:filename>Test Upload file (/documents/upload/content-and-metadata/in-folder/resumable/bin-no-convert)</docs:filename><docs:suggestedFilename>Test Upload file (/documents/upload/content-and-metadata/in-folder/resumable/bin-no-convert)</docs:suggestedFilename><docs:size>96839</docs:size><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYMkdSNTdVNWhOVnM/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYMkdSNTdVNWhOVnM/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/file%3A0BzY2jgHHwMwYMkdSNTdVNWhOVnM HTTP/1.1
+> Soup-Debug-Timestamp: 1375342569
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 70 (0x862640), SoupSocket 21 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> If-Match: "A1INRx9IQSt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342569
+< Soup-Debug: SoupMessage 70 (0x862640)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 07:36:09 GMT
+< Expires: Thu, 01 Aug 2013 07:36:09 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
+> GET /feeds/default/private/full/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k HTTP/1.1
+> Soup-Debug-Timestamp: 1375342569
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 71 (0x862460), SoupSocket 21 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342569
+< Soup-Debug: SoupMessage 71 (0x862460)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:36:09 GMT
+< Date: Thu, 01 Aug 2013 07:36:09 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INR0VPRCt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 07:36:02 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INR0VPRCt7ImBk"'><id>https://docs.google.com/feeds/id/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k</id><published>2013-08-01T07:36:02.019Z</published><updated>2013-08-01T07:36:02.019Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:36:02.235Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#folder' label='folder'/><title>Temporary Folder for Uploading Documents</title><content type='application/atom+xml;type=feed' src='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k/contents'/><link rel='alternate' type='text/html' href='https://docs.google.com/folderview?id=0BzY2jgHHwMwYN0pZNnFVRXMxd1k&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_collection_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k/contents'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k/contents'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>folder:0BzY2jgHHwMwYN0pZNnFVRXMxd1k</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k/acl'/></entry>
+
+> DELETE /feeds/default/private/full/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k HTTP/1.1
+> Soup-Debug-Timestamp: 1375342569
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 72 (0x862190), SoupSocket 21 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> If-Match: "A1INR0VPRCt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342570
+< Soup-Debug: SoupMessage 72 (0x862190)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 07:36:10 GMT
+< Expires: Thu, 01 Aug 2013 07:36:10 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/document%3A15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI HTTP/1.1
+> Soup-Debug-Timestamp: 1375342550
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 55 (0x862460), SoupSocket 17 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342551
+< Soup-Debug: SoupMessage 55 (0x862460)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:35:51 GMT
+< Date: Thu, 01 Aug 2013 07:35:51 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRgoJAit7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 07:35:45 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRgoJAit7ImBk"'><id>https://docs.google.com/feeds/id/document%3A15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI</id><published>2013-08-01T07:35:44.404Z</published><updated>2013-08-01T07:35:45.283Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:35:45.738Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Upload file (/documents/upload/content-and-metadata/in-folder/resumable/odt-convert)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI'/><link rel='http://schemas.google.com/docs/2007#parent' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k' title='Temporary Folder for Uploading Documents'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI&v=1&s=AMedNnoAAAAAUfor9w6Th6_ljTmmMfMmwvRDI_S7aTlj&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:35:45.283Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T07:35:45.283Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/document%3A15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI HTTP/1.1
+> Soup-Debug-Timestamp: 1375342551
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 56 (0x862190), SoupSocket 17 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> If-Match: "A1INRgoJAit7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342551
+< Soup-Debug: SoupMessage 56 (0x862190)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 07:35:51 GMT
+< Expires: Thu, 01 Aug 2013 07:35:51 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
+> GET /feeds/default/private/full/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k HTTP/1.1
+> Soup-Debug-Timestamp: 1375342551
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 57 (0x8620a0), SoupSocket 17 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342551
+< Soup-Debug: SoupMessage 57 (0x8620a0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:35:51 GMT
+< Date: Thu, 01 Aug 2013 07:35:51 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRgtOQSt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 07:35:45 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRgtOQSt7ImBk"'><id>https://docs.google.com/feeds/id/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k</id><published>2013-08-01T07:35:42.422Z</published><updated>2013-08-01T07:35:45.351Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:35:45.354Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#folder' label='folder'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Folder for Uploading Documents</title><content type='application/atom+xml;type=feed' src='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k/contents'/><link rel='alternate' type='text/html' href='https://docs.google.com/folderview?id=0BzY2jgHHwMwYenBFRVhodkxJY0k&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_collection_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k/contents'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k/contents'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>folder:0BzY2jgHHwMwYenBFRVhodkxJY0k</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:35:45.351Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k/acl'/></entry>
+
+> DELETE /feeds/default/private/full/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k HTTP/1.1
+> Soup-Debug-Timestamp: 1375342551
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 58 (0x862370), SoupSocket 17 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> If-Match: "A1INRgtOQSt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342552
+< Soup-Debug: SoupMessage 58 (0x862370)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 07:35:52 GMT
+< Expires: Thu, 01 Aug 2013 07:35:52 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/file%3A0BzY2jgHHwMwYV3BPQktLM3NELXc HTTP/1.1
+> Soup-Debug-Timestamp: 1375342560
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 62 (0x862640), SoupSocket 19 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342560
+< Soup-Debug: SoupMessage 62 (0x862640)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:36:00 GMT
+< Date: Thu, 01 Aug 2013 07:36:00 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INR04MAit7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 07:35:54 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INR04MAit7ImBk"'><id>https://docs.google.com/feeds/id/file%3A0BzY2jgHHwMwYV3BPQktLM3NELXc</id><published>2013-08-01T07:35:54.561Z</published><updated>2013-08-01T07:35:54.561Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:35:54.918Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#file' label='application/vnd.oasis.opendocument.text'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Upload file (/documents/upload/content-and-metadata/in-folder/resumable/odt-no-convert)</title><content type='application/vnd.oasis.opendocument.text' src='https://doc-10-4o-docs.googleusercontent.com/docs/securesc/p3gkcpm4vekih3vn1285g2jn1spuiriq/j3fsimntg9jr3q22d32p36rp0bsvbi44/1375336800000/04693666875216770588/04693666875216770588/0BzY2jgHHwMwYV3BPQktLM3NELXc?h=16653014193614665626&e=download&gd=true'/><link rel='http://schemas.google.com/docs/2007#parent' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM' title='Temporary Folder for Uploading Documents'/><link rel='alternate' type='text/html' href='https://docs.google.com/file/d/0BzY2jgHHwMwYV3BPQktLM3NELXc/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/file%3A0BzY2jgHHwMwYV3BPQktLM3NELXc'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/file%3A0BzY2jgHHwMwYV3BPQktLM3NELXc'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYV3BPQktLM3NELXc'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYV3BPQktLM3NELXc'/><link rel='edit-media' type='application/vnd.oasis.opendocument.text' href='https://docs.google.com/feeds/default/media/file%3A0BzY2jgHHwMwYV3BPQktLM3NELXc'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>file:0BzY2jgHHwMwYV3BPQktLM3NELXc</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:35:54.556Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>8033</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><docs:md5Checksum>95439a6d6456a79d43980c05c9f25c7d</docs:md5Checksum><docs:filename>Test Upload file (/documents/upload/content-and-metadata/in-folder/resumable/odt-no-convert)</docs:filename><docs:suggestedFilename>Test Upload file (/documents/upload/content-and-metadata/in-folder/resumable/odt-no-convert)</docs:suggestedFilename><docs:size>8033</docs:size><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYV3BPQktLM3NELXc/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYV3BPQktLM3NELXc/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/file%3A0BzY2jgHHwMwYV3BPQktLM3NELXc HTTP/1.1
+> Soup-Debug-Timestamp: 1375342560
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 63 (0x862460), SoupSocket 19 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> If-Match: "A1INR04MAit7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342560
+< Soup-Debug: SoupMessage 63 (0x862460)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 07:36:00 GMT
+< Expires: Thu, 01 Aug 2013 07:36:00 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
+> GET /feeds/default/private/full/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM HTTP/1.1
+> Soup-Debug-Timestamp: 1375342560
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 64 (0x862190), SoupSocket 19 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342561
+< Soup-Debug: SoupMessage 64 (0x862190)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:36:01 GMT
+< Date: Thu, 01 Aug 2013 07:36:01 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INR0xOBSt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 07:35:53 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INR0xOBSt7ImBk"'><id>https://docs.google.com/feeds/id/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM</id><published>2013-08-01T07:35:52.832Z</published><updated>2013-08-01T07:35:52.832Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:35:53.151Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#folder' label='folder'/><title>Temporary Folder for Uploading Documents</title><content type='application/atom+xml;type=feed' src='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM/contents'/><link rel='alternate' type='text/html' href='https://docs.google.com/folderview?id=0BzY2jgHHwMwYXzkyMGhELWdsamM&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_collection_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM/contents'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM/contents'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>folder:0BzY2jgHHwMwYXzkyMGhELWdsamM</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM/acl'/></entry>
+
+> DELETE /feeds/default/private/full/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM HTTP/1.1
+> Soup-Debug-Timestamp: 1375342561
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 65 (0x8620a0), SoupSocket 19 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> If-Match: "A1INR0xOBSt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342561
+< Soup-Debug: SoupMessage 65 (0x8620a0)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 07:36:01 GMT
+< Expires: Thu, 01 Aug 2013 07:36:01 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/document%3A1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o HTTP/1.1
+> Soup-Debug-Timestamp: 1375342612
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 92 (0x862190), SoupSocket 27 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342613
+< Soup-Debug: SoupMessage 92 (0x862190)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:36:53 GMT
+< Date: Thu, 01 Aug 2013 07:36:53 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INSEpUGyt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 07:36:47 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INSEpUGyt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o</id><published>2013-08-01T07:36:46.075Z</published><updated>2013-08-01T07:36:47.038Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:36:47.361Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Upload file (/documents/upload/content-and-metadata/root-folder/non-resumable/odt-convert)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o&v=1&s=AMedNnoAAAAAUfosNbTpvj2_zENdUPrx-KnenUrYqeWx&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:36:47.038Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T07:36:47.038Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/document%3A1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o HTTP/1.1
+> Soup-Debug-Timestamp: 1375342613
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 93 (0x862460), SoupSocket 27 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> If-Match: "A1INSEpUGyt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342613
+< Soup-Debug: SoupMessage 93 (0x862460)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 07:36:53 GMT
+< Expires: Thu, 01 Aug 2013 07:36:53 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/file%3A0BzY2jgHHwMwYOENlempRajlpWms HTTP/1.1
+> Soup-Debug-Timestamp: 1375342604
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 89 (0x7fffe40358b0), SoupSocket 26 (0x7dbd30)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342605
+< Soup-Debug: SoupMessage 89 (0x7fffe40358b0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:36:45 GMT
+< Date: Thu, 01 Aug 2013 07:36:45 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INSE5KHSt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 07:36:42 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INSE5KHSt7ImBk"'><id>https://docs.google.com/feeds/id/file%3A0BzY2jgHHwMwYOENlempRajlpWms</id><published>2013-08-01T07:36:39.367Z</published><updated>2013-08-01T07:36:39.367Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:36:42.247Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#file' label='video/x-theora+ogg'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Upload file (/documents/upload/content-and-metadata/root-folder/resumable/bin-no-convert)</title><content type='video/x-theora+ogg' src='https://doc-00-4o-docs.googleusercontent.com/docs/securesc/p3gkcpm4vekih3vn1285g2jn1spuiriq/tv1shi5knd05g3ktkp3cf4qfaik1gj8s/1375336800000/04693666875216770588/04693666875216770588/0BzY2jgHHwMwYOENlempRajlpWms?h=16653014193614665626&e=download&gd=true'/><link rel='alternate' type='text/html' href='https://docs.google.com/file/d/0BzY2jgHHwMwYOENlempRajlpWms/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://video.google.com/get_player?ps=docs&partnerid=30&docid=0BzY2jgHHwMwYOENlempRajlpWms&BASE_URL=https://docs.google.com/'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_video_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/file%3A0BzY2jgHHwMwYOENlempRajlpWms'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/file%3A0BzY2jgHHwMwYOENlempRajlpWms'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYOENlempRajlpWms'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYOENlempRajlpWms'/><link rel='edit-media' type='video/x-theora+ogg' href='https://docs.google.com/feeds/default/media/file%3A0BzY2jgHHwMwYOENlempRajlpWms'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>file:0BzY2jgHHwMwYOENlempRajlpWms</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:36:39.363Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>96839</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><docs:md5Checksum>75ad4a55b679b86502ccc0ecd1731622</docs:md5Checksum><docs:filename>Test Upload file (/documents/upload/content-and-metadata/root-folder/resumable/bin-no-convert)</docs:filename><docs:suggestedFilename>Test Upload file (/documents/upload/content-and-metadata/root-folder/resumable/bin-no-convert)</docs:suggestedFilename><docs:size>96839</docs:size><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYOENlempRajlpWms/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYOENlempRajlpWms/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/file%3A0BzY2jgHHwMwYOENlempRajlpWms HTTP/1.1
+> Soup-Debug-Timestamp: 1375342605
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 90 (0x862460), SoupSocket 26 (0x7dbd30)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> If-Match: "A1INSE5KHSt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342605
+< Soup-Debug: SoupMessage 90 (0x862460)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 07:36:45 GMT
+< Expires: Thu, 01 Aug 2013 07:36:45 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/document%3A1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI HTTP/1.1
+> Soup-Debug-Timestamp: 1375342589
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 81 (0x8620a0), SoupSocket 24 (0x7dbc70)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342589
+< Soup-Debug: SoupMessage 81 (0x8620a0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:36:29 GMT
+< Date: Thu, 01 Aug 2013 07:36:29 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRw1KGCt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 07:36:24 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRw1KGCt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI</id><published>2013-08-01T07:36:23.228Z</published><updated>2013-08-01T07:36:23.729Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:36:24.108Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Upload file (/documents/upload/content-and-metadata/root-folder/resumable/odt-convert)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI&v=1&s=AMedNnoAAAAAUfosHVk57jP3c6NkhHj5OOshG1-cMxaE&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:36:23.729Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T07:36:23.729Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/document%3A1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI HTTP/1.1
+> Soup-Debug-Timestamp: 1375342589
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 82 (0x862460), SoupSocket 24 (0x7dbc70)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> If-Match: "A1INRw1KGCt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342590
+< Soup-Debug: SoupMessage 82 (0x862460)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 07:36:30 GMT
+< Expires: Thu, 01 Aug 2013 07:36:30 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/file%3A0BzY2jgHHwMwYVEttUVM3OFFOc3M HTTP/1.1
+> Soup-Debug-Timestamp: 1375342596
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 85 (0x862550), SoupSocket 25 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342597
+< Soup-Debug: SoupMessage 85 (0x862550)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:36:37 GMT
+< Date: Thu, 01 Aug 2013 07:36:37 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRwtfTyt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 07:36:31 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRwtfTyt7ImBk"'><id>https://docs.google.com/feeds/id/file%3A0BzY2jgHHwMwYVEttUVM3OFFOc3M</id><published>2013-08-01T07:36:31.271Z</published><updated>2013-08-01T07:36:31.271Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:36:31.472Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#file' label='application/vnd.oasis.opendocument.text'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Upload file (/documents/upload/content-and-metadata/root-folder/resumable/odt-no-convert)</title><content type='application/vnd.oasis.opendocument.text' src='https://doc-08-4o-docs.googleusercontent.com/docs/securesc/p3gkcpm4vekih3vn1285g2jn1spuiriq/i4qv8v6a7fth6boufvv3gvu0r5um0ksu/1375336800000/04693666875216770588/04693666875216770588/0BzY2jgHHwMwYVEttUVM3OFFOc3M?h=16653014193614665626&e=download&gd=true'/><link rel='alternate' type='text/html' href='https://docs.google.com/file/d/0BzY2jgHHwMwYVEttUVM3OFFOc3M/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/file%3A0BzY2jgHHwMwYVEttUVM3OFFOc3M'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/file%3A0BzY2jgHHwMwYVEttUVM3OFFOc3M'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYVEttUVM3OFFOc3M'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYVEttUVM3OFFOc3M'/><link rel='edit-media' type='application/vnd.oasis.opendocument.text' href='https://docs.google.com/feeds/default/media/file%3A0BzY2jgHHwMwYVEttUVM3OFFOc3M'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>file:0BzY2jgHHwMwYVEttUVM3OFFOc3M</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:36:31.265Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>8033</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><docs:md5Checksum>95439a6d6456a79d43980c05c9f25c7d</docs:md5Checksum><docs:filename>Test Upload file (/documents/upload/content-and-metadata/root-folder/resumable/odt-no-convert)</docs:filename><docs:suggestedFilename>Test Upload file (/documents/upload/content-and-metadata/root-folder/resumable/odt-no-convert)</docs:suggestedFilename><docs:size>8033</docs:size><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYVEttUVM3OFFOc3M/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYVEttUVM3OFFOc3M/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/file%3A0BzY2jgHHwMwYVEttUVM3OFFOc3M HTTP/1.1
+> Soup-Debug-Timestamp: 1375342597
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 86 (0x862460), SoupSocket 25 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> If-Match: "A1INRwtfTyt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342597
+< Soup-Debug: SoupMessage 86 (0x862460)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 07:36:37 GMT
+< Expires: Thu, 01 Aug 2013 07:36:37 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/document%3A1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190 HTTP/1.1
+> Soup-Debug-Timestamp: 1375342510
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 33 (0x862460), SoupSocket 11 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342510
+< Soup-Debug: SoupMessage 33 (0x862460)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:35:10 GMT
+< Date: Thu, 01 Aug 2013 07:35:10 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRk1AHCt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 07:35:05 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRk1AHCt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190</id><published>2013-08-01T07:35:04.180Z</published><updated>2013-08-01T07:35:04.895Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:35:05.408Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>test</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190'/><link rel='http://schemas.google.com/docs/2007#parent' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0' title='Temporary Folder for Uploading Documents'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190&v=1&s=AMedNnoAAAAAUforzh1Ez3VQ5ab6ENs7tf6YcRo0wRCc&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:35:04.895Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T07:35:04.895Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='true'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/document%3A1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190 HTTP/1.1
+> Soup-Debug-Timestamp: 1375342510
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 34 (0x862280), SoupSocket 11 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> If-Match: "A1INRk1AHCt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342511
+< Soup-Debug: SoupMessage 34 (0x862280)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 07:35:11 GMT
+< Expires: Thu, 01 Aug 2013 07:35:11 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
+> GET /feeds/default/private/full/folder%3A0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0 HTTP/1.1
+> Soup-Debug-Timestamp: 1375342511
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 35 (0x862730), SoupSocket 11 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342511
+< Soup-Debug: SoupMessage 35 (0x862730)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:35:11 GMT
+< Date: Thu, 01 Aug 2013 07:35:11 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRk1UGSt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 07:35:04 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRk1UGSt7ImBk"'><id>https://docs.google.com/feeds/id/folder%3A0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0</id><published>2013-08-01T07:35:03.188Z</published><updated>2013-08-01T07:35:04.971Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:35:04.979Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#folder' label='folder'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Folder for Uploading Documents</title><content type='application/atom+xml;type=feed' src='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0/contents'/><link rel='alternate' type='text/html' href='https://docs.google.com/folderview?id=0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_collection_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0/contents'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/folder%3A0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0/contents'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>folder:0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:35:04.971Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0/acl'/></entry>
+
+> DELETE /feeds/default/private/full/folder%3A0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0 HTTP/1.1
+> Soup-Debug-Timestamp: 1375342511
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 36 (0x8620a0), SoupSocket 11 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> If-Match: "A1INRk1UGSt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342512
+< Soup-Debug: SoupMessage 36 (0x8620a0)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 07:35:12 GMT
+< Expires: Thu, 01 Aug 2013 07:35:12 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/file%3A0BzY2jgHHwMwYWlhZaTZMemhfWkk HTTP/1.1
+> Soup-Debug-Timestamp: 1375342501
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 27 (0x862280), SoupSocket 9 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342501
+< Soup-Debug: SoupMessage 27 (0x862280)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:35:01 GMT
+< Date: Thu, 01 Aug 2013 07:35:01 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRQhbDit7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 07:34:56 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRQhbDit7ImBk"'><id>https://docs.google.com/feeds/id/file%3A0BzY2jgHHwMwYWlhZaTZMemhfWkk</id><published>2013-08-01T07:34:56.202Z</published><updated>2013-08-01T07:34:56.202Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:34:56.746Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#file' label='video/x-theora+ogg'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Untitled</title><content type='video/x-theora+ogg' src='https://doc-0k-4o-docs.googleusercontent.com/docs/securesc/p3gkcpm4vekih3vn1285g2jn1spuiriq/5pc9cr4ce7l80mnv6jqbjaqsr48vh5k5/1375336800000/04693666875216770588/04693666875216770588/0BzY2jgHHwMwYWlhZaTZMemhfWkk?h=16653014193614665626&e=download&gd=true'/><link rel='http://schemas.google.com/docs/2007#parent' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms' title='Temporary Folder for Uploading Documents'/><link rel='alternate' type='text/html' href='https://docs.google.com/file/d/0BzY2jgHHwMwYWlhZaTZMemhfWkk/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://video.google.com/get_player?ps=docs&partnerid=30&docid=0BzY2jgHHwMwYWlhZaTZMemhfWkk&BASE_URL=https://docs.google.com/'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_video_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/file%3A0BzY2jgHHwMwYWlhZaTZMemhfWkk'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/file%3A0BzY2jgHHwMwYWlhZaTZMemhfWkk'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYWlhZaTZMemhfWkk'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYWlhZaTZMemhfWkk'/><link rel='edit-media' type='video/x-theora+ogg' href='https://docs.google.com/feeds/default/media/file%3A0BzY2jgHHwMwYWlhZaTZMemhfWkk'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>file:0BzY2jgHHwMwYWlhZaTZMemhfWkk</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:34:56.192Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>96839</gd:quotaBytesUsed><docs:writersCanInvite value='true'/><docs:md5Checksum>75ad4a55b679b86502ccc0ecd1731622</docs:md5Checksum><docs:filename>Untitled</docs:filename><docs:suggestedFilename>Untitled</docs:suggestedFilename><docs:size>96839</docs:size><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYWlhZaTZMemhfWkk/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYWlhZaTZMemhfWkk/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/file%3A0BzY2jgHHwMwYWlhZaTZMemhfWkk HTTP/1.1
+> Soup-Debug-Timestamp: 1375342501
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 28 (0x862730), SoupSocket 9 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> If-Match: "A1INRQhbDit7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342502
+< Soup-Debug: SoupMessage 28 (0x862730)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 07:35:02 GMT
+< Expires: Thu, 01 Aug 2013 07:35:02 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
+> GET /feeds/default/private/full/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms HTTP/1.1
+> Soup-Debug-Timestamp: 1375342502
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 29 (0x862370), SoupSocket 9 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342502
+< Soup-Debug: SoupMessage 29 (0x862370)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:35:02 GMT
+< Date: Thu, 01 Aug 2013 07:35:02 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRQ5LGit7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 07:34:54 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRQ5LGit7ImBk"'><id>https://docs.google.com/feeds/id/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms</id><published>2013-08-01T07:34:54.426Z</published><updated>2013-08-01T07:34:54.426Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:34:54.718Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#folder' label='folder'/><title>Temporary Folder for Uploading Documents</title><content type='application/atom+xml;type=feed' src='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms/contents'/><link rel='alternate' type='text/html' href='https://docs.google.com/folderview?id=0BzY2jgHHwMwYd1htUDJKMlA4Yms&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_collection_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms/contents'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms/contents'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>folder:0BzY2jgHHwMwYd1htUDJKMlA4Yms</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms/acl'/></entry>
+
+> DELETE /feeds/default/private/full/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms HTTP/1.1
+> Soup-Debug-Timestamp: 1375342502
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 30 (0x8620a0), SoupSocket 9 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> If-Match: "A1INRQ5LGit7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342502
+< Soup-Debug: SoupMessage 30 (0x8620a0)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 07:35:02 GMT
+< Expires: Thu, 01 Aug 2013 07:35:02 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/document%3A1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM HTTP/1.1
+> Soup-Debug-Timestamp: 1375342483
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 13 (0x862370), SoupSocket 5 (0x7dbd30)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342484
+< Soup-Debug: SoupMessage 13 (0x862370)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:34:43 GMT
+< Date: Thu, 01 Aug 2013 07:34:43 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRRpSDSt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 07:34:38 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRRpSDSt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM</id><published>2013-08-01T07:34:37.661Z</published><updated>2013-08-01T07:34:38.139Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:34:38.855Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Untitled</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM'/><link rel='http://schemas.google.com/docs/2007#parent' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYbE1zZ0xZOU8ybW8' title='Temporary Folder for Uploading Documents'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM&v=1&s=AMedNnoAAAAAUforswXeLT_nkBii6PrwJRd18h5uUIFr&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:34:38.139Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T07:34:38.139Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='true'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/document%3A1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM HTTP/1.1
+> Soup-Debug-Timestamp: 1375342484
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 14 (0x862550), SoupSocket 5 (0x7dbd30)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> If-Match: "A1INRRpSDSt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342484
+< Soup-Debug: SoupMessage 14 (0x862550)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 07:34:44 GMT
+< Expires: Thu, 01 Aug 2013 07:34:44 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
+> GET /feeds/default/private/full/folder%3A0BzY2jgHHwMwYbE1zZ0xZOU8ybW8 HTTP/1.1
+> Soup-Debug-Timestamp: 1375342484
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 15 (0x862460), SoupSocket 5 (0x7dbd30)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342484
+< Soup-Debug: SoupMessage 15 (0x862460)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:34:44 GMT
+< Date: Thu, 01 Aug 2013 07:34:44 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRRtABSt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 07:34:38 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRRtABSt7ImBk"'><id>https://docs.google.com/feeds/id/folder%3A0BzY2jgHHwMwYbE1zZ0xZOU8ybW8</id><published>2013-08-01T07:34:35.991Z</published><updated>2013-08-01T07:34:38.196Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:34:38.199Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#folder' label='folder'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Folder for Uploading Documents</title><content type='application/atom+xml;type=feed' src='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYbE1zZ0xZOU8ybW8/contents'/><link rel='alternate' type='text/html' href='https://docs.google.com/folderview?id=0BzY2jgHHwMwYbE1zZ0xZOU8ybW8&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_collection_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYbE1zZ0xZOU8ybW8/contents'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/folder%3A0BzY2jgHHwMwYbE1zZ0xZOU8ybW8/contents'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYbE1zZ0xZOU8ybW8'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYbE1zZ0xZOU8ybW8'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>folder:0BzY2jgHHwMwYbE1zZ0xZOU8ybW8</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:34:38.196Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYbE1zZ0xZOU8ybW8/acl'/></entry>
+
+> DELETE /feeds/default/private/full/folder%3A0BzY2jgHHwMwYbE1zZ0xZOU8ybW8 HTTP/1.1
+> Soup-Debug-Timestamp: 1375342484
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 16 (0x8620a0), SoupSocket 5 (0x7dbd30)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> If-Match: "A1INRRtABSt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342485
+< Soup-Debug: SoupMessage 16 (0x8620a0)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 07:34:45 GMT
+< Expires: Thu, 01 Aug 2013 07:34:45 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/file%3A0BzY2jgHHwMwYXzFVWlJ4MXMyRE0 HTTP/1.1
+> Soup-Debug-Timestamp: 1375342492
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 20 (0x862730), SoupSocket 7 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342493
+< Soup-Debug: SoupMessage 20 (0x862730)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:34:52 GMT
+< Date: Thu, 01 Aug 2013 07:34:52 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRRMJASt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 07:34:47 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRRMJASt7ImBk"'><id>https://docs.google.com/feeds/id/file%3A0BzY2jgHHwMwYXzFVWlJ4MXMyRE0</id><published>2013-08-01T07:34:47.419Z</published><updated>2013-08-01T07:34:47.419Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:34:47.419Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#file' label='application/vnd.oasis.opendocument.text'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Untitled</title><content type='application/vnd.oasis.opendocument.text' src='https://doc-14-4o-docs.googleusercontent.com/docs/securesc/p3gkcpm4vekih3vn1285g2jn1spuiriq/rd5tjnth56o158hnjorg1fipv0n5rlus/1375336800000/04693666875216770588/04693666875216770588/0BzY2jgHHwMwYXzFVWlJ4MXMyRE0?h=16653014193614665626&e=download&gd=true'/><link rel='http://schemas.google.com/docs/2007#parent' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM' title='Temporary Folder for Uploading Documents'/><link rel='alternate' type='text/html' href='https://docs.google.com/file/d/0BzY2jgHHwMwYXzFVWlJ4MXMyRE0/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/file%3A0BzY2jgHHwMwYXzFVWlJ4MXMyRE0'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/file%3A0BzY2jgHHwMwYXzFVWlJ4MXMyRE0'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYXzFVWlJ4MXMyRE0'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYXzFVWlJ4MXMyRE0'/><link rel='edit-media' type='application/vnd.oasis.opendocument.text' href='https://docs.google.com/feeds/default/media/file%3A0BzY2jgHHwMwYXzFVWlJ4MXMyRE0'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>file:0BzY2jgHHwMwYXzFVWlJ4MXMyRE0</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:34:47.412Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>8033</gd:quotaBytesUsed><docs:writersCanInvite value='true'/><docs:md5Checksum>95439a6d6456a79d43980c05c9f25c7d</docs:md5Checksum><docs:filename>Untitled</docs:filename><docs:suggestedFilename>Untitled</docs:suggestedFilename><docs:size>8033</docs:size><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYXzFVWlJ4MXMyRE0/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYXzFVWlJ4MXMyRE0/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/file%3A0BzY2jgHHwMwYXzFVWlJ4MXMyRE0 HTTP/1.1
+> Soup-Debug-Timestamp: 1375342493
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 21 (0x862370), SoupSocket 7 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> If-Match: "A1INRRMJASt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342493
+< Soup-Debug: SoupMessage 21 (0x862370)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 07:34:53 GMT
+< Expires: Thu, 01 Aug 2013 07:34:53 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
+> GET /feeds/default/private/full/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM HTTP/1.1
+> Soup-Debug-Timestamp: 1375342493
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 22 (0x862550), SoupSocket 7 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342493
+< Soup-Debug: SoupMessage 22 (0x862550)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:34:53 GMT
+< Date: Thu, 01 Aug 2013 07:34:53 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRRFMESt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 07:34:45 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRRFMESt7ImBk"'><id>https://docs.google.com/feeds/id/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM</id><published>2013-08-01T07:34:45.549Z</published><updated>2013-08-01T07:34:45.549Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:34:45.819Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#folder' label='folder'/><title>Temporary Folder for Uploading Documents</title><content type='application/atom+xml;type=feed' src='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM/contents'/><link rel='alternate' type='text/html' href='https://docs.google.com/folderview?id=0BzY2jgHHwMwYYk9PVDB5Q0FaanM&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_collection_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM/contents'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM/contents'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>folder:0BzY2jgHHwMwYYk9PVDB5Q0FaanM</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM/acl'/></entry>
+
+> DELETE /feeds/default/private/full/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM HTTP/1.1
+> Soup-Debug-Timestamp: 1375342493
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 23 (0x8620a0), SoupSocket 7 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> If-Match: "A1INRRFMESt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342494
+< Soup-Debug: SoupMessage 23 (0x8620a0)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 07:34:54 GMT
+< Expires: Thu, 01 Aug 2013 07:34:54 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/document%3A1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI HTTP/1.1
+> Soup-Debug-Timestamp: 1375342541
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 50 (0x862370), SoupSocket 15 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342541
+< Soup-Debug: SoupMessage 50 (0x862370)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:35:41 GMT
+< Date: Thu, 01 Aug 2013 07:35:41 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRg0KEyt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 07:35:36 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRg0KEyt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI</id><published>2013-08-01T07:35:35.427Z</published><updated>2013-08-01T07:35:36.020Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:35:36.541Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>test</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI&v=1&s=AMedNnoAAAAAUfor7aQACy4oJFOYwpCPIUhh52WDY7O7&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:35:36.020Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T07:35:36.020Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='true'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/document%3A1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI HTTP/1.1
+> Soup-Debug-Timestamp: 1375342541
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 51 (0x862280), SoupSocket 15 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> If-Match: "A1INRg0KEyt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342542
+< Soup-Debug: SoupMessage 51 (0x862280)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 07:35:41 GMT
+< Expires: Thu, 01 Aug 2013 07:35:41 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/file%3A0BzY2jgHHwMwYbURuTE5pQUxhZFU HTTP/1.1
+> Soup-Debug-Timestamp: 1375342534
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 47 (0x7fffe40050c0), SoupSocket 14 (0x7dbbb0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342534
+< Soup-Debug: SoupMessage 47 (0x7fffe40050c0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:35:34 GMT
+< Date: Thu, 01 Aug 2013 07:35:34 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRhdREyt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 07:35:29 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRhdREyt7ImBk"'><id>https://docs.google.com/feeds/id/file%3A0BzY2jgHHwMwYbURuTE5pQUxhZFU</id><published>2013-08-01T07:35:29.214Z</published><updated>2013-08-01T07:35:29.214Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:35:29.485Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#file' label='video/x-theora+ogg'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Untitled</title><content type='video/x-theora+ogg' src='https://doc-0c-4o-docs.googleusercontent.com/docs/securesc/p3gkcpm4vekih3vn1285g2jn1spuiriq/m2pn536sjv5k61r68b9tbu602pd9t1hg/1375336800000/04693666875216770588/04693666875216770588/0BzY2jgHHwMwYbURuTE5pQUxhZFU?h=16653014193614665626&e=download&gd=true'/><link rel='alternate' type='text/html' href='https://docs.google.com/file/d/0BzY2jgHHwMwYbURuTE5pQUxhZFU/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://video.google.com/get_player?ps=docs&partnerid=30&docid=0BzY2jgHHwMwYbURuTE5pQUxhZFU&BASE_URL=https://docs.google.com/'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_video_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/file%3A0BzY2jgHHwMwYbURuTE5pQUxhZFU'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/file%3A0BzY2jgHHwMwYbURuTE5pQUxhZFU'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYbURuTE5pQUxhZFU'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYbURuTE5pQUxhZFU'/><link rel='edit-media' type='video/x-theora+ogg' href='https://docs.google.com/feeds/default/media/file%3A0BzY2jgHHwMwYbURuTE5pQUxhZFU'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>file:0BzY2jgHHwMwYbURuTE5pQUxhZFU</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:35:29.209Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>96839</gd:quotaBytesUsed><docs:writersCanInvite value='true'/><docs:md5Checksum>75ad4a55b679b86502ccc0ecd1731622</docs:md5Checksum><docs:filename>Untitled</docs:filename><docs:suggestedFilename>Untitled</docs:suggestedFilename><docs:size>96839</docs:size><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYbURuTE5pQUxhZFU/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYbURuTE5pQUxhZFU/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/file%3A0BzY2jgHHwMwYbURuTE5pQUxhZFU HTTP/1.1
+> Soup-Debug-Timestamp: 1375342534
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 48 (0x862280), SoupSocket 14 (0x7dbbb0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> If-Match: "A1INRhdREyt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342535
+< Soup-Debug: SoupMessage 48 (0x862280)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 07:35:35 GMT
+< Expires: Thu, 01 Aug 2013 07:35:35 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/document%3A1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200 HTTP/1.1
+> Soup-Debug-Timestamp: 1375342519
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 39 (0x862190), SoupSocket 12 (0x7dbaf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342519
+< Soup-Debug: SoupMessage 39 (0x862190)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:35:19 GMT
+< Date: Thu, 01 Aug 2013 07:35:19 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRkpORCt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 07:35:14 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRkpORCt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200</id><published>2013-08-01T07:35:13.238Z</published><updated>2013-08-01T07:35:13.888Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:35:14.247Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Untitled</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200&v=1&s=AMedNnoAAAAAUfor186nFpjZE9qScMYs0Wf3LL5Baky0&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:35:13.888Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T07:35:13.888Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='true'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/document%3A1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200 HTTP/1.1
+> Soup-Debug-Timestamp: 1375342519
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 40 (0x862370), SoupSocket 12 (0x7dbaf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> If-Match: "A1INRkpORCt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342520
+< Soup-Debug: SoupMessage 40 (0x862370)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 07:35:20 GMT
+< Expires: Thu, 01 Aug 2013 07:35:20 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/file%3A0BzY2jgHHwMwYbDl1RWVfTjRNUkE HTTP/1.1
+> Soup-Debug-Timestamp: 1375342526
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 43 (0x8620a0), SoupSocket 13 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342527
+< Soup-Debug: SoupMessage 43 (0x8620a0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:35:27 GMT
+< Date: Thu, 01 Aug 2013 07:35:27 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRhlbDyt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 07:35:21 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRhlbDyt7ImBk"'><id>https://docs.google.com/feeds/id/file%3A0BzY2jgHHwMwYbDl1RWVfTjRNUkE</id><published>2013-08-01T07:35:21.369Z</published><updated>2013-08-01T07:35:21.369Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:35:21.369Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#file' label='application/vnd.oasis.opendocument.text'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Untitled</title><content type='application/vnd.oasis.opendocument.text' src='https://doc-04-4o-docs.googleusercontent.com/docs/securesc/p3gkcpm4vekih3vn1285g2jn1spuiriq/cr4l1j8vdvtnbifmfbm2fdb611jqo0c5/1375336800000/04693666875216770588/04693666875216770588/0BzY2jgHHwMwYbDl1RWVfTjRNUkE?h=16653014193614665626&e=download&gd=true'/><link rel='alternate' type='text/html' href='https://docs.google.com/file/d/0BzY2jgHHwMwYbDl1RWVfTjRNUkE/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/file%3A0BzY2jgHHwMwYbDl1RWVfTjRNUkE'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/file%3A0BzY2jgHHwMwYbDl1RWVfTjRNUkE'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYbDl1RWVfTjRNUkE'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYbDl1RWVfTjRNUkE'/><link rel='edit-media' type='application/vnd.oasis.opendocument.text' href='https://docs.google.com/feeds/default/media/file%3A0BzY2jgHHwMwYbDl1RWVfTjRNUkE'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>file:0BzY2jgHHwMwYbDl1RWVfTjRNUkE</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:35:21.359Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>8033</gd:quotaBytesUsed><docs:writersCanInvite value='true'/><docs:md5Checksum>95439a6d6456a79d43980c05c9f25c7d</docs:md5Checksum><docs:filename>Untitled</docs:filename><docs:suggestedFilename>Untitled</docs:suggestedFilename><docs:size>8033</docs:size><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYbDl1RWVfTjRNUkE/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYbDl1RWVfTjRNUkE/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/file%3A0BzY2jgHHwMwYbDl1RWVfTjRNUkE HTTP/1.1
+> Soup-Debug-Timestamp: 1375342527
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 44 (0x862280), SoupSocket 13 (0x7dbdf0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> If-Match: "A1INRhlbDyt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342528
+< Soup-Debug: SoupMessage 44 (0x862280)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 07:35:28 GMT
+< Expires: Thu, 01 Aug 2013 07:35:28 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/document%3A18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc HTTP/1.1
+> Soup-Debug-Timestamp: 1375342467
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 3 (0x8620a0), SoupSocket 2 (0x7dbbb0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342467
+< Soup-Debug: SoupMessage 3 (0x8620a0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:34:27 GMT
+< Date: Thu, 01 Aug 2013 07:34:27 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRU5cByt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 07:34:21 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRU5cByt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc</id><published>2013-08-01T07:34:20.957Z</published><updated>2013-08-01T07:34:21.436Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:34:21.925Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Upload file (/documents/upload/metadata-only/in-folder/non-resumable/odt-convert)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc'/><link rel='http://schemas.google.com/docs/2007#parent' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYLXAwdC1WcTNqajA' title='Temporary Folder for Uploading Documents'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc&v=1&s=AMedNnoAAAAAUforo8oaTGcL7msR4v9n3RVcwvabl9_-&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:34:21.436Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T07:34:21.436Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/document%3A18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc HTTP/1.1
+> Soup-Debug-Timestamp: 1375342467
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 4 (0x8620a0), SoupSocket 2 (0x7dbbb0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> If-Match: "A1INRU5cByt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342467
+< Soup-Debug: SoupMessage 4 (0x8620a0)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 07:34:27 GMT
+< Expires: Thu, 01 Aug 2013 07:34:27 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
+> GET /feeds/default/private/full/folder%3A0BzY2jgHHwMwYLXAwdC1WcTNqajA HTTP/1.1
+> Soup-Debug-Timestamp: 1375342467
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 5 (0x862280), SoupSocket 2 (0x7dbbb0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342467
+< Soup-Debug: SoupMessage 5 (0x862280)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:34:27 GMT
+< Date: Thu, 01 Aug 2013 07:34:27 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRU4OGyt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 07:34:21 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRU4OGyt7ImBk"'><id>https://docs.google.com/feeds/id/folder%3A0BzY2jgHHwMwYLXAwdC1WcTNqajA</id><published>2013-08-01T07:34:20.080Z</published><updated>2013-08-01T07:34:21.517Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:34:21.525Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#folder' label='folder'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Temporary Folder for Uploading Documents</title><content type='application/atom+xml;type=feed' src='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYLXAwdC1WcTNqajA/contents'/><link rel='alternate' type='text/html' href='https://docs.google.com/folderview?id=0BzY2jgHHwMwYLXAwdC1WcTNqajA&usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_collection_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYLXAwdC1WcTNqajA/contents'/><link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/folder%3A0BzY2jgHHwMwYLXAwdC1WcTNqajA/contents'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYLXAwdC1WcTNqajA'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYLXAwdC1WcTNqajA'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>folder:0BzY2jgHHwMwYLXAwdC1WcTNqajA</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:34:21.517Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYLXAwdC1WcTNqajA/acl'/></entry>
+
+> DELETE /feeds/default/private/full/folder%3A0BzY2jgHHwMwYLXAwdC1WcTNqajA HTTP/1.1
+> Soup-Debug-Timestamp: 1375342467
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 6 (0x862460), SoupSocket 2 (0x7dbbb0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> If-Match: "A1INRU4OGyt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342468
+< Soup-Debug: SoupMessage 6 (0x862460)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 07:34:28 GMT
+< Expires: Thu, 01 Aug 2013 07:34:28 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /feeds/default/private/full/document%3A1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY HTTP/1.1
+> Soup-Debug-Timestamp: 1375342475
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 8 (0x862280), SoupSocket 3 (0x7dbc70)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342475
+< Soup-Debug: SoupMessage 8 (0x862280)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:34:35 GMT
+< Date: Thu, 01 Aug 2013 07:34:35 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRURWHyt7ImBk"
+< Last-Modified: Thu, 01 Aug 2013 07:34:29 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRURWHyt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY</id><published>2013-08-01T07:34:28.980Z</published><updated>2013-08-01T07:34:29.492Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:34:29.909Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Upload file (/documents/upload/metadata-only/root-folder/non-resumable/odt-convert)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY&v=1&s=AMedNnoAAAAAUforq_S83DUdJ_SlC-eOU1IA4rbdA_XQ&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:34:29.492Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T07:34:29.492Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY/revisions'/></entry>
+
+> DELETE /feeds/default/private/full/document%3A1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY HTTP/1.1
+> Soup-Debug-Timestamp: 1375342475
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 9 (0x8620a0), SoupSocket 3 (0x7dbc70)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> If-Match: "A1INRURWHyt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342475
+< Soup-Debug: SoupMessage 9 (0x8620a0)
+< GData-Version: 3.0
+< Date: Thu, 01 Aug 2013 07:34:35 GMT
+< Expires: Thu, 01 Aug 2013 07:34:35 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> PUT /feeds/default/media/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8 HTTP/1.1
+> Soup-Debug-Timestamp: 1375344874
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 30 (0x7fffe40088d0), SoupSocket 5 (0x7fffe40038a0)
+> Host: docs.google.com
+> Slug: test_updated.odt
+> Transfer-Encoding: chunked
+> Content-Type: multipart/related; boundary=0003Z5W789deadbeefRTE456KlemsnoZV
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> If-Match: "A1IMVA1ZBSt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375344876
+< Soup-Debug: SoupMessage 30 (0x7fffe40088d0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< GData-Version: 3.0
+< ETag: "A1IMVAlPRyt7ImBk"
+< Date: Thu, 01 Aug 2013 08:14:35 GMT
+< Expires: Thu, 01 Aug 2013 08:14:35 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1IMVAlPRyt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8</id><published>2013-08-01T08:14:28.895Z</published><updated>2013-08-01T08:14:35.587Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:14:35.592Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Updated Test Update file (/documents/update/content-and-metadata/non-resumable)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8&v=2&s=AMedNnoAAAAAUfo1C-isDVScz9koYwx6eB79aeOFafLN&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:14:35.587Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:14:29.328Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1yDDbX7_U6jWj5dTTtjjqP-eJdKi8ACeYdnB9zCr_As8/revisions'/></entry>
+
--- /dev/null
+> PUT /feeds/upload/create-session/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g HTTP/1.1
+> Soup-Debug-Timestamp: 1375344861
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 23 (0x6d1770), SoupSocket 4 (0x7fffe40038a0)
+> Host: docs.google.com
+> Slug: test_updated.odt
+> X-Upload-Content-Type: application/vnd.oasis.opendocument.text
+> X-Upload-Content-Length: 8649
+> Content-Type: application/atom+xml; charset=UTF-8
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> If-Match: "A1IMVBhRFit7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375344861
+< Soup-Debug: SoupMessage 23 (0x6d1770)
+< Location: https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g?upload_id=AEnB2UrKqsrIs8PDH5V6NbSUg5rpHDv9ehZltQtxQEsSc29SUwHoOYB6eFvJJlLEdz3gXnUoVSorUmx0O-PXGSGvPq1oprDb1A
+< Date: Thu, 01 Aug 2013 08:14:21 GMT
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+< Content-Length: 0
+< Content-Type: text/html; charset=UTF-8
+<
+
+> PUT /feeds/upload/create-session/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g?upload_id=AEnB2UrKqsrIs8PDH5V6NbSUg5rpHDv9ehZltQtxQEsSc29SUwHoOYB6eFvJJlLEdz3gXnUoVSorUmx0O-PXGSGvPq1oprDb1A HTTP/1.1
+> Soup-Debug-Timestamp: 1375344861
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 24 (0x6d13b0), SoupSocket 4 (0x7fffe40038a0)
+> Host: docs.google.com
+> Content-Type: application/vnd.oasis.opendocument.text
+> Content-Length: 8649
+> Content-Range: bytes 0-8648/8649
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375344862
+< Soup-Debug: SoupMessage 24 (0x6d13b0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< GData-Version: 3.0
+< ETag: "A1IMVBdcDyt7ImBk"
+< Content-Length: 3767
+< Date: Thu, 01 Aug 2013 08:14:22 GMT
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1IMVBdcDyt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g</id><published>2013-08-01T08:14:14.275Z</published><updated>2013-08-01T08:14:22.122Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:14:22.125Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Updated Test Update file (/documents/update/content-and-metadata/resumable)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g&v=2&s=AMedNnoAAAAAUfo0_g0xOpgyccQt0qoUGMklZdC1TtDg&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:14:22.122Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:14:15.414Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1wLNBe0rXIW9ShlQB7d1nCN6Igd_aYGVarz_xo8Zod4g/revisions'/></entry>
+
--- /dev/null
+> PUT /feeds/default/media/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo HTTP/1.1
+> Soup-Debug-Timestamp: 1375344846
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 17 (0x6d14a0), SoupSocket 3 (0x97e760)
+> Host: docs.google.com
+> Slug: test_updated.odt
+> Transfer-Encoding: chunked
+> Content-Type: multipart/related; boundary=0003Z5W789deadbeefRTE456KlemsnoZV
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> If-Match: "A1IMVE4MQSt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375344847
+< Soup-Debug: SoupMessage 17 (0x6d14a0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< GData-Version: 3.0
+< ETag: "A1IMVE4MQSt7ImBk"
+< Date: Thu, 01 Aug 2013 08:14:07 GMT
+< Expires: Thu, 01 Aug 2013 08:14:07 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1IMVE4MQSt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo</id><published>2013-08-01T08:13:59.925Z</published><updated>2013-08-01T08:14:00.573Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:14:01.038Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Update file (/documents/update/content-only/non-resumable)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo&v=1&s=AMedNnoAAAAAUfo07_F0H50b4ljmfnB2J9fDVmlC0dS6&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:14:00.573Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:14:00.573Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1Sn6Rzv0xztxPNW3PaVUyowsd9IRoE0IyaFsze0-VLEo/revisions'/></entry>
+
--- /dev/null
+> PUT /feeds/upload/create-session/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM HTTP/1.1
+> Soup-Debug-Timestamp: 1375344832
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 10 (0x6d10e0), SoupSocket 2 (0x97e760)
+> Host: docs.google.com
+> Slug: test_updated.odt
+> X-Upload-Content-Type: application/vnd.oasis.opendocument.text
+> X-Upload-Content-Length: 8649
+> Content-Type: application/atom+xml; charset=UTF-8
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> If-Match: "A1IMUw5dByt7ImBk"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375344832
+< Soup-Debug: SoupMessage 10 (0x6d10e0)
+< Location: https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM?upload_id=AEnB2UqRRDy6A77JScYHuqPxDKsHC_fO-xQGRLdIAuhq6BT5c5SUOYkwxHNIJwF2t4Y3mAZKyBmHTpifprT9czaQtjrkAWLA_A
+< Date: Thu, 01 Aug 2013 08:13:52 GMT
+< Server: HTTP Upload Server Built on Jul 21 2013 19:20:38 (1374459638)
+< Content-Length: 0
+< Content-Type: text/html; charset=UTF-8
+<
+
+> PUT /feeds/upload/create-session/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM?upload_id=AEnB2UqRRDy6A77JScYHuqPxDKsHC_fO-xQGRLdIAuhq6BT5c5SUOYkwxHNIJwF2t4Y3mAZKyBmHTpifprT9czaQtjrkAWLA_A HTTP/1.1
+> Soup-Debug-Timestamp: 1375344832
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 11 (0x6d12c0), SoupSocket 2 (0x97e760)
+> Host: docs.google.com
+> Content-Type: application/vnd.oasis.opendocument.text
+> Content-Length: 8649
+> Content-Range: bytes 0-8648/8649
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375344833
+< Soup-Debug: SoupMessage 11 (0x6d12c0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< GData-Version: 3.0
+< ETag: "A1IMUw5dByt7ImBk"
+< Content-Length: 3751
+< Date: Thu, 01 Aug 2013 08:13:53 GMT
+< Server: HTTP Upload Server Built on Jul 21 2013 19:20:38 (1374459638)
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1IMUw5dByt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM</id><published>2013-08-01T08:13:45.873Z</published><updated>2013-08-01T08:13:46.506Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:13:47.161Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Update file (/documents/update/content-only/resumable)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM&v=1&s=AMedNnoAAAAAUfo04dbJDC3Y3Sq4VoEQ0KNkV5HhtNEJ&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:13:46.506Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:13:46.506Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1AuWwi7pk1HRKHo4zsPN_kiWgBz2qM7V_1HkEUIQz3iM/revisions'/></entry>
+
--- /dev/null
+> PUT /feeds/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME HTTP/1.1
+> Soup-Debug-Timestamp: 1375344819
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 4 (0x6d13b0), SoupSocket 1 (0x97e6a0)
+> Host: docs.google.com
+> Authorization: GoogleLogin auth=DQAAANEAAADRNtZr3AZvZtW6zFslWzd9AXn2SUrE86_HRiEdstiT_V0cMfFHsi0SKwtglmDDbKHd7cnIchEiHIbjgXwUDc56qs_W5wRDVaZeliaoyE12dd-Cy6NE-LkxNdGNljUI9kF1xV_6BUPYTKrAeb0ic5QTEONO318WscbxrA6r5eetLMlIl-8VJZE0A_U0sbwZMRQZ_lUCr4sNieZx8qhw4RCb_8kE74oVJbsQjvG7B0UNHyuhqPgFCFlRrufDoLpmd4lyYPrAAVOCPEOeTPESqXilq2owTlLlrYj1DfEAStnIyw
+> GData-Version: 3
+> If-Match: "A1IMUxQNTyt7ImBk"
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005' xmlns:batch='http://schemas.google.com/gdata/batch' gd:etag='"A1IMUxQNTyt7ImBk"'><title type='text'>Updated Test Update file (/documents/update/metadata-only/non-resumable)</title><id>https://docs.google.com/feeds/id/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME</id><updated>2013-08-01T08:13:33Z</updated><published>2013-08-01T08:13:32Z</published><content type='text/plain' src='https://docs.google.com/feeds/download/documents/export/Export?id=1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME'/><category term='http://schemas.google.com/docs/2007#document' scheme='http://schemas.google.com/g/2005#kind'/><category term='http://schemas.google.com/g/2005/labels#viewed' scheme='http://schemas.google.com/g/2005/labels' label='viewed'/><category term='http://schemas.google.com/g/2005/labels#modified-by-me' scheme='http://schemas.google.com/g/2005/labels' label='modified-by-me'/><link href='https://docs.google.com/document/d/1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME/edit?usp=docslist_api' rel='http://www.iana.org/assignments/relation/alternate' type='text/html'/><link href='https://docs.google.com/document/d/1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME/preview' rel='http://schemas.google.com/docs/2007#embed' type='text/html'/><link href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png' rel='http://schemas.google.com/docs/2007#icon' type='image/png'/><link href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME' rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml'/><link href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME' rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml'/><link href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME&v=1&s=AMedNnoAAAAAUfo00p_Hh9CA5B0s-37_bNLLBnHbmW34&sz=s220' rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME' rel='http://www.iana.org/assignments/relation/self' type='application/atom+xml'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME' rel='http://www.iana.org/assignments/relation/edit' type='application/atom+xml'/><link href='https://docs.google.com/feeds/default/media/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME' rel='http://www.iana.org/assignments/relation/edit-media' type='text/html'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME/acl' rel='http://schemas.google.com/acl/2007#accessControlList'/><link href='https://docs.google.com/feeds/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME/revisions' rel='http://schemas.google.com/docs/2007/revisions'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><docs:writersCanInvite value='false'/><gd:resourceId>document:1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME</gd:resourceId><docs:isShareable value="true"/><docs:isShareableByMe value="true"/><docs:modifiedByMeDate>2013-08-01T08:13:33.409Z</docs:modifiedByMeDate></entry>
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375344819
+< Soup-Debug: SoupMessage 4 (0x6d13b0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< GData-Version: 3.0
+< ETag: "A1IMUxBYHSt7ImBk"
+< Date: Thu, 01 Aug 2013 08:13:39 GMT
+< Expires: Thu, 01 Aug 2013 08:13:39 GMT
+< Cache-control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1IMUxBYHSt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME</id><published>2013-08-01T08:13:32.650Z</published><updated>2013-08-01T08:13:39.196Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T08:13:39.199Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Updated Test Update file (/documents/update/metadata-only/non-resumable)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME'/><link rel='http://schemas.google.com/docs/2007/thumbnail' type='image/png' href='https://docs.google.com/feeds/vt?authuser=0&gd=true&id=1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME&v=2&s=AMedNnoAAAAAUfo005ryId92NbIYYv1M-3UKpPduR1EV&sz=s220'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T08:13:39.196Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T08:13:33.409Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1l4EWEIn24dHmTDFKngOoh4HgU8z0E2qCkSuA_MUouME/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/default/private/full/folder%3A0BzY2jgHHwMwYTmEyZGp5MF9OdzA/contents HTTP/1.1
+> Soup-Debug-Timestamp: 1375342574
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 74 (0x8620a0), SoupSocket 23 (0x7dbdf0)
+> Host: docs.google.com
+> Slug: test.odt
+> Transfer-Encoding: chunked
+> Content-Type: multipart/related; boundary=0003Z5W789deadbeefRTE456KlemsnoZV
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375342575
+< Soup-Debug: SoupMessage 74 (0x8620a0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:36:15 GMT
+< Date: Thu, 01 Aug 2013 07:36:15 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRxRMAit7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYTmEyZGp5MF9OdzA/contents/document%3A1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4
+< Content-Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYTmEyZGp5MF9OdzA/contents/document%3A1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRxRMAit7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4</id><published>2013-08-01T07:36:14.386Z</published><updated>2013-08-01T07:36:15.222Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:36:15.258Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Upload file (/documents/upload/content-and-metadata/in-folder/non-resumable/odt-convert)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4'/><link rel='http://schemas.google.com/docs/2007#parent' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYTmEyZGp5MF9OdzA' title='Temporary Folder for Uploading Documents'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYTmEyZGp5MF9OdzA/contents/document%3A1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYTmEyZGp5MF9OdzA/contents/document%3A1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/contentmedia/folder%3A0BzY2jgHHwMwYTmEyZGp5MF9OdzA/document%3A1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:36:15.222Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T07:36:14.666Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1PImyq8hnUqAx4fLj0obuPAkKhFlFqAMxw42HZUlCqj4/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k/contents?convert=false HTTP/1.1
+> Soup-Debug-Timestamp: 1375342562
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 67 (0x862370), SoupSocket 21 (0x7dbdf0)
+> Host: docs.google.com
+> Slug: sample.ogg
+> X-Upload-Content-Type: video/x-theora+ogg
+> X-Upload-Content-Length: 96839
+> Content-Type: application/atom+xml; charset=UTF-8
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342562
+< Soup-Debug: SoupMessage 67 (0x862370)
+< Location: https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k/contents?convert=false&upload_id=AEnB2UqCzRgWCRTlX1PqiwPYwWiXHiU7zsHlh3AkCmf8a3-fUv_ZSlhe_zdmaRgSz8t5ls6PrhL5t7BPK1S2IDo6T5vfKRh5Tw
+< Date: Thu, 01 Aug 2013 07:36:02 GMT
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+< Content-Length: 0
+< Content-Type: text/html; charset=UTF-8
+<
+
+> PUT /feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k/contents?convert=false&upload_id=AEnB2UqCzRgWCRTlX1PqiwPYwWiXHiU7zsHlh3AkCmf8a3-fUv_ZSlhe_zdmaRgSz8t5ls6PrhL5t7BPK1S2IDo6T5vfKRh5Tw HTTP/1.1
+> Soup-Debug-Timestamp: 1375342562
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 68 (0x862280), SoupSocket 21 (0x7dbdf0)
+> Host: docs.google.com
+> Content-Type: video/x-theora+ogg
+> Content-Length: 96839
+> Content-Range: bytes 0-96838/96839
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375342563
+< Soup-Debug: SoupMessage 68 (0x862280)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:36:03 GMT
+< Date: Thu, 01 Aug 2013 07:36:03 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INR0RIBCt7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k/contents/file%3A0BzY2jgHHwMwYMkdSNTdVNWhOVnM
+< Content-Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k/contents/file%3A0BzY2jgHHwMwYMkdSNTdVNWhOVnM
+< Content-Length: 4091
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INR0RIBCt7ImBk"'><id>https://docs.google.com/feeds/id/file%3A0BzY2jgHHwMwYMkdSNTdVNWhOVnM</id><published>2013-08-01T07:36:03.220Z</published><updated>2013-08-01T07:36:03.220Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:36:03.448Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#file' label='video/x-theora+ogg'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Upload file (/documents/upload/content-and-metadata/in-folder/resumable/bin-no-convert)</title><content type='video/x-theora+ogg' src='https://doc-0c-4o-docs.googleusercontent.com/docs/securesc/p3gkcpm4vekih3vn1285g2jn1spuiriq/16i8229o5srbuc78vpk92d2t4lh3oc25/1375336800000/04693666875216770588/04693666875216770588/0BzY2jgHHwMwYMkdSNTdVNWhOVnM?h=16653014193614665626&e=download&gd=true'/><link rel='http://schemas.google.com/docs/2007#parent' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k' title='Temporary Folder for Uploading Documents'/><link rel='alternate' type='text/html' href='https://docs.google.com/file/d/0BzY2jgHHwMwYMkdSNTdVNWhOVnM/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://video.google.com/get_player?ps=docs&partnerid=30&docid=0BzY2jgHHwMwYMkdSNTdVNWhOVnM&BASE_URL=https://docs.google.com/'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_video_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/file%3A0BzY2jgHHwMwYMkdSNTdVNWhOVnM'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/file%3A0BzY2jgHHwMwYMkdSNTdVNWhOVnM'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k/contents/file%3A0BzY2jgHHwMwYMkdSNTdVNWhOVnM'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k/contents/file%3A0BzY2jgHHwMwYMkdSNTdVNWhOVnM'/><link rel='edit-media' type='video/x-theora+ogg' href='https://docs.google.com/feeds/default/contentmedia/folder%3A0BzY2jgHHwMwYN0pZNnFVRXMxd1k/file%3A0BzY2jgHHwMwYMkdSNTdVNWhOVnM'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>file:0BzY2jgHHwMwYMkdSNTdVNWhOVnM</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:36:03.215Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>96839</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><docs:md5Checksum>75ad4a55b679b86502ccc0ecd1731622</docs:md5Checksum><docs:filename>Test Upload file (/documents/upload/content-and-metadata/in-folder/resumable/bin-no-convert)</docs:filename><docs:suggestedFilename>Test Upload file (/documents/upload/content-and-metadata/in-folder/resumable/bin-no-convert)</docs:suggestedFilename><docs:size>96839</docs:size><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYMkdSNTdVNWhOVnM/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYMkdSNTdVNWhOVnM/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k/contents?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375342543
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 53 (0x7fffe40050c0), SoupSocket 17 (0x7dbdf0)
+> Host: docs.google.com
+> Slug: test.odt
+> X-Upload-Content-Type: application/vnd.oasis.opendocument.text
+> X-Upload-Content-Length: 8033
+> Content-Type: application/atom+xml; charset=UTF-8
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342544
+< Soup-Debug: SoupMessage 53 (0x7fffe40050c0)
+< Location: https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k/contents?convert=true&upload_id=AEnB2UpNqQHZp2kfmXG5vOYTsf5dhIfCvs6_h0DF1on6O7knMN2BBe-RgJq2UG9qwmRlbuHLwu9dUta7krdaMkhfAAAKoJ25_g
+< Date: Thu, 01 Aug 2013 07:35:44 GMT
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+< Content-Length: 0
+< Content-Type: text/html; charset=UTF-8
+<
+
+> PUT /feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k/contents?convert=true&upload_id=AEnB2UpNqQHZp2kfmXG5vOYTsf5dhIfCvs6_h0DF1on6O7knMN2BBe-RgJq2UG9qwmRlbuHLwu9dUta7krdaMkhfAAAKoJ25_g HTTP/1.1
+> Soup-Debug-Timestamp: 1375342544
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 54 (0x862640), SoupSocket 17 (0x7dbdf0)
+> Host: docs.google.com
+> Content-Type: application/vnd.oasis.opendocument.text
+> Content-Length: 8033
+> Content-Range: bytes 0-8032/8033
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375342545
+< Soup-Debug: SoupMessage 54 (0x862640)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:35:45 GMT
+< Date: Thu, 01 Aug 2013 07:35:45 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRgtAAit7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k/contents/document%3A15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI
+< Content-Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k/contents/document%3A15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI
+< Content-Length: 3887
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRgtAAit7ImBk"'><id>https://docs.google.com/feeds/id/document%3A15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI</id><published>2013-08-01T07:35:44.404Z</published><updated>2013-08-01T07:35:44.404Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:35:45.594Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Upload file (/documents/upload/content-and-metadata/in-folder/resumable/odt-convert)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI'/><link rel='http://schemas.google.com/docs/2007#parent' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k' title='Temporary Folder for Uploading Documents'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k/contents/document%3A15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k/contents/document%3A15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/contentmedia/folder%3A0BzY2jgHHwMwYenBFRVhodkxJY0k/document%3A15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:35:44.404Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T07:35:45.077Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A15zn0r3x45bh22Ts7c4mJraIsdcDjb6ionywN2xEzdxI/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM/contents?convert=false HTTP/1.1
+> Soup-Debug-Timestamp: 1375342553
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 60 (0x862280), SoupSocket 19 (0x7dbdf0)
+> Host: docs.google.com
+> Slug: test.odt
+> X-Upload-Content-Type: application/vnd.oasis.opendocument.text
+> X-Upload-Content-Length: 8033
+> Content-Type: application/atom+xml; charset=UTF-8
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342553
+< Soup-Debug: SoupMessage 60 (0x862280)
+< Location: https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM/contents?convert=false&upload_id=AEnB2Uot3d9WtW0amFKsRyhNTHxMq1nRt04Y7r8KpaF5a845ofMr4ilPkout-Kgg-PsOtg2NRyoazcB02yM9RhzkEMtYd4pp-w
+< Date: Thu, 01 Aug 2013 07:35:53 GMT
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+< Content-Length: 0
+< Content-Type: text/html; charset=UTF-8
+<
+
+> PUT /feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM/contents?convert=false&upload_id=AEnB2Uot3d9WtW0amFKsRyhNTHxMq1nRt04Y7r8KpaF5a845ofMr4ilPkout-Kgg-PsOtg2NRyoazcB02yM9RhzkEMtYd4pp-w HTTP/1.1
+> Soup-Debug-Timestamp: 1375342553
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 61 (0x862550), SoupSocket 19 (0x7dbdf0)
+> Host: docs.google.com
+> Content-Type: application/vnd.oasis.opendocument.text
+> Content-Length: 8033
+> Content-Range: bytes 0-8032/8033
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375342555
+< Soup-Debug: SoupMessage 61 (0x862550)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:35:55 GMT
+< Date: Thu, 01 Aug 2013 07:35:55 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INR04MAit7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM/contents/file%3A0BzY2jgHHwMwYV3BPQktLM3NELXc
+< Content-Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM/contents/file%3A0BzY2jgHHwMwYV3BPQktLM3NELXc
+< Content-Length: 3937
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INR04MAit7ImBk"'><id>https://docs.google.com/feeds/id/file%3A0BzY2jgHHwMwYV3BPQktLM3NELXc</id><published>2013-08-01T07:35:54.561Z</published><updated>2013-08-01T07:35:54.561Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:35:54.918Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#file' label='application/vnd.oasis.opendocument.text'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Upload file (/documents/upload/content-and-metadata/in-folder/resumable/odt-no-convert)</title><content type='application/vnd.oasis.opendocument.text' src='https://doc-10-4o-docs.googleusercontent.com/docs/securesc/p3gkcpm4vekih3vn1285g2jn1spuiriq/j3fsimntg9jr3q22d32p36rp0bsvbi44/1375336800000/04693666875216770588/04693666875216770588/0BzY2jgHHwMwYV3BPQktLM3NELXc?h=16653014193614665626&e=download&gd=true'/><link rel='http://schemas.google.com/docs/2007#parent' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM' title='Temporary Folder for Uploading Documents'/><link rel='alternate' type='text/html' href='https://docs.google.com/file/d/0BzY2jgHHwMwYV3BPQktLM3NELXc/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/file%3A0BzY2jgHHwMwYV3BPQktLM3NELXc'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/file%3A0BzY2jgHHwMwYV3BPQktLM3NELXc'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM/contents/file%3A0BzY2jgHHwMwYV3BPQktLM3NELXc'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM/contents/file%3A0BzY2jgHHwMwYV3BPQktLM3NELXc'/><link rel='edit-media' type='application/vnd.oasis.opendocument.text' href='https://docs.google.com/feeds/default/contentmedia/folder%3A0BzY2jgHHwMwYXzkyMGhELWdsamM/file%3A0BzY2jgHHwMwYV3BPQktLM3NELXc'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>file:0BzY2jgHHwMwYV3BPQktLM3NELXc</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:35:54.556Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>8033</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><docs:md5Checksum>95439a6d6456a79d43980c05c9f25c7d</docs:md5Checksum><docs:filename>Test Upload file (/documents/upload/content-and-metadata/in-folder/resumable/odt-no-convert)</docs:filename><docs:suggestedFilename>Test Upload file (/documents/upload/content-and-metadata/in-folder/resumable/odt-no-convert)</docs:suggestedFilename><docs:size>8033</docs:size><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYV3BPQktLM3NELXc/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYV3BPQktLM3NELXc/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/default/private/full HTTP/1.1
+> Soup-Debug-Timestamp: 1375342605
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 91 (0x862550), SoupSocket 27 (0x7dbdf0)
+> Host: docs.google.com
+> Slug: test.odt
+> Transfer-Encoding: chunked
+> Content-Type: multipart/related; boundary=0003Z5W789deadbeefRTE456KlemsnoZV
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375342607
+< Soup-Debug: SoupMessage 91 (0x862550)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:36:47 GMT
+< Date: Thu, 01 Aug 2013 07:36:47 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INSEpWGyt7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/document%3A1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o
+< Content-Location: https://docs.google.com/feeds/default/private/full/document%3A1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INSEpWGyt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o</id><published>2013-08-01T07:36:46.075Z</published><updated>2013-08-01T07:36:47.247Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:36:47.289Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Upload file (/documents/upload/content-and-metadata/root-folder/non-resumable/odt-convert)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:36:47.247Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T07:36:46.708Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1Aj31swHGjB_uopT-bvF7T2zVjn3U6b4DemHeiU80v6o/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full?convert=false HTTP/1.1
+> Soup-Debug-Timestamp: 1375342597
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 87 (0x8620a0), SoupSocket 26 (0x7dbd30)
+> Host: docs.google.com
+> Slug: sample.ogg
+> X-Upload-Content-Type: video/x-theora+ogg
+> X-Upload-Content-Length: 96839
+> Content-Type: application/atom+xml; charset=UTF-8
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342597
+< Soup-Debug: SoupMessage 87 (0x8620a0)
+< Location: https://docs.google.com/feeds/upload/create-session/default/private/full?convert=false&upload_id=AEnB2UoYIU35MlXzeqJI43nlEredoM5M7daAT4lb1bZ_Jr2hvZ4wcwZmztDXs7IqRtN81NgNkiWexcpidE4IU9SynftREjUe6A
+< Date: Thu, 01 Aug 2013 07:36:37 GMT
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+< Content-Length: 0
+< Content-Type: text/html; charset=UTF-8
+<
+
+> PUT /feeds/upload/create-session/default/private/full?convert=false&upload_id=AEnB2UoYIU35MlXzeqJI43nlEredoM5M7daAT4lb1bZ_Jr2hvZ4wcwZmztDXs7IqRtN81NgNkiWexcpidE4IU9SynftREjUe6A HTTP/1.1
+> Soup-Debug-Timestamp: 1375342597
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 88 (0x862640), SoupSocket 26 (0x7dbd30)
+> Host: docs.google.com
+> Content-Type: video/x-theora+ogg
+> Content-Length: 96839
+> Content-Range: bytes 0-96838/96839
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375342599
+< Soup-Debug: SoupMessage 88 (0x862640)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:36:39 GMT
+< Date: Thu, 01 Aug 2013 07:36:39 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INSExUGyt7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYOENlempRajlpWms
+< Content-Location: https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYOENlempRajlpWms
+< Content-Length: 3729
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INSExUGyt7ImBk"'><id>https://docs.google.com/feeds/id/file%3A0BzY2jgHHwMwYOENlempRajlpWms</id><published>2013-08-01T07:36:39.367Z</published><updated>2013-08-01T07:36:39.367Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:36:39.585Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#file' label='video/x-theora+ogg'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Upload file (/documents/upload/content-and-metadata/root-folder/resumable/bin-no-convert)</title><content type='video/x-theora+ogg' src='https://doc-00-4o-docs.googleusercontent.com/docs/securesc/p3gkcpm4vekih3vn1285g2jn1spuiriq/tv1shi5knd05g3ktkp3cf4qfaik1gj8s/1375336800000/04693666875216770588/04693666875216770588/0BzY2jgHHwMwYOENlempRajlpWms?h=16653014193614665626&e=download&gd=true'/><link rel='alternate' type='text/html' href='https://docs.google.com/file/d/0BzY2jgHHwMwYOENlempRajlpWms/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://video.google.com/get_player?ps=docs&partnerid=30&docid=0BzY2jgHHwMwYOENlempRajlpWms&BASE_URL=https://docs.google.com/'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_video_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/file%3A0BzY2jgHHwMwYOENlempRajlpWms'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/file%3A0BzY2jgHHwMwYOENlempRajlpWms'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYOENlempRajlpWms'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYOENlempRajlpWms'/><link rel='edit-media' type='video/x-theora+ogg' href='https://docs.google.com/feeds/default/media/file%3A0BzY2jgHHwMwYOENlempRajlpWms'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>file:0BzY2jgHHwMwYOENlempRajlpWms</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:36:39.363Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>96839</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><docs:md5Checksum>75ad4a55b679b86502ccc0ecd1731622</docs:md5Checksum><docs:filename>Test Upload file (/documents/upload/content-and-metadata/root-folder/resumable/bin-no-convert)</docs:filename><docs:suggestedFilename>Test Upload file (/documents/upload/content-and-metadata/root-folder/resumable/bin-no-convert)</docs:suggestedFilename><docs:size>96839</docs:size><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYOENlempRajlpWms/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYOENlempRajlpWms/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375342582
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 79 (0x862190), SoupSocket 24 (0x7dbc70)
+> Host: docs.google.com
+> Slug: test.odt
+> X-Upload-Content-Type: application/vnd.oasis.opendocument.text
+> X-Upload-Content-Length: 8033
+> Content-Type: application/atom+xml; charset=UTF-8
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342582
+< Soup-Debug: SoupMessage 79 (0x862190)
+< Location: https://docs.google.com/feeds/upload/create-session/default/private/full?convert=true&upload_id=AEnB2UqwyGDHA2RtUT84l4zwf_qmRzKoms-WnamN_vV4fDqXl7CxUcRP2egcA3kUmNDCphrpqV23924UhcnNZwFX0OAHASjICw
+< Date: Thu, 01 Aug 2013 07:36:22 GMT
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+< Content-Length: 0
+< Content-Type: text/html; charset=UTF-8
+<
+
+> PUT /feeds/upload/create-session/default/private/full?convert=true&upload_id=AEnB2UqwyGDHA2RtUT84l4zwf_qmRzKoms-WnamN_vV4fDqXl7CxUcRP2egcA3kUmNDCphrpqV23924UhcnNZwFX0OAHASjICw HTTP/1.1
+> Soup-Debug-Timestamp: 1375342582
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 80 (0x7fffe40358b0), SoupSocket 24 (0x7dbc70)
+> Host: docs.google.com
+> Content-Type: application/vnd.oasis.opendocument.text
+> Content-Length: 8033
+> Content-Range: bytes 0-8032/8033
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375342584
+< Soup-Debug: SoupMessage 80 (0x7fffe40358b0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:36:24 GMT
+< Date: Thu, 01 Aug 2013 07:36:24 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRw1KGSt7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/document%3A1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI
+< Content-Location: https://docs.google.com/feeds/default/private/full/document%3A1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI
+< Content-Length: 3521
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRw1KGSt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI</id><published>2013-08-01T07:36:23.228Z</published><updated>2013-08-01T07:36:23.228Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:36:24.107Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Upload file (/documents/upload/content-and-metadata/root-folder/resumable/odt-convert)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:36:23.228Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T07:36:23.531Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1UyhBNCwJJqXlzfCcgaBS51kMdFXuxSPcl2gnm8IGPxI/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full?convert=false HTTP/1.1
+> Soup-Debug-Timestamp: 1375342590
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 83 (0x862640), SoupSocket 25 (0x7dbdf0)
+> Host: docs.google.com
+> Slug: test.odt
+> X-Upload-Content-Type: application/vnd.oasis.opendocument.text
+> X-Upload-Content-Length: 8033
+> Content-Type: application/atom+xml; charset=UTF-8
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342590
+< Soup-Debug: SoupMessage 83 (0x862640)
+< Location: https://docs.google.com/feeds/upload/create-session/default/private/full?convert=false&upload_id=AEnB2UpVM7_4SQDoMsBbW2vWcYbN1EJw0K5CbtdGN5mr6RVr9mPWhU-KnDP0YWFzjegBW57F9TbZ_sYNm5AVc0lkeb6Aj6vbJA
+< Date: Thu, 01 Aug 2013 07:36:30 GMT
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+< Content-Length: 0
+< Content-Type: text/html; charset=UTF-8
+<
+
+> PUT /feeds/upload/create-session/default/private/full?convert=false&upload_id=AEnB2UpVM7_4SQDoMsBbW2vWcYbN1EJw0K5CbtdGN5mr6RVr9mPWhU-KnDP0YWFzjegBW57F9TbZ_sYNm5AVc0lkeb6Aj6vbJA HTTP/1.1
+> Soup-Debug-Timestamp: 1375342590
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 84 (0x862190), SoupSocket 25 (0x7dbdf0)
+> Host: docs.google.com
+> Content-Type: application/vnd.oasis.opendocument.text
+> Content-Length: 8033
+> Content-Range: bytes 0-8032/8033
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375342591
+< Soup-Debug: SoupMessage 84 (0x862190)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:36:31 GMT
+< Date: Thu, 01 Aug 2013 07:36:31 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRwtfTyt7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYVEttUVM3OFFOc3M
+< Content-Location: https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYVEttUVM3OFFOc3M
+< Content-Length: 3575
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRwtfTyt7ImBk"'><id>https://docs.google.com/feeds/id/file%3A0BzY2jgHHwMwYVEttUVM3OFFOc3M</id><published>2013-08-01T07:36:31.271Z</published><updated>2013-08-01T07:36:31.271Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:36:31.472Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#file' label='application/vnd.oasis.opendocument.text'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Upload file (/documents/upload/content-and-metadata/root-folder/resumable/odt-no-convert)</title><content type='application/vnd.oasis.opendocument.text' src='https://doc-08-4o-docs.googleusercontent.com/docs/securesc/p3gkcpm4vekih3vn1285g2jn1spuiriq/i4qv8v6a7fth6boufvv3gvu0r5um0ksu/1375336800000/04693666875216770588/04693666875216770588/0BzY2jgHHwMwYVEttUVM3OFFOc3M?h=16653014193614665626&e=download&gd=true'/><link rel='alternate' type='text/html' href='https://docs.google.com/file/d/0BzY2jgHHwMwYVEttUVM3OFFOc3M/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/file%3A0BzY2jgHHwMwYVEttUVM3OFFOc3M'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/file%3A0BzY2jgHHwMwYVEttUVM3OFFOc3M'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYVEttUVM3OFFOc3M'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYVEttUVM3OFFOc3M'/><link rel='edit-media' type='application/vnd.oasis.opendocument.text' href='https://docs.google.com/feeds/default/media/file%3A0BzY2jgHHwMwYVEttUVM3OFFOc3M'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>file:0BzY2jgHHwMwYVEttUVM3OFFOc3M</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:36:31.265Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>8033</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><docs:md5Checksum>95439a6d6456a79d43980c05c9f25c7d</docs:md5Checksum><docs:filename>Test Upload file (/documents/upload/content-and-metadata/root-folder/resumable/odt-no-convert)</docs:filename><docs:suggestedFilename>Test Upload file (/documents/upload/content-and-metadata/root-folder/resumable/odt-no-convert)</docs:suggestedFilename><docs:size>8033</docs:size><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYVEttUVM3OFFOc3M/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYVEttUVM3OFFOc3M/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/default/private/full/folder%3A0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0/contents HTTP/1.1
+> Soup-Debug-Timestamp: 1375342503
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 32 (0x862370), SoupSocket 11 (0x7dbdf0)
+> Host: docs.google.com
+> Slug: test.odt
+> Transfer-Encoding: chunked
+> Content-Type: application/vnd.oasis.opendocument.text
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375342505
+< Soup-Debug: SoupMessage 32 (0x862370)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:35:05 GMT
+< Date: Thu, 01 Aug 2013 07:35:05 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRk1dGyt7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0/contents/document%3A1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190
+< Content-Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0/contents/document%3A1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRk1dGyt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190</id><published>2013-08-01T07:35:04.180Z</published><updated>2013-08-01T07:35:04.180Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:35:04.725Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>test</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0/contents/document%3A1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0/contents/document%3A1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/contentmedia/folder%3A0BzY2jgHHwMwYd0xqZ2JnOEJ3cE0/document%3A1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:35:04.180Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T07:35:04.687Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='true'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1-OSZ1DZegY3k9D2U2tJyAxfCf6tB2bZin4cw3XdX190/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms/contents?convert=false HTTP/1.1
+> Soup-Debug-Timestamp: 1375342495
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 25 (0x862550), SoupSocket 9 (0x7dbdf0)
+> Host: docs.google.com
+> Slug: sample.ogg
+> X-Upload-Content-Type: video/x-theora+ogg
+> X-Upload-Content-Length: 96839
+> Content-Length: 0
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342495
+< Soup-Debug: SoupMessage 25 (0x862550)
+< Location: https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms/contents?convert=false&upload_id=AEnB2UrqaMR8DgaJ7QbA238Ul7gQ7TpJNAcdgop3DWHYWlkBKypzABWYp3Y--pSeVvKZDNdH1kybd2cqH4JF9rUs3mlGvyTAeA
+< Date: Thu, 01 Aug 2013 07:34:55 GMT
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+< Content-Length: 0
+< Content-Type: text/html; charset=UTF-8
+<
+
+> PUT /feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms/contents?convert=false&upload_id=AEnB2UrqaMR8DgaJ7QbA238Ul7gQ7TpJNAcdgop3DWHYWlkBKypzABWYp3Y--pSeVvKZDNdH1kybd2cqH4JF9rUs3mlGvyTAeA HTTP/1.1
+> Soup-Debug-Timestamp: 1375342495
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 26 (0x862460), SoupSocket 9 (0x7dbdf0)
+> Host: docs.google.com
+> Content-Type: video/x-theora+ogg
+> Content-Length: 96839
+> Content-Range: bytes 0-96838/96839
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375342496
+< Soup-Debug: SoupMessage 26 (0x862460)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:34:56 GMT
+< Date: Thu, 01 Aug 2013 07:34:56 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRQlMAit7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms/contents/file%3A0BzY2jgHHwMwYWlhZaTZMemhfWkk
+< Content-Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms/contents/file%3A0BzY2jgHHwMwYWlhZaTZMemhfWkk
+< Content-Length: 3838
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRQlMAit7ImBk"'><id>https://docs.google.com/feeds/id/file%3A0BzY2jgHHwMwYWlhZaTZMemhfWkk</id><published>2013-08-01T07:34:56.202Z</published><updated>2013-08-01T07:34:56.202Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:34:56.202Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#file' label='video/x-theora+ogg'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Untitled</title><content type='video/x-theora+ogg' src='https://doc-0k-4o-docs.googleusercontent.com/docs/securesc/p3gkcpm4vekih3vn1285g2jn1spuiriq/5pc9cr4ce7l80mnv6jqbjaqsr48vh5k5/1375336800000/04693666875216770588/04693666875216770588/0BzY2jgHHwMwYWlhZaTZMemhfWkk?h=16653014193614665626&e=download&gd=true'/><link rel='http://schemas.google.com/docs/2007#parent' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms' title='Temporary Folder for Uploading Documents'/><link rel='alternate' type='text/html' href='https://docs.google.com/file/d/0BzY2jgHHwMwYWlhZaTZMemhfWkk/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://video.google.com/get_player?ps=docs&partnerid=30&docid=0BzY2jgHHwMwYWlhZaTZMemhfWkk&BASE_URL=https://docs.google.com/'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_video_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/file%3A0BzY2jgHHwMwYWlhZaTZMemhfWkk'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/file%3A0BzY2jgHHwMwYWlhZaTZMemhfWkk'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms/contents/file%3A0BzY2jgHHwMwYWlhZaTZMemhfWkk'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms/contents/file%3A0BzY2jgHHwMwYWlhZaTZMemhfWkk'/><link rel='edit-media' type='video/x-theora+ogg' href='https://docs.google.com/feeds/default/contentmedia/folder%3A0BzY2jgHHwMwYd1htUDJKMlA4Yms/file%3A0BzY2jgHHwMwYWlhZaTZMemhfWkk'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>file:0BzY2jgHHwMwYWlhZaTZMemhfWkk</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:34:56.192Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>96839</gd:quotaBytesUsed><docs:writersCanInvite value='true'/><docs:md5Checksum>75ad4a55b679b86502ccc0ecd1731622</docs:md5Checksum><docs:filename>Untitled</docs:filename><docs:suggestedFilename>Untitled</docs:suggestedFilename><docs:size>96839</docs:size><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYWlhZaTZMemhfWkk/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYWlhZaTZMemhfWkk/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYbE1zZ0xZOU8ybW8/contents?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375342476
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 11 (0x862280), SoupSocket 5 (0x7dbd30)
+> Host: docs.google.com
+> Slug: test.odt
+> X-Upload-Content-Type: application/vnd.oasis.opendocument.text
+> X-Upload-Content-Length: 8033
+> Content-Length: 0
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342477
+< Soup-Debug: SoupMessage 11 (0x862280)
+< Location: https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYbE1zZ0xZOU8ybW8/contents?convert=true&upload_id=AEnB2Uovc9R19L-hsXIOfWEt67fkVd7vGuFRZ4cXk4SJMMKLP3DL42IPnusHpG5SKozJaOF6esXRyShQ_Kg88mgrIDLgLqxNAQ
+< Date: Thu, 01 Aug 2013 07:34:37 GMT
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+< Content-Length: 0
+< Content-Type: text/html; charset=UTF-8
+<
+
+> PUT /feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYbE1zZ0xZOU8ybW8/contents?convert=true&upload_id=AEnB2Uovc9R19L-hsXIOfWEt67fkVd7vGuFRZ4cXk4SJMMKLP3DL42IPnusHpG5SKozJaOF6esXRyShQ_Kg88mgrIDLgLqxNAQ HTTP/1.1
+> Soup-Debug-Timestamp: 1375342477
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 12 (0x862730), SoupSocket 5 (0x7dbd30)
+> Host: docs.google.com
+> Content-Type: application/vnd.oasis.opendocument.text
+> Content-Length: 8033
+> Content-Range: bytes 0-8032/8033
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375342478
+< Soup-Debug: SoupMessage 12 (0x862730)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:34:38 GMT
+< Date: Thu, 01 Aug 2013 07:34:38 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRRtOAit7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYbE1zZ0xZOU8ybW8/contents/document%3A1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM
+< Content-Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYbE1zZ0xZOU8ybW8/contents/document%3A1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM
+< Content-Length: 3576
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRRtOAit7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM</id><published>2013-08-01T07:34:37.661Z</published><updated>2013-08-01T07:34:37.661Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:34:37.986Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Untitled</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYbE1zZ0xZOU8ybW8/contents/document%3A1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYbE1zZ0xZOU8ybW8/contents/document%3A1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/contentmedia/folder%3A0BzY2jgHHwMwYbE1zZ0xZOU8ybW8/document%3A1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:34:37.661Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T07:34:37.941Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='true'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1J7165oOGq_tsSv5yw9p-sHtTetK71Urh8nI-8fuQriM/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM/contents?convert=false HTTP/1.1
+> Soup-Debug-Timestamp: 1375342486
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 18 (0x862460), SoupSocket 7 (0x7dbdf0)
+> Host: docs.google.com
+> Slug: test.odt
+> X-Upload-Content-Type: application/vnd.oasis.opendocument.text
+> X-Upload-Content-Length: 8033
+> Content-Length: 0
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342486
+< Soup-Debug: SoupMessage 18 (0x862460)
+< Location: https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM/contents?convert=false&upload_id=AEnB2UpWk5WhMYW_mephbG_2VTBwdoZp6MJoEv2XQOHWU0Xv-L1Nza1OrUO6ifMJy6bckdXD5gkVwM6lgK3f1Mw7JamLCfo3qA
+< Date: Thu, 01 Aug 2013 07:34:46 GMT
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+< Content-Length: 0
+< Content-Type: text/html; charset=UTF-8
+<
+
+> PUT /feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM/contents?convert=false&upload_id=AEnB2UpWk5WhMYW_mephbG_2VTBwdoZp6MJoEv2XQOHWU0Xv-L1Nza1OrUO6ifMJy6bckdXD5gkVwM6lgK3f1Mw7JamLCfo3qA HTTP/1.1
+> Soup-Debug-Timestamp: 1375342486
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 19 (0x862280), SoupSocket 7 (0x7dbdf0)
+> Host: docs.google.com
+> Content-Type: application/vnd.oasis.opendocument.text
+> Content-Length: 8033
+> Content-Range: bytes 0-8032/8033
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375342487
+< Soup-Debug: SoupMessage 19 (0x862280)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:34:47 GMT
+< Date: Thu, 01 Aug 2013 07:34:47 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRRMJASt7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM/contents/file%3A0BzY2jgHHwMwYXzFVWlJ4MXMyRE0
+< Content-Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM/contents/file%3A0BzY2jgHHwMwYXzFVWlJ4MXMyRE0
+< Content-Length: 3684
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRRMJASt7ImBk"'><id>https://docs.google.com/feeds/id/file%3A0BzY2jgHHwMwYXzFVWlJ4MXMyRE0</id><published>2013-08-01T07:34:47.419Z</published><updated>2013-08-01T07:34:47.419Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:34:47.419Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#file' label='application/vnd.oasis.opendocument.text'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Untitled</title><content type='application/vnd.oasis.opendocument.text' src='https://doc-14-4o-docs.googleusercontent.com/docs/securesc/p3gkcpm4vekih3vn1285g2jn1spuiriq/rd5tjnth56o158hnjorg1fipv0n5rlus/1375336800000/04693666875216770588/04693666875216770588/0BzY2jgHHwMwYXzFVWlJ4MXMyRE0?h=16653014193614665626&e=download&gd=true'/><link rel='http://schemas.google.com/docs/2007#parent' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM' title='Temporary Folder for Uploading Documents'/><link rel='alternate' type='text/html' href='https://docs.google.com/file/d/0BzY2jgHHwMwYXzFVWlJ4MXMyRE0/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/file%3A0BzY2jgHHwMwYXzFVWlJ4MXMyRE0'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/file%3A0BzY2jgHHwMwYXzFVWlJ4MXMyRE0'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM/contents/file%3A0BzY2jgHHwMwYXzFVWlJ4MXMyRE0'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM/contents/file%3A0BzY2jgHHwMwYXzFVWlJ4MXMyRE0'/><link rel='edit-media' type='application/vnd.oasis.opendocument.text' href='https://docs.google.com/feeds/default/contentmedia/folder%3A0BzY2jgHHwMwYYk9PVDB5Q0FaanM/file%3A0BzY2jgHHwMwYXzFVWlJ4MXMyRE0'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>file:0BzY2jgHHwMwYXzFVWlJ4MXMyRE0</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:34:47.412Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>8033</gd:quotaBytesUsed><docs:writersCanInvite value='true'/><docs:md5Checksum>95439a6d6456a79d43980c05c9f25c7d</docs:md5Checksum><docs:filename>Untitled</docs:filename><docs:suggestedFilename>Untitled</docs:suggestedFilename><docs:size>8033</docs:size><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYXzFVWlJ4MXMyRE0/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYXzFVWlJ4MXMyRE0/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/default/private/full HTTP/1.1
+> Soup-Debug-Timestamp: 1375342535
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 49 (0x8620a0), SoupSocket 15 (0x7dbdf0)
+> Host: docs.google.com
+> Slug: test.odt
+> Transfer-Encoding: chunked
+> Content-Type: application/vnd.oasis.opendocument.text
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375342536
+< Soup-Debug: SoupMessage 49 (0x8620a0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:35:36 GMT
+< Date: Thu, 01 Aug 2013 07:35:36 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRhJdEit7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/document%3A1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI
+< Content-Location: https://docs.google.com/feeds/default/private/full/document%3A1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRhJdEit7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI</id><published>2013-08-01T07:35:35.427Z</published><updated>2013-08-01T07:35:35.427Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:35:35.822Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>test</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:35:35.427Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T07:35:35.756Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='true'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1VXbxj2XJQxW1MdsIWUEKZld3hlGAhYw8Ctvei8H9VkI/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full?convert=false HTTP/1.1
+> Soup-Debug-Timestamp: 1375342528
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 45 (0x862730), SoupSocket 14 (0x7dbbb0)
+> Host: docs.google.com
+> Slug: sample.ogg
+> X-Upload-Content-Type: video/x-theora+ogg
+> X-Upload-Content-Length: 96839
+> Content-Length: 0
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342528
+< Soup-Debug: SoupMessage 45 (0x862730)
+< Location: https://docs.google.com/feeds/upload/create-session/default/private/full?convert=false&upload_id=AEnB2UqnSmQ_w5-dh2dUYFq-O0vBOAnOJrrjZGCk6wCklX-WzuM16QK2NO4B02w0VPSm5rU9yTV4gqDEVVibRlbZ1aXOFD3PrA
+< Date: Thu, 01 Aug 2013 07:35:28 GMT
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+< Content-Length: 0
+< Content-Type: text/html; charset=UTF-8
+<
+
+> PUT /feeds/upload/create-session/default/private/full?convert=false&upload_id=AEnB2UqnSmQ_w5-dh2dUYFq-O0vBOAnOJrrjZGCk6wCklX-WzuM16QK2NO4B02w0VPSm5rU9yTV4gqDEVVibRlbZ1aXOFD3PrA HTTP/1.1
+> Soup-Debug-Timestamp: 1375342528
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 46 (0x862460), SoupSocket 14 (0x7dbbb0)
+> Host: docs.google.com
+> Content-Type: video/x-theora+ogg
+> Content-Length: 96839
+> Content-Range: bytes 0-96838/96839
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375342529
+< Soup-Debug: SoupMessage 46 (0x862460)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:35:29 GMT
+< Date: Thu, 01 Aug 2013 07:35:29 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRhdZAit7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYbURuTE5pQUxhZFU
+< Content-Location: https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYbURuTE5pQUxhZFU
+< Content-Length: 3470
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRhdZAit7ImBk"'><id>https://docs.google.com/feeds/id/file%3A0BzY2jgHHwMwYbURuTE5pQUxhZFU</id><published>2013-08-01T07:35:29.214Z</published><updated>2013-08-01T07:35:29.214Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:35:29.214Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#file' label='video/x-theora+ogg'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Untitled</title><content type='video/x-theora+ogg' src='https://doc-0c-4o-docs.googleusercontent.com/docs/securesc/p3gkcpm4vekih3vn1285g2jn1spuiriq/m2pn536sjv5k61r68b9tbu602pd9t1hg/1375336800000/04693666875216770588/04693666875216770588/0BzY2jgHHwMwYbURuTE5pQUxhZFU?h=16653014193614665626&e=download&gd=true'/><link rel='alternate' type='text/html' href='https://docs.google.com/file/d/0BzY2jgHHwMwYbURuTE5pQUxhZFU/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://video.google.com/get_player?ps=docs&partnerid=30&docid=0BzY2jgHHwMwYbURuTE5pQUxhZFU&BASE_URL=https://docs.google.com/'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_video_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/file%3A0BzY2jgHHwMwYbURuTE5pQUxhZFU'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/file%3A0BzY2jgHHwMwYbURuTE5pQUxhZFU'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYbURuTE5pQUxhZFU'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYbURuTE5pQUxhZFU'/><link rel='edit-media' type='video/x-theora+ogg' href='https://docs.google.com/feeds/default/media/file%3A0BzY2jgHHwMwYbURuTE5pQUxhZFU'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>file:0BzY2jgHHwMwYbURuTE5pQUxhZFU</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:35:29.209Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>96839</gd:quotaBytesUsed><docs:writersCanInvite value='true'/><docs:md5Checksum>75ad4a55b679b86502ccc0ecd1731622</docs:md5Checksum><docs:filename>Untitled</docs:filename><docs:suggestedFilename>Untitled</docs:suggestedFilename><docs:size>96839</docs:size><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYbURuTE5pQUxhZFU/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYbURuTE5pQUxhZFU/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375342512
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 37 (0x8620a0), SoupSocket 12 (0x7dbaf0)
+> Host: docs.google.com
+> Slug: test.odt
+> X-Upload-Content-Type: application/vnd.oasis.opendocument.text
+> X-Upload-Content-Length: 8033
+> Content-Length: 0
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342512
+< Soup-Debug: SoupMessage 37 (0x8620a0)
+< Location: https://docs.google.com/feeds/upload/create-session/default/private/full?convert=true&upload_id=AEnB2Up2xHQUBsF7qbkI_oEqTYY3kUMx_8I8_r6h_o9Y0I9vG70149rJikLbmNvjvNvMV7HDBRSH_rEgi0626anCnHkpkfRLDA
+< Date: Thu, 01 Aug 2013 07:35:12 GMT
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+< Content-Length: 0
+< Content-Type: text/html; charset=UTF-8
+<
+
+> PUT /feeds/upload/create-session/default/private/full?convert=true&upload_id=AEnB2Up2xHQUBsF7qbkI_oEqTYY3kUMx_8I8_r6h_o9Y0I9vG70149rJikLbmNvjvNvMV7HDBRSH_rEgi0626anCnHkpkfRLDA HTTP/1.1
+> Soup-Debug-Timestamp: 1375342512
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 38 (0x7fffe40050c0), SoupSocket 12 (0x7dbaf0)
+> Host: docs.google.com
+> Content-Type: application/vnd.oasis.opendocument.text
+> Content-Length: 8033
+> Content-Range: bytes 0-8032/8033
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375342514
+< Soup-Debug: SoupMessage 38 (0x7fffe40050c0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:35:14 GMT
+< Date: Thu, 01 Aug 2013 07:35:14 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRkpfTit7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/document%3A1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200
+< Content-Location: https://docs.google.com/feeds/default/private/full/document%3A1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200
+< Content-Length: 3437
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRkpfTit7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200</id><published>2013-08-01T07:35:13.238Z</published><updated>2013-08-01T07:35:13.238Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:35:13.713Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Untitled</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:35:13.238Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T07:35:13.678Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='true'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1dRj6xmuNjHpvrfmyv3Sb8MGIb88Ga9xt6gS3wXBe200/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full?convert=false HTTP/1.1
+> Soup-Debug-Timestamp: 1375342520
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 41 (0x862460), SoupSocket 13 (0x7dbdf0)
+> Host: docs.google.com
+> Slug: test.odt
+> X-Upload-Content-Type: application/vnd.oasis.opendocument.text
+> X-Upload-Content-Length: 8033
+> Content-Length: 0
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375342520
+< Soup-Debug: SoupMessage 41 (0x862460)
+< Location: https://docs.google.com/feeds/upload/create-session/default/private/full?convert=false&upload_id=AEnB2Up5qFRKNrAZ31lEzbUr55Pa3rhZRvOZxukTr-lHgdWABvRFL5y19-24ToGaO-JwT53OnDdWMjTBfcQwfEBFJnURc0yE1w
+< Date: Thu, 01 Aug 2013 07:35:20 GMT
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+< Content-Length: 0
+< Content-Type: text/html; charset=UTF-8
+<
+
+> PUT /feeds/upload/create-session/default/private/full?convert=false&upload_id=AEnB2Up5qFRKNrAZ31lEzbUr55Pa3rhZRvOZxukTr-lHgdWABvRFL5y19-24ToGaO-JwT53OnDdWMjTBfcQwfEBFJnURc0yE1w HTTP/1.1
+> Soup-Debug-Timestamp: 1375342520
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 42 (0x8620a0), SoupSocket 13 (0x7dbdf0)
+> Host: docs.google.com
+> Content-Type: application/vnd.oasis.opendocument.text
+> Content-Length: 8033
+> Content-Range: bytes 0-8032/8033
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375342521
+< Soup-Debug: SoupMessage 42 (0x8620a0)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:35:21 GMT
+< Date: Thu, 01 Aug 2013 07:35:21 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRhlbDyt7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYbDl1RWVfTjRNUkE
+< Content-Location: https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYbDl1RWVfTjRNUkE
+< Content-Length: 3316
+< Server: HTTP Upload Server Built on Jul 24 2013 17:20:01 (1374711601)
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRhlbDyt7ImBk"'><id>https://docs.google.com/feeds/id/file%3A0BzY2jgHHwMwYbDl1RWVfTjRNUkE</id><published>2013-08-01T07:35:21.369Z</published><updated>2013-08-01T07:35:21.369Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:35:21.369Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#file' label='application/vnd.oasis.opendocument.text'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Untitled</title><content type='application/vnd.oasis.opendocument.text' src='https://doc-04-4o-docs.googleusercontent.com/docs/securesc/p3gkcpm4vekih3vn1285g2jn1spuiriq/cr4l1j8vdvtnbifmfbm2fdb611jqo0c5/1375336800000/04693666875216770588/04693666875216770588/0BzY2jgHHwMwYbDl1RWVfTjRNUkE?h=16653014193614665626&e=download&gd=true'/><link rel='alternate' type='text/html' href='https://docs.google.com/file/d/0BzY2jgHHwMwYbDl1RWVfTjRNUkE/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/file%3A0BzY2jgHHwMwYbDl1RWVfTjRNUkE'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/file%3A0BzY2jgHHwMwYbDl1RWVfTjRNUkE'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYbDl1RWVfTjRNUkE'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYbDl1RWVfTjRNUkE'/><link rel='edit-media' type='application/vnd.oasis.opendocument.text' href='https://docs.google.com/feeds/default/media/file%3A0BzY2jgHHwMwYbDl1RWVfTjRNUkE'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>file:0BzY2jgHHwMwYbDl1RWVfTjRNUkE</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:35:21.359Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:quotaBytesUsed>8033</gd:quotaBytesUsed><docs:writersCanInvite value='true'/><docs:md5Checksum>95439a6d6456a79d43980c05c9f25c7d</docs:md5Checksum><docs:filename>Untitled</docs:filename><docs:suggestedFilename>Untitled</docs:suggestedFilename><docs:size>8033</docs:size><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYbDl1RWVfTjRNUkE/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/file%3A0BzY2jgHHwMwYbDl1RWVfTjRNUkE/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYLXAwdC1WcTNqajA/contents?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375342460
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 2 (0x862280), SoupSocket 2 (0x7dbbb0)
+> Host: docs.google.com
+> X-Upload-Content-Length: 0
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>Test Upload file (/documents/upload/metadata-only/in-folder/non-resumable/odt-convert)</title><category term='http://schemas.google.com/docs/2007#document' scheme='http://schemas.google.com/g/2005#kind'/><docs:writersCanInvite value='false'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375342462
+< Soup-Debug: SoupMessage 2 (0x862280)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:34:21 GMT
+< Date: Thu, 01 Aug 2013 07:34:21 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRU5YESt7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYLXAwdC1WcTNqajA/contents/document%3A18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc
+< Content-Location: https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYLXAwdC1WcTNqajA/contents/document%3A18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRU5YESt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc</id><published>2013-08-01T07:34:20.957Z</published><updated>2013-08-01T07:34:21.711Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:34:21.771Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Upload file (/documents/upload/metadata-only/in-folder/non-resumable/odt-convert)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc'/><link rel='http://schemas.google.com/docs/2007#parent' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYLXAwdC1WcTNqajA' title='Temporary Folder for Uploading Documents'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYLXAwdC1WcTNqajA/contents/document%3A18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYLXAwdC1WcTNqajA/contents/document%3A18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/contentmedia/folder%3A0BzY2jgHHwMwYLXAwdC1WcTNqajA/document%3A18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:34:21.711Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T07:34:21.242Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A18Wsaj6tclw6Y85s4cmfJCx9jBd9Ov0tReiVUs_V_Odc/revisions'/></entry>
+
--- /dev/null
+> POST /feeds/upload/create-session/default/private/full?convert=true HTTP/1.1
+> Soup-Debug-Timestamp: 1375342468
+> Soup-Debug: SoupSession 1 (0x65a2e0), SoupMessage 7 (0x862460), SoupSocket 3 (0x7dbc70)
+> Host: docs.google.com
+> X-Upload-Content-Length: 0
+> Authorization: GoogleLogin auth=DQAAANAAAADhGYUNttFD0Fwaup933dQXvgNOt92KYZlZ3DBRyP1ESbjPFjjpyPby7dKkYQ9-hWy9XFqfyzTN9iRTUQ9LmgxyXXOhR56QLpveZ9NRUK57V0-AGl33barp2sndESkOldb7XsP1okN12iwn1n_Qy5RsPtAxBRNRJ_P8Fm53wo4FMl4bDxR7VHF_aQviFKp0iNrFDT1AnQCk_QMGtknBz7taDdZBL60yvIHLgs8DqB00BK2fYtq8CPluPsXLRmXbL8NpU4HKfWT0oPkWt7J3h3Ry
+> GData-Version: 3
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>Test Upload file (/documents/upload/metadata-only/root-folder/non-resumable/odt-convert)</title><category term='http://schemas.google.com/docs/2007#document' scheme='http://schemas.google.com/g/2005#kind'/><docs:writersCanInvite value='false'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375342470
+< Soup-Debug: SoupMessage 7 (0x862460)
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Expires: Thu, 01 Aug 2013 07:34:30 GMT
+< Date: Thu, 01 Aug 2013 07:34:30 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 3.0
+< ETag: "A1INRURQAyt7ImBk"
+< Location: https://docs.google.com/feeds/default/private/full/document%3A1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY
+< Content-Location: https://docs.google.com/feeds/default/private/full/document%3A1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"A1INRURQAyt7ImBk"'><id>https://docs.google.com/feeds/id/document%3A1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY</id><published>2013-08-01T07:34:28.980Z</published><updated>2013-08-01T07:34:29.808Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-08-01T07:34:29.849Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/docs/2007#document' label='document'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#viewed' label='viewed'/><category scheme='http://schemas.google.com/g/2005/labels' term='http://schemas.google.com/g/2005/labels#modified-by-me' label='modified-by-me'/><title>Test Upload file (/documents/upload/metadata-only/root-folder/non-resumable/odt-convert)</title><content type='text/html' src='https://docs.google.com/feeds/download/documents/export/Export?id=1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY'/><link rel='alternate' type='text/html' href='https://docs.google.com/document/d/1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY/edit?usp=docslist_api'/><link rel='http://schemas.google.com/docs/2007#embed' type='text/html' href='https://docs.google.com/document/d/1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY/preview'/><link rel='http://schemas.google.com/docs/2007#icon' type='image/png' href='https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png'/><link rel='http://schemas.google.com/g/2005#resumable-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/create-session/default/private/full/document%3A1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY'/><link rel='http://schemas.google.com/docs/2007#alt-edit-media' type='application/atom+xml' href='https://docs.google.com/feeds/upload/file/default/private/full/document%3A1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY'/><link rel='self' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY'/><link rel='edit' type='application/atom+xml' href='https://docs.google.com/feeds/default/private/full/document%3A1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY'/><link rel='edit-media' type='text/html' href='https://docs.google.com/feeds/default/media/document%3A1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY'/><author><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></author><gd:resourceId>document:1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY</gd:resourceId><docs:isShareable value='true'/><docs:isShareableByMe value='true'/><docs:modifiedByMeDate>2013-08-01T07:34:29.808Z</docs:modifiedByMeDate><gd:lastModifiedBy><name>libgdata.documents</name><email>libgdata.documents@gmail.com</email></gd:lastModifiedBy><gd:lastViewed>2013-08-01T07:34:29.262Z</gd:lastViewed><gd:quotaBytesUsed>0</gd:quotaBytesUsed><docs:writersCanInvite value='false'/><gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList' href='https://docs.google.com/feeds/default/private/full/document%3A1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY/acl'/><gd:feedLink rel='http://schemas.google.com/docs/2007/revisions' href='https://docs.google.com/feeds/default/private/full/document%3A1Ihy0mrBFy3IvXDQPE1IlASJwkqNQ7vphgQRvFMJ8xtY/revisions'/></entry>
+
--- /dev/null
+> POST /accounts/OAuthGetRequestToken HTTP/1.1
+> Soup-Debug-Timestamp: 1375114467
+> Soup-Debug: SoupSession 1 (0x6502c0), SoupMessage 1 (0x9750e0), SoupSocket 1 (0x9933b0)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Authorization: OAuth oauth_consumer_key="anonymous",oauth_signature_method="HMAC-SHA1",oauth_signature="N7FRU%2BJKa4kkjlUpzlGAHSxPUqg%3D",oauth_timestamp="1375114466",oauth_nonce="JKLrpVu2KW9WiZwsbko1MHtRh",oauth_version="1.0"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> xoauth%5Fdisplayname=Application+name&scope=https%3A%2F%2Fwww%2Egoogle%2Ecom%2Fm8%2Ffeeds%2F&oauth%5Fcallback=oob
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375114467
+< Soup-Debug: SoupMessage 1 (0x9750e0)
+< Content-Type: text/plain; charset=UTF-8
+< Date: Mon, 29 Jul 2013 16:14:27 GMT
+< Expires: Mon, 29 Jul 2013 16:14:27 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 118
+< Server: GSE
+<
+< oauth_token=4%2FcPV6prKvQtxeeXkhgI1iJ6nLQbCX&oauth_token_secret=BdUGkbnkl6_UTaa0I2049cxp&oauth_callback_confirmed=true
+
--- /dev/null
+> POST /accounts/OAuthGetRequestToken HTTP/1.1
+> Soup-Debug-Timestamp: 1375114409
+> Soup-Debug: SoupSession 1 (0x650700), SoupMessage 1 (0x7fffe0012c60), SoupSocket 1 (0x7fffe0026d30)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Authorization: OAuth oauth_consumer_key="anonymous",oauth_signature_method="HMAC-SHA1",oauth_signature="EKMKB4gUkr5rUEeps37CrSS7iWI%3D",oauth_timestamp="1375114409",oauth_nonce="IFERKYPbzEzuA3QE_Zgw1moU1ZR",oauth_version="1.0"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> xoauth%5Fdisplayname=Application+name&scope=https%3A%2F%2Fwww%2Egoogle%2Ecom%2Fm8%2Ffeeds%2F+http%3A%2F%2Fpicasaweb%2Egoogle%2Ecom%2Fdata%2F&oauth%5Fcallback=oob
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375114409
+< Soup-Debug: SoupMessage 1 (0x7fffe0012c60)
+< Content-Type: text/plain; charset=UTF-8
+< Date: Mon, 29 Jul 2013 16:13:29 GMT
+< Expires: Mon, 29 Jul 2013 16:13:29 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 118
+< Server: GSE
+<
+< oauth_token=4%2FRzdH5fU5KLdaoDTqznYQlkMez4Wj&oauth_token_secret=GYkwQ3BIHviff69Y9Zld6g2u&oauth_callback_confirmed=true
+
--- /dev/null
+> POST /accounts/OAuthGetRequestToken HTTP/1.1
+> Soup-Debug-Timestamp: 1375114409
+> Soup-Debug: SoupSession 1 (0x6505f0), SoupMessage 1 (0x975590), SoupSocket 1 (0x993530)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Authorization: OAuth oauth_consumer_key="anonymous",oauth_signature_method="HMAC-SHA1",oauth_signature="tfOHmtfJ3fBhyQK9pvma4kx6OlM%3D",oauth_timestamp="1375114409",oauth_nonce="X4sZD_njIKcgSr6paHPVByY8LOjFA",oauth_version="1.0"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> xoauth%5Fdisplayname=Application+name&scope=https%3A%2F%2Fwww%2Egoogle%2Ecom%2Fm8%2Ffeeds%2F&oauth%5Fcallback=oob
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375114409
+< Soup-Debug: SoupMessage 1 (0x975590)
+< Content-Type: text/plain; charset=UTF-8
+< Date: Mon, 29 Jul 2013 16:13:29 GMT
+< Expires: Mon, 29 Jul 2013 16:13:29 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 118
+< Server: GSE
+<
+< oauth_token=4%2F12bPxj_QaPxom9ALAmIMn5-ZU3wR&oauth_token_secret=Kiuy8Zz-8SzZJ8jQU_83nk9w&oauth_callback_confirmed=true
+
--- /dev/null
+> POST /accounts/OAuthGetAccessToken HTTP/1.1
+> Soup-Debug-Timestamp: 1375114434
+> Soup-Debug: SoupSession 1 (0x6503d0), SoupMessage 2 (0x7fffe0012e40), SoupSocket 2 (0x7fffe0026df0)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Authorization: OAuth oauth_consumer_key="anonymous",oauth_token="4%2FfV2Y0aq-WjEgiSDxvVQdNqQZvX8l",oauth_signature_method="HMAC-SHA1",oauth_signature="8Px9eqo%2BkXJdZg5ufcmTGXNGHGw%3D",oauth_timestamp="1375114434",oauth_nonce="_bRhTyvvq372wr_XjB4WPWl0qt2Uq",oauth_version="1.0"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> oauth%5Fverifier=ks5YXkMmIT1KT4%2DG1IdRW8zH
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375114434
+< Soup-Debug: SoupMessage 2 (0x7fffe0012e40)
+< Content-Type: text/plain; charset=UTF-8
+< Date: Mon, 29 Jul 2013 16:13:54 GMT
+< Expires: Mon, 29 Jul 2013 16:13:54 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 103
+< Server: GSE
+<
+< oauth_token=1%2FvMhevC5FJZeYIy87nMSvAaIoxJRDfq9MRuuYL_ASuIc&oauth_token_secret=ALKifRvO9cC4rQL43CygXqcE
+
--- /dev/null
+> POST /accounts/OAuthGetAccessToken HTTP/1.1
+> Soup-Debug-Timestamp: 1375114467
+> Soup-Debug: SoupSession 1 (0x6502c0), SoupMessage 2 (0x7fffe40108c0), SoupSocket 2 (0x7fffe0026eb0)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Authorization: OAuth oauth_consumer_key="anonymous",oauth_token="4%2FcPV6prKvQtxeeXkhgI1iJ6nLQbCX",oauth_signature_method="HMAC-SHA1",oauth_signature="rtly12Qq%2FK30HSglMmLqwZVCpMM%3D",oauth_timestamp="1375114467",oauth_nonce="qBZpBSAZauOCA8vEqy5zOQBZcAS",oauth_version="1.0"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> oauth%5Fverifier=test
+
+< HTTP/1.1 400 Bad Request
+< Soup-Debug-Timestamp: 1375114475
+< Soup-Debug: SoupMessage 2 (0x7fffe40108c0)
+< Content-Type: text/plain; charset=UTF-8
+< Date: Mon, 29 Jul 2013 16:14:35 GMT
+< Expires: Mon, 29 Jul 2013 16:14:35 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 23
+< Server: GSE
+<
+< The token is invalid.
+<
+
--- /dev/null
+> POST /accounts/OAuthGetAccessToken HTTP/1.1
+> Soup-Debug-Timestamp: 1375114421
+> Soup-Debug: SoupSession 1 (0x6504e0), SoupMessage 2 (0x9753b0), SoupSocket 2 (0x993470)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Authorization: OAuth oauth_consumer_key="anonymous",oauth_token="4%2FT27iiKNpM8PHQ2ztKzZBywZ2uKnO",oauth_signature_method="HMAC-SHA1",oauth_signature="gZChlEpXlBLy8bYjktVEfRh4XhA%3D",oauth_timestamp="1375114421",oauth_nonce="W8iIqbvygOUYCkuQdp",oauth_version="1.0"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> oauth%5Fverifier=7MQzdhPyajVrbVUBnaQRgj73
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375114422
+< Soup-Debug: SoupMessage 2 (0x9753b0)
+< Content-Type: text/plain; charset=UTF-8
+< Date: Mon, 29 Jul 2013 16:13:41 GMT
+< Expires: Mon, 29 Jul 2013 16:13:41 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 103
+< Server: GSE
+<
+< oauth_token=1%2FkJjrwN7c2Vzx387AQP2jL3BYQHXssRU0w3XeZq4H2Mw&oauth_token_secret=98SsHIgW-Sn8Ix0Klk3wv4oy
+
--- /dev/null
+> POST /accounts/OAuthGetAccessToken HTTP/1.1
+> Soup-Debug-Timestamp: 1375114446
+> Soup-Debug: SoupSession 1 (0x6501b0), SoupMessage 2 (0x9751d0), SoupSocket 2 (0x993230)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Authorization: OAuth oauth_consumer_key="anonymous",oauth_token="4%2FlydzQSwq7wb73eJbj197qsgNP5Kr",oauth_signature_method="HMAC-SHA1",oauth_signature="hQRNpZi3kAzkGA1sa84EjobE%2BsU%3D",oauth_timestamp="1375114446",oauth_nonce="mqbX8TahJGtxkoP3oX_73qzA",oauth_version="1.0"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> oauth%5Fverifier=test
+
+< HTTP/1.1 400 Bad Request
+< Soup-Debug-Timestamp: 1375114453
+< Soup-Debug: SoupMessage 2 (0x9751d0)
+< Content-Type: text/plain; charset=UTF-8
+< Date: Mon, 29 Jul 2013 16:14:13 GMT
+< Expires: Mon, 29 Jul 2013 16:14:13 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 23
+< Server: GSE
+<
+< The token is invalid.
+<
+
--- /dev/null
+> POST /accounts/OAuthGetRequestToken HTTP/1.1
+> Soup-Debug-Timestamp: 1375114396
+> Soup-Debug: SoupSession 1 (0x6501b0), SoupMessage 1 (0x975590), SoupSocket 1 (0x993230)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Authorization: OAuth oauth_consumer_key="anonymous",oauth_signature_method="HMAC-SHA1",oauth_signature="VfeOs%2BWTIJRUkCErU1zxKqH38oQ%3D",oauth_timestamp="1375114396",oauth_nonce="9VmUWSVrJu_zhF2cwFRdWrZFl8WUGy",oauth_version="1.0"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> xoauth%5Fdisplayname=Application+name&scope=https%3A%2F%2Fwww%2Egoogle%2Ecom%2Fm8%2Ffeeds%2F&oauth%5Fcallback=oob
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375114396
+< Soup-Debug: SoupMessage 1 (0x975590)
+< Content-Type: text/plain; charset=UTF-8
+< Date: Mon, 29 Jul 2013 16:13:16 GMT
+< Expires: Mon, 29 Jul 2013 16:13:16 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 118
+< Server: GSE
+<
+< oauth_token=4%2F-hFowsVMagtdWjX8hTFUGw0de9nL&oauth_token_secret=kuu2KlszmJhimCI8C7uNbV6z&oauth_callback_confirmed=true
+
+> POST /accounts/OAuthGetAccessToken HTTP/1.1
+> Soup-Debug-Timestamp: 1375114407
+> Soup-Debug: SoupSession 1 (0x6501b0), SoupMessage 2 (0x9752c0), SoupSocket 2 (0x9932f0)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Authorization: OAuth oauth_consumer_key="anonymous",oauth_token="4%2F-hFowsVMagtdWjX8hTFUGw0de9nL",oauth_signature_method="HMAC-SHA1",oauth_signature="lWSS%2BTKHABoDsZuVU6LFxVgBrsM%3D",oauth_timestamp="1375114407",oauth_nonce="P1LCHSMETyO0IpQnTCVc",oauth_version="1.0"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> oauth%5Fverifier=qT64ktZBdmUVwpRClZmO6s7j
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375114408
+< Soup-Debug: SoupMessage 2 (0x9752c0)
+< Content-Type: text/plain; charset=UTF-8
+< Date: Mon, 29 Jul 2013 16:13:28 GMT
+< Expires: Mon, 29 Jul 2013 16:13:28 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 103
+< Server: GSE
+<
+< oauth_token=1%2F17nuamcqEOCaMMCg9Oc9ekcfGEzkepP5_5ANtDkuwks&oauth_token_secret=wUozdZTGrBPaGKTEB9lfK61J
+
--- /dev/null
+> POST /accounts/OAuthGetRequestToken HTTP/1.1
+> Soup-Debug-Timestamp: 1375114454
+> Soup-Debug: SoupSession 1 (0x6501b0), SoupMessage 1 (0x9750e0), SoupSocket 1 (0x993230)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Authorization: OAuth oauth_consumer_key="anonymous",oauth_signature_method="HMAC-SHA1",oauth_signature="c%2FBP0C511rwGZYAGnXlXTzh5uno%3D",oauth_timestamp="1375114453",oauth_nonce="ppVVbibizHKVmJHDNHHjdc",oauth_version="1.0"
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> xoauth%5Fdisplayname=Application+name&scope=https%3A%2F%2Fwww%2Egoogle%2Ecom%2Fm8%2Ffeeds%2F&oauth%5Fcallback=oob
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375114454
+< Soup-Debug: SoupMessage 1 (0x9750e0)
+< Content-Type: text/plain; charset=UTF-8
+< Date: Mon, 29 Jul 2013 16:14:14 GMT
+< Expires: Mon, 29 Jul 2013 16:14:14 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 118
+< Server: GSE
+<
+< oauth_token=4%2F-OewZRiOoq_qWvwTpTMIsvNEqMaU&oauth_token_secret=NF1c22V04ZV6SLLLnCG4w7Ue&oauth_callback_confirmed=true
+
--- /dev/null
+> POST /o/oauth2/token HTTP/1.1
+> Soup-Debug-Timestamp: 1411296439
+> Soup-Debug: SoupSession 1 (0x1888240), SoupMessage 2 (0x1ace9b0), SoupSocket 2 (0x1a43330)
+> Host: accounts.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.16.1 - gzip
+> Connection: Keep-Alive
+>
+> client_id=352818697630-nqu2cmt5quqd6lr17ouoqmb684u84l1f.apps.googleusercontent.com&client_secret=-fA4pHQJxR3zJ-FyAMPQsikg&refresh_token=1%2FmIo8e1bmcRxrXd2gKfhtabh3Vvtjfc3GGJT5ODsf_t0&grant_type=refresh_token
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1411296439
+< Soup-Debug: SoupMessage 2 (0x1ace9b0)
+< Content-Type: application/json; charset=utf-8
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 21 Sep 2014 10:47:19 GMT
+< Content-Disposition: attachment; filename="json.txt"; filename*=UTF-8''json.txt
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=0.002
+< Transfer-Encoding: chunked
+<
+< {
+< "access_token" : "ya29.hwDtghueiadzgPMb3otq_QAWMXEVup-cyRwyiP0GQGH3iqMMtfvQMngM",
+< "token_type" : "Bearer",
+< "expires_in" : 3600
+< }
+
--- /dev/null
+> POST /o/oauth2/token HTTP/1.1
+> Soup-Debug-Timestamp: 1411296457
+> Soup-Debug: SoupSession 1 (0x1888110), SoupMessage 1 (0x1acee60), SoupSocket 1 (0x1a43670)
+> Host: accounts.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.16.1 - gzip
+> Connection: Keep-Alive
+>
+> client_id=352818697630-nqu2cmt5quqd6lr17ouoqmb684u84l1f.apps.googleusercontent.com&client_secret=-fA4pHQJxR3zJ-FyAMPQsikg&code=4%2FGfha9-4IeN09ibTR2Sa2MtQrG9qz.ks8v0zlKR9ceoiIBeO6P2m92f6kvkQI&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&grant_type=authorization_code
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1411296458
+< Soup-Debug: SoupMessage 1 (0x1acee60)
+< Content-Type: application/json; charset=utf-8
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 21 Sep 2014 10:47:38 GMT
+< Content-Disposition: attachment; filename="json.txt"; filename*=UTF-8''json.txt
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=0.002
+< Transfer-Encoding: chunked
+<
+< {
+< "access_token" : "ya29.hwBrSw9uZJ2M5qgjnwL-CsEHamHerCaKd8mizXE-Tiqp1XIpDcQoaOdw",
+< "token_type" : "Bearer",
+< "expires_in" : 3600,
+< "refresh_token" : "1/B7Axq79ZCmbj81AL3hByjHm1fWF6BbVLrt7PVtLs7Ao"
+< }
+
--- /dev/null
+> POST /o/oauth2/token HTTP/1.1
+> Soup-Debug-Timestamp: 1411296470
+> Soup-Debug: SoupSession 1 (0x18885d0), SoupMessage 1 (0x1acef50), SoupSocket 1 (0x1a43400)
+> Host: accounts.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.16.1 - gzip
+> Connection: Keep-Alive
+>
+> client_id=352818697630-nqu2cmt5quqd6lr17ouoqmb684u84l1f.apps.googleusercontent.com&client_secret=-fA4pHQJxR3zJ-FyAMPQsikg&code=test&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&grant_type=authorization_code
+
+< HTTP/1.1 400 Bad Request
+< Soup-Debug-Timestamp: 1411296470
+< Soup-Debug: SoupMessage 1 (0x1acef50)
+< Content-Type: application/json
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 21 Sep 2014 10:47:50 GMT
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=0.002
+< Transfer-Encoding: chunked
+<
+< {
+< "error" : "invalid_grant"
+< }
+
--- /dev/null
+> POST /o/oauth2/token HTTP/1.1
+> Soup-Debug-Timestamp: 1411296451
+> Soup-Debug: SoupSession 1 (0x1888110), SoupMessage 1 (0x1aced70), SoupSocket 1 (0x1a434d0)
+> Host: accounts.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.16.1 - gzip
+> Connection: Keep-Alive
+>
+> client_id=352818697630-nqu2cmt5quqd6lr17ouoqmb684u84l1f.apps.googleusercontent.com&client_secret=-fA4pHQJxR3zJ-FyAMPQsikg&code=4%2FP-pwMETnCh47w20wexdnflDFhXum.4qZ2A1pkUGsSoiIBeO6P2m8OUKkvkQI&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&grant_type=authorization_code
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1411296452
+< Soup-Debug: SoupMessage 1 (0x1aced70)
+< Content-Type: application/json; charset=utf-8
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 21 Sep 2014 10:47:32 GMT
+< Content-Disposition: attachment; filename="json.txt"; filename*=UTF-8''json.txt
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=0.002
+< Transfer-Encoding: chunked
+<
+< {
+< "access_token" : "ya29.hwAp50GMEAP0LIK6U9l0GzA3lrOrvpAJvhrHxqvjsorPkgEYPoxPvXfS",
+< "token_type" : "Bearer",
+< "expires_in" : 3600,
+< "refresh_token" : "1/nLWzECbPThSlbaxu6gzVK4uAUMlA_mxBPxLSTd8ebmQ"
+< }
+
--- /dev/null
+> POST /o/oauth2/token HTTP/1.1
+> Soup-Debug-Timestamp: 1411296464
+> Soup-Debug: SoupSession 1 (0x1888370), SoupMessage 1 (0x1aceb90), SoupSocket 1 (0x1a43670)
+> Host: accounts.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.16.1 - gzip
+> Connection: Keep-Alive
+>
+> client_id=352818697630-nqu2cmt5quqd6lr17ouoqmb684u84l1f.apps.googleusercontent.com&client_secret=-fA4pHQJxR3zJ-FyAMPQsikg&code=test&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&grant_type=authorization_code
+
+< HTTP/1.1 400 Bad Request
+< Soup-Debug-Timestamp: 1411296464
+< Soup-Debug: SoupMessage 1 (0x1aceb90)
+< Content-Type: application/json
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 21 Sep 2014 10:47:44 GMT
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=0.002
+< Transfer-Encoding: chunked
+<
+< {
+< "error" : "invalid_grant"
+< }
+
--- /dev/null
+> POST /o/oauth2/token HTTP/1.1
+> Soup-Debug-Timestamp: 1411296445
+> Soup-Debug: SoupSession 1 (0x18885d0), SoupMessage 1 (0x1acec80), SoupSocket 1 (0x1a435a0)
+> Host: accounts.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.16.1 - gzip
+> Connection: Keep-Alive
+>
+> client_id=352818697630-nqu2cmt5quqd6lr17ouoqmb684u84l1f.apps.googleusercontent.com&client_secret=-fA4pHQJxR3zJ-FyAMPQsikg&code=4%2FGeYb_3HkYh4vyephp-lbvzQs1GAb.YtXAxmx-uJ0eoiIBeO6P2m9iH6kvkQI&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&grant_type=authorization_code
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1411296445
+< Soup-Debug: SoupMessage 1 (0x1acec80)
+< Content-Type: application/json; charset=utf-8
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 21 Sep 2014 10:47:25 GMT
+< Content-Disposition: attachment; filename="json.txt"; filename*=UTF-8''json.txt
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=0.002
+< Transfer-Encoding: chunked
+<
+< {
+< "access_token" : "ya29.hwD5UZjOzOcQICGvnrEyGPHJ9MLwiOaooem0Bo_bDtrdWiRmFKpKvqrl",
+< "token_type" : "Bearer",
+< "expires_in" : 3600,
+< "refresh_token" : "1/dOhnaCJ3B7eX23hOBDbzw0jPEptU4HdoE3LSES7B1nI"
+< }
+
--- /dev/null
+> POST /o/oauth2/token HTTP/1.1
+> Soup-Debug-Timestamp: 1488736754
+> Soup-Debug: SoupSession 1 (0x688340), SoupMessage 1 (0xbdd2b0), SoupSocket 1 (0x6a0460)
+> Host: accounts.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+>
+> client_id=352818697630-nqu2cmt5quqd6lr17ouoqmb684u84l1f.apps.googleusercontent.com&client_secret=-fA4pHQJxR3zJ-FyAMPQsikg&code=4%2Fv_gXJb78sdayihZYv2RA-U7P7q4lJqzoQhSDV3F9H7U&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&grant_type=authorization_code
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1488736755
+< Soup-Debug: SoupMessage 1 (0xbdd2b0)
+< Content-Type: application/json; charset=utf-8
+< X-Content-Type-Options: nosniff
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 17:59:15 GMT
+< Content-Disposition: attachment; filename="json.txt"; filename*=UTF-8''json.txt
+< Content-Encoding: gzip
+< Server: ESF
+< X-XSS-Protection: 1; mode=block
+< X-Frame-Options: SAMEORIGIN
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+< Transfer-Encoding: chunked
+<
+< {
+< "access_token" : "ya29.GlsFBA34dYY2-gu5C9DE4WYt6ilEBUvfPhJ6UIwj4KwqEK-uyMAhxBD-N-p3gIZ7ftYRvYxo_TPdTm89NhVfVa-YXGrdVkM1PcZMOftGEYbSVjDE-GCuhrzL2IPd",
+< "expires_in" : 3600,
+< "refresh_token" : "1/_F_QFRKDjrmwDaWi8MxGJ9ZtQcCEIm_KBbnZwmpCKFo",
+< "token_type" : "Bearer"
+< }
+
--- /dev/null
+> POST /accounts/ClientLogin HTTP/1.1
+> Soup-Debug-Timestamp: 1375193173
+> Soup-Debug: SoupSession 1 (0x668500), SoupMessage 1 (0x78d640), SoupSocket 1 (0x7cbeb0)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> accountType=HOSTED%5FOR%5FGOOGLE&Email=libgdata%2Epicasaweb%40gmail%2Ecom&Passwd=gdata%2Dgdata&service=lh2&source=ytapi%2DGNOME%2Dlibgdata%2D444fubtt%2D0
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375193173
+< Soup-Debug: SoupMessage 1 (0x78d640)
+< Content-Type: text/plain
+< Cache-control: no-cache, no-store
+< Pragma: no-cache
+< Expires: Mon, 01-Jan-1990 00:00:00 GMT
+< Date: Tue, 30 Jul 2013 14:06:13 GMT
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 947
+< Server: GSE
+<
+< SID=DQAAANkAAADz6I5y543CCjZXOpzHRL5Wy2v6O9dHOK5ZL-gkle65RbGOwdyggx2m5YWShFc8QmsykdyBKyKnD9ZxJAzOzeOpqaHZiKyiwXnhhqF-n71hCFLI0X66TbxkKcYY8DjtBm3yrmq1qsaJ2Ih8dNVwGsRRzkjBhWEV-hvEM4ATwZzP8U9EkkUrB1M7FM-NRXY_SCCfr7G7HmeTeUJrjBchBk3cF5aSgcDTUW5DAgJOdRfV7tSIRf877itIN_gPRlkmzWS0BhaJC7IGko9hilmk6h5Nqlry2e23b7uhsVWbMpeKhQ
+< LSID=DQAAANsAAABWmL76wrk2TqLhr0R8y3MUE9QHvBb7tTdpvkh-6vWtkpu-cC3WScDlQxfk_5N5NAI2U-xwnqC7mhGYlviKWVpSulVjJzqgS3TLyTUpmdmONFlEfzZMf2dIHCUrWHf00WzredV_HoQelWgN0qBoOJSFpj7O__0-EypihGFFkQV0G9NryUZKGlog6R_DFML1vphRMR1YuOBaSv8GEkFndO1WIEl9j7FQxEBB3CBAP4v7OR19_KOA7SuBpT_rtZmdbS2wGtvTuVaUhiN4jvWRfaEXuAtuCUTY8LbuZM_2iV0fXw
+< Auth=DQAAANoAAABWmL76wrk2TqLhr0R8y3MUE9QHvBb7tTdpvkh-6vWtkpu-cC3WScDlQxfk_5N5NALhO_5Ix-AyQKglVmoDTujmSRVN5FGSGJUAiEybNEVH5AEWKHdUFf1PfRPDTJ_MAOSo5W7agpjCZdoYK_82KnbPYyAcrC5FyK4b943aWiooIv1ugKmkIp4HZK6NEQCQdjH3Nurdc9YCr53n2D95cvElm1lsS1nvtwq-6dBwpZZcIHsSdtrpe30tSQmzL5C1qoD2ALcy1CrmKf8OhqcWOtRLV5TdjwDfsbSFaRzxxbvR-A
+
--- /dev/null
+> POST /accounts/ClientLogin HTTP/1.1
+> Soup-Debug-Timestamp: 1375193174
+> Soup-Debug: SoupSession 1 (0x668500), SoupMessage 1 (0x7fffe00262b0), SoupSocket 1 (0x7fffe00281a0)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> accountType=HOSTED%5FOR%5FGOOGLE&Email=libgdata%2Epicasaweb%40gmail%2Ecom&Passwd=gdata%2Dgdata&service=lh2&source=ytapi%2DGNOME%2Dlibgdata%2D444fubtt%2D0
+
+< HTTP/1.1 1 Cancelled
+< Soup-Debug-Timestamp: 1375193174
+< Soup-Debug: SoupMessage 1 (0x7fffe00262b0)
+
+> POST /accounts/ClientLogin HTTP/1.1
+> Soup-Debug-Timestamp: 1375193174
+> Soup-Debug: SoupSession 1 (0x6683f0), SoupMessage 1 (0x7fffe40028c0), SoupSocket 1 (0x7fffdc0043c0)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> accountType=HOSTED%5FOR%5FGOOGLE&Email=libgdata%2Epicasaweb%40gmail%2Ecom&Passwd=gdata%2Dgdata&service=lh2&source=ytapi%2DGNOME%2Dlibgdata%2D444fubtt%2D0
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375193174
+< Soup-Debug: SoupMessage 1 (0x7fffe40028c0)
+< Content-Type: text/plain
+< Cache-control: no-cache, no-store
+< Pragma: no-cache
+< Expires: Mon, 01-Jan-1990 00:00:00 GMT
+< Date: Tue, 30 Jul 2013 14:06:15 GMT
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 947
+< Server: GSE
+<
+< SID=DQAAANgAAACE4a6JEhL9MqNFpE-q7I3gdAS8mY_m634u37CefXGg6awpOZw81o8og4PfiQOf2ZMm7Ma7oUr4v3MQTR-Aw2uKvAUukley4pYFRIcRFS2LTr8bjpngzYUUDf8TOJIDjeWQrJQ51ujAlcDgg8cv4pGq9X1OYy_cBrESmyYXzEzf0aJhgW5kPb-I7pA84IWe0m36nW9ZfP5UpZS5TiBf_t-UvbWJdEo2xWwYp8J0e4GGiSqdfwF1MhRn2c-c4ZGzOFEbDXfUfW1x3TTN2H4ZM7ZueedgsFFFM1QyYLdJHBejiA
+< LSID=DQAAANwAAAAwilHcMrBJKdIRjpG3J0vlDW-KOSHFkBE14z7LMkU43DR5RQe_Z_rW7tnuxGEN45ByDVyqbMnaA6w46FfRvspunAf3ganeKFylmTR8ZfQdPdo3NdqsAaC-A2nZuUGkkGZSG8joTC23-LQ_3lx10BwnsY_S8afAWzqPe9dX33O28ilbqlOtUNdZJvau137Bv7bUmNEILNIH-lGnJDVBC7bL2DeQwgbZuPocbbEzLp201s4kgEdfxDx__k-VTObMBEsJZoi-wnMBuJEOe074AMIIE6EoFCGIPfi6UTBVSFtrnw
+< Auth=DQAAANsAAAAwilHcMrBJKdIRjpG3J0vlDW-KOSHFkBE14z7LMkU43DR5RQe_Z_rW7tnuxGEN45BX83CWF6Rx2FV-mfvaNd2mbn4n2hPc_eFYRzmAIdqBs0mosGrTCs-uQr5XH_bVE3bkVm1DlHJ0VAZiw-TVjVpPUBgntqKPx-bKkDzltMGUgsqeuAdAFp4uhTAb-4shLyfrUgR6890AelCebv0cecAdmBCj1Ti-Nmw4VWFRFvUV58_YGU0aZ94pKzP6h5HygAwR8XKxBz_IHBZ4X09ts54ss7KC2m5VXEimpiU3SW9i-g
+
--- /dev/null
+> DELETE /data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157991014140692?authkey=Gv1sRgCKKx5unfo4qvuAE HTTP/1.1
+> Soup-Debug-Timestamp: 1375370588
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 9 (0x98c290), SoupSocket 8 (0x7833c0)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAAB86Pi8rzCqWXqIEzPXZzCnRN-eogX98xY72dnpn8D-bI_huo8ii6KGlO-JGx1j3fOwSwnULClHn2WfkMJpXq9F2V5OEEOX3QeD9u3OzN1ecfPaRlT4itJTQYGQnRLHRdNCoNyueiCaKfo_FWFe1wjM-0KBD0PeItJ3S7T6EfQfYzSWruT6nl8hzBowhTxvGe8g0U2N-Y-BoqGHT1LNXEg31Qd7WzTBoXlSFt66A3B0yznUBRVWVNw-vK7V4oyFbWPtll6VEr3o-_LxLeTKicv5SVzw_YEwnj1ostJeRsE5HQ
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375370589
+< Soup-Debug: SoupMessage 9 (0x98c290)
+< Expires: Thu, 01 Aug 2013 15:23:09 GMT
+< Date: Thu, 01 Aug 2013 15:23:09 GMT
+< Cache-control: private, max-age=0, must-revalidate
+< Set-Cookie: _rtok=lbDpj9RJnlqx; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=cNDsRQ25MWOnTZqVIr9DKA; Domain=.google.com; Path=/; Secure; HttpOnly
+< GData-Version: 2.0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> POST /data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE HTTP/1.1
+> Soup-Debug-Timestamp: 1375368301
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 6 (0x98c290), SoupSocket 6 (0x783240)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANoAAABqfAP7BRwUl4NRRp09PQSGS8uM-ZHOZSba6D-hWAtvmHRVj-ck_2T9BM_92VDR_pDDGg2bApfteDk1ITzABtR_40EhsW_nXzefXLRJERXTVaZl9fs1z3wuPIApugLt5Vf5-wimwxfqmsGz_45loIQFnyvJ3i0jPnvGutxhdAD7OxQHugZ6U_79W74suTD6wqP8JTcAlbyAVDcA7cdyLccjx6Pz_EgrD72AYxCCrQTKlX-d4Wv1PEbNKxXSP1g1JM2ugqZF-JBLWh5SAjyTpKK9Igbs7M1DeVrhPb4DQMfsdg
+> GData-Version: 2
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'></title><content type='text'>This is a test comment.</content><category term='http://schemas.google.com/photos/2007#comment' scheme='http://schemas.google.com/g/2005#kind'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375368304
+< Soup-Debug: SoupMessage 6 (0x98c290)
+< Expires: Thu, 01 Aug 2013 14:45:02 GMT
+< Date: Thu, 01 Aug 2013 14:45:02 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=o-P2eFhjqkUt; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=b5d1EMiBK9GLVFRlazKBLw; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 2.0
+< ETag: W/"AkQEQH09eSp7ImA9WhFWE0s."
+< Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907161876232206500?authkey=Gv1sRgCKKx5unfo4qvuAE
+< Content-Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907161876232206500?authkey=Gv1sRgCKKx5unfo4qvuAE
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"AkQEQH09eSp7ImA9WhFWE0s."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907161876232206500</id><published>2013-08-01T14:45:01.361Z</published><updated>2013-08-01T14:45:01.361Z</updated><app:edited>2013-08-01T14:45:01.361Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#comment'/><title>libgdata.picasaweb</title><content>This is a test comment.</content><link rel='alternate' type='text/html' href='https://picasaweb.google.com/lh/photo/5j_h1SVa0SXc4JgQqpJtiC-f0tjIoKrBsvBni_XuKXs'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907161876232206500?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907161876232206500?authkey=Gv1sRgCKKx5unfo4qvuAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s48-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:user>libgdata.picasaweb</gphoto:user></author><gphoto:id>5907161876232206500</gphoto:id><gphoto:photoid>5907162035673007314</gphoto:photoid></entry>
+
--- /dev/null
+> GET /data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?kind=comment&authkey=Gv1sRgCKKx5unfo4qvuAE HTTP/1.1
+> Soup-Debug-Timestamp: 1375367327
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 9 (0x79eab0), SoupSocket 8 (0x706be0)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANoAAAAOuUYXwRBAHgNEEbEl4k3Pfxl9EMLyqMFS6XDPU8V6x6UdXPfUNk8406bdjrbicpY09aRzdq5P_E2B4rdPeJG9iMU-Fcapg-QZcFs_CnJpq66uXpvAcZ2y_TSvFzzliXnxvIIPeU-8ofrMKG3STiGssYg2SkpME_sUu4LOpsBmcP8380ZMY-7PFQZYzZ1VmwB58hmU34NecZY4b3nngnRI4EKZiMseyudbDXuE-X6KIJp4SVY1RVvMCu5oRTHw5vd6C0s3JM-n9_u9xDsXBn-3xdKvPeGBINjX33DeqFvIgw
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375367327
+< Soup-Debug: SoupMessage 9 (0x79eab0)
+< Expires: Thu, 01 Aug 2013 14:28:47 GMT
+< Date: Thu, 01 Aug 2013 14:28:47 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=qmWG4urWwy0e; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=Jigr844EcsvGgll0NpWOFQ; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"DUQGRXg7eSp7ImA9WhFWE0s."
+< Last-Modified: Thu, 01 Aug 2013 14:28:44 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:exif='http://schemas.google.com/photos/exif/2007' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"DUQGRXg7eSp7ImA9WhFWE0s."'><id>https://picasaweb.google.com/data/feed/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314</id><updated>2013-08-01T14:28:44.601Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Test file 1</title><subtitle/><icon>https://lh6.googleusercontent.com/-ydx6CSpdiiU/UfpwixC0G7I/AAAAAAAAMmY/29Ju6Jjo1F8/s288/Test%252520file%2525201.jpg</icon><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/lh/photo/EUBDOj2bbNKpAiyXjcQvHJpxYhV8BUZm-1WNNmPK6ZU'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?start-index=1&max-results=500&kind=comment&authkey=Gv1sRgCKKx5unfo4qvuAE'/><generator version='1.00' uri='http://picasaweb.google.com/'>Picasaweb</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>500</openSearch:itemsPerPage><gphoto:id>5907162035673007314</gphoto:id><gphoto:albumid>5907162005897469553</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154790828000</gphoto:timestamp><gphoto:imageVersion>12902</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>3</gphoto:commentCount><gphoto:streamId>shared_group_5907162035673007314</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh6.googleusercontent.com/-ydx6CSpdiiU/UfpwixC0G7I/AAAAAAAAMmY/29Ju6Jjo1F8/Test%252520file%2525201.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh6.googleusercontent.com/-ydx6CSpdiiU/UfpwixC0G7I/AAAAAAAAMmY/29Ju6Jjo1F8/s72/Test%252520file%2525201.jpg' height='67' width='72'/><media:thumbnail url='https://lh6.googleusercontent.com/-ydx6CSpdiiU/UfpwixC0G7I/AAAAAAAAMmY/29Ju6Jjo1F8/s144/Test%252520file%2525201.jpg' height='92' width='100'/><media:thumbnail url='https://lh6.googleusercontent.com/-ydx6CSpdiiU/UfpwixC0G7I/AAAAAAAAMmY/29Ju6Jjo1F8/s288/Test%252520file%2525201.jpg' height='92' width='100'/><media:title type='plain'>Test file 1</media:title></media:group><entry gd:etag='W/"DUQGQX47eCp7ImA9WhFWE0s."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157663040073732</id><published>2013-08-01T14:28:40.000Z</published><updated>2013-08-01T14:28:40.000Z</updated><app:edited>2013-08-01T14:28:40.000Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#comment'/><title>libgdata.picasaweb</title><content>Test comment 1.</content><link rel='alternate' type='text/html' href='https://picasaweb.google.com/lh/photo/EUBDOj2bbNKpAiyXjcQvHJpxYhV8BUZm-1WNNmPK6ZU'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157663040073732?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157663040073732?authkey=Gv1sRgCKKx5unfo4qvuAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAAAAA/VkmKMmZUUy8/s48-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:user>libgdata.picasaweb</gphoto:user></author><gphoto:id>5907157663040073732</gphoto:id><gphoto:photoid>5907162035673007314</gphoto:photoid></entry><entry gd:etag='W/"DUQGQn47eCp7ImA9WhFWE0s."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157674275715268</id><published>2013-08-01T14:28:43.000Z</published><updated>2013-08-01T14:28:43.000Z</updated><app:edited>2013-08-01T14:28:43.000Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#comment'/><title>libgdata.picasaweb</title><content>Test comment 2.</content><link rel='alternate' type='text/html' href='https://picasaweb.google.com/lh/photo/EUBDOj2bbNKpAiyXjcQvHJpxYhV8BUZm-1WNNmPK6ZU'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157674275715268?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157674275715268?authkey=Gv1sRgCKKx5unfo4qvuAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAAAAA/VkmKMmZUUy8/s48-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:user>libgdata.picasaweb</gphoto:user></author><gphoto:id>5907157674275715268</gphoto:id><gphoto:photoid>5907162035673007314</gphoto:photoid></entry><entry gd:etag='W/"DUQGRX47eCp7ImA9WhFWE0s."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157680201591892</id><published>2013-08-01T14:28:44.000Z</published><updated>2013-08-01T14:28:44.000Z</updated><app:edited>2013-08-01T14:28:44.000Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#comment'/><title>libgdata.picasaweb</title><content>Test comment 3.</content><link rel='alternate' type='text/html' href='https://picasaweb.google.com/lh/photo/EUBDOj2bbNKpAiyXjcQvHJpxYhV8BUZm-1WNNmPK6ZU'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157680201591892?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157680201591892?authkey=Gv1sRgCKKx5unfo4qvuAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAAAAA/VkmKMmZUUy8/s48-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:user>libgdata.picasaweb</gphoto:user></author><gphoto:id>5907157680201591892</gphoto:id><gphoto:photoid>5907162035673007314</gphoto:photoid></entry></feed>
+
--- /dev/null
+> GET /data/feed/api/user/libgdata.picasaweb/albumid/5907157848164766801/photoid/5907157857343296754?kind=comment&authkey=Gv1sRgCKzp_q_ZisOlvAE HTTP/1.1
+> Soup-Debug-Timestamp: 1375367380
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 37 (0x7fffe401f2b0), SoupSocket 24 (0x706a60)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANoAAAAOuUYXwRBAHgNEEbEl4k3Pfxl9EMLyqMFS6XDPU8V6x6UdXPfUNk8406bdjrbicpY09aRzdq5P_E2B4rdPeJG9iMU-Fcapg-QZcFs_CnJpq66uXpvAcZ2y_TSvFzzliXnxvIIPeU-8ofrMKG3STiGssYg2SkpME_sUu4LOpsBmcP8380ZMY-7PFQZYzZ1VmwB58hmU34NecZY4b3nngnRI4EKZiMseyudbDXuE-X6KIJp4SVY1RVvMCu5oRTHw5vd6C0s3JM-n9_u9xDsXBn-3xdKvPeGBINjX33DeqFvIgw
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375367381
+< Soup-Debug: SoupMessage 37 (0x7fffe401f2b0)
+< Expires: Thu, 01 Aug 2013 14:29:41 GMT
+< Date: Thu, 01 Aug 2013 14:29:41 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=x14s9aNnNpqE; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=Y9NAa9ozRLRgykS0lvnWYg; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"DUQMQXwyeSp7ImA9WhFWE0s."
+< Last-Modified: Thu, 01 Aug 2013 14:29:40 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:exif='http://schemas.google.com/photos/exif/2007' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"DUQMQXwyeSp7ImA9WhFWE0s."'><id>https://picasaweb.google.com/data/feed/user/libgdata.picasaweb/albumid/5907157848164766801/photoid/5907157857343296754</id><updated>2013-08-01T14:29:40.291Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Test file 1</title><subtitle/><icon>https://lh3.googleusercontent.com/-nJjHqtfxPzk/Ufpwxhca1PI/AAAAAAAAMoY/Vmbv_is5mJA/s288/Test%252520file%2525201.jpg</icon><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907157848164766801/photoid/5907157857343296754?authkey=Gv1sRgCKzp_q_ZisOlvAE'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907157848164766801/photoid/5907157857343296754?authkey=Gv1sRgCKzp_q_ZisOlvAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907157848164766801/photoid/5907157857343296754?authkey=Gv1sRgCKzp_q_ZisOlvAE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/lh/photo/F1G4JwoTTwpz1wP1AMGJVgQGFpVu53-T_2zZ77rSteg'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907157848164766801/photoid/5907157857343296754?start-index=1&max-results=500&kind=comment&authkey=Gv1sRgCKzp_q_ZisOlvAE'/><generator version='1.00' uri='http://picasaweb.google.com/'>Picasaweb</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>500</openSearch:itemsPerPage><gphoto:id>5907157857343296754</gphoto:id><gphoto:albumid>5907157848164766801</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154790828000</gphoto:timestamp><gphoto:imageVersion>12934</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>3</gphoto:commentCount><gphoto:streamId>shared_group_5907157857343296754</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh3.googleusercontent.com/-nJjHqtfxPzk/Ufpwxhca1PI/AAAAAAAAMoY/Vmbv_is5mJA/Test%252520file%2525201.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-nJjHqtfxPzk/Ufpwxhca1PI/AAAAAAAAMoY/Vmbv_is5mJA/s72/Test%252520file%2525201.jpg' height='67' width='72'/><media:thumbnail url='https://lh3.googleusercontent.com/-nJjHqtfxPzk/Ufpwxhca1PI/AAAAAAAAMoY/Vmbv_is5mJA/s144/Test%252520file%2525201.jpg' height='92' width='100'/><media:thumbnail url='https://lh3.googleusercontent.com/-nJjHqtfxPzk/Ufpwxhca1PI/AAAAAAAAMoY/Vmbv_is5mJA/s288/Test%252520file%2525201.jpg' height='92' width='100'/><media:title type='plain'>Test file 1</media:title></media:group><entry gd:etag='W/"DUQDRn47eCp7ImA9WhFWE0s."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907157848164766801/photoid/5907157857343296754/commentid/5907157905758764500</id><published>2013-08-01T14:29:37.000Z</published><updated>2013-08-01T14:29:37.000Z</updated><app:edited>2013-08-01T14:29:37.000Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#comment'/><title>libgdata.picasaweb</title><content>Test comment 1.</content><link rel='alternate' type='text/html' href='https://picasaweb.google.com/lh/photo/F1G4JwoTTwpz1wP1AMGJVgQGFpVu53-T_2zZ77rSteg'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907157848164766801/photoid/5907157857343296754/commentid/5907157905758764500?authkey=Gv1sRgCKzp_q_ZisOlvAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907157848164766801/photoid/5907157857343296754/commentid/5907157905758764500?authkey=Gv1sRgCKzp_q_ZisOlvAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAAAAA/VkmKMmZUUy8/s48-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:user>libgdata.picasaweb</gphoto:user></author><gphoto:id>5907157905758764500</gphoto:id><gphoto:photoid>5907157857343296754</gphoto:photoid></entry><entry gd:etag='W/"DUQDSH47eCp7ImA9WhFWE0s."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907157848164766801/photoid/5907157857343296754/commentid/5907157916817560932</id><published>2013-08-01T14:29:39.000Z</published><updated>2013-08-01T14:29:39.000Z</updated><app:edited>2013-08-01T14:29:39.000Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#comment'/><title>libgdata.picasaweb</title><content>Test comment 2.</content><link rel='alternate' type='text/html' href='https://picasaweb.google.com/lh/photo/F1G4JwoTTwpz1wP1AMGJVgQGFpVu53-T_2zZ77rSteg'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907157848164766801/photoid/5907157857343296754/commentid/5907157916817560932?authkey=Gv1sRgCKzp_q_ZisOlvAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907157848164766801/photoid/5907157857343296754/commentid/5907157916817560932?authkey=Gv1sRgCKzp_q_ZisOlvAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAAAAA/VkmKMmZUUy8/s48-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:user>libgdata.picasaweb</gphoto:user></author><gphoto:id>5907157916817560932</gphoto:id><gphoto:photoid>5907157857343296754</gphoto:photoid></entry><entry gd:etag='W/"DUQMQX47eCp7ImA9WhFWE0s."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907157848164766801/photoid/5907157857343296754/commentid/5907157918906770116</id><published>2013-08-01T14:29:40.000Z</published><updated>2013-08-01T14:29:40.000Z</updated><app:edited>2013-08-01T14:29:40.000Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#comment'/><title>libgdata.picasaweb</title><content>Test comment 3.</content><link rel='alternate' type='text/html' href='https://picasaweb.google.com/lh/photo/F1G4JwoTTwpz1wP1AMGJVgQGFpVu53-T_2zZ77rSteg'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907157848164766801/photoid/5907157857343296754/commentid/5907157918906770116?authkey=Gv1sRgCKzp_q_ZisOlvAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907157848164766801/photoid/5907157857343296754/commentid/5907157918906770116?authkey=Gv1sRgCKzp_q_ZisOlvAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAAAAA/VkmKMmZUUy8/s48-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:user>libgdata.picasaweb</gphoto:user></author><gphoto:id>5907157918906770116</gphoto:id><gphoto:photoid>5907157857343296754</gphoto:photoid></entry></feed>
+
--- /dev/null
+> DELETE /data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157991014140692?authkey=Gv1sRgCKKx5unfo4qvuAE HTTP/1.1
+> Soup-Debug-Timestamp: 1375370603
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 22 (0x7fffe40210a0), SoupSocket 16 (0x7fffe40039a0)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAAB86Pi8rzCqWXqIEzPXZzCnRN-eogX98xY72dnpn8D-bI_huo8ii6KGlO-JGx1j3fOwSwnULClHn2WfkMJpXq9F2V5OEEOX3QeD9u3OzN1ecfPaRlT4itJTQYGQnRLHRdNCoNyueiCaKfo_FWFe1wjM-0KBD0PeItJ3S7T6EfQfYzSWruT6nl8hzBowhTxvGe8g0U2N-Y-BoqGHT1LNXEg31Qd7WzTBoXlSFt66A3B0yznUBRVWVNw-vK7V4oyFbWPtll6VEr3o-_LxLeTKicv5SVzw_YEwnj1ostJeRsE5HQ
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375370604
+< Soup-Debug: SoupMessage 22 (0x7fffe40210a0)
+< Expires: Thu, 01 Aug 2013 15:23:24 GMT
+< Date: Thu, 01 Aug 2013 15:23:24 GMT
+< Cache-control: private, max-age=0, must-revalidate
+< Set-Cookie: _rtok=WAE1zkbt8IgD; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=9KURrLSyQglUdlPioxKoJg; Domain=.google.com; Path=/; Secure; HttpOnly
+< GData-Version: 2.0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> DELETE /data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157991014140692?authkey=Gv1sRgCKKx5unfo4qvuAE HTTP/1.1
+> Soup-Debug-Timestamp: 1375370623
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 37 (0x7fffe4021730), SoupSocket 25 (0x783300)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAAB86Pi8rzCqWXqIEzPXZzCnRN-eogX98xY72dnpn8D-bI_huo8ii6KGlO-JGx1j3fOwSwnULClHn2WfkMJpXq9F2V5OEEOX3QeD9u3OzN1ecfPaRlT4itJTQYGQnRLHRdNCoNyueiCaKfo_FWFe1wjM-0KBD0PeItJ3S7T6EfQfYzSWruT6nl8hzBowhTxvGe8g0U2N-Y-BoqGHT1LNXEg31Qd7WzTBoXlSFt66A3B0yznUBRVWVNw-vK7V4oyFbWPtll6VEr3o-_LxLeTKicv5SVzw_YEwnj1ostJeRsE5HQ
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 400 Bad Request
+< Soup-Debug-Timestamp: 1375370623
+< Soup-Debug: SoupMessage 37 (0x7fffe4021730)
+< Expires: Thu, 01 Aug 2013 15:23:44 GMT
+< Date: Thu, 01 Aug 2013 15:23:44 GMT
+< Cache-control: private, max-age=0, must-revalidate
+< Set-Cookie: _rtok=4n7L3rwuYT-N; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=zpsRfD2kUWOsWY6IOUiQ8g; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: text/html; charset=UTF-8
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< Invalid commentId 5907157991014140692
+
--- /dev/null
+> POST /data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE HTTP/1.1
+> Soup-Debug-Timestamp: 1375368324
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 15 (0x7fffe40160b0), SoupSocket 12 (0x7fffe4003a60)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANoAAABqfAP7BRwUl4NRRp09PQSGS8uM-ZHOZSba6D-hWAtvmHRVj-ck_2T9BM_92VDR_pDDGg2bApfteDk1ITzABtR_40EhsW_nXzefXLRJERXTVaZl9fs1z3wuPIApugLt5Vf5-wimwxfqmsGz_45loIQFnyvJ3i0jPnvGutxhdAD7OxQHugZ6U_79W74suTD6wqP8JTcAlbyAVDcA7cdyLccjx6Pz_EgrD72AYxCCrQTKlX-d4Wv1PEbNKxXSP1g1JM2ugqZF-JBLWh5SAjyTpKK9Igbs7M1DeVrhPb4DQMfsdg
+> GData-Version: 2
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'></title><content type='text'>This is a test comment.</content><category term='http://schemas.google.com/photos/2007#comment' scheme='http://schemas.google.com/g/2005#kind'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375368325
+< Soup-Debug: SoupMessage 15 (0x7fffe40160b0)
+< Expires: Thu, 01 Aug 2013 14:45:25 GMT
+< Date: Thu, 01 Aug 2013 14:45:25 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=e_Ko7BjRrHsw; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=9qsRwz5RJUtkks-KxGCw0Q; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 2.0
+< ETag: W/"AkQGRXo9fSp7ImA9WhFWE0s."
+< Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907161876232206500?authkey=Gv1sRgCKKx5unfo4qvuAE
+< Content-Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907161876232206500?authkey=Gv1sRgCKKx5unfo4qvuAE
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"AkQGRXo9fSp7ImA9WhFWE0s."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907161876232206500</id><published>2013-08-01T14:45:24.465Z</published><updated>2013-08-01T14:45:24.465Z</updated><app:edited>2013-08-01T14:45:24.465Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#comment'/><title>libgdata.picasaweb</title><content>This is a test comment.</content><link rel='alternate' type='text/html' href='https://picasaweb.google.com/lh/photo/dfwIZjuUJANrPmLymoCXSwbDeNidHwc-nWhrCNie1ms'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907161876232206500?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907161876232206500?authkey=Gv1sRgCKKx5unfo4qvuAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s48-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:user>libgdata.picasaweb</gphoto:user></author><gphoto:id>5907161876232206500</gphoto:id><gphoto:photoid>5907162035673007314</gphoto:photoid></entry>
+
--- /dev/null
+> POST /data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE HTTP/1.1
+> Soup-Debug-Timestamp: 1375368360
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 24 (0x7fffe0032d50), SoupSocket 18 (0x7fffe4003e20)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANoAAABqfAP7BRwUl4NRRp09PQSGS8uM-ZHOZSba6D-hWAtvmHRVj-ck_2T9BM_92VDR_pDDGg2bApfteDk1ITzABtR_40EhsW_nXzefXLRJERXTVaZl9fs1z3wuPIApugLt5Vf5-wimwxfqmsGz_45loIQFnyvJ3i0jPnvGutxhdAD7OxQHugZ6U_79W74suTD6wqP8JTcAlbyAVDcA7cdyLccjx6Pz_EgrD72AYxCCrQTKlX-d4Wv1PEbNKxXSP1g1JM2ugqZF-JBLWh5SAjyTpKK9Igbs7M1DeVrhPb4DQMfsdg
+> GData-Version: 2
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'></title><content type='text'>This is a test comment.</content><category term='http://schemas.google.com/photos/2007#comment' scheme='http://schemas.google.com/g/2005#kind'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375368361
+< Soup-Debug: SoupMessage 24 (0x7fffe0032d50)
+< Expires: Thu, 01 Aug 2013 14:46:01 GMT
+< Date: Thu, 01 Aug 2013 14:46:01 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=jYvRemGqDpG_; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=F6X4LNOPM-8mScUSHDZ1Dw; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 2.0
+< ETag: W/"AkQCQXk6fip7ImA9WhFWE0s."
+< Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907161876232206500?authkey=Gv1sRgCKKx5unfo4qvuAE
+< Content-Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907161876232206500?authkey=Gv1sRgCKKx5unfo4qvuAE
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"AkQCQXk6fip7ImA9WhFWE0s."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907161876232206500</id><published>2013-08-01T14:46:00.716Z</published><updated>2013-08-01T14:46:00.716Z</updated><app:edited>2013-08-01T14:46:00.716Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#comment'/><title>libgdata.picasaweb</title><content>This is a test comment.</content><link rel='alternate' type='text/html' href='https://picasaweb.google.com/lh/photo/TclHBnxkCWRiCOH8UL0V8anPQSJCD8MPruhZxgfAX5U'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907161876232206500?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907161876232206500?authkey=Gv1sRgCKKx5unfo4qvuAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s48-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:user>libgdata.picasaweb</gphoto:user></author><gphoto:id>5907161876232206500</gphoto:id><gphoto:photoid>5907162035673007314</gphoto:photoid></entry>
+
--- /dev/null
+> GET /data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?kind=comment&authkey=Gv1sRgCKKx5unfo4qvuAE HTTP/1.1
+> Soup-Debug-Timestamp: 1375367356
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 23 (0x7fffe401f0d0), SoupSocket 16 (0x706ca0)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANoAAAAOuUYXwRBAHgNEEbEl4k3Pfxl9EMLyqMFS6XDPU8V6x6UdXPfUNk8406bdjrbicpY09aRzdq5P_E2B4rdPeJG9iMU-Fcapg-QZcFs_CnJpq66uXpvAcZ2y_TSvFzzliXnxvIIPeU-8ofrMKG3STiGssYg2SkpME_sUu4LOpsBmcP8380ZMY-7PFQZYzZ1VmwB58hmU34NecZY4b3nngnRI4EKZiMseyudbDXuE-X6KIJp4SVY1RVvMCu5oRTHw5vd6C0s3JM-n9_u9xDsXBn-3xdKvPeGBINjX33DeqFvIgw
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375367357
+< Soup-Debug: SoupMessage 23 (0x7fffe401f0d0)
+< Expires: Thu, 01 Aug 2013 14:29:17 GMT
+< Date: Thu, 01 Aug 2013 14:29:17 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=47g2eU9bGeeJ; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=KoOYSBpmixKl-hZe1Mttfw; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"DUQBR386fip7ImA9WhFWE0s."
+< Last-Modified: Thu, 01 Aug 2013 14:29:16 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:exif='http://schemas.google.com/photos/exif/2007' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"DUQBR386fip7ImA9WhFWE0s."'><id>https://picasaweb.google.com/data/feed/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314</id><updated>2013-08-01T14:29:16.116Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Test file 1</title><subtitle/><icon>https://lh3.googleusercontent.com/-X3MVN6ZbCzk/UfpwqAwYx_I/AAAAAAAAMnY/ftfli5UbpF0/s288/Test%252520file%2525201.jpg</icon><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/lh/photo/zhLLKGA0G3JMYOW8KY7yWAc7g5I0u-9cbuu2HkAIaTs'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?start-index=1&max-results=500&kind=comment&authkey=Gv1sRgCKKx5unfo4qvuAE'/><generator version='1.00' uri='http://picasaweb.google.com/'>Picasaweb</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>500</openSearch:itemsPerPage><gphoto:id>5907162035673007314</gphoto:id><gphoto:albumid>5907162005897469553</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154790828000</gphoto:timestamp><gphoto:imageVersion>12918</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>3</gphoto:commentCount><gphoto:streamId>shared_group_5907162035673007314</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh3.googleusercontent.com/-X3MVN6ZbCzk/UfpwqAwYx_I/AAAAAAAAMnY/ftfli5UbpF0/Test%252520file%2525201.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-X3MVN6ZbCzk/UfpwqAwYx_I/AAAAAAAAMnY/ftfli5UbpF0/s72/Test%252520file%2525201.jpg' height='67' width='72'/><media:thumbnail url='https://lh3.googleusercontent.com/-X3MVN6ZbCzk/UfpwqAwYx_I/AAAAAAAAMnY/ftfli5UbpF0/s144/Test%252520file%2525201.jpg' height='92' width='100'/><media:thumbnail url='https://lh3.googleusercontent.com/-X3MVN6ZbCzk/UfpwqAwYx_I/AAAAAAAAMnY/ftfli5UbpF0/s288/Test%252520file%2525201.jpg' height='92' width='100'/><media:title type='plain'>Test file 1</media:title></media:group><entry gd:etag='W/"DUQASH47eCp7ImA9WhFWE0s."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157786879816340</id><published>2013-08-01T14:29:09.000Z</published><updated>2013-08-01T14:29:09.000Z</updated><app:edited>2013-08-01T14:29:09.000Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#comment'/><title>libgdata.picasaweb</title><content>Test comment 1.</content><link rel='alternate' type='text/html' href='https://picasaweb.google.com/lh/photo/zhLLKGA0G3JMYOW8KY7yWAc7g5I0u-9cbuu2HkAIaTs'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157786879816340?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157786879816340?authkey=Gv1sRgCKKx5unfo4qvuAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAAAAA/VkmKMmZUUy8/s48-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:user>libgdata.picasaweb</gphoto:user></author><gphoto:id>5907157786879816340</gphoto:id><gphoto:photoid>5907162035673007314</gphoto:photoid></entry><entry gd:etag='W/"DUQBRX47eCp7ImA9WhFWE0s."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157806262100420</id><published>2013-08-01T14:29:14.000Z</published><updated>2013-08-01T14:29:14.000Z</updated><app:edited>2013-08-01T14:29:14.000Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#comment'/><title>libgdata.picasaweb</title><content>Test comment 2.</content><link rel='alternate' type='text/html' href='https://picasaweb.google.com/lh/photo/zhLLKGA0G3JMYOW8KY7yWAc7g5I0u-9cbuu2HkAIaTs'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157806262100420?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157806262100420?authkey=Gv1sRgCKKx5unfo4qvuAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAAAAA/VkmKMmZUUy8/s48-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:user>libgdata.picasaweb</gphoto:user></author><gphoto:id>5907157806262100420</gphoto:id><gphoto:photoid>5907162035673007314</gphoto:photoid></entry><entry gd:etag='W/"DUQBR347eCp7ImA9WhFWE0s."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157816135657780</id><published>2013-08-01T14:29:16.000Z</published><updated>2013-08-01T14:29:16.000Z</updated><app:edited>2013-08-01T14:29:16.000Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#comment'/><title>libgdata.picasaweb</title><content>Test comment 3.</content><link rel='alternate' type='text/html' href='https://picasaweb.google.com/lh/photo/zhLLKGA0G3JMYOW8KY7yWAc7g5I0u-9cbuu2HkAIaTs'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157816135657780?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157816135657780?authkey=Gv1sRgCKKx5unfo4qvuAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAAAAA/VkmKMmZUUy8/s48-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:user>libgdata.picasaweb</gphoto:user></author><gphoto:id>5907157816135657780</gphoto:id><gphoto:photoid>5907162035673007314</gphoto:photoid></entry></feed>
+
--- /dev/null
+> GET /data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?kind=comment&authkey=Gv1sRgCKKx5unfo4qvuAE HTTP/1.1
+> Soup-Debug-Timestamp: 1375367407
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 54 (0x7fffe401f2b0), SoupSocket 34 (0x7068e0)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANoAAAAOuUYXwRBAHgNEEbEl4k3Pfxl9EMLyqMFS6XDPU8V6x6UdXPfUNk8406bdjrbicpY09aRzdq5P_E2B4rdPeJG9iMU-Fcapg-QZcFs_CnJpq66uXpvAcZ2y_TSvFzzliXnxvIIPeU-8ofrMKG3STiGssYg2SkpME_sUu4LOpsBmcP8380ZMY-7PFQZYzZ1VmwB58hmU34NecZY4b3nngnRI4EKZiMseyudbDXuE-X6KIJp4SVY1RVvMCu5oRTHw5vd6C0s3JM-n9_u9xDsXBn-3xdKvPeGBINjX33DeqFvIgw
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375367408
+< Soup-Debug: SoupMessage 54 (0x7fffe401f2b0)
+< Expires: Thu, 01 Aug 2013 14:30:08 GMT
+< Date: Thu, 01 Aug 2013 14:30:08 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=mVkpo4awCYKV; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=pWLDGATMUzoY1z0Y8UIoug; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"DUMEQXc_eyp7ImA9WhFWE0s."
+< Last-Modified: Thu, 01 Aug 2013 14:30:00 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:exif='http://schemas.google.com/photos/exif/2007' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"DUMEQXc_eyp7ImA9WhFWE0s."'><id>https://picasaweb.google.com/data/feed/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314</id><updated>2013-08-01T14:30:00.943Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Test file 1</title><subtitle/><icon>https://lh6.googleusercontent.com/-Qn6W760I1xk/Ufpw3RqKIwI/AAAAAAAAMpY/XKb2o8b7_v0/s288/Test%252520file%2525201.jpg</icon><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/lh/photo/tvuFAuI-9TZljsqogrDrzd62mdOu5-4lWildw13I8AE'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?start-index=1&max-results=500&kind=comment&authkey=Gv1sRgCKKx5unfo4qvuAE'/><generator version='1.00' uri='http://picasaweb.google.com/'>Picasaweb</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>500</openSearch:itemsPerPage><gphoto:id>5907162035673007314</gphoto:id><gphoto:albumid>5907162005897469553</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154790828000</gphoto:timestamp><gphoto:imageVersion>12950</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>3</gphoto:commentCount><gphoto:streamId>shared_group_5907162035673007314</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh6.googleusercontent.com/-Qn6W760I1xk/Ufpw3RqKIwI/AAAAAAAAMpY/XKb2o8b7_v0/Test%252520file%2525201.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh6.googleusercontent.com/-Qn6W760I1xk/Ufpw3RqKIwI/AAAAAAAAMpY/XKb2o8b7_v0/s72/Test%252520file%2525201.jpg' height='67' width='72'/><media:thumbnail url='https://lh6.googleusercontent.com/-Qn6W760I1xk/Ufpw3RqKIwI/AAAAAAAAMpY/XKb2o8b7_v0/s144/Test%252520file%2525201.jpg' height='92' width='100'/><media:thumbnail url='https://lh6.googleusercontent.com/-Qn6W760I1xk/Ufpw3RqKIwI/AAAAAAAAMpY/XKb2o8b7_v0/s288/Test%252520file%2525201.jpg' height='92' width='100'/><media:title type='plain'>Test file 1</media:title></media:group><entry gd:etag='W/"DUQNRn47eCp7ImA9WhFWE0s."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157991014140692</id><published>2013-08-01T14:29:57.000Z</published><updated>2013-08-01T14:29:57.000Z</updated><app:edited>2013-08-01T14:29:57.000Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#comment'/><title>libgdata.picasaweb</title><content>Test comment 1.</content><link rel='alternate' type='text/html' href='https://picasaweb.google.com/lh/photo/tvuFAuI-9TZljsqogrDrzd62mdOu5-4lWildw13I8AE'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157991014140692?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157991014140692?authkey=Gv1sRgCKKx5unfo4qvuAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAAAAA/VkmKMmZUUy8/s48-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:user>libgdata.picasaweb</gphoto:user></author><gphoto:id>5907157991014140692</gphoto:id><gphoto:photoid>5907162035673007314</gphoto:photoid></entry><entry gd:etag='W/"DUQNSX47eCp7ImA9WhFWE0s."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907158001023135444</id><published>2013-08-01T14:29:58.000Z</published><updated>2013-08-01T14:29:58.000Z</updated><app:edited>2013-08-01T14:29:58.000Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#comment'/><title>libgdata.picasaweb</title><content>Test comment 2.</content><link rel='alternate' type='text/html' href='https://picasaweb.google.com/lh/photo/tvuFAuI-9TZljsqogrDrzd62mdOu5-4lWildw13I8AE'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907158001023135444?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907158001023135444?authkey=Gv1sRgCKKx5unfo4qvuAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAAAAA/VkmKMmZUUy8/s48-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:user>libgdata.picasaweb</gphoto:user></author><gphoto:id>5907158001023135444</gphoto:id><gphoto:photoid>5907162035673007314</gphoto:photoid></entry><entry gd:etag='W/"DUMEQX47eCp7ImA9WhFWE0s."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907158005467377316</id><published>2013-08-01T14:30:00.000Z</published><updated>2013-08-01T14:30:00.000Z</updated><app:edited>2013-08-01T14:30:00.000Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#comment'/><title>libgdata.picasaweb</title><content>Test comment 3.</content><link rel='alternate' type='text/html' href='https://picasaweb.google.com/lh/photo/tvuFAuI-9TZljsqogrDrzd62mdOu5-4lWildw13I8AE'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907158005467377316?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907158005467377316?authkey=Gv1sRgCKKx5unfo4qvuAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAAAAA/VkmKMmZUUy8/s48-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:user>libgdata.picasaweb</gphoto:user></author><gphoto:id>5907158005467377316</gphoto:id><gphoto:photoid>5907162035673007314</gphoto:photoid></entry></feed>
+
--- /dev/null
+> GET /-poVqadt-OAg/Ufp0oeB9woI/AAAAAAAAMsU/tsfWY3JagZk/Test%252520file%2525203.jpg HTTP/1.1
+> Soup-Debug-Timestamp: 1375371652
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 6 (0x98c290), SoupSocket 6 (0x7fffe40038e0)
+> Host: lh6.googleusercontent.com
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375371652
+< Soup-Debug: SoupMessage 6 (0x98c290)
+< Access-Control-Allow-Origin: *
+< ETag: "v3329"
+< Expires: Fri, 02 Aug 2013 15:40:52 GMT
+< Cache-control: public, max-age=86400, no-transform
+< Content-Disposition: inline;filename="Test file 3.jpg"
+< Content-Type: image/jpeg
+< X-Content-Type-Options: nosniff
+< Date: Thu, 01 Aug 2013 15:40:52 GMT
+< Server: fife
+< Content-Length: 8896
+< X-XSS-Protection: 1; mode=block
+<
+< ÿØÿà
+
--- /dev/null
+> GET /-poVqadt-OAg/Ufp0oeB9woI/AAAAAAAAMsU/tsfWY3JagZk/s288/Test%252520file%2525203.jpg HTTP/1.1
+> Soup-Debug-Timestamp: 1375371675
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 14 (0x98c0b0), SoupSocket 12 (0x783240)
+> Host: lh3.googleusercontent.com
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375371676
+< Soup-Debug: SoupMessage 14 (0x98c0b0)
+< Access-Control-Allow-Origin: *
+< ETag: "v3333"
+< Expires: Fri, 02 Aug 2013 15:41:16 GMT
+< Cache-control: public, max-age=86400, no-transform
+< Content-Disposition: inline;filename="Test file 3.jpg"
+< Content-Type: image/jpeg
+< X-Content-Type-Options: nosniff
+< Date: Thu, 01 Aug 2013 15:41:16 GMT
+< Server: fife
+< Content-Length: 5993
+< X-XSS-Protection: 1; mode=block
+<
+< ÿØÿà
+
+> GET /-poVqadt-OAg/Ufp0oeB9woI/AAAAAAAAMsU/tsfWY3JagZk/s288/Test%252520file%2525203.jpg HTTP/1.1
+> Soup-Debug-Timestamp: 1375371676
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 15 (0x98c290), SoupSocket 12 (0x783240)
+> Host: lh3.googleusercontent.com
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375371676
+< Soup-Debug: SoupMessage 15 (0x98c290)
+< Access-Control-Allow-Origin: *
+< ETag: "v3333"
+< Expires: Fri, 02 Aug 2013 15:41:16 GMT
+< Content-Disposition: inline;filename="Test file 3.jpg"
+< Content-Type: image/jpeg
+< X-Content-Type-Options: nosniff
+< Date: Thu, 01 Aug 2013 15:41:16 GMT
+< Server: fife
+< Content-Length: 5993
+< X-XSS-Protection: 1; mode=block
+< Cache-control: public, max-age=86400, no-transform
+< Age: 0
+<
+< ÿØÿà
+
+> GET /-poVqadt-OAg/Ufp0oeB9woI/AAAAAAAAMsU/tsfWY3JagZk/s144/Test%252520file%2525203.jpg HTTP/1.1
+> Soup-Debug-Timestamp: 1375371676
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 16 (0x98c1a0), SoupSocket 12 (0x783240)
+> Host: lh3.googleusercontent.com
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375371676
+< Soup-Debug: SoupMessage 16 (0x98c1a0)
+< Access-Control-Allow-Origin: *
+< ETag: "v3333"
+< Expires: Fri, 02 Aug 2013 15:41:16 GMT
+< Cache-control: public, max-age=86400, no-transform
+< Content-Disposition: inline;filename="Test file 3.jpg"
+< Content-Type: image/jpeg
+< X-Content-Type-Options: nosniff
+< Date: Thu, 01 Aug 2013 15:41:16 GMT
+< Server: fife
+< Content-Length: 5993
+< X-XSS-Protection: 1; mode=block
+<
+< ÿØÿà
+
+> GET /-poVqadt-OAg/Ufp0oeB9woI/AAAAAAAAMsU/tsfWY3JagZk/s72/Test%252520file%2525203.jpg HTTP/1.1
+> Soup-Debug-Timestamp: 1375371676
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 17 (0x98c380), SoupSocket 12 (0x783240)
+> Host: lh3.googleusercontent.com
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375371677
+< Soup-Debug: SoupMessage 17 (0x98c380)
+< Access-Control-Allow-Origin: *
+< ETag: "v3333"
+< Expires: Fri, 02 Aug 2013 15:41:16 GMT
+< Cache-control: public, max-age=86400, no-transform
+< Content-Disposition: inline;filename="Test file 3.jpg"
+< Content-Type: image/jpeg
+< X-Content-Type-Options: nosniff
+< Date: Thu, 01 Aug 2013 15:41:16 GMT
+< Server: fife
+< Content-Length: 3634
+< X-XSS-Protection: 1; mode=block
+<
+< ÿØÿà
+
--- /dev/null
+> POST /o/oauth2/token HTTP/1.1
+> Soup-Debug-Timestamp: 1488736743
+> Soup-Debug: SoupSession 1 (0x688100), SoupMessage 1 (0xbdd0d0), SoupSocket 1 (0x6a02c0)
+> Host: accounts.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+>
+> client_id=352818697630-nqu2cmt5quqd6lr17ouoqmb684u84l1f.apps.googleusercontent.com&client_secret=-fA4pHQJxR3zJ-FyAMPQsikg&code=4%2Fi6DYNxhQBZkaRkFvksB6wM2bdj8dGYxUK9BzCFDJYgU&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&grant_type=authorization_code
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1488736743
+< Soup-Debug: SoupMessage 1 (0xbdd0d0)
+< Content-Type: application/json; charset=utf-8
+< X-Content-Type-Options: nosniff
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 17:59:03 GMT
+< Content-Disposition: attachment; filename="json.txt"; filename*=UTF-8''json.txt
+< Content-Encoding: gzip
+< Server: ESF
+< X-XSS-Protection: 1; mode=block
+< X-Frame-Options: SAMEORIGIN
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+< Transfer-Encoding: chunked
+<
+< {
+< "access_token" : "ya29.GlsFBPCOAdHSSn1lsVj-E1yy3lOfeAHvZeMHP4XZm1NFp0O7mgeklI6GWJGp8sUSvap5tk-cKrH6Q3JI0LNzim2WOBCjOY_LFZ1Hmp7gvcM0rJNbyAiWkv-vX4k0",
+< "expires_in" : 3600,
+< "refresh_token" : "1/zzEIneRh0ofYki_Pw_pIomJMe-Z36hKixeQ8zcbXZHZDPl160b0f8_0q380yJmr4",
+< "token_type" : "Bearer"
+< }
+
--- /dev/null
+> POST /data/feed/api/user/default HTTP/1.1
+> Soup-Debug-Timestamp: 1375193224
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 60 (0x7fffe40191d0), SoupSocket 27 (0x7cbdf0)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:georss='http://www.georss.org/georss' xmlns:gml='http://www.opengis.net/gml' xmlns:gd='http://schemas.google.com/g/2005' xmlns:app='http://www.w3.org/2007/app' xmlns:media='http://search.yahoo.com/mrss/'><title type='text'>Thanksgiving photos</title><summary type='text'>Family photos of the feast!</summary><rights>private</rights><category term='http://schemas.google.com/photos/2007#album' scheme='http://schemas.google.com/g/2005#kind'/><gphoto:location>Winnipeg, MN</gphoto:location><gphoto:access>private</gphoto:access><gphoto:timestamp>1034589539000</gphoto:timestamp><gphoto:commentingEnabled>false</gphoto:commentingEnabled><media:group><media:title type='plain'>Thanksgiving photos</media:title><media:description type='plain'>Family photos of the feast!</media:description></media:group></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375193224
+< Soup-Debug: SoupMessage 60 (0x7fffe40191d0)
+< Expires: Tue, 30 Jul 2013 14:07:04 GMT
+< Date: Tue, 30 Jul 2013 14:07:04 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=1EyCoJwu_n78; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=YvA5qIylphVzW0GxwNdVDw; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 2.0
+< ETag: "YD0qeyI."
+< Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409926225606689?authkey=Gv1sRgCIHX18X_kLpH
+< Content-Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409926225606689?authkey=Gv1sRgCIHX18X_kLpH
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409926225606689</id><published>2002-10-14T09:58:59.000Z</published><updated>2013-07-30T14:07:04.400Z</updated><app:edited>2013-07-30T14:07:04.400Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Thanksgiving photos</title><summary>Family photos of the feast!</summary><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409926225606689?authkey=Gv1sRgCIHX18X_kLpH'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/ThanksgivingPhotos98?authkey=Gv1sRgCIHX18X_kLpH'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409926225606689?authkey=Gv1sRgCIHX18X_kLpH'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409926225606689?authkey=Gv1sRgCIHX18X_kLpH'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409926225606689/acl?authkey=Gv1sRgCIHX18X_kLpH'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409926225606689</gphoto:id><gphoto:name>ThanksgivingPhotos98</gphoto:name><gphoto:location>Winnipeg, MN</gphoto:location><gphoto:access>private</gphoto:access><gphoto:timestamp>1034589539000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh3.googleusercontent.com/-5KM4I5kjnq0/UffIiM6EuCE/AAAAAAAAMe4/qtNcFWlEVkU/ThanksgivingPhotos98.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'>Family photos of the feast!</media:description><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-5KM4I5kjnq0/UffIiM6EuCE/AAAAAAAAMe4/qtNcFWlEVkU/s160-c/ThanksgivingPhotos98.jpg' height='160' width='160'/><media:title type='plain'>Thanksgiving photos</media:title></media:group></entry>
+
+> GET /data/feed/api/user/default HTTP/1.1
+> Soup-Debug-Timestamp: 1375193224
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 61 (0x7fffd800eca0), SoupSocket 27 (0x7cbdf0)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375193225
+< Soup-Debug: SoupMessage 61 (0x7fffd800eca0)
+< Expires: Tue, 30 Jul 2013 14:07:05 GMT
+< Date: Tue, 30 Jul 2013 14:07:05 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=GC-ICG7ox22z; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=-YaNUbgF96-m_Y-BBNzWPQ; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"CUUGRXo7eCp7ImA9WhFWEUQ."
+< Last-Modified: Tue, 30 Jul 2013 14:07:04 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"CUUGRXo7eCp7ImA9WhFWEUQ."'><id>https://picasaweb.google.com/data/feed/user/libgdata.picasaweb</id><updated>2013-07-30T14:07:04.400Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#user'/><title>libgdata.picasaweb</title><subtitle/><icon>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s64-c/libgdata.picasaweb.jpg</icon><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb'/><link rel='http://schemas.google.com/photos/2007#slideshow' type='application/x-shockwave-flash' href='https://static.googleusercontent.com/external_content/picasaweb.googleusercontent.com/slideshow.swf?host=picasaweb.google.com&RGB=0x000000&feed=https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb?alt%3Drss'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb?start-index=1&max-results=1000'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><generator version='1.00' uri='http://picasaweb.google.com/'>Picasaweb</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>1000</openSearch:itemsPerPage><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s64-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:quotalimit>16106127360</gphoto:quotalimit><gphoto:quotacurrent>1796070</gphoto:quotacurrent><gphoto:maxPhotosPerAlbum>1000</gphoto:maxPhotosPerAlbum><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409926225606689</id><published>2002-10-14T09:58:59.000Z</published><updated>2013-07-30T14:07:04.400Z</updated><app:edited>2013-07-30T14:07:04.400Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Thanksgiving photos</title><summary>Family photos of the feast!</summary><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409926225606689?authkey=Gv1sRgCIHX18X_kLpH'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/ThanksgivingPhotos98?authkey=Gv1sRgCIHX18X_kLpH'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409926225606689?authkey=Gv1sRgCIHX18X_kLpH'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409926225606689?authkey=Gv1sRgCIHX18X_kLpH'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409926225606689/acl?authkey=Gv1sRgCIHX18X_kLpH'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409926225606689</gphoto:id><gphoto:name>ThanksgivingPhotos98</gphoto:name><gphoto:location>Winnipeg, MN</gphoto:location><gphoto:access>private</gphoto:access><gphoto:timestamp>1034589539000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh3.googleusercontent.com/-5KM4I5kjnq0/UffIiM6EuCE/AAAAAAAAMe4/qtNcFWlEVkU/ThanksgivingPhotos98.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'>Family photos of the feast!</media:description><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-5KM4I5kjnq0/UffIiM6EuCE/AAAAAAAAMe4/qtNcFWlEVkU/s160-c/ThanksgivingPhotos98.jpg' height='160' width='160'/><media:title type='plain'>Thanksgiving photos</media:title></media:group></entry></feed>
+
--- /dev/null
+> POST /data/feed/api/user/default HTTP/1.1
+> Soup-Debug-Timestamp: 1375193226
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 63 (0x7fffd800ebb0), SoupSocket 28 (0x7fffe0028620)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:georss='http://www.georss.org/georss' xmlns:gml='http://www.opengis.net/gml' xmlns:gd='http://schemas.google.com/g/2005' xmlns:app='http://www.w3.org/2007/app' xmlns:media='http://search.yahoo.com/mrss/'><title type='text'>Thanksgiving photos</title><summary type='text'>Family photos of the feast!</summary><rights>private</rights><category term='http://schemas.google.com/photos/2007#album' scheme='http://schemas.google.com/g/2005#kind'/><gphoto:location>Winnipeg, MN</gphoto:location><gphoto:access>private</gphoto:access><gphoto:timestamp>1034589539000</gphoto:timestamp><gphoto:commentingEnabled>false</gphoto:commentingEnabled><media:group><media:title type='plain'>Thanksgiving photos</media:title><media:description type='plain'>Family photos of the feast!</media:description></media:group></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375193227
+< Soup-Debug: SoupMessage 63 (0x7fffd800ebb0)
+< Expires: Tue, 30 Jul 2013 14:07:07 GMT
+< Date: Tue, 30 Jul 2013 14:07:07 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=flrQn82pg8oZ; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=92L2TmpD5Oqxpf2macZZ9Q; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 2.0
+< ETag: "YD0qeyI."
+< Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409932028162849?authkey=Gv1sRgCN6V85-a0s7xVQ
+< Content-Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409932028162849?authkey=Gv1sRgCN6V85-a0s7xVQ
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409932028162849</id><published>2002-10-14T09:58:59.000Z</published><updated>2013-07-30T14:07:06.662Z</updated><app:edited>2013-07-30T14:07:06.662Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Thanksgiving photos</title><summary>Family photos of the feast!</summary><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409932028162849?authkey=Gv1sRgCN6V85-a0s7xVQ'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/ThanksgivingPhotos99?authkey=Gv1sRgCN6V85-a0s7xVQ'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409932028162849?authkey=Gv1sRgCN6V85-a0s7xVQ'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409932028162849?authkey=Gv1sRgCN6V85-a0s7xVQ'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409932028162849/acl?authkey=Gv1sRgCN6V85-a0s7xVQ'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409932028162849</gphoto:id><gphoto:name>ThanksgivingPhotos99</gphoto:name><gphoto:location>Winnipeg, MN</gphoto:location><gphoto:access>private</gphoto:access><gphoto:timestamp>1034589539000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh5.googleusercontent.com/-tcLfFa1jihY/UffIiihgsyE/AAAAAAAAMfA/6vl076Gnvx8/ThanksgivingPhotos99.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'>Family photos of the feast!</media:description><media:keywords/><media:thumbnail url='https://lh5.googleusercontent.com/-tcLfFa1jihY/UffIiihgsyE/AAAAAAAAMfA/6vl076Gnvx8/s160-c/ThanksgivingPhotos99.jpg' height='160' width='160'/><media:title type='plain'>Thanksgiving photos</media:title></media:group></entry>
+
--- /dev/null
+> POST /data/feed/api/user/default HTTP/1.1
+> Soup-Debug-Timestamp: 1375193228
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 65 (0x7fffe40192c0), SoupSocket 29 (0x7fffe00287a0)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:georss='http://www.georss.org/georss' xmlns:gml='http://www.opengis.net/gml' xmlns:gd='http://schemas.google.com/g/2005' xmlns:app='http://www.w3.org/2007/app' xmlns:media='http://search.yahoo.com/mrss/'><title type='text'>Thanksgiving photos</title><summary type='text'>Family photos of the feast!</summary><rights>private</rights><category term='http://schemas.google.com/photos/2007#album' scheme='http://schemas.google.com/g/2005#kind'/><gphoto:location>Winnipeg, MN</gphoto:location><gphoto:access>private</gphoto:access><gphoto:timestamp>1034589539000</gphoto:timestamp><gphoto:commentingEnabled>false</gphoto:commentingEnabled><media:group><media:title type='plain'>Thanksgiving photos</media:title><media:description type='plain'>Family photos of the feast!</media:description></media:group></entry>
+
+< HTTP/1.1 1 Cancelled
+< Soup-Debug-Timestamp: 1375193228
+< Soup-Debug: SoupMessage 65 (0x7fffe40192c0)
+
+> POST /data/feed/api/user/default HTTP/1.1
+> Soup-Debug-Timestamp: 1375193229
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 66 (0x7fffd800ebb0), SoupSocket 30 (0x7fffdc0046c0)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:georss='http://www.georss.org/georss' xmlns:gml='http://www.opengis.net/gml' xmlns:gd='http://schemas.google.com/g/2005' xmlns:app='http://www.w3.org/2007/app' xmlns:media='http://search.yahoo.com/mrss/'><title type='text'>Thanksgiving photos</title><summary type='text'>Family photos of the feast!</summary><rights>private</rights><category term='http://schemas.google.com/photos/2007#album' scheme='http://schemas.google.com/g/2005#kind'/><gphoto:location>Winnipeg, MN</gphoto:location><gphoto:access>private</gphoto:access><gphoto:timestamp>1034589539000</gphoto:timestamp><gphoto:commentingEnabled>false</gphoto:commentingEnabled><media:group><media:title type='plain'>Thanksgiving photos</media:title><media:description type='plain'>Family photos of the feast!</media:description></media:group></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375193230
+< Soup-Debug: SoupMessage 66 (0x7fffd800ebb0)
+< Expires: Tue, 30 Jul 2013 14:07:10 GMT
+< Date: Tue, 30 Jul 2013 14:07:10 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=UVVD9lHnGV2p; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=sxdiJ4i3KYb1qWXRQGofwg; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 2.0
+< ETag: "YD0qeyI."
+< Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409948133134593?authkey=Gv1sRgCNOliffP6fuuCQ
+< Content-Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409948133134593?authkey=Gv1sRgCNOliffP6fuuCQ
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409948133134593</id><published>2002-10-14T09:58:59.000Z</published><updated>2013-07-30T14:07:09.809Z</updated><app:edited>2013-07-30T14:07:09.809Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Thanksgiving photos</title><summary>Family photos of the feast!</summary><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409948133134593?authkey=Gv1sRgCNOliffP6fuuCQ'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/ThanksgivingPhotos101?authkey=Gv1sRgCNOliffP6fuuCQ'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409948133134593?authkey=Gv1sRgCNOliffP6fuuCQ'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409948133134593?authkey=Gv1sRgCNOliffP6fuuCQ'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409948133134593/acl?authkey=Gv1sRgCNOliffP6fuuCQ'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409948133134593</gphoto:id><gphoto:name>ThanksgivingPhotos101</gphoto:name><gphoto:location>Winnipeg, MN</gphoto:location><gphoto:access>private</gphoto:access><gphoto:timestamp>1034589539000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh3.googleusercontent.com/-IB76ZjJ9g4I/UffIjehPEQE/AAAAAAAAMfM/zQylT1ctwRc/ThanksgivingPhotos101.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'>Family photos of the feast!</media:description><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-IB76ZjJ9g4I/UffIjehPEQE/AAAAAAAAMfM/zQylT1ctwRc/s160-c/ThanksgivingPhotos101.jpg' height='160' width='160'/><media:title type='plain'>Thanksgiving photos</media:title></media:group></entry>
+
--- /dev/null
+> GET /data/feed/api/user/default HTTP/1.1
+> Soup-Debug-Timestamp: 1375193180
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 5 (0x78d0a0), SoupSocket 4 (0x7cbc70)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375193181
+< Soup-Debug: SoupMessage 5 (0x78d0a0)
+< Expires: Tue, 30 Jul 2013 14:06:21 GMT
+< Date: Tue, 30 Jul 2013 14:06:21 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=tAAF9Rvb-fVX; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=zNYej99Oqg85v9BtB-ET4Q; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"CUYDSHc4fCp7ImA9WhFWEUQ."
+< Last-Modified: Tue, 30 Jul 2013 14:06:19 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"CUYDSHc4fCp7ImA9WhFWEUQ."'><id>https://picasaweb.google.com/data/feed/user/libgdata.picasaweb</id><updated>2013-07-30T14:06:19.934Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#user'/><title>libgdata.picasaweb</title><subtitle/><icon>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s64-c/libgdata.picasaweb.jpg</icon><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb'/><link rel='http://schemas.google.com/photos/2007#slideshow' type='application/x-shockwave-flash' href='https://static.googleusercontent.com/external_content/picasaweb.googleusercontent.com/slideshow.swf?host=picasaweb.google.com&RGB=0x000000&feed=https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb?alt%3Drss'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb?start-index=1&max-results=1000'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><generator version='1.00' uri='http://picasaweb.google.com/'>Picasaweb</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>1000</openSearch:itemsPerPage><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s64-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:quotalimit>16106127360</gphoto:quotalimit><gphoto:quotacurrent>1796070</gphoto:quotacurrent><gphoto:maxPhotosPerAlbum>1000</gphoto:maxPhotosPerAlbum><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409880413253681</id><published>2013-07-30T14:06:54.000Z</published><updated>2013-07-30T14:06:54.614Z</updated><app:edited>2013-07-30T14:06:54.614Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 4 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409880413253681?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum4ForQueryAllAlbums68?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409880413253681?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409880413253681?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409880413253681/acl?authkey=Gv1sRgCOSEzMfX0feeQA'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409880413253681</gphoto:id><gphoto:name>TestAlbum4ForQueryAllAlbums68</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193214000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh4.googleusercontent.com/-Dj-tuEB-sz4/UffIfiPjsDE/AAAAAAAAMek/VnTLegFlzSc/TestAlbum4ForQueryAllAlbums68.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh4.googleusercontent.com/-Dj-tuEB-sz4/UffIfiPjsDE/AAAAAAAAMek/VnTLegFlzSc/s160-c/TestAlbum4ForQueryAllAlbums68.jpg' height='160' width='160'/><media:title type='plain'>Test album 4 for QueryAllAlbums</media:title></media:group></entry><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409876619235281</id><published>2013-07-30T14:06:53.000Z</published><updated>2013-07-30T14:06:53.653Z</updated><app:edited>2013-07-30T14:06:53.653Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 3 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409876619235281?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum3ForQueryAllAlbums69?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409876619235281?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409876619235281?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409876619235281/acl?authkey=Gv1sRgCPmiyez0rYT-Qg'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409876619235281</gphoto:id><gphoto:name>TestAlbum3ForQueryAllAlbums69</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193213000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh3.googleusercontent.com/-NWEN_d_Rhf4/UffIfUG_j9E/AAAAAAAAMeg/GF0PsCeCr-A/TestAlbum3ForQueryAllAlbums69.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-NWEN_d_Rhf4/UffIfUG_j9E/AAAAAAAAMeg/GF0PsCeCr-A/s160-c/TestAlbum3ForQueryAllAlbums69.jpg' height='160' width='160'/><media:title type='plain'>Test album 3 for QueryAllAlbums</media:title></media:group></entry><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409873513866033</id><published>2013-07-30T14:06:52.000Z</published><updated>2013-07-30T14:06:52.851Z</updated><app:edited>2013-07-30T14:06:52.851Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 2 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409873513866033?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum2ForQueryAllAlbums70?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409873513866033?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409873513866033?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409873513866033/acl?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409873513866033</gphoto:id><gphoto:name>TestAlbum2ForQueryAllAlbums70</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193212000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh6.googleusercontent.com/-4Whv1UHATRo/UffIfIinYzE/AAAAAAAAMec/PtrYZnVuv6Y/TestAlbum2ForQueryAllAlbums70.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh6.googleusercontent.com/-4Whv1UHATRo/UffIfIinYzE/AAAAAAAAMec/PtrYZnVuv6Y/s160-c/TestAlbum2ForQueryAllAlbums70.jpg' height='160' width='160'/><media:title type='plain'>Test album 2 for QueryAllAlbums</media:title></media:group></entry><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409867090978209</id><published>2013-07-30T14:06:51.000Z</published><updated>2013-07-30T14:06:51.971Z</updated><app:edited>2013-07-30T14:06:51.971Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 1 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409867090978209?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum1ForQueryAllAlbums72?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409867090978209?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409867090978209?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409867090978209/acl?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409867090978209</gphoto:id><gphoto:name>TestAlbum1ForQueryAllAlbums72</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193211000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh3.googleusercontent.com/-dghQiMuTN2c/UffIewnR5aE/AAAAAAAAMeY/1BIIg4oW3qw/TestAlbum1ForQueryAllAlbums72.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-dghQiMuTN2c/UffIewnR5aE/AAAAAAAAMeY/1BIIg4oW3qw/s160-c/TestAlbum1ForQueryAllAlbums72.jpg' height='160' width='160'/><media:title type='plain'>Test album 1 for QueryAllAlbums</media:title></media:group></entry></feed>
+
--- /dev/null
+> GET /data/feed/api/user/default HTTP/1.1
+> Soup-Debug-Timestamp: 1375193207
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 35 (0x7fffd800ed90), SoupSocket 16 (0x7cbaf0)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375193208
+< Soup-Debug: SoupMessage 35 (0x7fffd800ed90)
+< Expires: Tue, 30 Jul 2013 14:06:48 GMT
+< Date: Tue, 30 Jul 2013 14:06:48 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=YwfYre448Tsx; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=ECxuosml-CrBUXaV3Ew9iw; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"CUUERn0-eCp7ImA9WhFWEUQ."
+< Last-Modified: Tue, 30 Jul 2013 14:06:47 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"CUYDSHc4fCp7ImA9WhFWEUQ."'><id>https://picasaweb.google.com/data/feed/user/libgdata.picasaweb</id><updated>2013-07-30T14:06:19.934Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#user'/><title>libgdata.picasaweb</title><subtitle/><icon>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s64-c/libgdata.picasaweb.jpg</icon><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb'/><link rel='http://schemas.google.com/photos/2007#slideshow' type='application/x-shockwave-flash' href='https://static.googleusercontent.com/external_content/picasaweb.googleusercontent.com/slideshow.swf?host=picasaweb.google.com&RGB=0x000000&feed=https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb?alt%3Drss'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb?start-index=1&max-results=1000'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><generator version='1.00' uri='http://picasaweb.google.com/'>Picasaweb</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>1000</openSearch:itemsPerPage><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s64-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:quotalimit>16106127360</gphoto:quotalimit><gphoto:quotacurrent>1796070</gphoto:quotacurrent><gphoto:maxPhotosPerAlbum>1000</gphoto:maxPhotosPerAlbum><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409880413253681</id><published>2013-07-30T14:06:54.000Z</published><updated>2013-07-30T14:06:54.614Z</updated><app:edited>2013-07-30T14:06:54.614Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 4 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409880413253681?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum4ForQueryAllAlbums68?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409880413253681?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409880413253681?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409880413253681/acl?authkey=Gv1sRgCOSEzMfX0feeQA'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409880413253681</gphoto:id><gphoto:name>TestAlbum4ForQueryAllAlbums68</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193214000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh4.googleusercontent.com/-Dj-tuEB-sz4/UffIfiPjsDE/AAAAAAAAMek/VnTLegFlzSc/TestAlbum4ForQueryAllAlbums68.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh4.googleusercontent.com/-Dj-tuEB-sz4/UffIfiPjsDE/AAAAAAAAMek/VnTLegFlzSc/s160-c/TestAlbum4ForQueryAllAlbums68.jpg' height='160' width='160'/><media:title type='plain'>Test album 4 for QueryAllAlbums</media:title></media:group></entry><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409876619235281</id><published>2013-07-30T14:06:53.000Z</published><updated>2013-07-30T14:06:53.653Z</updated><app:edited>2013-07-30T14:06:53.653Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 3 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409876619235281?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum3ForQueryAllAlbums69?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409876619235281?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409876619235281?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409876619235281/acl?authkey=Gv1sRgCPmiyez0rYT-Qg'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409876619235281</gphoto:id><gphoto:name>TestAlbum3ForQueryAllAlbums69</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193213000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh3.googleusercontent.com/-NWEN_d_Rhf4/UffIfUG_j9E/AAAAAAAAMeg/GF0PsCeCr-A/TestAlbum3ForQueryAllAlbums69.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-NWEN_d_Rhf4/UffIfUG_j9E/AAAAAAAAMeg/GF0PsCeCr-A/s160-c/TestAlbum3ForQueryAllAlbums69.jpg' height='160' width='160'/><media:title type='plain'>Test album 3 for QueryAllAlbums</media:title></media:group></entry><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409873513866033</id><published>2013-07-30T14:06:52.000Z</published><updated>2013-07-30T14:06:52.851Z</updated><app:edited>2013-07-30T14:06:52.851Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 2 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409873513866033?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum2ForQueryAllAlbums70?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409873513866033?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409873513866033?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409873513866033/acl?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409873513866033</gphoto:id><gphoto:name>TestAlbum2ForQueryAllAlbums70</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193212000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh6.googleusercontent.com/-4Whv1UHATRo/UffIfIinYzE/AAAAAAAAMec/PtrYZnVuv6Y/TestAlbum2ForQueryAllAlbums70.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh6.googleusercontent.com/-4Whv1UHATRo/UffIfIinYzE/AAAAAAAAMec/PtrYZnVuv6Y/s160-c/TestAlbum2ForQueryAllAlbums70.jpg' height='160' width='160'/><media:title type='plain'>Test album 2 for QueryAllAlbums</media:title></media:group></entry><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409867090978209</id><published>2013-07-30T14:06:51.000Z</published><updated>2013-07-30T14:06:51.971Z</updated><app:edited>2013-07-30T14:06:51.971Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 1 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409867090978209?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum1ForQueryAllAlbums72?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409867090978209?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409867090978209?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409867090978209/acl?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409867090978209</gphoto:id><gphoto:name>TestAlbum1ForQueryAllAlbums72</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193211000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh3.googleusercontent.com/-dghQiMuTN2c/UffIewnR5aE/AAAAAAAAMeY/1BIIg4oW3qw/TestAlbum1ForQueryAllAlbums72.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-dghQiMuTN2c/UffIewnR5aE/AAAAAAAAMeY/1BIIg4oW3qw/s160-c/TestAlbum1ForQueryAllAlbums72.jpg' height='160' width='160'/><media:title type='plain'>Test album 1 for QueryAllAlbums</media:title></media:group></entry></feed>
+
--- /dev/null
+> GET /data/feed/api/user/default?start-index=1&max-results=1& HTTP/1.1
+> Soup-Debug-Timestamp: 1375193189
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 15 (0x78d0a0), SoupSocket 8 (0x7cbd30)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375193189
+< Soup-Debug: SoupMessage 15 (0x78d0a0)
+< Expires: Tue, 30 Jul 2013 14:06:29 GMT
+< Date: Tue, 30 Jul 2013 14:06:29 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=VTIsSiiz24TI; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=cec8xqmpQbSkm8P0z7tfbQ; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"CUYMSXozfCp7ImA9WhFWEUQ."
+< Last-Modified: Tue, 30 Jul 2013 14:06:28 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"CUYMSXozfCp7ImA9WhFWEUQ."'><id>https://picasaweb.google.com/data/feed/user/libgdata.picasaweb</id><updated>2013-07-30T14:06:28.484Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#user'/><title>libgdata.picasaweb</title><subtitle/><icon>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s64-c/libgdata.picasaweb.jpg</icon><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb'/><link rel='http://schemas.google.com/photos/2007#slideshow' type='application/x-shockwave-flash' href='https://static.googleusercontent.com/external_content/picasaweb.googleusercontent.com/slideshow.swf?host=picasaweb.google.com&RGB=0x000000&feed=https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb?alt%3Drss'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb?start-index=1&max-results=1'/><link rel='next' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb?start-index=2&max-results=1'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><generator version='1.00' uri='http://picasaweb.google.com/'>Picasaweb</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>1</openSearch:itemsPerPage><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s64-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:quotalimit>16106127360</gphoto:quotalimit><gphoto:quotacurrent>1796070</gphoto:quotacurrent><gphoto:maxPhotosPerAlbum>1000</gphoto:maxPhotosPerAlbum><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409770390610945</id><published>2013-07-30T14:06:27.000Z</published><updated>2013-07-30T14:06:28.484Z</updated><app:edited>2013-07-30T14:06:28.484Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 4 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409770390610945?authkey=Gv1sRgCJalpajqh4yAmwE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum4ForQueryAllAlbums65?authkey=Gv1sRgCJalpajqh4yAmwE'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409770390610945?authkey=Gv1sRgCJalpajqh4yAmwE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409770390610945?authkey=Gv1sRgCJalpajqh4yAmwE'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409770390610945/acl?authkey=Gv1sRgCJalpajqh4yAmwE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409770390610945</gphoto:id><gphoto:name>TestAlbum4ForQueryAllAlbums65</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193187000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh6.googleusercontent.com/-QZYiZ10BaFg/UffIZIYHZAE/AAAAAAAAMdE/Ee7V_yAqIGI/TestAlbum4ForQueryAllAlbums65.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh6.googleusercontent.com/-QZYiZ10BaFg/UffIZIYHZAE/AAAAAAAAMdE/Ee7V_yAqIGI/s160-c/TestAlbum4ForQueryAllAlbums65.jpg' height='160' width='160'/><media:title type='plain'>Test album 4 for QueryAllAlbums</media:title></media:group></entry></feed>
+
+> GET /data/feed/api/user/default?start-index=2&max-results=1& HTTP/1.1
+> Soup-Debug-Timestamp: 1375193189
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 16 (0x78d550), SoupSocket 8 (0x7cbd30)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375193189
+< Soup-Debug: SoupMessage 16 (0x78d550)
+< Expires: Tue, 30 Jul 2013 14:06:29 GMT
+< Date: Tue, 30 Jul 2013 14:06:29 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=XEIIwGhic-hF; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=yHPP3J7OLwaJSj-Qo-7wSA; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"CUYMSXozfCp7ImA9WhFWEUQ."
+< Last-Modified: Tue, 30 Jul 2013 14:06:28 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"CUYMSXozfCp7ImA9WhFWEUQ."'><id>https://picasaweb.google.com/data/feed/user/libgdata.picasaweb</id><updated>2013-07-30T14:06:28.484Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#user'/><title>libgdata.picasaweb</title><subtitle/><icon>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s64-c/libgdata.picasaweb.jpg</icon><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb'/><link rel='http://schemas.google.com/photos/2007#slideshow' type='application/x-shockwave-flash' href='https://static.googleusercontent.com/external_content/picasaweb.googleusercontent.com/slideshow.swf?host=picasaweb.google.com&RGB=0x000000&feed=https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb?alt%3Drss'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb?start-index=2&max-results=1'/><link rel='previous' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb?start-index=1&max-results=1'/><link rel='next' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb?start-index=3&max-results=1'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><generator version='1.00' uri='http://picasaweb.google.com/'>Picasaweb</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>2</openSearch:startIndex><openSearch:itemsPerPage>1</openSearch:itemsPerPage><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s64-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:quotalimit>16106127360</gphoto:quotalimit><gphoto:quotacurrent>1796070</gphoto:quotacurrent><gphoto:maxPhotosPerAlbum>1000</gphoto:maxPhotosPerAlbum><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409767655144225</id><published>2013-07-30T14:06:26.000Z</published><updated>2013-07-30T14:06:27.337Z</updated><app:edited>2013-07-30T14:06:27.337Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 3 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409767655144225?authkey=Gv1sRgCMeXr-Cn9eaBeg'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum3ForQueryAllAlbums66?authkey=Gv1sRgCMeXr-Cn9eaBeg'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409767655144225?authkey=Gv1sRgCMeXr-Cn9eaBeg'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409767655144225?authkey=Gv1sRgCMeXr-Cn9eaBeg'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409767655144225/acl?authkey=Gv1sRgCMeXr-Cn9eaBeg'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409767655144225</gphoto:id><gphoto:name>TestAlbum3ForQueryAllAlbums66</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193186000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh5.googleusercontent.com/-6FD1zjHLAwI/UffIY-L7eyE/AAAAAAAAMdA/PbAySOTqjDI/TestAlbum3ForQueryAllAlbums66.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh5.googleusercontent.com/-6FD1zjHLAwI/UffIY-L7eyE/AAAAAAAAMdA/PbAySOTqjDI/s160-c/TestAlbum3ForQueryAllAlbums66.jpg' height='160' width='160'/><media:title type='plain'>Test album 3 for QueryAllAlbums</media:title></media:group></entry></feed>
+
+> GET /data/feed/api/user/default?start-index=1&max-results=3& HTTP/1.1
+> Soup-Debug-Timestamp: 1375193189
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 17 (0x78d550), SoupSocket 8 (0x7cbd30)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375193189
+< Soup-Debug: SoupMessage 17 (0x78d550)
+< Expires: Tue, 30 Jul 2013 14:06:30 GMT
+< Date: Tue, 30 Jul 2013 14:06:30 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=es0kWzlJdhrP; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=z83HUoAZOGYXavkr0AMHIg; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"CUYMSXozfCp7ImA9WhFWEUQ."
+< Last-Modified: Tue, 30 Jul 2013 14:06:28 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"CUYMSXozfCp7ImA9WhFWEUQ."'><id>https://picasaweb.google.com/data/feed/user/libgdata.picasaweb</id><updated>2013-07-30T14:06:28.484Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#user'/><title>libgdata.picasaweb</title><subtitle/><icon>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s64-c/libgdata.picasaweb.jpg</icon><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb'/><link rel='http://schemas.google.com/photos/2007#slideshow' type='application/x-shockwave-flash' href='https://static.googleusercontent.com/external_content/picasaweb.googleusercontent.com/slideshow.swf?host=picasaweb.google.com&RGB=0x000000&feed=https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb?alt%3Drss'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb?start-index=1&max-results=3'/><link rel='next' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb?start-index=4&max-results=3'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><generator version='1.00' uri='http://picasaweb.google.com/'>Picasaweb</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>3</openSearch:itemsPerPage><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s64-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:quotalimit>16106127360</gphoto:quotalimit><gphoto:quotacurrent>1796070</gphoto:quotacurrent><gphoto:maxPhotosPerAlbum>1000</gphoto:maxPhotosPerAlbum><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409770390610945</id><published>2013-07-30T14:06:27.000Z</published><updated>2013-07-30T14:06:28.484Z</updated><app:edited>2013-07-30T14:06:28.484Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 4 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409770390610945?authkey=Gv1sRgCJalpajqh4yAmwE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum4ForQueryAllAlbums65?authkey=Gv1sRgCJalpajqh4yAmwE'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409770390610945?authkey=Gv1sRgCJalpajqh4yAmwE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409770390610945?authkey=Gv1sRgCJalpajqh4yAmwE'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409770390610945/acl?authkey=Gv1sRgCJalpajqh4yAmwE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409770390610945</gphoto:id><gphoto:name>TestAlbum4ForQueryAllAlbums65</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193187000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh6.googleusercontent.com/-QZYiZ10BaFg/UffIZIYHZAE/AAAAAAAAMdE/Ee7V_yAqIGI/TestAlbum4ForQueryAllAlbums65.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh6.googleusercontent.com/-QZYiZ10BaFg/UffIZIYHZAE/AAAAAAAAMdE/Ee7V_yAqIGI/s160-c/TestAlbum4ForQueryAllAlbums65.jpg' height='160' width='160'/><media:title type='plain'>Test album 4 for QueryAllAlbums</media:title></media:group></entry><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409767655144225</id><published>2013-07-30T14:06:26.000Z</published><updated>2013-07-30T14:06:27.337Z</updated><app:edited>2013-07-30T14:06:27.337Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 3 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409767655144225?authkey=Gv1sRgCMeXr-Cn9eaBeg'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum3ForQueryAllAlbums66?authkey=Gv1sRgCMeXr-Cn9eaBeg'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409767655144225?authkey=Gv1sRgCMeXr-Cn9eaBeg'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409767655144225?authkey=Gv1sRgCMeXr-Cn9eaBeg'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409767655144225/acl?authkey=Gv1sRgCMeXr-Cn9eaBeg'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409767655144225</gphoto:id><gphoto:name>TestAlbum3ForQueryAllAlbums66</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193186000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh5.googleusercontent.com/-6FD1zjHLAwI/UffIY-L7eyE/AAAAAAAAMdA/PbAySOTqjDI/TestAlbum3ForQueryAllAlbums66.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh5.googleusercontent.com/-6FD1zjHLAwI/UffIY-L7eyE/AAAAAAAAMdA/PbAySOTqjDI/s160-c/TestAlbum3ForQueryAllAlbums66.jpg' height='160' width='160'/><media:title type='plain'>Test album 3 for QueryAllAlbums</media:title></media:group></entry><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409760167466529</id><published>2013-07-30T14:06:25.000Z</published><updated>2013-07-30T14:06:26.270Z</updated><app:edited>2013-07-30T14:06:26.270Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 2 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409760167466529?authkey=Gv1sRgCIG9pv3SjaafUw'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum2ForQueryAllAlbums67?authkey=Gv1sRgCIG9pv3SjaafUw'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409760167466529?authkey=Gv1sRgCIG9pv3SjaafUw'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409760167466529?authkey=Gv1sRgCIG9pv3SjaafUw'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409760167466529/acl?authkey=Gv1sRgCIG9pv3SjaafUw'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409760167466529</gphoto:id><gphoto:name>TestAlbum2ForQueryAllAlbums67</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193185000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh3.googleusercontent.com/-TgBhr7RaKPg/UffIYiSuliE/AAAAAAAAMc8/GItVseZLgPY/TestAlbum2ForQueryAllAlbums67.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-TgBhr7RaKPg/UffIYiSuliE/AAAAAAAAMc8/GItVseZLgPY/s160-c/TestAlbum2ForQueryAllAlbums67.jpg' height='160' width='160'/><media:title type='plain'>Test album 2 for QueryAllAlbums</media:title></media:group></entry></feed>
+
--- /dev/null
+> GET /data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553?authkey=Gv1sRgCKKx5unfo4qvuAE HTTP/1.1
+> Soup-Debug-Timestamp: 1375365715
+> Soup-Debug: SoupSession 1 (0x6682a0), SoupMessage 6 (0x78e2c0), SoupSocket 5 (0x814f60)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAADbKT_hVtH1iMNFS9uMoShgbOwfO1I8gu_QL1axjY7_RDwWa451TM_GNncBQYYNVbQl7II_qsuw32dZOzKBeQvC_v1PdhrjXO-NFJNCL5dzZba7l5SiuR1EKzVQXvM2LivcCCis9h0Kla7JqZxEb9MLnK4dFKZO3IRjWlfOYo6ZF5SQ8Sh79BYqZLgHcGvBBE9WgtvjjPpybc2XVUZo7c0rqe3oWNAEb-hQQrb_KNQ2fC1I2LA4Y5KvpsdQ7sK0ysK2gEPqx_nB3EPXUMz0emel44F92MzePN7w_NDZD6ILaw
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375365715
+< Soup-Debug: SoupMessage 6 (0x78e2c0)
+< Expires: Thu, 01 Aug 2013 14:01:56 GMT
+< Date: Thu, 01 Aug 2013 14:01:56 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=HgHPJs9eYrxW; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=VhJDmQl_GikFUPNp-5ZEKA; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"D0AFRXY6eCp7ImA9WhFWE0s."
+< Last-Modified: Thu, 01 Aug 2013 14:01:54 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:exif='http://schemas.google.com/photos/exif/2007' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"D0AFRXY6eCp7ImA9WhFWE0s."'><id>https://picasaweb.google.com/data/feed/user/libgdata.picasaweb/albumid/5907162005897469553</id><updated>2013-08-01T14:01:54.810Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album for QueryFiles</title><subtitle/><rights>private</rights><icon>https://lh4.googleusercontent.com/-CtgUPcEap3M/UfpqRGCuwDE/AAAAAAAAMi8/AosQHFkoqDE/s160-c/TestAlbumForQueryFiles28.jpg</icon><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553?authkey=Gv1sRgCIbvuqunu_OdAw'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553?authkey=Gv1sRgCIbvuqunu_OdAw'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://picasaweb.google.com/data/upload/resumable/media/create-session/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553?authkey=Gv1sRgCIbvuqunu_OdAw'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles28?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='http://schemas.google.com/photos/2007#slideshow' type='application/x-shockwave-flash' href='https://static.googleusercontent.com/external_content/picasaweb.googleusercontent.com/slideshow.swf?host=picasaweb.google.com&RGB=0x000000&feed=https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553?alt%3Drss%26authkey%3DGv1sRgCIbvuqunu_OdAw'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907162005897469553'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/acl?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553?start-index=1&max-results=1000&authkey=Gv1sRgCKKx5unfo4qvuAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><generator version='1.00' uri='http://picasaweb.google.com/'>Picasaweb</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>1000</openSearch:itemsPerPage><gphoto:id>5907162005897469553</gphoto:id><gphoto:name>TestAlbumForQueryFiles28</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375365698000</gphoto:timestamp><gphoto:numphotos>4</gphoto:numphotos><gphoto:numphotosremaining>996</gphoto:numphotosremaining><gphoto:bytesUsed>70640</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:allowPrints>true</gphoto:allowPrints><gphoto:allowDownloads>true</gphoto:allowDownloads><entry gd:etag='"YD4qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314</id><published>2013-08-01T14:45:38.000Z</published><updated>2013-08-01T14:45:38.859Z</updated><app:edited>2013-08-01T14:45:38.859Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Test file 1</title><summary/><content type='image/jpeg' src='https://lh3.googleusercontent.com/-PFuCSAHxsIM/Ufp0ku72hNI/AAAAAAAAMsE/Eka2goyoX-Q/Test%252520file%2525201.jpg'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles39?authkey=Gv1sRgCKKx5unfo4qvuAE#5907162035673007314'/><link rel='http://schemas.google.com/photos/2007#canonical' type='text/html' href='https://picasaweb.google.com/lh/photo/TclHBnxkCWRiCOH8UL0V8anPQSJCD8MPruhZxgfAX5U'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit-media' type='image/jpeg' href='https://picasaweb.google.com/data/media/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907162005897469553&iid=5907162035673007314'/><gphoto:id>5907162035673007314</gphoto:id><gphoto:albumid>5907162005897469553</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154790828000</gphoto:timestamp><gphoto:imageVersion>12993</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>0</gphoto:commentCount><gphoto:streamId>shared_group_5907162035673007314</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><gphoto:shapes faces='done'/><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh3.googleusercontent.com/-PFuCSAHxsIM/Ufp0ku72hNI/AAAAAAAAMsE/Eka2goyoX-Q/Test%252520file%2525201.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-PFuCSAHxsIM/Ufp0ku72hNI/AAAAAAAAMsE/Eka2goyoX-Q/s72/Test%252520file%2525201.jpg' height='67' width='72'/><media:thumbnail url='https://lh3.googleusercontent.com/-PFuCSAHxsIM/Ufp0ku72hNI/AAAAAAAAMsE/Eka2goyoX-Q/s144/Test%252520file%2525201.jpg' height='92' width='100'/><media:thumbnail url='https://lh3.googleusercontent.com/-PFuCSAHxsIM/Ufp0ku72hNI/AAAAAAAAMsE/Eka2goyoX-Q/s288/Test%252520file%2525201.jpg' height='92' width='100'/><media:title type='plain'>Test file 1</media:title></media:group></entry><entry gd:etag='"YD4qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907150735804533922</id><published>2013-08-01T14:01:47.000Z</published><updated>2013-08-01T14:01:48.759Z</updated><app:edited>2013-08-01T14:01:48.759Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Test file 2</title><summary/><content type='image/jpeg' src='https://lh3.googleusercontent.com/-RltiWbycVSo/UfpqS_pRDKI/AAAAAAAAMiw/_9ctA9JycPw/Test%252520file%2525202.jpg'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907150735804533922?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles28?authkey=Gv1sRgCKKx5unfo4qvuAE#5907150735804533922'/><link rel='http://schemas.google.com/photos/2007#canonical' type='text/html' href='https://picasaweb.google.com/lh/photo/_pmT1eoBckPSKhzcVg2idQSbMZXhNuK8PzLdsH_ZdZ4'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907150735804533922?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907150735804533922?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit-media' type='image/jpeg' href='https://picasaweb.google.com/data/media/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907150735804533922?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907162005897469553&iid=5907150735804533922'/><gphoto:id>5907150735804533922</gphoto:id><gphoto:albumid>5907162005897469553</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154790828000</gphoto:timestamp><gphoto:imageVersion>12844</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>0</gphoto:commentCount><gphoto:streamId>shared_group_5907150735804533922</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><gphoto:shapes faces='done'/><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh3.googleusercontent.com/-RltiWbycVSo/UfpqS_pRDKI/AAAAAAAAMiw/_9ctA9JycPw/Test%252520file%2525202.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-RltiWbycVSo/UfpqS_pRDKI/AAAAAAAAMiw/_9ctA9JycPw/s72/Test%252520file%2525202.jpg' height='67' width='72'/><media:thumbnail url='https://lh3.googleusercontent.com/-RltiWbycVSo/UfpqS_pRDKI/AAAAAAAAMiw/_9ctA9JycPw/s144/Test%252520file%2525202.jpg' height='92' width='100'/><media:thumbnail url='https://lh3.googleusercontent.com/-RltiWbycVSo/UfpqS_pRDKI/AAAAAAAAMiw/_9ctA9JycPw/s288/Test%252520file%2525202.jpg' height='92' width='100'/><media:title type='plain'>Test file 2</media:title></media:group></entry><entry gd:etag='"YD4qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907150746078059218</id><published>2013-08-01T14:01:50.000Z</published><updated>2013-08-01T14:01:52.246Z</updated><app:edited>2013-08-01T14:01:52.246Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Test file 3</title><summary/><content type='image/jpeg' src='https://lh3.googleusercontent.com/-UoUp1RY-HzI/UfpqTl6qmtI/AAAAAAAAMi4/kjB6kl2TstQ/Test%252520file%2525203.jpg'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907150746078059218?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles28?authkey=Gv1sRgCKKx5unfo4qvuAE#5907150746078059218'/><link rel='http://schemas.google.com/photos/2007#canonical' type='text/html' href='https://picasaweb.google.com/lh/photo/8GOnjgn6NI1zCCfDjHTJ-wSbMZXhNuK8PzLdsH_ZdZ4'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907150746078059218?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907150746078059218?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit-media' type='image/jpeg' href='https://picasaweb.google.com/data/media/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907150746078059218?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907162005897469553&iid=5907150746078059218'/><gphoto:id>5907150746078059218</gphoto:id><gphoto:albumid>5907162005897469553</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154790828000</gphoto:timestamp><gphoto:imageVersion>12846</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>0</gphoto:commentCount><gphoto:streamId>shared_group_5907150746078059218</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><gphoto:shapes faces='done'/><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh3.googleusercontent.com/-UoUp1RY-HzI/UfpqTl6qmtI/AAAAAAAAMi4/kjB6kl2TstQ/Test%252520file%2525203.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-UoUp1RY-HzI/UfpqTl6qmtI/AAAAAAAAMi4/kjB6kl2TstQ/s72/Test%252520file%2525203.jpg' height='67' width='72'/><media:thumbnail url='https://lh3.googleusercontent.com/-UoUp1RY-HzI/UfpqTl6qmtI/AAAAAAAAMi4/kjB6kl2TstQ/s144/Test%252520file%2525203.jpg' height='92' width='100'/><media:thumbnail url='https://lh3.googleusercontent.com/-UoUp1RY-HzI/UfpqTl6qmtI/AAAAAAAAMi4/kjB6kl2TstQ/s288/Test%252520file%2525203.jpg' height='92' width='100'/><media:title type='plain'>Test file 3</media:title></media:group></entry><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907150765200958130</id><published>2013-08-01T14:01:54.000Z</published><updated>2013-08-01T14:01:54.810Z</updated><app:edited>2013-08-01T14:01:54.810Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Test file 4</title><summary/><content type='image/jpeg' src='https://lh3.googleusercontent.com/--ZWuOHq1joc/UfpqUtJ64rI/AAAAAAAAMi8/UtSqYwFJze4/Test%252520file%2525204.jpg'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907150765200958130?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles28?authkey=Gv1sRgCKKx5unfo4qvuAE#5907150765200958130'/><link rel='http://schemas.google.com/photos/2007#canonical' type='text/html' href='https://picasaweb.google.com/lh/photo/pnewiBw4z_FMxAypWOS5wwSbMZXhNuK8PzLdsH_ZdZ4'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907150765200958130?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907150765200958130?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit-media' type='image/jpeg' href='https://picasaweb.google.com/data/media/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907150765200958130?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907162005897469553&iid=5907150765200958130'/><gphoto:id>5907150765200958130</gphoto:id><gphoto:albumid>5907162005897469553</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154790828000</gphoto:timestamp><gphoto:imageVersion>12847</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>0</gphoto:commentCount><gphoto:streamId>shared_group_5907150765200958130</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><gphoto:shapes faces='done'/><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh3.googleusercontent.com/--ZWuOHq1joc/UfpqUtJ64rI/AAAAAAAAMi8/UtSqYwFJze4/Test%252520file%2525204.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/--ZWuOHq1joc/UfpqUtJ64rI/AAAAAAAAMi8/UtSqYwFJze4/s72/Test%252520file%2525204.jpg' height='67' width='72'/><media:thumbnail url='https://lh3.googleusercontent.com/--ZWuOHq1joc/UfpqUtJ64rI/AAAAAAAAMi8/UtSqYwFJze4/s144/Test%252520file%2525204.jpg' height='92' width='100'/><media:thumbnail url='https://lh3.googleusercontent.com/--ZWuOHq1joc/UfpqUtJ64rI/AAAAAAAAMi8/UtSqYwFJze4/s288/Test%252520file%2525204.jpg' height='92' width='100'/><media:title type='plain'>Test file 4</media:title></media:group></entry></feed>
+
--- /dev/null
+> GET /data/feed/api/user/libgdata.picasaweb/albumid/5907150970851830257?authkey=Gv1sRgCPTu9_vn9oT1IA HTTP/1.1
+> Soup-Debug-Timestamp: 1375365781
+> Soup-Debug: SoupSession 1 (0x6682a0), SoupMessage 30 (0x7fffe401a1b0), SoupSocket 20 (0x814a20)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAADbKT_hVtH1iMNFS9uMoShgbOwfO1I8gu_QL1axjY7_RDwWa451TM_GNncBQYYNVbQl7II_qsuw32dZOzKBeQvC_v1PdhrjXO-NFJNCL5dzZba7l5SiuR1EKzVQXvM2LivcCCis9h0Kla7JqZxEb9MLnK4dFKZO3IRjWlfOYo6ZF5SQ8Sh79BYqZLgHcGvBBE9WgtvjjPpybc2XVUZo7c0rqe3oWNAEb-hQQrb_KNQ2fC1I2LA4Y5KvpsdQ7sK0ysK2gEPqx_nB3EPXUMz0emel44F92MzePN7w_NDZD6ILaw
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375365783
+< Soup-Debug: SoupMessage 30 (0x7fffe401a1b0)
+< Expires: Thu, 01 Aug 2013 14:03:03 GMT
+< Date: Thu, 01 Aug 2013 14:03:03 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=odZ6L0dPl87n; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=C_WZDJNxw5u4c49ye1jR1A; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"D0AMQH8yeCp7ImA9WhFWE0s."
+< Last-Modified: Thu, 01 Aug 2013 14:03:01 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:exif='http://schemas.google.com/photos/exif/2007' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"D0AMQH8yeCp7ImA9WhFWE0s."'><id>https://picasaweb.google.com/data/feed/user/libgdata.picasaweb/albumid/5907150970851830257</id><updated>2013-08-01T14:03:01.190Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album for QueryFiles</title><subtitle/><rights>private</rights><icon>https://lh6.googleusercontent.com/-CNW6WO3Zmgc/UfpqgrQ6KfE/AAAAAAAAMk8/a8UZk0aFWHk/s160-c/TestAlbumForQueryFiles31.jpg</icon><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907150970851830257?authkey=Gv1sRgCPTu9_vn9oT1IA'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907150970851830257?authkey=Gv1sRgCPTu9_vn9oT1IA'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://picasaweb.google.com/data/upload/resumable/media/create-session/feed/api/user/libgdata.picasaweb/albumid/5907150970851830257?authkey=Gv1sRgCPTu9_vn9oT1IA'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles31?authkey=Gv1sRgCPTu9_vn9oT1IA'/><link rel='http://schemas.google.com/photos/2007#slideshow' type='application/x-shockwave-flash' href='https://static.googleusercontent.com/external_content/picasaweb.googleusercontent.com/slideshow.swf?host=picasaweb.google.com&RGB=0x000000&feed=https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907150970851830257?alt%3Drss%26authkey%3DGv1sRgCPTu9_vn9oT1IA'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907150970851830257'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907150970851830257/acl?authkey=Gv1sRgCPTu9_vn9oT1IA'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907150970851830257?start-index=1&max-results=1000&authkey=Gv1sRgCPTu9_vn9oT1IA'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><generator version='1.00' uri='http://picasaweb.google.com/'>Picasaweb</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>1000</openSearch:itemsPerPage><gphoto:id>5907150970851830257</gphoto:id><gphoto:name>TestAlbumForQueryFiles31</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375365760000</gphoto:timestamp><gphoto:numphotos>4</gphoto:numphotos><gphoto:numphotosremaining>996</gphoto:numphotosremaining><gphoto:bytesUsed>70640</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:allowPrints>true</gphoto:allowPrints><gphoto:allowDownloads>true</gphoto:allowDownloads><entry gd:etag='"YD4qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907150970851830257/photoid/5907150979242991970</id><published>2013-08-01T14:02:44.000Z</published><updated>2013-08-01T14:02:45.583Z</updated><app:edited>2013-08-01T14:02:45.583Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Test file 1</title><summary/><content type='image/jpeg' src='https://lh4.googleusercontent.com/-R6JLKD7Z3Xs/UfpqhKhhIWI/AAAAAAAAMko/q83hg0oZK3M/Test%252520file%2525201.jpg'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907150970851830257/photoid/5907150979242991970?authkey=Gv1sRgCPTu9_vn9oT1IA'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles31?authkey=Gv1sRgCPTu9_vn9oT1IA#5907150979242991970'/><link rel='http://schemas.google.com/photos/2007#canonical' type='text/html' href='https://picasaweb.google.com/lh/photo/pm2pHgog8qyj5iZrfnlMcaNDvCAs0NJYitU2nTReWpA'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907150970851830257/photoid/5907150979242991970?authkey=Gv1sRgCPTu9_vn9oT1IA'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907150970851830257/photoid/5907150979242991970?authkey=Gv1sRgCPTu9_vn9oT1IA'/><link rel='edit-media' type='image/jpeg' href='https://picasaweb.google.com/data/media/api/user/libgdata.picasaweb/albumid/5907150970851830257/photoid/5907150979242991970?authkey=Gv1sRgCPTu9_vn9oT1IA'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907150970851830257&iid=5907150979242991970'/><gphoto:id>5907150979242991970</gphoto:id><gphoto:albumid>5907150970851830257</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154790828000</gphoto:timestamp><gphoto:imageVersion>12874</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>0</gphoto:commentCount><gphoto:streamId>shared_group_5907150979242991970</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><gphoto:shapes faces='done'/><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh4.googleusercontent.com/-R6JLKD7Z3Xs/UfpqhKhhIWI/AAAAAAAAMko/q83hg0oZK3M/Test%252520file%2525201.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh4.googleusercontent.com/-R6JLKD7Z3Xs/UfpqhKhhIWI/AAAAAAAAMko/q83hg0oZK3M/s72/Test%252520file%2525201.jpg' height='67' width='72'/><media:thumbnail url='https://lh4.googleusercontent.com/-R6JLKD7Z3Xs/UfpqhKhhIWI/AAAAAAAAMko/q83hg0oZK3M/s144/Test%252520file%2525201.jpg' height='92' width='100'/><media:thumbnail url='https://lh4.googleusercontent.com/-R6JLKD7Z3Xs/UfpqhKhhIWI/AAAAAAAAMko/q83hg0oZK3M/s288/Test%252520file%2525201.jpg' height='92' width='100'/><media:title type='plain'>Test file 1</media:title></media:group></entry><entry gd:etag='"YD4qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907150970851830257/photoid/5907150993706783554</id><published>2013-08-01T14:02:48.000Z</published><updated>2013-08-01T14:02:49.253Z</updated><app:edited>2013-08-01T14:02:49.253Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Test file 2</title><summary/><content type='image/jpeg' src='https://lh4.googleusercontent.com/-2UJy1JY1riE/UfpqiAZ9E0I/AAAAAAAAMkw/QTOe8Nmpd3w/Test%252520file%2525202.jpg'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907150970851830257/photoid/5907150993706783554?authkey=Gv1sRgCPTu9_vn9oT1IA'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles31?authkey=Gv1sRgCPTu9_vn9oT1IA#5907150993706783554'/><link rel='http://schemas.google.com/photos/2007#canonical' type='text/html' href='https://picasaweb.google.com/lh/photo/A_Z2rLno4AaMzm2PuYamQaNDvCAs0NJYitU2nTReWpA'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907150970851830257/photoid/5907150993706783554?authkey=Gv1sRgCPTu9_vn9oT1IA'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907150970851830257/photoid/5907150993706783554?authkey=Gv1sRgCPTu9_vn9oT1IA'/><link rel='edit-media' type='image/jpeg' href='https://picasaweb.google.com/data/media/api/user/libgdata.picasaweb/albumid/5907150970851830257/photoid/5907150993706783554?authkey=Gv1sRgCPTu9_vn9oT1IA'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907150970851830257&iid=5907150993706783554'/><gphoto:id>5907150993706783554</gphoto:id><gphoto:albumid>5907150970851830257</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154790828000</gphoto:timestamp><gphoto:imageVersion>12876</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>0</gphoto:commentCount><gphoto:streamId>shared_group_5907150993706783554</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><gphoto:shapes faces='done'/><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh4.googleusercontent.com/-2UJy1JY1riE/UfpqiAZ9E0I/AAAAAAAAMkw/QTOe8Nmpd3w/Test%252520file%2525202.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh4.googleusercontent.com/-2UJy1JY1riE/UfpqiAZ9E0I/AAAAAAAAMkw/QTOe8Nmpd3w/s72/Test%252520file%2525202.jpg' height='67' width='72'/><media:thumbnail url='https://lh4.googleusercontent.com/-2UJy1JY1riE/UfpqiAZ9E0I/AAAAAAAAMkw/QTOe8Nmpd3w/s144/Test%252520file%2525202.jpg' height='92' width='100'/><media:thumbnail url='https://lh4.googleusercontent.com/-2UJy1JY1riE/UfpqiAZ9E0I/AAAAAAAAMkw/QTOe8Nmpd3w/s288/Test%252520file%2525202.jpg' height='92' width='100'/><media:title type='plain'>Test file 2</media:title></media:group></entry><entry gd:etag='"YD4qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907150970851830257/photoid/5907151009722255426</id><published>2013-08-01T14:02:51.000Z</published><updated>2013-08-01T14:02:53.138Z</updated><app:edited>2013-08-01T14:02:53.138Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Test file 3</title><summary/><content type='image/jpeg' src='https://lh3.googleusercontent.com/-MOhsknC4_h8/Ufpqi8EVyEI/AAAAAAAAMk4/GZOUn9oEJuo/Test%252520file%2525203.jpg'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907150970851830257/photoid/5907151009722255426?authkey=Gv1sRgCPTu9_vn9oT1IA'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles31?authkey=Gv1sRgCPTu9_vn9oT1IA#5907151009722255426'/><link rel='http://schemas.google.com/photos/2007#canonical' type='text/html' href='https://picasaweb.google.com/lh/photo/S5XCyEH34GtyQU1brCGKLqNDvCAs0NJYitU2nTReWpA'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907150970851830257/photoid/5907151009722255426?authkey=Gv1sRgCPTu9_vn9oT1IA'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907150970851830257/photoid/5907151009722255426?authkey=Gv1sRgCPTu9_vn9oT1IA'/><link rel='edit-media' type='image/jpeg' href='https://picasaweb.google.com/data/media/api/user/libgdata.picasaweb/albumid/5907150970851830257/photoid/5907151009722255426?authkey=Gv1sRgCPTu9_vn9oT1IA'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907150970851830257&iid=5907151009722255426'/><gphoto:id>5907151009722255426</gphoto:id><gphoto:albumid>5907150970851830257</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154790828000</gphoto:timestamp><gphoto:imageVersion>12878</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>0</gphoto:commentCount><gphoto:streamId>shared_group_5907151009722255426</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><gphoto:shapes faces='done'/><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh3.googleusercontent.com/-MOhsknC4_h8/Ufpqi8EVyEI/AAAAAAAAMk4/GZOUn9oEJuo/Test%252520file%2525203.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-MOhsknC4_h8/Ufpqi8EVyEI/AAAAAAAAMk4/GZOUn9oEJuo/s72/Test%252520file%2525203.jpg' height='67' width='72'/><media:thumbnail url='https://lh3.googleusercontent.com/-MOhsknC4_h8/Ufpqi8EVyEI/AAAAAAAAMk4/GZOUn9oEJuo/s144/Test%252520file%2525203.jpg' height='92' width='100'/><media:thumbnail url='https://lh3.googleusercontent.com/-MOhsknC4_h8/Ufpqi8EVyEI/AAAAAAAAMk4/GZOUn9oEJuo/s288/Test%252520file%2525203.jpg' height='92' width='100'/><media:title type='plain'>Test file 3</media:title></media:group></entry><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907150970851830257/photoid/5907151050387769170</id><published>2013-08-01T14:03:01.000Z</published><updated>2013-08-01T14:03:01.190Z</updated><app:edited>2013-08-01T14:03:01.190Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Test file 4</title><summary/><content type='image/jpeg' src='https://lh4.googleusercontent.com/-xLWPcUKaQ5s/UfpqlTjwR1I/AAAAAAAAMk8/Hq6XxuSGd0I/Test%252520file%2525204.jpg'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907150970851830257/photoid/5907151050387769170?authkey=Gv1sRgCPTu9_vn9oT1IA'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles31?authkey=Gv1sRgCPTu9_vn9oT1IA#5907151050387769170'/><link rel='http://schemas.google.com/photos/2007#canonical' type='text/html' href='https://picasaweb.google.com/lh/photo/H85zn32tavM7qEcwmhGVEKNDvCAs0NJYitU2nTReWpA'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907150970851830257/photoid/5907151050387769170?authkey=Gv1sRgCPTu9_vn9oT1IA'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907150970851830257/photoid/5907151050387769170?authkey=Gv1sRgCPTu9_vn9oT1IA'/><link rel='edit-media' type='image/jpeg' href='https://picasaweb.google.com/data/media/api/user/libgdata.picasaweb/albumid/5907150970851830257/photoid/5907151050387769170?authkey=Gv1sRgCPTu9_vn9oT1IA'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907150970851830257&iid=5907151050387769170'/><gphoto:id>5907151050387769170</gphoto:id><gphoto:albumid>5907150970851830257</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154790828000</gphoto:timestamp><gphoto:imageVersion>12879</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>0</gphoto:commentCount><gphoto:streamId>shared_group_5907151050387769170</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><gphoto:shapes faces='done'/><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh4.googleusercontent.com/-xLWPcUKaQ5s/UfpqlTjwR1I/AAAAAAAAMk8/Hq6XxuSGd0I/Test%252520file%2525204.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh4.googleusercontent.com/-xLWPcUKaQ5s/UfpqlTjwR1I/AAAAAAAAMk8/Hq6XxuSGd0I/s72/Test%252520file%2525204.jpg' height='67' width='72'/><media:thumbnail url='https://lh4.googleusercontent.com/-xLWPcUKaQ5s/UfpqlTjwR1I/AAAAAAAAMk8/Hq6XxuSGd0I/s144/Test%252520file%2525204.jpg' height='92' width='100'/><media:thumbnail url='https://lh4.googleusercontent.com/-xLWPcUKaQ5s/UfpqlTjwR1I/AAAAAAAAMk8/Hq6XxuSGd0I/s288/Test%252520file%2525204.jpg' height='92' width='100'/><media:title type='plain'>Test file 4</media:title></media:group></entry></feed>
+
--- /dev/null
+> GET /data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314 HTTP/1.1
+> Soup-Debug-Timestamp: 1375365755
+> Soup-Debug: SoupSession 1 (0x6682a0), SoupMessage 22 (0x78e0e0), SoupSocket 15 (0x814ae0)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAADbKT_hVtH1iMNFS9uMoShgbOwfO1I8gu_QL1axjY7_RDwWa451TM_GNncBQYYNVbQl7II_qsuw32dZOzKBeQvC_v1PdhrjXO-NFJNCL5dzZba7l5SiuR1EKzVQXvM2LivcCCis9h0Kla7JqZxEb9MLnK4dFKZO3IRjWlfOYo6ZF5SQ8Sh79BYqZLgHcGvBBE9WgtvjjPpybc2XVUZo7c0rqe3oWNAEb-hQQrb_KNQ2fC1I2LA4Y5KvpsdQ7sK0ysK2gEPqx_nB3EPXUMz0emel44F92MzePN7w_NDZD6ILaw
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375365756
+< Soup-Debug: SoupMessage 22 (0x78e0e0)
+< Expires: Thu, 01 Aug 2013 14:02:36 GMT
+< Date: Thu, 01 Aug 2013 14:02:36 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=fqhw_TA5BLMO; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=bqW-m3pKdfh_jVjTdrZ5Kw; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: "YD4qeyI."
+< Last-Modified: Thu, 01 Aug 2013 14:02:24 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:exif='http://schemas.google.com/photos/exif/2007' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"YD4qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314</id><published>2013-08-01T14:45:38.000Z</published><updated>2013-08-01T14:45:38.859Z</updated><app:edited>2013-08-01T14:45:38.859Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Test file 1</title><summary/><content type='image/jpeg' src='https://lh3.googleusercontent.com/-PFuCSAHxsIM/Ufp0ku72hNI/AAAAAAAAMsE/Eka2goyoX-Q/Test%252520file%2525201.jpg'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles39?authkey=Gv1sRgCKKx5unfo4qvuAE#5907162035673007314'/><link rel='http://schemas.google.com/photos/2007#canonical' type='text/html' href='https://picasaweb.google.com/lh/photo/TclHBnxkCWRiCOH8UL0V8anPQSJCD8MPruhZxgfAX5U'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit-media' type='image/jpeg' href='https://picasaweb.google.com/data/media/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907162005897469553&iid=5907162035673007314'/><gphoto:id>5907162035673007314</gphoto:id><gphoto:albumid>5907162005897469553</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154790828000</gphoto:timestamp><gphoto:imageVersion>12993</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>0</gphoto:commentCount><gphoto:streamId>shared_group_5907162035673007314</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><gphoto:shapes faces='done'/><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh3.googleusercontent.com/-PFuCSAHxsIM/Ufp0ku72hNI/AAAAAAAAMsE/Eka2goyoX-Q/Test%252520file%2525201.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-PFuCSAHxsIM/Ufp0ku72hNI/AAAAAAAAMsE/Eka2goyoX-Q/s72/Test%252520file%2525201.jpg' height='67' width='72'/><media:thumbnail url='https://lh3.googleusercontent.com/-PFuCSAHxsIM/Ufp0ku72hNI/AAAAAAAAMsE/Eka2goyoX-Q/s144/Test%252520file%2525201.jpg' height='92' width='100'/><media:thumbnail url='https://lh3.googleusercontent.com/-PFuCSAHxsIM/Ufp0ku72hNI/AAAAAAAAMsE/Eka2goyoX-Q/s288/Test%252520file%2525201.jpg' height='92' width='100'/><media:title type='plain'>Test file 1</media:title></media:group></entry>
+
--- /dev/null
+> GET /data/entry/api/user/default HTTP/1.1
+> Soup-Debug-Timestamp: 1375193184
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 10 (0x78d0a0), SoupSocket 4 (0x7cbc70)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375193184
+< Soup-Debug: SoupMessage 10 (0x78d0a0)
+< Expires: Tue, 30 Jul 2013 14:06:24 GMT
+< Date: Tue, 30 Jul 2013 14:06:24 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=1WZ1nEPscX1U; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=Ya5gyRenuUJuUww91WNdQg; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"CUYMQnk-eCp7ImA9WhFWEUQ."
+< Last-Modified: Tue, 30 Jul 2013 14:06:23 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"CUYMQnk-eCp7ImA9WhFWEUQ."'><id>https://picasaweb.google.com/data/feed/user/libgdata.picasaweb</id><published>2013-07-30T14:06:24.431Z</published><updated>2013-07-30T14:06:23.750Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#user'/><title>libgdata.picasaweb</title><summary/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s64-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:quotalimit>16106127360</gphoto:quotalimit><gphoto:quotacurrent>1796070</gphoto:quotacurrent><gphoto:maxPhotosPerAlbum>1000</gphoto:maxPhotosPerAlbum></entry>
+
--- /dev/null
+> GET /data/feed/api/user/default HTTP/1.1
+> Soup-Debug-Timestamp: 1375193198
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 26 (0x7fffd800ebb0), SoupSocket 12 (0x7cba30)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375193199
+< Soup-Debug: SoupMessage 26 (0x7fffd800ebb0)
+< Expires: Tue, 30 Jul 2013 14:06:39 GMT
+< Date: Tue, 30 Jul 2013 14:06:39 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=qLrx0e6LARca; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=fOi3cjU-PG96GUZZOxczRQ; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"CUYNRngzeCp7ImA9WhFWEUQ."
+< Last-Modified: Tue, 30 Jul 2013 14:06:37 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"CUYDSHc4fCp7ImA9WhFWEUQ."'><id>https://picasaweb.google.com/data/feed/user/libgdata.picasaweb</id><updated>2013-07-30T14:06:19.934Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#user'/><title>libgdata.picasaweb</title><subtitle/><icon>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s64-c/libgdata.picasaweb.jpg</icon><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb'/><link rel='http://schemas.google.com/photos/2007#slideshow' type='application/x-shockwave-flash' href='https://static.googleusercontent.com/external_content/picasaweb.googleusercontent.com/slideshow.swf?host=picasaweb.google.com&RGB=0x000000&feed=https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb?alt%3Drss'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb?start-index=1&max-results=1000'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><generator version='1.00' uri='http://picasaweb.google.com/'>Picasaweb</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>1000</openSearch:itemsPerPage><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s64-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:quotalimit>16106127360</gphoto:quotalimit><gphoto:quotacurrent>1796070</gphoto:quotacurrent><gphoto:maxPhotosPerAlbum>1000</gphoto:maxPhotosPerAlbum><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409880413253681</id><published>2013-07-30T14:06:54.000Z</published><updated>2013-07-30T14:06:54.614Z</updated><app:edited>2013-07-30T14:06:54.614Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 4 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409880413253681?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum4ForQueryAllAlbums68?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409880413253681?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409880413253681?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409880413253681/acl?authkey=Gv1sRgCOSEzMfX0feeQA'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409880413253681</gphoto:id><gphoto:name>TestAlbum4ForQueryAllAlbums68</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193214000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh4.googleusercontent.com/-Dj-tuEB-sz4/UffIfiPjsDE/AAAAAAAAMek/VnTLegFlzSc/TestAlbum4ForQueryAllAlbums68.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh4.googleusercontent.com/-Dj-tuEB-sz4/UffIfiPjsDE/AAAAAAAAMek/VnTLegFlzSc/s160-c/TestAlbum4ForQueryAllAlbums68.jpg' height='160' width='160'/><media:title type='plain'>Test album 4 for QueryAllAlbums</media:title></media:group></entry><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409876619235281</id><published>2013-07-30T14:06:53.000Z</published><updated>2013-07-30T14:06:53.653Z</updated><app:edited>2013-07-30T14:06:53.653Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 3 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409876619235281?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum3ForQueryAllAlbums69?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409876619235281?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409876619235281?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409876619235281/acl?authkey=Gv1sRgCPmiyez0rYT-Qg'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409876619235281</gphoto:id><gphoto:name>TestAlbum3ForQueryAllAlbums69</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193213000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh3.googleusercontent.com/-NWEN_d_Rhf4/UffIfUG_j9E/AAAAAAAAMeg/GF0PsCeCr-A/TestAlbum3ForQueryAllAlbums69.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-NWEN_d_Rhf4/UffIfUG_j9E/AAAAAAAAMeg/GF0PsCeCr-A/s160-c/TestAlbum3ForQueryAllAlbums69.jpg' height='160' width='160'/><media:title type='plain'>Test album 3 for QueryAllAlbums</media:title></media:group></entry><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409873513866033</id><published>2013-07-30T14:06:52.000Z</published><updated>2013-07-30T14:06:52.851Z</updated><app:edited>2013-07-30T14:06:52.851Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 2 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409873513866033?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum2ForQueryAllAlbums70?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409873513866033?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409873513866033?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409873513866033/acl?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409873513866033</gphoto:id><gphoto:name>TestAlbum2ForQueryAllAlbums70</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193212000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh6.googleusercontent.com/-4Whv1UHATRo/UffIfIinYzE/AAAAAAAAMec/PtrYZnVuv6Y/TestAlbum2ForQueryAllAlbums70.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh6.googleusercontent.com/-4Whv1UHATRo/UffIfIinYzE/AAAAAAAAMec/PtrYZnVuv6Y/s160-c/TestAlbum2ForQueryAllAlbums70.jpg' height='160' width='160'/><media:title type='plain'>Test album 2 for QueryAllAlbums</media:title></media:group></entry><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409867090978209</id><published>2013-07-30T14:06:51.000Z</published><updated>2013-07-30T14:06:51.971Z</updated><app:edited>2013-07-30T14:06:51.971Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 1 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409867090978209?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum1ForQueryAllAlbums72?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409867090978209?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409867090978209?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409867090978209/acl?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409867090978209</gphoto:id><gphoto:name>TestAlbum1ForQueryAllAlbums72</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193211000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh3.googleusercontent.com/-dghQiMuTN2c/UffIewnR5aE/AAAAAAAAMeY/1BIIg4oW3qw/TestAlbum1ForQueryAllAlbums72.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-dghQiMuTN2c/UffIewnR5aE/AAAAAAAAMeY/1BIIg4oW3qw/s160-c/TestAlbum1ForQueryAllAlbums72.jpg' height='160' width='160'/><media:title type='plain'>Test album 1 for QueryAllAlbums</media:title></media:group></entry></feed>
+
--- /dev/null
+> GET /data/feed/api/user/default HTTP/1.1
+> Soup-Debug-Timestamp: 1375193215
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 44 (0x7fffd800ef70), SoupSocket 20 (0x7cbbb0)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375193215
+< Soup-Debug: SoupMessage 44 (0x7fffd800ef70)
+< Expires: Tue, 30 Jul 2013 14:06:55 GMT
+< Date: Tue, 30 Jul 2013 14:06:55 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=h3Z5_WgR42lQ; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=D6hIRXBsA0yB87bDm6SEyw; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"CUUFRXg6fCp7ImA9WhFWEUQ."
+< Last-Modified: Tue, 30 Jul 2013 14:06:54 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"CUYDSHc4fCp7ImA9WhFWEUQ."'><id>https://picasaweb.google.com/data/feed/user/libgdata.picasaweb</id><updated>2013-07-30T14:06:19.934Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#user'/><title>libgdata.picasaweb</title><subtitle/><icon>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s64-c/libgdata.picasaweb.jpg</icon><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb'/><link rel='http://schemas.google.com/photos/2007#slideshow' type='application/x-shockwave-flash' href='https://static.googleusercontent.com/external_content/picasaweb.googleusercontent.com/slideshow.swf?host=picasaweb.google.com&RGB=0x000000&feed=https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb?alt%3Drss'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb?start-index=1&max-results=1000'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><generator version='1.00' uri='http://picasaweb.google.com/'>Picasaweb</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>1000</openSearch:itemsPerPage><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s64-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:quotalimit>16106127360</gphoto:quotalimit><gphoto:quotacurrent>1796070</gphoto:quotacurrent><gphoto:maxPhotosPerAlbum>1000</gphoto:maxPhotosPerAlbum><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409880413253681</id><published>2013-07-30T14:06:54.000Z</published><updated>2013-07-30T14:06:54.614Z</updated><app:edited>2013-07-30T14:06:54.614Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 4 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409880413253681?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum4ForQueryAllAlbums68?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409880413253681?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409880413253681?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409880413253681/acl?authkey=Gv1sRgCOSEzMfX0feeQA'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409880413253681</gphoto:id><gphoto:name>TestAlbum4ForQueryAllAlbums68</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193214000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh4.googleusercontent.com/-Dj-tuEB-sz4/UffIfiPjsDE/AAAAAAAAMek/VnTLegFlzSc/TestAlbum4ForQueryAllAlbums68.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh4.googleusercontent.com/-Dj-tuEB-sz4/UffIfiPjsDE/AAAAAAAAMek/VnTLegFlzSc/s160-c/TestAlbum4ForQueryAllAlbums68.jpg' height='160' width='160'/><media:title type='plain'>Test album 4 for QueryAllAlbums</media:title></media:group></entry><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409876619235281</id><published>2013-07-30T14:06:53.000Z</published><updated>2013-07-30T14:06:53.653Z</updated><app:edited>2013-07-30T14:06:53.653Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 3 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409876619235281?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum3ForQueryAllAlbums69?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409876619235281?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409876619235281?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409876619235281/acl?authkey=Gv1sRgCPmiyez0rYT-Qg'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409876619235281</gphoto:id><gphoto:name>TestAlbum3ForQueryAllAlbums69</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193213000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh3.googleusercontent.com/-NWEN_d_Rhf4/UffIfUG_j9E/AAAAAAAAMeg/GF0PsCeCr-A/TestAlbum3ForQueryAllAlbums69.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-NWEN_d_Rhf4/UffIfUG_j9E/AAAAAAAAMeg/GF0PsCeCr-A/s160-c/TestAlbum3ForQueryAllAlbums69.jpg' height='160' width='160'/><media:title type='plain'>Test album 3 for QueryAllAlbums</media:title></media:group></entry><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409873513866033</id><published>2013-07-30T14:06:52.000Z</published><updated>2013-07-30T14:06:52.851Z</updated><app:edited>2013-07-30T14:06:52.851Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 2 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409873513866033?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum2ForQueryAllAlbums70?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409873513866033?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409873513866033?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409873513866033/acl?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409873513866033</gphoto:id><gphoto:name>TestAlbum2ForQueryAllAlbums70</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193212000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh6.googleusercontent.com/-4Whv1UHATRo/UffIfIinYzE/AAAAAAAAMec/PtrYZnVuv6Y/TestAlbum2ForQueryAllAlbums70.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh6.googleusercontent.com/-4Whv1UHATRo/UffIfIinYzE/AAAAAAAAMec/PtrYZnVuv6Y/s160-c/TestAlbum2ForQueryAllAlbums70.jpg' height='160' width='160'/><media:title type='plain'>Test album 2 for QueryAllAlbums</media:title></media:group></entry><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409867090978209</id><published>2013-07-30T14:06:51.000Z</published><updated>2013-07-30T14:06:51.971Z</updated><app:edited>2013-07-30T14:06:51.971Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 1 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409867090978209?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum1ForQueryAllAlbums72?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409867090978209?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409867090978209?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409867090978209/acl?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409867090978209</gphoto:id><gphoto:name>TestAlbum1ForQueryAllAlbums72</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193211000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh3.googleusercontent.com/-dghQiMuTN2c/UffIewnR5aE/AAAAAAAAMeY/1BIIg4oW3qw/TestAlbum1ForQueryAllAlbums72.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-dghQiMuTN2c/UffIewnR5aE/AAAAAAAAMeY/1BIIg4oW3qw/s160-c/TestAlbum1ForQueryAllAlbums72.jpg' height='160' width='160'/><media:title type='plain'>Test album 1 for QueryAllAlbums</media:title></media:group></entry></feed>
+
+> GET /data/feed/api/user/default HTTP/1.1
+> Soup-Debug-Timestamp: 1375193215
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 45 (0x7fffd800ebb0), SoupSocket 19 (0x7cbc70)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+> Soup-Debug-Timestamp: 1375193215
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 45 (0x7fffd800ebb0), SoupSocket 21 (0x7fffe0028620), restarted
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375193216
+< Soup-Debug: SoupMessage 45 (0x7fffd800ebb0)
+< Expires: Tue, 30 Jul 2013 14:06:56 GMT
+< Date: Tue, 30 Jul 2013 14:06:56 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=aIyQglQCFD2b; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=PMvjYSKnKlSvQ55tsE3I1Q; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"CUUFRXg6fCp7ImA9WhFWEUQ."
+< Last-Modified: Tue, 30 Jul 2013 14:06:54 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"CUYDSHc4fCp7ImA9WhFWEUQ."'><id>https://picasaweb.google.com/data/feed/user/libgdata.picasaweb</id><updated>2013-07-30T14:06:19.934Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#user'/><title>libgdata.picasaweb</title><subtitle/><icon>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s64-c/libgdata.picasaweb.jpg</icon><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb'/><link rel='http://schemas.google.com/photos/2007#slideshow' type='application/x-shockwave-flash' href='https://static.googleusercontent.com/external_content/picasaweb.googleusercontent.com/slideshow.swf?host=picasaweb.google.com&RGB=0x000000&feed=https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb?alt%3Drss'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb?start-index=1&max-results=1000'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><generator version='1.00' uri='http://picasaweb.google.com/'>Picasaweb</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>1000</openSearch:itemsPerPage><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s64-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:quotalimit>16106127360</gphoto:quotalimit><gphoto:quotacurrent>1796070</gphoto:quotacurrent><gphoto:maxPhotosPerAlbum>1000</gphoto:maxPhotosPerAlbum><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409880413253681</id><published>2013-07-30T14:06:54.000Z</published><updated>2013-07-30T14:06:54.614Z</updated><app:edited>2013-07-30T14:06:54.614Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 4 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409880413253681?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum4ForQueryAllAlbums68?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409880413253681?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409880413253681?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409880413253681/acl?authkey=Gv1sRgCOSEzMfX0feeQA'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409880413253681</gphoto:id><gphoto:name>TestAlbum4ForQueryAllAlbums68</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193214000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh4.googleusercontent.com/-Dj-tuEB-sz4/UffIfiPjsDE/AAAAAAAAMek/VnTLegFlzSc/TestAlbum4ForQueryAllAlbums68.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh4.googleusercontent.com/-Dj-tuEB-sz4/UffIfiPjsDE/AAAAAAAAMek/VnTLegFlzSc/s160-c/TestAlbum4ForQueryAllAlbums68.jpg' height='160' width='160'/><media:title type='plain'>Test album 4 for QueryAllAlbums</media:title></media:group></entry><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409876619235281</id><published>2013-07-30T14:06:53.000Z</published><updated>2013-07-30T14:06:53.653Z</updated><app:edited>2013-07-30T14:06:53.653Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 3 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409876619235281?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum3ForQueryAllAlbums69?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409876619235281?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409876619235281?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409876619235281/acl?authkey=Gv1sRgCPmiyez0rYT-Qg'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409876619235281</gphoto:id><gphoto:name>TestAlbum3ForQueryAllAlbums69</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193213000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh3.googleusercontent.com/-NWEN_d_Rhf4/UffIfUG_j9E/AAAAAAAAMeg/GF0PsCeCr-A/TestAlbum3ForQueryAllAlbums69.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-NWEN_d_Rhf4/UffIfUG_j9E/AAAAAAAAMeg/GF0PsCeCr-A/s160-c/TestAlbum3ForQueryAllAlbums69.jpg' height='160' width='160'/><media:title type='plain'>Test album 3 for QueryAllAlbums</media:title></media:group></entry><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409873513866033</id><published>2013-07-30T14:06:52.000Z</published><updated>2013-07-30T14:06:52.851Z</updated><app:edited>2013-07-30T14:06:52.851Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 2 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409873513866033?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum2ForQueryAllAlbums70?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409873513866033?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409873513866033?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409873513866033/acl?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409873513866033</gphoto:id><gphoto:name>TestAlbum2ForQueryAllAlbums70</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193212000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh6.googleusercontent.com/-4Whv1UHATRo/UffIfIinYzE/AAAAAAAAMec/PtrYZnVuv6Y/TestAlbum2ForQueryAllAlbums70.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh6.googleusercontent.com/-4Whv1UHATRo/UffIfIinYzE/AAAAAAAAMec/PtrYZnVuv6Y/s160-c/TestAlbum2ForQueryAllAlbums70.jpg' height='160' width='160'/><media:title type='plain'>Test album 2 for QueryAllAlbums</media:title></media:group></entry><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409867090978209</id><published>2013-07-30T14:06:51.000Z</published><updated>2013-07-30T14:06:51.971Z</updated><app:edited>2013-07-30T14:06:51.971Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 1 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409867090978209?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum1ForQueryAllAlbums72?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409867090978209?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409867090978209?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409867090978209/acl?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409867090978209</gphoto:id><gphoto:name>TestAlbum1ForQueryAllAlbums72</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193211000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh3.googleusercontent.com/-dghQiMuTN2c/UffIewnR5aE/AAAAAAAAMeY/1BIIg4oW3qw/TestAlbum1ForQueryAllAlbums72.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-dghQiMuTN2c/UffIewnR5aE/AAAAAAAAMeY/1BIIg4oW3qw/s160-c/TestAlbum1ForQueryAllAlbums72.jpg' height='160' width='160'/><media:title type='plain'>Test album 1 for QueryAllAlbums</media:title></media:group></entry></feed>
+
+> GET /data/feed/api/user/default HTTP/1.1
+> Soup-Debug-Timestamp: 1375193216
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 46 (0x7fffe4002aa0), SoupSocket 21 (0x7fffe0028620)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375193216
+< Soup-Debug: SoupMessage 46 (0x7fffe4002aa0)
+< Expires: Tue, 30 Jul 2013 14:06:56 GMT
+< Date: Tue, 30 Jul 2013 14:06:56 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=i7iDLaToySIx; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=5_28NXYuJhKbMPGuG7rpMA; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"CUUFRXg6fCp7ImA9WhFWEUQ."
+< Last-Modified: Tue, 30 Jul 2013 14:06:54 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"CUYDSHc4fCp7ImA9WhFWEUQ."'><id>https://picasaweb.google.com/data/feed/user/libgdata.picasaweb</id><updated>2013-07-30T14:06:19.934Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#user'/><title>libgdata.picasaweb</title><subtitle/><icon>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s64-c/libgdata.picasaweb.jpg</icon><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb'/><link rel='http://schemas.google.com/photos/2007#slideshow' type='application/x-shockwave-flash' href='https://static.googleusercontent.com/external_content/picasaweb.googleusercontent.com/slideshow.swf?host=picasaweb.google.com&RGB=0x000000&feed=https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb?alt%3Drss'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb?start-index=1&max-results=1000'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><generator version='1.00' uri='http://picasaweb.google.com/'>Picasaweb</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>1000</openSearch:itemsPerPage><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s64-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:quotalimit>16106127360</gphoto:quotalimit><gphoto:quotacurrent>1796070</gphoto:quotacurrent><gphoto:maxPhotosPerAlbum>1000</gphoto:maxPhotosPerAlbum><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409880413253681</id><published>2013-07-30T14:06:54.000Z</published><updated>2013-07-30T14:06:54.614Z</updated><app:edited>2013-07-30T14:06:54.614Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 4 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409880413253681?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum4ForQueryAllAlbums68?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409880413253681?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409880413253681?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409880413253681/acl?authkey=Gv1sRgCOSEzMfX0feeQA'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409880413253681</gphoto:id><gphoto:name>TestAlbum4ForQueryAllAlbums68</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193214000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh4.googleusercontent.com/-Dj-tuEB-sz4/UffIfiPjsDE/AAAAAAAAMek/VnTLegFlzSc/TestAlbum4ForQueryAllAlbums68.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh4.googleusercontent.com/-Dj-tuEB-sz4/UffIfiPjsDE/AAAAAAAAMek/VnTLegFlzSc/s160-c/TestAlbum4ForQueryAllAlbums68.jpg' height='160' width='160'/><media:title type='plain'>Test album 4 for QueryAllAlbums</media:title></media:group></entry><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409876619235281</id><published>2013-07-30T14:06:53.000Z</published><updated>2013-07-30T14:06:53.653Z</updated><app:edited>2013-07-30T14:06:53.653Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 3 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409876619235281?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum3ForQueryAllAlbums69?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409876619235281?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409876619235281?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409876619235281/acl?authkey=Gv1sRgCPmiyez0rYT-Qg'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409876619235281</gphoto:id><gphoto:name>TestAlbum3ForQueryAllAlbums69</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193213000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh3.googleusercontent.com/-NWEN_d_Rhf4/UffIfUG_j9E/AAAAAAAAMeg/GF0PsCeCr-A/TestAlbum3ForQueryAllAlbums69.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-NWEN_d_Rhf4/UffIfUG_j9E/AAAAAAAAMeg/GF0PsCeCr-A/s160-c/TestAlbum3ForQueryAllAlbums69.jpg' height='160' width='160'/><media:title type='plain'>Test album 3 for QueryAllAlbums</media:title></media:group></entry><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409873513866033</id><published>2013-07-30T14:06:52.000Z</published><updated>2013-07-30T14:06:52.851Z</updated><app:edited>2013-07-30T14:06:52.851Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 2 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409873513866033?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum2ForQueryAllAlbums70?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409873513866033?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409873513866033?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409873513866033/acl?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409873513866033</gphoto:id><gphoto:name>TestAlbum2ForQueryAllAlbums70</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193212000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh6.googleusercontent.com/-4Whv1UHATRo/UffIfIinYzE/AAAAAAAAMec/PtrYZnVuv6Y/TestAlbum2ForQueryAllAlbums70.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh6.googleusercontent.com/-4Whv1UHATRo/UffIfIinYzE/AAAAAAAAMec/PtrYZnVuv6Y/s160-c/TestAlbum2ForQueryAllAlbums70.jpg' height='160' width='160'/><media:title type='plain'>Test album 2 for QueryAllAlbums</media:title></media:group></entry><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409867090978209</id><published>2013-07-30T14:06:51.000Z</published><updated>2013-07-30T14:06:51.971Z</updated><app:edited>2013-07-30T14:06:51.971Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 1 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409867090978209?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum1ForQueryAllAlbums72?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409867090978209?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409867090978209?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409867090978209/acl?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409867090978209</gphoto:id><gphoto:name>TestAlbum1ForQueryAllAlbums72</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193211000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh3.googleusercontent.com/-dghQiMuTN2c/UffIewnR5aE/AAAAAAAAMeY/1BIIg4oW3qw/TestAlbum1ForQueryAllAlbums72.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-dghQiMuTN2c/UffIewnR5aE/AAAAAAAAMeY/1BIIg4oW3qw/s160-c/TestAlbum1ForQueryAllAlbums72.jpg' height='160' width='160'/><media:title type='plain'>Test album 1 for QueryAllAlbums</media:title></media:group></entry></feed>
+
--- /dev/null
+> GET /data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553?authkey=Gv1sRgCKKx5unfo4qvuAE HTTP/1.1
+> Soup-Debug-Timestamp: 1375365735
+> Soup-Debug: SoupSession 1 (0x6682a0), SoupMessage 14 (0x78e4a0), SoupSocket 10 (0x7fffe40031a0)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAADbKT_hVtH1iMNFS9uMoShgbOwfO1I8gu_QL1axjY7_RDwWa451TM_GNncBQYYNVbQl7II_qsuw32dZOzKBeQvC_v1PdhrjXO-NFJNCL5dzZba7l5SiuR1EKzVQXvM2LivcCCis9h0Kla7JqZxEb9MLnK4dFKZO3IRjWlfOYo6ZF5SQ8Sh79BYqZLgHcGvBBE9WgtvjjPpybc2XVUZo7c0rqe3oWNAEb-hQQrb_KNQ2fC1I2LA4Y5KvpsdQ7sK0ysK2gEPqx_nB3EPXUMz0emel44F92MzePN7w_NDZD6ILaw
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375365736
+< Soup-Debug: SoupMessage 14 (0x78e4a0)
+< Expires: Thu, 01 Aug 2013 14:02:16 GMT
+< Date: Thu, 01 Aug 2013 14:02:16 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=iRThHx_irJvf; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=o2xXB3c34YfD6S6uml7ILg; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"D0AHRXg_fCp7ImA9WhFWE0s."
+< Last-Modified: Thu, 01 Aug 2013 14:02:14 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:exif='http://schemas.google.com/photos/exif/2007' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"D0AHRXg_fCp7ImA9WhFWE0s."'><id>https://picasaweb.google.com/data/feed/user/libgdata.picasaweb/albumid/5907150785154596193</id><updated>2013-08-01T14:02:14.644Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album for QueryFiles</title><subtitle/><rights>private</rights><icon>https://lh4.googleusercontent.com/-zJFf7te4oUY/UfpqV3fPPWE/AAAAAAAAMjo/4PmlWIKk-eE/s160-c/TestAlbumForQueryFiles29.jpg</icon><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907150785154596193?authkey=Gv1sRgCK3MoPTN3eOi8gE'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907150785154596193?authkey=Gv1sRgCK3MoPTN3eOi8gE'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://picasaweb.google.com/data/upload/resumable/media/create-session/feed/api/user/libgdata.picasaweb/albumid/5907150785154596193?authkey=Gv1sRgCK3MoPTN3eOi8gE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles29?authkey=Gv1sRgCK3MoPTN3eOi8gE'/><link rel='http://schemas.google.com/photos/2007#slideshow' type='application/x-shockwave-flash' href='https://static.googleusercontent.com/external_content/picasaweb.googleusercontent.com/slideshow.swf?host=picasaweb.google.com&RGB=0x000000&feed=https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907150785154596193?alt%3Drss%26authkey%3DGv1sRgCK3MoPTN3eOi8gE'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907150785154596193'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907150785154596193/acl?authkey=Gv1sRgCK3MoPTN3eOi8gE'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907150785154596193?start-index=1&max-results=1000&authkey=Gv1sRgCK3MoPTN3eOi8gE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><generator version='1.00' uri='http://picasaweb.google.com/'>Picasaweb</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>1000</openSearch:itemsPerPage><gphoto:id>5907150785154596193</gphoto:id><gphoto:name>TestAlbumForQueryFiles29</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375365717000</gphoto:timestamp><gphoto:numphotos>4</gphoto:numphotos><gphoto:numphotosremaining>996</gphoto:numphotosremaining><gphoto:bytesUsed>70640</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:allowPrints>true</gphoto:allowPrints><gphoto:allowDownloads>true</gphoto:allowDownloads><entry gd:etag='"YD4qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314</id><published>2013-08-01T14:45:38.000Z</published><updated>2013-08-01T14:45:38.859Z</updated><app:edited>2013-08-01T14:45:38.859Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Test file 1</title><summary/><content type='image/jpeg' src='https://lh3.googleusercontent.com/-PFuCSAHxsIM/Ufp0ku72hNI/AAAAAAAAMsE/Eka2goyoX-Q/Test%252520file%2525201.jpg'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles39?authkey=Gv1sRgCKKx5unfo4qvuAE#5907162035673007314'/><link rel='http://schemas.google.com/photos/2007#canonical' type='text/html' href='https://picasaweb.google.com/lh/photo/TclHBnxkCWRiCOH8UL0V8anPQSJCD8MPruhZxgfAX5U'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit-media' type='image/jpeg' href='https://picasaweb.google.com/data/media/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907162005897469553&iid=5907162035673007314'/><gphoto:id>5907162035673007314</gphoto:id><gphoto:albumid>5907162005897469553</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154790828000</gphoto:timestamp><gphoto:imageVersion>12993</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>0</gphoto:commentCount><gphoto:streamId>shared_group_5907162035673007314</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><gphoto:shapes faces='done'/><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh3.googleusercontent.com/-PFuCSAHxsIM/Ufp0ku72hNI/AAAAAAAAMsE/Eka2goyoX-Q/Test%252520file%2525201.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-PFuCSAHxsIM/Ufp0ku72hNI/AAAAAAAAMsE/Eka2goyoX-Q/s72/Test%252520file%2525201.jpg' height='67' width='72'/><media:thumbnail url='https://lh3.googleusercontent.com/-PFuCSAHxsIM/Ufp0ku72hNI/AAAAAAAAMsE/Eka2goyoX-Q/s144/Test%252520file%2525201.jpg' height='92' width='100'/><media:thumbnail url='https://lh3.googleusercontent.com/-PFuCSAHxsIM/Ufp0ku72hNI/AAAAAAAAMsE/Eka2goyoX-Q/s288/Test%252520file%2525201.jpg' height='92' width='100'/><media:title type='plain'>Test file 1</media:title></media:group></entry><entry gd:etag='"YD4qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907150785154596193/photoid/5907150829688266482</id><published>2013-08-01T14:02:09.000Z</published><updated>2013-08-01T14:02:10.073Z</updated><app:edited>2013-08-01T14:02:10.073Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Test file 2</title><summary/><content type='image/jpeg' src='https://lh5.googleusercontent.com/-km5_MPE2nCI/UfpqYdY5HvI/AAAAAAAAMjY/e9a15AEVkis/Test%252520file%2525202.jpg'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907150785154596193/photoid/5907150829688266482?authkey=Gv1sRgCK3MoPTN3eOi8gE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles29?authkey=Gv1sRgCK3MoPTN3eOi8gE#5907150829688266482'/><link rel='http://schemas.google.com/photos/2007#canonical' type='text/html' href='https://picasaweb.google.com/lh/photo/q_J5z2iQtlhr40bOxacCAs9H19Vgkm_xPshS2ljFYI0'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907150785154596193/photoid/5907150829688266482?authkey=Gv1sRgCK3MoPTN3eOi8gE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907150785154596193/photoid/5907150829688266482?authkey=Gv1sRgCK3MoPTN3eOi8gE'/><link rel='edit-media' type='image/jpeg' href='https://picasaweb.google.com/data/media/api/user/libgdata.picasaweb/albumid/5907150785154596193/photoid/5907150829688266482?authkey=Gv1sRgCK3MoPTN3eOi8gE'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907150785154596193&iid=5907150829688266482'/><gphoto:id>5907150829688266482</gphoto:id><gphoto:albumid>5907150785154596193</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154790828000</gphoto:timestamp><gphoto:imageVersion>12854</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>0</gphoto:commentCount><gphoto:streamId>shared_group_5907150829688266482</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><gphoto:shapes faces='done'/><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh5.googleusercontent.com/-km5_MPE2nCI/UfpqYdY5HvI/AAAAAAAAMjY/e9a15AEVkis/Test%252520file%2525202.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh5.googleusercontent.com/-km5_MPE2nCI/UfpqYdY5HvI/AAAAAAAAMjY/e9a15AEVkis/s72/Test%252520file%2525202.jpg' height='67' width='72'/><media:thumbnail url='https://lh5.googleusercontent.com/-km5_MPE2nCI/UfpqYdY5HvI/AAAAAAAAMjY/e9a15AEVkis/s144/Test%252520file%2525202.jpg' height='92' width='100'/><media:thumbnail url='https://lh5.googleusercontent.com/-km5_MPE2nCI/UfpqYdY5HvI/AAAAAAAAMjY/e9a15AEVkis/s288/Test%252520file%2525202.jpg' height='92' width='100'/><media:title type='plain'>Test file 2</media:title></media:group></entry><entry gd:etag='"YD4qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907150785154596193/photoid/5907150836838919202</id><published>2013-08-01T14:02:11.000Z</published><updated>2013-08-01T14:02:12.427Z</updated><app:edited>2013-08-01T14:02:12.427Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Test file 3</title><summary/><content type='image/jpeg' src='https://lh5.googleusercontent.com/-uqNCcf_3RW0/UfpqY4BvbCI/AAAAAAAAMjg/OKorAw-UM7I/Test%252520file%2525203.jpg'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907150785154596193/photoid/5907150836838919202?authkey=Gv1sRgCK3MoPTN3eOi8gE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles29?authkey=Gv1sRgCK3MoPTN3eOi8gE#5907150836838919202'/><link rel='http://schemas.google.com/photos/2007#canonical' type='text/html' href='https://picasaweb.google.com/lh/photo/is2pUr-9sdFK7qSlnq4lOc9H19Vgkm_xPshS2ljFYI0'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907150785154596193/photoid/5907150836838919202?authkey=Gv1sRgCK3MoPTN3eOi8gE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907150785154596193/photoid/5907150836838919202?authkey=Gv1sRgCK3MoPTN3eOi8gE'/><link rel='edit-media' type='image/jpeg' href='https://picasaweb.google.com/data/media/api/user/libgdata.picasaweb/albumid/5907150785154596193/photoid/5907150836838919202?authkey=Gv1sRgCK3MoPTN3eOi8gE'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907150785154596193&iid=5907150836838919202'/><gphoto:id>5907150836838919202</gphoto:id><gphoto:albumid>5907150785154596193</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154790828000</gphoto:timestamp><gphoto:imageVersion>12856</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>0</gphoto:commentCount><gphoto:streamId>shared_group_5907150836838919202</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><gphoto:shapes faces='done'/><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh5.googleusercontent.com/-uqNCcf_3RW0/UfpqY4BvbCI/AAAAAAAAMjg/OKorAw-UM7I/Test%252520file%2525203.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh5.googleusercontent.com/-uqNCcf_3RW0/UfpqY4BvbCI/AAAAAAAAMjg/OKorAw-UM7I/s72/Test%252520file%2525203.jpg' height='67' width='72'/><media:thumbnail url='https://lh5.googleusercontent.com/-uqNCcf_3RW0/UfpqY4BvbCI/AAAAAAAAMjg/OKorAw-UM7I/s144/Test%252520file%2525203.jpg' height='92' width='100'/><media:thumbnail url='https://lh5.googleusercontent.com/-uqNCcf_3RW0/UfpqY4BvbCI/AAAAAAAAMjg/OKorAw-UM7I/s288/Test%252520file%2525203.jpg' height='92' width='100'/><media:title type='plain'>Test file 3</media:title></media:group></entry><entry gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907150785154596193/photoid/5907150850226889682</id><published>2013-08-01T14:02:14.000Z</published><updated>2013-08-01T14:02:14.644Z</updated><app:edited>2013-08-01T14:02:14.644Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Test file 4</title><summary/><content type='image/jpeg' src='https://lh4.googleusercontent.com/-TC6ER9JFQp8/UfpqZp5ro9I/AAAAAAAAMjo/kUGJlEi1jmw/Test%252520file%2525204.jpg'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907150785154596193/photoid/5907150850226889682?authkey=Gv1sRgCK3MoPTN3eOi8gE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles29?authkey=Gv1sRgCK3MoPTN3eOi8gE#5907150850226889682'/><link rel='http://schemas.google.com/photos/2007#canonical' type='text/html' href='https://picasaweb.google.com/lh/photo/kwtftH-Co0sMa5CAOUI14s9H19Vgkm_xPshS2ljFYI0'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907150785154596193/photoid/5907150850226889682?authkey=Gv1sRgCK3MoPTN3eOi8gE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907150785154596193/photoid/5907150850226889682?authkey=Gv1sRgCK3MoPTN3eOi8gE'/><link rel='edit-media' type='image/jpeg' href='https://picasaweb.google.com/data/media/api/user/libgdata.picasaweb/albumid/5907150785154596193/photoid/5907150850226889682?authkey=Gv1sRgCK3MoPTN3eOi8gE'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907150785154596193&iid=5907150850226889682'/><gphoto:id>5907150850226889682</gphoto:id><gphoto:albumid>5907150785154596193</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154790828000</gphoto:timestamp><gphoto:imageVersion>12858</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>0</gphoto:commentCount><gphoto:streamId>shared_group_5907150850226889682</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><gphoto:shapes faces='done'/><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh4.googleusercontent.com/-TC6ER9JFQp8/UfpqZp5ro9I/AAAAAAAAMjo/kUGJlEi1jmw/Test%252520file%2525204.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh4.googleusercontent.com/-TC6ER9JFQp8/UfpqZp5ro9I/AAAAAAAAMjo/kUGJlEi1jmw/s72/Test%252520file%2525204.jpg' height='67' width='72'/><media:thumbnail url='https://lh4.googleusercontent.com/-TC6ER9JFQp8/UfpqZp5ro9I/AAAAAAAAMjo/kUGJlEi1jmw/s144/Test%252520file%2525204.jpg' height='92' width='100'/><media:thumbnail url='https://lh4.googleusercontent.com/-TC6ER9JFQp8/UfpqZp5ro9I/AAAAAAAAMjo/kUGJlEi1jmw/s288/Test%252520file%2525204.jpg' height='92' width='100'/><media:title type='plain'>Test file 4</media:title></media:group></entry></feed>
+
--- /dev/null
+> GET /data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553?authkey=Gv1sRgCKKx5unfo4qvuAE HTTP/1.1
+> Soup-Debug-Timestamp: 1375365814
+> Soup-Debug: SoupSession 1 (0x6682a0), SoupMessage 42 (0x7fffe401a0c0), SoupSocket 29 (0x814c60)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAADbKT_hVtH1iMNFS9uMoShgbOwfO1I8gu_QL1axjY7_RDwWa451TM_GNncBQYYNVbQl7II_qsuw32dZOzKBeQvC_v1PdhrjXO-NFJNCL5dzZba7l5SiuR1EKzVQXvM2LivcCCis9h0Kla7JqZxEb9MLnK4dFKZO3IRjWlfOYo6ZF5SQ8Sh79BYqZLgHcGvBBE9WgtvjjPpybc2XVUZo7c0rqe3oWNAEb-hQQrb_KNQ2fC1I2LA4Y5KvpsdQ7sK0ysK2gEPqx_nB3EPXUMz0emel44F92MzePN7w_NDZD6ILaw
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375365816
+< Soup-Debug: SoupMessage 42 (0x7fffe401a0c0)
+< Expires: Thu, 01 Aug 2013 14:03:36 GMT
+< Date: Thu, 01 Aug 2013 14:03:36 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=dwy-JVAW0KyU; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=oXQkCbUpu1L7IcQqrmDuBQ; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"D08ERnk8fSp7ImA9WhFWE0s."
+< Last-Modified: Thu, 01 Aug 2013 14:03:27 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:exif='http://schemas.google.com/photos/exif/2007' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"D08ERnk8fSp7ImA9WhFWE0s."'><id>https://picasaweb.google.com/data/feed/user/libgdata.picasaweb/albumid/5907151087224289825</id><updated>2013-08-01T14:03:27.775Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album for QueryFiles</title><subtitle/><rights>private</rights><icon>https://lh3.googleusercontent.com/-eOleYbu29IU/UfpqncyQ-iE/AAAAAAAAMls/KbZyNDZDiUI/s160-c/TestAlbumForQueryFiles32.jpg</icon><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907151087224289825?authkey=Gv1sRgCIbvuqunu_OdAw'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907151087224289825?authkey=Gv1sRgCIbvuqunu_OdAw'/><link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://picasaweb.google.com/data/upload/resumable/media/create-session/feed/api/user/libgdata.picasaweb/albumid/5907151087224289825?authkey=Gv1sRgCIbvuqunu_OdAw'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles32?authkey=Gv1sRgCIbvuqunu_OdAw'/><link rel='http://schemas.google.com/photos/2007#slideshow' type='application/x-shockwave-flash' href='https://static.googleusercontent.com/external_content/picasaweb.googleusercontent.com/slideshow.swf?host=picasaweb.google.com&RGB=0x000000&feed=https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907151087224289825?alt%3Drss%26authkey%3DGv1sRgCIbvuqunu_OdAw'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907151087224289825'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907151087224289825/acl?authkey=Gv1sRgCIbvuqunu_OdAw'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907151087224289825?start-index=1&max-results=1000&authkey=Gv1sRgCIbvuqunu_OdAw'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><generator version='1.00' uri='http://picasaweb.google.com/'>Picasaweb</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>1000</openSearch:itemsPerPage><gphoto:id>5907151087224289825</gphoto:id><gphoto:name>TestAlbumForQueryFiles32</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375365786000</gphoto:timestamp><gphoto:numphotos>4</gphoto:numphotos><gphoto:numphotosremaining>996</gphoto:numphotosremaining><gphoto:bytesUsed>70640</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:allowPrints>true</gphoto:allowPrints><gphoto:allowDownloads>true</gphoto:allowDownloads><entry gd:etag='"YD4qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314</id><published>2013-08-01T14:45:38.000Z</published><updated>2013-08-01T14:45:38.859Z</updated><app:edited>2013-08-01T14:45:38.859Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Test file 1</title><summary/><content type='image/jpeg' src='https://lh3.googleusercontent.com/-PFuCSAHxsIM/Ufp0ku72hNI/AAAAAAAAMsE/Eka2goyoX-Q/Test%252520file%2525201.jpg'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles39?authkey=Gv1sRgCKKx5unfo4qvuAE#5907162035673007314'/><link rel='http://schemas.google.com/photos/2007#canonical' type='text/html' href='https://picasaweb.google.com/lh/photo/TclHBnxkCWRiCOH8UL0V8anPQSJCD8MPruhZxgfAX5U'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit-media' type='image/jpeg' href='https://picasaweb.google.com/data/media/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907162005897469553&iid=5907162035673007314'/><gphoto:id>5907162035673007314</gphoto:id><gphoto:albumid>5907162005897469553</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154790828000</gphoto:timestamp><gphoto:imageVersion>12993</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>0</gphoto:commentCount><gphoto:streamId>shared_group_5907162035673007314</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><gphoto:shapes faces='done'/><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh3.googleusercontent.com/-PFuCSAHxsIM/Ufp0ku72hNI/AAAAAAAAMsE/Eka2goyoX-Q/Test%252520file%2525201.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-PFuCSAHxsIM/Ufp0ku72hNI/AAAAAAAAMsE/Eka2goyoX-Q/s72/Test%252520file%2525201.jpg' height='67' width='72'/><media:thumbnail url='https://lh3.googleusercontent.com/-PFuCSAHxsIM/Ufp0ku72hNI/AAAAAAAAMsE/Eka2goyoX-Q/s144/Test%252520file%2525201.jpg' height='92' width='100'/><media:thumbnail url='https://lh3.googleusercontent.com/-PFuCSAHxsIM/Ufp0ku72hNI/AAAAAAAAMsE/Eka2goyoX-Q/s288/Test%252520file%2525201.jpg' height='92' width='100'/><media:title type='plain'>Test file 1</media:title></media:group></entry><entry gd:etag='"YD4qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907151087224289825/photoid/5907151111046303650</id><published>2013-08-01T14:03:15.000Z</published><updated>2013-08-01T14:03:16.803Z</updated><app:edited>2013-08-01T14:03:16.803Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Test file 2</title><summary/><content type='image/jpeg' src='https://lh6.googleusercontent.com/-coq-0Ax-_90/Ufpqo1h4D6I/AAAAAAAAMlc/l0RSmtBvJo4/Test%252520file%2525202.jpg'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907151087224289825/photoid/5907151111046303650?authkey=Gv1sRgCIbvuqunu_OdAw'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles32?authkey=Gv1sRgCIbvuqunu_OdAw#5907151111046303650'/><link rel='http://schemas.google.com/photos/2007#canonical' type='text/html' href='https://picasaweb.google.com/lh/photo/_62UCmO44MtZ7TafbreRsv1axM--bU6cdQB9zEI7CZQ'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907151087224289825/photoid/5907151111046303650?authkey=Gv1sRgCIbvuqunu_OdAw'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907151087224289825/photoid/5907151111046303650?authkey=Gv1sRgCIbvuqunu_OdAw'/><link rel='edit-media' type='image/jpeg' href='https://picasaweb.google.com/data/media/api/user/libgdata.picasaweb/albumid/5907151087224289825/photoid/5907151111046303650?authkey=Gv1sRgCIbvuqunu_OdAw'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907151087224289825&iid=5907151111046303650'/><gphoto:id>5907151111046303650</gphoto:id><gphoto:albumid>5907151087224289825</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154790828000</gphoto:timestamp><gphoto:imageVersion>12887</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>0</gphoto:commentCount><gphoto:streamId>shared_group_5907151111046303650</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><gphoto:shapes faces='done'/><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh6.googleusercontent.com/-coq-0Ax-_90/Ufpqo1h4D6I/AAAAAAAAMlc/l0RSmtBvJo4/Test%252520file%2525202.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh6.googleusercontent.com/-coq-0Ax-_90/Ufpqo1h4D6I/AAAAAAAAMlc/l0RSmtBvJo4/s72/Test%252520file%2525202.jpg' height='67' width='72'/><media:thumbnail url='https://lh6.googleusercontent.com/-coq-0Ax-_90/Ufpqo1h4D6I/AAAAAAAAMlc/l0RSmtBvJo4/s144/Test%252520file%2525202.jpg' height='92' width='100'/><media:thumbnail url='https://lh6.googleusercontent.com/-coq-0Ax-_90/Ufpqo1h4D6I/AAAAAAAAMlc/l0RSmtBvJo4/s288/Test%252520file%2525202.jpg' height='92' width='100'/><media:title type='plain'>Test file 2</media:title></media:group></entry><entry gd:etag='"YD4qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907151087224289825/photoid/5907151147585049618</id><published>2013-08-01T14:03:23.000Z</published><updated>2013-08-01T14:03:24.979Z</updated><app:edited>2013-08-01T14:03:24.979Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Test file 3</title><summary/><content type='image/jpeg' src='https://lh3.googleusercontent.com/-cX854Mc3hro/Ufpqq9pZFBI/AAAAAAAAMlk/c--jRkyPT28/Test%252520file%2525203.jpg'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907151087224289825/photoid/5907151147585049618?authkey=Gv1sRgCIbvuqunu_OdAw'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles32?authkey=Gv1sRgCIbvuqunu_OdAw#5907151147585049618'/><link rel='http://schemas.google.com/photos/2007#canonical' type='text/html' href='https://picasaweb.google.com/lh/photo/GmAqiwtENOhWwo2M-dNC_v1axM--bU6cdQB9zEI7CZQ'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907151087224289825/photoid/5907151147585049618?authkey=Gv1sRgCIbvuqunu_OdAw'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907151087224289825/photoid/5907151147585049618?authkey=Gv1sRgCIbvuqunu_OdAw'/><link rel='edit-media' type='image/jpeg' href='https://picasaweb.google.com/data/media/api/user/libgdata.picasaweb/albumid/5907151087224289825/photoid/5907151147585049618?authkey=Gv1sRgCIbvuqunu_OdAw'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907151087224289825&iid=5907151147585049618'/><gphoto:id>5907151147585049618</gphoto:id><gphoto:albumid>5907151087224289825</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154790828000</gphoto:timestamp><gphoto:imageVersion>12889</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>0</gphoto:commentCount><gphoto:streamId>shared_group_5907151147585049618</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><gphoto:shapes faces='done'/><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh3.googleusercontent.com/-cX854Mc3hro/Ufpqq9pZFBI/AAAAAAAAMlk/c--jRkyPT28/Test%252520file%2525203.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-cX854Mc3hro/Ufpqq9pZFBI/AAAAAAAAMlk/c--jRkyPT28/s72/Test%252520file%2525203.jpg' height='67' width='72'/><media:thumbnail url='https://lh3.googleusercontent.com/-cX854Mc3hro/Ufpqq9pZFBI/AAAAAAAAMlk/c--jRkyPT28/s144/Test%252520file%2525203.jpg' height='92' width='100'/><media:thumbnail url='https://lh3.googleusercontent.com/-cX854Mc3hro/Ufpqq9pZFBI/AAAAAAAAMlk/c--jRkyPT28/s288/Test%252520file%2525203.jpg' height='92' width='100'/><media:title type='plain'>Test file 3</media:title></media:group></entry><entry gd:etag='"YD4qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907151087224289825/photoid/5907151156877478754</id><published>2013-08-01T14:03:26.000Z</published><updated>2013-08-01T14:03:27.775Z</updated><app:edited>2013-08-01T14:03:27.775Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Test file 4</title><summary/><content type='image/jpeg' src='https://lh5.googleusercontent.com/-L1KRj_8RPBc/UfpqrgQ4S2I/AAAAAAAAMls/xILc4GmEodU/Test%252520file%2525204.jpg'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907151087224289825/photoid/5907151156877478754?authkey=Gv1sRgCIbvuqunu_OdAw'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles32?authkey=Gv1sRgCIbvuqunu_OdAw#5907151156877478754'/><link rel='http://schemas.google.com/photos/2007#canonical' type='text/html' href='https://picasaweb.google.com/lh/photo/UtIcrCl4xdR0HBAAEjCwlv1axM--bU6cdQB9zEI7CZQ'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907151087224289825/photoid/5907151156877478754?authkey=Gv1sRgCIbvuqunu_OdAw'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907151087224289825/photoid/5907151156877478754?authkey=Gv1sRgCIbvuqunu_OdAw'/><link rel='edit-media' type='image/jpeg' href='https://picasaweb.google.com/data/media/api/user/libgdata.picasaweb/albumid/5907151087224289825/photoid/5907151156877478754?authkey=Gv1sRgCIbvuqunu_OdAw'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907151087224289825&iid=5907151156877478754'/><gphoto:id>5907151156877478754</gphoto:id><gphoto:albumid>5907151087224289825</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154790828000</gphoto:timestamp><gphoto:imageVersion>12891</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>0</gphoto:commentCount><gphoto:streamId>shared_group_5907151156877478754</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><gphoto:shapes faces='done'/><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh5.googleusercontent.com/-L1KRj_8RPBc/UfpqrgQ4S2I/AAAAAAAAMls/xILc4GmEodU/Test%252520file%2525204.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh5.googleusercontent.com/-L1KRj_8RPBc/UfpqrgQ4S2I/AAAAAAAAMls/xILc4GmEodU/s72/Test%252520file%2525204.jpg' height='67' width='72'/><media:thumbnail url='https://lh5.googleusercontent.com/-L1KRj_8RPBc/UfpqrgQ4S2I/AAAAAAAAMls/xILc4GmEodU/s144/Test%252520file%2525204.jpg' height='92' width='100'/><media:thumbnail url='https://lh5.googleusercontent.com/-L1KRj_8RPBc/UfpqrgQ4S2I/AAAAAAAAMls/xILc4GmEodU/s288/Test%252520file%2525204.jpg' height='92' width='100'/><media:title type='plain'>Test file 4</media:title></media:group></entry></feed>
+
--- /dev/null
+> GET /data/entry/api/user/default HTTP/1.1
+> Soup-Debug-Timestamp: 1375193219
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 51 (0x7fffd800ebb0), SoupSocket 21 (0x7fffe0028620)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375193219
+< Soup-Debug: SoupMessage 51 (0x7fffd800ebb0)
+< Expires: Tue, 30 Jul 2013 14:06:59 GMT
+< Date: Tue, 30 Jul 2013 14:06:59 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=jcMsmLBVV-eg; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=-LbMkhBBJ5dAqLw2XAcZaw; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"CUUFSXc6fyp7ImA9WhFWEUQ."
+< Last-Modified: Tue, 30 Jul 2013 14:06:58 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"CUUFSXc6fyp7ImA9WhFWEUQ."'><id>https://picasaweb.google.com/data/feed/user/libgdata.picasaweb</id><published>2013-07-30T14:06:59.656Z</published><updated>2013-07-30T14:06:58.917Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#user'/><title>libgdata.picasaweb</title><summary/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s64-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:quotalimit>16106127360</gphoto:quotalimit><gphoto:quotacurrent>1796070</gphoto:quotacurrent><gphoto:maxPhotosPerAlbum>1000</gphoto:maxPhotosPerAlbum></entry>
+
--- /dev/null
+> GET /data/entry/api/user/default HTTP/1.1
+> Soup-Debug-Timestamp: 1375193219
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 52 (0x7fffd800ef70), SoupSocket 21 (0x7fffe0028620)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375193219
+< Soup-Debug: SoupMessage 52 (0x7fffd800ef70)
+< Expires: Tue, 30 Jul 2013 14:07:00 GMT
+< Date: Tue, 30 Jul 2013 14:07:00 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=IKpCLVGNcEjO; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=PR_2dH-tKmRcA9vklKNYyg; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"CUUFSXc6fyp7ImA9WhFWEUQ."
+< Last-Modified: Tue, 30 Jul 2013 14:06:58 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"CUUFSXc6fyp7ImA9WhFWEUQ."'><id>https://picasaweb.google.com/data/feed/user/libgdata.picasaweb</id><published>2013-07-30T14:07:00.148Z</published><updated>2013-07-30T14:06:58.917Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#user'/><title>libgdata.picasaweb</title><summary/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s64-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:quotalimit>16106127360</gphoto:quotalimit><gphoto:quotacurrent>1796070</gphoto:quotacurrent><gphoto:maxPhotosPerAlbum>1000</gphoto:maxPhotosPerAlbum></entry>
+
+> GET /data/entry/api/user/default HTTP/1.1
+> Soup-Debug-Timestamp: 1375193220
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 53 (0x7fffd800e9d0), SoupSocket 22 (0x7fffe0028620)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375193220
+< Soup-Debug: SoupMessage 53 (0x7fffd800e9d0)
+< Expires: Tue, 30 Jul 2013 14:07:00 GMT
+< Date: Tue, 30 Jul 2013 14:07:00 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=HkFgClQx6DR7; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=WwF3IuZHk6M_LyWlV6Sreg; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"CUUFSXc6fyp7ImA9WhFWEUQ."
+< Last-Modified: Tue, 30 Jul 2013 14:06:58 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"CUUFSXc6fyp7ImA9WhFWEUQ."'><id>https://picasaweb.google.com/data/feed/user/libgdata.picasaweb</id><published>2013-07-30T14:07:00.981Z</published><updated>2013-07-30T14:06:58.917Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#user'/><title>libgdata.picasaweb</title><summary/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s64-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:quotalimit>16106127360</gphoto:quotalimit><gphoto:quotacurrent>1796070</gphoto:quotacurrent><gphoto:maxPhotosPerAlbum>1000</gphoto:maxPhotosPerAlbum></entry>
+
+> GET /data/entry/api/user/default HTTP/1.1
+> Soup-Debug-Timestamp: 1375193220
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 54 (0x7fffd800ee80), SoupSocket 23 (0x7fffe0028620)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375193220
+< Soup-Debug: SoupMessage 54 (0x7fffd800ee80)
+< Expires: Tue, 30 Jul 2013 14:07:01 GMT
+< Date: Tue, 30 Jul 2013 14:07:01 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=QolHWxCYxSBu; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=qVMSBPHSqwkF44ZkhSEYqQ; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"CUUFSXc6fyp7ImA9WhFWEUQ."
+< Last-Modified: Tue, 30 Jul 2013 14:06:58 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"CUUFSXc6fyp7ImA9WhFWEUQ."'><id>https://picasaweb.google.com/data/feed/user/libgdata.picasaweb</id><published>2013-07-30T14:07:01.119Z</published><updated>2013-07-30T14:06:58.917Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#user'/><title>libgdata.picasaweb</title><summary/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s64-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:quotalimit>16106127360</gphoto:quotalimit><gphoto:quotacurrent>1796070</gphoto:quotacurrent><gphoto:maxPhotosPerAlbum>1000</gphoto:maxPhotosPerAlbum></entry>
+
--- /dev/null
+> GET /data/entry/api/user/philip.withnall HTTP/1.1
+> Soup-Debug-Timestamp: 1375193221
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 55 (0x7fffe40190e0), SoupSocket 23 (0x7fffe0028620)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375193221
+< Soup-Debug: SoupMessage 55 (0x7fffe40190e0)
+< Expires: Tue, 30 Jul 2013 14:07:01 GMT
+< Date: Tue, 30 Jul 2013 14:07:01 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=81v56Gedn07l; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=NjKbWgZAAKXezlt5U_PSwQ; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"DEEHR38yeyp7ImA9WhFWEU0."
+< Last-Modified: Mon, 29 Jul 2013 14:03:56 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"DEEHR38yeyp7ImA9WhFWEU0."'><id>https://picasaweb.google.com/data/feed/user/104200312198892774147</id><published>2013-07-30T14:07:01.439Z</published><updated>2013-07-29T14:03:56.193Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#user'/><title>104200312198892774147</title><summary/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/104200312198892774147'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/104200312198892774147'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/104200312198892774147'/><author><name>Philip Withnall</name><uri>https://picasaweb.google.com/104200312198892774147</uri></author><gphoto:user>104200312198892774147</gphoto:user><gphoto:nickname>Philip Withnall</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-HrhxnzxTjp8/AAAAAAAAAAI/AAAAAAAAAAA/HcBOyJqasow/s64-c/104200312198892774147.jpg</gphoto:thumbnail></entry>
+
--- /dev/null
+> GET /data/entry/api/user/philip.withnall HTTP/1.1
+> Soup-Debug-Timestamp: 1375193221
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 56 (0x7fffd800e9d0), SoupSocket 23 (0x7fffe0028620)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375193221
+< Soup-Debug: SoupMessage 56 (0x7fffd800e9d0)
+< Expires: Tue, 30 Jul 2013 14:07:02 GMT
+< Date: Tue, 30 Jul 2013 14:07:02 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=5lwIlSNLHpIB; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=ldGTkBt8vrc2Wx4z2UA85w; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"DEEHR38yeyp7ImA9WhFWEU0."
+< Last-Modified: Mon, 29 Jul 2013 14:03:56 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"DEEHR38yeyp7ImA9WhFWEU0."'><id>https://picasaweb.google.com/data/feed/user/104200312198892774147</id><published>2013-07-30T14:07:02.051Z</published><updated>2013-07-29T14:03:56.193Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#user'/><title>104200312198892774147</title><summary/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/104200312198892774147'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/104200312198892774147'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/104200312198892774147'/><author><name>Philip Withnall</name><uri>https://picasaweb.google.com/104200312198892774147</uri></author><gphoto:user>104200312198892774147</gphoto:user><gphoto:nickname>Philip Withnall</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-HrhxnzxTjp8/AAAAAAAAAAI/AAAAAAAAAAA/HcBOyJqasow/s64-c/104200312198892774147.jpg</gphoto:thumbnail></entry>
+
+> GET /data/entry/api/user/philip.withnall HTTP/1.1
+> Soup-Debug-Timestamp: 1375193221
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 57 (0x7fffd800ee80), SoupSocket 24 (0x7fffe0028620)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375193222
+< Soup-Debug: SoupMessage 57 (0x7fffd800ee80)
+< Expires: Tue, 30 Jul 2013 14:07:02 GMT
+< Date: Tue, 30 Jul 2013 14:07:02 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=VGPDpVlj9GeF; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=o7C_5n27tKio2U7h48GTDQ; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"DEEHR38yeyp7ImA9WhFWEU0."
+< Last-Modified: Mon, 29 Jul 2013 14:03:56 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"DEEHR38yeyp7ImA9WhFWEU0."'><id>https://picasaweb.google.com/data/feed/user/104200312198892774147</id><published>2013-07-30T14:07:02.661Z</published><updated>2013-07-29T14:03:56.193Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#user'/><title>104200312198892774147</title><summary/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/104200312198892774147'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/104200312198892774147'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/104200312198892774147'/><author><name>Philip Withnall</name><uri>https://picasaweb.google.com/104200312198892774147</uri></author><gphoto:user>104200312198892774147</gphoto:user><gphoto:nickname>Philip Withnall</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-HrhxnzxTjp8/AAAAAAAAAAI/AAAAAAAAAAA/HcBOyJqasow/s64-c/104200312198892774147.jpg</gphoto:thumbnail></entry>
+
+> GET /data/entry/api/user/philip.withnall HTTP/1.1
+> Soup-Debug-Timestamp: 1375193222
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 58 (0x78d730), SoupSocket 25 (0x7fffe0028620)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375193223
+< Soup-Debug: SoupMessage 58 (0x78d730)
+< Expires: Tue, 30 Jul 2013 14:07:03 GMT
+< Date: Tue, 30 Jul 2013 14:07:03 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=vpLKBUGpmhn6; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=phcGxLajQeViqEBcmO41qQ; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"DEEHR38yeyp7ImA9WhFWEU0."
+< Last-Modified: Mon, 29 Jul 2013 14:03:56 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"DEEHR38yeyp7ImA9WhFWEU0."'><id>https://picasaweb.google.com/data/feed/user/104200312198892774147</id><published>2013-07-30T14:07:03.504Z</published><updated>2013-07-29T14:03:56.193Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#user'/><title>104200312198892774147</title><summary/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/104200312198892774147'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/104200312198892774147'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/104200312198892774147'/><author><name>Philip Withnall</name><uri>https://picasaweb.google.com/104200312198892774147</uri></author><gphoto:user>104200312198892774147</gphoto:user><gphoto:nickname>Philip Withnall</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-HrhxnzxTjp8/AAAAAAAAAAI/AAAAAAAAAAA/HcBOyJqasow/s64-c/104200312198892774147.jpg</gphoto:thumbnail></entry>
+
+> GET /data/entry/api/user/philip.withnall HTTP/1.1
+> Soup-Debug-Timestamp: 1375193223
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 59 (0x7fffd800ebb0), SoupSocket 26 (0x7fffe0028620)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375193223
+< Soup-Debug: SoupMessage 59 (0x7fffd800ebb0)
+< Expires: Tue, 30 Jul 2013 14:07:03 GMT
+< Date: Tue, 30 Jul 2013 14:07:03 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=NNZKt6daphG5; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=MbP0ESEWbNzTAnUb_c7TMw; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"DEEHR38yeyp7ImA9WhFWEU0."
+< Last-Modified: Mon, 29 Jul 2013 14:03:56 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"DEEHR38yeyp7ImA9WhFWEU0."'><id>https://picasaweb.google.com/data/feed/user/104200312198892774147</id><published>2013-07-30T14:07:03.734Z</published><updated>2013-07-29T14:03:56.193Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#user'/><title>104200312198892774147</title><summary/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/104200312198892774147'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/104200312198892774147'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/104200312198892774147'/><author><name>Philip Withnall</name><uri>https://picasaweb.google.com/104200312198892774147</uri></author><gphoto:user>104200312198892774147</gphoto:user><gphoto:nickname>Philip Withnall</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-HrhxnzxTjp8/AAAAAAAAAAI/AAAAAAAAAAA/HcBOyJqasow/s64-c/104200312198892774147.jpg</gphoto:thumbnail></entry>
+
--- /dev/null
+> POST /data/feed/api/user/default HTTP/1.1
+> Soup-Debug-Timestamp: 1375193211
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 40 (0x78d550), SoupSocket 17 (0x7cba30)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:georss='http://www.georss.org/georss' xmlns:gml='http://www.opengis.net/gml' xmlns:gd='http://schemas.google.com/g/2005' xmlns:app='http://www.w3.org/2007/app' xmlns:media='http://search.yahoo.com/mrss/'><title type='text'>Test album 1 for QueryAllAlbums</title><rights>private</rights><category term='http://schemas.google.com/photos/2007#album' scheme='http://schemas.google.com/g/2005#kind'/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193211000</gphoto:timestamp><gphoto:commentingEnabled>false</gphoto:commentingEnabled><media:group><media:title type='plain'>Test album 1 for QueryAllAlbums</media:title></media:group></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375193212
+< Soup-Debug: SoupMessage 40 (0x78d550)
+< Expires: Tue, 30 Jul 2013 14:06:52 GMT
+< Date: Tue, 30 Jul 2013 14:06:52 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=Oz5kBY9r-bOe; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=uHYyW_yk_rtx3oUjvBOZYg; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 2.0
+< ETag: "YD0qeyI."
+< Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409867090978209?authkey=Gv1sRgCMGwmsnnoJ6GgAE
+< Content-Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409867090978209?authkey=Gv1sRgCMGwmsnnoJ6GgAE
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409867090978209</id><published>2013-07-30T14:06:51.000Z</published><updated>2013-07-30T14:06:51.971Z</updated><app:edited>2013-07-30T14:06:51.971Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 1 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409867090978209?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum1ForQueryAllAlbums72?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409867090978209?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409867090978209?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409867090978209/acl?authkey=Gv1sRgCMGwmsnnoJ6GgAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409867090978209</gphoto:id><gphoto:name>TestAlbum1ForQueryAllAlbums72</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193211000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh3.googleusercontent.com/-dghQiMuTN2c/UffIewnR5aE/AAAAAAAAMeY/1BIIg4oW3qw/TestAlbum1ForQueryAllAlbums72.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-dghQiMuTN2c/UffIewnR5aE/AAAAAAAAMeY/1BIIg4oW3qw/s160-c/TestAlbum1ForQueryAllAlbums72.jpg' height='160' width='160'/><media:title type='plain'>Test album 1 for QueryAllAlbums</media:title></media:group></entry>
+
+> POST /data/feed/api/user/default HTTP/1.1
+> Soup-Debug-Timestamp: 1375193212
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 41 (0x78d550), SoupSocket 18 (0x7fffdc0043c0)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:georss='http://www.georss.org/georss' xmlns:gml='http://www.opengis.net/gml' xmlns:gd='http://schemas.google.com/g/2005' xmlns:app='http://www.w3.org/2007/app' xmlns:media='http://search.yahoo.com/mrss/'><title type='text'>Test album 2 for QueryAllAlbums</title><rights>private</rights><category term='http://schemas.google.com/photos/2007#album' scheme='http://schemas.google.com/g/2005#kind'/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193212000</gphoto:timestamp><gphoto:commentingEnabled>false</gphoto:commentingEnabled><media:group><media:title type='plain'>Test album 2 for QueryAllAlbums</media:title></media:group></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375193213
+< Soup-Debug: SoupMessage 41 (0x78d550)
+< Expires: Tue, 30 Jul 2013 14:06:53 GMT
+< Date: Tue, 30 Jul 2013 14:06:53 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=CFnNibO9gAqe; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=YFVu1qVaPdljemBM2wHzOg; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 2.0
+< ETag: "YD0qeyI."
+< Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409873513866033?authkey=Gv1sRgCMLm1Ljg2tqqIA
+< Content-Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409873513866033?authkey=Gv1sRgCMLm1Ljg2tqqIA
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409873513866033</id><published>2013-07-30T14:06:52.000Z</published><updated>2013-07-30T14:06:52.851Z</updated><app:edited>2013-07-30T14:06:52.851Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 2 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409873513866033?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum2ForQueryAllAlbums70?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409873513866033?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409873513866033?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409873513866033/acl?authkey=Gv1sRgCMLm1Ljg2tqqIA'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409873513866033</gphoto:id><gphoto:name>TestAlbum2ForQueryAllAlbums70</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193212000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh6.googleusercontent.com/-4Whv1UHATRo/UffIfIinYzE/AAAAAAAAMec/PtrYZnVuv6Y/TestAlbum2ForQueryAllAlbums70.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh6.googleusercontent.com/-4Whv1UHATRo/UffIfIinYzE/AAAAAAAAMec/PtrYZnVuv6Y/s160-c/TestAlbum2ForQueryAllAlbums70.jpg' height='160' width='160'/><media:title type='plain'>Test album 2 for QueryAllAlbums</media:title></media:group></entry>
+
+> POST /data/feed/api/user/default HTTP/1.1
+> Soup-Debug-Timestamp: 1375193213
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 42 (0x78d0a0), SoupSocket 19 (0x7cbc70)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:georss='http://www.georss.org/georss' xmlns:gml='http://www.opengis.net/gml' xmlns:gd='http://schemas.google.com/g/2005' xmlns:app='http://www.w3.org/2007/app' xmlns:media='http://search.yahoo.com/mrss/'><title type='text'>Test album 3 for QueryAllAlbums</title><rights>private</rights><category term='http://schemas.google.com/photos/2007#album' scheme='http://schemas.google.com/g/2005#kind'/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193213000</gphoto:timestamp><gphoto:commentingEnabled>false</gphoto:commentingEnabled><media:group><media:title type='plain'>Test album 3 for QueryAllAlbums</media:title></media:group></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375193214
+< Soup-Debug: SoupMessage 42 (0x78d0a0)
+< Expires: Tue, 30 Jul 2013 14:06:54 GMT
+< Date: Tue, 30 Jul 2013 14:06:54 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=vBpQdJXcxFY3; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=J3KSb9f0pAjHbbrNDUM9CA; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 2.0
+< ETag: "YD0qeyI."
+< Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409876619235281?authkey=Gv1sRgCPmiyez0rYT-Qg
+< Content-Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409876619235281?authkey=Gv1sRgCPmiyez0rYT-Qg
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409876619235281</id><published>2013-07-30T14:06:53.000Z</published><updated>2013-07-30T14:06:53.653Z</updated><app:edited>2013-07-30T14:06:53.653Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 3 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409876619235281?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum3ForQueryAllAlbums69?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409876619235281?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409876619235281?authkey=Gv1sRgCPmiyez0rYT-Qg'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409876619235281/acl?authkey=Gv1sRgCPmiyez0rYT-Qg'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409876619235281</gphoto:id><gphoto:name>TestAlbum3ForQueryAllAlbums69</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193213000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh3.googleusercontent.com/-NWEN_d_Rhf4/UffIfUG_j9E/AAAAAAAAMeg/GF0PsCeCr-A/TestAlbum3ForQueryAllAlbums69.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-NWEN_d_Rhf4/UffIfUG_j9E/AAAAAAAAMeg/GF0PsCeCr-A/s160-c/TestAlbum3ForQueryAllAlbums69.jpg' height='160' width='160'/><media:title type='plain'>Test album 3 for QueryAllAlbums</media:title></media:group></entry>
+
+> POST /data/feed/api/user/default HTTP/1.1
+> Soup-Debug-Timestamp: 1375193214
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 43 (0x78d190), SoupSocket 20 (0x7cbbb0)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:georss='http://www.georss.org/georss' xmlns:gml='http://www.opengis.net/gml' xmlns:gd='http://schemas.google.com/g/2005' xmlns:app='http://www.w3.org/2007/app' xmlns:media='http://search.yahoo.com/mrss/'><title type='text'>Test album 4 for QueryAllAlbums</title><rights>private</rights><category term='http://schemas.google.com/photos/2007#album' scheme='http://schemas.google.com/g/2005#kind'/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193214000</gphoto:timestamp><gphoto:commentingEnabled>false</gphoto:commentingEnabled><media:group><media:title type='plain'>Test album 4 for QueryAllAlbums</media:title></media:group></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375193215
+< Soup-Debug: SoupMessage 43 (0x78d190)
+< Expires: Tue, 30 Jul 2013 14:06:55 GMT
+< Date: Tue, 30 Jul 2013 14:06:55 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=tJdUCcJ5mrOd; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=8DO6vtUhqhM2zmMYchOFBg; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 2.0
+< ETag: "YD0qeyI."
+< Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409880413253681?authkey=Gv1sRgCOSEzMfX0feeQA
+< Content-Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409880413253681?authkey=Gv1sRgCOSEzMfX0feeQA
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5906409880413253681</id><published>2013-07-30T14:06:54.000Z</published><updated>2013-07-30T14:06:54.614Z</updated><app:edited>2013-07-30T14:06:54.614Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album 4 for QueryAllAlbums</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5906409880413253681?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbum4ForQueryAllAlbums68?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409880413253681?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409880413253681?authkey=Gv1sRgCOSEzMfX0feeQA'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5906409880413253681/acl?authkey=Gv1sRgCOSEzMfX0feeQA'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5906409880413253681</gphoto:id><gphoto:name>TestAlbum4ForQueryAllAlbums68</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375193214000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh4.googleusercontent.com/-Dj-tuEB-sz4/UffIfiPjsDE/AAAAAAAAMek/VnTLegFlzSc/TestAlbum4ForQueryAllAlbums68.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh4.googleusercontent.com/-Dj-tuEB-sz4/UffIfiPjsDE/AAAAAAAAMek/VnTLegFlzSc/s160-c/TestAlbum4ForQueryAllAlbums68.jpg' height='160' width='160'/><media:title type='plain'>Test album 4 for QueryAllAlbums</media:title></media:group></entry>
+
--- /dev/null
+> POST /data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE HTTP/1.1
+> Soup-Debug-Timestamp: 1375367397
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 48 (0x79ed80), SoupSocket 30 (0x706a60)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANoAAAAOuUYXwRBAHgNEEbEl4k3Pfxl9EMLyqMFS6XDPU8V6x6UdXPfUNk8406bdjrbicpY09aRzdq5P_E2B4rdPeJG9iMU-Fcapg-QZcFs_CnJpq66uXpvAcZ2y_TSvFzzliXnxvIIPeU-8ofrMKG3STiGssYg2SkpME_sUu4LOpsBmcP8380ZMY-7PFQZYzZ1VmwB58hmU34NecZY4b3nngnRI4EKZiMseyudbDXuE-X6KIJp4SVY1RVvMCu5oRTHw5vd6C0s3JM-n9_u9xDsXBn-3xdKvPeGBINjX33DeqFvIgw
+> GData-Version: 2
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'></title><content type='text'>Test comment 1.</content><category term='http://schemas.google.com/photos/2007#comment' scheme='http://schemas.google.com/g/2005#kind'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375367398
+< Soup-Debug: SoupMessage 48 (0x79ed80)
+< Expires: Thu, 01 Aug 2013 14:29:58 GMT
+< Date: Thu, 01 Aug 2013 14:29:58 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=_VC_nego1CsM; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=ZOFeHmsgsEugfLRgQiqO5g; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 2.0
+< ETag: W/"DUQNRnY4eCp7ImA9WhFWE0s."
+< Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157991014140692?authkey=Gv1sRgCKKx5unfo4qvuAE
+< Content-Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157991014140692?authkey=Gv1sRgCKKx5unfo4qvuAE
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"DUQNRnY4eCp7ImA9WhFWE0s."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157991014140692</id><published>2013-08-01T14:29:57.830Z</published><updated>2013-08-01T14:29:57.830Z</updated><app:edited>2013-08-01T14:29:57.830Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#comment'/><title>libgdata.picasaweb</title><content>Test comment 1.</content><link rel='alternate' type='text/html' href='https://picasaweb.google.com/lh/photo/tvuFAuI-9TZljsqogrDrzd62mdOu5-4lWildw13I8AE'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157991014140692?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907157991014140692?authkey=Gv1sRgCKKx5unfo4qvuAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s48-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:user>libgdata.picasaweb</gphoto:user></author><gphoto:id>5907157991014140692</gphoto:id><gphoto:photoid>5907162035673007314</gphoto:photoid></entry>
+
+> POST /data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE HTTP/1.1
+> Soup-Debug-Timestamp: 1375367398
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 49 (0x79ed80), SoupSocket 31 (0x706b20)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANoAAAAOuUYXwRBAHgNEEbEl4k3Pfxl9EMLyqMFS6XDPU8V6x6UdXPfUNk8406bdjrbicpY09aRzdq5P_E2B4rdPeJG9iMU-Fcapg-QZcFs_CnJpq66uXpvAcZ2y_TSvFzzliXnxvIIPeU-8ofrMKG3STiGssYg2SkpME_sUu4LOpsBmcP8380ZMY-7PFQZYzZ1VmwB58hmU34NecZY4b3nngnRI4EKZiMseyudbDXuE-X6KIJp4SVY1RVvMCu5oRTHw5vd6C0s3JM-n9_u9xDsXBn-3xdKvPeGBINjX33DeqFvIgw
+> GData-Version: 2
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'></title><content type='text'>Test comment 2.</content><category term='http://schemas.google.com/photos/2007#comment' scheme='http://schemas.google.com/g/2005#kind'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375367399
+< Soup-Debug: SoupMessage 49 (0x79ed80)
+< Expires: Thu, 01 Aug 2013 14:29:59 GMT
+< Date: Thu, 01 Aug 2013 14:29:59 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=V4zy3O6a1rSi; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=keTNJ9gehkgUI79QkmmhrA; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 2.0
+< ETag: W/"DUQNSXczeSp7ImA9WhFWE0s."
+< Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907158001023135444?authkey=Gv1sRgCKKx5unfo4qvuAE
+< Content-Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907158001023135444?authkey=Gv1sRgCKKx5unfo4qvuAE
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"DUQNSXczeSp7ImA9WhFWE0s."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907158001023135444</id><published>2013-08-01T14:29:58.981Z</published><updated>2013-08-01T14:29:58.981Z</updated><app:edited>2013-08-01T14:29:58.981Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#comment'/><title>libgdata.picasaweb</title><content>Test comment 2.</content><link rel='alternate' type='text/html' href='https://picasaweb.google.com/lh/photo/tvuFAuI-9TZljsqogrDrzd62mdOu5-4lWildw13I8AE'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907158001023135444?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907158001023135444?authkey=Gv1sRgCKKx5unfo4qvuAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s48-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:user>libgdata.picasaweb</gphoto:user></author><gphoto:id>5907158001023135444</gphoto:id><gphoto:photoid>5907162035673007314</gphoto:photoid></entry>
+
+> POST /data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE HTTP/1.1
+> Soup-Debug-Timestamp: 1375367400
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 50 (0x79eab0), SoupSocket 32 (0x7068e0)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANoAAAAOuUYXwRBAHgNEEbEl4k3Pfxl9EMLyqMFS6XDPU8V6x6UdXPfUNk8406bdjrbicpY09aRzdq5P_E2B4rdPeJG9iMU-Fcapg-QZcFs_CnJpq66uXpvAcZ2y_TSvFzzliXnxvIIPeU-8ofrMKG3STiGssYg2SkpME_sUu4LOpsBmcP8380ZMY-7PFQZYzZ1VmwB58hmU34NecZY4b3nngnRI4EKZiMseyudbDXuE-X6KIJp4SVY1RVvMCu5oRTHw5vd6C0s3JM-n9_u9xDsXBn-3xdKvPeGBINjX33DeqFvIgw
+> GData-Version: 2
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'></title><content type='text'>Test comment 3.</content><category term='http://schemas.google.com/photos/2007#comment' scheme='http://schemas.google.com/g/2005#kind'/></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375367401
+< Soup-Debug: SoupMessage 50 (0x79eab0)
+< Expires: Thu, 01 Aug 2013 14:30:01 GMT
+< Date: Thu, 01 Aug 2013 14:30:01 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=93HAa1Vg4hES; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=NJlYj7ysIUI7Sd2JDduLpA; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 2.0
+< ETag: W/"DUMEQXc6fCp7ImA9WhFWE0s."
+< Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907158005467377316?authkey=Gv1sRgCKKx5unfo4qvuAE
+< Content-Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907158005467377316?authkey=Gv1sRgCKKx5unfo4qvuAE
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"DUMEQXc6fCp7ImA9WhFWE0s."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907158005467377316</id><published>2013-08-01T14:30:00.914Z</published><updated>2013-08-01T14:30:00.914Z</updated><app:edited>2013-08-01T14:30:00.914Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#comment'/><title>libgdata.picasaweb</title><content>Test comment 3.</content><link rel='alternate' type='text/html' href='https://picasaweb.google.com/lh/photo/tvuFAuI-9TZljsqogrDrzd62mdOu5-4lWildw13I8AE'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907158005467377316?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907158005467377316?authkey=Gv1sRgCKKx5unfo4qvuAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s48-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:user>libgdata.picasaweb</gphoto:user></author><gphoto:id>5907158005467377316</gphoto:id><gphoto:photoid>5907162035673007314</gphoto:photoid></entry>
+
--- /dev/null
+> POST /data/feed/api/user/default HTTP/1.1
+> Soup-Debug-Timestamp: 1375368332
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 19 (0x98c560), SoupSocket 13 (0x7833c0)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANoAAABqfAP7BRwUl4NRRp09PQSGS8uM-ZHOZSba6D-hWAtvmHRVj-ck_2T9BM_92VDR_pDDGg2bApfteDk1ITzABtR_40EhsW_nXzefXLRJERXTVaZl9fs1z3wuPIApugLt5Vf5-wimwxfqmsGz_45loIQFnyvJ3i0jPnvGutxhdAD7OxQHugZ6U_79W74suTD6wqP8JTcAlbyAVDcA7cdyLccjx6Pz_EgrD72AYxCCrQTKlX-d4Wv1PEbNKxXSP1g1JM2ugqZF-JBLWh5SAjyTpKK9Igbs7M1DeVrhPb4DQMfsdg
+> GData-Version: 2
+> Content-Type: application/atom+xml
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:georss='http://www.georss.org/georss' xmlns:gml='http://www.opengis.net/gml' xmlns:gd='http://schemas.google.com/g/2005' xmlns:app='http://www.w3.org/2007/app' xmlns:media='http://search.yahoo.com/mrss/'><title type='text'>Test album for QueryFiles</title><rights>private</rights><category term='http://schemas.google.com/photos/2007#album' scheme='http://schemas.google.com/g/2005#kind'/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375368331000</gphoto:timestamp><gphoto:commentingEnabled>false</gphoto:commentingEnabled><media:group><media:title type='plain'>Test album for QueryFiles</media:title></media:group></entry>
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375368333
+< Soup-Debug: SoupMessage 19 (0x98c560)
+< Expires: Thu, 01 Aug 2013 14:45:33 GMT
+< Date: Thu, 01 Aug 2013 14:45:33 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=vw6OtpWVuiBF; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=WnbtSDM3_TCtxlD1F6ssgQ; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 2.0
+< ETag: "YD0qeyI."
+< Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553?authkey=Gv1sRgCKKx5unfo4qvuAE
+< Content-Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553?authkey=Gv1sRgCKKx5unfo4qvuAE
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553</id><published>2013-08-01T14:45:31.000Z</published><updated>2013-08-01T14:45:32.397Z</updated><app:edited>2013-08-01T14:45:32.397Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album for QueryFiles</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles39?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/acl?authkey=Gv1sRgCKKx5unfo4qvuAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5907162005897469553</gphoto:id><gphoto:name>TestAlbumForQueryFiles39</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375368331000</gphoto:timestamp><gphoto:numphotos>0</gphoto:numphotos><gphoto:numphotosremaining>1000</gphoto:numphotosremaining><gphoto:bytesUsed>0</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh5.googleusercontent.com/-FBitAUKRN-c/Ufp0jAAz3nE/AAAAAAAAMsA/WfO_Bu-fjvE/TestAlbumForQueryFiles39.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh5.googleusercontent.com/-FBitAUKRN-c/Ufp0jAAz3nE/AAAAAAAAMsA/WfO_Bu-fjvE/s160-c/TestAlbumForQueryFiles39.jpg' height='160' width='160'/><media:title type='plain'>Test album for QueryFiles</media:title></media:group></entry>
+
+> POST /data/feed/api/user/default/albumid/5907162005897469553 HTTP/1.1
+> Soup-Debug-Timestamp: 1375368335
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 20 (0x98c560), SoupSocket 14 (0x783300)
+> Host: picasaweb.google.com
+> Slug: photo.jpg
+> Transfer-Encoding: chunked
+> Content-Type: multipart/related; boundary=0003Z5W789deadbeefRTE456KlemsnoZV
+> Authorization: GoogleLogin auth=DQAAANoAAABqfAP7BRwUl4NRRp09PQSGS8uM-ZHOZSba6D-hWAtvmHRVj-ck_2T9BM_92VDR_pDDGg2bApfteDk1ITzABtR_40EhsW_nXzefXLRJERXTVaZl9fs1z3wuPIApugLt5Vf5-wimwxfqmsGz_45loIQFnyvJ3i0jPnvGutxhdAD7OxQHugZ6U_79W74suTD6wqP8JTcAlbyAVDcA7cdyLccjx6Pz_EgrD72AYxCCrQTKlX-d4Wv1PEbNKxXSP1g1JM2ugqZF-JBLWh5SAjyTpKK9Igbs7M1DeVrhPb4DQMfsdg
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375368340
+< Soup-Debug: SoupMessage 20 (0x98c560)
+< Expires: Thu, 01 Aug 2013 14:45:40 GMT
+< Date: Thu, 01 Aug 2013 14:45:40 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=_0QHZag_qPz-; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=qoAUvhoS7ajNj_PMmTCPjg; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 2.0
+< ETag: "YD0qeyI."
+< Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE
+< Content-Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:exif='http://schemas.google.com/photos/exif/2007' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314</id><published>2013-08-01T14:45:38.000Z</published><updated>2013-08-01T14:45:38.859Z</updated><app:edited>2013-08-01T14:45:38.859Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Test file 1</title><summary/><content type='image/jpeg' src='https://lh3.googleusercontent.com/-PFuCSAHxsIM/Ufp0ku72hNI/AAAAAAAAMsE/Eka2goyoX-Q/Test%252520file%2525201.jpg'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles39?authkey=Gv1sRgCKKx5unfo4qvuAE#5907162035673007314'/><link rel='http://schemas.google.com/photos/2007#canonical' type='text/html' href='https://picasaweb.google.com/lh/photo/TclHBnxkCWRiCOH8UL0V8anPQSJCD8MPruhZxgfAX5U'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit-media' type='image/jpeg' href='https://picasaweb.google.com/data/media/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907162005897469553&iid=5907162035673007314'/><gphoto:id>5907162035673007314</gphoto:id><gphoto:albumid>5907162005897469553</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154790828000</gphoto:timestamp><gphoto:imageVersion>12993</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>0</gphoto:commentCount><gphoto:streamId>shared_group_5907162035673007314</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><gphoto:shapes faces='done'/><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh3.googleusercontent.com/-PFuCSAHxsIM/Ufp0ku72hNI/AAAAAAAAMsE/Eka2goyoX-Q/Test%252520file%2525201.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh3.googleusercontent.com/-PFuCSAHxsIM/Ufp0ku72hNI/AAAAAAAAMsE/Eka2goyoX-Q/s72/Test%252520file%2525201.jpg' height='67' width='72'/><media:thumbnail url='https://lh3.googleusercontent.com/-PFuCSAHxsIM/Ufp0ku72hNI/AAAAAAAAMsE/Eka2goyoX-Q/s144/Test%252520file%2525201.jpg' height='92' width='100'/><media:thumbnail url='https://lh3.googleusercontent.com/-PFuCSAHxsIM/Ufp0ku72hNI/AAAAAAAAMsE/Eka2goyoX-Q/s288/Test%252520file%2525201.jpg' height='92' width='100'/><media:title type='plain'>Test file 1</media:title></media:group></entry>
+
+> POST /data/feed/api/user/default/albumid/5907162005897469553 HTTP/1.1
+> Soup-Debug-Timestamp: 1375368341
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 21 (0x98c470), SoupSocket 15 (0x7833c0)
+> Host: picasaweb.google.com
+> Slug: photo.jpg
+> Transfer-Encoding: chunked
+> Content-Type: multipart/related; boundary=0003Z5W789deadbeefRTE456KlemsnoZV
+> Authorization: GoogleLogin auth=DQAAANoAAABqfAP7BRwUl4NRRp09PQSGS8uM-ZHOZSba6D-hWAtvmHRVj-ck_2T9BM_92VDR_pDDGg2bApfteDk1ITzABtR_40EhsW_nXzefXLRJERXTVaZl9fs1z3wuPIApugLt5Vf5-wimwxfqmsGz_45loIQFnyvJ3i0jPnvGutxhdAD7OxQHugZ6U_79W74suTD6wqP8JTcAlbyAVDcA7cdyLccjx6Pz_EgrD72AYxCCrQTKlX-d4Wv1PEbNKxXSP1g1JM2ugqZF-JBLWh5SAjyTpKK9Igbs7M1DeVrhPb4DQMfsdg
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375368344
+< Soup-Debug: SoupMessage 21 (0x98c470)
+< Expires: Thu, 01 Aug 2013 14:45:44 GMT
+< Date: Thu, 01 Aug 2013 14:45:44 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=RDvr4iGmJnDK; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=0I9icdM71toXnaHN1MxBpQ; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 2.0
+< ETag: "YD0qeyI."
+< Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162054638195522?authkey=Gv1sRgCKKx5unfo4qvuAE
+< Content-Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162054638195522?authkey=Gv1sRgCKKx5unfo4qvuAE
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:exif='http://schemas.google.com/photos/exif/2007' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162054638195522</id><published>2013-08-01T14:45:42.000Z</published><updated>2013-08-01T14:45:42.995Z</updated><app:edited>2013-08-01T14:45:42.995Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Test file 2</title><summary/><content type='image/jpeg' src='https://lh6.googleusercontent.com/-_iXi7PL43RA/Ufp0l1lgU0I/AAAAAAAAMsM/A1NBb7ISIGg/Test%252520file%2525202.jpg'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162054638195522?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles39?authkey=Gv1sRgCKKx5unfo4qvuAE#5907162054638195522'/><link rel='http://schemas.google.com/photos/2007#canonical' type='text/html' href='https://picasaweb.google.com/lh/photo/y9tR0pVVJV9qM87zfj0-uanPQSJCD8MPruhZxgfAX5U'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162054638195522?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162054638195522?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit-media' type='image/jpeg' href='https://picasaweb.google.com/data/media/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162054638195522?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907162005897469553&iid=5907162054638195522'/><gphoto:id>5907162054638195522</gphoto:id><gphoto:albumid>5907162005897469553</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154790828000</gphoto:timestamp><gphoto:imageVersion>12995</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>0</gphoto:commentCount><gphoto:streamId>shared_group_5907162054638195522</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><gphoto:shapes faces='done'/><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh6.googleusercontent.com/-_iXi7PL43RA/Ufp0l1lgU0I/AAAAAAAAMsM/A1NBb7ISIGg/Test%252520file%2525202.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh6.googleusercontent.com/-_iXi7PL43RA/Ufp0l1lgU0I/AAAAAAAAMsM/A1NBb7ISIGg/s72/Test%252520file%2525202.jpg' height='67' width='72'/><media:thumbnail url='https://lh6.googleusercontent.com/-_iXi7PL43RA/Ufp0l1lgU0I/AAAAAAAAMsM/A1NBb7ISIGg/s144/Test%252520file%2525202.jpg' height='92' width='100'/><media:thumbnail url='https://lh6.googleusercontent.com/-_iXi7PL43RA/Ufp0l1lgU0I/AAAAAAAAMsM/A1NBb7ISIGg/s288/Test%252520file%2525202.jpg' height='92' width='100'/><media:title type='plain'>Test file 2</media:title></media:group></entry>
+
+> POST /data/feed/api/user/default/albumid/5907162005897469553 HTTP/1.1
+> Soup-Debug-Timestamp: 1375368346
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 22 (0x98c380), SoupSocket 16 (0x7836c0)
+> Host: picasaweb.google.com
+> Slug: photo.jpg
+> Transfer-Encoding: chunked
+> Content-Type: multipart/related; boundary=0003Z5W789deadbeefRTE456KlemsnoZV
+> Authorization: GoogleLogin auth=DQAAANoAAABqfAP7BRwUl4NRRp09PQSGS8uM-ZHOZSba6D-hWAtvmHRVj-ck_2T9BM_92VDR_pDDGg2bApfteDk1ITzABtR_40EhsW_nXzefXLRJERXTVaZl9fs1z3wuPIApugLt5Vf5-wimwxfqmsGz_45loIQFnyvJ3i0jPnvGutxhdAD7OxQHugZ6U_79W74suTD6wqP8JTcAlbyAVDcA7cdyLccjx6Pz_EgrD72AYxCCrQTKlX-d4Wv1PEbNKxXSP1g1JM2ugqZF-JBLWh5SAjyTpKK9Igbs7M1DeVrhPb4DQMfsdg
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375368354
+< Soup-Debug: SoupMessage 22 (0x98c380)
+< Expires: Thu, 01 Aug 2013 14:45:54 GMT
+< Date: Thu, 01 Aug 2013 14:45:54 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=RaI-x8gXns9e; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=WCZta8DpZj71VDJW5KwoAQ; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 2.0
+< ETag: "YD0qeyI."
+< Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162099854721666?authkey=Gv1sRgCKKx5unfo4qvuAE
+< Content-Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162099854721666?authkey=Gv1sRgCKKx5unfo4qvuAE
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:exif='http://schemas.google.com/photos/exif/2007' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162099854721666</id><published>2013-08-01T14:45:53.000Z</published><updated>2013-08-01T14:45:53.107Z</updated><app:edited>2013-08-01T14:45:53.107Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Test file 3</title><summary/><content type='image/jpeg' src='https://lh5.googleusercontent.com/-poVqadt-OAg/Ufp0oeB9woI/AAAAAAAAMsU/tsfWY3JagZk/Test%252520file%2525203.jpg'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162099854721666?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles39?authkey=Gv1sRgCKKx5unfo4qvuAE#5907162099854721666'/><link rel='http://schemas.google.com/photos/2007#canonical' type='text/html' href='https://picasaweb.google.com/lh/photo/KauqmXqSdXX35n_QVk-NXqnPQSJCD8MPruhZxgfAX5U'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162099854721666?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162099854721666?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit-media' type='image/jpeg' href='https://picasaweb.google.com/data/media/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162099854721666?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907162005897469553&iid=5907162099854721666'/><gphoto:id>5907162099854721666</gphoto:id><gphoto:albumid>5907162005897469553</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154790828000</gphoto:timestamp><gphoto:imageVersion>12997</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>0</gphoto:commentCount><gphoto:streamId>shared_group_5907162099854721666</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><gphoto:shapes faces='done'/><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh5.googleusercontent.com/-poVqadt-OAg/Ufp0oeB9woI/AAAAAAAAMsU/tsfWY3JagZk/Test%252520file%2525203.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh5.googleusercontent.com/-poVqadt-OAg/Ufp0oeB9woI/AAAAAAAAMsU/tsfWY3JagZk/s72/Test%252520file%2525203.jpg' height='67' width='72'/><media:thumbnail url='https://lh5.googleusercontent.com/-poVqadt-OAg/Ufp0oeB9woI/AAAAAAAAMsU/tsfWY3JagZk/s144/Test%252520file%2525203.jpg' height='92' width='100'/><media:thumbnail url='https://lh5.googleusercontent.com/-poVqadt-OAg/Ufp0oeB9woI/AAAAAAAAMsU/tsfWY3JagZk/s288/Test%252520file%2525203.jpg' height='92' width='100'/><media:title type='plain'>Test file 3</media:title></media:group></entry>
+
+> POST /data/feed/api/user/default/albumid/5907162005897469553 HTTP/1.1
+> Soup-Debug-Timestamp: 1375368355
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 23 (0x98c290), SoupSocket 17 (0x7833c0)
+> Host: picasaweb.google.com
+> Slug: photo.jpg
+> Transfer-Encoding: chunked
+> Content-Type: multipart/related; boundary=0003Z5W789deadbeefRTE456KlemsnoZV
+> Authorization: GoogleLogin auth=DQAAANoAAABqfAP7BRwUl4NRRp09PQSGS8uM-ZHOZSba6D-hWAtvmHRVj-ck_2T9BM_92VDR_pDDGg2bApfteDk1ITzABtR_40EhsW_nXzefXLRJERXTVaZl9fs1z3wuPIApugLt5Vf5-wimwxfqmsGz_45loIQFnyvJ3i0jPnvGutxhdAD7OxQHugZ6U_79W74suTD6wqP8JTcAlbyAVDcA7cdyLccjx6Pz_EgrD72AYxCCrQTKlX-d4Wv1PEbNKxXSP1g1JM2ugqZF-JBLWh5SAjyTpKK9Igbs7M1DeVrhPb4DQMfsdg
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375368357
+< Soup-Debug: SoupMessage 23 (0x98c290)
+< Expires: Thu, 01 Aug 2013 14:45:57 GMT
+< Date: Thu, 01 Aug 2013 14:45:57 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=RbBdr79Yt57r; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=ygQGvTGkOZmtSH1sDlxWaA; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 2.0
+< ETag: "YD0qeyI."
+< Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162109190039570?authkey=Gv1sRgCKKx5unfo4qvuAE
+< Content-Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162109190039570?authkey=Gv1sRgCKKx5unfo4qvuAE
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:exif='http://schemas.google.com/photos/exif/2007' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162109190039570</id><published>2013-08-01T14:45:56.000Z</published><updated>2013-08-01T14:45:56.011Z</updated><app:edited>2013-08-01T14:45:56.011Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Test file 4</title><summary/><content type='image/jpeg' src='https://lh6.googleusercontent.com/-wCE8bmyX3aY/Ufp0pAzraBI/AAAAAAAAMsc/rIeTDl7BHEU/Test%252520file%2525204.jpg'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162109190039570?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles39?authkey=Gv1sRgCKKx5unfo4qvuAE#5907162109190039570'/><link rel='http://schemas.google.com/photos/2007#canonical' type='text/html' href='https://picasaweb.google.com/lh/photo/iEPOCVy7-6N9JxTuFhROkqnPQSJCD8MPruhZxgfAX5U'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162109190039570?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162109190039570?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit-media' type='image/jpeg' href='https://picasaweb.google.com/data/media/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162109190039570?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907162005897469553&iid=5907162109190039570'/><gphoto:id>5907162109190039570</gphoto:id><gphoto:albumid>5907162005897469553</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154790828000</gphoto:timestamp><gphoto:imageVersion>12999</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>0</gphoto:commentCount><gphoto:streamId>shared_group_5907162109190039570</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><gphoto:shapes faces='done'/><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh6.googleusercontent.com/-wCE8bmyX3aY/Ufp0pAzraBI/AAAAAAAAMsc/rIeTDl7BHEU/Test%252520file%2525204.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh6.googleusercontent.com/-wCE8bmyX3aY/Ufp0pAzraBI/AAAAAAAAMsc/rIeTDl7BHEU/s72/Test%252520file%2525204.jpg' height='67' width='72'/><media:thumbnail url='https://lh6.googleusercontent.com/-wCE8bmyX3aY/Ufp0pAzraBI/AAAAAAAAMsc/rIeTDl7BHEU/s144/Test%252520file%2525204.jpg' height='92' width='100'/><media:thumbnail url='https://lh6.googleusercontent.com/-wCE8bmyX3aY/Ufp0pAzraBI/AAAAAAAAMsc/rIeTDl7BHEU/s288/Test%252520file%2525204.jpg' height='92' width='100'/><media:title type='plain'>Test file 4</media:title></media:group></entry>
+
--- /dev/null
+> DELETE /data/entry/api/user/libgdata.picasaweb/albumid/5906409948133134593?authkey=Gv1sRgCNOliffP6fuuCQ HTTP/1.1
+> Soup-Debug-Timestamp: 1375193230
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 67 (0x7fffe40191d0), SoupSocket 30 (0x7fffdc0046c0)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> If-Match: "YD0qeyI."
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375193231
+< Soup-Debug: SoupMessage 67 (0x7fffe40191d0)
+< Expires: Tue, 30 Jul 2013 14:07:10 GMT
+< Date: Tue, 30 Jul 2013 14:07:10 GMT
+< Cache-control: private, max-age=0, must-revalidate
+< Set-Cookie: _rtok=r1_n-6BVLIsW; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=3dBj2CkqejEkgZ1nrLkaGg; Domain=.google.com; Path=/; Secure; HttpOnly
+< GData-Version: 2.0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> DELETE /data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/photoid/5907162035673007314/commentid/5907161876232206500?authkey=Gv1sRgCKKx5unfo4qvuAE HTTP/1.1
+> Soup-Debug-Timestamp: 1375368361
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 25 (0x98c0b0), SoupSocket 18 (0x7fffe4003e20)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANoAAABqfAP7BRwUl4NRRp09PQSGS8uM-ZHOZSba6D-hWAtvmHRVj-ck_2T9BM_92VDR_pDDGg2bApfteDk1ITzABtR_40EhsW_nXzefXLRJERXTVaZl9fs1z3wuPIApugLt5Vf5-wimwxfqmsGz_45loIQFnyvJ3i0jPnvGutxhdAD7OxQHugZ6U_79W74suTD6wqP8JTcAlbyAVDcA7cdyLccjx6Pz_EgrD72AYxCCrQTKlX-d4Wv1PEbNKxXSP1g1JM2ugqZF-JBLWh5SAjyTpKK9Igbs7M1DeVrhPb4DQMfsdg
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375368362
+< Soup-Debug: SoupMessage 25 (0x98c0b0)
+< Expires: Thu, 01 Aug 2013 14:46:01 GMT
+< Date: Thu, 01 Aug 2013 14:46:01 GMT
+< Cache-control: private, max-age=0, must-revalidate
+< Set-Cookie: _rtok=pMALuboq7UlO; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=TQglgyLXWhM56m9zTRicHw; Domain=.google.com; Path=/; Secure; HttpOnly
+< GData-Version: 2.0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> DELETE /data/entry/api/user/libgdata.picasaweb/albumid/5906409867090978209?authkey=Gv1sRgCMGwmsnnoJ6GgAE HTTP/1.1
+> Soup-Debug-Timestamp: 1375193216
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 47 (0x78d190), SoupSocket 21 (0x7fffe0028620)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> If-Match: "YD0qeyI."
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375193217
+< Soup-Debug: SoupMessage 47 (0x78d190)
+< Expires: Tue, 30 Jul 2013 14:06:56 GMT
+< Date: Tue, 30 Jul 2013 14:06:56 GMT
+< Cache-control: private, max-age=0, must-revalidate
+< Set-Cookie: _rtok=jidlGO74otNO; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=y7RNVE_2yfziSmfv5s4SiA; Domain=.google.com; Path=/; Secure; HttpOnly
+< GData-Version: 2.0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
+> DELETE /data/entry/api/user/libgdata.picasaweb/albumid/5906409873513866033?authkey=Gv1sRgCMLm1Ljg2tqqIA HTTP/1.1
+> Soup-Debug-Timestamp: 1375193217
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 48 (0x78d0a0), SoupSocket 21 (0x7fffe0028620)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> If-Match: "YD0qeyI."
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375193217
+< Soup-Debug: SoupMessage 48 (0x78d0a0)
+< Expires: Tue, 30 Jul 2013 14:06:57 GMT
+< Date: Tue, 30 Jul 2013 14:06:57 GMT
+< Cache-control: private, max-age=0, must-revalidate
+< Set-Cookie: _rtok=ervPcy0WRqj7; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=oqxPfDw0j5QF3AgVSK1t9w; Domain=.google.com; Path=/; Secure; HttpOnly
+< GData-Version: 2.0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
+> DELETE /data/entry/api/user/libgdata.picasaweb/albumid/5906409876619235281?authkey=Gv1sRgCPmiyez0rYT-Qg HTTP/1.1
+> Soup-Debug-Timestamp: 1375193217
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 49 (0x78d550), SoupSocket 21 (0x7fffe0028620)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> If-Match: "YD0qeyI."
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375193218
+< Soup-Debug: SoupMessage 49 (0x78d550)
+< Expires: Tue, 30 Jul 2013 14:06:58 GMT
+< Date: Tue, 30 Jul 2013 14:06:58 GMT
+< Cache-control: private, max-age=0, must-revalidate
+< Set-Cookie: _rtok=_pfVAP39nN2h; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=bQ9rzDUYpZVSDdNVIw6FBg; Domain=.google.com; Path=/; Secure; HttpOnly
+< GData-Version: 2.0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
+> DELETE /data/entry/api/user/libgdata.picasaweb/albumid/5906409880413253681?authkey=Gv1sRgCOSEzMfX0feeQA HTTP/1.1
+> Soup-Debug-Timestamp: 1375193218
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 50 (0x78d550), SoupSocket 21 (0x7fffe0028620)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANsAAACBRkzDssWFvAbsJ__WhogKQOB1hOdZ-V7TTzopLOdrYUCoOa9HrmeNJp5iha8I-J-YTle_CcHcfDVOcXqR5x439iCm1fiMPcoABzsfdLTKLKU2avMGICiYQ4M8donG0cblZbUDOW31-6bwXScW_yvDNARuAj0KQcJBCLpc3-WqhraDgc6ELRTI5TxhGmwu4XUFs6hDSd5UH9c9b79Qin0no0kBdLyj1cKXI-l5tH_oWOVvZfXCB_XQd_dRkFL12iPvfKmjIfa18ETXQbhPwKBOl737cGye_Xd4emswaoB4Ew
+> GData-Version: 2
+> If-Match: "YD0qeyI."
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375193219
+< Soup-Debug: SoupMessage 50 (0x78d550)
+< Expires: Tue, 30 Jul 2013 14:06:58 GMT
+< Date: Tue, 30 Jul 2013 14:06:58 GMT
+< Cache-control: private, max-age=0, must-revalidate
+< Set-Cookie: _rtok=VJZ-_xK_wlKI; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=hOZsX0JWekOZRLD1LMsu3w; Domain=.google.com; Path=/; Secure; HttpOnly
+< GData-Version: 2.0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> DELETE /data/entry/api/user/libgdata.picasaweb/albumid/5907157944010797329/photoid/5907157956185170690/commentid/5907157991014140692?authkey=Gv1sRgCJq36rbq0by77gE HTTP/1.1
+> Soup-Debug-Timestamp: 1375367408
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 55 (0x79e9c0), SoupSocket 34 (0x7068e0)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANoAAAAOuUYXwRBAHgNEEbEl4k3Pfxl9EMLyqMFS6XDPU8V6x6UdXPfUNk8406bdjrbicpY09aRzdq5P_E2B4rdPeJG9iMU-Fcapg-QZcFs_CnJpq66uXpvAcZ2y_TSvFzzliXnxvIIPeU-8ofrMKG3STiGssYg2SkpME_sUu4LOpsBmcP8380ZMY-7PFQZYzZ1VmwB58hmU34NecZY4b3nngnRI4EKZiMseyudbDXuE-X6KIJp4SVY1RVvMCu5oRTHw5vd6C0s3JM-n9_u9xDsXBn-3xdKvPeGBINjX33DeqFvIgw
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375367409
+< Soup-Debug: SoupMessage 55 (0x79e9c0)
+< Expires: Thu, 01 Aug 2013 14:30:08 GMT
+< Date: Thu, 01 Aug 2013 14:30:08 GMT
+< Cache-control: private, max-age=0, must-revalidate
+< Set-Cookie: _rtok=4E5u3Yr2WUlJ; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=Sf9JkdQWsvm05zmwXbcXTg; Domain=.google.com; Path=/; Secure; HttpOnly
+< GData-Version: 2.0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
+> DELETE /data/entry/api/user/libgdata.picasaweb/albumid/5907157944010797329/photoid/5907157956185170690/commentid/5907158001023135444?authkey=Gv1sRgCJq36rbq0by77gE HTTP/1.1
+> Soup-Debug-Timestamp: 1375367409
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 56 (0x79e9c0), SoupSocket 34 (0x7068e0)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANoAAAAOuUYXwRBAHgNEEbEl4k3Pfxl9EMLyqMFS6XDPU8V6x6UdXPfUNk8406bdjrbicpY09aRzdq5P_E2B4rdPeJG9iMU-Fcapg-QZcFs_CnJpq66uXpvAcZ2y_TSvFzzliXnxvIIPeU-8ofrMKG3STiGssYg2SkpME_sUu4LOpsBmcP8380ZMY-7PFQZYzZ1VmwB58hmU34NecZY4b3nngnRI4EKZiMseyudbDXuE-X6KIJp4SVY1RVvMCu5oRTHw5vd6C0s3JM-n9_u9xDsXBn-3xdKvPeGBINjX33DeqFvIgw
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375367410
+< Soup-Debug: SoupMessage 56 (0x79e9c0)
+< Expires: Thu, 01 Aug 2013 14:30:09 GMT
+< Date: Thu, 01 Aug 2013 14:30:09 GMT
+< Cache-control: private, max-age=0, must-revalidate
+< Set-Cookie: _rtok=YpxgBBFu6JYN; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=KejD0X_urRXbohBLbA5nKQ; Domain=.google.com; Path=/; Secure; HttpOnly
+< GData-Version: 2.0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
+> DELETE /data/entry/api/user/libgdata.picasaweb/albumid/5907157944010797329/photoid/5907157956185170690/commentid/5907158005467377316?authkey=Gv1sRgCJq36rbq0by77gE HTTP/1.1
+> Soup-Debug-Timestamp: 1375367410
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 57 (0x79eab0), SoupSocket 34 (0x7068e0)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANoAAAAOuUYXwRBAHgNEEbEl4k3Pfxl9EMLyqMFS6XDPU8V6x6UdXPfUNk8406bdjrbicpY09aRzdq5P_E2B4rdPeJG9iMU-Fcapg-QZcFs_CnJpq66uXpvAcZ2y_TSvFzzliXnxvIIPeU-8ofrMKG3STiGssYg2SkpME_sUu4LOpsBmcP8380ZMY-7PFQZYzZ1VmwB58hmU34NecZY4b3nngnRI4EKZiMseyudbDXuE-X6KIJp4SVY1RVvMCu5oRTHw5vd6C0s3JM-n9_u9xDsXBn-3xdKvPeGBINjX33DeqFvIgw
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375367410
+< Soup-Debug: SoupMessage 57 (0x79eab0)
+< Expires: Thu, 01 Aug 2013 14:30:10 GMT
+< Date: Thu, 01 Aug 2013 14:30:10 GMT
+< Cache-control: private, max-age=0, must-revalidate
+< Set-Cookie: _rtok=5osU0qKKcq5B; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=VGDcwjuURtoHOZxB8knHcA; Domain=.google.com; Path=/; Secure; HttpOnly
+< GData-Version: 2.0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> GET /data/feed/api/user/default HTTP/1.1
+> Soup-Debug-Timestamp: 1375368362
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 26 (0x98c0b0), SoupSocket 18 (0x7fffe4003e20)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANoAAABqfAP7BRwUl4NRRp09PQSGS8uM-ZHOZSba6D-hWAtvmHRVj-ck_2T9BM_92VDR_pDDGg2bApfteDk1ITzABtR_40EhsW_nXzefXLRJERXTVaZl9fs1z3wuPIApugLt5Vf5-wimwxfqmsGz_45loIQFnyvJ3i0jPnvGutxhdAD7OxQHugZ6U_79W74suTD6wqP8JTcAlbyAVDcA7cdyLccjx6Pz_EgrD72AYxCCrQTKlX-d4Wv1PEbNKxXSP1g1JM2ugqZF-JBLWh5SAjyTpKK9Igbs7M1DeVrhPb4DQMfsdg
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375368364
+< Soup-Debug: SoupMessage 26 (0x98c0b0)
+< Expires: Thu, 01 Aug 2013 14:46:03 GMT
+< Date: Thu, 01 Aug 2013 14:46:03 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=hGGq8mXJaQ2u; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=8wDn-Zx0VHFXzBLLoSbyCw; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=feed
+< Vary: Accept, X-GData-Authorization, GData-Version, Cookie
+< GData-Version: 2.0
+< ETag: W/"AkQCQHk5fip7ImA9WhFWE0s."
+< Last-Modified: Thu, 01 Aug 2013 14:46:01 GMT
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"AkQCQHk5fip7ImA9WhFWE0s."'><id>https://picasaweb.google.com/data/feed/user/libgdata.picasaweb</id><updated>2013-08-01T14:46:01.726Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#user'/><title>libgdata.picasaweb</title><subtitle/><icon>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s64-c/libgdata.picasaweb.jpg</icon><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb'/><link rel='http://schemas.google.com/photos/2007#slideshow' type='application/x-shockwave-flash' href='https://static.googleusercontent.com/external_content/picasaweb.googleusercontent.com/slideshow.swf?host=picasaweb.google.com&RGB=0x000000&feed=https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb?alt%3Drss'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb?start-index=1&max-results=1000'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><generator version='1.00' uri='http://picasaweb.google.com/'>Picasaweb</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>1000</openSearch:itemsPerPage><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><gphoto:thumbnail>https://lh6.googleusercontent.com/-1kdcGyvOb8c/AAAAAAAAAAA/AAAAAAAADJo/Aka-7qukB7s/s64-c/libgdata.picasaweb.jpg</gphoto:thumbnail><gphoto:quotalimit>16106127360</gphoto:quotalimit><gphoto:quotacurrent>1796070</gphoto:quotacurrent><gphoto:maxPhotosPerAlbum>1000</gphoto:maxPhotosPerAlbum><entry gd:etag='"YDUqeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907162005897469553</id><published>2013-08-01T14:45:31.000Z</published><updated>2013-08-01T14:45:56.011Z</updated><app:edited>2013-08-01T14:45:56.011Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album for QueryFiles</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907162005897469553?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles39?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553?authkey=Gv1sRgCKKx5unfo4qvuAE'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553/acl?authkey=Gv1sRgCKKx5unfo4qvuAE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5907162005897469553</gphoto:id><gphoto:name>TestAlbumForQueryFiles39</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375368331000</gphoto:timestamp><gphoto:numphotos>4</gphoto:numphotos><gphoto:numphotosremaining>996</gphoto:numphotosremaining><gphoto:bytesUsed>70640</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh5.googleusercontent.com/-FBitAUKRN-c/Ufp0jAAz3nE/AAAAAAAAMsg/22aTQ6Fn6oE/TestAlbumForQueryFiles39.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh5.googleusercontent.com/-FBitAUKRN-c/Ufp0jAAz3nE/AAAAAAAAMsg/22aTQ6Fn6oE/s160-c/TestAlbumForQueryFiles39.jpg' height='160' width='160'/><media:title type='plain'>Test album for QueryFiles</media:title></media:group></entry><entry gd:etag='"WCp7ImA9"'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907150240928202641</id><published>2013-08-01T13:59:50.000Z</published><updated>2013-08-01T14:03:53.972Z</updated><app:edited>2013-08-01T14:03:53.972Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album for QueryFiles</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907150240928202641?authkey=Gv1sRgCMCane22nYyvRw'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles27?authkey=Gv1sRgCMCane22nYyvRw'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907150240928202641?authkey=Gv1sRgCMCane22nYyvRw'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907150240928202641?authkey=Gv1sRgCMCane22nYyvRw'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907150240928202641/acl?authkey=Gv1sRgCMCane22nYyvRw'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5907150240928202641</gphoto:id><gphoto:name>TestAlbumForQueryFiles27</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375365590000</gphoto:timestamp><gphoto:numphotos>4</gphoto:numphotos><gphoto:numphotosremaining>996</gphoto:numphotosremaining><gphoto:bytesUsed>70640</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh5.googleusercontent.com/-Mjp57yiaWTw/Ufpp2MFjf5E/AAAAAAAAMiY/9zUbxhL0l8M/TestAlbumForQueryFiles27.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh5.googleusercontent.com/-Mjp57yiaWTw/Ufpp2MFjf5E/AAAAAAAAMiY/9zUbxhL0l8M/s160-c/TestAlbumForQueryFiles27.jpg' height='160' width='160'/><media:title type='plain'>Test album for QueryFiles</media:title></media:group></entry><entry gd:etag='"WCp7ImA9"'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907149799689683281</id><published>2013-08-01T13:58:07.000Z</published><updated>2013-08-01T14:03:43.164Z</updated><app:edited>2013-08-01T14:03:43.164Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album for QueryFiles</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907149799689683281?authkey=Gv1sRgCJfS5qnrkZf9dw'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles26?authkey=Gv1sRgCJfS5qnrkZf9dw'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907149799689683281?authkey=Gv1sRgCJfS5qnrkZf9dw'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907149799689683281?authkey=Gv1sRgCJfS5qnrkZf9dw'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907149799689683281/acl?authkey=Gv1sRgCJfS5qnrkZf9dw'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5907149799689683281</gphoto:id><gphoto:name>TestAlbumForQueryFiles26</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375365487000</gphoto:timestamp><gphoto:numphotos>4</gphoto:numphotos><gphoto:numphotosremaining>996</gphoto:numphotosremaining><gphoto:bytesUsed>70640</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh6.googleusercontent.com/-4_QYk57jZLo/UfppcgWGAVE/AAAAAAAAMh0/tr2ocBiUCxQ/TestAlbumForQueryFiles26.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh6.googleusercontent.com/-4_QYk57jZLo/UfppcgWGAVE/AAAAAAAAMh0/tr2ocBiUCxQ/s160-c/TestAlbumForQueryFiles26.jpg' height='160' width='160'/><media:title type='plain'>Test album for QueryFiles</media:title></media:group></entry><entry gd:etag='"WCp7ImA9"'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907149334059511441</id><published>2013-08-01T13:56:18.000Z</published><updated>2013-08-01T14:02:16.799Z</updated><app:edited>2013-08-01T14:02:16.799Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album for QueryFiles</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907149334059511441?authkey=Gv1sRgCLHn8Kefn6z3cg'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles25?authkey=Gv1sRgCLHn8Kefn6z3cg'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907149334059511441?authkey=Gv1sRgCLHn8Kefn6z3cg'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907149334059511441?authkey=Gv1sRgCLHn8Kefn6z3cg'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907149334059511441/acl?authkey=Gv1sRgCLHn8Kefn6z3cg'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5907149334059511441</gphoto:id><gphoto:name>TestAlbumForQueryFiles25</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375365378000</gphoto:timestamp><gphoto:numphotos>4</gphoto:numphotos><gphoto:numphotosremaining>996</gphoto:numphotosremaining><gphoto:bytesUsed>70640</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh4.googleusercontent.com/-WM0-C1OIHX4/UfppBZvNbpE/AAAAAAAAMhQ/dDWX_Ajx5RM/TestAlbumForQueryFiles25.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh4.googleusercontent.com/-WM0-C1OIHX4/UfppBZvNbpE/AAAAAAAAMhQ/dDWX_Ajx5RM/s160-c/TestAlbumForQueryFiles25.jpg' height='160' width='160'/><media:title type='plain'>Test album for QueryFiles</media:title></media:group></entry><entry gd:etag='"WCp7ImA9"'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907147805051573569</id><published>2013-08-01T13:50:22.000Z</published><updated>2013-08-01T13:54:06.151Z</updated><app:edited>2013-08-01T13:54:06.151Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album for QueryFiles</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907147805051573569?authkey=Gv1sRgCLy43sei-8OX-AE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles24?authkey=Gv1sRgCLy43sei-8OX-AE'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907147805051573569?authkey=Gv1sRgCLy43sei-8OX-AE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907147805051573569?authkey=Gv1sRgCLy43sei-8OX-AE'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907147805051573569/acl?authkey=Gv1sRgCLy43sei-8OX-AE'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5907147805051573569</gphoto:id><gphoto:name>TestAlbumForQueryFiles24</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375365022000</gphoto:timestamp><gphoto:numphotos>4</gphoto:numphotos><gphoto:numphotosremaining>996</gphoto:numphotosremaining><gphoto:bytesUsed>70640</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh6.googleusercontent.com/-5_LR5-WTiic/UfpnoZvT1UE/AAAAAAAAMgc/aqVe9nsW4KU/TestAlbumForQueryFiles24.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh6.googleusercontent.com/-5_LR5-WTiic/UfpnoZvT1UE/AAAAAAAAMgc/aqVe9nsW4KU/s160-c/TestAlbumForQueryFiles24.jpg' height='160' width='160'/><media:title type='plain'>Test album for QueryFiles</media:title></media:group></entry><entry gd:etag='"WCp7ImA9"'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907147443497598305</id><published>2013-08-01T13:48:58.000Z</published><updated>2013-08-01T13:54:46.173Z</updated><app:edited>2013-08-01T13:54:46.173Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/><title>Test album for QueryFiles</title><summary/><rights>private</rights><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907147443497598305?authkey=Gv1sRgCI7Spv2f7beXDw'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/TestAlbumForQueryFiles23?authkey=Gv1sRgCI7Spv2f7beXDw'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907147443497598305?authkey=Gv1sRgCI7Spv2f7beXDw'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907147443497598305?authkey=Gv1sRgCI7Spv2f7beXDw'/><link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907147443497598305/acl?authkey=Gv1sRgCI7Spv2f7beXDw'/><author><name>libgdata.picasaweb</name><uri>https://picasaweb.google.com/libgdata.picasaweb</uri></author><gphoto:id>5907147443497598305</gphoto:id><gphoto:name>TestAlbumForQueryFiles23</gphoto:name><gphoto:location/><gphoto:access>private</gphoto:access><gphoto:timestamp>1375364938000</gphoto:timestamp><gphoto:numphotos>4</gphoto:numphotos><gphoto:numphotosremaining>996</gphoto:numphotosremaining><gphoto:bytesUsed>70640</gphoto:bytesUsed><gphoto:user>libgdata.picasaweb</gphoto:user><gphoto:nickname>libgdata.picasaweb</gphoto:nickname><media:group><media:content url='https://lh6.googleusercontent.com/-XkKuN0-C_oQ/UfpnTW2H_WE/AAAAAAAAMf4/1X6YaY0IUbM/TestAlbumForQueryFiles23.jpg' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'/><media:keywords/><media:thumbnail url='https://lh6.googleusercontent.com/-XkKuN0-C_oQ/UfpnTW2H_WE/AAAAAAAAMf4/1X6YaY0IUbM/s160-c/TestAlbumForQueryFiles23.jpg' height='160' width='160'/><media:title type='plain'>Test album for QueryFiles</media:title></media:group></entry></feed>
+
+> DELETE /data/entry/api/user/libgdata.picasaweb/albumid/5907162005897469553?authkey=Gv1sRgCKKx5unfo4qvuAE HTTP/1.1
+> Soup-Debug-Timestamp: 1375368364
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 27 (0x98c290), SoupSocket 18 (0x7fffe4003e20)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANoAAABqfAP7BRwUl4NRRp09PQSGS8uM-ZHOZSba6D-hWAtvmHRVj-ck_2T9BM_92VDR_pDDGg2bApfteDk1ITzABtR_40EhsW_nXzefXLRJERXTVaZl9fs1z3wuPIApugLt5Vf5-wimwxfqmsGz_45loIQFnyvJ3i0jPnvGutxhdAD7OxQHugZ6U_79W74suTD6wqP8JTcAlbyAVDcA7cdyLccjx6Pz_EgrD72AYxCCrQTKlX-d4Wv1PEbNKxXSP1g1JM2ugqZF-JBLWh5SAjyTpKK9Igbs7M1DeVrhPb4DQMfsdg
+> GData-Version: 2
+> If-Match: "YDUqeyI."
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375368365
+< Soup-Debug: SoupMessage 27 (0x98c290)
+< Expires: Thu, 01 Aug 2013 14:46:04 GMT
+< Date: Thu, 01 Aug 2013 14:46:04 GMT
+< Cache-control: private, max-age=0, must-revalidate
+< Set-Cookie: _rtok=ZX2Vo4m-UhQJ; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=CfqauDSO_yZV_AWCpuD9Cg; Domain=.google.com; Path=/; Secure; HttpOnly
+< GData-Version: 2.0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> DELETE /data/entry/api/user/libgdata.picasaweb/albumid/5907174027540672513/photoid/5907175297231928274?authkey=Gv1sRgCO-m15DWp4ah_gE HTTP/1.1
+> Soup-Debug-Timestamp: 1375371427
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 7 (0x7cc0b0), SoupSocket 4 (0x8d16c0)
+> Host: picasaweb.google.com
+> Authorization: GoogleLogin auth=DQAAANoAAACZva9KQ-ijLNwhVRPaKyaAvfQFJ-sSRQOzXypYgYTorQq4irPd_fTLzizl7OrjFxgudgtT98sAs1egYqk0OZjiKjq0sqOLvppK0fevGxEO8EEwBP52_0QAL_ygGW7JqFTq836TMfNx6n3SjFp8aU7WbgFQY6OX_adGtpZTmXjMmSKnRac2kOoGcf6xuGW-_qFuUomxHy917G7DFhkyGmPiomDpFLv8gvyH7RznvZt9ubdNTw8TtIEbLjoYbBeufNLv-KedkVVz8lyxHephwIUyjZ7mIdhOFWqEsrlb79GrrA
+> GData-Version: 2
+> If-Match: "YD0qeyI."
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375371429
+< Soup-Debug: SoupMessage 7 (0x7cc0b0)
+< Expires: Thu, 01 Aug 2013 15:37:07 GMT
+< Date: Thu, 01 Aug 2013 15:37:07 GMT
+< Cache-control: private, max-age=0, must-revalidate
+< Set-Cookie: _rtok=unjdog0OmnIe; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=f1z9unk-7tTqgyrBcz0TIw; Domain=.google.com; Path=/; Secure; HttpOnly
+< GData-Version: 2.0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 0
+< Server: GSE
+< Content-Type: text/html; charset=UTF-8
+<
+
--- /dev/null
+> POST /data/feed/api/user/default/albumid/default HTTP/1.1
+> Soup-Debug-Timestamp: 1375371412
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 1 (0x7cc290), SoupSocket 1 (0x8d16c0)
+> Host: picasaweb.google.com
+> Slug: photo.jpg
+> Transfer-Encoding: chunked
+> Content-Type: multipart/related; boundary=0003Z5W789deadbeefRTE456KlemsnoZV
+> Authorization: GoogleLogin auth=DQAAANoAAACZva9KQ-ijLNwhVRPaKyaAvfQFJ-sSRQOzXypYgYTorQq4irPd_fTLzizl7OrjFxgudgtT98sAs1egYqk0OZjiKjq0sqOLvppK0fevGxEO8EEwBP52_0QAL_ygGW7JqFTq836TMfNx6n3SjFp8aU7WbgFQY6OX_adGtpZTmXjMmSKnRac2kOoGcf6xuGW-_qFuUomxHy917G7DFhkyGmPiomDpFLv8gvyH7RznvZt9ubdNTw8TtIEbLjoYbBeufNLv-KedkVVz8lyxHephwIUyjZ7mIdhOFWqEsrlb79GrrA
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375371415
+< Soup-Debug: SoupMessage 1 (0x7cc290)
+< Expires: Thu, 01 Aug 2013 15:36:55 GMT
+< Date: Thu, 01 Aug 2013 15:36:55 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=QAQbKsmoipxM; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=DIGGuPkU5mc4xRHVVl0kRw; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 2.0
+< ETag: "YD0qeyI."
+< Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907174027540672513/photoid/5907175242186045490?authkey=Gv1sRgCO-m15DWp4ah_gE
+< Content-Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907174027540672513/photoid/5907175242186045490?authkey=Gv1sRgCO-m15DWp4ah_gE
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:exif='http://schemas.google.com/photos/exif/2007' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' xmlns:gml='http://www.opengis.net/gml' xmlns:georss='http://www.georss.org/georss' gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907174027540672513/photoid/5907175242186045490</id><published>2013-08-01T15:36:53.000Z</published><updated>2013-08-01T15:36:53.761Z</updated><app:edited>2013-08-01T15:36:53.761Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Photo Entry Title</title><summary>Photo Summary</summary><content type='image/jpeg' src='https://lh3.googleusercontent.com/-58kNdEYSlwM/UfqAldB7ODI/AAAAAAAAMxg/I2fVmwVza-I/Photo%252520Entry%252520Title.jpg'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907174027540672513/photoid/5907175242186045490?authkey=Gv1sRgCO-m15DWp4ah_gE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/DropBox02?authkey=Gv1sRgCO-m15DWp4ah_gE#5907175242186045490'/><link rel='http://schemas.google.com/photos/2007#canonical' type='text/html' href='https://picasaweb.google.com/lh/photo/hFnr2vLPAnwymlNd9jXSC_Z3FpWmmtg91ParBYTtppo'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907174027540672513/photoid/5907175242186045490?authkey=Gv1sRgCO-m15DWp4ah_gE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907174027540672513/photoid/5907175242186045490?authkey=Gv1sRgCO-m15DWp4ah_gE'/><link rel='edit-media' type='image/jpeg' href='https://picasaweb.google.com/data/media/api/user/libgdata.picasaweb/albumid/5907174027540672513/photoid/5907175242186045490?authkey=Gv1sRgCO-m15DWp4ah_gE'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907174027540672513&iid=5907175242186045490'/><gphoto:id>5907175242186045490</gphoto:id><gphoto:albumid>5907174027540672513</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154823228000</gphoto:timestamp><gphoto:imageVersion>13080</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>0</gphoto:commentCount><gphoto:streamId>shared_group_5907175242186045490</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><gphoto:shapes faces='done'/><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh3.googleusercontent.com/-58kNdEYSlwM/UfqAldB7ODI/AAAAAAAAMxg/I2fVmwVza-I/Photo%252520Entry%252520Title.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'>Photo Summary</media:description><media:keywords>foo, bar, %2C%2Cbaz%2Cbaz</media:keywords><media:thumbnail url='https://lh3.googleusercontent.com/-58kNdEYSlwM/UfqAldB7ODI/AAAAAAAAMxg/I2fVmwVza-I/s72/Photo%252520Entry%252520Title.jpg' height='67' width='72'/><media:thumbnail url='https://lh3.googleusercontent.com/-58kNdEYSlwM/UfqAldB7ODI/AAAAAAAAMxg/I2fVmwVza-I/s144/Photo%252520Entry%252520Title.jpg' height='92' width='100'/><media:thumbnail url='https://lh3.googleusercontent.com/-58kNdEYSlwM/UfqAldB7ODI/AAAAAAAAMxg/I2fVmwVza-I/s288/Photo%252520Entry%252520Title.jpg' height='92' width='100'/><media:title type='plain'>Photo Entry Title</media:title></media:group><georss:where><gml:Point><gml:pos>17.127 -110.35</gml:pos></gml:Point></georss:where></entry>
+
--- /dev/null
+> POST /data/feed/api/user/default/albumid/default HTTP/1.1
+> Soup-Debug-Timestamp: 1375371418
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 3 (0x7cc560), SoupSocket 2 (0x8d1780)
+> Host: picasaweb.google.com
+> Slug: photo.jpg
+> Transfer-Encoding: chunked
+> Content-Type: multipart/related; boundary=0003Z5W789deadbeefRTE456KlemsnoZV
+> Authorization: GoogleLogin auth=DQAAANoAAACZva9KQ-ijLNwhVRPaKyaAvfQFJ-sSRQOzXypYgYTorQq4irPd_fTLzizl7OrjFxgudgtT98sAs1egYqk0OZjiKjq0sqOLvppK0fevGxEO8EEwBP52_0QAL_ygGW7JqFTq836TMfNx6n3SjFp8aU7WbgFQY6OX_adGtpZTmXjMmSKnRac2kOoGcf6xuGW-_qFuUomxHy917G7DFhkyGmPiomDpFLv8gvyH7RznvZt9ubdNTw8TtIEbLjoYbBeufNLv-KedkVVz8lyxHephwIUyjZ7mIdhOFWqEsrlb79GrrA
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375371420
+< Soup-Debug: SoupMessage 3 (0x7cc560)
+< Expires: Thu, 01 Aug 2013 15:37:00 GMT
+< Date: Thu, 01 Aug 2013 15:37:00 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=4nFD3F0k6DMQ; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=XakkqCswmz0PM8mfjz3LdA; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 2.0
+< ETag: "YD0qeyI."
+< Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907174027540672513/photoid/5907175265198505634?authkey=Gv1sRgCO-m15DWp4ah_gE
+< Content-Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907174027540672513/photoid/5907175265198505634?authkey=Gv1sRgCO-m15DWp4ah_gE
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:exif='http://schemas.google.com/photos/exif/2007' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' xmlns:gml='http://www.opengis.net/gml' xmlns:georss='http://www.georss.org/georss' gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907174027540672513/photoid/5907175265198505634</id><published>2013-08-01T15:36:59.000Z</published><updated>2013-08-01T15:36:59.186Z</updated><app:edited>2013-08-01T15:36:59.186Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Photo Entry Title</title><summary>Photo Summary</summary><content type='image/jpeg' src='https://lh3.googleusercontent.com/-Uqd-toXh0Dk/UfqAmywhfqI/AAAAAAAAMxs/LIVdGsgy2hE/Photo%252520Entry%252520Title.jpg'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907174027540672513/photoid/5907175265198505634?authkey=Gv1sRgCO-m15DWp4ah_gE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/DropBox02?authkey=Gv1sRgCO-m15DWp4ah_gE#5907175265198505634'/><link rel='http://schemas.google.com/photos/2007#canonical' type='text/html' href='https://picasaweb.google.com/lh/photo/y-5qJGJ_rL75jbNMG-BKDvZ3FpWmmtg91ParBYTtppo'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907174027540672513/photoid/5907175265198505634?authkey=Gv1sRgCO-m15DWp4ah_gE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907174027540672513/photoid/5907175265198505634?authkey=Gv1sRgCO-m15DWp4ah_gE'/><link rel='edit-media' type='image/jpeg' href='https://picasaweb.google.com/data/media/api/user/libgdata.picasaweb/albumid/5907174027540672513/photoid/5907175265198505634?authkey=Gv1sRgCO-m15DWp4ah_gE'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907174027540672513&iid=5907175265198505634'/><gphoto:id>5907175265198505634</gphoto:id><gphoto:albumid>5907174027540672513</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154823228000</gphoto:timestamp><gphoto:imageVersion>13083</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>0</gphoto:commentCount><gphoto:streamId>shared_group_5907175265198505634</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><gphoto:shapes faces='done'/><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh3.googleusercontent.com/-Uqd-toXh0Dk/UfqAmywhfqI/AAAAAAAAMxs/LIVdGsgy2hE/Photo%252520Entry%252520Title.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'>Photo Summary</media:description><media:keywords>foo, bar, %2C%2Cbaz%2Cbaz</media:keywords><media:thumbnail url='https://lh3.googleusercontent.com/-Uqd-toXh0Dk/UfqAmywhfqI/AAAAAAAAMxs/LIVdGsgy2hE/s72/Photo%252520Entry%252520Title.jpg' height='67' width='72'/><media:thumbnail url='https://lh3.googleusercontent.com/-Uqd-toXh0Dk/UfqAmywhfqI/AAAAAAAAMxs/LIVdGsgy2hE/s144/Photo%252520Entry%252520Title.jpg' height='92' width='100'/><media:thumbnail url='https://lh3.googleusercontent.com/-Uqd-toXh0Dk/UfqAmywhfqI/AAAAAAAAMxs/LIVdGsgy2hE/s288/Photo%252520Entry%252520Title.jpg' height='92' width='100'/><media:title type='plain'>Photo Entry Title</media:title></media:group><georss:where><gml:Point><gml:pos>17.127 -110.35</gml:pos></gml:Point></georss:where></entry>
+
--- /dev/null
+> POST /data/feed/api/user/default/albumid/default HTTP/1.1
+> Soup-Debug-Timestamp: 1375371425
+> Soup-Debug: SoupSession 1 (0x6682e0), SoupMessage 6 (0x7cc380), SoupSocket 4 (0x8d16c0)
+> Host: picasaweb.google.com
+> Slug: photo.jpg
+> Transfer-Encoding: chunked
+> Content-Type: multipart/related; boundary=0003Z5W789deadbeefRTE456KlemsnoZV
+> Authorization: GoogleLogin auth=DQAAANoAAACZva9KQ-ijLNwhVRPaKyaAvfQFJ-sSRQOzXypYgYTorQq4irPd_fTLzizl7OrjFxgudgtT98sAs1egYqk0OZjiKjq0sqOLvppK0fevGxEO8EEwBP52_0QAL_ygGW7JqFTq836TMfNx6n3SjFp8aU7WbgFQY6OX_adGtpZTmXjMmSKnRac2kOoGcf6xuGW-_qFuUomxHy917G7DFhkyGmPiomDpFLv8gvyH7RznvZt9ubdNTw8TtIEbLjoYbBeufNLv-KedkVVz8lyxHephwIUyjZ7mIdhOFWqEsrlb79GrrA
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+
+< HTTP/1.1 201 Created
+< Soup-Debug-Timestamp: 1375371427
+< Soup-Debug: SoupMessage 6 (0x7cc380)
+< Expires: Thu, 01 Aug 2013 15:37:07 GMT
+< Date: Thu, 01 Aug 2013 15:37:07 GMT
+< Cache-control: private, max-age=0, must-revalidate, no-transform
+< Set-Cookie: _rtok=Fy1opNImoDxy; Path=/; Secure; HttpOnly
+< Set-Cookie: S=photos_html=biW_Y69HR408QkGzjLWmyA; Domain=.google.com; Path=/; Secure; HttpOnly
+< Content-Type: application/atom+xml; charset=UTF-8; type=entry
+< Vary: Accept, X-GData-Authorization, GData-Version
+< GData-Version: 2.0
+< ETag: "YD0qeyI."
+< Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907174027540672513/photoid/5907175297231928274?authkey=Gv1sRgCO-m15DWp4ah_gE
+< Content-Location: https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907174027540672513/photoid/5907175297231928274?authkey=Gv1sRgCO-m15DWp4ah_gE
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Transfer-Encoding: chunked
+<
+< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:exif='http://schemas.google.com/photos/exif/2007' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' xmlns:gml='http://www.opengis.net/gml' xmlns:georss='http://www.georss.org/georss' gd:etag='"YD0qeyI."'><id>https://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5907174027540672513/photoid/5907175297231928274</id><published>2013-08-01T15:37:06.000Z</published><updated>2013-08-01T15:37:06.071Z</updated><app:edited>2013-08-01T15:37:06.071Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/><title>Photo Entry Title</title><summary>Photo Summary</summary><content type='image/jpeg' src='https://lh5.googleusercontent.com/-V2lTRioXTfQ/UfqAoqF4u9I/AAAAAAAAMx8/1J9rsdKpoG8/Photo%252520Entry%252520Title.jpg'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/libgdata.picasaweb/albumid/5907174027540672513/photoid/5907175297231928274?authkey=Gv1sRgCO-m15DWp4ah_gE'/><link rel='alternate' type='text/html' href='https://picasaweb.google.com/libgdata.picasaweb/DropBox02?authkey=Gv1sRgCO-m15DWp4ah_gE#5907175297231928274'/><link rel='http://schemas.google.com/photos/2007#canonical' type='text/html' href='https://picasaweb.google.com/lh/photo/wymKdbWW1NA3Qnv6ac_blPZ3FpWmmtg91ParBYTtppo'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907174027540672513/photoid/5907175297231928274?authkey=Gv1sRgCO-m15DWp4ah_gE'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/libgdata.picasaweb/albumid/5907174027540672513/photoid/5907175297231928274?authkey=Gv1sRgCO-m15DWp4ah_gE'/><link rel='edit-media' type='image/jpeg' href='https://picasaweb.google.com/data/media/api/user/libgdata.picasaweb/albumid/5907174027540672513/photoid/5907175297231928274?authkey=Gv1sRgCO-m15DWp4ah_gE'/><link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=libgdata.picasaweb&aid=5907174027540672513&iid=5907175297231928274'/><gphoto:id>5907175297231928274</gphoto:id><gphoto:albumid>5907174027540672513</gphoto:albumid><gphoto:access>private</gphoto:access><gphoto:width>100</gphoto:width><gphoto:height>92</gphoto:height><gphoto:size>17660</gphoto:size><gphoto:checksum/><gphoto:timestamp>1154823228000</gphoto:timestamp><gphoto:imageVersion>13087</gphoto:imageVersion><gphoto:commentingEnabled>true</gphoto:commentingEnabled><gphoto:commentCount>0</gphoto:commentCount><gphoto:streamId>shared_group_5907175297231928274</gphoto:streamId><gphoto:license id='2' name='Attribution-Noncommercial' url='http://creativecommons.org/licenses/by-nc/3.0'>ATTRIBUTION_NON_COMMERCIAL</gphoto:license><gphoto:shapes faces='done'/><exif:tags><exif:fstop>3.9</exif:fstop><exif:make>Panasonic</exif:make><exif:model>DMC-TZ1</exif:model><exif:exposure>0.01</exif:exposure><exif:flash>false</exif:flash><exif:focallength>16.6</exif:focallength><exif:iso>80</exif:iso><exif:time>1154798028000</exif:time><exif:imageUniqueID>b62dec53eb93fc15ce39d7eb2e66dd3a</exif:imageUniqueID></exif:tags><media:group><media:content url='https://lh5.googleusercontent.com/-V2lTRioXTfQ/UfqAoqF4u9I/AAAAAAAAMx8/1J9rsdKpoG8/Photo%252520Entry%252520Title.jpg' height='92' width='100' type='image/jpeg' medium='image'/><media:credit>libgdata.picasaweb</media:credit><media:description type='plain'>Photo Summary</media:description><media:keywords>foo, bar, %2C%2Cbaz%2Cbaz</media:keywords><media:thumbnail url='https://lh5.googleusercontent.com/-V2lTRioXTfQ/UfqAoqF4u9I/AAAAAAAAMx8/1J9rsdKpoG8/s72/Photo%252520Entry%252520Title.jpg' height='67' width='72'/><media:thumbnail url='https://lh5.googleusercontent.com/-V2lTRioXTfQ/UfqAoqF4u9I/AAAAAAAAMx8/1J9rsdKpoG8/s144/Photo%252520Entry%252520Title.jpg' height='92' width='100'/><media:thumbnail url='https://lh5.googleusercontent.com/-V2lTRioXTfQ/UfqAoqF4u9I/AAAAAAAAMx8/1J9rsdKpoG8/s288/Photo%252520Entry%252520Title.jpg' height='92' width='100'/><media:title type='plain'>Photo Entry Title</media:title></media:group><georss:where><gml:Point><gml:pos>17.127 -110.35</gml:pos></gml:Point></georss:where></entry>
+
--- /dev/null
+> POST /o/oauth2/token HTTP/1.1
+> Soup-Debug-Timestamp: 1488730774
+> Soup-Debug: SoupSession 1 (0xc11580), SoupMessage 1 (0x131f2b0), SoupSocket 1 (0xc295a0)
+> Host: accounts.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+>
+> client_id=352818697630-nqu2cmt5quqd6lr17ouoqmb684u84l1f.apps.googleusercontent.com&client_secret=-fA4pHQJxR3zJ-FyAMPQsikg&code=4%2F86QwOp3ddOEfurNEM27eGdyJhlckwl3lR-2Ook6tyW8&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&grant_type=authorization_code
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1488730774
+< Soup-Debug: SoupMessage 1 (0x131f2b0)
+< Content-Type: application/json; charset=utf-8
+< X-Content-Type-Options: nosniff
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:34 GMT
+< Content-Disposition: attachment; filename="json.txt"; filename*=UTF-8''json.txt
+< Content-Encoding: gzip
+< Server: ESF
+< X-XSS-Protection: 1; mode=block
+< X-Frame-Options: SAMEORIGIN
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+< Transfer-Encoding: chunked
+<
+< {
+< "access_token" : "ya29.GlsFBJx008-sd93Ckqzj71RIMcP83j1mmvfHl_1_6oB8vqc2i11RsH_HKGC0VB_mCi2uolnHetQgPbL_XnehqiNFm-JFSU7qZFI79OJCCK7ufHbKucgrylmvCkTO",
+< "expires_in" : 3600,
+< "refresh_token" : "1/ny71llUbIQVsuTzoZtb-to8_LKqxmShpU68BtoFqWAKXnGYZidnhF1Q1bTeIwDbH",
+< "token_type" : "Bearer"
+< }
+
--- /dev/null
+> POST /o/oauth2/token HTTP/1.1
+> Soup-Debug-Timestamp: 1488730761
+> Soup-Debug: SoupSession 1 (0xc11100), SoupMessage 1 (0x131f0d0), SoupSocket 1 (0xc29400)
+> Host: accounts.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+>
+> client_id=352818697630-nqu2cmt5quqd6lr17ouoqmb684u84l1f.apps.googleusercontent.com&client_secret=-fA4pHQJxR3zJ-FyAMPQsikg&code=4%2FwSlJrnFORySOLgS1wsOe6UxnX7M29DLRr78UDcg_Tfw&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&grant_type=authorization_code
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1488730761
+< Soup-Debug: SoupMessage 1 (0x131f0d0)
+< Content-Type: application/json; charset=utf-8
+< X-Content-Type-Options: nosniff
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:21 GMT
+< Content-Disposition: attachment; filename="json.txt"; filename*=UTF-8''json.txt
+< Content-Encoding: gzip
+< Server: ESF
+< X-XSS-Protection: 1; mode=block
+< X-Frame-Options: SAMEORIGIN
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+< Transfer-Encoding: chunked
+<
+< {
+< "access_token" : "ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_",
+< "expires_in" : 3600,
+< "refresh_token" : "1/q6ANQdPdeMOZQrOI55_5rpLXO7If75scdqCvUI2YTQ8",
+< "token_type" : "Bearer"
+< }
+
--- /dev/null
+> POST /tasks/v1/users/@me/lists HTTP/1.1
+> Soup-Debug-Timestamp: 1488730801
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 33 (0x131f0d0), SoupSocket 19 (0xc29260)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+>
+> {"title":"Some tasklist","kind":"tasks#taskList"}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1488730803
+< Soup-Debug: SoupMessage 33 (0x131f0d0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:20:03 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/kHiYWwcDatT75kiYewaVAm1VzTQ"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "tasks#taskList",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6MTQ2MzA5NzM4NTow",
+< "etag": "\"NEVtLf5Q_dTURZbE3E-zlPpPgGk/kHiYWwcDatT75kiYewaVAm1VzTQ\"",
+< "title": "Some tasklist",
+< "updated": "2017-03-05T16:20:03.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTQ2MzA5NzM4NTow"
+< }
+
+> POST /tasks/v1/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTQ2MzA5NzM4NTow/tasks HTTP/1.1
+> Soup-Debug-Timestamp: 1488730803
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 34 (0x131f0d0), SoupSocket 20 (0xc29330)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+>
+> {"title":"Some task","kind":"tasks#task","deleted":false,"hidden":false}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1488730803
+< Soup-Debug: SoupMessage 34 (0x131f0d0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:20:03 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/LTE4MzU3NDA2NTE"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "tasks#task",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6MTQ2MzA5NzM4NToxNTgwOTMzNTQx",
+< "etag": "\"NEVtLf5Q_dTURZbE3E-zlPpPgGk/LTE4MzU3NDA2NTE\"",
+< "title": "Some task",
+< "updated": "2017-03-05T16:20:03.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTQ2MzA5NzM4NTow/tasks/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTQ2MzA5NzM4NToxNTgwOTMzNTQx",
+< "position": "00000000002147483647",
+< "status": "needsAction"
+< }
+
--- /dev/null
+> POST /tasks/v1/users/@me/lists HTTP/1.1
+> Soup-Debug-Timestamp: 1488730786
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 13 (0x131f490), SoupSocket 8 (0xc29190)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+>
+> {"title":"Some tasklist","kind":"tasks#taskList"}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1488730789
+< Soup-Debug: SoupMessage 13 (0x131f490)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:49 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/FGjS7DYKYr6UbyOOfOp6rMeFdO8"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "tasks#taskList",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6MzUwMTc2NDY3OjA",
+< "etag": "\"NEVtLf5Q_dTURZbE3E-zlPpPgGk/FGjS7DYKYr6UbyOOfOp6rMeFdO8\"",
+< "title": "Some tasklist",
+< "updated": "2017-03-05T16:19:48.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MzUwMTc2NDY3OjA"
+< }
+
--- /dev/null
+> POST /tasks/v1/users/@me/lists HTTP/1.1
+> Soup-Debug-Timestamp: 1488730789
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 15 (0x131f0d0), SoupSocket 9 (0xc295a0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+>
+> {"title":"Some tasklist","kind":"tasks#taskList"}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1488730791
+< Soup-Debug: SoupMessage 15 (0x131f0d0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:51 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/MJwJ9Df_LrfvTqk17JrrSZENalc"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "tasks#taskList",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6MTU1NzYzNjQwOjA",
+< "etag": "\"NEVtLf5Q_dTURZbE3E-zlPpPgGk/MJwJ9Df_LrfvTqk17JrrSZENalc\"",
+< "title": "Some tasklist",
+< "updated": "2017-03-05T16:19:51.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTU1NzYzNjQwOjA"
+< }
+
--- /dev/null
+> POST /tasks/v1/users/@me/lists HTTP/1.1
+> Soup-Debug-Timestamp: 1488730792
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 19 (0x131f490), SoupSocket 11 (0xc290c0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+>
+> {"title":"Some tasklist","kind":"tasks#taskList"}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1488730794
+< Soup-Debug: SoupMessage 19 (0x131f490)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:54 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/CcJ1Sga0a7yaJVWgBeDczyDdLZg"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "tasks#taskList",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjA",
+< "etag": "\"NEVtLf5Q_dTURZbE3E-zlPpPgGk/CcJ1Sga0a7yaJVWgBeDczyDdLZg\"",
+< "title": "Some tasklist",
+< "updated": "2017-03-05T16:19:54.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjA"
+< }
+
+> POST /tasks/v1/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjA/tasks HTTP/1.1
+> Soup-Debug-Timestamp: 1488730794
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 20 (0x131f2b0), SoupSocket 12 (0xc29260)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+>
+> {"title":"Task 1","kind":"tasks#task","deleted":false,"hidden":false}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1488730795
+< Soup-Debug: SoupMessage 20 (0x131f2b0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:55 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/LTE4NDA5NDc4NzQ"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "tasks#task",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjczNDk3OTc1NA",
+< "etag": "\"NEVtLf5Q_dTURZbE3E-zlPpPgGk/LTE4NDA5NDc4NzQ\"",
+< "title": "Task 1",
+< "updated": "2017-03-05T16:19:54.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjA/tasks/MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjczNDk3OTc1NA",
+< "position": "00000000002147483647",
+< "status": "needsAction"
+< }
+
+> POST /tasks/v1/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjA/tasks HTTP/1.1
+> Soup-Debug-Timestamp: 1488730795
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 21 (0x131f0d0), SoupSocket 13 (0xc29330)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+>
+> {"title":"Task 2","kind":"tasks#task","deleted":false,"hidden":false}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1488730795
+< Soup-Debug: SoupMessage 21 (0x131f0d0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:55 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/NDg2MTYwNTc0"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "tasks#task",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjE0NDIwMDc3OTE",
+< "etag": "\"NEVtLf5Q_dTURZbE3E-zlPpPgGk/NDg2MTYwNTc0\"",
+< "title": "Task 2",
+< "updated": "2017-03-05T16:19:55.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjA/tasks/MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjE0NDIwMDc3OTE",
+< "position": "00000000001610612734",
+< "status": "needsAction"
+< }
+
+> POST /tasks/v1/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjA/tasks HTTP/1.1
+> Soup-Debug-Timestamp: 1488730795
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 22 (0x131f0d0), SoupSocket 14 (0xc29260)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+>
+> {"title":"Task 3","kind":"tasks#task","deleted":false,"hidden":false}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1488730795
+< Soup-Debug: SoupMessage 22 (0x131f0d0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:55 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/LTY2MTU1MTA3Nw"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "tasks#task",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjgxMTI4NjMzNw",
+< "etag": "\"NEVtLf5Q_dTURZbE3E-zlPpPgGk/LTY2MTU1MTA3Nw\"",
+< "title": "Task 3",
+< "updated": "2017-03-05T16:19:55.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjA/tasks/MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjgxMTI4NjMzNw",
+< "position": "00000000001234803096",
+< "status": "needsAction"
+< }
+
--- /dev/null
+> POST /tasks/v1/users/@me/lists HTTP/1.1
+> Soup-Debug-Timestamp: 1488730777
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 3 (0x131f2b0), SoupSocket 2 (0xc29330)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+>
+> {"title":"Tasklist 1","kind":"tasks#taskList"}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1488730778
+< Soup-Debug: SoupMessage 3 (0x131f2b0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:38 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/snoTsKOMEHobrczhuzP9In_lbE4"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "tasks#taskList",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6MTk3Mjg3NzkzOTow",
+< "etag": "\"NEVtLf5Q_dTURZbE3E-zlPpPgGk/snoTsKOMEHobrczhuzP9In_lbE4\"",
+< "title": "Tasklist 1",
+< "updated": "2017-03-05T16:19:38.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTk3Mjg3NzkzOTow"
+< }
+
+> POST /tasks/v1/users/@me/lists HTTP/1.1
+> Soup-Debug-Timestamp: 1488730778
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 4 (0x131f0d0), SoupSocket 3 (0xc295a0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+>
+> {"title":"Tasklist 2","kind":"tasks#taskList"}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1488730780
+< Soup-Debug: SoupMessage 4 (0x131f0d0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:40 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/QfIalAeF9yWiO_irsHRsK5Y-BDc"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "tasks#taskList",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6MjIzNTU2OTAxOjA",
+< "etag": "\"NEVtLf5Q_dTURZbE3E-zlPpPgGk/QfIalAeF9yWiO_irsHRsK5Y-BDc\"",
+< "title": "Tasklist 2",
+< "updated": "2017-03-05T16:19:40.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MjIzNTU2OTAxOjA"
+< }
+
+> POST /tasks/v1/users/@me/lists HTTP/1.1
+> Soup-Debug-Timestamp: 1488730780
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 5 (0x131f0d0), SoupSocket 4 (0xc29330)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+>
+> {"title":"Tasklist 3","kind":"tasks#taskList"}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1488730781
+< Soup-Debug: SoupMessage 5 (0x131f0d0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:41 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/4Q9GyoadtEFrAlVSFU7ctEryEuI"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "tasks#taskList",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6MTk0MTU0NjM0OjA",
+< "etag": "\"NEVtLf5Q_dTURZbE3E-zlPpPgGk/4Q9GyoadtEFrAlVSFU7ctEryEuI\"",
+< "title": "Tasklist 3",
+< "updated": "2017-03-05T16:19:41.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTk0MTU0NjM0OjA"
+< }
+
--- /dev/null
+> POST /tasks/v1/users/@me/lists HTTP/1.1
+> Soup-Debug-Timestamp: 1488730798
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 28 (0x131f0d0), SoupSocket 17 (0xc29330)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+>
+> {"title":"Some tasklist","kind":"tasks#taskList"}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1488730799
+< Soup-Debug: SoupMessage 28 (0x131f0d0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:59 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/nO8dqy3WY7Pl5I1-B8J_UO0CxHY"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "tasks#taskList",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6NTgwMzc0MTkzOjA",
+< "etag": "\"NEVtLf5Q_dTURZbE3E-zlPpPgGk/nO8dqy3WY7Pl5I1-B8J_UO0CxHY\"",
+< "title": "Some tasklist",
+< "updated": "2017-03-05T16:19:59.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6NTgwMzc0MTkzOjA"
+< }
+
+> POST /tasks/v1/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6NTgwMzc0MTkzOjA/tasks HTTP/1.1
+> Soup-Debug-Timestamp: 1488730799
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 29 (0x131f2b0), SoupSocket 18 (0xc290c0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+>
+> {"title":"Some task","kind":"tasks#task","deleted":false,"hidden":false}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1488730800
+< Soup-Debug: SoupMessage 29 (0x131f2b0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:20:00 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/MTcyODc2MDc3MA"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "tasks#task",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6NTgwMzc0MTkzOjU1NzMwODc3Ng",
+< "etag": "\"NEVtLf5Q_dTURZbE3E-zlPpPgGk/MTcyODc2MDc3MA\"",
+< "title": "Some task",
+< "updated": "2017-03-05T16:19:59.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6NTgwMzc0MTkzOjA/tasks/MTY4ODYzMjk0OTkzNDgxODY2Njk6NTgwMzc0MTkzOjU1NzMwODc3Ng",
+< "position": "00000000002147483647",
+< "status": "needsAction"
+< }
+
--- /dev/null
+> POST /tasks/v1/users/@me/lists HTTP/1.1
+> Soup-Debug-Timestamp: 1488730784
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 10 (0x131f0d0), SoupSocket 7 (0xc295a0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+>
+> {"title":"Some tasklist","kind":"tasks#taskList"}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1488730785
+< Soup-Debug: SoupMessage 10 (0x131f0d0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:45 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/uRmDyHNfZl69OIU8kwgXBupweok"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "tasks#taskList",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6MTU4NzE3ODk3MDow",
+< "etag": "\"NEVtLf5Q_dTURZbE3E-zlPpPgGk/uRmDyHNfZl69OIU8kwgXBupweok\"",
+< "title": "Some tasklist",
+< "updated": "2017-03-05T16:19:45.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTU4NzE3ODk3MDow"
+< }
+
--- /dev/null
+> DELETE /tasks/v1/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTQ2MzA5NzM4NTow/tasks/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTQ2MzA5NzM4NToxNTgwOTMzNTQx HTTP/1.1
+> Soup-Debug-Timestamp: 1488730803
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 35 (0x131f2b0), SoupSocket 20 (0xc29330)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> If-Match: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/LTE4MzU3NDA2NTE"
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1488730804
+< Soup-Debug: SoupMessage 35 (0x131f2b0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:20:04 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/vyGp6PvFo4RvsFtPoIWeCReyIC8"
+< Vary: Origin
+< Vary: X-Origin
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+<
+
--- /dev/null
+> POST /tasks/v1/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTU1NzYzNjQwOjA/tasks HTTP/1.1
+> Soup-Debug-Timestamp: 1488730791
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 16 (0x131f0d0), SoupSocket 10 (0xc29330)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+>
+> {"title":"My list of things","kind":"tasks#task","deleted":false,"hidden":false}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1488730791
+< Soup-Debug: SoupMessage 16 (0x131f0d0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:51 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/LTg5NjkxNzY0NA"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "tasks#task",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6MTU1NzYzNjQwOjIwODUxOTc5NDk",
+< "etag": "\"NEVtLf5Q_dTURZbE3E-zlPpPgGk/LTg5NjkxNzY0NA\"",
+< "title": "My list of things",
+< "updated": "2017-03-05T16:19:51.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTU1NzYzNjQwOjA/tasks/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTU1NzYzNjQwOjIwODUxOTc5NDk",
+< "position": "00000000002147483647",
+< "status": "needsAction"
+< }
+
--- /dev/null
+> GET /tasks/v1/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjA/tasks HTTP/1.1
+> Soup-Debug-Timestamp: 1488730795
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 23 (0x131f2b0), SoupSocket 14 (0xc29260)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1488730796
+< Soup-Debug: SoupMessage 23 (0x131f2b0)
+< Expires: Sun, 05 Mar 2017 16:19:56 GMT
+< Date: Sun, 05 Mar 2017 16:19:56 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/LTE2MjI4NTcwMjM"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "tasks#tasks",
+< "etag": "\"NEVtLf5Q_dTURZbE3E-zlPpPgGk/LTE2MjI4NTcwMjM\"",
+< "items": [
+< {
+< "kind": "tasks#task",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjgxMTI4NjMzNw",
+< "etag": "\"NEVtLf5Q_dTURZbE3E-zlPpPgGk/LTY2MTU1MTA3Nw\"",
+< "title": "Task 3",
+< "updated": "2017-03-05T16:19:55.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjA/tasks/MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjgxMTI4NjMzNw",
+< "position": "00000000001234803096",
+< "status": "needsAction"
+< },
+< {
+< "kind": "tasks#task",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjE0NDIwMDc3OTE",
+< "etag": "\"NEVtLf5Q_dTURZbE3E-zlPpPgGk/NDg2MTYwNTc0\"",
+< "title": "Task 2",
+< "updated": "2017-03-05T16:19:55.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjA/tasks/MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjE0NDIwMDc3OTE",
+< "position": "00000000001610612734",
+< "status": "needsAction"
+< },
+< {
+< "kind": "tasks#task",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjczNDk3OTc1NA",
+< "etag": "\"NEVtLf5Q_dTURZbE3E-zlPpPgGk/LTE4NDA5NDc4NzQ\"",
+< "title": "Task 1",
+< "updated": "2017-03-05T16:19:54.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjA/tasks/MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjczNDk3OTc1NA",
+< "position": "00000000002147483647",
+< "status": "needsAction"
+< }
+< ]
+< }
+
--- /dev/null
+> PUT /tasks/v1/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6NTgwMzc0MTkzOjA/tasks/MTY4ODYzMjk0OTkzNDgxODY2Njk6NTgwMzc0MTkzOjU1NzMwODc3Ng HTTP/1.1
+> Soup-Debug-Timestamp: 1488730800
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 30 (0x131f490), SoupSocket 18 (0xc290c0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> If-Match: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/MTcyODc2MDc3MA"
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+>
+> {"title":"New Title!","id":"MTY4ODYzMjk0OTkzNDgxODY2Njk6NTgwMzc0MTkzOjU1NzMwODc3Ng","updated":"2017-03-05T16:19:59.000001+00:00","kind":"tasks#task","etag":"\"NEVtLf5Q_dTURZbE3E-zlPpPgGk/MTcyODc2MDc3MA\"","selfLink":"https://www.googleapis.com/tasks/v1/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6NTgwMzc0MTkzOjA/tasks/MTY4ODYzMjk0OTkzNDgxODY2Njk6NTgwMzc0MTkzOjU1NzMwODc3Ng","position":"00000000002147483647","status":"needsAction","deleted":false,"hidden":false}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1488730800
+< Soup-Debug: SoupMessage 30 (0x131f490)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:20:00 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/NzgyODM3MzA2"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "tasks#task",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6NTgwMzc0MTkzOjU1NzMwODc3Ng",
+< "etag": "\"NEVtLf5Q_dTURZbE3E-zlPpPgGk/NzgyODM3MzA2\"",
+< "title": "New Title!",
+< "updated": "2017-03-05T16:20:00.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6NTgwMzc0MTkzOjA/tasks/MTY4ODYzMjk0OTkzNDgxODY2Njk6NTgwMzc0MTkzOjU1NzMwODc3Ng",
+< "position": "00000000002147483647",
+< "status": "needsAction"
+< }
+
--- /dev/null
+> DELETE /tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MzUwMTc2NDY3OjA HTTP/1.1
+> Soup-Debug-Timestamp: 1488730789
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 14 (0x131f490), SoupSocket 8 (0xc29190)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> If-Match: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/FGjS7DYKYr6UbyOOfOp6rMeFdO8"
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1488730789
+< Soup-Debug: SoupMessage 14 (0x131f490)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:49 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/vyGp6PvFo4RvsFtPoIWeCReyIC8"
+< Vary: Origin
+< Vary: X-Origin
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+<
+
--- /dev/null
+> POST /tasks/v1/users/@me/lists HTTP/1.1
+> Soup-Debug-Timestamp: 1488730774
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 1 (0x131f490), SoupSocket 1 (0xc29330)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+>
+> {"title":"My list of things","kind":"tasks#taskList"}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1488730776
+< Soup-Debug: SoupMessage 1 (0x131f490)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:36 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/4m_WbuINWz2JNZDVeTXaKpxeWLc"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "tasks#taskList",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6MTM1MDkwMDMwNTow",
+< "etag": "\"NEVtLf5Q_dTURZbE3E-zlPpPgGk/4m_WbuINWz2JNZDVeTXaKpxeWLc\"",
+< "title": "My list of things",
+< "updated": "2017-03-05T16:19:36.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTM1MDkwMDMwNTow"
+< }
+
--- /dev/null
+> POST /tasks/v1/users/@me/lists HTTP/1.1
+> Soup-Debug-Timestamp: 1488730789
+> Soup-Debug: SoupSession 1 (0xc11460), SoupMessage 1 (0x131f2b0), SoupSocket 1 (0xc29190)
+> Host: www.googleapis.com
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+>
+> {"title":"My list of things","kind":"tasks#taskList"}
+
+< HTTP/1.1 401 Unauthorized
+< Soup-Debug-Timestamp: 1488730789
+< Soup-Debug: SoupMessage 1 (0x131f2b0)
+< Vary: Origin
+< Vary: X-Origin
+< WWW-Authenticate: Bearer realm="https://accounts.google.com/"
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< Date: Sun, 05 Mar 2017 16:19:49 GMT
+< Expires: Sun, 05 Mar 2017 16:19:49 GMT
+< Cache-Control: private, max-age=0
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+< Transfer-Encoding: chunked
+<
+< {
+< "error": {
+< "errors": [
+< {
+< "domain": "global",
+< "reason": "required",
+< "message": "Login Required",
+< "locationType": "header",
+< "location": "Authorization"
+< }
+< ],
+< "code": 401,
+< "message": "Login Required"
+< }
+< }
+
--- /dev/null
+> GET /tasks/v1/users/@me/lists HTTP/1.1
+> Soup-Debug-Timestamp: 1488730782
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 6 (0x131f2b0), SoupSocket 4 (0xc29330)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1488730782
+< Soup-Debug: SoupMessage 6 (0x131f2b0)
+< Expires: Sun, 05 Mar 2017 16:19:42 GMT
+< Date: Sun, 05 Mar 2017 16:19:42 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/G8kd-PXyly6FTFimI_ecwhye7YM"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "tasks#taskLists",
+< "etag": "\"NEVtLf5Q_dTURZbE3E-zlPpPgGk/G8kd-PXyly6FTFimI_ecwhye7YM\"",
+< "items": [
+< {
+< "kind": "tasks#taskList",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6MDow",
+< "title": "libgdata.test's list",
+< "updated": "2017-03-05T16:19:41.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MDow"
+< },
+< {
+< "kind": "tasks#taskList",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6MTk0MTU0NjM0OjA",
+< "title": "Tasklist 3",
+< "updated": "2017-03-05T16:19:41.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTk0MTU0NjM0OjA"
+< },
+< {
+< "kind": "tasks#taskList",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6MjE0NTIxMTkxOjA",
+< "title": "Some tasklist",
+< "updated": "2015-08-12T10:00:28.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MjE0NTIxMTkxOjA"
+< },
+< {
+< "kind": "tasks#taskList",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6MjIzNTU2OTAxOjA",
+< "title": "Tasklist 2",
+< "updated": "2017-03-05T16:19:40.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MjIzNTU2OTAxOjA"
+< },
+< {
+< "kind": "tasks#taskList",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6MzcyMzQwODg0OjA",
+< "title": "Some tasklist",
+< "updated": "2017-03-02T17:44:29.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MzcyMzQwODg0OjA"
+< },
+< {
+< "kind": "tasks#taskList",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6Njg1MzY2MTE2OjA",
+< "title": "Some tasklist",
+< "updated": "2017-03-05T15:59:19.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6Njg1MzY2MTE2OjA"
+< },
+< {
+< "kind": "tasks#taskList",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6MTQ3NTQ1MjE3MTow",
+< "title": "Some tasklist",
+< "updated": "2017-03-02T20:06:51.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTQ3NTQ1MjE3MTow"
+< },
+< {
+< "kind": "tasks#taskList",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6MTk3Mjg3NzkzOTow",
+< "title": "Tasklist 1",
+< "updated": "2017-03-05T16:19:38.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTk3Mjg3NzkzOTow"
+< }
+< ]
+< }
+
--- /dev/null
+> PUT /tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTU4NzE3ODk3MDow HTTP/1.1
+> Soup-Debug-Timestamp: 1488730785
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 11 (0x131f0d0), SoupSocket 7 (0xc295a0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> If-Match: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/uRmDyHNfZl69OIU8kwgXBupweok"
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+>
+> {"title":"New Title!","id":"MTY4ODYzMjk0OTkzNDgxODY2Njk6MTU4NzE3ODk3MDow","updated":"2017-03-05T16:19:45.000001+00:00","kind":"tasks#taskList","etag":"\"NEVtLf5Q_dTURZbE3E-zlPpPgGk/uRmDyHNfZl69OIU8kwgXBupweok\"","selfLink":"https://www.googleapis.com/tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTU4NzE3ODk3MDow"}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1488730786
+< Soup-Debug: SoupMessage 11 (0x131f0d0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:46 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/xFFBY7L13eQepjexhIo98Mh79SU"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "tasks#taskList",
+< "id": "MTY4ODYzMjk0OTkzNDgxODY2Njk6MTU4NzE3ODk3MDow",
+< "etag": "\"NEVtLf5Q_dTURZbE3E-zlPpPgGk/xFFBY7L13eQepjexhIo98Mh79SU\"",
+< "title": "New Title!",
+< "updated": "2017-03-05T16:19:45.000Z",
+< "selfLink": "https://www.googleapis.com/tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTU4NzE3ODk3MDow"
+< }
+
--- /dev/null
+> DELETE /tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTQ2MzA5NzM4NTow HTTP/1.1
+> Soup-Debug-Timestamp: 1488730804
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 36 (0x131f490), SoupSocket 19 (0xc29260)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> If-Match: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/kHiYWwcDatT75kiYewaVAm1VzTQ"
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1488730804
+< Soup-Debug: SoupMessage 36 (0x131f490)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:20:04 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/vyGp6PvFo4RvsFtPoIWeCReyIC8"
+< Vary: Origin
+< Vary: X-Origin
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+<
+
--- /dev/null
+> DELETE /tasks/v1/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTU1NzYzNjQwOjA/tasks/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTU1NzYzNjQwOjIwODUxOTc5NDk HTTP/1.1
+> Soup-Debug-Timestamp: 1488730792
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 17 (0x131f2b0), SoupSocket 10 (0xc29330)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> If-Match: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/LTg5NjkxNzY0NA"
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1488730792
+< Soup-Debug: SoupMessage 17 (0x131f2b0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:52 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/vyGp6PvFo4RvsFtPoIWeCReyIC8"
+< Vary: Origin
+< Vary: X-Origin
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+<
+
+> DELETE /tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTU1NzYzNjQwOjA HTTP/1.1
+> Soup-Debug-Timestamp: 1488730792
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 18 (0x131f490), SoupSocket 9 (0xc295a0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> If-Match: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/MJwJ9Df_LrfvTqk17JrrSZENalc"
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1488730792
+< Soup-Debug: SoupMessage 18 (0x131f490)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:52 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/vyGp6PvFo4RvsFtPoIWeCReyIC8"
+< Vary: Origin
+< Vary: X-Origin
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+<
+
--- /dev/null
+> DELETE /tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTM1MDkwMDMwNTow HTTP/1.1
+> Soup-Debug-Timestamp: 1488730776
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 2 (0x131f490), SoupSocket 1 (0xc29330)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> If-Match: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/4m_WbuINWz2JNZDVeTXaKpxeWLc"
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1488730776
+< Soup-Debug: SoupMessage 2 (0x131f490)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:36 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/vyGp6PvFo4RvsFtPoIWeCReyIC8"
+< Vary: Origin
+< Vary: X-Origin
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+<
+
--- /dev/null
+> DELETE /tasks/v1/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjA/tasks/MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjczNDk3OTc1NA HTTP/1.1
+> Soup-Debug-Timestamp: 1488730796
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 24 (0x131f490), SoupSocket 14 (0xc29260)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> If-Match: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/LTE4NDA5NDc4NzQ"
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1488730796
+< Soup-Debug: SoupMessage 24 (0x131f490)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:56 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/vyGp6PvFo4RvsFtPoIWeCReyIC8"
+< Vary: Origin
+< Vary: X-Origin
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+<
+
+> DELETE /tasks/v1/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjA/tasks/MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjE0NDIwMDc3OTE HTTP/1.1
+> Soup-Debug-Timestamp: 1488730796
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 25 (0x131f490), SoupSocket 13 (0xc29330)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> If-Match: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/NDg2MTYwNTc0"
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1488730797
+< Soup-Debug: SoupMessage 25 (0x131f490)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:56 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/vyGp6PvFo4RvsFtPoIWeCReyIC8"
+< Vary: Origin
+< Vary: X-Origin
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+<
+
+> DELETE /tasks/v1/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjA/tasks/MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjgxMTI4NjMzNw HTTP/1.1
+> Soup-Debug-Timestamp: 1488730797
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 26 (0x131f2b0), SoupSocket 15 (0xc290c0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> If-Match: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/LTY2MTU1MTA3Nw"
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1488730797
+< Soup-Debug: SoupMessage 26 (0x131f2b0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:57 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/vyGp6PvFo4RvsFtPoIWeCReyIC8"
+< Vary: Origin
+< Vary: X-Origin
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+<
+
+> DELETE /tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MzQzNDE2NzAwOjA HTTP/1.1
+> Soup-Debug-Timestamp: 1488730797
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 27 (0x131f0d0), SoupSocket 16 (0xc29330)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> If-Match: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/CcJ1Sga0a7yaJVWgBeDczyDdLZg"
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1488730798
+< Soup-Debug: SoupMessage 27 (0x131f0d0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:58 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/vyGp6PvFo4RvsFtPoIWeCReyIC8"
+< Vary: Origin
+< Vary: X-Origin
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+<
+
--- /dev/null
+> DELETE /tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTk3Mjg3NzkzOTow HTTP/1.1
+> Soup-Debug-Timestamp: 1488730782
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 7 (0x131f490), SoupSocket 4 (0xc29330)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> If-Match: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/snoTsKOMEHobrczhuzP9In_lbE4"
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1488730783
+< Soup-Debug: SoupMessage 7 (0x131f490)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:43 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/vyGp6PvFo4RvsFtPoIWeCReyIC8"
+< Vary: Origin
+< Vary: X-Origin
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+<
+
+> DELETE /tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MjIzNTU2OTAxOjA HTTP/1.1
+> Soup-Debug-Timestamp: 1488730783
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 8 (0x131f490), SoupSocket 5 (0xc29260)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> If-Match: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/QfIalAeF9yWiO_irsHRsK5Y-BDc"
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1488730783
+< Soup-Debug: SoupMessage 8 (0x131f490)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:43 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/vyGp6PvFo4RvsFtPoIWeCReyIC8"
+< Vary: Origin
+< Vary: X-Origin
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+<
+
+> DELETE /tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTk0MTU0NjM0OjA HTTP/1.1
+> Soup-Debug-Timestamp: 1488730783
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 9 (0x131f2b0), SoupSocket 6 (0xc29330)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> If-Match: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/4Q9GyoadtEFrAlVSFU7ctEryEuI"
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1488730784
+< Soup-Debug: SoupMessage 9 (0x131f2b0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:44 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/vyGp6PvFo4RvsFtPoIWeCReyIC8"
+< Vary: Origin
+< Vary: X-Origin
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+<
+
--- /dev/null
+> DELETE /tasks/v1/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6NTgwMzc0MTkzOjA/tasks/MTY4ODYzMjk0OTkzNDgxODY2Njk6NTgwMzc0MTkzOjU1NzMwODc3Ng HTTP/1.1
+> Soup-Debug-Timestamp: 1488730800
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 31 (0x131f490), SoupSocket 18 (0xc290c0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> If-Match: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/NzgyODM3MzA2"
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1488730801
+< Soup-Debug: SoupMessage 31 (0x131f490)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:20:01 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/vyGp6PvFo4RvsFtPoIWeCReyIC8"
+< Vary: Origin
+< Vary: X-Origin
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+<
+
+> DELETE /tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6NTgwMzc0MTkzOjA HTTP/1.1
+> Soup-Debug-Timestamp: 1488730801
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 32 (0x131f2b0), SoupSocket 17 (0xc29330)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> If-Match: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/nO8dqy3WY7Pl5I1-B8J_UO0CxHY"
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1488730801
+< Soup-Debug: SoupMessage 32 (0x131f2b0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:20:01 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/vyGp6PvFo4RvsFtPoIWeCReyIC8"
+< Vary: Origin
+< Vary: X-Origin
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+<
+
--- /dev/null
+> DELETE /tasks/v1/users/@me/lists/MTY4ODYzMjk0OTkzNDgxODY2Njk6MTU4NzE3ODk3MDow HTTP/1.1
+> Soup-Debug-Timestamp: 1488730786
+> Soup-Debug: SoupSession 1 (0xc11340), SoupMessage 12 (0x131f2b0), SoupSocket 7 (0xc295a0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.GlsFBF-OmjaBxyVt07b_VA59pQBW56_qLGYrHeFJXmAwFrBWjHldsCzVM3Tu9DECD218fDB4z03cc9ueSYP3-0YbtFqkVorRzqOb0HwXAkfxFNjgJgfTjPd3_MP_
+> GData-Version: 2
+> If-Match: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/xFFBY7L13eQepjexhIo98Mh79SU"
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.7 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1488730786
+< Soup-Debug: SoupMessage 12 (0x131f2b0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Mon, 01 Jan 1990 00:00:00 GMT
+< Date: Sun, 05 Mar 2017 16:19:46 GMT
+< ETag: "NEVtLf5Q_dTURZbE3E-zlPpPgGk/vyGp6PvFo4RvsFtPoIWeCReyIC8"
+< Vary: Origin
+< Vary: X-Origin
+< Server: GSE
+< Alt-Svc: quic=":443"; ma=2592000; v="36,35,34"
+<
+
--- /dev/null
+> POST /o/oauth2/token HTTP/1.1
+> Soup-Debug-Timestamp: 1430422927
+> Soup-Debug: SoupSession 1 (0xf86390), SoupMessage 1 (0x10892b0), SoupSocket 1 (0x114b390)
+> Host: accounts.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+>
+> client_id=352818697630-nqu2cmt5quqd6lr17ouoqmb684u84l1f.apps.googleusercontent.com&client_secret=-fA4pHQJxR3zJ-FyAMPQsikg&code=4%2F9qV_LanNEOUOL4sftMwUp4cfa_yeFassB6-ys5EkA5o.4rgOzrZMXgcboiIBeO6P2m-GWLMXmgI&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&grant_type=authorization_code
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1430422927
+< Soup-Debug: SoupMessage 1 (0x10892b0)
+< Content-Type: application/json; charset=utf-8
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Thu, 30 Apr 2015 19:42:07 GMT
+< Content-Disposition: attachment; filename="json.txt"; filename*=UTF-8''json.txt
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "access_token" : "ya29.ZQEFwW-NMVSPtnKfaeAAD2Rv7iYNK9206z9iKfN1eP55C3wRHFHgivPnHH_LVv-q0VzlhvuDOwnY3g",
+< "token_type" : "Bearer",
+< "expires_in" : 3600,
+< "refresh_token" : "1/QINzwmWibPyq3xy7OmR1fRGES2Dpxo-DLfuSVlVWTy190RDknAdJa_sgfheVM0XT"
+< }
+
--- /dev/null
+> POST /accounts/ClientLogin HTTP/1.1
+> Soup-Debug-Timestamp: 1375254132
+> Soup-Debug: SoupSession 1 (0x667500), SoupMessage 1 (0x705650), SoupSocket 1 (0x6baec0)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> accountType=HOSTED%5FOR%5FGOOGLE&Email=libgdata%2Etest%40gmail%2Ecom&Passwd=gdata%2Dgdata&service=youtube&source=ytapi%2DGNOME%2Dlibgdata%2D444fubtt%2D0
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375254133
+< Soup-Debug: SoupMessage 1 (0x705650)
+< Content-Type: text/plain
+< Cache-control: no-cache, no-store
+< Pragma: no-cache
+< Expires: Mon, 01-Jan-1990 00:00:00 GMT
+< Date: Wed, 31 Jul 2013 07:02:13 GMT
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 947
+< Server: GSE
+<
+< SID=DQAAANQAAAB2R5LVK8FrqXARKI5VwKfSVlhLjMNCdp7-wA0ClDWsPII-IqU4R0ibU1ucqaC8Aymi5WAkof5fxbVS6UYTdhcXOoN44CqIFvKlu_JN7A6PhlFCSNwwJJT-DTE_DIZhc7hTGvtAH-0Tf-PrzDdftsa_BxuZZqho3wMIBQQSuyg_ebtCqVNyvsqv0ncuZChZ3e6D_PYRfvhmhoRyQNzUuGJkMeC1MRUWUlfwAs3DQLaeuDz4zFexP44nn3ZKPDKgfB3ti_b5iW8FL5mD95YrQmN-WC8DH8McMaEKhkImc33xSw
+< LSID=DQAAANUAAABLEw2f-pmiM31Ap3DN5xBbMydlV5xL42_deHim5jYQZr2AUBJ_An3H4DXg4ktsjBad_jsPU7WC2iv2qyE2BqamwyZRYp6ruYL6MLJF50WKTxT000-YqOVS1qadN9tVYbLzBMTaI_I7vo03CMf2m99pZ1dfKsaVjzbexngruMB68HLzj0yDaz5-NabAyTlOxF-CK-bsfv-v39khYwd9H3IC2_SQ3X6UGvur2IPVYdq8RazOKA3srSSn9FtjIaFExbVWj2dUNDaXkeUIDxPcP5g0jablfk7jog4zx4sIoN4MNg
+< Auth=DQAAANcAAABLEw2f-pmiM31Ap3DN5xBbMydlV5xL42_deHim5jYQZr2AUBJ_An3H4DXg4ktsjBZG9fR24wH5e6ebu9-45r3BMAqg5hmdYqIy2CJKn2vxeoWWwOAwbFmUaMk1zrk3C1dszXYTAnyscAoeziF8GklOEK0N-7p2RknxqNcWPFh6IHoZjJSAOcb4Q4UD9N3VW00URVv3zxjz-KYMMeBglJRcA5KkKH1gyRifkTQXLAqVU7XsfBVAmqkmxbiQG4rPkUT1a2D3eQMV9Qh53ja88cDQvBqgOioO_nh_gOXoKhwVXA
+
--- /dev/null
+> POST /accounts/ClientLogin HTTP/1.1
+> Soup-Debug-Timestamp: 1375254133
+> Soup-Debug: SoupSession 1 (0x6673f0), SoupMessage 1 (0x7fffe0017560), SoupSocket 1 (0x7fffe0019540)
+> Host: www.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> Connection: Keep-Alive
+>
+> accountType=HOSTED%5FOR%5FGOOGLE&Email=libgdata%2Etest%40gmail%2Ecom&Passwd=gdata%2Dgdata&service=youtube&source=ytapi%2DGNOME%2Dlibgdata%2D444fubtt%2D0
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1375254134
+< Soup-Debug: SoupMessage 1 (0x7fffe0017560)
+< Content-Type: text/plain
+< Cache-control: no-cache, no-store
+< Pragma: no-cache
+< Expires: Mon, 01-Jan-1990 00:00:00 GMT
+< Date: Wed, 31 Jul 2013 07:02:14 GMT
+< X-Content-Type-Options: nosniff
+< X-XSS-Protection: 1; mode=block
+< Content-Length: 947
+< Server: GSE
+<
+< SID=DQAAANMAAADMnJYqmWb6AeZvxNJe0hRN9cY-lvlR-o1_ETXtjnhPRDoiyQvZtOysLsncUYg0ML1z3py4TFSfCuPJTZU0p03M1t5GnpoRfSWwF2QndDpsfromQMBXhwpT1X7cmiKzrwKVvAqYsSliuL2Xe1G2rQ2vyj94ClH5kEi_lcgoTQ6gOC1L5MSg7RUAMaUul_C32-LlW0ty9ng_qDNx89a1sfmTNpwXj0ctx5M_WgvHWi1ky_pNQEQN_i11lS3s-D_wPb9lXPi5fBooZlMI11qal1AGFVsZdFUrb1vjUEQakFL0eA
+< LSID=DQAAANUAAADZiLQKy6HypjseEMKQAuRC1dcsHnbAC8OVCQJ43bYT3akRW9GK9HHB5ptTxYVcv89wKXBPzjFRjw-LiGrREnQ4Obyzwve8-MHxaIhJ-VV50oCUvhMGf4w9YLEgr8-h8uN4sOOTKsNCj5aMkmCskQwXPSsebKOlMCjN14sTIppqKwArYcHP61X-w72Y46w3BJbwhZbvLbZhag-iUCdOs3Y7xBLhjIxDNSTJ3h-2cdxJuneU8cU5bNSlhc8FU7Pq4s3tRDM81t7RYPDE8Uvtvzx2OSig-fKfIsa-LYlAz-BHAA
+< Auth=DQAAANYAAADZiLQKy6HypjseEMKQAuRC1dcsHnbAC8OVCQJ43bYT3akRW9GK9HHB5ptTxYVcv89FDupJSyk6vMzZsIyZxq-adlMS6rmdnIluAkCxqlwAxQoyPbG8IBslAmc2lnYTLoTy1wVQDNCTE_9aMMmhS-0lYktl5S7YT1eimVQrbnVhFqbEzh180kszSXdztdsuGf3K9OtIbEu7ol96SS-E_oXmsRUz_B612n6T8C4eUd_ApKuysIpVhl-pMCYc9T2uWXpQQriWHv99IWS4uozb-DAHkz_WxqCSvi_PxaNXyqCpNQ
+
--- /dev/null
+> GET /youtube/v3/videoCategories?part=snippet®ionCode=US HTTP/1.1
+> Soup-Debug-Timestamp: 1436344205
+> Soup-Debug: SoupSession 1 (0x699270), SoupMessage 1 (0x938290), SoupSocket 1 (0x6559a0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.qgGbGtKxUsd-hiHkZzQNuub_EWfRo0vVObMzNtVDd1BXcbjDiBEqWqLMP3hh3zORWL-1I4_eLOS0VQ
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436344205
+< Soup-Debug: SoupMessage 1 (0x938290)
+< Expires: Wed, 08 Jul 2015 08:30:05 GMT
+< Date: Wed, 08 Jul 2015 08:30:05 GMT
+< Cache-Control: private, max-age=86400, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/jUYxq1h23PAd2po_F3Lrni-VNQE"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#videoCategoryListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/jUYxq1h23PAd2po_F3Lrni-VNQE\"",
+< "items": [
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/Xy1mB4_yLrHy_BmKmPBggty2mZQ\"",
+< "id": "1",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Film & Animation",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/UZ1oLIIz2dxIhO45ZTFR3a3NyTA\"",
+< "id": "2",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Autos & Vehicles",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/nqRIq97-xe5XRZTxbknKFVe5Lmg\"",
+< "id": "10",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Music",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/HwXKamM1Q20q9BN-oBJavSGkfDI\"",
+< "id": "15",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Pets & Animals",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/9GQMSRjrZdHeb1OEM1XVQ9zbGec\"",
+< "id": "17",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Sports",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/FJwVpGCVZ1yiJrqZbpqe68Sy_OE\"",
+< "id": "18",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Short Movies",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/M-3iD9dwK7YJCafRf_DkLN8CouA\"",
+< "id": "19",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Travel & Events",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/WmA0qYEfjWsAoyJFSw2zinhn2wM\"",
+< "id": "20",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Gaming",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/EapFaGYG7K0StIXVf8aba249tdM\"",
+< "id": "21",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Videoblogging",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/xId8RX7vRN8rqkbYZbNIytUQDRo\"",
+< "id": "22",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "People & Blogs",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/G9LHzQmx44rX2S5yaga_Aqtwz8M\"",
+< "id": "23",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Comedy",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/UVB9oxX2Bvqa_w_y3vXSLVK5E_s\"",
+< "id": "24",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Entertainment",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/QiLK0ZIrFoORdk_g2l_XR_ECjDc\"",
+< "id": "25",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "News & Politics",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/r6Ck6Z0_L0rG37VJQR200SGNA_w\"",
+< "id": "26",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Howto & Style",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/EoYkczo9I3RCf96RveKTOgOPkUM\"",
+< "id": "27",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Education",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/w5HjcTD82G_XA3xBctS30zS-JpQ\"",
+< "id": "28",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Science & Technology",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/SalkJoBWq_smSEqiAx_qyri6Wa8\"",
+< "id": "29",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Nonprofits & Activism",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/lL7uWDr_071CHxifjYG1tJrp4Uo\"",
+< "id": "30",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Movies",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/WnuVfjO-PyFLO7NTRQIbrGE62nk\"",
+< "id": "31",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Anime/Animation",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ctpH2hGA_UZ3volJT_FTlOg9M00\"",
+< "id": "32",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Action/Adventure",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/L0kR3-g1BAo5UD1PLVbQ7LkkDtQ\"",
+< "id": "33",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Classics",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/pUZOAC_s9sfiwar639qr_wAB-aI\"",
+< "id": "34",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Comedy",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/Xb5JLhtyNRN3AQq021Ds-OV50Jk\"",
+< "id": "35",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Documentary",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/u8WXzF4HIhtEi805__sqjuA4lEk\"",
+< "id": "36",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Drama",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/D04PP4Gr7wc4IV_O9G66Z4A8KWQ\"",
+< "id": "37",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Family",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/i5-_AceGXQCEEMWU0V8CcQm_vLQ\"",
+< "id": "38",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Foreign",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/rtlxd0zOixA9QHdIZB26-St5qgQ\"",
+< "id": "39",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Horror",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/N1TrDFLRppxZgBowCJfJCvh0Dpg\"",
+< "id": "40",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Sci-Fi/Fantasy",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/7UMGi6zRySqXopr_rv4sZq6Za2E\"",
+< "id": "41",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Thriller",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/RScXhi324h8usyIetreAVb-uKeM\"",
+< "id": "42",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Shorts",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/0n9MJVCDLpA8q7aiGVrFsuFsd0A\"",
+< "id": "43",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Shows",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/x5NxSf5fz8hn4loSN4rvhwzD_pY\"",
+< "id": "44",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Trailers",
+< "assignable": false
+< }
+< }
+< ]
+< }
+
+> GET /youtube/v3/videoCategories?part=snippet®ionCode=TR HTTP/1.1
+> Soup-Debug-Timestamp: 1436344205
+> Soup-Debug: SoupSession 1 (0x699270), SoupMessage 2 (0x938470), SoupSocket 1 (0x6559a0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.qgGbGtKxUsd-hiHkZzQNuub_EWfRo0vVObMzNtVDd1BXcbjDiBEqWqLMP3hh3zORWL-1I4_eLOS0VQ
+> GData-Version: 2
+> Accept-Language: TR
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436344205
+< Soup-Debug: SoupMessage 2 (0x938470)
+< Expires: Wed, 08 Jul 2015 08:30:05 GMT
+< Date: Wed, 08 Jul 2015 08:30:05 GMT
+< Cache-Control: private, max-age=86400, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/y2h_MtOwl7P7oqYJv5CeDQCt2nc"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#videoCategoryListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/y2h_MtOwl7P7oqYJv5CeDQCt2nc\"",
+< "items": [
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/Xy1mB4_yLrHy_BmKmPBggty2mZQ\"",
+< "id": "1",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Film & Animation",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/UZ1oLIIz2dxIhO45ZTFR3a3NyTA\"",
+< "id": "2",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Autos & Vehicles",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/nqRIq97-xe5XRZTxbknKFVe5Lmg\"",
+< "id": "10",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Music",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/HwXKamM1Q20q9BN-oBJavSGkfDI\"",
+< "id": "15",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Pets & Animals",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/9GQMSRjrZdHeb1OEM1XVQ9zbGec\"",
+< "id": "17",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Sports",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/FJwVpGCVZ1yiJrqZbpqe68Sy_OE\"",
+< "id": "18",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Short Movies",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/M-3iD9dwK7YJCafRf_DkLN8CouA\"",
+< "id": "19",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Travel & Events",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/WmA0qYEfjWsAoyJFSw2zinhn2wM\"",
+< "id": "20",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Gaming",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/EapFaGYG7K0StIXVf8aba249tdM\"",
+< "id": "21",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Videoblogging",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/xId8RX7vRN8rqkbYZbNIytUQDRo\"",
+< "id": "22",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "People & Blogs",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/G9LHzQmx44rX2S5yaga_Aqtwz8M\"",
+< "id": "23",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Comedy",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/UVB9oxX2Bvqa_w_y3vXSLVK5E_s\"",
+< "id": "24",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Entertainment",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/QiLK0ZIrFoORdk_g2l_XR_ECjDc\"",
+< "id": "25",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "News & Politics",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/r6Ck6Z0_L0rG37VJQR200SGNA_w\"",
+< "id": "26",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Howto & Style",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/EoYkczo9I3RCf96RveKTOgOPkUM\"",
+< "id": "27",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Education",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/w5HjcTD82G_XA3xBctS30zS-JpQ\"",
+< "id": "28",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Science & Technology",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/lL7uWDr_071CHxifjYG1tJrp4Uo\"",
+< "id": "30",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Movies",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/WnuVfjO-PyFLO7NTRQIbrGE62nk\"",
+< "id": "31",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Anime/Animation",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ctpH2hGA_UZ3volJT_FTlOg9M00\"",
+< "id": "32",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Action/Adventure",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/L0kR3-g1BAo5UD1PLVbQ7LkkDtQ\"",
+< "id": "33",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Classics",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/pUZOAC_s9sfiwar639qr_wAB-aI\"",
+< "id": "34",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Comedy",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/Xb5JLhtyNRN3AQq021Ds-OV50Jk\"",
+< "id": "35",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Documentary",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/u8WXzF4HIhtEi805__sqjuA4lEk\"",
+< "id": "36",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Drama",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/D04PP4Gr7wc4IV_O9G66Z4A8KWQ\"",
+< "id": "37",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Family",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/i5-_AceGXQCEEMWU0V8CcQm_vLQ\"",
+< "id": "38",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Foreign",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/rtlxd0zOixA9QHdIZB26-St5qgQ\"",
+< "id": "39",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Horror",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/N1TrDFLRppxZgBowCJfJCvh0Dpg\"",
+< "id": "40",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Sci-Fi/Fantasy",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/7UMGi6zRySqXopr_rv4sZq6Za2E\"",
+< "id": "41",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Thriller",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/RScXhi324h8usyIetreAVb-uKeM\"",
+< "id": "42",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Shorts",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/0n9MJVCDLpA8q7aiGVrFsuFsd0A\"",
+< "id": "43",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Shows",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/x5NxSf5fz8hn4loSN4rvhwzD_pY\"",
+< "id": "44",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Trailers",
+< "assignable": false
+< }
+< }
+< ]
+< }
+
--- /dev/null
+> GET /youtube/v3/videoCategories?part=snippet®ionCode=US HTTP/1.1
+> Soup-Debug-Timestamp: 1436344205
+> Soup-Debug: SoupSession 1 (0x699270), SoupMessage 3 (0x938650), SoupSocket 1 (0x6559a0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.qgGbGtKxUsd-hiHkZzQNuub_EWfRo0vVObMzNtVDd1BXcbjDiBEqWqLMP3hh3zORWL-1I4_eLOS0VQ
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436344205
+< Soup-Debug: SoupMessage 3 (0x938650)
+< Expires: Wed, 08 Jul 2015 08:30:05 GMT
+< Date: Wed, 08 Jul 2015 08:30:05 GMT
+< Cache-Control: private, max-age=86400, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/jUYxq1h23PAd2po_F3Lrni-VNQE"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#videoCategoryListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/jUYxq1h23PAd2po_F3Lrni-VNQE\"",
+< "items": [
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/Xy1mB4_yLrHy_BmKmPBggty2mZQ\"",
+< "id": "1",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Film & Animation",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/UZ1oLIIz2dxIhO45ZTFR3a3NyTA\"",
+< "id": "2",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Autos & Vehicles",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/nqRIq97-xe5XRZTxbknKFVe5Lmg\"",
+< "id": "10",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Music",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/HwXKamM1Q20q9BN-oBJavSGkfDI\"",
+< "id": "15",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Pets & Animals",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/9GQMSRjrZdHeb1OEM1XVQ9zbGec\"",
+< "id": "17",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Sports",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/FJwVpGCVZ1yiJrqZbpqe68Sy_OE\"",
+< "id": "18",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Short Movies",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/M-3iD9dwK7YJCafRf_DkLN8CouA\"",
+< "id": "19",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Travel & Events",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/WmA0qYEfjWsAoyJFSw2zinhn2wM\"",
+< "id": "20",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Gaming",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/EapFaGYG7K0StIXVf8aba249tdM\"",
+< "id": "21",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Videoblogging",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/xId8RX7vRN8rqkbYZbNIytUQDRo\"",
+< "id": "22",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "People & Blogs",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/G9LHzQmx44rX2S5yaga_Aqtwz8M\"",
+< "id": "23",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Comedy",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/UVB9oxX2Bvqa_w_y3vXSLVK5E_s\"",
+< "id": "24",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Entertainment",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/QiLK0ZIrFoORdk_g2l_XR_ECjDc\"",
+< "id": "25",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "News & Politics",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/r6Ck6Z0_L0rG37VJQR200SGNA_w\"",
+< "id": "26",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Howto & Style",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/EoYkczo9I3RCf96RveKTOgOPkUM\"",
+< "id": "27",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Education",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/w5HjcTD82G_XA3xBctS30zS-JpQ\"",
+< "id": "28",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Science & Technology",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/SalkJoBWq_smSEqiAx_qyri6Wa8\"",
+< "id": "29",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Nonprofits & Activism",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/lL7uWDr_071CHxifjYG1tJrp4Uo\"",
+< "id": "30",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Movies",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/WnuVfjO-PyFLO7NTRQIbrGE62nk\"",
+< "id": "31",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Anime/Animation",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ctpH2hGA_UZ3volJT_FTlOg9M00\"",
+< "id": "32",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Action/Adventure",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/L0kR3-g1BAo5UD1PLVbQ7LkkDtQ\"",
+< "id": "33",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Classics",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/pUZOAC_s9sfiwar639qr_wAB-aI\"",
+< "id": "34",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Comedy",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/Xb5JLhtyNRN3AQq021Ds-OV50Jk\"",
+< "id": "35",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Documentary",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/u8WXzF4HIhtEi805__sqjuA4lEk\"",
+< "id": "36",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Drama",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/D04PP4Gr7wc4IV_O9G66Z4A8KWQ\"",
+< "id": "37",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Family",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/i5-_AceGXQCEEMWU0V8CcQm_vLQ\"",
+< "id": "38",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Foreign",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/rtlxd0zOixA9QHdIZB26-St5qgQ\"",
+< "id": "39",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Horror",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/N1TrDFLRppxZgBowCJfJCvh0Dpg\"",
+< "id": "40",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Sci-Fi/Fantasy",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/7UMGi6zRySqXopr_rv4sZq6Za2E\"",
+< "id": "41",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Thriller",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/RScXhi324h8usyIetreAVb-uKeM\"",
+< "id": "42",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Shorts",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/0n9MJVCDLpA8q7aiGVrFsuFsd0A\"",
+< "id": "43",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Shows",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/x5NxSf5fz8hn4loSN4rvhwzD_pY\"",
+< "id": "44",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Trailers",
+< "assignable": false
+< }
+< }
+< ]
+< }
+
--- /dev/null
+> GET /youtube/v3/videoCategories?part=snippet®ionCode=US HTTP/1.1
+> Soup-Debug-Timestamp: 1436344206
+> Soup-Debug: SoupSession 1 (0x699270), SoupMessage 6 (0x7fffd800bb70), SoupSocket 3 (0x6559a0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.qgGbGtKxUsd-hiHkZzQNuub_EWfRo0vVObMzNtVDd1BXcbjDiBEqWqLMP3hh3zORWL-1I4_eLOS0VQ
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436344206
+< Soup-Debug: SoupMessage 6 (0x7fffd800bb70)
+< Expires: Wed, 08 Jul 2015 08:30:06 GMT
+< Date: Wed, 08 Jul 2015 08:30:06 GMT
+< Cache-Control: private, max-age=86400, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/jUYxq1h23PAd2po_F3Lrni-VNQE"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#videoCategoryListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/jUYxq1h23PAd2po_F3Lrni-VNQE\"",
+< "items": [
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/Xy1mB4_yLrHy_BmKmPBggty2mZQ\"",
+< "id": "1",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Film & Animation",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/UZ1oLIIz2dxIhO45ZTFR3a3NyTA\"",
+< "id": "2",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Autos & Vehicles",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/nqRIq97-xe5XRZTxbknKFVe5Lmg\"",
+< "id": "10",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Music",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/HwXKamM1Q20q9BN-oBJavSGkfDI\"",
+< "id": "15",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Pets & Animals",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/9GQMSRjrZdHeb1OEM1XVQ9zbGec\"",
+< "id": "17",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Sports",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/FJwVpGCVZ1yiJrqZbpqe68Sy_OE\"",
+< "id": "18",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Short Movies",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/M-3iD9dwK7YJCafRf_DkLN8CouA\"",
+< "id": "19",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Travel & Events",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/WmA0qYEfjWsAoyJFSw2zinhn2wM\"",
+< "id": "20",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Gaming",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/EapFaGYG7K0StIXVf8aba249tdM\"",
+< "id": "21",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Videoblogging",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/xId8RX7vRN8rqkbYZbNIytUQDRo\"",
+< "id": "22",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "People & Blogs",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/G9LHzQmx44rX2S5yaga_Aqtwz8M\"",
+< "id": "23",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Comedy",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/UVB9oxX2Bvqa_w_y3vXSLVK5E_s\"",
+< "id": "24",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Entertainment",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/QiLK0ZIrFoORdk_g2l_XR_ECjDc\"",
+< "id": "25",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "News & Politics",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/r6Ck6Z0_L0rG37VJQR200SGNA_w\"",
+< "id": "26",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Howto & Style",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/EoYkczo9I3RCf96RveKTOgOPkUM\"",
+< "id": "27",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Education",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/w5HjcTD82G_XA3xBctS30zS-JpQ\"",
+< "id": "28",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Science & Technology",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/SalkJoBWq_smSEqiAx_qyri6Wa8\"",
+< "id": "29",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Nonprofits & Activism",
+< "assignable": true
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/lL7uWDr_071CHxifjYG1tJrp4Uo\"",
+< "id": "30",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Movies",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/WnuVfjO-PyFLO7NTRQIbrGE62nk\"",
+< "id": "31",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Anime/Animation",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ctpH2hGA_UZ3volJT_FTlOg9M00\"",
+< "id": "32",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Action/Adventure",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/L0kR3-g1BAo5UD1PLVbQ7LkkDtQ\"",
+< "id": "33",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Classics",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/pUZOAC_s9sfiwar639qr_wAB-aI\"",
+< "id": "34",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Comedy",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/Xb5JLhtyNRN3AQq021Ds-OV50Jk\"",
+< "id": "35",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Documentary",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/u8WXzF4HIhtEi805__sqjuA4lEk\"",
+< "id": "36",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Drama",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/D04PP4Gr7wc4IV_O9G66Z4A8KWQ\"",
+< "id": "37",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Family",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/i5-_AceGXQCEEMWU0V8CcQm_vLQ\"",
+< "id": "38",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Foreign",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/rtlxd0zOixA9QHdIZB26-St5qgQ\"",
+< "id": "39",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Horror",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/N1TrDFLRppxZgBowCJfJCvh0Dpg\"",
+< "id": "40",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Sci-Fi/Fantasy",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/7UMGi6zRySqXopr_rv4sZq6Za2E\"",
+< "id": "41",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Thriller",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/RScXhi324h8usyIetreAVb-uKeM\"",
+< "id": "42",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Shorts",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/0n9MJVCDLpA8q7aiGVrFsuFsd0A\"",
+< "id": "43",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Shows",
+< "assignable": false
+< }
+< },
+< {
+< "kind": "youtube#videoCategory",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/x5NxSf5fz8hn4loSN4rvhwzD_pY\"",
+< "id": "44",
+< "snippet": {
+< "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
+< "title": "Trailers",
+< "assignable": false
+< }
+< }
+< ]
+< }
+
--- /dev/null
+> POST /youtube/v3/commentThreads?part=snippet&shareOnGooglePlus=false HTTP/1.1
+> Soup-Debug-Timestamp: 1436524902
+> Soup-Debug: SoupSession 1 (0x764270), SoupMessage 4 (0x718380), SoupSocket 2 (0x7f5d6c003780)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.rAH_Q0eNKofaqTAncnAaEB4V0WK9Txs3Z9Flw_euQ39X46jVgKMldLv1uARt2252pTEu
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+>
+> {"kind":"youtube#commentThread","snippet":{"channelId":"UCHdu7S-LbC8V98jsR_tu6GA","videoId":"RzR2k8yo4NY","topLevelComment":{"kind":"youtube#comment","snippet":{"channelId":"UCHdu7S-LbC8V98jsR_tu6GA","videoId":"RzR2k8yo4NY","textOriginal":"This is a test comment."}}}}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436524902
+< Soup-Debug: SoupMessage 4 (0x718380)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Fri, 10 Jul 2015 10:41:42 GMT
+< ETag: "iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/T7NOv_1Oe26yX1oYK5tf_B19NuU"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/T7NOv_1Oe26yX1oYK5tf_B19NuU\"",
+< "id": "z12os1yw2pmnwpea204chtdb2wy3vhq4uhc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/VtJ29PV7AvBk9_U48knHQnchfTU\"",
+< "id": "z12os1yw2pmnwpea204chtdb2wy3vhq4uhc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "",
+< "textOriginal": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "authorGoogleplusProfileUrl": "https://plus.google.com/113183959927163240640",
+< "canRate": true,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2015-07-10T10:41:42.308Z",
+< "updatedAt": "2015-07-10T10:41:42.308Z"
+< }
+< },
+< "canReply": true,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< }
+
--- /dev/null
+> GET /youtube/v3/commentThreads?part=snippet&videoId=RzR2k8yo4NY HTTP/1.1
+> Soup-Debug-Timestamp: 1436524901
+> Soup-Debug: SoupSession 1 (0x764270), SoupMessage 2 (0xabdc70), SoupSocket 1 (0x71f9e0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.rAH_Q0eNKofaqTAncnAaEB4V0WK9Txs3Z9Flw_euQ39X46jVgKMldLv1uARt2252pTEu
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436524901
+< Soup-Debug: SoupMessage 2 (0xabdc70)
+< Expires: Fri, 10 Jul 2015 10:41:41 GMT
+< Date: Fri, 10 Jul 2015 10:41:41 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/tnlT8sNoS2vbl5HMiksBS_-CcQo"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#commentThreadListResponse",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/tnlT8sNoS2vbl5HMiksBS_-CcQo\"",
+< "nextPageToken": "Cg0Qltjeo7DQxgIgACgBEhQIABDAua2OsNDGAhjn8Zvsod64AhgCIBQ=",
+< "pageInfo": {
+< "resultsPerPage": 20
+< },
+< "items": [
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/MeIUWCn8mAQlUwkEwqeTuz_qPR0\"",
+< "id": "z12fyjkguzm5vj55s04chtdb2wy3vhq4uhc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/P_jPUxQNwfjwqw95THxeU3h5sUA\"",
+< "id": "z12fyjkguzm5vj55s04chtdb2wy3vhq4uhc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.\ufeff",
+< "textOriginal": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "authorGoogleplusProfileUrl": "https://plus.google.com/113183959927163240640",
+< "canRate": true,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2015-07-10T10:40:56.696Z",
+< "updatedAt": "2015-07-10T10:40:56.696Z"
+< }
+< },
+< "canReply": true,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/bDIqiUH3BHzv4TchmflkonAiLqw\"",
+< "id": "z13etv1rbt2ytxta504chtdb2wy3vhq4uhc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/-sV5aJ2UphypPjLwOYvsvNBQLJ8\"",
+< "id": "z13etv1rbt2ytxta504chtdb2wy3vhq4uhc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.\ufeff",
+< "textOriginal": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "authorGoogleplusProfileUrl": "https://plus.google.com/113183959927163240640",
+< "canRate": true,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2015-07-10T10:36:10.390Z",
+< "updatedAt": "2015-07-10T10:36:10.390Z"
+< }
+< },
+< "canReply": true,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/3RmAaZijYjXFAr561SVfK5Ix7Ck\"",
+< "id": "TlXUqsnFsOqh5zSAOQlsA6XPIoewA6iRmHOX1aqDxFY",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/ZWK7eFTRlA3WMNFx_E2xB8bn45o\"",
+< "id": "TlXUqsnFsOqh5zSAOQlsA6XPIoewA6iRmHOX1aqDxFY",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T20:26:17.862Z",
+< "updatedAt": "2013-09-09T20:26:17.862Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/-280GShlPqwXSrBiHlfPAKGS4cQ\"",
+< "id": "TlXUqsnFsOoUzYNVYOooIiIVOGJ737-0HQBT6zBAgm8",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/je4i7sJAe-2O6warPIXDVbKdrjg\"",
+< "id": "TlXUqsnFsOoUzYNVYOooIiIVOGJ737-0HQBT6zBAgm8",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T20:26:15.008Z",
+< "updatedAt": "2013-09-09T20:26:15.008Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/jKrO1yP0msWt5oBu3im_H0D3vxM\"",
+< "id": "TlXUqsnFsOrcYvCz7itsm22G_slJoOuM8Mjrv02vekY",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/bDD1D-VQ-wFT5bLY81HCtFkJfeQ\"",
+< "id": "TlXUqsnFsOrcYvCz7itsm22G_slJoOuM8Mjrv02vekY",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T20:26:12.396Z",
+< "updatedAt": "2013-09-09T20:26:12.396Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/8vlOydw59Ptq0cB5BDvTT9K-zOo\"",
+< "id": "TlXUqsnFsOpBOZXDK5KjRtoU-TiCd4V-tX7qP-_zMs8",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/jUTIEsa0bHZ-4fcOw6LAdwh5TmM\"",
+< "id": "TlXUqsnFsOpBOZXDK5KjRtoU-TiCd4V-tX7qP-_zMs8",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T20:26:00.707Z",
+< "updatedAt": "2013-09-09T20:26:00.707Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/H5GO6JKRbRliAeNZmMpc5R8CDZI\"",
+< "id": "TlXUqsnFsOr8XvFdBMJbfNH1juWIgt4mfM6OBOV951s",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/ux0fHD8SM8gjg5edNkXrQYxoQ9w\"",
+< "id": "TlXUqsnFsOr8XvFdBMJbfNH1juWIgt4mfM6OBOV951s",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T19:43:19.105Z",
+< "updatedAt": "2013-09-09T19:43:19.105Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/3PgoF-TXtKXWJ3DBEIyg_ixG7xQ\"",
+< "id": "TlXUqsnFsOrylByBk63PT7OrrchBJMW5R76_LghHwzA",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/To1vvffKNkv5fJchxUU1Xn6kL-g\"",
+< "id": "TlXUqsnFsOrylByBk63PT7OrrchBJMW5R76_LghHwzA",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T19:43:17.038Z",
+< "updatedAt": "2013-09-09T19:43:17.038Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/72SaxexOBejjygzqegWePCtLq_M\"",
+< "id": "TlXUqsnFsOpuSp_IkTgwuCd-VGpDsfzDNCIPtkv3LSo",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/G8Wrc5aWNLHaLeJku-Ut_Urxang\"",
+< "id": "TlXUqsnFsOpuSp_IkTgwuCd-VGpDsfzDNCIPtkv3LSo",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T19:43:10.173Z",
+< "updatedAt": "2013-09-09T19:43:10.173Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/v8puzVx3uVt9cE6FXyIBdhZmEZ4\"",
+< "id": "TlXUqsnFsOrXAnJ0gbx1BdEbVi818pryQ_unaXS-ZvM",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/PjF97wpU6UZSluy8TBBwZ0VxHBw\"",
+< "id": "TlXUqsnFsOrXAnJ0gbx1BdEbVi818pryQ_unaXS-ZvM",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:13:06.367Z",
+< "updatedAt": "2013-09-09T03:13:06.367Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/OGGrc94n9yc8uS65XkO34bByLpc\"",
+< "id": "TlXUqsnFsOownndwu4sT2CbxVD56nYlJLnqiJu45gNw",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/OQrmDGkjlZcK2w9wt-Akg9pw6Ik\"",
+< "id": "TlXUqsnFsOownndwu4sT2CbxVD56nYlJLnqiJu45gNw",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:13:07.055Z",
+< "updatedAt": "2013-09-09T03:13:07.055Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/XsavwQEwnBQFGgLxXpLPk1P-JZE\"",
+< "id": "TlXUqsnFsOoOSUkAjaX0QraSSeSkxs1qwjM0RSjlrZg",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/0XbskDeanb0cVyCwj0UjVA-dcu4\"",
+< "id": "TlXUqsnFsOoOSUkAjaX0QraSSeSkxs1qwjM0RSjlrZg",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:13:08.757Z",
+< "updatedAt": "2013-09-09T03:13:08.757Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/MSXG_anSkcP4MibBEiJMAOdDMmY\"",
+< "id": "TlXUqsnFsOqnOOl1ML1ATK3Tg_Rkvh98yGnHcd480ko",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/d8orQfKdbEZ1p-LVaGUZBMS_OyM\"",
+< "id": "TlXUqsnFsOqnOOl1ML1ATK3Tg_Rkvh98yGnHcd480ko",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:13:01.771Z",
+< "updatedAt": "2013-09-09T03:13:01.771Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/OTgtwcuuMd_vI2kpYQKzfYsrRJM\"",
+< "id": "TlXUqsnFsOq55-l_DeJRbP9a2Qn0hhKIhcciM3Zxads",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/USQuLz19F1hY3H5wIWnjS-ZOCes\"",
+< "id": "TlXUqsnFsOq55-l_DeJRbP9a2Qn0hhKIhcciM3Zxads",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:11:26.109Z",
+< "updatedAt": "2013-09-09T03:11:26.109Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/X2AvyzDyJhxHjTNt2Vwuwqd9TSE\"",
+< "id": "TlXUqsnFsOpcyvw2w-4XsB3jEJbg0HlDJyLVyC9zIag",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/fH0YN67bCwMk6FPRFDxkKQl3gFo\"",
+< "id": "TlXUqsnFsOpcyvw2w-4XsB3jEJbg0HlDJyLVyC9zIag",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:11:23.828Z",
+< "updatedAt": "2013-09-09T03:11:23.828Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/LMw3P6TOlbF2AKcdF6Bft3cht0k\"",
+< "id": "TlXUqsnFsOrTvv-3CC8q1VypAd8Kl0ZwCiZKXJPF2a4",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/GfuHL-FjI--HU0J6c8139piwBh0\"",
+< "id": "TlXUqsnFsOrTvv-3CC8q1VypAd8Kl0ZwCiZKXJPF2a4",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:11:25.109Z",
+< "updatedAt": "2013-09-09T03:11:25.109Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/ePPlmImALUmi2ycP2k5tSAw_uro\"",
+< "id": "TlXUqsnFsOpZJ3BupFBnYXdu-RUQJbolmik2U2f_Vbc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/3NEsLzI-jXO9LDAvpZbpK7ZZgOg\"",
+< "id": "TlXUqsnFsOpZJ3BupFBnYXdu-RUQJbolmik2U2f_Vbc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:11:19.098Z",
+< "updatedAt": "2013-09-09T03:11:19.098Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/c9tCqTgywFbJ8-HgLxP21HkYZ78\"",
+< "id": "TlXUqsnFsOrFmGUChwJRQfbeExIOMopmsmnP62kLew8",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/fqXHOJkSS4dFJPlc50ncbVkpXHU\"",
+< "id": "TlXUqsnFsOrFmGUChwJRQfbeExIOMopmsmnP62kLew8",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-08-02T07:44:30.449Z",
+< "updatedAt": "2013-08-02T07:44:30.449Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/hMbKDMtpJWVWwUyJOALsEKarKmU\"",
+< "id": "TlXUqsnFsOqfI1i629wf0lWd447nL-qevK37h2bw9-Y",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/RQReAaY_T3RpdsXSYXyToqKg1l0\"",
+< "id": "TlXUqsnFsOqfI1i629wf0lWd447nL-qevK37h2bw9-Y",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-08-02T07:44:23.007Z",
+< "updatedAt": "2013-08-02T07:44:23.007Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/8l70Kt9LDuYgVgDqVyCS_7WTZxA\"",
+< "id": "TlXUqsnFsOoy87dMwT2X1wYSvMygQQP6NNOAHrhoXnE",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/e5MUdSPXkRm540JZ7qBhqHyFt70\"",
+< "id": "TlXUqsnFsOoy87dMwT2X1wYSvMygQQP6NNOAHrhoXnE",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-08-02T07:43:32.190Z",
+< "updatedAt": "2013-08-02T07:43:32.190Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< }
+< ]
+< }
+
--- /dev/null
+> GET /youtube/v3/commentThreads?part=snippet&videoId=RzR2k8yo4NY HTTP/1.1
+> Soup-Debug-Timestamp: 1436524906
+> Soup-Debug: SoupSession 1 (0x764270), SoupMessage 14 (0x7f5d640833b0), SoupSocket 4 (0x7f5d6407f8c0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.rAH_Q0eNKofaqTAncnAaEB4V0WK9Txs3Z9Flw_euQ39X46jVgKMldLv1uARt2252pTEu
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436524907
+< Soup-Debug: SoupMessage 14 (0x7f5d640833b0)
+< Expires: Fri, 10 Jul 2015 10:41:47 GMT
+< Date: Fri, 10 Jul 2015 10:41:47 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/eTDHJuIDU-iTvt2LEFUReHMlcqE"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#commentThreadListResponse",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/eTDHJuIDU-iTvt2LEFUReHMlcqE\"",
+< "nextPageToken": "Cg0QpbuOprDQxgIgACgBEhQIABCgsY2ksNDGAhigvrmEot64AhgCIBQ=",
+< "pageInfo": {
+< "resultsPerPage": 20
+< },
+< "items": [
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/c_kpDFB4OelLwzyEQLrIwGt_p40\"",
+< "id": "z12os1yw2pmnwpea204chtdb2wy3vhq4uhc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/CjpKvrwrno9Eospr4aojzASO5r4\"",
+< "id": "z12os1yw2pmnwpea204chtdb2wy3vhq4uhc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.\ufeff",
+< "textOriginal": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "authorGoogleplusProfileUrl": "https://plus.google.com/113183959927163240640",
+< "canRate": true,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2015-07-10T10:41:42.308Z",
+< "updatedAt": "2015-07-10T10:41:42.308Z"
+< }
+< },
+< "canReply": true,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/MeIUWCn8mAQlUwkEwqeTuz_qPR0\"",
+< "id": "z12fyjkguzm5vj55s04chtdb2wy3vhq4uhc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/P_jPUxQNwfjwqw95THxeU3h5sUA\"",
+< "id": "z12fyjkguzm5vj55s04chtdb2wy3vhq4uhc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.\ufeff",
+< "textOriginal": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "authorGoogleplusProfileUrl": "https://plus.google.com/113183959927163240640",
+< "canRate": true,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2015-07-10T10:40:56.696Z",
+< "updatedAt": "2015-07-10T10:40:56.696Z"
+< }
+< },
+< "canReply": true,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/bDIqiUH3BHzv4TchmflkonAiLqw\"",
+< "id": "z13etv1rbt2ytxta504chtdb2wy3vhq4uhc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/-sV5aJ2UphypPjLwOYvsvNBQLJ8\"",
+< "id": "z13etv1rbt2ytxta504chtdb2wy3vhq4uhc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.\ufeff",
+< "textOriginal": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "authorGoogleplusProfileUrl": "https://plus.google.com/113183959927163240640",
+< "canRate": true,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2015-07-10T10:36:10.390Z",
+< "updatedAt": "2015-07-10T10:36:10.390Z"
+< }
+< },
+< "canReply": true,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/3RmAaZijYjXFAr561SVfK5Ix7Ck\"",
+< "id": "TlXUqsnFsOqh5zSAOQlsA6XPIoewA6iRmHOX1aqDxFY",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/ZWK7eFTRlA3WMNFx_E2xB8bn45o\"",
+< "id": "TlXUqsnFsOqh5zSAOQlsA6XPIoewA6iRmHOX1aqDxFY",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T20:26:17.862Z",
+< "updatedAt": "2013-09-09T20:26:17.862Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/-280GShlPqwXSrBiHlfPAKGS4cQ\"",
+< "id": "TlXUqsnFsOoUzYNVYOooIiIVOGJ737-0HQBT6zBAgm8",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/je4i7sJAe-2O6warPIXDVbKdrjg\"",
+< "id": "TlXUqsnFsOoUzYNVYOooIiIVOGJ737-0HQBT6zBAgm8",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T20:26:15.008Z",
+< "updatedAt": "2013-09-09T20:26:15.008Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/jKrO1yP0msWt5oBu3im_H0D3vxM\"",
+< "id": "TlXUqsnFsOrcYvCz7itsm22G_slJoOuM8Mjrv02vekY",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/bDD1D-VQ-wFT5bLY81HCtFkJfeQ\"",
+< "id": "TlXUqsnFsOrcYvCz7itsm22G_slJoOuM8Mjrv02vekY",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T20:26:12.396Z",
+< "updatedAt": "2013-09-09T20:26:12.396Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/8vlOydw59Ptq0cB5BDvTT9K-zOo\"",
+< "id": "TlXUqsnFsOpBOZXDK5KjRtoU-TiCd4V-tX7qP-_zMs8",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/jUTIEsa0bHZ-4fcOw6LAdwh5TmM\"",
+< "id": "TlXUqsnFsOpBOZXDK5KjRtoU-TiCd4V-tX7qP-_zMs8",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T20:26:00.707Z",
+< "updatedAt": "2013-09-09T20:26:00.707Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/H5GO6JKRbRliAeNZmMpc5R8CDZI\"",
+< "id": "TlXUqsnFsOr8XvFdBMJbfNH1juWIgt4mfM6OBOV951s",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/ux0fHD8SM8gjg5edNkXrQYxoQ9w\"",
+< "id": "TlXUqsnFsOr8XvFdBMJbfNH1juWIgt4mfM6OBOV951s",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T19:43:19.105Z",
+< "updatedAt": "2013-09-09T19:43:19.105Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/3PgoF-TXtKXWJ3DBEIyg_ixG7xQ\"",
+< "id": "TlXUqsnFsOrylByBk63PT7OrrchBJMW5R76_LghHwzA",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/To1vvffKNkv5fJchxUU1Xn6kL-g\"",
+< "id": "TlXUqsnFsOrylByBk63PT7OrrchBJMW5R76_LghHwzA",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T19:43:17.038Z",
+< "updatedAt": "2013-09-09T19:43:17.038Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/72SaxexOBejjygzqegWePCtLq_M\"",
+< "id": "TlXUqsnFsOpuSp_IkTgwuCd-VGpDsfzDNCIPtkv3LSo",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/G8Wrc5aWNLHaLeJku-Ut_Urxang\"",
+< "id": "TlXUqsnFsOpuSp_IkTgwuCd-VGpDsfzDNCIPtkv3LSo",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T19:43:10.173Z",
+< "updatedAt": "2013-09-09T19:43:10.173Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/XsavwQEwnBQFGgLxXpLPk1P-JZE\"",
+< "id": "TlXUqsnFsOoOSUkAjaX0QraSSeSkxs1qwjM0RSjlrZg",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/0XbskDeanb0cVyCwj0UjVA-dcu4\"",
+< "id": "TlXUqsnFsOoOSUkAjaX0QraSSeSkxs1qwjM0RSjlrZg",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:13:08.757Z",
+< "updatedAt": "2013-09-09T03:13:08.757Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/OGGrc94n9yc8uS65XkO34bByLpc\"",
+< "id": "TlXUqsnFsOownndwu4sT2CbxVD56nYlJLnqiJu45gNw",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/OQrmDGkjlZcK2w9wt-Akg9pw6Ik\"",
+< "id": "TlXUqsnFsOownndwu4sT2CbxVD56nYlJLnqiJu45gNw",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:13:07.055Z",
+< "updatedAt": "2013-09-09T03:13:07.055Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/v8puzVx3uVt9cE6FXyIBdhZmEZ4\"",
+< "id": "TlXUqsnFsOrXAnJ0gbx1BdEbVi818pryQ_unaXS-ZvM",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/PjF97wpU6UZSluy8TBBwZ0VxHBw\"",
+< "id": "TlXUqsnFsOrXAnJ0gbx1BdEbVi818pryQ_unaXS-ZvM",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:13:06.367Z",
+< "updatedAt": "2013-09-09T03:13:06.367Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/MSXG_anSkcP4MibBEiJMAOdDMmY\"",
+< "id": "TlXUqsnFsOqnOOl1ML1ATK3Tg_Rkvh98yGnHcd480ko",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/d8orQfKdbEZ1p-LVaGUZBMS_OyM\"",
+< "id": "TlXUqsnFsOqnOOl1ML1ATK3Tg_Rkvh98yGnHcd480ko",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:13:01.771Z",
+< "updatedAt": "2013-09-09T03:13:01.771Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/OTgtwcuuMd_vI2kpYQKzfYsrRJM\"",
+< "id": "TlXUqsnFsOq55-l_DeJRbP9a2Qn0hhKIhcciM3Zxads",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/USQuLz19F1hY3H5wIWnjS-ZOCes\"",
+< "id": "TlXUqsnFsOq55-l_DeJRbP9a2Qn0hhKIhcciM3Zxads",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:11:26.109Z",
+< "updatedAt": "2013-09-09T03:11:26.109Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/X2AvyzDyJhxHjTNt2Vwuwqd9TSE\"",
+< "id": "TlXUqsnFsOpcyvw2w-4XsB3jEJbg0HlDJyLVyC9zIag",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/fH0YN67bCwMk6FPRFDxkKQl3gFo\"",
+< "id": "TlXUqsnFsOpcyvw2w-4XsB3jEJbg0HlDJyLVyC9zIag",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:11:23.828Z",
+< "updatedAt": "2013-09-09T03:11:23.828Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/LMw3P6TOlbF2AKcdF6Bft3cht0k\"",
+< "id": "TlXUqsnFsOrTvv-3CC8q1VypAd8Kl0ZwCiZKXJPF2a4",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/GfuHL-FjI--HU0J6c8139piwBh0\"",
+< "id": "TlXUqsnFsOrTvv-3CC8q1VypAd8Kl0ZwCiZKXJPF2a4",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:11:25.109Z",
+< "updatedAt": "2013-09-09T03:11:25.109Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/ePPlmImALUmi2ycP2k5tSAw_uro\"",
+< "id": "TlXUqsnFsOpZJ3BupFBnYXdu-RUQJbolmik2U2f_Vbc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/3NEsLzI-jXO9LDAvpZbpK7ZZgOg\"",
+< "id": "TlXUqsnFsOpZJ3BupFBnYXdu-RUQJbolmik2U2f_Vbc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:11:19.098Z",
+< "updatedAt": "2013-09-09T03:11:19.098Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/c9tCqTgywFbJ8-HgLxP21HkYZ78\"",
+< "id": "TlXUqsnFsOrFmGUChwJRQfbeExIOMopmsmnP62kLew8",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/fqXHOJkSS4dFJPlc50ncbVkpXHU\"",
+< "id": "TlXUqsnFsOrFmGUChwJRQfbeExIOMopmsmnP62kLew8",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-08-02T07:44:30.449Z",
+< "updatedAt": "2013-08-02T07:44:30.449Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/hMbKDMtpJWVWwUyJOALsEKarKmU\"",
+< "id": "TlXUqsnFsOqfI1i629wf0lWd447nL-qevK37h2bw9-Y",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/RQReAaY_T3RpdsXSYXyToqKg1l0\"",
+< "id": "TlXUqsnFsOqfI1i629wf0lWd447nL-qevK37h2bw9-Y",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-08-02T07:44:23.007Z",
+< "updatedAt": "2013-08-02T07:44:23.007Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< }
+< ]
+< }
+
--- /dev/null
+> POST /youtube/v3/commentThreads?part=snippet&shareOnGooglePlus=false HTTP/1.1
+> Soup-Debug-Timestamp: 1436524907
+> Soup-Debug: SoupSession 1 (0x764270), SoupMessage 16 (0x7f5d640871d0), SoupSocket 5 (0x7f5d6407fb30)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.rAH_Q0eNKofaqTAncnAaEB4V0WK9Txs3Z9Flw_euQ39X46jVgKMldLv1uARt2252pTEu
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+>
+> {"kind":"youtube#commentThread","snippet":{"channelId":"UCHdu7S-LbC8V98jsR_tu6GA","videoId":"RzR2k8yo4NY","topLevelComment":{"kind":"youtube#comment","snippet":{"channelId":"UCHdu7S-LbC8V98jsR_tu6GA","videoId":"RzR2k8yo4NY","textOriginal":"This is a test comment."}}}}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436524907
+< Soup-Debug: SoupMessage 16 (0x7f5d640871d0)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Fri, 10 Jul 2015 10:41:47 GMT
+< ETag: "iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/ckRANH4fX6RIQ-tskRV1W6PheIc"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/ckRANH4fX6RIQ-tskRV1W6PheIc\"",
+< "id": "z13svjmpjvetczved23iedsrbkyvhlane",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/sUUB0qthTFYjg6qMb-VQxIRzo1w\"",
+< "id": "z13svjmpjvetczved23iedsrbkyvhlane",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "",
+< "textOriginal": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "authorGoogleplusProfileUrl": "https://plus.google.com/113183959927163240640",
+< "canRate": true,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2015-07-10T10:41:47.322Z",
+< "updatedAt": "2015-07-10T10:41:47.322Z"
+< }
+< },
+< "canReply": true,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< }
+
--- /dev/null
+> POST /youtube/v3/commentThreads?part=snippet&shareOnGooglePlus=false HTTP/1.1
+> Soup-Debug-Timestamp: 1436524908
+> Soup-Debug: SoupSession 1 (0x764270), SoupMessage 22 (0x718740), SoupSocket 10 (0x71f9e0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.rAH_Q0eNKofaqTAncnAaEB4V0WK9Txs3Z9Flw_euQ39X46jVgKMldLv1uARt2252pTEu
+> GData-Version: 2
+> Content-Type: application/json
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+>
+> {"kind":"youtube#commentThread","snippet":{"channelId":"UCHdu7S-LbC8V98jsR_tu6GA","videoId":"RzR2k8yo4NY","topLevelComment":{"kind":"youtube#comment","snippet":{"channelId":"UCHdu7S-LbC8V98jsR_tu6GA","videoId":"RzR2k8yo4NY","textOriginal":"This is a test comment."}}}}
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436524909
+< Soup-Debug: SoupMessage 22 (0x718740)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Fri, 10 Jul 2015 10:41:49 GMT
+< ETag: "iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/yNAjwjg1AWeeiPPXwtB4IIeY398"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/yNAjwjg1AWeeiPPXwtB4IIeY398\"",
+< "id": "z12fzvsrrrbmtzh4q04chtdb2wy3vhq4uhc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/bLt5hT6vXboqntLfJBIzr3S6Vlc\"",
+< "id": "z12fzvsrrrbmtzh4q04chtdb2wy3vhq4uhc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "",
+< "textOriginal": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "authorGoogleplusProfileUrl": "https://plus.google.com/113183959927163240640",
+< "canRate": true,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2015-07-10T10:41:49.093Z",
+< "updatedAt": "2015-07-10T10:41:49.093Z"
+< }
+< },
+< "canReply": true,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< }
+
--- /dev/null
+> GET /youtube/v3/commentThreads?part=snippet&videoId=RzR2k8yo4NY HTTP/1.1
+> Soup-Debug-Timestamp: 1436524903
+> Soup-Debug: SoupSession 1 (0x764270), SoupMessage 7 (0xbdf0c0), SoupSocket 2 (0x7f5d6c003780)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.rAH_Q0eNKofaqTAncnAaEB4V0WK9Txs3Z9Flw_euQ39X46jVgKMldLv1uARt2252pTEu
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436524903
+< Soup-Debug: SoupMessage 7 (0xbdf0c0)
+< Expires: Fri, 10 Jul 2015 10:41:43 GMT
+< Date: Fri, 10 Jul 2015 10:41:43 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/UDmGkWSmgNxcnVGDwKij1x4eJ8U"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#commentThreadListResponse",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/UDmGkWSmgNxcnVGDwKij1x4eJ8U\"",
+< "nextPageToken": "Cg0QiMnDpLDQxgIgACgBEhQIABCgsY2ksNDGAhigvrmEot64AhgCIBQ=",
+< "pageInfo": {
+< "resultsPerPage": 20
+< },
+< "items": [
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/c_kpDFB4OelLwzyEQLrIwGt_p40\"",
+< "id": "z12os1yw2pmnwpea204chtdb2wy3vhq4uhc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/CjpKvrwrno9Eospr4aojzASO5r4\"",
+< "id": "z12os1yw2pmnwpea204chtdb2wy3vhq4uhc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.\ufeff",
+< "textOriginal": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "authorGoogleplusProfileUrl": "https://plus.google.com/113183959927163240640",
+< "canRate": true,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2015-07-10T10:41:42.308Z",
+< "updatedAt": "2015-07-10T10:41:42.308Z"
+< }
+< },
+< "canReply": true,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/MeIUWCn8mAQlUwkEwqeTuz_qPR0\"",
+< "id": "z12fyjkguzm5vj55s04chtdb2wy3vhq4uhc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/P_jPUxQNwfjwqw95THxeU3h5sUA\"",
+< "id": "z12fyjkguzm5vj55s04chtdb2wy3vhq4uhc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.\ufeff",
+< "textOriginal": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "authorGoogleplusProfileUrl": "https://plus.google.com/113183959927163240640",
+< "canRate": true,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2015-07-10T10:40:56.696Z",
+< "updatedAt": "2015-07-10T10:40:56.696Z"
+< }
+< },
+< "canReply": true,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/bDIqiUH3BHzv4TchmflkonAiLqw\"",
+< "id": "z13etv1rbt2ytxta504chtdb2wy3vhq4uhc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/-sV5aJ2UphypPjLwOYvsvNBQLJ8\"",
+< "id": "z13etv1rbt2ytxta504chtdb2wy3vhq4uhc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.\ufeff",
+< "textOriginal": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "authorGoogleplusProfileUrl": "https://plus.google.com/113183959927163240640",
+< "canRate": true,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2015-07-10T10:36:10.390Z",
+< "updatedAt": "2015-07-10T10:36:10.390Z"
+< }
+< },
+< "canReply": true,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/3RmAaZijYjXFAr561SVfK5Ix7Ck\"",
+< "id": "TlXUqsnFsOqh5zSAOQlsA6XPIoewA6iRmHOX1aqDxFY",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/ZWK7eFTRlA3WMNFx_E2xB8bn45o\"",
+< "id": "TlXUqsnFsOqh5zSAOQlsA6XPIoewA6iRmHOX1aqDxFY",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T20:26:17.862Z",
+< "updatedAt": "2013-09-09T20:26:17.862Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/-280GShlPqwXSrBiHlfPAKGS4cQ\"",
+< "id": "TlXUqsnFsOoUzYNVYOooIiIVOGJ737-0HQBT6zBAgm8",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/je4i7sJAe-2O6warPIXDVbKdrjg\"",
+< "id": "TlXUqsnFsOoUzYNVYOooIiIVOGJ737-0HQBT6zBAgm8",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T20:26:15.008Z",
+< "updatedAt": "2013-09-09T20:26:15.008Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/jKrO1yP0msWt5oBu3im_H0D3vxM\"",
+< "id": "TlXUqsnFsOrcYvCz7itsm22G_slJoOuM8Mjrv02vekY",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/bDD1D-VQ-wFT5bLY81HCtFkJfeQ\"",
+< "id": "TlXUqsnFsOrcYvCz7itsm22G_slJoOuM8Mjrv02vekY",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T20:26:12.396Z",
+< "updatedAt": "2013-09-09T20:26:12.396Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/8vlOydw59Ptq0cB5BDvTT9K-zOo\"",
+< "id": "TlXUqsnFsOpBOZXDK5KjRtoU-TiCd4V-tX7qP-_zMs8",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/jUTIEsa0bHZ-4fcOw6LAdwh5TmM\"",
+< "id": "TlXUqsnFsOpBOZXDK5KjRtoU-TiCd4V-tX7qP-_zMs8",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T20:26:00.707Z",
+< "updatedAt": "2013-09-09T20:26:00.707Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/H5GO6JKRbRliAeNZmMpc5R8CDZI\"",
+< "id": "TlXUqsnFsOr8XvFdBMJbfNH1juWIgt4mfM6OBOV951s",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/ux0fHD8SM8gjg5edNkXrQYxoQ9w\"",
+< "id": "TlXUqsnFsOr8XvFdBMJbfNH1juWIgt4mfM6OBOV951s",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T19:43:19.105Z",
+< "updatedAt": "2013-09-09T19:43:19.105Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/3PgoF-TXtKXWJ3DBEIyg_ixG7xQ\"",
+< "id": "TlXUqsnFsOrylByBk63PT7OrrchBJMW5R76_LghHwzA",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/To1vvffKNkv5fJchxUU1Xn6kL-g\"",
+< "id": "TlXUqsnFsOrylByBk63PT7OrrchBJMW5R76_LghHwzA",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T19:43:17.038Z",
+< "updatedAt": "2013-09-09T19:43:17.038Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/72SaxexOBejjygzqegWePCtLq_M\"",
+< "id": "TlXUqsnFsOpuSp_IkTgwuCd-VGpDsfzDNCIPtkv3LSo",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/G8Wrc5aWNLHaLeJku-Ut_Urxang\"",
+< "id": "TlXUqsnFsOpuSp_IkTgwuCd-VGpDsfzDNCIPtkv3LSo",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T19:43:10.173Z",
+< "updatedAt": "2013-09-09T19:43:10.173Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/v8puzVx3uVt9cE6FXyIBdhZmEZ4\"",
+< "id": "TlXUqsnFsOrXAnJ0gbx1BdEbVi818pryQ_unaXS-ZvM",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/PjF97wpU6UZSluy8TBBwZ0VxHBw\"",
+< "id": "TlXUqsnFsOrXAnJ0gbx1BdEbVi818pryQ_unaXS-ZvM",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:13:06.367Z",
+< "updatedAt": "2013-09-09T03:13:06.367Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/OGGrc94n9yc8uS65XkO34bByLpc\"",
+< "id": "TlXUqsnFsOownndwu4sT2CbxVD56nYlJLnqiJu45gNw",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/OQrmDGkjlZcK2w9wt-Akg9pw6Ik\"",
+< "id": "TlXUqsnFsOownndwu4sT2CbxVD56nYlJLnqiJu45gNw",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:13:07.055Z",
+< "updatedAt": "2013-09-09T03:13:07.055Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/XsavwQEwnBQFGgLxXpLPk1P-JZE\"",
+< "id": "TlXUqsnFsOoOSUkAjaX0QraSSeSkxs1qwjM0RSjlrZg",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/0XbskDeanb0cVyCwj0UjVA-dcu4\"",
+< "id": "TlXUqsnFsOoOSUkAjaX0QraSSeSkxs1qwjM0RSjlrZg",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:13:08.757Z",
+< "updatedAt": "2013-09-09T03:13:08.757Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/MSXG_anSkcP4MibBEiJMAOdDMmY\"",
+< "id": "TlXUqsnFsOqnOOl1ML1ATK3Tg_Rkvh98yGnHcd480ko",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/d8orQfKdbEZ1p-LVaGUZBMS_OyM\"",
+< "id": "TlXUqsnFsOqnOOl1ML1ATK3Tg_Rkvh98yGnHcd480ko",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:13:01.771Z",
+< "updatedAt": "2013-09-09T03:13:01.771Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/OTgtwcuuMd_vI2kpYQKzfYsrRJM\"",
+< "id": "TlXUqsnFsOq55-l_DeJRbP9a2Qn0hhKIhcciM3Zxads",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/USQuLz19F1hY3H5wIWnjS-ZOCes\"",
+< "id": "TlXUqsnFsOq55-l_DeJRbP9a2Qn0hhKIhcciM3Zxads",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:11:26.109Z",
+< "updatedAt": "2013-09-09T03:11:26.109Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/X2AvyzDyJhxHjTNt2Vwuwqd9TSE\"",
+< "id": "TlXUqsnFsOpcyvw2w-4XsB3jEJbg0HlDJyLVyC9zIag",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/fH0YN67bCwMk6FPRFDxkKQl3gFo\"",
+< "id": "TlXUqsnFsOpcyvw2w-4XsB3jEJbg0HlDJyLVyC9zIag",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:11:23.828Z",
+< "updatedAt": "2013-09-09T03:11:23.828Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/LMw3P6TOlbF2AKcdF6Bft3cht0k\"",
+< "id": "TlXUqsnFsOrTvv-3CC8q1VypAd8Kl0ZwCiZKXJPF2a4",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/GfuHL-FjI--HU0J6c8139piwBh0\"",
+< "id": "TlXUqsnFsOrTvv-3CC8q1VypAd8Kl0ZwCiZKXJPF2a4",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:11:25.109Z",
+< "updatedAt": "2013-09-09T03:11:25.109Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/ePPlmImALUmi2ycP2k5tSAw_uro\"",
+< "id": "TlXUqsnFsOpZJ3BupFBnYXdu-RUQJbolmik2U2f_Vbc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/3NEsLzI-jXO9LDAvpZbpK7ZZgOg\"",
+< "id": "TlXUqsnFsOpZJ3BupFBnYXdu-RUQJbolmik2U2f_Vbc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:11:19.098Z",
+< "updatedAt": "2013-09-09T03:11:19.098Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/c9tCqTgywFbJ8-HgLxP21HkYZ78\"",
+< "id": "TlXUqsnFsOrFmGUChwJRQfbeExIOMopmsmnP62kLew8",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/fqXHOJkSS4dFJPlc50ncbVkpXHU\"",
+< "id": "TlXUqsnFsOrFmGUChwJRQfbeExIOMopmsmnP62kLew8",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-08-02T07:44:30.449Z",
+< "updatedAt": "2013-08-02T07:44:30.449Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/hMbKDMtpJWVWwUyJOALsEKarKmU\"",
+< "id": "TlXUqsnFsOqfI1i629wf0lWd447nL-qevK37h2bw9-Y",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/RQReAaY_T3RpdsXSYXyToqKg1l0\"",
+< "id": "TlXUqsnFsOqfI1i629wf0lWd447nL-qevK37h2bw9-Y",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-08-02T07:44:23.007Z",
+< "updatedAt": "2013-08-02T07:44:23.007Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< }
+< ]
+< }
+
--- /dev/null
+> GET /youtube/v3/commentThreads?part=snippet&videoId=RzR2k8yo4NY HTTP/1.1
+> Soup-Debug-Timestamp: 1436524905
+> Soup-Debug: SoupSession 1 (0x764270), SoupMessage 12 (0xabd9a0), SoupSocket 4 (0x7f5d6407f8c0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.rAH_Q0eNKofaqTAncnAaEB4V0WK9Txs3Z9Flw_euQ39X46jVgKMldLv1uARt2252pTEu
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436524906
+< Soup-Debug: SoupMessage 12 (0xabd9a0)
+< Expires: Fri, 10 Jul 2015 10:41:46 GMT
+< Date: Fri, 10 Jul 2015 10:41:46 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/LOQS0y60Tn6yj_0lbCj64eDdAO8"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#commentThreadListResponse",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/LOQS0y60Tn6yj_0lbCj64eDdAO8\"",
+< "nextPageToken": "Cg0QgL_ppbDQxgIgACgBEhQIABCgsY2ksNDGAhigvrmEot64AhgCIBQ=",
+< "pageInfo": {
+< "resultsPerPage": 20
+< },
+< "items": [
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/c_kpDFB4OelLwzyEQLrIwGt_p40\"",
+< "id": "z12os1yw2pmnwpea204chtdb2wy3vhq4uhc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/CjpKvrwrno9Eospr4aojzASO5r4\"",
+< "id": "z12os1yw2pmnwpea204chtdb2wy3vhq4uhc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.\ufeff",
+< "textOriginal": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "authorGoogleplusProfileUrl": "https://plus.google.com/113183959927163240640",
+< "canRate": true,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2015-07-10T10:41:42.308Z",
+< "updatedAt": "2015-07-10T10:41:42.308Z"
+< }
+< },
+< "canReply": true,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/MeIUWCn8mAQlUwkEwqeTuz_qPR0\"",
+< "id": "z12fyjkguzm5vj55s04chtdb2wy3vhq4uhc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/P_jPUxQNwfjwqw95THxeU3h5sUA\"",
+< "id": "z12fyjkguzm5vj55s04chtdb2wy3vhq4uhc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.\ufeff",
+< "textOriginal": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "authorGoogleplusProfileUrl": "https://plus.google.com/113183959927163240640",
+< "canRate": true,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2015-07-10T10:40:56.696Z",
+< "updatedAt": "2015-07-10T10:40:56.696Z"
+< }
+< },
+< "canReply": true,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/bDIqiUH3BHzv4TchmflkonAiLqw\"",
+< "id": "z13etv1rbt2ytxta504chtdb2wy3vhq4uhc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/-sV5aJ2UphypPjLwOYvsvNBQLJ8\"",
+< "id": "z13etv1rbt2ytxta504chtdb2wy3vhq4uhc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.\ufeff",
+< "textOriginal": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "authorGoogleplusProfileUrl": "https://plus.google.com/113183959927163240640",
+< "canRate": true,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2015-07-10T10:36:10.390Z",
+< "updatedAt": "2015-07-10T10:36:10.390Z"
+< }
+< },
+< "canReply": true,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/3RmAaZijYjXFAr561SVfK5Ix7Ck\"",
+< "id": "TlXUqsnFsOqh5zSAOQlsA6XPIoewA6iRmHOX1aqDxFY",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/ZWK7eFTRlA3WMNFx_E2xB8bn45o\"",
+< "id": "TlXUqsnFsOqh5zSAOQlsA6XPIoewA6iRmHOX1aqDxFY",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T20:26:17.862Z",
+< "updatedAt": "2013-09-09T20:26:17.862Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/-280GShlPqwXSrBiHlfPAKGS4cQ\"",
+< "id": "TlXUqsnFsOoUzYNVYOooIiIVOGJ737-0HQBT6zBAgm8",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/je4i7sJAe-2O6warPIXDVbKdrjg\"",
+< "id": "TlXUqsnFsOoUzYNVYOooIiIVOGJ737-0HQBT6zBAgm8",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T20:26:15.008Z",
+< "updatedAt": "2013-09-09T20:26:15.008Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/jKrO1yP0msWt5oBu3im_H0D3vxM\"",
+< "id": "TlXUqsnFsOrcYvCz7itsm22G_slJoOuM8Mjrv02vekY",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/bDD1D-VQ-wFT5bLY81HCtFkJfeQ\"",
+< "id": "TlXUqsnFsOrcYvCz7itsm22G_slJoOuM8Mjrv02vekY",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T20:26:12.396Z",
+< "updatedAt": "2013-09-09T20:26:12.396Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/8vlOydw59Ptq0cB5BDvTT9K-zOo\"",
+< "id": "TlXUqsnFsOpBOZXDK5KjRtoU-TiCd4V-tX7qP-_zMs8",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/jUTIEsa0bHZ-4fcOw6LAdwh5TmM\"",
+< "id": "TlXUqsnFsOpBOZXDK5KjRtoU-TiCd4V-tX7qP-_zMs8",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T20:26:00.707Z",
+< "updatedAt": "2013-09-09T20:26:00.707Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/H5GO6JKRbRliAeNZmMpc5R8CDZI\"",
+< "id": "TlXUqsnFsOr8XvFdBMJbfNH1juWIgt4mfM6OBOV951s",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/ux0fHD8SM8gjg5edNkXrQYxoQ9w\"",
+< "id": "TlXUqsnFsOr8XvFdBMJbfNH1juWIgt4mfM6OBOV951s",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T19:43:19.105Z",
+< "updatedAt": "2013-09-09T19:43:19.105Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/3PgoF-TXtKXWJ3DBEIyg_ixG7xQ\"",
+< "id": "TlXUqsnFsOrylByBk63PT7OrrchBJMW5R76_LghHwzA",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/To1vvffKNkv5fJchxUU1Xn6kL-g\"",
+< "id": "TlXUqsnFsOrylByBk63PT7OrrchBJMW5R76_LghHwzA",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T19:43:17.038Z",
+< "updatedAt": "2013-09-09T19:43:17.038Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/72SaxexOBejjygzqegWePCtLq_M\"",
+< "id": "TlXUqsnFsOpuSp_IkTgwuCd-VGpDsfzDNCIPtkv3LSo",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/G8Wrc5aWNLHaLeJku-Ut_Urxang\"",
+< "id": "TlXUqsnFsOpuSp_IkTgwuCd-VGpDsfzDNCIPtkv3LSo",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T19:43:10.173Z",
+< "updatedAt": "2013-09-09T19:43:10.173Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/XsavwQEwnBQFGgLxXpLPk1P-JZE\"",
+< "id": "TlXUqsnFsOoOSUkAjaX0QraSSeSkxs1qwjM0RSjlrZg",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/0XbskDeanb0cVyCwj0UjVA-dcu4\"",
+< "id": "TlXUqsnFsOoOSUkAjaX0QraSSeSkxs1qwjM0RSjlrZg",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:13:08.757Z",
+< "updatedAt": "2013-09-09T03:13:08.757Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/v8puzVx3uVt9cE6FXyIBdhZmEZ4\"",
+< "id": "TlXUqsnFsOrXAnJ0gbx1BdEbVi818pryQ_unaXS-ZvM",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/PjF97wpU6UZSluy8TBBwZ0VxHBw\"",
+< "id": "TlXUqsnFsOrXAnJ0gbx1BdEbVi818pryQ_unaXS-ZvM",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:13:06.367Z",
+< "updatedAt": "2013-09-09T03:13:06.367Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/OGGrc94n9yc8uS65XkO34bByLpc\"",
+< "id": "TlXUqsnFsOownndwu4sT2CbxVD56nYlJLnqiJu45gNw",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/OQrmDGkjlZcK2w9wt-Akg9pw6Ik\"",
+< "id": "TlXUqsnFsOownndwu4sT2CbxVD56nYlJLnqiJu45gNw",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:13:07.055Z",
+< "updatedAt": "2013-09-09T03:13:07.055Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/MSXG_anSkcP4MibBEiJMAOdDMmY\"",
+< "id": "TlXUqsnFsOqnOOl1ML1ATK3Tg_Rkvh98yGnHcd480ko",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/d8orQfKdbEZ1p-LVaGUZBMS_OyM\"",
+< "id": "TlXUqsnFsOqnOOl1ML1ATK3Tg_Rkvh98yGnHcd480ko",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:13:01.771Z",
+< "updatedAt": "2013-09-09T03:13:01.771Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/OTgtwcuuMd_vI2kpYQKzfYsrRJM\"",
+< "id": "TlXUqsnFsOq55-l_DeJRbP9a2Qn0hhKIhcciM3Zxads",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/USQuLz19F1hY3H5wIWnjS-ZOCes\"",
+< "id": "TlXUqsnFsOq55-l_DeJRbP9a2Qn0hhKIhcciM3Zxads",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:11:26.109Z",
+< "updatedAt": "2013-09-09T03:11:26.109Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/X2AvyzDyJhxHjTNt2Vwuwqd9TSE\"",
+< "id": "TlXUqsnFsOpcyvw2w-4XsB3jEJbg0HlDJyLVyC9zIag",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/fH0YN67bCwMk6FPRFDxkKQl3gFo\"",
+< "id": "TlXUqsnFsOpcyvw2w-4XsB3jEJbg0HlDJyLVyC9zIag",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:11:23.828Z",
+< "updatedAt": "2013-09-09T03:11:23.828Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/LMw3P6TOlbF2AKcdF6Bft3cht0k\"",
+< "id": "TlXUqsnFsOrTvv-3CC8q1VypAd8Kl0ZwCiZKXJPF2a4",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/GfuHL-FjI--HU0J6c8139piwBh0\"",
+< "id": "TlXUqsnFsOrTvv-3CC8q1VypAd8Kl0ZwCiZKXJPF2a4",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:11:25.109Z",
+< "updatedAt": "2013-09-09T03:11:25.109Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/ePPlmImALUmi2ycP2k5tSAw_uro\"",
+< "id": "TlXUqsnFsOpZJ3BupFBnYXdu-RUQJbolmik2U2f_Vbc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/3NEsLzI-jXO9LDAvpZbpK7ZZgOg\"",
+< "id": "TlXUqsnFsOpZJ3BupFBnYXdu-RUQJbolmik2U2f_Vbc",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-09-09T03:11:19.098Z",
+< "updatedAt": "2013-09-09T03:11:19.098Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/c9tCqTgywFbJ8-HgLxP21HkYZ78\"",
+< "id": "TlXUqsnFsOrFmGUChwJRQfbeExIOMopmsmnP62kLew8",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/fqXHOJkSS4dFJPlc50ncbVkpXHU\"",
+< "id": "TlXUqsnFsOrFmGUChwJRQfbeExIOMopmsmnP62kLew8",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-08-02T07:44:30.449Z",
+< "updatedAt": "2013-08-02T07:44:30.449Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< },
+< {
+< "kind": "youtube#commentThread",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/hMbKDMtpJWVWwUyJOALsEKarKmU\"",
+< "id": "TlXUqsnFsOqfI1i629wf0lWd447nL-qevK37h2bw9-Y",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "topLevelComment": {
+< "kind": "youtube#comment",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/RQReAaY_T3RpdsXSYXyToqKg1l0\"",
+< "id": "TlXUqsnFsOqfI1i629wf0lWd447nL-qevK37h2bw9-Y",
+< "snippet": {
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "videoId": "RzR2k8yo4NY",
+< "textDisplay": "This is a test comment.",
+< "authorDisplayName": "GDataTest",
+< "authorProfileImageUrl": "https://i1.ytimg.com/i/Hdu7S-LbC8V98jsR_tu6GA/1.jpg?sz=50",
+< "authorChannelUrl": "http://www.youtube.com/user/GDataTest",
+< "authorChannelId": {
+< "value": "UCHdu7S-LbC8V98jsR_tu6GA"
+< },
+< "canRate": false,
+< "viewerRating": "none",
+< "likeCount": 0,
+< "publishedAt": "2013-08-02T07:44:23.007Z",
+< "updatedAt": "2013-08-02T07:44:23.007Z"
+< }
+< },
+< "canReply": false,
+< "totalReplyCount": 0,
+< "isPublic": true
+< }
+< }
+< ]
+< }
+
--- /dev/null
+> POST /o/oauth2/token HTTP/1.1
+> Soup-Debug-Timestamp: 1430422909
+> Soup-Debug: SoupSession 1 (0xf86130), SoupMessage 1 (0x10890d0), SoupSocket 1 (0x114b120)
+> Host: accounts.google.com
+> Content-Type: application/x-www-form-urlencoded
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+>
+> client_id=352818697630-nqu2cmt5quqd6lr17ouoqmb684u84l1f.apps.googleusercontent.com&client_secret=-fA4pHQJxR3zJ-FyAMPQsikg&code=4%2FbfJsBrDEyOMNyswDmC4nL45mtuS1EP9cy3-_5AijFA4.gsGq_HYYdZcRoiIBeO6P2m_QwbIXmgI&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&grant_type=authorization_code
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1430422909
+< Soup-Debug: SoupMessage 1 (0x10890d0)
+< Content-Type: application/json; charset=utf-8
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Thu, 30 Apr 2015 19:41:49 GMT
+< Content-Disposition: attachment; filename="json.txt"; filename*=UTF-8''json.txt
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "access_token" : "ya29.ZQFwh2r2i6nupq9PDh9V5p37nYfRmYr3ZmePDKq-oalppNhBsACw-CWXGqRUbY3ZgUP6lKELuayLfQ",
+< "token_type" : "Bearer",
+< "expires_in" : 3600,
+< "refresh_token" : "1/s2ovI6XvryVRbLL-bh20RnsrotnrsX3cJwcUCz3Vh9I"
+< }
+
--- /dev/null
+> GET /youtube/v3/search?part=snippet&type=video&relatedToVideoId=q1UPMEmCqZo HTTP/1.1
+> Soup-Debug-Timestamp: 1436004620
+> Soup-Debug: SoupSession 1 (0x69c270), SoupMessage 1 (0x94baa0), SoupSocket 1 (0x65a1a0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.pgF6cVdQDCBDbCzfYEupbmjXbVjgTNRJc9ccw0SiOJzNNQmII2p1Zu4o_NjGVZR8OeasFTwEaMRKRQ
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436004620
+< Soup-Debug: SoupMessage 1 (0x94baa0)
+< Expires: Sat, 04 Jul 2015 10:10:20 GMT
+< Date: Sat, 04 Jul 2015 10:10:20 GMT
+< Cache-Control: private, max-age=120, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/C9xmN5vdBuNZQjRaf9Wi5Z1YcyY"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#searchListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/C9xmN5vdBuNZQjRaf9Wi5Z1YcyY\"",
+< "nextPageToken": "CAUQAA",
+< "pageInfo": {
+< "totalResults": 89,
+< "resultsPerPage": 5
+< },
+< "items": [
+< {
+< "kind": "youtube#searchResult",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/v9umAUUWIUKOJEySwd0NPXIww64\"",
+< "id": {
+< "kind": "youtube#video",
+< "videoId": "4lyUNs7eNhs"
+< },
+< "snippet": {
+< "publishedAt": "2011-08-24T15:08:06.000Z",
+< "channelId": "UCe86XQ4_6qafeBn0kDkeanQ",
+< "title": "Escape From City 17 - Part Two",
+< "description": "A story about the connection that grows between two people during the battle for city 17. Made in the same gritty guerrilla style as the original, it was made on a $250 budget, with a previously owned HVX200 camera, and donated/previously owned software. \n\nContacts:\n\nFor feature films David and Ian are represented at William Morris Endeavor by Dan Aloni, Simon Faber, and Philip D'Amecourt. They are managed by Bard Dorros of Anonymous Content.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/4lyUNs7eNhs/default.jpg"
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/4lyUNs7eNhs/mqdefault.jpg"
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/4lyUNs7eNhs/hqdefault.jpg"
+< }
+< },
+< "channelTitle": "PurchaseBrothers",
+< "liveBroadcastContent": "none"
+< }
+< },
+< {
+< "kind": "youtube#searchResult",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/-CaHHiPRjuwlZIKowyV_tHc41qk\"",
+< "id": {
+< "kind": "youtube#video",
+< "videoId": "MEwQPEBpRGE"
+< },
+< "snippet": {
+< "publishedAt": "2015-03-04T13:53:16.000Z",
+< "channelId": "UCx6im183dzW1krbqgmIveUQ",
+< "title": "Half-Life 2 - Cinematic Mod - Full Walkthrough -【1080p】 【Max Detail】",
+< "description": "Half-Life 2 with Cinematic Mod full walkthrough in full HD and maximum graphic detail with no commentary.\n\nOther Parts of the Half-Life Story:\n\nBlack Mesa - http://youtu.be/8utqBcQDxxE\nHalf-Life 2 Cinematic - Watching it now!\nHalf-Life 2 Episode 1 Cinematic - http://youtu.be/VFQ38rb3Sxs\nHalf-Life 2 Episode 2 Cinematic - http://youtu.be/2OBM-rA6aZE\n\nYou can download the FakeFactory Cinematic Half-Life 2 Mod here for free:\nhttp://cinematicmod.com/\n\nIf you enjoyed watching please consider donating. Creating long playthroughs is time consuming and expensive and all money donated will aid the production of future playthroughs.\nhttps://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=F9E6WTR2ELLXJ\n\nEmail: bolloxedballs@gmail.com\n\nThanks for watching. Don't forget to like, subscribe and share!",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/MEwQPEBpRGE/default.jpg"
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/MEwQPEBpRGE/mqdefault.jpg"
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/MEwQPEBpRGE/hqdefault.jpg"
+< }
+< },
+< "channelTitle": "Bolloxed",
+< "liveBroadcastContent": "none"
+< }
+< },
+< {
+< "kind": "youtube#searchResult",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/3hHD0keCEQlSP9PhT-gcxGine7A\"",
+< "id": {
+< "kind": "youtube#video",
+< "videoId": "3P6fwCnuSMY"
+< },
+< "snippet": {
+< "publishedAt": "2015-03-25T03:20:22.000Z",
+< "channelId": "UCRNCUBq676nUhXyy8AJzD5w",
+< "title": "[Vinesauce] Joel - Brutal Half Life",
+< "description": "Brutal Doom, and now Brutal Half Life? Gore galore, enjoy. Lots of asses are kicked in, literally.\nDate streamed: 24 Mar , 2015\nhttp://vinesauce.com\nhttp://www.twitch.tv/vargskelethor\nhttps://twitter.com/vinesauce\n\nFor streaming highlights:\nhttps://www.youtube.com/user/exinthevatican\nFor full streams:\nhttps://www.youtube.com/user/exinthevaticanFULL \n\nLike the stream? Draw something for the Vinebooru!\nhttp://vinesauce.booru.org/",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/3P6fwCnuSMY/default.jpg"
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/3P6fwCnuSMY/mqdefault.jpg"
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/3P6fwCnuSMY/hqdefault.jpg"
+< }
+< },
+< "channelTitle": "Exinthevatican Uncut: Full Joel Streams",
+< "liveBroadcastContent": "none"
+< }
+< },
+< {
+< "kind": "youtube#searchResult",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/Gh3qmA4PoeWOc6uaLs4RJAs9FdI\"",
+< "id": {
+< "kind": "youtube#video",
+< "videoId": "YiKcWZHeMG4"
+< },
+< "snippet": {
+< "publishedAt": "2013-10-03T17:51:03.000Z",
+< "channelId": "UCkzRDjtq4ngMADh45j2KsJQ",
+< "title": "Half-Life: Raise the Bar [Fan Film]",
+< "description": "This film is a fan-made short film inspired by the Half-Life franchise. It is intended to celebrate the game franchise and is in no way affiliated with Half-Life and Valve official works.\n\nWhen an experiment goes wrong, it unleashes a catastrophic event on the Black Mesa Research Facility. As scientists scramble to find a way out, the game's iconic weapon-- the crowbar-- finds its rightful owner.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/YiKcWZHeMG4/default.jpg"
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/YiKcWZHeMG4/mqdefault.jpg"
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/YiKcWZHeMG4/hqdefault.jpg"
+< }
+< },
+< "channelTitle": "MachinimaPrime",
+< "liveBroadcastContent": "none"
+< }
+< },
+< {
+< "kind": "youtube#searchResult",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/spD90JE1TmHIKO9W7fi8nq1hN_w\"",
+< "id": {
+< "kind": "youtube#video",
+< "videoId": "slRsexrhbG8"
+< },
+< "snippet": {
+< "publishedAt": "2007-11-01T11:30:22.000Z",
+< "channelId": "UCW3Rt1iUPaqZVtY-SErKysQ",
+< "title": "HALF LIFE IN 60 SECONDS",
+< "description": "HALF LIFE IN 60 SECONDS",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/slRsexrhbG8/default.jpg"
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/slRsexrhbG8/mqdefault.jpg"
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/slRsexrhbG8/hqdefault.jpg"
+< }
+< },
+< "channelTitle": "rompkows",
+< "liveBroadcastContent": "none"
+< }
+< }
+< ]
+< }
+
--- /dev/null
+> GET /youtube/v3/search?part=snippet&type=video&relatedToVideoId=q1UPMEmCqZo HTTP/1.1
+> Soup-Debug-Timestamp: 1436004621
+> Soup-Debug: SoupSession 1 (0x69c270), SoupMessage 3 (0x7fffd00168d0), SoupSocket 1 (0x65a1a0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.pgF6cVdQDCBDbCzfYEupbmjXbVjgTNRJc9ccw0SiOJzNNQmII2p1Zu4o_NjGVZR8OeasFTwEaMRKRQ
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436004621
+< Soup-Debug: SoupMessage 3 (0x7fffd00168d0)
+< Expires: Sat, 04 Jul 2015 10:10:21 GMT
+< Date: Sat, 04 Jul 2015 10:10:21 GMT
+< Cache-Control: private, max-age=120, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/C9xmN5vdBuNZQjRaf9Wi5Z1YcyY"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#searchListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/C9xmN5vdBuNZQjRaf9Wi5Z1YcyY\"",
+< "nextPageToken": "CAUQAA",
+< "pageInfo": {
+< "totalResults": 89,
+< "resultsPerPage": 5
+< },
+< "items": [
+< {
+< "kind": "youtube#searchResult",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/v9umAUUWIUKOJEySwd0NPXIww64\"",
+< "id": {
+< "kind": "youtube#video",
+< "videoId": "4lyUNs7eNhs"
+< },
+< "snippet": {
+< "publishedAt": "2011-08-24T15:08:06.000Z",
+< "channelId": "UCe86XQ4_6qafeBn0kDkeanQ",
+< "title": "Escape From City 17 - Part Two",
+< "description": "A story about the connection that grows between two people during the battle for city 17. Made in the same gritty guerrilla style as the original, it was made on a $250 budget, with a previously owned HVX200 camera, and donated/previously owned software. \n\nContacts:\n\nFor feature films David and Ian are represented at William Morris Endeavor by Dan Aloni, Simon Faber, and Philip D'Amecourt. They are managed by Bard Dorros of Anonymous Content.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/4lyUNs7eNhs/default.jpg"
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/4lyUNs7eNhs/mqdefault.jpg"
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/4lyUNs7eNhs/hqdefault.jpg"
+< }
+< },
+< "channelTitle": "PurchaseBrothers",
+< "liveBroadcastContent": "none"
+< }
+< },
+< {
+< "kind": "youtube#searchResult",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/-CaHHiPRjuwlZIKowyV_tHc41qk\"",
+< "id": {
+< "kind": "youtube#video",
+< "videoId": "MEwQPEBpRGE"
+< },
+< "snippet": {
+< "publishedAt": "2015-03-04T13:53:16.000Z",
+< "channelId": "UCx6im183dzW1krbqgmIveUQ",
+< "title": "Half-Life 2 - Cinematic Mod - Full Walkthrough -【1080p】 【Max Detail】",
+< "description": "Half-Life 2 with Cinematic Mod full walkthrough in full HD and maximum graphic detail with no commentary.\n\nOther Parts of the Half-Life Story:\n\nBlack Mesa - http://youtu.be/8utqBcQDxxE\nHalf-Life 2 Cinematic - Watching it now!\nHalf-Life 2 Episode 1 Cinematic - http://youtu.be/VFQ38rb3Sxs\nHalf-Life 2 Episode 2 Cinematic - http://youtu.be/2OBM-rA6aZE\n\nYou can download the FakeFactory Cinematic Half-Life 2 Mod here for free:\nhttp://cinematicmod.com/\n\nIf you enjoyed watching please consider donating. Creating long playthroughs is time consuming and expensive and all money donated will aid the production of future playthroughs.\nhttps://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=F9E6WTR2ELLXJ\n\nEmail: bolloxedballs@gmail.com\n\nThanks for watching. Don't forget to like, subscribe and share!",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/MEwQPEBpRGE/default.jpg"
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/MEwQPEBpRGE/mqdefault.jpg"
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/MEwQPEBpRGE/hqdefault.jpg"
+< }
+< },
+< "channelTitle": "Bolloxed",
+< "liveBroadcastContent": "none"
+< }
+< },
+< {
+< "kind": "youtube#searchResult",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/3hHD0keCEQlSP9PhT-gcxGine7A\"",
+< "id": {
+< "kind": "youtube#video",
+< "videoId": "3P6fwCnuSMY"
+< },
+< "snippet": {
+< "publishedAt": "2015-03-25T03:20:22.000Z",
+< "channelId": "UCRNCUBq676nUhXyy8AJzD5w",
+< "title": "[Vinesauce] Joel - Brutal Half Life",
+< "description": "Brutal Doom, and now Brutal Half Life? Gore galore, enjoy. Lots of asses are kicked in, literally.\nDate streamed: 24 Mar , 2015\nhttp://vinesauce.com\nhttp://www.twitch.tv/vargskelethor\nhttps://twitter.com/vinesauce\n\nFor streaming highlights:\nhttps://www.youtube.com/user/exinthevatican\nFor full streams:\nhttps://www.youtube.com/user/exinthevaticanFULL \n\nLike the stream? Draw something for the Vinebooru!\nhttp://vinesauce.booru.org/",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/3P6fwCnuSMY/default.jpg"
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/3P6fwCnuSMY/mqdefault.jpg"
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/3P6fwCnuSMY/hqdefault.jpg"
+< }
+< },
+< "channelTitle": "Exinthevatican Uncut: Full Joel Streams",
+< "liveBroadcastContent": "none"
+< }
+< },
+< {
+< "kind": "youtube#searchResult",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/Gh3qmA4PoeWOc6uaLs4RJAs9FdI\"",
+< "id": {
+< "kind": "youtube#video",
+< "videoId": "YiKcWZHeMG4"
+< },
+< "snippet": {
+< "publishedAt": "2013-10-03T17:51:03.000Z",
+< "channelId": "UCkzRDjtq4ngMADh45j2KsJQ",
+< "title": "Half-Life: Raise the Bar [Fan Film]",
+< "description": "This film is a fan-made short film inspired by the Half-Life franchise. It is intended to celebrate the game franchise and is in no way affiliated with Half-Life and Valve official works.\n\nWhen an experiment goes wrong, it unleashes a catastrophic event on the Black Mesa Research Facility. As scientists scramble to find a way out, the game's iconic weapon-- the crowbar-- finds its rightful owner.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/YiKcWZHeMG4/default.jpg"
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/YiKcWZHeMG4/mqdefault.jpg"
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/YiKcWZHeMG4/hqdefault.jpg"
+< }
+< },
+< "channelTitle": "MachinimaPrime",
+< "liveBroadcastContent": "none"
+< }
+< },
+< {
+< "kind": "youtube#searchResult",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/spD90JE1TmHIKO9W7fi8nq1hN_w\"",
+< "id": {
+< "kind": "youtube#video",
+< "videoId": "slRsexrhbG8"
+< },
+< "snippet": {
+< "publishedAt": "2007-11-01T11:30:22.000Z",
+< "channelId": "UCW3Rt1iUPaqZVtY-SErKysQ",
+< "title": "HALF LIFE IN 60 SECONDS",
+< "description": "HALF LIFE IN 60 SECONDS",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/slRsexrhbG8/default.jpg"
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/slRsexrhbG8/mqdefault.jpg"
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/slRsexrhbG8/hqdefault.jpg"
+< }
+< },
+< "channelTitle": "rompkows",
+< "liveBroadcastContent": "none"
+< }
+< }
+< ]
+< }
+
--- /dev/null
+> GET /youtube/v3/videos?part=contentDetails,id,recordingDetails,snippet,status,statistics&id=_LeQuMpwbW4 HTTP/1.1
+> Soup-Debug-Timestamp: 1436004902
+> Soup-Debug: SoupSession 1 (0x69c270), SoupMessage 1 (0x870aa0), SoupSocket 1 (0x65a1a0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.pgFzt-0omRqebjgH7Jw8gPEqtsByTcO2ZscLoPfwCFCABmoZfM7IRZTc5WJVBfnuM2MppoEOqU4L1A
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436004902
+< Soup-Debug: SoupMessage 1 (0x870aa0)
+< Expires: Sat, 04 Jul 2015 10:15:02 GMT
+< Date: Sat, 04 Jul 2015 10:15:02 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/j09QkgGv8ZCtf_ce6pgvDV2pG28"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#videoListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/j09QkgGv8ZCtf_ce6pgvDV2pG28\"",
+< "pageInfo": {
+< "totalResults": 1,
+< "resultsPerPage": 1
+< },
+< "items": [
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/UufoB3bglPElmftUUDeFNu4tNjg\"",
+< "id": "_LeQuMpwbW4",
+< "snippet": {
+< "publishedAt": "2009-03-24T23:03:00.000Z",
+< "channelId": "UCQJC-f4iUoHiYSEMniQRFAA",
+< "title": "Totem Movie Player",
+< "description": "The default movie player in Ubuntu is called the Totem Movie Player. I'll show you the basics of using this program and also I'll show you how to fix the flickering problems if you're using an ATI card and have compiz enabled.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/_LeQuMpwbW4/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/_LeQuMpwbW4/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/_LeQuMpwbW4/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< }
+< },
+< "channelTitle": "ubuntuhal",
+< "tags": [
+< "Ubuntu",
+< "Compiz",
+< "Totem",
+< "Movie",
+< "Player",
+< "ATI"
+< ],
+< "categoryId": "27",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Totem Movie Player",
+< "description": "The default movie player in Ubuntu is called the Totem Movie Player. I'll show you the basics of using this program and also I'll show you how to fix the flickering problems if you're using an ATI card and have compiz enabled."
+< }
+< },
+< "contentDetails": {
+< "duration": "PT4M29S",
+< "dimension": "2d",
+< "definition": "sd",
+< "caption": "false",
+< "licensedContent": false
+< },
+< "status": {
+< "uploadStatus": "processed",
+< "privacyStatus": "public",
+< "license": "youtube",
+< "embeddable": false,
+< "publicStatsViewable": false
+< },
+< "statistics": {
+< "viewCount": "2990",
+< "likeCount": "4",
+< "dislikeCount": "0",
+< "favoriteCount": "0",
+< "commentCount": "1"
+< }
+< }
+< ]
+< }
+
--- /dev/null
+> GET /youtube/v3/videos?part=snippet&chart=mostPopular&publishedAfter=2015-07-04T11%3A03%3A16.713351Z HTTP/1.1
+> Soup-Debug-Timestamp: 1436094196
+> Soup-Debug: SoupSession 1 (0x1ceb270), SoupMessage 1 (0x1f9aaa0), SoupSocket 1 (0x1ca91e0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.pwEbFxaxzNRjtsLpe_y4Qi8KtwIYgo6O-oK4YN4emaqVF4wGnVTTkBHHefv4is8C05Z79WiaRWGAxQ
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436094197
+< Soup-Debug: SoupMessage 1 (0x1f9aaa0)
+< Expires: Sun, 05 Jul 2015 11:03:17 GMT
+< Date: Sun, 05 Jul 2015 11:03:17 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/iPmj_6ofzM-Mn8nROezanPx9XZ4"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#videoListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/iPmj_6ofzM-Mn8nROezanPx9XZ4\"",
+< "nextPageToken": "CAUQAA",
+< "pageInfo": {
+< "totalResults": 30,
+< "resultsPerPage": 5
+< },
+< "items": [
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/wRvhiP8-cRIMdn5iEHkquoDnnWs\"",
+< "id": "HAnRtMEDrvU",
+< "snippet": {
+< "publishedAt": "2015-07-04T10:30:15.000Z",
+< "channelId": "UCF0t9oIvSEc7vzSj8ZF1fbQ",
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Telltale Games",
+< "tags": [
+< "Minecraft (Award-Winning Work)",
+< "Mojang (Video Game Developer)",
+< "Telltale Games (Video Game Developer)",
+< "Patton Oswalt (TV Producer)",
+< "Brian Posehn",
+< "Ashley Johnson",
+< "Scott Porter",
+< "Martha Plimpton",
+< "Corey Feldman",
+< "Corey Feldman (Celebrity)",
+< "Billy West",
+< "MineCon",
+< "Minecraft: Story Mode",
+< "Paul Reubens",
+< "PlayStation 3 (Video Game Platform)",
+< "PlayStation 4 (Video Game Platform)",
+< "Xbox 360 (Video Game Platform)",
+< "Xbox Games Store (Video Game Distribution System)",
+< "Video Game (Industry)"
+< ],
+< "categoryId": "20",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android."
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/HCzbW9TmGX_tjL-jXsRWjhqrAUQ\"",
+< "id": "Y1ndZnfZdZM",
+< "snippet": {
+< "publishedAt": "2015-07-02T23:54:50.000Z",
+< "channelId": "UCi7GJNg51C3jgmYTUwqoUXA",
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< }
+< },
+< "channelTitle": "Team Coco",
+< "tags": [
+< "Conan O'Brien",
+< "Conan",
+< "Conan (TV Series)",
+< "TBS (TV Channel)",
+< "Team Coco",
+< "Highlights",
+< "Comedy Sketches",
+< "Magic Mike",
+< "Joe Manganiello",
+< "Channing Tatum",
+< "Sona Movsesian",
+< "Remotes"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/2shteR9RuCUA3Xsopdu4AtKFg-k\"",
+< "id": "EctkLeyz8Ks",
+< "snippet": {
+< "publishedAt": "2015-07-03T07:30:01.000Z",
+< "channelId": "UCa6vGFO9ty8v5KZJXQxdhaw",
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Jimmy Kimmel Live",
+< "tags": [
+< "jimmy",
+< "jimmy kimmel",
+< "jimmy kimmel live",
+< "late night",
+< "talk show",
+< "funny",
+< "comedic",
+< "comedy",
+< "clip",
+< "comedian",
+< "fallon",
+< "jimmy fallon",
+< "colbert",
+< "stephen colbert",
+< "mean tweets",
+< "Independence Day (Holiday)",
+< "july",
+< "fourth of july",
+< "4th of july",
+< "lie witness",
+< "charlie brown",
+< "katy perry",
+< "confederate flag",
+< "james van der beek",
+< "dawson's creek",
+< "nathan fillion",
+< "donald trump",
+< "joseph gordon-levitt"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ofZUn2TDkcNOzoD7YR3X0yrlqtg\"",
+< "id": "dCV6RusogAk",
+< "snippet": {
+< "publishedAt": "2015-07-03T17:17:15.000Z",
+< "channelId": "UCXR2od6-d7g8_F038fCNDDA",
+< "title": "Nintendo Playstation Superdisc",
+< "description": "",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< }
+< },
+< "channelTitle": "dizzle521",
+< "categoryId": "22",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Nintendo Playstation Superdisc",
+< "description": ""
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ICjYKf5GE_1y6_A57XpHhaeR-wc\"",
+< "id": "E1d_dmKBiiI",
+< "snippet": {
+< "publishedAt": "2015-07-02T18:19:48.000Z",
+< "channelId": "UCW3T8dQVEynwj6-_DArcM7w",
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Rumble Viral",
+< "tags": [
+< "viral videos",
+< "funny videos",
+< "funny dogs",
+< "dog videos",
+< "dog snitches on friend",
+< "dog tells on other dog",
+< "french bulldog",
+< "bull mastiff"
+< ],
+< "categoryId": "15",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com."
+< }
+< }
+< }
+< ]
+< }
+
--- /dev/null
+> GET /youtube/v3/videos?part=snippet&chart=mostPopular&publishedAfter=2015-07-04T11%3A03%3A17.622025Z HTTP/1.1
+> Soup-Debug-Timestamp: 1436094197
+> Soup-Debug: SoupSession 1 (0x1ceb270), SoupMessage 4 (0x7f9a340168c0), SoupSocket 1 (0x1ca91e0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.pwEbFxaxzNRjtsLpe_y4Qi8KtwIYgo6O-oK4YN4emaqVF4wGnVTTkBHHefv4is8C05Z79WiaRWGAxQ
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436094197
+< Soup-Debug: SoupMessage 4 (0x7f9a340168c0)
+< Expires: Sun, 05 Jul 2015 11:03:17 GMT
+< Date: Sun, 05 Jul 2015 11:03:17 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/ezp4LZ7B07YCW-oW1TbddTxA1Jg"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#videoListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ezp4LZ7B07YCW-oW1TbddTxA1Jg\"",
+< "nextPageToken": "CAUQAA",
+< "pageInfo": {
+< "totalResults": 30,
+< "resultsPerPage": 5
+< },
+< "items": [
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/wRvhiP8-cRIMdn5iEHkquoDnnWs\"",
+< "id": "HAnRtMEDrvU",
+< "snippet": {
+< "publishedAt": "2015-07-04T10:30:15.000Z",
+< "channelId": "UCF0t9oIvSEc7vzSj8ZF1fbQ",
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Telltale Games",
+< "tags": [
+< "Minecraft (Award-Winning Work)",
+< "Mojang (Video Game Developer)",
+< "Telltale Games (Video Game Developer)",
+< "Patton Oswalt (TV Producer)",
+< "Brian Posehn",
+< "Ashley Johnson",
+< "Scott Porter",
+< "Martha Plimpton",
+< "Corey Feldman",
+< "Corey Feldman (Celebrity)",
+< "Billy West",
+< "MineCon",
+< "Minecraft: Story Mode",
+< "Paul Reubens",
+< "PlayStation 3 (Video Game Platform)",
+< "PlayStation 4 (Video Game Platform)",
+< "Xbox 360 (Video Game Platform)",
+< "Xbox Games Store (Video Game Distribution System)",
+< "Video Game (Industry)"
+< ],
+< "categoryId": "20",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android."
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/HCzbW9TmGX_tjL-jXsRWjhqrAUQ\"",
+< "id": "Y1ndZnfZdZM",
+< "snippet": {
+< "publishedAt": "2015-07-02T23:54:50.000Z",
+< "channelId": "UCi7GJNg51C3jgmYTUwqoUXA",
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< }
+< },
+< "channelTitle": "Team Coco",
+< "tags": [
+< "Conan O'Brien",
+< "Conan",
+< "Conan (TV Series)",
+< "TBS (TV Channel)",
+< "Team Coco",
+< "Highlights",
+< "Comedy Sketches",
+< "Magic Mike",
+< "Joe Manganiello",
+< "Channing Tatum",
+< "Sona Movsesian",
+< "Remotes"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/2shteR9RuCUA3Xsopdu4AtKFg-k\"",
+< "id": "EctkLeyz8Ks",
+< "snippet": {
+< "publishedAt": "2015-07-03T07:30:01.000Z",
+< "channelId": "UCa6vGFO9ty8v5KZJXQxdhaw",
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Jimmy Kimmel Live",
+< "tags": [
+< "jimmy",
+< "jimmy kimmel",
+< "jimmy kimmel live",
+< "late night",
+< "talk show",
+< "funny",
+< "comedic",
+< "comedy",
+< "clip",
+< "comedian",
+< "fallon",
+< "jimmy fallon",
+< "colbert",
+< "stephen colbert",
+< "mean tweets",
+< "Independence Day (Holiday)",
+< "july",
+< "fourth of july",
+< "4th of july",
+< "lie witness",
+< "charlie brown",
+< "katy perry",
+< "confederate flag",
+< "james van der beek",
+< "dawson's creek",
+< "nathan fillion",
+< "donald trump",
+< "joseph gordon-levitt"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ofZUn2TDkcNOzoD7YR3X0yrlqtg\"",
+< "id": "dCV6RusogAk",
+< "snippet": {
+< "publishedAt": "2015-07-03T17:17:15.000Z",
+< "channelId": "UCXR2od6-d7g8_F038fCNDDA",
+< "title": "Nintendo Playstation Superdisc",
+< "description": "",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< }
+< },
+< "channelTitle": "dizzle521",
+< "categoryId": "22",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Nintendo Playstation Superdisc",
+< "description": ""
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ICjYKf5GE_1y6_A57XpHhaeR-wc\"",
+< "id": "E1d_dmKBiiI",
+< "snippet": {
+< "publishedAt": "2015-07-02T18:19:48.000Z",
+< "channelId": "UCW3T8dQVEynwj6-_DArcM7w",
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Rumble Viral",
+< "tags": [
+< "viral videos",
+< "funny videos",
+< "funny dogs",
+< "dog videos",
+< "dog snitches on friend",
+< "dog tells on other dog",
+< "french bulldog",
+< "bull mastiff"
+< ],
+< "categoryId": "15",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com."
+< }
+< }
+< }
+< ]
+< }
+
--- /dev/null
+> GET /youtube/v3/videos?part=snippet&chart=mostPopular&publishedAfter=2015-07-04T11%3A03%3A17.243663Z&safeSearch=none HTTP/1.1
+> Soup-Debug-Timestamp: 1436094197
+> Soup-Debug: SoupSession 1 (0x1ceb270), SoupMessage 2 (0x1f9ac80), SoupSocket 1 (0x1ca91e0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.pwEbFxaxzNRjtsLpe_y4Qi8KtwIYgo6O-oK4YN4emaqVF4wGnVTTkBHHefv4is8C05Z79WiaRWGAxQ
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436094197
+< Soup-Debug: SoupMessage 2 (0x1f9ac80)
+< Expires: Sun, 05 Jul 2015 11:03:17 GMT
+< Date: Sun, 05 Jul 2015 11:03:17 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/q2ogXrvARItq0hvpS9slxrLYQ4A"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#videoListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/q2ogXrvARItq0hvpS9slxrLYQ4A\"",
+< "nextPageToken": "CAUQAA",
+< "pageInfo": {
+< "totalResults": 30,
+< "resultsPerPage": 5
+< },
+< "items": [
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/wRvhiP8-cRIMdn5iEHkquoDnnWs\"",
+< "id": "HAnRtMEDrvU",
+< "snippet": {
+< "publishedAt": "2015-07-04T10:30:15.000Z",
+< "channelId": "UCF0t9oIvSEc7vzSj8ZF1fbQ",
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Telltale Games",
+< "tags": [
+< "Minecraft (Award-Winning Work)",
+< "Mojang (Video Game Developer)",
+< "Telltale Games (Video Game Developer)",
+< "Patton Oswalt (TV Producer)",
+< "Brian Posehn",
+< "Ashley Johnson",
+< "Scott Porter",
+< "Martha Plimpton",
+< "Corey Feldman",
+< "Corey Feldman (Celebrity)",
+< "Billy West",
+< "MineCon",
+< "Minecraft: Story Mode",
+< "Paul Reubens",
+< "PlayStation 3 (Video Game Platform)",
+< "PlayStation 4 (Video Game Platform)",
+< "Xbox 360 (Video Game Platform)",
+< "Xbox Games Store (Video Game Distribution System)",
+< "Video Game (Industry)"
+< ],
+< "categoryId": "20",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android."
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/HCzbW9TmGX_tjL-jXsRWjhqrAUQ\"",
+< "id": "Y1ndZnfZdZM",
+< "snippet": {
+< "publishedAt": "2015-07-02T23:54:50.000Z",
+< "channelId": "UCi7GJNg51C3jgmYTUwqoUXA",
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< }
+< },
+< "channelTitle": "Team Coco",
+< "tags": [
+< "Conan O'Brien",
+< "Conan",
+< "Conan (TV Series)",
+< "TBS (TV Channel)",
+< "Team Coco",
+< "Highlights",
+< "Comedy Sketches",
+< "Magic Mike",
+< "Joe Manganiello",
+< "Channing Tatum",
+< "Sona Movsesian",
+< "Remotes"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/2shteR9RuCUA3Xsopdu4AtKFg-k\"",
+< "id": "EctkLeyz8Ks",
+< "snippet": {
+< "publishedAt": "2015-07-03T07:30:01.000Z",
+< "channelId": "UCa6vGFO9ty8v5KZJXQxdhaw",
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Jimmy Kimmel Live",
+< "tags": [
+< "jimmy",
+< "jimmy kimmel",
+< "jimmy kimmel live",
+< "late night",
+< "talk show",
+< "funny",
+< "comedic",
+< "comedy",
+< "clip",
+< "comedian",
+< "fallon",
+< "jimmy fallon",
+< "colbert",
+< "stephen colbert",
+< "mean tweets",
+< "Independence Day (Holiday)",
+< "july",
+< "fourth of july",
+< "4th of july",
+< "lie witness",
+< "charlie brown",
+< "katy perry",
+< "confederate flag",
+< "james van der beek",
+< "dawson's creek",
+< "nathan fillion",
+< "donald trump",
+< "joseph gordon-levitt"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ofZUn2TDkcNOzoD7YR3X0yrlqtg\"",
+< "id": "dCV6RusogAk",
+< "snippet": {
+< "publishedAt": "2015-07-03T17:17:15.000Z",
+< "channelId": "UCXR2od6-d7g8_F038fCNDDA",
+< "title": "Nintendo Playstation Superdisc",
+< "description": "",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< }
+< },
+< "channelTitle": "dizzle521",
+< "categoryId": "22",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Nintendo Playstation Superdisc",
+< "description": ""
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ICjYKf5GE_1y6_A57XpHhaeR-wc\"",
+< "id": "E1d_dmKBiiI",
+< "snippet": {
+< "publishedAt": "2015-07-02T18:19:48.000Z",
+< "channelId": "UCW3T8dQVEynwj6-_DArcM7w",
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Rumble Viral",
+< "tags": [
+< "viral videos",
+< "funny videos",
+< "funny dogs",
+< "dog videos",
+< "dog snitches on friend",
+< "dog tells on other dog",
+< "french bulldog",
+< "bull mastiff"
+< ],
+< "categoryId": "15",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com."
+< }
+< }
+< }
+< ]
+< }
+
--- /dev/null
+> GET /youtube/v3/videos?part=snippet&chart=mostPopular&publishedAfter=2015-07-04T10%3A59%3A26.163311Z HTTP/1.1
+> Soup-Debug-Timestamp: 1436093966
+> Soup-Debug: SoupSession 1 (0x2558270), SoupMessage 1 (0x2636aa0), SoupSocket 1 (0x2516370)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.pwGUS2OLP2LzkWNPg3L_ZGMe9sgyYU0gaeGWGOFWGz8FQfzgB3gIY0zqIwTI1W9wrCE01DdfeIxE7A
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436093966
+< Soup-Debug: SoupMessage 1 (0x2636aa0)
+< Expires: Sun, 05 Jul 2015 10:59:26 GMT
+< Date: Sun, 05 Jul 2015 10:59:26 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/ZYlPuRt1yTXsYlmAIFnxVxqamT4"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#videoListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ZYlPuRt1yTXsYlmAIFnxVxqamT4\"",
+< "nextPageToken": "CAUQAA",
+< "pageInfo": {
+< "totalResults": 30,
+< "resultsPerPage": 5
+< },
+< "items": [
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/wRvhiP8-cRIMdn5iEHkquoDnnWs\"",
+< "id": "HAnRtMEDrvU",
+< "snippet": {
+< "publishedAt": "2015-07-04T10:30:15.000Z",
+< "channelId": "UCF0t9oIvSEc7vzSj8ZF1fbQ",
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Telltale Games",
+< "tags": [
+< "Minecraft (Award-Winning Work)",
+< "Mojang (Video Game Developer)",
+< "Telltale Games (Video Game Developer)",
+< "Patton Oswalt (TV Producer)",
+< "Brian Posehn",
+< "Ashley Johnson",
+< "Scott Porter",
+< "Martha Plimpton",
+< "Corey Feldman",
+< "Corey Feldman (Celebrity)",
+< "Billy West",
+< "MineCon",
+< "Minecraft: Story Mode",
+< "Paul Reubens",
+< "PlayStation 3 (Video Game Platform)",
+< "PlayStation 4 (Video Game Platform)",
+< "Xbox 360 (Video Game Platform)",
+< "Xbox Games Store (Video Game Distribution System)",
+< "Video Game (Industry)"
+< ],
+< "categoryId": "20",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android."
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/HCzbW9TmGX_tjL-jXsRWjhqrAUQ\"",
+< "id": "Y1ndZnfZdZM",
+< "snippet": {
+< "publishedAt": "2015-07-02T23:54:50.000Z",
+< "channelId": "UCi7GJNg51C3jgmYTUwqoUXA",
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< }
+< },
+< "channelTitle": "Team Coco",
+< "tags": [
+< "Conan O'Brien",
+< "Conan",
+< "Conan (TV Series)",
+< "TBS (TV Channel)",
+< "Team Coco",
+< "Highlights",
+< "Comedy Sketches",
+< "Magic Mike",
+< "Joe Manganiello",
+< "Channing Tatum",
+< "Sona Movsesian",
+< "Remotes"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/2shteR9RuCUA3Xsopdu4AtKFg-k\"",
+< "id": "EctkLeyz8Ks",
+< "snippet": {
+< "publishedAt": "2015-07-03T07:30:01.000Z",
+< "channelId": "UCa6vGFO9ty8v5KZJXQxdhaw",
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Jimmy Kimmel Live",
+< "tags": [
+< "jimmy",
+< "jimmy kimmel",
+< "jimmy kimmel live",
+< "late night",
+< "talk show",
+< "funny",
+< "comedic",
+< "comedy",
+< "clip",
+< "comedian",
+< "fallon",
+< "jimmy fallon",
+< "colbert",
+< "stephen colbert",
+< "mean tweets",
+< "Independence Day (Holiday)",
+< "july",
+< "fourth of july",
+< "4th of july",
+< "lie witness",
+< "charlie brown",
+< "katy perry",
+< "confederate flag",
+< "james van der beek",
+< "dawson's creek",
+< "nathan fillion",
+< "donald trump",
+< "joseph gordon-levitt"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ofZUn2TDkcNOzoD7YR3X0yrlqtg\"",
+< "id": "dCV6RusogAk",
+< "snippet": {
+< "publishedAt": "2015-07-03T17:17:15.000Z",
+< "channelId": "UCXR2od6-d7g8_F038fCNDDA",
+< "title": "Nintendo Playstation Superdisc",
+< "description": "",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< }
+< },
+< "channelTitle": "dizzle521",
+< "categoryId": "22",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Nintendo Playstation Superdisc",
+< "description": ""
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ICjYKf5GE_1y6_A57XpHhaeR-wc\"",
+< "id": "E1d_dmKBiiI",
+< "snippet": {
+< "publishedAt": "2015-07-02T18:19:48.000Z",
+< "channelId": "UCW3T8dQVEynwj6-_DArcM7w",
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Rumble Viral",
+< "tags": [
+< "viral videos",
+< "funny videos",
+< "funny dogs",
+< "dog videos",
+< "dog snitches on friend",
+< "dog tells on other dog",
+< "french bulldog",
+< "bull mastiff"
+< ],
+< "categoryId": "15",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com."
+< }
+< }
+< }
+< ]
+< }
+
+> GET /youtube/v3/videos?part=snippet&chart=mostPopular&publishedAfter=2015-07-04T10%3A59%3A26.442088Z HTTP/1.1
+> Soup-Debug-Timestamp: 1436093966
+> Soup-Debug: SoupSession 1 (0x2558270), SoupMessage 2 (0x2636c80), SoupSocket 1 (0x2516370)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.pwGUS2OLP2LzkWNPg3L_ZGMe9sgyYU0gaeGWGOFWGz8FQfzgB3gIY0zqIwTI1W9wrCE01DdfeIxE7A
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436093966
+< Soup-Debug: SoupMessage 2 (0x2636c80)
+< Expires: Sun, 05 Jul 2015 10:59:26 GMT
+< Date: Sun, 05 Jul 2015 10:59:26 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/q2ogXrvARItq0hvpS9slxrLYQ4A"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#videoListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/q2ogXrvARItq0hvpS9slxrLYQ4A\"",
+< "nextPageToken": "CAUQAA",
+< "pageInfo": {
+< "totalResults": 30,
+< "resultsPerPage": 5
+< },
+< "items": [
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/wRvhiP8-cRIMdn5iEHkquoDnnWs\"",
+< "id": "HAnRtMEDrvU",
+< "snippet": {
+< "publishedAt": "2015-07-04T10:30:15.000Z",
+< "channelId": "UCF0t9oIvSEc7vzSj8ZF1fbQ",
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Telltale Games",
+< "tags": [
+< "Minecraft (Award-Winning Work)",
+< "Mojang (Video Game Developer)",
+< "Telltale Games (Video Game Developer)",
+< "Patton Oswalt (TV Producer)",
+< "Brian Posehn",
+< "Ashley Johnson",
+< "Scott Porter",
+< "Martha Plimpton",
+< "Corey Feldman",
+< "Corey Feldman (Celebrity)",
+< "Billy West",
+< "MineCon",
+< "Minecraft: Story Mode",
+< "Paul Reubens",
+< "PlayStation 3 (Video Game Platform)",
+< "PlayStation 4 (Video Game Platform)",
+< "Xbox 360 (Video Game Platform)",
+< "Xbox Games Store (Video Game Distribution System)",
+< "Video Game (Industry)"
+< ],
+< "categoryId": "20",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android."
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/HCzbW9TmGX_tjL-jXsRWjhqrAUQ\"",
+< "id": "Y1ndZnfZdZM",
+< "snippet": {
+< "publishedAt": "2015-07-02T23:54:50.000Z",
+< "channelId": "UCi7GJNg51C3jgmYTUwqoUXA",
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< }
+< },
+< "channelTitle": "Team Coco",
+< "tags": [
+< "Conan O'Brien",
+< "Conan",
+< "Conan (TV Series)",
+< "TBS (TV Channel)",
+< "Team Coco",
+< "Highlights",
+< "Comedy Sketches",
+< "Magic Mike",
+< "Joe Manganiello",
+< "Channing Tatum",
+< "Sona Movsesian",
+< "Remotes"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/2shteR9RuCUA3Xsopdu4AtKFg-k\"",
+< "id": "EctkLeyz8Ks",
+< "snippet": {
+< "publishedAt": "2015-07-03T07:30:01.000Z",
+< "channelId": "UCa6vGFO9ty8v5KZJXQxdhaw",
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Jimmy Kimmel Live",
+< "tags": [
+< "jimmy",
+< "jimmy kimmel",
+< "jimmy kimmel live",
+< "late night",
+< "talk show",
+< "funny",
+< "comedic",
+< "comedy",
+< "clip",
+< "comedian",
+< "fallon",
+< "jimmy fallon",
+< "colbert",
+< "stephen colbert",
+< "mean tweets",
+< "Independence Day (Holiday)",
+< "july",
+< "fourth of july",
+< "4th of july",
+< "lie witness",
+< "charlie brown",
+< "katy perry",
+< "confederate flag",
+< "james van der beek",
+< "dawson's creek",
+< "nathan fillion",
+< "donald trump",
+< "joseph gordon-levitt"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ofZUn2TDkcNOzoD7YR3X0yrlqtg\"",
+< "id": "dCV6RusogAk",
+< "snippet": {
+< "publishedAt": "2015-07-03T17:17:15.000Z",
+< "channelId": "UCXR2od6-d7g8_F038fCNDDA",
+< "title": "Nintendo Playstation Superdisc",
+< "description": "",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< }
+< },
+< "channelTitle": "dizzle521",
+< "categoryId": "22",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Nintendo Playstation Superdisc",
+< "description": ""
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ICjYKf5GE_1y6_A57XpHhaeR-wc\"",
+< "id": "E1d_dmKBiiI",
+< "snippet": {
+< "publishedAt": "2015-07-02T18:19:48.000Z",
+< "channelId": "UCW3T8dQVEynwj6-_DArcM7w",
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Rumble Viral",
+< "tags": [
+< "viral videos",
+< "funny videos",
+< "funny dogs",
+< "dog videos",
+< "dog snitches on friend",
+< "dog tells on other dog",
+< "french bulldog",
+< "bull mastiff"
+< ],
+< "categoryId": "15",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com."
+< }
+< }
+< }
+< ]
+< }
+
+> GET /youtube/v3/videos?part=snippet&chart=mostPopular&publishedAfter=2015-07-04T10%3A59%3A26.599691Z HTTP/1.1
+> Soup-Debug-Timestamp: 1436093966
+> Soup-Debug: SoupSession 1 (0x2558270), SoupMessage 3 (0x2636c80), SoupSocket 1 (0x2516370)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.pwGUS2OLP2LzkWNPg3L_ZGMe9sgyYU0gaeGWGOFWGz8FQfzgB3gIY0zqIwTI1W9wrCE01DdfeIxE7A
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436093966
+< Soup-Debug: SoupMessage 3 (0x2636c80)
+< Expires: Sun, 05 Jul 2015 10:59:26 GMT
+< Date: Sun, 05 Jul 2015 10:59:26 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/EqA7gvCz0SkY8EydbKOk_BRm80Q"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#videoListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/EqA7gvCz0SkY8EydbKOk_BRm80Q\"",
+< "nextPageToken": "CAUQAA",
+< "pageInfo": {
+< "totalResults": 30,
+< "resultsPerPage": 5
+< },
+< "items": [
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/wRvhiP8-cRIMdn5iEHkquoDnnWs\"",
+< "id": "HAnRtMEDrvU",
+< "snippet": {
+< "publishedAt": "2015-07-04T10:30:15.000Z",
+< "channelId": "UCF0t9oIvSEc7vzSj8ZF1fbQ",
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Telltale Games",
+< "tags": [
+< "Minecraft (Award-Winning Work)",
+< "Mojang (Video Game Developer)",
+< "Telltale Games (Video Game Developer)",
+< "Patton Oswalt (TV Producer)",
+< "Brian Posehn",
+< "Ashley Johnson",
+< "Scott Porter",
+< "Martha Plimpton",
+< "Corey Feldman",
+< "Corey Feldman (Celebrity)",
+< "Billy West",
+< "MineCon",
+< "Minecraft: Story Mode",
+< "Paul Reubens",
+< "PlayStation 3 (Video Game Platform)",
+< "PlayStation 4 (Video Game Platform)",
+< "Xbox 360 (Video Game Platform)",
+< "Xbox Games Store (Video Game Distribution System)",
+< "Video Game (Industry)"
+< ],
+< "categoryId": "20",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android."
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/HCzbW9TmGX_tjL-jXsRWjhqrAUQ\"",
+< "id": "Y1ndZnfZdZM",
+< "snippet": {
+< "publishedAt": "2015-07-02T23:54:50.000Z",
+< "channelId": "UCi7GJNg51C3jgmYTUwqoUXA",
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< }
+< },
+< "channelTitle": "Team Coco",
+< "tags": [
+< "Conan O'Brien",
+< "Conan",
+< "Conan (TV Series)",
+< "TBS (TV Channel)",
+< "Team Coco",
+< "Highlights",
+< "Comedy Sketches",
+< "Magic Mike",
+< "Joe Manganiello",
+< "Channing Tatum",
+< "Sona Movsesian",
+< "Remotes"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/2shteR9RuCUA3Xsopdu4AtKFg-k\"",
+< "id": "EctkLeyz8Ks",
+< "snippet": {
+< "publishedAt": "2015-07-03T07:30:01.000Z",
+< "channelId": "UCa6vGFO9ty8v5KZJXQxdhaw",
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Jimmy Kimmel Live",
+< "tags": [
+< "jimmy",
+< "jimmy kimmel",
+< "jimmy kimmel live",
+< "late night",
+< "talk show",
+< "funny",
+< "comedic",
+< "comedy",
+< "clip",
+< "comedian",
+< "fallon",
+< "jimmy fallon",
+< "colbert",
+< "stephen colbert",
+< "mean tweets",
+< "Independence Day (Holiday)",
+< "july",
+< "fourth of july",
+< "4th of july",
+< "lie witness",
+< "charlie brown",
+< "katy perry",
+< "confederate flag",
+< "james van der beek",
+< "dawson's creek",
+< "nathan fillion",
+< "donald trump",
+< "joseph gordon-levitt"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ofZUn2TDkcNOzoD7YR3X0yrlqtg\"",
+< "id": "dCV6RusogAk",
+< "snippet": {
+< "publishedAt": "2015-07-03T17:17:15.000Z",
+< "channelId": "UCXR2od6-d7g8_F038fCNDDA",
+< "title": "Nintendo Playstation Superdisc",
+< "description": "",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< }
+< },
+< "channelTitle": "dizzle521",
+< "categoryId": "22",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Nintendo Playstation Superdisc",
+< "description": ""
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ICjYKf5GE_1y6_A57XpHhaeR-wc\"",
+< "id": "E1d_dmKBiiI",
+< "snippet": {
+< "publishedAt": "2015-07-02T18:19:48.000Z",
+< "channelId": "UCW3T8dQVEynwj6-_DArcM7w",
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Rumble Viral",
+< "tags": [
+< "viral videos",
+< "funny videos",
+< "funny dogs",
+< "dog videos",
+< "dog snitches on friend",
+< "dog tells on other dog",
+< "french bulldog",
+< "bull mastiff"
+< ],
+< "categoryId": "15",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com."
+< }
+< }
+< }
+< ]
+< }
+
+> GET /youtube/v3/videos?part=snippet&chart=mostPopular HTTP/1.1
+> Soup-Debug-Timestamp: 1436093966
+> Soup-Debug: SoupSession 1 (0x2558270), SoupMessage 4 (0x2636aa0), SoupSocket 1 (0x2516370)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.pwGUS2OLP2LzkWNPg3L_ZGMe9sgyYU0gaeGWGOFWGz8FQfzgB3gIY0zqIwTI1W9wrCE01DdfeIxE7A
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436093966
+< Soup-Debug: SoupMessage 4 (0x2636aa0)
+< Expires: Sun, 05 Jul 2015 10:59:26 GMT
+< Date: Sun, 05 Jul 2015 10:59:26 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/3OjiqX4toXqpdPa4f_4_gbG-iSQ"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#videoListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/3OjiqX4toXqpdPa4f_4_gbG-iSQ\"",
+< "nextPageToken": "CAUQAA",
+< "pageInfo": {
+< "totalResults": 30,
+< "resultsPerPage": 5
+< },
+< "items": [
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/wRvhiP8-cRIMdn5iEHkquoDnnWs\"",
+< "id": "HAnRtMEDrvU",
+< "snippet": {
+< "publishedAt": "2015-07-04T10:30:15.000Z",
+< "channelId": "UCF0t9oIvSEc7vzSj8ZF1fbQ",
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Telltale Games",
+< "tags": [
+< "Minecraft (Award-Winning Work)",
+< "Mojang (Video Game Developer)",
+< "Telltale Games (Video Game Developer)",
+< "Patton Oswalt (TV Producer)",
+< "Brian Posehn",
+< "Ashley Johnson",
+< "Scott Porter",
+< "Martha Plimpton",
+< "Corey Feldman",
+< "Corey Feldman (Celebrity)",
+< "Billy West",
+< "MineCon",
+< "Minecraft: Story Mode",
+< "Paul Reubens",
+< "PlayStation 3 (Video Game Platform)",
+< "PlayStation 4 (Video Game Platform)",
+< "Xbox 360 (Video Game Platform)",
+< "Xbox Games Store (Video Game Distribution System)",
+< "Video Game (Industry)"
+< ],
+< "categoryId": "20",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android."
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/HCzbW9TmGX_tjL-jXsRWjhqrAUQ\"",
+< "id": "Y1ndZnfZdZM",
+< "snippet": {
+< "publishedAt": "2015-07-02T23:54:50.000Z",
+< "channelId": "UCi7GJNg51C3jgmYTUwqoUXA",
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< }
+< },
+< "channelTitle": "Team Coco",
+< "tags": [
+< "Conan O'Brien",
+< "Conan",
+< "Conan (TV Series)",
+< "TBS (TV Channel)",
+< "Team Coco",
+< "Highlights",
+< "Comedy Sketches",
+< "Magic Mike",
+< "Joe Manganiello",
+< "Channing Tatum",
+< "Sona Movsesian",
+< "Remotes"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/2shteR9RuCUA3Xsopdu4AtKFg-k\"",
+< "id": "EctkLeyz8Ks",
+< "snippet": {
+< "publishedAt": "2015-07-03T07:30:01.000Z",
+< "channelId": "UCa6vGFO9ty8v5KZJXQxdhaw",
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Jimmy Kimmel Live",
+< "tags": [
+< "jimmy",
+< "jimmy kimmel",
+< "jimmy kimmel live",
+< "late night",
+< "talk show",
+< "funny",
+< "comedic",
+< "comedy",
+< "clip",
+< "comedian",
+< "fallon",
+< "jimmy fallon",
+< "colbert",
+< "stephen colbert",
+< "mean tweets",
+< "Independence Day (Holiday)",
+< "july",
+< "fourth of july",
+< "4th of july",
+< "lie witness",
+< "charlie brown",
+< "katy perry",
+< "confederate flag",
+< "james van der beek",
+< "dawson's creek",
+< "nathan fillion",
+< "donald trump",
+< "joseph gordon-levitt"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ofZUn2TDkcNOzoD7YR3X0yrlqtg\"",
+< "id": "dCV6RusogAk",
+< "snippet": {
+< "publishedAt": "2015-07-03T17:17:15.000Z",
+< "channelId": "UCXR2od6-d7g8_F038fCNDDA",
+< "title": "Nintendo Playstation Superdisc",
+< "description": "",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< }
+< },
+< "channelTitle": "dizzle521",
+< "categoryId": "22",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Nintendo Playstation Superdisc",
+< "description": ""
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ICjYKf5GE_1y6_A57XpHhaeR-wc\"",
+< "id": "E1d_dmKBiiI",
+< "snippet": {
+< "publishedAt": "2015-07-02T18:19:48.000Z",
+< "channelId": "UCW3T8dQVEynwj6-_DArcM7w",
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Rumble Viral",
+< "tags": [
+< "viral videos",
+< "funny videos",
+< "funny dogs",
+< "dog videos",
+< "dog snitches on friend",
+< "dog tells on other dog",
+< "french bulldog",
+< "bull mastiff"
+< ],
+< "categoryId": "15",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com."
+< }
+< }
+< }
+< ]
+< }
+
+> GET /youtube/v3/videos?part=snippet&chart=mostPopular&publishedAfter=2015-07-04T10%3A59%3A26.944578Z HTTP/1.1
+> Soup-Debug-Timestamp: 1436093966
+> Soup-Debug: SoupSession 1 (0x2558270), SoupMessage 5 (0x26368c0), SoupSocket 1 (0x2516370)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.pwGUS2OLP2LzkWNPg3L_ZGMe9sgyYU0gaeGWGOFWGz8FQfzgB3gIY0zqIwTI1W9wrCE01DdfeIxE7A
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436093967
+< Soup-Debug: SoupMessage 5 (0x26368c0)
+< Expires: Sun, 05 Jul 2015 10:59:27 GMT
+< Date: Sun, 05 Jul 2015 10:59:27 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/NsWaQqdK70alKA2GfnL3DNKVlH8"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#videoListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/NsWaQqdK70alKA2GfnL3DNKVlH8\"",
+< "nextPageToken": "CAUQAA",
+< "pageInfo": {
+< "totalResults": 30,
+< "resultsPerPage": 5
+< },
+< "items": [
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/wRvhiP8-cRIMdn5iEHkquoDnnWs\"",
+< "id": "HAnRtMEDrvU",
+< "snippet": {
+< "publishedAt": "2015-07-04T10:30:15.000Z",
+< "channelId": "UCF0t9oIvSEc7vzSj8ZF1fbQ",
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Telltale Games",
+< "tags": [
+< "Minecraft (Award-Winning Work)",
+< "Mojang (Video Game Developer)",
+< "Telltale Games (Video Game Developer)",
+< "Patton Oswalt (TV Producer)",
+< "Brian Posehn",
+< "Ashley Johnson",
+< "Scott Porter",
+< "Martha Plimpton",
+< "Corey Feldman",
+< "Corey Feldman (Celebrity)",
+< "Billy West",
+< "MineCon",
+< "Minecraft: Story Mode",
+< "Paul Reubens",
+< "PlayStation 3 (Video Game Platform)",
+< "PlayStation 4 (Video Game Platform)",
+< "Xbox 360 (Video Game Platform)",
+< "Xbox Games Store (Video Game Distribution System)",
+< "Video Game (Industry)"
+< ],
+< "categoryId": "20",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android."
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/HCzbW9TmGX_tjL-jXsRWjhqrAUQ\"",
+< "id": "Y1ndZnfZdZM",
+< "snippet": {
+< "publishedAt": "2015-07-02T23:54:50.000Z",
+< "channelId": "UCi7GJNg51C3jgmYTUwqoUXA",
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< }
+< },
+< "channelTitle": "Team Coco",
+< "tags": [
+< "Conan O'Brien",
+< "Conan",
+< "Conan (TV Series)",
+< "TBS (TV Channel)",
+< "Team Coco",
+< "Highlights",
+< "Comedy Sketches",
+< "Magic Mike",
+< "Joe Manganiello",
+< "Channing Tatum",
+< "Sona Movsesian",
+< "Remotes"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/2shteR9RuCUA3Xsopdu4AtKFg-k\"",
+< "id": "EctkLeyz8Ks",
+< "snippet": {
+< "publishedAt": "2015-07-03T07:30:01.000Z",
+< "channelId": "UCa6vGFO9ty8v5KZJXQxdhaw",
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Jimmy Kimmel Live",
+< "tags": [
+< "jimmy",
+< "jimmy kimmel",
+< "jimmy kimmel live",
+< "late night",
+< "talk show",
+< "funny",
+< "comedic",
+< "comedy",
+< "clip",
+< "comedian",
+< "fallon",
+< "jimmy fallon",
+< "colbert",
+< "stephen colbert",
+< "mean tweets",
+< "Independence Day (Holiday)",
+< "july",
+< "fourth of july",
+< "4th of july",
+< "lie witness",
+< "charlie brown",
+< "katy perry",
+< "confederate flag",
+< "james van der beek",
+< "dawson's creek",
+< "nathan fillion",
+< "donald trump",
+< "joseph gordon-levitt"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ofZUn2TDkcNOzoD7YR3X0yrlqtg\"",
+< "id": "dCV6RusogAk",
+< "snippet": {
+< "publishedAt": "2015-07-03T17:17:15.000Z",
+< "channelId": "UCXR2od6-d7g8_F038fCNDDA",
+< "title": "Nintendo Playstation Superdisc",
+< "description": "",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< }
+< },
+< "channelTitle": "dizzle521",
+< "categoryId": "22",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Nintendo Playstation Superdisc",
+< "description": ""
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ICjYKf5GE_1y6_A57XpHhaeR-wc\"",
+< "id": "E1d_dmKBiiI",
+< "snippet": {
+< "publishedAt": "2015-07-02T18:19:48.000Z",
+< "channelId": "UCW3T8dQVEynwj6-_DArcM7w",
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Rumble Viral",
+< "tags": [
+< "viral videos",
+< "funny videos",
+< "funny dogs",
+< "dog videos",
+< "dog snitches on friend",
+< "dog tells on other dog",
+< "french bulldog",
+< "bull mastiff"
+< ],
+< "categoryId": "15",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com."
+< }
+< }
+< }
+< ]
+< }
+
+> GET /youtube/v3/videos?part=snippet&chart=mostPopular&publishedAfter=2015-07-04T10%3A59%3A27.066478Z HTTP/1.1
+> Soup-Debug-Timestamp: 1436093967
+> Soup-Debug: SoupSession 1 (0x2558270), SoupMessage 6 (0x26368c0), SoupSocket 1 (0x2516370)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.pwGUS2OLP2LzkWNPg3L_ZGMe9sgyYU0gaeGWGOFWGz8FQfzgB3gIY0zqIwTI1W9wrCE01DdfeIxE7A
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436093967
+< Soup-Debug: SoupMessage 6 (0x26368c0)
+< Expires: Sun, 05 Jul 2015 10:59:27 GMT
+< Date: Sun, 05 Jul 2015 10:59:27 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/nY1L0NGz3R_U1BgTl1yRnQe2u0Y"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#videoListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/nY1L0NGz3R_U1BgTl1yRnQe2u0Y\"",
+< "nextPageToken": "CAUQAA",
+< "pageInfo": {
+< "totalResults": 30,
+< "resultsPerPage": 5
+< },
+< "items": [
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/wRvhiP8-cRIMdn5iEHkquoDnnWs\"",
+< "id": "HAnRtMEDrvU",
+< "snippet": {
+< "publishedAt": "2015-07-04T10:30:15.000Z",
+< "channelId": "UCF0t9oIvSEc7vzSj8ZF1fbQ",
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Telltale Games",
+< "tags": [
+< "Minecraft (Award-Winning Work)",
+< "Mojang (Video Game Developer)",
+< "Telltale Games (Video Game Developer)",
+< "Patton Oswalt (TV Producer)",
+< "Brian Posehn",
+< "Ashley Johnson",
+< "Scott Porter",
+< "Martha Plimpton",
+< "Corey Feldman",
+< "Corey Feldman (Celebrity)",
+< "Billy West",
+< "MineCon",
+< "Minecraft: Story Mode",
+< "Paul Reubens",
+< "PlayStation 3 (Video Game Platform)",
+< "PlayStation 4 (Video Game Platform)",
+< "Xbox 360 (Video Game Platform)",
+< "Xbox Games Store (Video Game Distribution System)",
+< "Video Game (Industry)"
+< ],
+< "categoryId": "20",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android."
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/HCzbW9TmGX_tjL-jXsRWjhqrAUQ\"",
+< "id": "Y1ndZnfZdZM",
+< "snippet": {
+< "publishedAt": "2015-07-02T23:54:50.000Z",
+< "channelId": "UCi7GJNg51C3jgmYTUwqoUXA",
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< }
+< },
+< "channelTitle": "Team Coco",
+< "tags": [
+< "Conan O'Brien",
+< "Conan",
+< "Conan (TV Series)",
+< "TBS (TV Channel)",
+< "Team Coco",
+< "Highlights",
+< "Comedy Sketches",
+< "Magic Mike",
+< "Joe Manganiello",
+< "Channing Tatum",
+< "Sona Movsesian",
+< "Remotes"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/2shteR9RuCUA3Xsopdu4AtKFg-k\"",
+< "id": "EctkLeyz8Ks",
+< "snippet": {
+< "publishedAt": "2015-07-03T07:30:01.000Z",
+< "channelId": "UCa6vGFO9ty8v5KZJXQxdhaw",
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Jimmy Kimmel Live",
+< "tags": [
+< "jimmy",
+< "jimmy kimmel",
+< "jimmy kimmel live",
+< "late night",
+< "talk show",
+< "funny",
+< "comedic",
+< "comedy",
+< "clip",
+< "comedian",
+< "fallon",
+< "jimmy fallon",
+< "colbert",
+< "stephen colbert",
+< "mean tweets",
+< "Independence Day (Holiday)",
+< "july",
+< "fourth of july",
+< "4th of july",
+< "lie witness",
+< "charlie brown",
+< "katy perry",
+< "confederate flag",
+< "james van der beek",
+< "dawson's creek",
+< "nathan fillion",
+< "donald trump",
+< "joseph gordon-levitt"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ofZUn2TDkcNOzoD7YR3X0yrlqtg\"",
+< "id": "dCV6RusogAk",
+< "snippet": {
+< "publishedAt": "2015-07-03T17:17:15.000Z",
+< "channelId": "UCXR2od6-d7g8_F038fCNDDA",
+< "title": "Nintendo Playstation Superdisc",
+< "description": "",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< }
+< },
+< "channelTitle": "dizzle521",
+< "categoryId": "22",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Nintendo Playstation Superdisc",
+< "description": ""
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ICjYKf5GE_1y6_A57XpHhaeR-wc\"",
+< "id": "E1d_dmKBiiI",
+< "snippet": {
+< "publishedAt": "2015-07-02T18:19:48.000Z",
+< "channelId": "UCW3T8dQVEynwj6-_DArcM7w",
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Rumble Viral",
+< "tags": [
+< "viral videos",
+< "funny videos",
+< "funny dogs",
+< "dog videos",
+< "dog snitches on friend",
+< "dog tells on other dog",
+< "french bulldog",
+< "bull mastiff"
+< ],
+< "categoryId": "15",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com."
+< }
+< }
+< }
+< ]
+< }
+
+> GET /youtube/v3/videos?part=snippet&chart=mostPopular&publishedAfter=2015-07-04T10%3A59%3A27.249053Z HTTP/1.1
+> Soup-Debug-Timestamp: 1436093967
+> Soup-Debug: SoupSession 1 (0x2558270), SoupMessage 7 (0x2636aa0), SoupSocket 1 (0x2516370)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.pwGUS2OLP2LzkWNPg3L_ZGMe9sgyYU0gaeGWGOFWGz8FQfzgB3gIY0zqIwTI1W9wrCE01DdfeIxE7A
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436093967
+< Soup-Debug: SoupMessage 7 (0x2636aa0)
+< Expires: Sun, 05 Jul 2015 10:59:27 GMT
+< Date: Sun, 05 Jul 2015 10:59:27 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/-2VLRvT2cAu_m7Awy9j1O27zRig"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#videoListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/-2VLRvT2cAu_m7Awy9j1O27zRig\"",
+< "nextPageToken": "CAUQAA",
+< "pageInfo": {
+< "totalResults": 30,
+< "resultsPerPage": 5
+< },
+< "items": [
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/wRvhiP8-cRIMdn5iEHkquoDnnWs\"",
+< "id": "HAnRtMEDrvU",
+< "snippet": {
+< "publishedAt": "2015-07-04T10:30:15.000Z",
+< "channelId": "UCF0t9oIvSEc7vzSj8ZF1fbQ",
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Telltale Games",
+< "tags": [
+< "Minecraft (Award-Winning Work)",
+< "Mojang (Video Game Developer)",
+< "Telltale Games (Video Game Developer)",
+< "Patton Oswalt (TV Producer)",
+< "Brian Posehn",
+< "Ashley Johnson",
+< "Scott Porter",
+< "Martha Plimpton",
+< "Corey Feldman",
+< "Corey Feldman (Celebrity)",
+< "Billy West",
+< "MineCon",
+< "Minecraft: Story Mode",
+< "Paul Reubens",
+< "PlayStation 3 (Video Game Platform)",
+< "PlayStation 4 (Video Game Platform)",
+< "Xbox 360 (Video Game Platform)",
+< "Xbox Games Store (Video Game Distribution System)",
+< "Video Game (Industry)"
+< ],
+< "categoryId": "20",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android."
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/HCzbW9TmGX_tjL-jXsRWjhqrAUQ\"",
+< "id": "Y1ndZnfZdZM",
+< "snippet": {
+< "publishedAt": "2015-07-02T23:54:50.000Z",
+< "channelId": "UCi7GJNg51C3jgmYTUwqoUXA",
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< }
+< },
+< "channelTitle": "Team Coco",
+< "tags": [
+< "Conan O'Brien",
+< "Conan",
+< "Conan (TV Series)",
+< "TBS (TV Channel)",
+< "Team Coco",
+< "Highlights",
+< "Comedy Sketches",
+< "Magic Mike",
+< "Joe Manganiello",
+< "Channing Tatum",
+< "Sona Movsesian",
+< "Remotes"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/2shteR9RuCUA3Xsopdu4AtKFg-k\"",
+< "id": "EctkLeyz8Ks",
+< "snippet": {
+< "publishedAt": "2015-07-03T07:30:01.000Z",
+< "channelId": "UCa6vGFO9ty8v5KZJXQxdhaw",
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Jimmy Kimmel Live",
+< "tags": [
+< "jimmy",
+< "jimmy kimmel",
+< "jimmy kimmel live",
+< "late night",
+< "talk show",
+< "funny",
+< "comedic",
+< "comedy",
+< "clip",
+< "comedian",
+< "fallon",
+< "jimmy fallon",
+< "colbert",
+< "stephen colbert",
+< "mean tweets",
+< "Independence Day (Holiday)",
+< "july",
+< "fourth of july",
+< "4th of july",
+< "lie witness",
+< "charlie brown",
+< "katy perry",
+< "confederate flag",
+< "james van der beek",
+< "dawson's creek",
+< "nathan fillion",
+< "donald trump",
+< "joseph gordon-levitt"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ofZUn2TDkcNOzoD7YR3X0yrlqtg\"",
+< "id": "dCV6RusogAk",
+< "snippet": {
+< "publishedAt": "2015-07-03T17:17:15.000Z",
+< "channelId": "UCXR2od6-d7g8_F038fCNDDA",
+< "title": "Nintendo Playstation Superdisc",
+< "description": "",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< }
+< },
+< "channelTitle": "dizzle521",
+< "categoryId": "22",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Nintendo Playstation Superdisc",
+< "description": ""
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ICjYKf5GE_1y6_A57XpHhaeR-wc\"",
+< "id": "E1d_dmKBiiI",
+< "snippet": {
+< "publishedAt": "2015-07-02T18:19:48.000Z",
+< "channelId": "UCW3T8dQVEynwj6-_DArcM7w",
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Rumble Viral",
+< "tags": [
+< "viral videos",
+< "funny videos",
+< "funny dogs",
+< "dog videos",
+< "dog snitches on friend",
+< "dog tells on other dog",
+< "french bulldog",
+< "bull mastiff"
+< ],
+< "categoryId": "15",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com."
+< }
+< }
+< }
+< ]
+< }
+
+> GET /youtube/v3/videos?part=snippet&chart=mostPopular&publishedAfter=2015-07-04T10%3A59%3A27.400652Z HTTP/1.1
+> Soup-Debug-Timestamp: 1436093967
+> Soup-Debug: SoupSession 1 (0x2558270), SoupMessage 8 (0x2636c80), SoupSocket 1 (0x2516370)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.pwGUS2OLP2LzkWNPg3L_ZGMe9sgyYU0gaeGWGOFWGz8FQfzgB3gIY0zqIwTI1W9wrCE01DdfeIxE7A
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436093967
+< Soup-Debug: SoupMessage 8 (0x2636c80)
+< Expires: Sun, 05 Jul 2015 10:59:27 GMT
+< Date: Sun, 05 Jul 2015 10:59:27 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/BEX1dm69qvL_Tna2OTyyZ7OGRw8"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#videoListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/BEX1dm69qvL_Tna2OTyyZ7OGRw8\"",
+< "nextPageToken": "CAUQAA",
+< "pageInfo": {
+< "totalResults": 30,
+< "resultsPerPage": 5
+< },
+< "items": [
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/wRvhiP8-cRIMdn5iEHkquoDnnWs\"",
+< "id": "HAnRtMEDrvU",
+< "snippet": {
+< "publishedAt": "2015-07-04T10:30:15.000Z",
+< "channelId": "UCF0t9oIvSEc7vzSj8ZF1fbQ",
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Telltale Games",
+< "tags": [
+< "Minecraft (Award-Winning Work)",
+< "Mojang (Video Game Developer)",
+< "Telltale Games (Video Game Developer)",
+< "Patton Oswalt (TV Producer)",
+< "Brian Posehn",
+< "Ashley Johnson",
+< "Scott Porter",
+< "Martha Plimpton",
+< "Corey Feldman",
+< "Corey Feldman (Celebrity)",
+< "Billy West",
+< "MineCon",
+< "Minecraft: Story Mode",
+< "Paul Reubens",
+< "PlayStation 3 (Video Game Platform)",
+< "PlayStation 4 (Video Game Platform)",
+< "Xbox 360 (Video Game Platform)",
+< "Xbox Games Store (Video Game Distribution System)",
+< "Video Game (Industry)"
+< ],
+< "categoryId": "20",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android."
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/HCzbW9TmGX_tjL-jXsRWjhqrAUQ\"",
+< "id": "Y1ndZnfZdZM",
+< "snippet": {
+< "publishedAt": "2015-07-02T23:54:50.000Z",
+< "channelId": "UCi7GJNg51C3jgmYTUwqoUXA",
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< }
+< },
+< "channelTitle": "Team Coco",
+< "tags": [
+< "Conan O'Brien",
+< "Conan",
+< "Conan (TV Series)",
+< "TBS (TV Channel)",
+< "Team Coco",
+< "Highlights",
+< "Comedy Sketches",
+< "Magic Mike",
+< "Joe Manganiello",
+< "Channing Tatum",
+< "Sona Movsesian",
+< "Remotes"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/2shteR9RuCUA3Xsopdu4AtKFg-k\"",
+< "id": "EctkLeyz8Ks",
+< "snippet": {
+< "publishedAt": "2015-07-03T07:30:01.000Z",
+< "channelId": "UCa6vGFO9ty8v5KZJXQxdhaw",
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Jimmy Kimmel Live",
+< "tags": [
+< "jimmy",
+< "jimmy kimmel",
+< "jimmy kimmel live",
+< "late night",
+< "talk show",
+< "funny",
+< "comedic",
+< "comedy",
+< "clip",
+< "comedian",
+< "fallon",
+< "jimmy fallon",
+< "colbert",
+< "stephen colbert",
+< "mean tweets",
+< "Independence Day (Holiday)",
+< "july",
+< "fourth of july",
+< "4th of july",
+< "lie witness",
+< "charlie brown",
+< "katy perry",
+< "confederate flag",
+< "james van der beek",
+< "dawson's creek",
+< "nathan fillion",
+< "donald trump",
+< "joseph gordon-levitt"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ofZUn2TDkcNOzoD7YR3X0yrlqtg\"",
+< "id": "dCV6RusogAk",
+< "snippet": {
+< "publishedAt": "2015-07-03T17:17:15.000Z",
+< "channelId": "UCXR2od6-d7g8_F038fCNDDA",
+< "title": "Nintendo Playstation Superdisc",
+< "description": "",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< }
+< },
+< "channelTitle": "dizzle521",
+< "categoryId": "22",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Nintendo Playstation Superdisc",
+< "description": ""
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ICjYKf5GE_1y6_A57XpHhaeR-wc\"",
+< "id": "E1d_dmKBiiI",
+< "snippet": {
+< "publishedAt": "2015-07-02T18:19:48.000Z",
+< "channelId": "UCW3T8dQVEynwj6-_DArcM7w",
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Rumble Viral",
+< "tags": [
+< "viral videos",
+< "funny videos",
+< "funny dogs",
+< "dog videos",
+< "dog snitches on friend",
+< "dog tells on other dog",
+< "french bulldog",
+< "bull mastiff"
+< ],
+< "categoryId": "15",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com."
+< }
+< }
+< }
+< ]
+< }
+
+> GET /youtube/v3/videos?part=snippet&chart=mostPopular&publishedAfter=2015-07-04T10%3A59%3A27.620565Z HTTP/1.1
+> Soup-Debug-Timestamp: 1436093967
+> Soup-Debug: SoupSession 1 (0x2558270), SoupMessage 9 (0x2636c80), SoupSocket 1 (0x2516370)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.pwGUS2OLP2LzkWNPg3L_ZGMe9sgyYU0gaeGWGOFWGz8FQfzgB3gIY0zqIwTI1W9wrCE01DdfeIxE7A
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436093967
+< Soup-Debug: SoupMessage 9 (0x2636c80)
+< Expires: Sun, 05 Jul 2015 10:59:27 GMT
+< Date: Sun, 05 Jul 2015 10:59:27 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/Qt1ofOV4ifQB9b49Nkqw7XqC_pc"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#videoListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/Qt1ofOV4ifQB9b49Nkqw7XqC_pc\"",
+< "nextPageToken": "CAUQAA",
+< "pageInfo": {
+< "totalResults": 30,
+< "resultsPerPage": 5
+< },
+< "items": [
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/wRvhiP8-cRIMdn5iEHkquoDnnWs\"",
+< "id": "HAnRtMEDrvU",
+< "snippet": {
+< "publishedAt": "2015-07-04T10:30:15.000Z",
+< "channelId": "UCF0t9oIvSEc7vzSj8ZF1fbQ",
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Telltale Games",
+< "tags": [
+< "Minecraft (Award-Winning Work)",
+< "Mojang (Video Game Developer)",
+< "Telltale Games (Video Game Developer)",
+< "Patton Oswalt (TV Producer)",
+< "Brian Posehn",
+< "Ashley Johnson",
+< "Scott Porter",
+< "Martha Plimpton",
+< "Corey Feldman",
+< "Corey Feldman (Celebrity)",
+< "Billy West",
+< "MineCon",
+< "Minecraft: Story Mode",
+< "Paul Reubens",
+< "PlayStation 3 (Video Game Platform)",
+< "PlayStation 4 (Video Game Platform)",
+< "Xbox 360 (Video Game Platform)",
+< "Xbox Games Store (Video Game Distribution System)",
+< "Video Game (Industry)"
+< ],
+< "categoryId": "20",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android."
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/HCzbW9TmGX_tjL-jXsRWjhqrAUQ\"",
+< "id": "Y1ndZnfZdZM",
+< "snippet": {
+< "publishedAt": "2015-07-02T23:54:50.000Z",
+< "channelId": "UCi7GJNg51C3jgmYTUwqoUXA",
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< }
+< },
+< "channelTitle": "Team Coco",
+< "tags": [
+< "Conan O'Brien",
+< "Conan",
+< "Conan (TV Series)",
+< "TBS (TV Channel)",
+< "Team Coco",
+< "Highlights",
+< "Comedy Sketches",
+< "Magic Mike",
+< "Joe Manganiello",
+< "Channing Tatum",
+< "Sona Movsesian",
+< "Remotes"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/2shteR9RuCUA3Xsopdu4AtKFg-k\"",
+< "id": "EctkLeyz8Ks",
+< "snippet": {
+< "publishedAt": "2015-07-03T07:30:01.000Z",
+< "channelId": "UCa6vGFO9ty8v5KZJXQxdhaw",
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Jimmy Kimmel Live",
+< "tags": [
+< "jimmy",
+< "jimmy kimmel",
+< "jimmy kimmel live",
+< "late night",
+< "talk show",
+< "funny",
+< "comedic",
+< "comedy",
+< "clip",
+< "comedian",
+< "fallon",
+< "jimmy fallon",
+< "colbert",
+< "stephen colbert",
+< "mean tweets",
+< "Independence Day (Holiday)",
+< "july",
+< "fourth of july",
+< "4th of july",
+< "lie witness",
+< "charlie brown",
+< "katy perry",
+< "confederate flag",
+< "james van der beek",
+< "dawson's creek",
+< "nathan fillion",
+< "donald trump",
+< "joseph gordon-levitt"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ofZUn2TDkcNOzoD7YR3X0yrlqtg\"",
+< "id": "dCV6RusogAk",
+< "snippet": {
+< "publishedAt": "2015-07-03T17:17:15.000Z",
+< "channelId": "UCXR2od6-d7g8_F038fCNDDA",
+< "title": "Nintendo Playstation Superdisc",
+< "description": "",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< }
+< },
+< "channelTitle": "dizzle521",
+< "categoryId": "22",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Nintendo Playstation Superdisc",
+< "description": ""
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ICjYKf5GE_1y6_A57XpHhaeR-wc\"",
+< "id": "E1d_dmKBiiI",
+< "snippet": {
+< "publishedAt": "2015-07-02T18:19:48.000Z",
+< "channelId": "UCW3T8dQVEynwj6-_DArcM7w",
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Rumble Viral",
+< "tags": [
+< "viral videos",
+< "funny videos",
+< "funny dogs",
+< "dog videos",
+< "dog snitches on friend",
+< "dog tells on other dog",
+< "french bulldog",
+< "bull mastiff"
+< ],
+< "categoryId": "15",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com."
+< }
+< }
+< }
+< ]
+< }
+
+> GET /youtube/v3/videos?part=snippet&chart=mostPopular&publishedAfter=2015-07-04T10%3A59%3A27.804939Z HTTP/1.1
+> Soup-Debug-Timestamp: 1436093967
+> Soup-Debug: SoupSession 1 (0x2558270), SoupMessage 10 (0x2636aa0), SoupSocket 1 (0x2516370)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.pwGUS2OLP2LzkWNPg3L_ZGMe9sgyYU0gaeGWGOFWGz8FQfzgB3gIY0zqIwTI1W9wrCE01DdfeIxE7A
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436093967
+< Soup-Debug: SoupMessage 10 (0x2636aa0)
+< Expires: Sun, 05 Jul 2015 10:59:27 GMT
+< Date: Sun, 05 Jul 2015 10:59:27 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/0CHkQzzYhX8d7aS6uNc9HwUqvlc"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#videoListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/0CHkQzzYhX8d7aS6uNc9HwUqvlc\"",
+< "nextPageToken": "CAUQAA",
+< "pageInfo": {
+< "totalResults": 30,
+< "resultsPerPage": 5
+< },
+< "items": [
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/wRvhiP8-cRIMdn5iEHkquoDnnWs\"",
+< "id": "HAnRtMEDrvU",
+< "snippet": {
+< "publishedAt": "2015-07-04T10:30:15.000Z",
+< "channelId": "UCF0t9oIvSEc7vzSj8ZF1fbQ",
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Telltale Games",
+< "tags": [
+< "Minecraft (Award-Winning Work)",
+< "Mojang (Video Game Developer)",
+< "Telltale Games (Video Game Developer)",
+< "Patton Oswalt (TV Producer)",
+< "Brian Posehn",
+< "Ashley Johnson",
+< "Scott Porter",
+< "Martha Plimpton",
+< "Corey Feldman",
+< "Corey Feldman (Celebrity)",
+< "Billy West",
+< "MineCon",
+< "Minecraft: Story Mode",
+< "Paul Reubens",
+< "PlayStation 3 (Video Game Platform)",
+< "PlayStation 4 (Video Game Platform)",
+< "Xbox 360 (Video Game Platform)",
+< "Xbox Games Store (Video Game Distribution System)",
+< "Video Game (Industry)"
+< ],
+< "categoryId": "20",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android."
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/HCzbW9TmGX_tjL-jXsRWjhqrAUQ\"",
+< "id": "Y1ndZnfZdZM",
+< "snippet": {
+< "publishedAt": "2015-07-02T23:54:50.000Z",
+< "channelId": "UCi7GJNg51C3jgmYTUwqoUXA",
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< }
+< },
+< "channelTitle": "Team Coco",
+< "tags": [
+< "Conan O'Brien",
+< "Conan",
+< "Conan (TV Series)",
+< "TBS (TV Channel)",
+< "Team Coco",
+< "Highlights",
+< "Comedy Sketches",
+< "Magic Mike",
+< "Joe Manganiello",
+< "Channing Tatum",
+< "Sona Movsesian",
+< "Remotes"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/2shteR9RuCUA3Xsopdu4AtKFg-k\"",
+< "id": "EctkLeyz8Ks",
+< "snippet": {
+< "publishedAt": "2015-07-03T07:30:01.000Z",
+< "channelId": "UCa6vGFO9ty8v5KZJXQxdhaw",
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Jimmy Kimmel Live",
+< "tags": [
+< "jimmy",
+< "jimmy kimmel",
+< "jimmy kimmel live",
+< "late night",
+< "talk show",
+< "funny",
+< "comedic",
+< "comedy",
+< "clip",
+< "comedian",
+< "fallon",
+< "jimmy fallon",
+< "colbert",
+< "stephen colbert",
+< "mean tweets",
+< "Independence Day (Holiday)",
+< "july",
+< "fourth of july",
+< "4th of july",
+< "lie witness",
+< "charlie brown",
+< "katy perry",
+< "confederate flag",
+< "james van der beek",
+< "dawson's creek",
+< "nathan fillion",
+< "donald trump",
+< "joseph gordon-levitt"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ofZUn2TDkcNOzoD7YR3X0yrlqtg\"",
+< "id": "dCV6RusogAk",
+< "snippet": {
+< "publishedAt": "2015-07-03T17:17:15.000Z",
+< "channelId": "UCXR2od6-d7g8_F038fCNDDA",
+< "title": "Nintendo Playstation Superdisc",
+< "description": "",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< }
+< },
+< "channelTitle": "dizzle521",
+< "categoryId": "22",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Nintendo Playstation Superdisc",
+< "description": ""
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ICjYKf5GE_1y6_A57XpHhaeR-wc\"",
+< "id": "E1d_dmKBiiI",
+< "snippet": {
+< "publishedAt": "2015-07-02T18:19:48.000Z",
+< "channelId": "UCW3T8dQVEynwj6-_DArcM7w",
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Rumble Viral",
+< "tags": [
+< "viral videos",
+< "funny videos",
+< "funny dogs",
+< "dog videos",
+< "dog snitches on friend",
+< "dog tells on other dog",
+< "french bulldog",
+< "bull mastiff"
+< ],
+< "categoryId": "15",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com."
+< }
+< }
+< }
+< ]
+< }
+
--- /dev/null
+> GET /youtube/v3/search?part=snippet&type=video&relatedToVideoId=q1UPMEmCqZo HTTP/1.1
+> Soup-Debug-Timestamp: 1436004621
+> Soup-Debug: SoupSession 1 (0x69c270), SoupMessage 2 (0x94be60), SoupSocket 1 (0x65a1a0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.pgF6cVdQDCBDbCzfYEupbmjXbVjgTNRJc9ccw0SiOJzNNQmII2p1Zu4o_NjGVZR8OeasFTwEaMRKRQ
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436004621
+< Soup-Debug: SoupMessage 2 (0x94be60)
+< Expires: Sat, 04 Jul 2015 10:10:21 GMT
+< Date: Sat, 04 Jul 2015 10:10:21 GMT
+< Cache-Control: private, max-age=120, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/C9xmN5vdBuNZQjRaf9Wi5Z1YcyY"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#searchListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/C9xmN5vdBuNZQjRaf9Wi5Z1YcyY\"",
+< "nextPageToken": "CAUQAA",
+< "pageInfo": {
+< "totalResults": 89,
+< "resultsPerPage": 5
+< },
+< "items": [
+< {
+< "kind": "youtube#searchResult",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/v9umAUUWIUKOJEySwd0NPXIww64\"",
+< "id": {
+< "kind": "youtube#video",
+< "videoId": "4lyUNs7eNhs"
+< },
+< "snippet": {
+< "publishedAt": "2011-08-24T15:08:06.000Z",
+< "channelId": "UCe86XQ4_6qafeBn0kDkeanQ",
+< "title": "Escape From City 17 - Part Two",
+< "description": "A story about the connection that grows between two people during the battle for city 17. Made in the same gritty guerrilla style as the original, it was made on a $250 budget, with a previously owned HVX200 camera, and donated/previously owned software. \n\nContacts:\n\nFor feature films David and Ian are represented at William Morris Endeavor by Dan Aloni, Simon Faber, and Philip D'Amecourt. They are managed by Bard Dorros of Anonymous Content.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/4lyUNs7eNhs/default.jpg"
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/4lyUNs7eNhs/mqdefault.jpg"
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/4lyUNs7eNhs/hqdefault.jpg"
+< }
+< },
+< "channelTitle": "PurchaseBrothers",
+< "liveBroadcastContent": "none"
+< }
+< },
+< {
+< "kind": "youtube#searchResult",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/-CaHHiPRjuwlZIKowyV_tHc41qk\"",
+< "id": {
+< "kind": "youtube#video",
+< "videoId": "MEwQPEBpRGE"
+< },
+< "snippet": {
+< "publishedAt": "2015-03-04T13:53:16.000Z",
+< "channelId": "UCx6im183dzW1krbqgmIveUQ",
+< "title": "Half-Life 2 - Cinematic Mod - Full Walkthrough -【1080p】 【Max Detail】",
+< "description": "Half-Life 2 with Cinematic Mod full walkthrough in full HD and maximum graphic detail with no commentary.\n\nOther Parts of the Half-Life Story:\n\nBlack Mesa - http://youtu.be/8utqBcQDxxE\nHalf-Life 2 Cinematic - Watching it now!\nHalf-Life 2 Episode 1 Cinematic - http://youtu.be/VFQ38rb3Sxs\nHalf-Life 2 Episode 2 Cinematic - http://youtu.be/2OBM-rA6aZE\n\nYou can download the FakeFactory Cinematic Half-Life 2 Mod here for free:\nhttp://cinematicmod.com/\n\nIf you enjoyed watching please consider donating. Creating long playthroughs is time consuming and expensive and all money donated will aid the production of future playthroughs.\nhttps://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=F9E6WTR2ELLXJ\n\nEmail: bolloxedballs@gmail.com\n\nThanks for watching. Don't forget to like, subscribe and share!",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/MEwQPEBpRGE/default.jpg"
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/MEwQPEBpRGE/mqdefault.jpg"
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/MEwQPEBpRGE/hqdefault.jpg"
+< }
+< },
+< "channelTitle": "Bolloxed",
+< "liveBroadcastContent": "none"
+< }
+< },
+< {
+< "kind": "youtube#searchResult",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/3hHD0keCEQlSP9PhT-gcxGine7A\"",
+< "id": {
+< "kind": "youtube#video",
+< "videoId": "3P6fwCnuSMY"
+< },
+< "snippet": {
+< "publishedAt": "2015-03-25T03:20:22.000Z",
+< "channelId": "UCRNCUBq676nUhXyy8AJzD5w",
+< "title": "[Vinesauce] Joel - Brutal Half Life",
+< "description": "Brutal Doom, and now Brutal Half Life? Gore galore, enjoy. Lots of asses are kicked in, literally.\nDate streamed: 24 Mar , 2015\nhttp://vinesauce.com\nhttp://www.twitch.tv/vargskelethor\nhttps://twitter.com/vinesauce\n\nFor streaming highlights:\nhttps://www.youtube.com/user/exinthevatican\nFor full streams:\nhttps://www.youtube.com/user/exinthevaticanFULL \n\nLike the stream? Draw something for the Vinebooru!\nhttp://vinesauce.booru.org/",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/3P6fwCnuSMY/default.jpg"
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/3P6fwCnuSMY/mqdefault.jpg"
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/3P6fwCnuSMY/hqdefault.jpg"
+< }
+< },
+< "channelTitle": "Exinthevatican Uncut: Full Joel Streams",
+< "liveBroadcastContent": "none"
+< }
+< },
+< {
+< "kind": "youtube#searchResult",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/Gh3qmA4PoeWOc6uaLs4RJAs9FdI\"",
+< "id": {
+< "kind": "youtube#video",
+< "videoId": "YiKcWZHeMG4"
+< },
+< "snippet": {
+< "publishedAt": "2013-10-03T17:51:03.000Z",
+< "channelId": "UCkzRDjtq4ngMADh45j2KsJQ",
+< "title": "Half-Life: Raise the Bar [Fan Film]",
+< "description": "This film is a fan-made short film inspired by the Half-Life franchise. It is intended to celebrate the game franchise and is in no way affiliated with Half-Life and Valve official works.\n\nWhen an experiment goes wrong, it unleashes a catastrophic event on the Black Mesa Research Facility. As scientists scramble to find a way out, the game's iconic weapon-- the crowbar-- finds its rightful owner.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/YiKcWZHeMG4/default.jpg"
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/YiKcWZHeMG4/mqdefault.jpg"
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/YiKcWZHeMG4/hqdefault.jpg"
+< }
+< },
+< "channelTitle": "MachinimaPrime",
+< "liveBroadcastContent": "none"
+< }
+< },
+< {
+< "kind": "youtube#searchResult",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/spD90JE1TmHIKO9W7fi8nq1hN_w\"",
+< "id": {
+< "kind": "youtube#video",
+< "videoId": "slRsexrhbG8"
+< },
+< "snippet": {
+< "publishedAt": "2007-11-01T11:30:22.000Z",
+< "channelId": "UCW3Rt1iUPaqZVtY-SErKysQ",
+< "title": "HALF LIFE IN 60 SECONDS",
+< "description": "HALF LIFE IN 60 SECONDS",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/slRsexrhbG8/default.jpg"
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/slRsexrhbG8/mqdefault.jpg"
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/slRsexrhbG8/hqdefault.jpg"
+< }
+< },
+< "channelTitle": "rompkows",
+< "liveBroadcastContent": "none"
+< }
+< }
+< ]
+< }
+
--- /dev/null
+> GET /youtube/v3/search?part=snippet&type=video&relatedToVideoId=q1UPMEmCqZo HTTP/1.1
+> Soup-Debug-Timestamp: 1436004622
+> Soup-Debug: SoupSession 1 (0x69c270), SoupMessage 6 (0x7fffd00168d0), SoupSocket 3 (0x7fffdc002cc0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.pgF6cVdQDCBDbCzfYEupbmjXbVjgTNRJc9ccw0SiOJzNNQmII2p1Zu4o_NjGVZR8OeasFTwEaMRKRQ
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436004622
+< Soup-Debug: SoupMessage 6 (0x7fffd00168d0)
+< Expires: Sat, 04 Jul 2015 10:10:22 GMT
+< Date: Sat, 04 Jul 2015 10:10:22 GMT
+< Cache-Control: private, max-age=120, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/C9xmN5vdBuNZQjRaf9Wi5Z1YcyY"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#searchListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/C9xmN5vdBuNZQjRaf9Wi5Z1YcyY\"",
+< "nextPageToken": "CAUQAA",
+< "pageInfo": {
+< "totalResults": 89,
+< "resultsPerPage": 5
+< },
+< "items": [
+< {
+< "kind": "youtube#searchResult",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/v9umAUUWIUKOJEySwd0NPXIww64\"",
+< "id": {
+< "kind": "youtube#video",
+< "videoId": "4lyUNs7eNhs"
+< },
+< "snippet": {
+< "publishedAt": "2011-08-24T15:08:06.000Z",
+< "channelId": "UCe86XQ4_6qafeBn0kDkeanQ",
+< "title": "Escape From City 17 - Part Two",
+< "description": "A story about the connection that grows between two people during the battle for city 17. Made in the same gritty guerrilla style as the original, it was made on a $250 budget, with a previously owned HVX200 camera, and donated/previously owned software. \n\nContacts:\n\nFor feature films David and Ian are represented at William Morris Endeavor by Dan Aloni, Simon Faber, and Philip D'Amecourt. They are managed by Bard Dorros of Anonymous Content.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/4lyUNs7eNhs/default.jpg"
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/4lyUNs7eNhs/mqdefault.jpg"
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/4lyUNs7eNhs/hqdefault.jpg"
+< }
+< },
+< "channelTitle": "PurchaseBrothers",
+< "liveBroadcastContent": "none"
+< }
+< },
+< {
+< "kind": "youtube#searchResult",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/-CaHHiPRjuwlZIKowyV_tHc41qk\"",
+< "id": {
+< "kind": "youtube#video",
+< "videoId": "MEwQPEBpRGE"
+< },
+< "snippet": {
+< "publishedAt": "2015-03-04T13:53:16.000Z",
+< "channelId": "UCx6im183dzW1krbqgmIveUQ",
+< "title": "Half-Life 2 - Cinematic Mod - Full Walkthrough -【1080p】 【Max Detail】",
+< "description": "Half-Life 2 with Cinematic Mod full walkthrough in full HD and maximum graphic detail with no commentary.\n\nOther Parts of the Half-Life Story:\n\nBlack Mesa - http://youtu.be/8utqBcQDxxE\nHalf-Life 2 Cinematic - Watching it now!\nHalf-Life 2 Episode 1 Cinematic - http://youtu.be/VFQ38rb3Sxs\nHalf-Life 2 Episode 2 Cinematic - http://youtu.be/2OBM-rA6aZE\n\nYou can download the FakeFactory Cinematic Half-Life 2 Mod here for free:\nhttp://cinematicmod.com/\n\nIf you enjoyed watching please consider donating. Creating long playthroughs is time consuming and expensive and all money donated will aid the production of future playthroughs.\nhttps://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=F9E6WTR2ELLXJ\n\nEmail: bolloxedballs@gmail.com\n\nThanks for watching. Don't forget to like, subscribe and share!",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/MEwQPEBpRGE/default.jpg"
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/MEwQPEBpRGE/mqdefault.jpg"
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/MEwQPEBpRGE/hqdefault.jpg"
+< }
+< },
+< "channelTitle": "Bolloxed",
+< "liveBroadcastContent": "none"
+< }
+< },
+< {
+< "kind": "youtube#searchResult",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/3hHD0keCEQlSP9PhT-gcxGine7A\"",
+< "id": {
+< "kind": "youtube#video",
+< "videoId": "3P6fwCnuSMY"
+< },
+< "snippet": {
+< "publishedAt": "2015-03-25T03:20:22.000Z",
+< "channelId": "UCRNCUBq676nUhXyy8AJzD5w",
+< "title": "[Vinesauce] Joel - Brutal Half Life",
+< "description": "Brutal Doom, and now Brutal Half Life? Gore galore, enjoy. Lots of asses are kicked in, literally.\nDate streamed: 24 Mar , 2015\nhttp://vinesauce.com\nhttp://www.twitch.tv/vargskelethor\nhttps://twitter.com/vinesauce\n\nFor streaming highlights:\nhttps://www.youtube.com/user/exinthevatican\nFor full streams:\nhttps://www.youtube.com/user/exinthevaticanFULL \n\nLike the stream? Draw something for the Vinebooru!\nhttp://vinesauce.booru.org/",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/3P6fwCnuSMY/default.jpg"
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/3P6fwCnuSMY/mqdefault.jpg"
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/3P6fwCnuSMY/hqdefault.jpg"
+< }
+< },
+< "channelTitle": "Exinthevatican Uncut: Full Joel Streams",
+< "liveBroadcastContent": "none"
+< }
+< },
+< {
+< "kind": "youtube#searchResult",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/Gh3qmA4PoeWOc6uaLs4RJAs9FdI\"",
+< "id": {
+< "kind": "youtube#video",
+< "videoId": "YiKcWZHeMG4"
+< },
+< "snippet": {
+< "publishedAt": "2013-10-03T17:51:03.000Z",
+< "channelId": "UCkzRDjtq4ngMADh45j2KsJQ",
+< "title": "Half-Life: Raise the Bar [Fan Film]",
+< "description": "This film is a fan-made short film inspired by the Half-Life franchise. It is intended to celebrate the game franchise and is in no way affiliated with Half-Life and Valve official works.\n\nWhen an experiment goes wrong, it unleashes a catastrophic event on the Black Mesa Research Facility. As scientists scramble to find a way out, the game's iconic weapon-- the crowbar-- finds its rightful owner.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/YiKcWZHeMG4/default.jpg"
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/YiKcWZHeMG4/mqdefault.jpg"
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/YiKcWZHeMG4/hqdefault.jpg"
+< }
+< },
+< "channelTitle": "MachinimaPrime",
+< "liveBroadcastContent": "none"
+< }
+< },
+< {
+< "kind": "youtube#searchResult",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/spD90JE1TmHIKO9W7fi8nq1hN_w\"",
+< "id": {
+< "kind": "youtube#video",
+< "videoId": "slRsexrhbG8"
+< },
+< "snippet": {
+< "publishedAt": "2007-11-01T11:30:22.000Z",
+< "channelId": "UCW3Rt1iUPaqZVtY-SErKysQ",
+< "title": "HALF LIFE IN 60 SECONDS",
+< "description": "HALF LIFE IN 60 SECONDS",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/slRsexrhbG8/default.jpg"
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/slRsexrhbG8/mqdefault.jpg"
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/slRsexrhbG8/hqdefault.jpg"
+< }
+< },
+< "channelTitle": "rompkows",
+< "liveBroadcastContent": "none"
+< }
+< }
+< ]
+< }
+
--- /dev/null
+> GET /youtube/v3/videos?part=contentDetails,id,recordingDetails,snippet,status,statistics&id=_LeQuMpwbW4 HTTP/1.1
+> Soup-Debug-Timestamp: 1436004902
+> Soup-Debug: SoupSession 1 (0x69c270), SoupMessage 2 (0x870e60), SoupSocket 1 (0x65a1a0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.pgFzt-0omRqebjgH7Jw8gPEqtsByTcO2ZscLoPfwCFCABmoZfM7IRZTc5WJVBfnuM2MppoEOqU4L1A
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436004902
+< Soup-Debug: SoupMessage 2 (0x870e60)
+< Expires: Sat, 04 Jul 2015 10:15:02 GMT
+< Date: Sat, 04 Jul 2015 10:15:02 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/j09QkgGv8ZCtf_ce6pgvDV2pG28"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#videoListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/j09QkgGv8ZCtf_ce6pgvDV2pG28\"",
+< "pageInfo": {
+< "totalResults": 1,
+< "resultsPerPage": 1
+< },
+< "items": [
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/UufoB3bglPElmftUUDeFNu4tNjg\"",
+< "id": "_LeQuMpwbW4",
+< "snippet": {
+< "publishedAt": "2009-03-24T23:03:00.000Z",
+< "channelId": "UCQJC-f4iUoHiYSEMniQRFAA",
+< "title": "Totem Movie Player",
+< "description": "The default movie player in Ubuntu is called the Totem Movie Player. I'll show you the basics of using this program and also I'll show you how to fix the flickering problems if you're using an ATI card and have compiz enabled.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/_LeQuMpwbW4/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/_LeQuMpwbW4/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/_LeQuMpwbW4/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< }
+< },
+< "channelTitle": "ubuntuhal",
+< "tags": [
+< "Ubuntu",
+< "Compiz",
+< "Totem",
+< "Movie",
+< "Player",
+< "ATI"
+< ],
+< "categoryId": "27",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Totem Movie Player",
+< "description": "The default movie player in Ubuntu is called the Totem Movie Player. I'll show you the basics of using this program and also I'll show you how to fix the flickering problems if you're using an ATI card and have compiz enabled."
+< }
+< },
+< "contentDetails": {
+< "duration": "PT4M29S",
+< "dimension": "2d",
+< "definition": "sd",
+< "caption": "false",
+< "licensedContent": false
+< },
+< "status": {
+< "uploadStatus": "processed",
+< "privacyStatus": "public",
+< "license": "youtube",
+< "embeddable": false,
+< "publicStatsViewable": false
+< },
+< "statistics": {
+< "viewCount": "2990",
+< "likeCount": "4",
+< "dislikeCount": "0",
+< "favoriteCount": "0",
+< "commentCount": "1"
+< }
+< }
+< ]
+< }
+
--- /dev/null
+> GET /youtube/v3/videos?part=contentDetails,id,recordingDetails,snippet,status,statistics&id=_LeQuMpwbW4 HTTP/1.1
+> Soup-Debug-Timestamp: 1436004903
+> Soup-Debug: SoupSession 1 (0x69c270), SoupMessage 5 (0x7fffd0016bb0), SoupSocket 3 (0x65a1a0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.pgFzt-0omRqebjgH7Jw8gPEqtsByTcO2ZscLoPfwCFCABmoZfM7IRZTc5WJVBfnuM2MppoEOqU4L1A
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436004903
+< Soup-Debug: SoupMessage 5 (0x7fffd0016bb0)
+< Expires: Sat, 04 Jul 2015 10:15:03 GMT
+< Date: Sat, 04 Jul 2015 10:15:03 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/j09QkgGv8ZCtf_ce6pgvDV2pG28"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#videoListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/j09QkgGv8ZCtf_ce6pgvDV2pG28\"",
+< "pageInfo": {
+< "totalResults": 1,
+< "resultsPerPage": 1
+< },
+< "items": [
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/UufoB3bglPElmftUUDeFNu4tNjg\"",
+< "id": "_LeQuMpwbW4",
+< "snippet": {
+< "publishedAt": "2009-03-24T23:03:00.000Z",
+< "channelId": "UCQJC-f4iUoHiYSEMniQRFAA",
+< "title": "Totem Movie Player",
+< "description": "The default movie player in Ubuntu is called the Totem Movie Player. I'll show you the basics of using this program and also I'll show you how to fix the flickering problems if you're using an ATI card and have compiz enabled.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/_LeQuMpwbW4/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/_LeQuMpwbW4/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/_LeQuMpwbW4/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< }
+< },
+< "channelTitle": "ubuntuhal",
+< "tags": [
+< "Ubuntu",
+< "Compiz",
+< "Totem",
+< "Movie",
+< "Player",
+< "ATI"
+< ],
+< "categoryId": "27",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Totem Movie Player",
+< "description": "The default movie player in Ubuntu is called the Totem Movie Player. I'll show you the basics of using this program and also I'll show you how to fix the flickering problems if you're using an ATI card and have compiz enabled."
+< }
+< },
+< "contentDetails": {
+< "duration": "PT4M29S",
+< "dimension": "2d",
+< "definition": "sd",
+< "caption": "false",
+< "licensedContent": false
+< },
+< "status": {
+< "uploadStatus": "processed",
+< "privacyStatus": "public",
+< "license": "youtube",
+< "embeddable": false,
+< "publicStatsViewable": false
+< },
+< "statistics": {
+< "viewCount": "2990",
+< "likeCount": "4",
+< "dislikeCount": "0",
+< "favoriteCount": "0",
+< "commentCount": "1"
+< }
+< }
+< ]
+< }
+
--- /dev/null
+> GET /youtube/v3/videos?part=snippet&chart=mostPopular&publishedAfter=2015-07-04T11%3A03%3A17.439983Z HTTP/1.1
+> Soup-Debug-Timestamp: 1436094197
+> Soup-Debug: SoupSession 1 (0x1ceb270), SoupMessage 3 (0x1f9ae60), SoupSocket 1 (0x1ca91e0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.pwEbFxaxzNRjtsLpe_y4Qi8KtwIYgo6O-oK4YN4emaqVF4wGnVTTkBHHefv4is8C05Z79WiaRWGAxQ
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436094197
+< Soup-Debug: SoupMessage 3 (0x1f9ae60)
+< Expires: Sun, 05 Jul 2015 11:03:17 GMT
+< Date: Sun, 05 Jul 2015 11:03:17 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/nJysvtEJetW2imnkD3k-wdEB40A"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#videoListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/nJysvtEJetW2imnkD3k-wdEB40A\"",
+< "nextPageToken": "CAUQAA",
+< "pageInfo": {
+< "totalResults": 30,
+< "resultsPerPage": 5
+< },
+< "items": [
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/wRvhiP8-cRIMdn5iEHkquoDnnWs\"",
+< "id": "HAnRtMEDrvU",
+< "snippet": {
+< "publishedAt": "2015-07-04T10:30:15.000Z",
+< "channelId": "UCF0t9oIvSEc7vzSj8ZF1fbQ",
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Telltale Games",
+< "tags": [
+< "Minecraft (Award-Winning Work)",
+< "Mojang (Video Game Developer)",
+< "Telltale Games (Video Game Developer)",
+< "Patton Oswalt (TV Producer)",
+< "Brian Posehn",
+< "Ashley Johnson",
+< "Scott Porter",
+< "Martha Plimpton",
+< "Corey Feldman",
+< "Corey Feldman (Celebrity)",
+< "Billy West",
+< "MineCon",
+< "Minecraft: Story Mode",
+< "Paul Reubens",
+< "PlayStation 3 (Video Game Platform)",
+< "PlayStation 4 (Video Game Platform)",
+< "Xbox 360 (Video Game Platform)",
+< "Xbox Games Store (Video Game Distribution System)",
+< "Video Game (Industry)"
+< ],
+< "categoryId": "20",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android."
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/HCzbW9TmGX_tjL-jXsRWjhqrAUQ\"",
+< "id": "Y1ndZnfZdZM",
+< "snippet": {
+< "publishedAt": "2015-07-02T23:54:50.000Z",
+< "channelId": "UCi7GJNg51C3jgmYTUwqoUXA",
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< }
+< },
+< "channelTitle": "Team Coco",
+< "tags": [
+< "Conan O'Brien",
+< "Conan",
+< "Conan (TV Series)",
+< "TBS (TV Channel)",
+< "Team Coco",
+< "Highlights",
+< "Comedy Sketches",
+< "Magic Mike",
+< "Joe Manganiello",
+< "Channing Tatum",
+< "Sona Movsesian",
+< "Remotes"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/2shteR9RuCUA3Xsopdu4AtKFg-k\"",
+< "id": "EctkLeyz8Ks",
+< "snippet": {
+< "publishedAt": "2015-07-03T07:30:01.000Z",
+< "channelId": "UCa6vGFO9ty8v5KZJXQxdhaw",
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Jimmy Kimmel Live",
+< "tags": [
+< "jimmy",
+< "jimmy kimmel",
+< "jimmy kimmel live",
+< "late night",
+< "talk show",
+< "funny",
+< "comedic",
+< "comedy",
+< "clip",
+< "comedian",
+< "fallon",
+< "jimmy fallon",
+< "colbert",
+< "stephen colbert",
+< "mean tweets",
+< "Independence Day (Holiday)",
+< "july",
+< "fourth of july",
+< "4th of july",
+< "lie witness",
+< "charlie brown",
+< "katy perry",
+< "confederate flag",
+< "james van der beek",
+< "dawson's creek",
+< "nathan fillion",
+< "donald trump",
+< "joseph gordon-levitt"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ofZUn2TDkcNOzoD7YR3X0yrlqtg\"",
+< "id": "dCV6RusogAk",
+< "snippet": {
+< "publishedAt": "2015-07-03T17:17:15.000Z",
+< "channelId": "UCXR2od6-d7g8_F038fCNDDA",
+< "title": "Nintendo Playstation Superdisc",
+< "description": "",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< }
+< },
+< "channelTitle": "dizzle521",
+< "categoryId": "22",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Nintendo Playstation Superdisc",
+< "description": ""
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ICjYKf5GE_1y6_A57XpHhaeR-wc\"",
+< "id": "E1d_dmKBiiI",
+< "snippet": {
+< "publishedAt": "2015-07-02T18:19:48.000Z",
+< "channelId": "UCW3T8dQVEynwj6-_DArcM7w",
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Rumble Viral",
+< "tags": [
+< "viral videos",
+< "funny videos",
+< "funny dogs",
+< "dog videos",
+< "dog snitches on friend",
+< "dog tells on other dog",
+< "french bulldog",
+< "bull mastiff"
+< ],
+< "categoryId": "15",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com."
+< }
+< }
+< }
+< ]
+< }
+
--- /dev/null
+> GET /youtube/v3/videos?part=snippet&chart=mostPopular&publishedAfter=2015-07-04T11%3A03%3A18.490417Z HTTP/1.1
+> Soup-Debug-Timestamp: 1436094198
+> Soup-Debug: SoupSession 1 (0x1ceb270), SoupMessage 7 (0x7f9a340168c0), SoupSocket 3 (0x7f9a30002d30)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.pwEbFxaxzNRjtsLpe_y4Qi8KtwIYgo6O-oK4YN4emaqVF4wGnVTTkBHHefv4is8C05Z79WiaRWGAxQ
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436094198
+< Soup-Debug: SoupMessage 7 (0x7f9a340168c0)
+< Expires: Sun, 05 Jul 2015 11:03:18 GMT
+< Date: Sun, 05 Jul 2015 11:03:18 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/-zA5mk_98WXAFM9KqwrvMcVKLuw"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#videoListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/-zA5mk_98WXAFM9KqwrvMcVKLuw\"",
+< "nextPageToken": "CAUQAA",
+< "pageInfo": {
+< "totalResults": 30,
+< "resultsPerPage": 5
+< },
+< "items": [
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/wRvhiP8-cRIMdn5iEHkquoDnnWs\"",
+< "id": "HAnRtMEDrvU",
+< "snippet": {
+< "publishedAt": "2015-07-04T10:30:15.000Z",
+< "channelId": "UCF0t9oIvSEc7vzSj8ZF1fbQ",
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/HAnRtMEDrvU/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Telltale Games",
+< "tags": [
+< "Minecraft (Award-Winning Work)",
+< "Mojang (Video Game Developer)",
+< "Telltale Games (Video Game Developer)",
+< "Patton Oswalt (TV Producer)",
+< "Brian Posehn",
+< "Ashley Johnson",
+< "Scott Porter",
+< "Martha Plimpton",
+< "Corey Feldman",
+< "Corey Feldman (Celebrity)",
+< "Billy West",
+< "MineCon",
+< "Minecraft: Story Mode",
+< "Paul Reubens",
+< "PlayStation 3 (Video Game Platform)",
+< "PlayStation 4 (Video Game Platform)",
+< "Xbox 360 (Video Game Platform)",
+< "Xbox Games Store (Video Game Distribution System)",
+< "Video Game (Industry)"
+< ],
+< "categoryId": "20",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Minecraft: Story Mode [Minecon 2015 Trailer]",
+< "description": "Minecraft: Story Mode is an adventure game, by Telltale Games, set in a Minecraft world. It is a five-part episodic series that will take you to the Nether, the Farlands, the End, and beyond! You will drive how the story flows through the decisions you make: what you say to people (and how you say it), and what you choose to do in moments of thrilling action. \n\nPlayers will control protagonist Jesse throughout the season, as portrayed by actor Patton Oswalt. Jesse and his group of friends revere the legendary Order of the Stone; four adventurers who slayed an Ender Dragon. The Order is the very best at what they do: Warrior, Redstone Engineer, Griefer, and Architect. While at EnderCon, Jesse and his friends discover that something is wrong... something dreadful. Terror is unleashed, and they must set out on a journey to find The Order of the Stone if they are to save their world from oblivion.\n\nAvailable to download soon for PC, Mac, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, compatible iOS devices, and Android."
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/HCzbW9TmGX_tjL-jXsRWjhqrAUQ\"",
+< "id": "Y1ndZnfZdZM",
+< "snippet": {
+< "publishedAt": "2015-07-02T23:54:50.000Z",
+< "channelId": "UCi7GJNg51C3jgmYTUwqoUXA",
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/Y1ndZnfZdZM/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< }
+< },
+< "channelTitle": "Team Coco",
+< "tags": [
+< "Conan O'Brien",
+< "Conan",
+< "Conan (TV Series)",
+< "TBS (TV Channel)",
+< "Team Coco",
+< "Highlights",
+< "Comedy Sketches",
+< "Magic Mike",
+< "Joe Manganiello",
+< "Channing Tatum",
+< "Sona Movsesian",
+< "Remotes"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Conan Crashes A \"Magic Mike XXL\" Girls' Night Out - CONAN on TBS",
+< "description": "CONAN Highlight: Conan joins ladies from the office to catch a midnight showing of Channing Tatum & Joe Manganiello's new bump 'n grind hit.\n\nMore CONAN @ http://teamcoco.com/video\n\nTeam Coco is the official YouTube channel of late night host Conan O'Brien, CONAN on TBS & TeamCoco.com. Subscribe now to be updated on the latest videos: http://bit.ly/W5wt5D\n\nFor Full Episodes of CONAN on TBS, visit http://teamcoco.com/video\n\nGet Social With Team Coco:\nOn Facebook: \u202ahttps://www.facebook.com/TeamCoco\u202c\nOn Google+: https://plus.google.com/+TeamCoco/\nOn Twitter: http://twitter.com/TeamCoco\nOn Tumblr: http://teamcoco.tumblr.com\nOn YouTube: http://youtube.com/teamcoco\n\nFollow Conan O'Brien on Twitter: http://twitter.com/ConanOBrien"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/2shteR9RuCUA3Xsopdu4AtKFg-k\"",
+< "id": "EctkLeyz8Ks",
+< "snippet": {
+< "publishedAt": "2015-07-03T07:30:01.000Z",
+< "channelId": "UCa6vGFO9ty8v5KZJXQxdhaw",
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/EctkLeyz8Ks/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Jimmy Kimmel Live",
+< "tags": [
+< "jimmy",
+< "jimmy kimmel",
+< "jimmy kimmel live",
+< "late night",
+< "talk show",
+< "funny",
+< "comedic",
+< "comedy",
+< "clip",
+< "comedian",
+< "fallon",
+< "jimmy fallon",
+< "colbert",
+< "stephen colbert",
+< "mean tweets",
+< "Independence Day (Holiday)",
+< "july",
+< "fourth of july",
+< "4th of july",
+< "lie witness",
+< "charlie brown",
+< "katy perry",
+< "confederate flag",
+< "james van der beek",
+< "dawson's creek",
+< "nathan fillion",
+< "donald trump",
+< "joseph gordon-levitt"
+< ],
+< "categoryId": "23",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Lie Witness News - 4th of July Edition",
+< "description": "Independence Day isn’t really about fireworks, it’s a day to remember the history of our country. So we went out on the street with a truckload of misinformation about our country. Among other things, we asked people if they heard the Governor of California had rescheduled the Fourth of July to February and sure enough, lots of people said they did for this special All-American version of #LieWitnessNews.\n\nSUBSCRIBE to get the latest #KIMMEL: http://bit.ly/JKLSubscribe\n\nWatch the latest Halloween Candy Prank: http://bit.ly/KimmelHalloweenCandy\n\nWatch Mean Tweets: http://bit.ly/JKLMeanTweets8\n\nConnect with Jimmy Kimmel Live Online:\n\nVisit the Jimmy Kimmel Live WEBSITE: http://bit.ly/JKLWebsite\nLike Jimmy Kimmel Live on FACEBOOK: http://bit.ly/JKLFacebook\nFollow Jimmy Kimmel Live on TWITTER: http://bit.ly/JKLTwitter\nFollow Jimmy Kimmel Live on INSTAGRAM: http://bit.ly/JKLInstagram\n\nAbout Jimmy Kimmel Live:\n\nJimmy Kimmel serves as host and executive producer of Emmy-winning \"Jimmy Kimmel Live,\" ABC's late-night talk show.\n \n\"Jimmy Kimmel Live\" is well known for its huge viral video successes with 2.5 billion views on YouTube alone. Some of Kimmel's most popular comedy bits include - Mean Tweets, Lie Witness News, Jimmy's Twerk Fail Prank, Unnecessary Censorship, YouTube Challenge, The Baby Bachelor, Movie: The Movie, Handsome Men's Club, Jimmy Kimmel Lie Detective and music videos like \"I (Wanna) Channing All Over Your Tatum\" and a Blurred Lines parody with Robin Thicke, Pharrell, Jimmy and his security guard Guillermo.\n \nNow in its thirteenth season, Kimmel's guests have included: Johnny Depp, Meryl Streep, Tom Cruise, Halle Berry, Harrison Ford, Jennifer Aniston, Will Ferrell, Katy Perry, Tom Hanks, Scarlett Johansson, Channing Tatum, George Clooney, Larry David, Charlize Theron, Mark Wahlberg, Kobe Bryant, Steve Carell, Hugh Jackman, Kristen Wiig, Jeff Bridges, Jennifer Garner, Ryan Gosling, Bryan Cranston, Jamie Foxx, Amy Poehler, Ben Affleck, Robert Downey Jr., Jake Gyllenhaal, Oprah, and unfortunately Matt Damon.\n\nLie Witness News - 4th of July Edition\nhttps://youtu.be/EctkLeyz8Ks"
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ofZUn2TDkcNOzoD7YR3X0yrlqtg\"",
+< "id": "dCV6RusogAk",
+< "snippet": {
+< "publishedAt": "2015-07-03T17:17:15.000Z",
+< "channelId": "UCXR2od6-d7g8_F038fCNDDA",
+< "title": "Nintendo Playstation Superdisc",
+< "description": "",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/dCV6RusogAk/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< }
+< },
+< "channelTitle": "dizzle521",
+< "categoryId": "22",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Nintendo Playstation Superdisc",
+< "description": ""
+< }
+< }
+< },
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ICjYKf5GE_1y6_A57XpHhaeR-wc\"",
+< "id": "E1d_dmKBiiI",
+< "snippet": {
+< "publishedAt": "2015-07-02T18:19:48.000Z",
+< "channelId": "UCW3T8dQVEynwj6-_DArcM7w",
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< },
+< "standard": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/sddefault.jpg",
+< "width": 640,
+< "height": 480
+< },
+< "maxres": {
+< "url": "https://i.ytimg.com/vi/E1d_dmKBiiI/maxresdefault.jpg",
+< "width": 1280,
+< "height": 720
+< }
+< },
+< "channelTitle": "Rumble Viral",
+< "tags": [
+< "viral videos",
+< "funny videos",
+< "funny dogs",
+< "dog videos",
+< "dog snitches on friend",
+< "dog tells on other dog",
+< "french bulldog",
+< "bull mastiff"
+< ],
+< "categoryId": "15",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "French Bulldog gets outed by his best friend",
+< "description": "When asked who chewed up all the toilet paper this French Bulldog has nothing to say. However, her Bull Mastiff \"friend\" has no problem literally pointing her out. Check out their hilarious reactions!\n\nSource & embed code: https://rumble.com/v2zma4-french-bulldog-outed-by-bull-mastiff.html.\n\nFor licensing, please email licensing@rumble.com."
+< }
+< }
+< }
+< ]
+< }
+
--- /dev/null
+> GET /youtube/v3/videos?part=contentDetails,id,recordingDetails,snippet,status,statistics&id=RzR2k8yo4NY HTTP/1.1
+> Soup-Debug-Timestamp: 1436101151
+> Soup-Debug: SoupSession 1 (0x19c0270), SoupMessage 5 (0x19c80c0), SoupSocket 1 (0x197e1a0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.pwESPgjYW0E2EhM44tP20vaeH_Xan9C4osK5Sz5yri2VoTkrRtOzQuyt1Qst1ocJyG1FKcd92gMPjg
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436101151
+< Soup-Debug: SoupMessage 5 (0x19c80c0)
+< Expires: Sun, 05 Jul 2015 12:59:11 GMT
+< Date: Sun, 05 Jul 2015 12:59:11 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/yPoKiNjQzTZG23dD136F6mj0q0I"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#videoListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/yPoKiNjQzTZG23dD136F6mj0q0I\"",
+< "pageInfo": {
+< "totalResults": 1,
+< "resultsPerPage": 1
+< },
+< "items": [
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/lRR4sqJsoxbhbN_5Me7exq34A8U\"",
+< "id": "RzR2k8yo4NY",
+< "snippet": {
+< "publishedAt": "2010-08-02T19:52:59.000Z",
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "title": "Fooish Bar",
+< "description": "",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/RzR2k8yo4NY/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/RzR2k8yo4NY/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/RzR2k8yo4NY/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< }
+< },
+< "channelTitle": "GDataTest",
+< "categoryId": "22",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Fooish Bar",
+< "description": ""
+< }
+< },
+< "contentDetails": {
+< "duration": "PT12S",
+< "dimension": "2d",
+< "definition": "sd",
+< "caption": "false",
+< "licensedContent": false
+< },
+< "status": {
+< "uploadStatus": "processed",
+< "privacyStatus": "public",
+< "license": "youtube",
+< "embeddable": true,
+< "publicStatsViewable": true
+< },
+< "statistics": {
+< "viewCount": "10",
+< "likeCount": "0",
+< "dislikeCount": "0",
+< "favoriteCount": "0",
+< "commentCount": "584"
+< }
+< }
+< ]
+< }
+
+> GET /youtube/v3/videos?part=contentDetails,id,recordingDetails,snippet,status,statistics&id=VppEcVz8qaI HTTP/1.1
+> Soup-Debug-Timestamp: 1436101151
+> Soup-Debug: SoupSession 1 (0x19c0270), SoupMessage 6 (0x19c80c0), SoupSocket 1 (0x197e1a0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.pwESPgjYW0E2EhM44tP20vaeH_Xan9C4osK5Sz5yri2VoTkrRtOzQuyt1Qst1ocJyG1FKcd92gMPjg
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436101151
+< Soup-Debug: SoupMessage 6 (0x19c80c0)
+< Expires: Sun, 05 Jul 2015 12:59:11 GMT
+< Date: Sun, 05 Jul 2015 12:59:11 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/cRprItFQU9gtLUNK1easmLQu9KY"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#videoListResponse",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/cRprItFQU9gtLUNK1easmLQu9KY\"",
+< "pageInfo": {
+< "totalResults": 1,
+< "resultsPerPage": 1
+< },
+< "items": [
+< {
+< "kind": "youtube#video",
+< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ArOIe0olv2CLSw9uGNjdizfzrVk\"",
+< "id": "VppEcVz8qaI",
+< "snippet": {
+< "publishedAt": "2010-08-02T19:53:00.000Z",
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "title": "Fooish Bar 2",
+< "description": "",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/VppEcVz8qaI/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/VppEcVz8qaI/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/VppEcVz8qaI/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< }
+< },
+< "channelTitle": "GDataTest",
+< "categoryId": "22",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Fooish Bar 2",
+< "description": ""
+< }
+< },
+< "contentDetails": {
+< "duration": "PT12S",
+< "dimension": "2d",
+< "definition": "sd",
+< "caption": "false",
+< "licensedContent": false
+< },
+< "status": {
+< "uploadStatus": "processed",
+< "privacyStatus": "public",
+< "license": "youtube",
+< "embeddable": true,
+< "publicStatsViewable": true
+< },
+< "statistics": {
+< "viewCount": "1",
+< "likeCount": "0",
+< "dislikeCount": "0",
+< "favoriteCount": "0",
+< "commentCount": "0"
+< }
+< }
+< ]
+< }
+
--- /dev/null
+> GET /youtube/v3/videos?part=contentDetails,id,recordingDetails,snippet,status,statistics&id=RzR2k8yo4NY HTTP/1.1
+> Soup-Debug-Timestamp: 1436524909
+> Soup-Debug: SoupSession 1 (0x764270), SoupMessage 24 (0x718380), SoupSocket 10 (0x71f9e0)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.rAH_Q0eNKofaqTAncnAaEB4V0WK9Txs3Z9Flw_euQ39X46jVgKMldLv1uARt2252pTEu
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436524909
+< Soup-Debug: SoupMessage 24 (0x718380)
+< Expires: Fri, 10 Jul 2015 10:41:49 GMT
+< Date: Fri, 10 Jul 2015 10:41:49 GMT
+< Cache-Control: private, max-age=0, must-revalidate, no-transform
+< ETag: "iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/STDGEq5e7aFcUGoWFKAHkuEwOKE"
+< Vary: Origin
+< Vary: X-Origin
+< Content-Type: application/json; charset=UTF-8
+< Content-Encoding: gzip
+< X-Content-Type-Options: nosniff
+< X-Frame-Options: SAMEORIGIN
+< X-XSS-Protection: 1; mode=block
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+< Transfer-Encoding: chunked
+<
+< {
+< "kind": "youtube#videoListResponse",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/STDGEq5e7aFcUGoWFKAHkuEwOKE\"",
+< "pageInfo": {
+< "totalResults": 1,
+< "resultsPerPage": 1
+< },
+< "items": [
+< {
+< "kind": "youtube#video",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/-d74qUZqsGt8_LxDkk5dfK-KIxg\"",
+< "id": "RzR2k8yo4NY",
+< "snippet": {
+< "publishedAt": "2010-08-02T19:52:59.000Z",
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "title": "Fooish Bar",
+< "description": "",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/RzR2k8yo4NY/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/RzR2k8yo4NY/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/RzR2k8yo4NY/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< }
+< },
+< "channelTitle": "GDataTest",
+< "categoryId": "22",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Fooish Bar",
+< "description": ""
+< }
+< },
+< "contentDetails": {
+< "duration": "PT12S",
+< "dimension": "2d",
+< "definition": "sd",
+< "caption": "false",
+< "licensedContent": false
+< },
+< "status": {
+< "uploadStatus": "processed",
+< "privacyStatus": "public",
+< "license": "youtube",
+< "embeddable": true,
+< "publicStatsViewable": true
+< },
+< "statistics": {
+< "viewCount": "12",
+< "likeCount": "0",
+< "dislikeCount": "0",
+< "favoriteCount": "0",
+< "commentCount": "593"
+< }
+< }
+< ]
+< }
+
--- /dev/null
+> DELETE /youtube/v3/videos?id=fcDgG9SYgWo HTTP/1.1
+> Soup-Debug-Timestamp: 1436526042
+> Soup-Debug: SoupSession 1 (0x697270), SoupMessage 4 (0x6f3380), SoupSocket 2 (0x7fffe4002d90)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.rAEcpg9Gg0tTwYPS1C3GGnpc00A7XjAUKJe_wWmIkt-XPaMeOcWW6v3yMlgAkNlrwAM1
+> GData-Version: 2
+> If-Match: "iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/Lk_Eo1hcMJhjOQ3HB3tayaqGYfw"
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1436526043
+< Soup-Debug: SoupMessage 4 (0x6f3380)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Fri, 10 Jul 2015 11:00:43 GMT
+< ETag: "iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/qR2rMcvcJrXM7gQXiqj7Fw2GLY4"
+< Vary: Origin
+< Vary: X-Origin
+< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
+<
+
--- /dev/null
+> POST /upload/youtube/v3/videos?part=snippet,status,recordingDetails HTTP/1.1
+> Soup-Debug-Timestamp: 1436526040
+> Soup-Debug: SoupSession 1 (0x697270), SoupMessage 3 (0x6f3560), SoupSocket 2 (0x7fffe4002d90)
+> Host: www.googleapis.com
+> Slug: sample.ogg
+> Transfer-Encoding: chunked
+> Content-Type: multipart/related; boundary=0003Z5W789deadbeefRTE456KlemsnoZV
+> Authorization: Bearer ya29.rAEcpg9Gg0tTwYPS1C3GGnpc00A7XjAUKJe_wWmIkt-XPaMeOcWW6v3yMlgAkNlrwAM1
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436526042
+< Soup-Debug: SoupMessage 3 (0x6f3560)
+< X-GUploader-UploadID: AEnB2UrP1nVummI_mjw0-oeSWd0KgqKHwrDUynBgbS_6ovyio8OY6A0FMhCPVyXKYQYjBFA7XF4JFHb91ybBVTUuMnJ3dCf7UQ
+< ETag: "iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/Lk_Eo1hcMJhjOQ3HB3tayaqGYfw"
+< Vary: Origin
+< Vary: X-Origin
+< X-Goog-Correlation-Id: fcDgG9SYgWo
+< Content-Type: application/json; charset=UTF-8
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Fri, 10 Jul 2015 11:00:42 GMT
+< Content-Length: 1100
+< Server: UploadServer
+< Alternate-Protocol: 443:quic,p=1
+<
+< {
+< "kind": "youtube#video",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/Lk_Eo1hcMJhjOQ3HB3tayaqGYfw\"",
+< "id": "fcDgG9SYgWo",
+< "snippet": {
+< "publishedAt": "2015-07-10T11:00:41.000Z",
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "title": "Bad Wedding Toast",
+< "description": "I gave a bad toast at my friend's wedding.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/fcDgG9SYgWo/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/fcDgG9SYgWo/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/fcDgG9SYgWo/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< }
+< },
+< "channelTitle": "GDataTest",
+< "tags": [
+< "toast",
+< "wedding"
+< ],
+< "categoryId": "22",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Bad Wedding Toast",
+< "description": "I gave a bad toast at my friend's wedding."
+< }
+< },
+< "status": {
+< "uploadStatus": "uploaded",
+< "privacyStatus": "public",
+< "license": "youtube",
+< "embeddable": true,
+< "publicStatsViewable": true
+< }
+< }
+
--- /dev/null
+> POST /upload/youtube/v3/videos?part=snippet,status,recordingDetails HTTP/1.1
+> Soup-Debug-Timestamp: 1436526040
+> Soup-Debug: SoupSession 1 (0x697270), SoupMessage 3 (0x6f3560), SoupSocket 2 (0x7fffe4002d90)
+> Host: www.googleapis.com
+> Slug: sample.ogg
+> Transfer-Encoding: chunked
+> Content-Type: multipart/related; boundary=0003Z5W789deadbeefRTE456KlemsnoZV
+> Authorization: Bearer ya29.rAEcpg9Gg0tTwYPS1C3GGnpc00A7XjAUKJe_wWmIkt-XPaMeOcWW6v3yMlgAkNlrwAM1
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436526042
+< Soup-Debug: SoupMessage 3 (0x6f3560)
+< X-GUploader-UploadID: AEnB2UrP1nVummI_mjw0-oeSWd0KgqKHwrDUynBgbS_6ovyio8OY6A0FMhCPVyXKYQYjBFA7XF4JFHb91ybBVTUuMnJ3dCf7UQ
+< ETag: "iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/Lk_Eo1hcMJhjOQ3HB3tayaqGYfw"
+< Vary: Origin
+< Vary: X-Origin
+< X-Goog-Correlation-Id: fcDgG9SYgWo
+< Content-Type: application/json; charset=UTF-8
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Fri, 10 Jul 2015 11:00:42 GMT
+< Content-Length: 1100
+< Server: UploadServer
+< Alternate-Protocol: 443:quic,p=1
+<
+< {
+< "kind": "youtube#video",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/Lk_Eo1hcMJhjOQ3HB3tayaqGYfw\"",
+< "id": "fcDgG9SYgWo",
+< "snippet": {
+< "publishedAt": "2015-07-10T11:00:41.000Z",
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "title": "Bad Wedding Toast",
+< "description": "I gave a bad toast at my friend's wedding.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/fcDgG9SYgWo/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/fcDgG9SYgWo/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/fcDgG9SYgWo/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< }
+< },
+< "channelTitle": "GDataTest",
+< "tags": [
+< "toast",
+< "wedding"
+< ],
+< "categoryId": "22",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Bad Wedding Toast",
+< "description": "I gave a bad toast at my friend's wedding."
+< }
+< },
+< "status": {
+< "uploadStatus": "uploaded",
+< "privacyStatus": "public",
+< "license": "youtube",
+< "embeddable": true,
+< "publicStatsViewable": true
+< }
+< }
--- /dev/null
+> POST /upload/youtube/v3/videos?part=snippet,status,recordingDetails HTTP/1.1
+> Soup-Debug-Timestamp: 1436526039
+> Soup-Debug: SoupSession 1 (0x697270), SoupMessage 1 (0x6f3290), SoupSocket 1 (0x7fffe4002b20)
+> Host: www.googleapis.com
+> Slug: sample.ogg
+> Transfer-Encoding: chunked
+> Content-Type: multipart/related; boundary=0003Z5W789deadbeefRTE456KlemsnoZV
+> Authorization: Bearer ya29.rAEcpg9Gg0tTwYPS1C3GGnpc00A7XjAUKJe_wWmIkt-XPaMeOcWW6v3yMlgAkNlrwAM1
+> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
+> Connection: Keep-Alive
+
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436526040
+< Soup-Debug: SoupMessage 1 (0x6f3290)
+< X-GUploader-UploadID: AEnB2UquPIlzOSMOLUP40ys4YjTFLblJOaLnJFDsGmGmGoG6oTUD9fITUlDZKdU4pTCnlE1H2YIc2T1cms3s4l_iNdIH4TYvlQ
+< ETag: "iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/875j3xkJJ94CehJxw6Z0gpGzIcs"
+< Vary: Origin
+< Vary: X-Origin
+< X-Goog-Correlation-Id: Qtr-lqf5shw
+< Content-Type: application/json; charset=UTF-8
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Fri, 10 Jul 2015 11:00:40 GMT
+< Content-Length: 1100
+< Server: UploadServer
+< Alternate-Protocol: 443:quic,p=1
+<
+< {
+< "kind": "youtube#video",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/875j3xkJJ94CehJxw6Z0gpGzIcs\"",
+< "id": "Qtr-lqf5shw",
+< "snippet": {
+< "publishedAt": "2015-07-10T11:00:39.000Z",
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "title": "Bad Wedding Toast",
+< "description": "I gave a bad toast at my friend's wedding.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/Qtr-lqf5shw/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/Qtr-lqf5shw/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/Qtr-lqf5shw/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< }
+< },
+< "channelTitle": "GDataTest",
+< "tags": [
+< "toast",
+< "wedding"
+< ],
+< "categoryId": "22",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Bad Wedding Toast",
+< "description": "I gave a bad toast at my friend's wedding."
+< }
+< },
+< "status": {
+< "uploadStatus": "uploaded",
+< "privacyStatus": "public",
+< "license": "youtube",
+< "embeddable": true,
+< "publicStatsViewable": true
+< }
+< }
+
--- /dev/null
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * GData Client
+ * Copyright (C) Philip Withnall 2008–2010, 2015 <philip@tecnocode.co.uk>
+ *
+ * GData Client is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * GData Client is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "gdata.h"
+#include "common.h"
+#include "gdata-dummy-authorizer.h"
+
+static UhmServer *mock_server = NULL;
+
+#undef CLIENT_ID /* from common.h */
+
+#define DEVELOPER_KEY "AI39si7Me3Q7zYs6hmkFvpRBD2nrkVjYYsUO5lh_3HdOkGRc9g6Z4nzxZatk_aAo2EsA21k7vrda0OO6oFg2rnhMedZXPyXoEw"
+#define CLIENT_ID "352818697630-nqu2cmt5quqd6lr17ouoqmb684u84l1f.apps.googleusercontent.com"
+#define CLIENT_SECRET "-fA4pHQJxR3zJ-FyAMPQsikg"
+#define REDIRECT_URI "urn:ietf:wg:oauth:2.0:oob"
+
+/* Effectively gdata_test_mock_server_start_trace() but calling uhm_server_run() instead of uhm_server_start_trace(). */
+static void
+gdata_test_mock_server_run (UhmServer *server)
+{
+ const gchar *ip_address;
+ UhmResolver *resolver;
+
+ uhm_server_run (server);
+ gdata_test_set_https_port (server);
+
+ if (uhm_server_get_enable_online (server) == FALSE) {
+ /* Set up the expected domain names here. This should technically be split up between
+ * the different unit test suites, but that's too much effort. */
+ ip_address = uhm_server_get_address (server);
+ resolver = uhm_server_get_resolver (server);
+
+ uhm_resolver_add_A (resolver, "www.google.com", ip_address);
+ uhm_resolver_add_A (resolver, "gdata.youtube.com", ip_address);
+ uhm_resolver_add_A (resolver, "uploads.gdata.youtube.com", ip_address);
+ }
+}
+
+static void
+test_authentication (void)
+{
+ GDataOAuth2Authorizer *authorizer = NULL; /* owned */
+ gchar *authentication_uri, *authorisation_code;
+
+ gdata_test_mock_server_start_trace (mock_server, "authentication");
+
+ authorizer = gdata_oauth2_authorizer_new (CLIENT_ID, CLIENT_SECRET,
+ REDIRECT_URI,
+ GDATA_TYPE_YOUTUBE_SERVICE);
+
+ /* Get an authentication URI. */
+ authentication_uri = gdata_oauth2_authorizer_build_authentication_uri (authorizer, NULL, FALSE);
+ g_assert (authentication_uri != NULL);
+
+ /* Get the authorisation code off the user. */
+ if (uhm_server_get_enable_online (mock_server)) {
+ authorisation_code = gdata_test_query_user_for_verifier (authentication_uri);
+ } else {
+ /* Hard coded, extracted from the trace file. */
+ authorisation_code = g_strdup ("4/9qV_LanNEOUOL4sftMwUp4cfa_yeF"
+ "assB6-ys5EkA5o.4rgOzrZMXgcboiIB"
+ "eO6P2m-GWLMXmgI");
+ }
+
+ g_free (authentication_uri);
+
+ if (authorisation_code == NULL) {
+ /* Skip tests. */
+ goto skip_test;
+ }
+
+ /* Authorise the token */
+ g_assert (gdata_oauth2_authorizer_request_authorization (authorizer, authorisation_code, NULL, NULL) == TRUE);
+
+ /* Check all is as it should be */
+ g_assert (gdata_authorizer_is_authorized_for_domain (GDATA_AUTHORIZER (authorizer),
+ gdata_youtube_service_get_primary_authorization_domain ()) == TRUE);
+
+skip_test:
+ g_free (authorisation_code);
+ g_object_unref (authorizer);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_service_properties (void)
+{
+ GDataService *service;
+
+ /* Create a service */
+ service = GDATA_SERVICE (gdata_youtube_service_new (DEVELOPER_KEY, NULL));
+
+ g_assert (service != NULL);
+ g_assert (GDATA_IS_SERVICE (service));
+ g_assert_cmpstr (gdata_youtube_service_get_developer_key (GDATA_YOUTUBE_SERVICE (service)), ==, DEVELOPER_KEY);
+
+ g_object_unref (service);
+}
+
+static void
+test_query_standard_feeds (gconstpointer service)
+{
+ GDataFeed *feed;
+ GError *error = NULL;
+ guint i;
+ gulong filter_id;
+ GDataYouTubeStandardFeedType feeds[] = {
+ /* This must be kept up-to-date with GDataYouTubeStandardFeedType. */
+ GDATA_YOUTUBE_TOP_RATED_FEED,
+ GDATA_YOUTUBE_TOP_FAVORITES_FEED,
+ GDATA_YOUTUBE_MOST_VIEWED_FEED,
+ GDATA_YOUTUBE_MOST_POPULAR_FEED,
+ GDATA_YOUTUBE_MOST_RECENT_FEED,
+ GDATA_YOUTUBE_MOST_DISCUSSED_FEED,
+ GDATA_YOUTUBE_MOST_LINKED_FEED,
+ GDATA_YOUTUBE_MOST_RESPONDED_FEED,
+ GDATA_YOUTUBE_RECENTLY_FEATURED_FEED,
+ GDATA_YOUTUBE_WATCH_ON_MOBILE_FEED,
+ };
+ const gchar *ignore_query_param_values[] = {
+ "publishedAfter",
+ NULL,
+ };
+
+ filter_id = uhm_server_filter_ignore_parameter_values (mock_server,
+ ignore_query_param_values);
+ gdata_test_mock_server_start_trace (mock_server, "query-standard-feeds");
+
+ for (i = 0; i < G_N_ELEMENTS (feeds); i++) {
+ feed = gdata_youtube_service_query_standard_feed (GDATA_YOUTUBE_SERVICE (service), feeds[i], NULL, NULL, NULL, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_FEED (feed));
+ g_clear_error (&error);
+
+ g_assert_cmpuint (g_list_length (gdata_feed_get_entries (feed)), >, 0);
+
+ g_object_unref (feed);
+ }
+
+ uhm_server_end_trace (mock_server);
+ uhm_server_compare_messages_remove_filter (mock_server, filter_id);
+}
+
+static void
+test_query_standard_feed (gconstpointer service)
+{
+ GDataFeed *feed;
+ GError *error = NULL;
+ gulong filter_id;
+ const gchar *ignore_query_param_values[] = {
+ "publishedAfter",
+ NULL,
+ };
+
+ filter_id = uhm_server_filter_ignore_parameter_values (mock_server,
+ ignore_query_param_values);
+ gdata_test_mock_server_start_trace (mock_server, "query-standard-feed");
+
+ feed = gdata_youtube_service_query_standard_feed (GDATA_YOUTUBE_SERVICE (service), GDATA_YOUTUBE_TOP_RATED_FEED, NULL, NULL, NULL, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_FEED (feed));
+ g_clear_error (&error);
+
+ g_assert_cmpuint (g_list_length (gdata_feed_get_entries (feed)), >, 0);
+
+ g_object_unref (feed);
+
+ uhm_server_end_trace (mock_server);
+ uhm_server_compare_messages_remove_filter (mock_server, filter_id);
+}
+
+static void
+test_query_standard_feed_with_query (gconstpointer service)
+{
+ GDataYouTubeQuery *query;
+ GDataFeed *feed;
+ GError *error = NULL;
+ gulong filter_id;
+ const gchar *ignore_query_param_values[] = {
+ "publishedAfter",
+ NULL,
+ };
+
+ filter_id = uhm_server_filter_ignore_parameter_values (mock_server,
+ ignore_query_param_values);
+
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
+ gdata_test_mock_server_start_trace (mock_server, "query-standard-feed-with-query");
+
+ query = gdata_youtube_query_new (NULL);
+ gdata_youtube_query_set_language (query, "fr");
+
+ feed = gdata_youtube_service_query_standard_feed (GDATA_YOUTUBE_SERVICE (service), GDATA_YOUTUBE_TOP_RATED_FEED, GDATA_QUERY (query), NULL, NULL, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_FEED (feed));
+ g_clear_error (&error);
+
+ g_assert_cmpuint (g_list_length (gdata_feed_get_entries (feed)), >, 0);
+
+ g_object_unref (query);
+ g_object_unref (feed);
+
+ uhm_server_end_trace (mock_server);
+ uhm_server_compare_messages_remove_filter (mock_server, filter_id);
+
+ G_GNUC_END_IGNORE_DEPRECATIONS
+}
+
+/* HTTP message responses and the expected associated GData error domain/code. */
+static const GDataTestRequestErrorData query_standard_feed_errors[] = {
+ /* Generic network errors. */
+ { SOUP_STATUS_BAD_REQUEST, "Bad Request", "Invalid parameter ‘foobar’.",
+ gdata_service_error_quark, GDATA_SERVICE_ERROR_PROTOCOL_ERROR },
+ { SOUP_STATUS_NOT_FOUND, "Not Found", "Login page wasn't found for no good reason at all.",
+ gdata_service_error_quark, GDATA_SERVICE_ERROR_NOT_FOUND },
+ { SOUP_STATUS_PRECONDITION_FAILED, "Precondition Failed", "Not allowed to log in at this time, possibly.",
+ gdata_service_error_quark, GDATA_SERVICE_ERROR_CONFLICT },
+ { SOUP_STATUS_INTERNAL_SERVER_ERROR, "Internal Server Error", "Whoops.",
+ gdata_service_error_quark, GDATA_SERVICE_ERROR_PROTOCOL_ERROR },
+#if 0
+FIXME
+ /* Specific query errors. */
+ { SOUP_STATUS_FORBIDDEN, "Too Many Calls",
+ "<?xml version='1.0' encoding='UTF-8'?><errors><error><domain>yt:quota</domain><code>too_many_recent_calls</code></error></errors>",
+ gdata_youtube_service_error_quark, GDATA_YOUTUBE_SERVICE_ERROR_API_QUOTA_EXCEEDED },
+ { SOUP_STATUS_FORBIDDEN, "Too Many Entries",
+ "<?xml version='1.0' encoding='UTF-8'?><errors><error><domain>yt:quota</domain><code>too_many_entries</code></error></errors>",
+ gdata_youtube_service_error_quark, GDATA_YOUTUBE_SERVICE_ERROR_ENTRY_QUOTA_EXCEEDED },
+ { SOUP_STATUS_SERVICE_UNAVAILABLE, "Maintenance",
+ "<?xml version='1.0' encoding='UTF-8'?><errors><error><domain>yt:service</domain><code>disabled_in_maintenance_mode</code></error></errors>",
+ gdata_service_error_quark, GDATA_SERVICE_ERROR_UNAVAILABLE },
+ { SOUP_STATUS_FORBIDDEN, "YouTube Signup Required",
+ "<?xml version='1.0' encoding='UTF-8'?><errors><error><domain>yt:service</domain><code>youtube_signup_required</code></error></errors>",
+ gdata_youtube_service_error_quark, GDATA_YOUTUBE_SERVICE_ERROR_CHANNEL_REQUIRED },
+ { SOUP_STATUS_FORBIDDEN, "Forbidden",
+ "<?xml version='1.0' encoding='UTF-8'?><errors><error><domain>yt:authentication</domain><code>TokenExpired</code>"
+ "<location type='header'>Authorization: GoogleLogin</location></error></errors>",
+ gdata_service_error_quark, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED },
+ /* Malformed YouTube errors to test parser error handling. */
+ { SOUP_STATUS_INTERNAL_SERVER_ERROR, "Malformed XML",
+ "<?xml version='1.0' encoding='UTF-8'?><errors>",
+ gdata_service_error_quark, GDATA_SERVICE_ERROR_PROTOCOL_ERROR },
+ { SOUP_STATUS_FORBIDDEN, "Empty Response", "",
+ gdata_service_error_quark, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED },
+ { SOUP_STATUS_INTERNAL_SERVER_ERROR, "Unknown Element",
+ "<?xml version='1.0' encoding='UTF-8'?><errors> <error> <foobar /> </error> </errors>",
+ gdata_service_error_quark, GDATA_SERVICE_ERROR_PROTOCOL_ERROR },
+ { SOUP_STATUS_INTERNAL_SERVER_ERROR, "Wrong Top-Level Element",
+ "<?xml version='1.0' encoding='UTF-8'?><nonerrors></nonerrors>",
+ gdata_service_error_quark, GDATA_SERVICE_ERROR_PROTOCOL_ERROR },
+ { SOUP_STATUS_FORBIDDEN, "Unknown Error Code (Service)",
+ "<?xml version='1.0' encoding='UTF-8'?><errors><error><domain>yt:service</domain><code>UnknownCode</code></error></errors>",
+ gdata_service_error_quark, GDATA_SERVICE_ERROR_PROTOCOL_ERROR },
+ { SOUP_STATUS_FORBIDDEN, "Unknown Error Code (Quota)",
+ "<?xml version='1.0' encoding='UTF-8'?><errors><error><domain>yt:quota</domain><code>UnknownCode</code></error></errors>",
+ gdata_service_error_quark, GDATA_SERVICE_ERROR_PROTOCOL_ERROR },
+ { SOUP_STATUS_FORBIDDEN, "Unknown Error Domain",
+ "<?xml version='1.0' encoding='UTF-8'?><errors><error><domain>yt:foobaz</domain><code>TokenExpired</code></error></errors>",
+ gdata_service_error_quark, GDATA_SERVICE_ERROR_PROTOCOL_ERROR },
+#endif
+};
+
+static void
+test_query_standard_feed_error (gconstpointer service)
+{
+ GDataFeed *feed;
+ GError *error = NULL;
+ gulong handler_id, filter_id;
+ guint i;
+ const gchar *ignore_query_param_values[] = {
+ "publishedAfter",
+ NULL,
+ };
+
+ if (uhm_server_get_enable_logging (mock_server) == TRUE) {
+ g_test_message ("Ignoring test due to logging being enabled.");
+ return;
+ } else if (uhm_server_get_enable_online (mock_server) == TRUE) {
+ g_test_message ("Ignoring test due to running online and test not being reproducible.");
+ return;
+ }
+
+ filter_id = uhm_server_filter_ignore_parameter_values (mock_server,
+ ignore_query_param_values);
+
+ for (i = 0; i < G_N_ELEMENTS (query_standard_feed_errors); i++) {
+ const GDataTestRequestErrorData *data = &query_standard_feed_errors[i];
+
+ handler_id = g_signal_connect (mock_server, "handle-message", (GCallback) gdata_test_mock_server_handle_message_error, (gpointer) data);
+ gdata_test_mock_server_run (mock_server);
+
+ /* Query the feed. */
+ feed = gdata_youtube_service_query_standard_feed (GDATA_YOUTUBE_SERVICE (service), GDATA_YOUTUBE_TOP_RATED_FEED, NULL, NULL, NULL, NULL, &error);
+ g_assert_error (error, data->error_domain_func (), data->error_code);
+ g_assert (feed == NULL);
+ g_clear_error (&error);
+
+ uhm_server_stop (mock_server);
+ g_signal_handler_disconnect (mock_server, handler_id);
+ }
+
+ uhm_server_compare_messages_remove_filter (mock_server, filter_id);
+}
+
+static void
+test_query_standard_feed_timeout (gconstpointer service)
+{
+ GDataFeed *feed;
+ GError *error = NULL;
+ gulong handler_id, filter_id;
+ const gchar *ignore_query_param_values[] = {
+ "publishedAfter",
+ NULL,
+ };
+
+ if (uhm_server_get_enable_logging (mock_server) == TRUE) {
+ g_test_message ("Ignoring test due to logging being enabled.");
+ return;
+ } else if (uhm_server_get_enable_online (mock_server) == TRUE) {
+ g_test_message ("Ignoring test due to running online and test not being reproducible.");
+ return;
+ }
+
+ filter_id = uhm_server_filter_ignore_parameter_values (mock_server,
+ ignore_query_param_values);
+ handler_id = g_signal_connect (mock_server, "handle-message", (GCallback) gdata_test_mock_server_handle_message_timeout, NULL);
+ gdata_test_mock_server_run (mock_server);
+
+ /* Set the service's timeout as low as possible (1 second). */
+ gdata_service_set_timeout (GDATA_SERVICE (service), 1);
+
+ /* Query the feed. */
+ feed = gdata_youtube_service_query_standard_feed (GDATA_YOUTUBE_SERVICE (service), GDATA_YOUTUBE_TOP_RATED_FEED, NULL, NULL, NULL, NULL, &error);
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_NETWORK_ERROR);
+ g_assert (feed == NULL);
+ g_clear_error (&error);
+
+ uhm_server_stop (mock_server);
+ g_signal_handler_disconnect (mock_server, handler_id);
+ uhm_server_compare_messages_remove_filter (mock_server, filter_id);
+}
+
+typedef struct {
+ GDataAsyncTestData async_data;
+ gulong filter_id;
+} StandardFeedData;
+
+static void
+set_up_standard_feed_async (StandardFeedData *standard_feed_data,
+ gconstpointer test_data)
+{
+ const gchar *ignore_query_param_values[] = {
+ "publishedAfter",
+ NULL,
+ };
+
+ gdata_set_up_async_test_data (&standard_feed_data->async_data,
+ test_data);
+ standard_feed_data->filter_id =
+ uhm_server_filter_ignore_parameter_values (mock_server,
+ ignore_query_param_values);
+}
+
+static void
+tear_down_standard_feed_async (StandardFeedData *standard_feed_data,
+ gconstpointer test_data)
+{
+ uhm_server_compare_messages_remove_filter (mock_server,
+ standard_feed_data->filter_id);
+ gdata_tear_down_async_test_data (&standard_feed_data->async_data,
+ test_data);
+}
+
+GDATA_ASYNC_TEST_FUNCTIONS (query_standard_feed, void,
+G_STMT_START {
+ gdata_youtube_service_query_standard_feed_async (GDATA_YOUTUBE_SERVICE (service), GDATA_YOUTUBE_TOP_RATED_FEED, NULL, cancellable,
+ NULL, NULL, NULL, async_ready_callback, async_data);
+} G_STMT_END,
+G_STMT_START {
+ GDataFeed *feed;
+
+ feed = gdata_service_query_finish (GDATA_SERVICE (obj), async_result, &error);
+
+ if (error == NULL) {
+ g_assert (GDATA_IS_FEED (feed));
+
+ g_assert_cmpuint (g_list_length (gdata_feed_get_entries (feed)), >, 0);
+
+ g_object_unref (feed);
+ } else {
+ g_assert (feed == NULL);
+ }
+} G_STMT_END);
+
+static void
+test_query_standard_feed_async_progress_closure (gconstpointer service)
+{
+ GDataAsyncProgressClosure *data = g_slice_new0 (GDataAsyncProgressClosure);
+ gulong filter_id;
+ const gchar *ignore_query_param_values[] = {
+ "publishedAfter",
+ NULL,
+ };
+
+ g_assert (service != NULL);
+
+ filter_id = uhm_server_filter_ignore_parameter_values (mock_server,
+ ignore_query_param_values);
+ gdata_test_mock_server_start_trace (mock_server, "query-standard-feed-async-progress-closure");
+
+ data->main_loop = g_main_loop_new (NULL, TRUE);
+
+ gdata_youtube_service_query_standard_feed_async (GDATA_YOUTUBE_SERVICE (service), GDATA_YOUTUBE_TOP_RATED_FEED, NULL, NULL,
+ (GDataQueryProgressCallback) gdata_test_async_progress_callback,
+ data, (GDestroyNotify) gdata_test_async_progress_closure_free,
+ (GAsyncReadyCallback) gdata_test_async_progress_finish_callback, data);
+ g_main_loop_run (data->main_loop);
+ g_main_loop_unref (data->main_loop);
+
+ /* Check that both callbacks were called exactly once */
+ g_assert_cmpuint (data->progress_destroy_notify_count, ==, 1);
+ g_assert_cmpuint (data->async_ready_notify_count, ==, 1);
+
+ g_slice_free (GDataAsyncProgressClosure, data);
+
+ uhm_server_end_trace (mock_server);
+ uhm_server_compare_messages_remove_filter (mock_server, filter_id);
+}
+
+static GDataYouTubeVideo *
+get_video_for_related (void)
+{
+ GDataYouTubeVideo *video;
+ GError *error = NULL;
+
+ video = GDATA_YOUTUBE_VIDEO (gdata_parsable_new_from_json (GDATA_TYPE_YOUTUBE_VIDEO,
+ "{"
+ "'kind': 'youtube#video',"
+ "'id': 'q1UPMEmCqZo'"
+ "}", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_YOUTUBE_VIDEO (video));
+ g_clear_error (&error);
+
+ return video;
+}
+
+static void
+test_query_related (gconstpointer service)
+{
+ GDataFeed *feed;
+ GDataYouTubeVideo *video;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "query-related");
+
+ video = get_video_for_related ();
+ feed = gdata_youtube_service_query_related (GDATA_YOUTUBE_SERVICE (service), video, NULL, NULL, NULL, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_FEED (feed));
+ g_clear_error (&error);
+
+ /* TODO: check entries and feed properties */
+
+ g_object_unref (video);
+ g_object_unref (feed);
+
+ uhm_server_end_trace (mock_server);
+}
+
+GDATA_ASYNC_TEST_FUNCTIONS (query_related, void,
+G_STMT_START {
+ GDataYouTubeVideo *video;
+
+ video = get_video_for_related ();
+ gdata_youtube_service_query_related_async (GDATA_YOUTUBE_SERVICE (service), video, NULL, cancellable, NULL,
+ NULL, NULL, async_ready_callback, async_data);
+ g_object_unref (video);
+} G_STMT_END,
+G_STMT_START {
+ GDataFeed *feed;
+
+ feed = gdata_service_query_finish (GDATA_SERVICE (obj), async_result, &error);
+
+ if (error == NULL) {
+ g_assert (GDATA_IS_FEED (feed));
+ /* TODO: Tests? */
+
+ g_object_unref (feed);
+ } else {
+ g_assert (feed == NULL);
+ }
+} G_STMT_END);
+
+static void
+test_query_related_async_progress_closure (gconstpointer service)
+{
+ GDataAsyncProgressClosure *data = g_slice_new0 (GDataAsyncProgressClosure);
+ GDataYouTubeVideo *video;
+
+ g_assert (service != NULL);
+
+ gdata_test_mock_server_start_trace (mock_server, "query-related-async-progress-closure");
+
+ data->main_loop = g_main_loop_new (NULL, TRUE);
+ video = get_video_for_related ();
+
+ gdata_youtube_service_query_related_async (GDATA_YOUTUBE_SERVICE (service), video, NULL, NULL,
+ (GDataQueryProgressCallback) gdata_test_async_progress_callback,
+ data, (GDestroyNotify) gdata_test_async_progress_closure_free,
+ (GAsyncReadyCallback) gdata_test_async_progress_finish_callback, data);
+ g_object_unref (video);
+
+ g_main_loop_run (data->main_loop);
+ g_main_loop_unref (data->main_loop);
+
+ /* Check that both callbacks were called exactly once */
+ g_assert_cmpuint (data->progress_destroy_notify_count, ==, 1);
+ g_assert_cmpuint (data->async_ready_notify_count, ==, 1);
+
+ g_slice_free (GDataAsyncProgressClosure, data);
+
+ uhm_server_end_trace (mock_server);
+}
+
+typedef struct {
+ GDataYouTubeService *service;
+ GDataYouTubeVideo *video;
+ GDataYouTubeVideo *updated_video;
+ GFile *video_file;
+ gchar *slug;
+ gchar *content_type;
+} UploadData;
+
+static void
+set_up_upload (UploadData *data, gconstpointer service)
+{
+ GDataMediaCategory *category;
+ GFileInfo *file_info;
+ const gchar * const tags[] = { "toast", "wedding", NULL };
+ gchar *path = NULL;
+ GError *error = NULL;
+
+ data->service = g_object_ref ((gpointer) service);
+
+ /* Create the metadata for the video being uploaded */
+ data->video = gdata_youtube_video_new (NULL);
+
+ gdata_entry_set_title (GDATA_ENTRY (data->video), "Bad Wedding Toast");
+ gdata_youtube_video_set_description (data->video, "I gave a bad toast at my friend's wedding.");
+ category = gdata_media_category_new ("22", NULL, NULL);
+ gdata_youtube_video_set_category (data->video, category);
+ g_object_unref (category);
+ gdata_youtube_video_set_keywords (data->video, tags);
+
+ /* Get a file to upload */
+ /* TODO: fix the path */
+ path = g_test_build_filename (G_TEST_DIST, "sample.ogg", NULL);
+ data->video_file = g_file_new_for_path (path);
+ g_free (path);
+
+ /* Get the file's info */
+ file_info = g_file_query_info (data->video_file, G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME "," G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
+ G_FILE_QUERY_INFO_NONE, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (G_IS_FILE_INFO (file_info));
+
+ data->slug = g_strdup (g_file_info_get_display_name (file_info));
+ data->content_type = g_strdup (g_file_info_get_content_type (file_info));
+
+ g_object_unref (file_info);
+}
+
+static void
+tear_down_upload (UploadData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "teardown-upload");
+
+ /* Delete the uploaded video, if possible */
+ if (data->updated_video != NULL) {
+ gdata_service_delete_entry (GDATA_SERVICE (service), gdata_youtube_service_get_primary_authorization_domain (),
+ GDATA_ENTRY (data->updated_video), NULL, NULL);
+ g_object_unref (data->updated_video);
+ }
+
+ g_object_unref (data->video);
+ g_object_unref (data->video_file);
+ g_free (data->slug);
+ g_free (data->content_type);
+ g_object_unref (data->service);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_upload_simple (UploadData *data, gconstpointer service)
+{
+ GDataUploadStream *upload_stream;
+ GFileInputStream *file_stream;
+ const gchar * const *tags, * const *tags2;
+ gssize transfer_size;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "upload-simple");
+
+ /* Prepare the upload stream */
+ upload_stream = gdata_youtube_service_upload_video (GDATA_YOUTUBE_SERVICE (service), data->video, data->slug, data->content_type, NULL,
+ &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_UPLOAD_STREAM (upload_stream));
+
+ /* Get an input stream for the file */
+ file_stream = g_file_read (data->video_file, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (G_IS_FILE_INPUT_STREAM (file_stream));
+
+ /* Upload the video */
+ transfer_size = g_output_stream_splice (G_OUTPUT_STREAM (upload_stream), G_INPUT_STREAM (file_stream),
+ G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, NULL, &error);
+ g_assert_no_error (error);
+ g_assert_cmpint (transfer_size, >, 0);
+
+ /* Finish off the upload */
+ data->updated_video = gdata_youtube_service_finish_video_upload (GDATA_YOUTUBE_SERVICE (service), upload_stream, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_YOUTUBE_VIDEO (data->updated_video));
+
+ g_object_unref (file_stream);
+ g_object_unref (upload_stream);
+
+ /* Check the video's properties */
+ g_assert (gdata_entry_is_inserted (GDATA_ENTRY (data->updated_video)));
+ g_assert_cmpstr (gdata_entry_get_title (GDATA_ENTRY (data->updated_video)), ==, gdata_entry_get_title (GDATA_ENTRY (data->video)));
+ g_assert_cmpstr (gdata_youtube_video_get_description (data->updated_video), ==, gdata_youtube_video_get_description (data->video));
+ g_assert_cmpstr (gdata_media_category_get_category (gdata_youtube_video_get_category (data->updated_video)), ==,
+ gdata_media_category_get_category (gdata_youtube_video_get_category (data->video)));
+
+ tags = gdata_youtube_video_get_keywords (data->video);
+ tags2 = gdata_youtube_video_get_keywords (data->updated_video);
+ g_assert_cmpuint (g_strv_length ((gchar**) tags2), ==, g_strv_length ((gchar**) tags));
+ g_assert_cmpstr (tags2[0], ==, tags[0]);
+ g_assert_cmpstr (tags2[1], ==, tags[1]);
+ g_assert_cmpstr (tags2[2], ==, tags[2]);
+
+ uhm_server_end_trace (mock_server);
+}
+
+GDATA_ASYNC_CLOSURE_FUNCTIONS (upload, UploadData);
+
+GDATA_ASYNC_TEST_FUNCTIONS (upload, UploadData,
+G_STMT_START {
+ GDataUploadStream *upload_stream;
+ GFileInputStream *file_stream;
+ GError *error = NULL;
+
+ /* Prepare the upload stream */
+ upload_stream = gdata_youtube_service_upload_video (GDATA_YOUTUBE_SERVICE (service), data->video, data->slug,
+ data->content_type, cancellable, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_UPLOAD_STREAM (upload_stream));
+
+ /* Get an input stream for the file */
+ file_stream = g_file_read (data->video_file, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (G_IS_FILE_INPUT_STREAM (file_stream));
+
+ /* Upload the video asynchronously */
+ g_output_stream_splice_async (G_OUTPUT_STREAM (upload_stream), G_INPUT_STREAM (file_stream),
+ G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, G_PRIORITY_DEFAULT, NULL,
+ async_ready_callback, async_data);
+
+ g_object_unref (file_stream);
+ g_object_unref (upload_stream);
+} G_STMT_END,
+G_STMT_START {
+ GOutputStream *stream = G_OUTPUT_STREAM (obj);
+ const gchar * const *tags;
+ const gchar * const *tags2;
+ gssize transfer_size;
+ GError *upload_error = NULL;
+
+ /* Finish off the transfer */
+ transfer_size = g_output_stream_splice_finish (stream, async_result, &error);
+
+ if (error == NULL) {
+ g_assert_cmpint (transfer_size, >, 0);
+
+ /* Finish off the upload */
+ data->updated_video = gdata_youtube_service_finish_video_upload (data->service, GDATA_UPLOAD_STREAM (stream), &upload_error);
+ g_assert_no_error (upload_error);
+ g_assert (GDATA_IS_YOUTUBE_VIDEO (data->updated_video));
+
+ /* Check the video's properties */
+ g_assert (gdata_entry_is_inserted (GDATA_ENTRY (data->updated_video)));
+ g_assert_cmpstr (gdata_entry_get_title (GDATA_ENTRY (data->updated_video)), ==, gdata_entry_get_title (GDATA_ENTRY (data->video)));
+ g_assert_cmpstr (gdata_youtube_video_get_description (data->updated_video), ==, gdata_youtube_video_get_description (data->video));
+ g_assert_cmpstr (gdata_media_category_get_category (gdata_youtube_video_get_category (data->updated_video)), ==,
+ gdata_media_category_get_category (gdata_youtube_video_get_category (data->video)));
+
+ tags = gdata_youtube_video_get_keywords (data->video);
+ tags2 = gdata_youtube_video_get_keywords (data->updated_video);
+ g_assert_cmpuint (g_strv_length ((gchar**) tags2), ==, g_strv_length ((gchar**) tags));
+ g_assert_cmpstr (tags2[0], ==, tags[0]);
+ g_assert_cmpstr (tags2[1], ==, tags[1]);
+ g_assert_cmpstr (tags2[2], ==, tags[2]);
+ } else {
+ g_assert_cmpint (transfer_size, ==, -1);
+
+ /* Finish off the upload */
+ data->updated_video = gdata_youtube_service_finish_video_upload (data->service, GDATA_UPLOAD_STREAM (stream), &upload_error);
+ g_assert_no_error (upload_error);
+ g_assert (data->updated_video == NULL);
+ }
+
+ g_clear_error (&upload_error);
+} G_STMT_END);
+
+static void
+test_parsing_app_control (void)
+{
+ GDataYouTubeVideo *video;
+ GDataYouTubeState *state;
+ GError *error = NULL;
+
+ video = GDATA_YOUTUBE_VIDEO (gdata_parsable_new_from_json (GDATA_TYPE_YOUTUBE_VIDEO,
+ "{"
+ "'kind': 'youtube#video',"
+ "'etag': '\"tbWC5XrSXxe1WOAx6MK9z4hHSU8/X_byq2BdOVgHzCA-ScpZbTWmgfQ\"',"
+ "'id': 'JAagedeKdcQ',"
+ "'snippet': {"
+ "'publishedAt': '2006-05-16T14:06:37.000Z',"
+ "'channelId': 'UCCS6UQvicRHyn1whEUDEMUQ',"
+ "'title': 'Judas Priest - Painkiller',"
+ "'description': 'Videoclip de Judas Priest',"
+ "'thumbnails': {"
+ "'default': {"
+ "'url': 'https://i.ytimg.com/vi/JAagedeKdcQ/default.jpg',"
+ "'width': 120,"
+ "'height': 90"
+ "},"
+ "'medium': {"
+ "'url': 'https://i.ytimg.com/vi/JAagedeKdcQ/mqdefault.jpg',"
+ "'width': 320,"
+ "'height': 180"
+ "},"
+ "'high': {"
+ "'url': 'https://i.ytimg.com/vi/JAagedeKdcQ/hqdefault.jpg',"
+ "'width': 480,"
+ "'height': 360"
+ "}"
+ "},"
+ "'channelTitle': 'eluves',"
+ "'categoryId': '10',"
+ "'liveBroadcastContent': 'none',"
+ "'localized': {"
+ "'title': 'Judas Priest - Painkiller',"
+ "'description': 'Videoclip de Judas Priest'"
+ "}"
+ "},"
+ "'contentDetails': {"
+ "'duration': 'PT6M',"
+ "'dimension': '2d',"
+ "'definition': 'sd',"
+ "'caption': 'false',"
+ "'licensedContent': false,"
+ "'regionRestriction': {"
+ "'blocked': ["
+ "'RU',"
+ "'RW',"
+ "'RS',"
+ "'RO',"
+ "'RE',"
+ "'BL',"
+ "'BM',"
+ "'BN',"
+ "'BO',"
+ "'JP',"
+ "'BI',"
+ "'BJ',"
+ "'BD',"
+ "'BE',"
+ "'BF',"
+ "'BG',"
+ "'YT',"
+ "'BB',"
+ "'CX',"
+ "'JE',"
+ "'BY',"
+ "'BZ',"
+ "'BT',"
+ "'JM',"
+ "'BV',"
+ "'BW',"
+ "'YE',"
+ "'BQ',"
+ "'BR',"
+ "'BS',"
+ "'IM',"
+ "'IL',"
+ "'IO',"
+ "'IN',"
+ "'IE',"
+ "'ID',"
+ "'QA',"
+ "'TM',"
+ "'IQ',"
+ "'IS',"
+ "'IR',"
+ "'IT',"
+ "'TK',"
+ "'AE',"
+ "'AD',"
+ "'AG',"
+ "'AF',"
+ "'AI',"
+ "'AM',"
+ "'AL',"
+ "'AO',"
+ "'AQ',"
+ "'AS',"
+ "'AR',"
+ "'AU',"
+ "'AT',"
+ "'AW',"
+ "'TG',"
+ "'AX',"
+ "'AZ',"
+ "'PR',"
+ "'HK',"
+ "'HN',"
+ "'PW',"
+ "'PT',"
+ "'HM',"
+ "'PY',"
+ "'PA',"
+ "'PF',"
+ "'PG',"
+ "'PE',"
+ "'HR',"
+ "'PK',"
+ "'PH',"
+ "'PN',"
+ "'HT',"
+ "'HU',"
+ "'OM',"
+ "'WS',"
+ "'WF',"
+ "'BH',"
+ "'KP',"
+ "'TT',"
+ "'GG',"
+ "'GF',"
+ "'GE',"
+ "'GD',"
+ "'GB',"
+ "'VN',"
+ "'VA',"
+ "'GM',"
+ "'VC',"
+ "'VE',"
+ "'GI',"
+ "'VG',"
+ "'GW',"
+ "'GU',"
+ "'GT',"
+ "'GS',"
+ "'GR',"
+ "'GQ',"
+ "'GP',"
+ "'VU',"
+ "'GY',"
+ "'NA',"
+ "'NC',"
+ "'NE',"
+ "'NF',"
+ "'NG',"
+ "'NI',"
+ "'NL',"
+ "'BA',"
+ "'NO',"
+ "'NP',"
+ "'NR',"
+ "'NU',"
+ "'NZ',"
+ "'PM',"
+ "'UM',"
+ "'TV',"
+ "'UG',"
+ "'UA',"
+ "'FI',"
+ "'FJ',"
+ "'FK',"
+ "'UY',"
+ "'FM',"
+ "'CN',"
+ "'UZ',"
+ "'US',"
+ "'ME',"
+ "'MD',"
+ "'MG',"
+ "'MF',"
+ "'MA',"
+ "'MC',"
+ "'VI',"
+ "'MM',"
+ "'ML',"
+ "'MO',"
+ "'FO',"
+ "'MH',"
+ "'MK',"
+ "'MU',"
+ "'MT',"
+ "'MW',"
+ "'MV',"
+ "'MQ',"
+ "'MP',"
+ "'MS',"
+ "'MR',"
+ "'CO',"
+ "'CV',"
+ "'MY',"
+ "'MX',"
+ "'MZ',"
+ "'TN',"
+ "'TO',"
+ "'TL',"
+ "'JO',"
+ "'TJ',"
+ "'GA',"
+ "'TH',"
+ "'TF',"
+ "'ET',"
+ "'TD',"
+ "'TC',"
+ "'ES',"
+ "'ER',"
+ "'TZ',"
+ "'EH',"
+ "'GN',"
+ "'EE',"
+ "'TW',"
+ "'EG',"
+ "'TR',"
+ "'CA',"
+ "'EC',"
+ "'GL',"
+ "'LB',"
+ "'LC',"
+ "'LA',"
+ "'MN',"
+ "'LK',"
+ "'LI',"
+ "'LV',"
+ "'LT',"
+ "'LU',"
+ "'LR',"
+ "'LS',"
+ "'PS',"
+ "'KZ',"
+ "'GH',"
+ "'LY',"
+ "'DZ',"
+ "'DO',"
+ "'DM',"
+ "'DJ',"
+ "'PL',"
+ "'DK',"
+ "'DE',"
+ "'SZ',"
+ "'SY',"
+ "'SX',"
+ "'SS',"
+ "'SR',"
+ "'SV',"
+ "'ST',"
+ "'SK',"
+ "'SJ',"
+ "'SI',"
+ "'SH',"
+ "'SO',"
+ "'SN',"
+ "'SM',"
+ "'SL',"
+ "'SC',"
+ "'SB',"
+ "'SA',"
+ "'FR',"
+ "'SG',"
+ "'SE',"
+ "'SD',"
+ "'CK',"
+ "'KR',"
+ "'CI',"
+ "'CH',"
+ "'KW',"
+ "'ZA',"
+ "'CM',"
+ "'CL',"
+ "'CC',"
+ "'ZM',"
+ "'KY',"
+ "'CG',"
+ "'CF',"
+ "'CD',"
+ "'CZ',"
+ "'CY',"
+ "'ZW',"
+ "'KG',"
+ "'CU',"
+ "'KE',"
+ "'CR',"
+ "'KI',"
+ "'KH',"
+ "'CW',"
+ "'KN',"
+ "'KM'"
+ "]"
+ "}"
+ "},"
+ "'status': {"
+ "'uploadStatus': 'processed',"
+ "'privacyStatus': 'private',"
+ "'license': 'youtube',"
+ "'embeddable': true,"
+ "'publicStatsViewable': true"
+ "},"
+ "'statistics': {"
+ "'viewCount': '4369107',"
+ "'likeCount': '13619',"
+ "'dislikeCount': '440',"
+ "'favoriteCount': '0',"
+ "'commentCount': '11181'"
+ "}"
+ "}", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_YOUTUBE_VIDEO (video));
+ g_clear_error (&error);
+
+ /* Test the app:control values */
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ g_assert (gdata_youtube_video_is_draft (video) == TRUE);
+ G_GNUC_END_IGNORE_DEPRECATIONS
+
+ state = gdata_youtube_video_get_state (video);
+ g_assert_cmpstr (gdata_youtube_state_get_name (state), ==, NULL);
+ g_assert_cmpstr (gdata_youtube_state_get_message (state), ==, NULL);
+ g_assert (gdata_youtube_state_get_reason_code (state) == NULL);
+ g_assert (gdata_youtube_state_get_help_uri (state) == NULL);
+
+ /* TODO: more tests on entry properties */
+
+ g_object_unref (video);
+}
+
+static void
+test_parsing_yt_recorded (void)
+{
+ GDataYouTubeVideo *video;
+ gint64 recorded;
+ GError *error = NULL;
+
+ video = GDATA_YOUTUBE_VIDEO (gdata_parsable_new_from_json (GDATA_TYPE_YOUTUBE_VIDEO,
+ "{"
+ "'kind': 'youtube#video',"
+ "'etag': '\"tbWC5XrSXxe1WOAx6MK9z4hHSU8/X_byq2BdOVgHzCA-ScpZbTWmgfQ\"',"
+ "'id': 'JAagedeKdcQ',"
+ "'snippet': {"
+ "'publishedAt': '2006-05-16T14:06:37.000Z',"
+ "'channelId': 'UCCS6UQvicRHyn1whEUDEMUQ',"
+ "'title': 'Judas Priest - Painkiller',"
+ "'description': 'Videoclip de Judas Priest',"
+ "'channelTitle': 'eluves',"
+ "'categoryId': '10',"
+ "'liveBroadcastContent': 'none',"
+ "'localized': {"
+ "'title': 'Judas Priest - Painkiller',"
+ "'description': 'Videoclip de Judas Priest'"
+ "}"
+ "},"
+ "'recordingDetails': {"
+ "'recordingDate': '2003-08-03'"
+ "}"
+ "}", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_YOUTUBE_VIDEO (video));
+ g_clear_error (&error);
+
+ /* Test the recorded date */
+ recorded = gdata_youtube_video_get_recorded (video);
+ g_assert_cmpint (recorded, ==, 1059868800);
+
+ /* Update the state and see if the XML's written out OK */
+ recorded = 1128229200;
+ gdata_youtube_video_set_recorded (video, recorded);
+
+ /* Check the XML */
+ gdata_test_assert_json (video,
+ "{"
+ "'kind': 'youtube#video',"
+ "'etag': '\"tbWC5XrSXxe1WOAx6MK9z4hHSU8/X_byq2BdOVgHzCA-ScpZbTWmgfQ\"',"
+ "'id': 'JAagedeKdcQ',"
+ "'selfLink': 'https://www.googleapis.com/youtube/v3/videos?id=JAagedeKdcQ',"
+ "'title': 'Judas Priest - Painkiller',"
+ "'description': 'Videoclip de Judas Priest',"
+ "'snippet': {"
+ "'title': 'Judas Priest - Painkiller',"
+ "'description': 'Videoclip de Judas Priest',"
+ "'categoryId': '10'"
+ "},"
+ "'status': {"
+ "'privacyStatus': 'public'"
+ "},"
+ "'recordingDetails': {"
+ "'recordingDate': '2005-10-02'"
+ "}"
+ "}");
+
+ /* TODO: more tests on entry properties */
+
+ g_object_unref (video);
+}
+
+static void
+test_parsing_yt_access_control (void)
+{
+ GDataYouTubeVideo *video;
+ GError *error = NULL;
+
+ video = GDATA_YOUTUBE_VIDEO (gdata_parsable_new_from_json (GDATA_TYPE_YOUTUBE_VIDEO,
+ "{"
+ "'kind': 'youtube#video',"
+ "'id': 'JAagedeKdcQ',"
+ "'status': {"
+ "'privacyStatus': 'public',"
+ "'embeddable': false"
+ "}"
+ "}", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_YOUTUBE_VIDEO (video));
+ g_clear_error (&error);
+
+ /* Test the access controls */
+ g_assert_cmpint (gdata_youtube_video_get_access_control (video, GDATA_YOUTUBE_ACTION_RATE), ==, GDATA_YOUTUBE_PERMISSION_DENIED);
+ g_assert_cmpint (gdata_youtube_video_get_access_control (video, GDATA_YOUTUBE_ACTION_COMMENT), ==, GDATA_YOUTUBE_PERMISSION_DENIED);
+ g_assert_cmpint (gdata_youtube_video_get_access_control (video, GDATA_YOUTUBE_ACTION_COMMENT_VOTE), ==, GDATA_YOUTUBE_PERMISSION_DENIED);
+ g_assert_cmpint (gdata_youtube_video_get_access_control (video, GDATA_YOUTUBE_ACTION_VIDEO_RESPOND), ==, GDATA_YOUTUBE_PERMISSION_DENIED);
+ g_assert_cmpint (gdata_youtube_video_get_access_control (video, GDATA_YOUTUBE_ACTION_EMBED), ==, GDATA_YOUTUBE_PERMISSION_DENIED);
+ g_assert_cmpint (gdata_youtube_video_get_access_control (video, GDATA_YOUTUBE_ACTION_SYNDICATE), ==, GDATA_YOUTUBE_PERMISSION_DENIED);
+ g_assert_cmpint (gdata_youtube_video_get_access_control (video, "list"), ==, GDATA_YOUTUBE_PERMISSION_ALLOWED);
+
+ /* Update some of them and see if the JSON’s written out OK */
+ gdata_youtube_video_set_access_control (video, "list", GDATA_YOUTUBE_PERMISSION_DENIED);
+ gdata_youtube_video_set_access_control (video, GDATA_YOUTUBE_ACTION_EMBED, GDATA_YOUTUBE_PERMISSION_ALLOWED);
+
+ /* Check the JSON */
+ gdata_test_assert_json (video,
+ "{"
+ "'kind': 'youtube#video',"
+ "'id': 'JAagedeKdcQ',"
+ "'selfLink': 'https://www.googleapis.com/youtube/v3/videos?id=JAagedeKdcQ',"
+ "'title': null,"
+ "'snippet': {},"
+ "'status': {"
+ "'privacyStatus': 'unlisted',"
+ "'embeddable': true"
+ "},"
+ "'recordingDetails': {}"
+ "}");
+
+ g_object_unref (video);
+}
+
+static void
+test_parsing_yt_category (void)
+{
+ GDataYouTubeCategory *category;
+ gboolean assignable, deprecated;
+ GError *error = NULL;
+
+ /* Test a non-deprecated category */
+ category = GDATA_YOUTUBE_CATEGORY (gdata_parsable_new_from_xml (GDATA_TYPE_YOUTUBE_CATEGORY,
+ "<category xmlns='http://www.w3.org/2005/Atom' xmlns:yt='http://gdata.youtube.com/schemas/2007' "
+ "scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video'>"
+ "<yt:assignable/>"
+ "<yt:browsable regions='CZ AU HK'/>"
+ "</category>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_YOUTUBE_CATEGORY (category));
+ g_clear_error (&error);
+
+ /* Test the category's properties */
+ g_assert (gdata_youtube_category_is_assignable (category) == TRUE);
+ g_assert (gdata_youtube_category_is_browsable (category, "CZ") == TRUE);
+ g_assert (gdata_youtube_category_is_browsable (category, "AU") == TRUE);
+ g_assert (gdata_youtube_category_is_browsable (category, "HK") == TRUE);
+ g_assert (gdata_youtube_category_is_browsable (category, "GB") == FALSE);
+ g_assert (gdata_youtube_category_is_deprecated (category) == FALSE);
+
+ /* Test the properties the other way */
+ g_object_get (category, "is-assignable", &assignable, "is-deprecated", &deprecated, NULL);
+ g_assert (assignable == TRUE);
+ g_assert (deprecated == FALSE);
+
+ g_object_unref (category);
+
+ /* Test a deprecated category */
+ category = GDATA_YOUTUBE_CATEGORY (gdata_parsable_new_from_xml (GDATA_TYPE_YOUTUBE_CATEGORY,
+ "<category xmlns='http://www.w3.org/2005/Atom' xmlns:yt='http://gdata.youtube.com/schemas/2007' "
+ "scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video'>"
+ "<yt:deprecated/>"
+ "</category>", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_YOUTUBE_CATEGORY (category));
+ g_clear_error (&error);
+
+ /* Test the category's properties */
+ g_assert (gdata_youtube_category_is_assignable (category) == FALSE);
+ g_assert (gdata_youtube_category_is_browsable (category, "CZ") == FALSE);
+ g_assert (gdata_youtube_category_is_browsable (category, "AU") == FALSE);
+ g_assert (gdata_youtube_category_is_browsable (category, "HK") == FALSE);
+ g_assert (gdata_youtube_category_is_browsable (category, "GB") == FALSE);
+ g_assert (gdata_youtube_category_is_deprecated (category) == TRUE);
+
+ g_object_unref (category);
+}
+
+static void
+test_parsing_georss_where (void)
+{
+ GDataYouTubeVideo *video;
+ gdouble latitude, longitude;
+ GError *error = NULL;
+
+ video = GDATA_YOUTUBE_VIDEO (gdata_parsable_new_from_json (GDATA_TYPE_YOUTUBE_VIDEO,
+ "{"
+ "'kind': 'youtube#video',"
+ "'id': 'JAagedeKdcQ',"
+ "'recordingDetails': {"
+ "'location': {"
+ "'latitude': 41.14556884765625,"
+ "'longitude': -8.63525390625"
+ "}"
+ "}"
+ "}", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_YOUTUBE_VIDEO (video));
+ g_clear_error (&error);
+
+ /* Test the coordinates */
+ gdata_youtube_video_get_coordinates (video, &latitude, &longitude);
+ g_assert_cmpfloat (latitude, ==, 41.14556884765625);
+ g_assert_cmpfloat (longitude, ==, -8.63525390625);
+
+ /* Update them and see if they're set OK and the JSON’s written out OK */
+ gdata_youtube_video_set_coordinates (video, 5.5, 6.5);
+
+ g_object_get (G_OBJECT (video),
+ "latitude", &latitude,
+ "longitude", &longitude,
+ NULL);
+
+ g_assert_cmpfloat (latitude, ==, 5.5);
+ g_assert_cmpfloat (longitude, ==, 6.5);
+
+ /* Check the JSON */
+ gdata_test_assert_json (video,
+ "{"
+ "'kind': 'youtube#video',"
+ "'id': 'JAagedeKdcQ',"
+ "'selfLink': 'https://www.googleapis.com/youtube/v3/videos?id=JAagedeKdcQ',"
+ "'title': null,"
+ "'snippet': {},"
+ "'status': {"
+ "'privacyStatus': 'public'"
+ "},"
+ "'recordingDetails': {"
+ "'location': {"
+ "'latitude': 5.5,"
+ "'longitude': 6.5"
+ "}"
+ "}"
+ "}");
+
+ /* Unset the properties and ensure they’re removed from the JSON */
+ gdata_youtube_video_set_coordinates (video, G_MAXDOUBLE, G_MAXDOUBLE);
+
+ gdata_youtube_video_get_coordinates (video, &latitude, &longitude);
+ g_assert_cmpfloat (latitude, ==, G_MAXDOUBLE);
+ g_assert_cmpfloat (longitude, ==, G_MAXDOUBLE);
+
+ /* Check the JSON */
+ gdata_test_assert_json (video,
+ "{"
+ "'kind': 'youtube#video',"
+ "'id': 'JAagedeKdcQ',"
+ "'selfLink': 'https://www.googleapis.com/youtube/v3/videos?id=JAagedeKdcQ',"
+ "'title': null,"
+ "'snippet': {},"
+ "'status': {"
+ "'privacyStatus': 'public'"
+ "},"
+ "'recordingDetails': {}"
+ "}");
+
+ g_object_unref (video);
+}
+
+static void
+test_parsing_ratings (void)
+{
+ GDataYouTubeVideo *video;
+ GError *error = NULL;
+
+ /* Parse all ratings */
+ video = GDATA_YOUTUBE_VIDEO (gdata_parsable_new_from_json (GDATA_TYPE_YOUTUBE_VIDEO,
+ "{"
+ "'kind': 'youtube#video',"
+ "'id': 'JAagedeKdcQ',"
+ "'contentDetails': {"
+ "'contentRating': {"
+ "'mpaaRating': 'mpaaPg',"
+ "'tvpgRating': 'tvpgPg'"
+ "}"
+ "}"
+ "}", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_YOUTUBE_VIDEO (video));
+ g_clear_error (&error);
+
+ /* Check the ratings, and check that we haven't ended up with a country restriction */
+ g_assert_cmpstr (gdata_youtube_video_get_media_rating (video, GDATA_YOUTUBE_RATING_TYPE_MPAA), ==, "pg");
+ g_assert_cmpstr (gdata_youtube_video_get_media_rating (video, GDATA_YOUTUBE_RATING_TYPE_V_CHIP), ==, "tv-pg");
+
+ g_assert (gdata_youtube_video_is_restricted_in_country (video, "US") == FALSE);
+
+ g_object_unref (video);
+
+ /* Parse a video with one rating missing and see what happens */
+ video = GDATA_YOUTUBE_VIDEO (gdata_parsable_new_from_json (GDATA_TYPE_YOUTUBE_VIDEO,
+ "{"
+ "'kind': 'youtube#video',"
+ "'id': 'JAagedeKdcQ',"
+ "'contentDetails': {"
+ "'contentRating': {"
+ "'tvpgRating': 'tvpgY7Fv'"
+ "}"
+ "}"
+ "}", -1, &error));
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_YOUTUBE_VIDEO (video));
+ g_clear_error (&error);
+
+ /* Check the ratings again */
+ g_assert_cmpstr (gdata_youtube_video_get_media_rating (video, GDATA_YOUTUBE_RATING_TYPE_MPAA), ==, NULL);
+ g_assert_cmpstr (gdata_youtube_video_get_media_rating (video, GDATA_YOUTUBE_RATING_TYPE_V_CHIP), ==, "tv-y7-fv");
+
+ /* Check that calling with an arbitrary rating type returns NULL.
+ * %GDATA_YOUTUBE_RATING_TYPE_SIMPLE is no longer supported. */
+ g_assert_cmpstr (gdata_youtube_video_get_media_rating (video, "fooish bar"), ==, NULL);
+ g_assert_cmpstr (gdata_youtube_video_get_media_rating (video, GDATA_YOUTUBE_RATING_TYPE_SIMPLE), ==, NULL);
+
+ g_object_unref (video);
+}
+
+static void
+test_video_escaping (void)
+{
+ GDataYouTubeVideo *video;
+ const gchar * const keywords[] = { "<keyword1>", "keyword2 & stuff, things", NULL };
+
+ video = gdata_youtube_video_new (NULL);
+ gdata_youtube_video_set_location (video, "\"Here\" & 'there'");
+ gdata_youtube_video_set_access_control (video, "<action>", GDATA_YOUTUBE_PERMISSION_ALLOWED);
+ gdata_youtube_video_set_keywords (video, keywords);
+ gdata_youtube_video_set_description (video, "Description & 'stuff'.");
+ gdata_youtube_video_set_aspect_ratio (video, "4 & 3");
+
+ /* Check the outputted JSON is escaped properly */
+ gdata_test_assert_json (video,
+ "{"
+ "'kind': 'youtube#video',"
+ "'title': null,"
+ "'description': \"Description & 'stuff'.\","
+ "'snippet': {"
+ "'description': \"Description & 'stuff'.\","
+ "'tags': ["
+ "'<keyword1>',"
+ "'keyword2 & stuff, things'"
+ "]"
+ "},"
+ "'status': {"
+ "'privacyStatus': 'public'"
+ "},"
+ "'recordingDetails': {"
+ "'locationDescription': \"\\\"Here\\\" & 'there'\""
+ "}"
+ "}");
+ g_object_unref (video);
+}
+
+/* Check that a newly-constructed video does not output a location in its
+ * JSON or properties. */
+static void
+test_video_location (void)
+{
+ GDataYouTubeVideo *video;
+ gdouble latitude, longitude;
+
+ video = gdata_youtube_video_new (NULL);
+
+ g_assert_null (gdata_youtube_video_get_location (video));
+
+ /* Latitude and longitude should be outside the valid ranges. */
+ gdata_youtube_video_get_coordinates (video, &latitude, &longitude);
+ g_assert (latitude < -90.0 || latitude > 90.0);
+ g_assert (longitude < -180.0 || longitude > 180.0);
+
+ /* Check the outputted JSON is escaped properly */
+ gdata_test_assert_json (video,
+ "{"
+ "'title': null,"
+ "'kind': 'youtube#video',"
+ "'snippet': {},"
+ "'status': {"
+ "'privacyStatus': 'public'"
+ "},"
+ "'recordingDetails': {}"
+ "}");
+
+ g_object_unref (video);
+}
+
+static void
+test_comment_get_json (void)
+{
+ GDataYouTubeComment *comment_;
+
+ comment_ = gdata_youtube_comment_new (NULL);
+ gdata_entry_set_content (GDATA_ENTRY (comment_),
+ "This is a comment with <markup> & 'stüff'.");
+ gdata_youtube_comment_set_parent_comment_uri (comment_,
+ "http://example.com/?foo=bar&baz=shizzle");
+
+ /* Check the outputted JSON is OK */
+ gdata_test_assert_json (comment_,
+ "{"
+ "'kind': 'youtube#commentThread',"
+ "'snippet' : {"
+ "'topLevelComment': {"
+ "'kind': 'youtube#comment',"
+ "'snippet': {"
+ "'textOriginal': \"This is a comment with <markup> & 'stüff'.\","
+ "'parentId': 'http://example.com/?foo=bar&baz=shizzle'"
+ "}"
+ "}"
+ "}"
+ "}");
+
+ g_object_unref (comment_);
+}
+
+static void
+notify_cb (GDataYouTubeComment *comment_, GParamSpec *pspec, guint *notification_count)
+{
+ *notification_count = *notification_count + 1;
+}
+
+static void
+test_comment_properties_parent_comment_uri (void)
+{
+ GDataYouTubeComment *comment_;
+ guint notification_count = 0;
+ gchar *parent_comment_uri;
+
+ comment_ = gdata_youtube_comment_new (NULL);
+ g_signal_connect (comment_, "notify::parent-comment-uri", (GCallback) notify_cb, ¬ification_count);
+
+ /* Default. */
+ g_assert (gdata_youtube_comment_get_parent_comment_uri (comment_) == NULL);
+
+ /* Set the property. */
+ gdata_youtube_comment_set_parent_comment_uri (comment_, "foo");
+ g_assert_cmpuint (notification_count, ==, 1);
+
+ g_assert_cmpstr (gdata_youtube_comment_get_parent_comment_uri (comment_), ==, "foo");
+
+ /* Get the property a different way. */
+ g_object_get (G_OBJECT (comment_),
+ "parent-comment-uri", &parent_comment_uri,
+ NULL);
+
+ g_assert_cmpstr (parent_comment_uri, ==, "foo");
+
+ g_free (parent_comment_uri);
+
+ /* Set the property a different way. */
+ g_object_set (G_OBJECT (comment_),
+ "parent-comment-uri", "bar",
+ NULL);
+ g_assert_cmpuint (notification_count, ==, 2);
+
+ /* Set the property to the same value. */
+ gdata_youtube_comment_set_parent_comment_uri (comment_, "bar");
+ g_assert_cmpuint (notification_count, ==, 2);
+
+ /* Set the property back to NULL. */
+ gdata_youtube_comment_set_parent_comment_uri (comment_, NULL);
+ g_assert_cmpuint (notification_count, ==, 3);
+
+ g_assert (gdata_youtube_comment_get_parent_comment_uri (comment_) == NULL);
+
+ g_object_unref (comment_);
+}
+
+static gchar *
+build_this_week_date_str (void)
+{
+ GTimeVal tv;
+
+ g_get_current_time (&tv);
+ tv.tv_sec -= 7 * 24 * 60 * 60; /* this week */
+ tv.tv_usec = 0; /* pointless accuracy */
+
+ return g_time_val_to_iso8601 (&tv);
+}
+
+static void
+test_query_uri (void)
+{
+ gdouble latitude, longitude, radius;
+ gboolean has_location;
+ gchar *query_uri;
+ GDataYouTubeQuery *query = gdata_youtube_query_new ("q");
+ gchar *this_week_date_str, *expected_uri;
+
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
+ /* This should not appear in the query because it is deprecated. */
+ gdata_youtube_query_set_format (query, GDATA_YOUTUBE_FORMAT_RTSP_H263_AMR);
+ g_assert_cmpuint (gdata_youtube_query_get_format (query), ==, 1);
+
+ /* Location */
+ gdata_youtube_query_set_location (query, 45.01364, -97.12356, 112.5, TRUE);
+ gdata_youtube_query_get_location (query, &latitude, &longitude, &radius, &has_location);
+
+ g_assert_cmpfloat (latitude, ==, 45.01364);
+ g_assert_cmpfloat (longitude, ==, -97.12356);
+ g_assert_cmpfloat (radius, ==, 112.5);
+ g_assert (has_location == TRUE);
+
+ query_uri = gdata_query_get_query_uri (GDATA_QUERY (query), "http://example.com");
+ g_assert_cmpstr (query_uri, ==, "http://example.com?q=q&safeSearch=none&location=45.013640000000002,-97.123559999999998&locationRadius=112.5m");
+ g_free (query_uri);
+
+ /* This used to set the has-location parameter in the query, but that’s
+ * no longer supported by Google, so it should be the same as the
+ * following query. */
+ gdata_youtube_query_set_location (query, G_MAXDOUBLE, 0.6672, 52.8, TRUE);
+
+ query_uri = gdata_query_get_query_uri (GDATA_QUERY (query), "http://example.com");
+ g_assert_cmpstr (query_uri, ==, "http://example.com?q=q&safeSearch=none");
+ g_free (query_uri);
+
+ gdata_youtube_query_set_location (query, G_MAXDOUBLE, G_MAXDOUBLE, 0.0, FALSE);
+
+ query_uri = gdata_query_get_query_uri (GDATA_QUERY (query), "http://example.com");
+ g_assert_cmpstr (query_uri, ==, "http://example.com?q=q&safeSearch=none");
+ g_free (query_uri);
+
+ /* Language; this should not appear in the query as it is no longer
+ * supported. */
+ gdata_youtube_query_set_language (query, "fr");
+ g_assert_cmpstr (gdata_youtube_query_get_language (query), ==, "fr");
+
+ gdata_youtube_query_set_order_by (query, "relevance_lang_fr");
+ g_assert_cmpstr (gdata_youtube_query_get_order_by (query), ==, "relevance_lang_fr");
+
+ gdata_youtube_query_set_restriction (query, "192.168.0.1");
+ g_assert_cmpstr (gdata_youtube_query_get_restriction (query), ==, "192.168.0.1");
+
+ query_uri = gdata_query_get_query_uri (GDATA_QUERY (query), "http://example.com");
+ g_assert_cmpstr (query_uri, ==, "http://example.com?q=q&safeSearch=none&order=relevance®ionCode=192.168.0.1");
+ g_free (query_uri);
+
+ gdata_youtube_query_set_safe_search (query, GDATA_YOUTUBE_SAFE_SEARCH_STRICT);
+ g_assert_cmpuint (gdata_youtube_query_get_safe_search (query), ==, GDATA_YOUTUBE_SAFE_SEARCH_STRICT);
+
+ query_uri = gdata_query_get_query_uri (GDATA_QUERY (query), "http://example.com");
+ g_assert_cmpstr (query_uri, ==, "http://example.com?q=q&safeSearch=strict&order=relevance®ionCode=192.168.0.1");
+ g_free (query_uri);
+
+ /* Deprecated and unused: */
+ gdata_youtube_query_set_sort_order (query, GDATA_YOUTUBE_SORT_ASCENDING);
+ g_assert_cmpuint (gdata_youtube_query_get_sort_order (query), ==, GDATA_YOUTUBE_SORT_ASCENDING);
+
+ gdata_youtube_query_set_age (query, GDATA_YOUTUBE_AGE_THIS_WEEK);
+ g_assert_cmpuint (gdata_youtube_query_get_age (query), ==, GDATA_YOUTUBE_AGE_THIS_WEEK);
+
+ /* Deprecated and unused: */
+ gdata_youtube_query_set_uploader (query, GDATA_YOUTUBE_UPLOADER_PARTNER);
+ g_assert_cmpuint (gdata_youtube_query_get_uploader (query), ==, GDATA_YOUTUBE_UPLOADER_PARTNER);
+
+ gdata_youtube_query_set_license (query, GDATA_YOUTUBE_LICENSE_CC);
+ g_assert_cmpstr (gdata_youtube_query_get_license (query), ==, GDATA_YOUTUBE_LICENSE_CC);
+
+ /* Check the built URI with a normal feed URI */
+ query_uri = gdata_query_get_query_uri (GDATA_QUERY (query), "http://example.com");
+ this_week_date_str = build_this_week_date_str ();
+ expected_uri = g_strdup_printf ("http://example.com?q=q&publishedAfter=%s&safeSearch=strict&order=relevance®ionCode=192.168.0.1&videoLicense=creativeCommon", this_week_date_str);
+ g_assert_cmpstr (query_uri, ==, expected_uri);
+
+ g_free (this_week_date_str);
+ g_free (expected_uri);
+ g_free (query_uri);
+
+ /* …and with a feed URI with pre-existing arguments */
+ query_uri = gdata_query_get_query_uri (GDATA_QUERY (query), "http://example.com?foobar=shizzle");
+ this_week_date_str = build_this_week_date_str ();
+ expected_uri = g_strdup_printf ("http://example.com?foobar=shizzle&q=q&publishedAfter=%s&safeSearch=strict&order=relevance®ionCode=192.168.0.1&videoLicense=creativeCommon", this_week_date_str);
+ g_assert_cmpstr (query_uri, ==, expected_uri);
+
+ g_free (this_week_date_str);
+ g_free (expected_uri);
+ g_free (query_uri);
+
+ g_object_unref (query);
+
+ G_GNUC_END_IGNORE_DEPRECATIONS
+}
+
+static void
+test_query_etag (void)
+{
+ GDataYouTubeQuery *query = gdata_youtube_query_new (NULL);
+
+ /* Test that setting any property will unset the ETag */
+ g_test_bug ("613529");
+
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
+#define CHECK_ETAG(C) \
+ gdata_query_set_etag (GDATA_QUERY (query), "foobar"); \
+ (C); \
+ g_assert (gdata_query_get_etag (GDATA_QUERY (query)) == NULL);
+
+ CHECK_ETAG (gdata_youtube_query_set_format (query, GDATA_YOUTUBE_FORMAT_RTSP_H263_AMR))
+ CHECK_ETAG (gdata_youtube_query_set_location (query, 0.0, 65.0, 15.0, TRUE))
+ CHECK_ETAG (gdata_youtube_query_set_language (query, "British English"))
+ CHECK_ETAG (gdata_youtube_query_set_order_by (query, "shizzle"))
+ CHECK_ETAG (gdata_youtube_query_set_restriction (query, "restriction"))
+ CHECK_ETAG (gdata_youtube_query_set_safe_search (query, GDATA_YOUTUBE_SAFE_SEARCH_MODERATE))
+ CHECK_ETAG (gdata_youtube_query_set_sort_order (query, GDATA_YOUTUBE_SORT_DESCENDING))
+ CHECK_ETAG (gdata_youtube_query_set_age (query, GDATA_YOUTUBE_AGE_THIS_WEEK))
+ CHECK_ETAG (gdata_youtube_query_set_uploader (query, GDATA_YOUTUBE_UPLOADER_PARTNER))
+ CHECK_ETAG (gdata_youtube_query_set_license (query, GDATA_YOUTUBE_LICENSE_STANDARD))
+
+#undef CHECK_ETAG
+
+ g_object_unref (query);
+
+ G_GNUC_END_IGNORE_DEPRECATIONS
+}
+
+static void
+test_query_single (gconstpointer service)
+{
+ GDataYouTubeVideo *video;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "query-single");
+
+ video = GDATA_YOUTUBE_VIDEO (gdata_service_query_single_entry (GDATA_SERVICE (service),
+ gdata_youtube_service_get_primary_authorization_domain (),
+ "tag:youtube.com,2008:video:_LeQuMpwbW4", NULL,
+ GDATA_TYPE_YOUTUBE_VIDEO, NULL, &error));
+
+ g_assert_no_error (error);
+ g_assert (video != NULL);
+ g_assert (GDATA_IS_YOUTUBE_VIDEO (video));
+
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ g_assert_cmpstr (gdata_youtube_video_get_video_id (video), ==, "_LeQuMpwbW4");
+ g_assert_cmpstr (gdata_entry_get_id (GDATA_ENTRY (video)), ==, "_LeQuMpwbW4");
+ G_GNUC_END_IGNORE_DEPRECATIONS
+
+ g_clear_error (&error);
+
+ g_object_unref (video);
+
+ uhm_server_end_trace (mock_server);
+}
+
+GDATA_ASYNC_TEST_FUNCTIONS (query_single, void,
+G_STMT_START {
+ gdata_service_query_single_entry_async (GDATA_SERVICE (service), gdata_youtube_service_get_primary_authorization_domain (),
+ "tag:youtube.com,2008:video:_LeQuMpwbW4", NULL, GDATA_TYPE_YOUTUBE_VIDEO,
+ cancellable, async_ready_callback, async_data);
+} G_STMT_END,
+G_STMT_START {
+ GDataYouTubeVideo *video;
+
+ video = GDATA_YOUTUBE_VIDEO (gdata_service_query_single_entry_finish (GDATA_SERVICE (obj), async_result, &error));
+
+ if (error == NULL) {
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ g_assert (GDATA_IS_YOUTUBE_VIDEO (video));
+ g_assert_cmpstr (gdata_youtube_video_get_video_id (video), ==, "_LeQuMpwbW4");
+ g_assert_cmpstr (gdata_entry_get_id (GDATA_ENTRY (video)), ==, "_LeQuMpwbW4");
+ G_GNUC_END_IGNORE_DEPRECATIONS
+
+ g_object_unref (video);
+ } else {
+ g_assert (video == NULL);
+ }
+} G_STMT_END);
+
+typedef struct {
+ GDataYouTubeVideo *video;
+} CommentData;
+
+static void
+set_up_comment (CommentData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "setup-comment");
+
+ /* Get a video known to have comments on it. */
+ data->video = GDATA_YOUTUBE_VIDEO (gdata_service_query_single_entry (GDATA_SERVICE (service),
+ gdata_youtube_service_get_primary_authorization_domain (),
+ "tag:youtube.com,2008:video:RzR2k8yo4NY", NULL,
+ GDATA_TYPE_YOUTUBE_VIDEO, NULL, NULL));
+ g_assert (GDATA_IS_YOUTUBE_VIDEO (data->video));
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+tear_down_comment (CommentData *data, gconstpointer service)
+{
+ g_object_unref (data->video);
+}
+
+static void
+assert_comments_feed (GDataFeed *comments_feed)
+{
+ GList *comments;
+
+ g_assert (GDATA_IS_FEED (comments_feed));
+
+ for (comments = gdata_feed_get_entries (comments_feed); comments != NULL; comments = comments->next) {
+ GList *authors;
+ GDataYouTubeComment *comment_ = GDATA_YOUTUBE_COMMENT (comments->data);
+
+ /* We can't do much more than this, since we can't reasonably add test comments to public videos, and can't upload a new video
+ * for each test since it has to go through moderation. */
+ g_assert_cmpstr (gdata_entry_get_content (GDATA_ENTRY (comment_)), !=, NULL);
+
+ g_assert_cmpuint (g_list_length (gdata_entry_get_authors (GDATA_ENTRY (comment_))), >, 0);
+
+ for (authors = gdata_entry_get_authors (GDATA_ENTRY (comment_)); authors != NULL; authors = authors->next) {
+ GDataAuthor *author = GDATA_AUTHOR (authors->data);
+
+ /* Again, we can't test these much. */
+ g_assert_cmpstr (gdata_author_get_name (author), !=, NULL);
+ g_assert_cmpstr (gdata_author_get_uri (author), !=, NULL);
+ }
+ }
+}
+
+static void
+test_comment_query (CommentData *data, gconstpointer service)
+{
+ GDataFeed *comments_feed;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "comment-query");
+
+ /* Get the comments feed for the video */
+ comments_feed = gdata_commentable_query_comments (GDATA_COMMENTABLE (data->video), GDATA_SERVICE (service), NULL, NULL, NULL, NULL, &error);
+ g_assert_no_error (error);
+ g_clear_error (&error);
+
+ assert_comments_feed (comments_feed);
+
+ g_object_unref (comments_feed);
+
+ uhm_server_end_trace (mock_server);
+}
+
+GDATA_ASYNC_CLOSURE_FUNCTIONS (comment, CommentData);
+
+GDATA_ASYNC_TEST_FUNCTIONS (comment_query, CommentData,
+G_STMT_START {
+ gdata_commentable_query_comments_async (GDATA_COMMENTABLE (data->video), GDATA_SERVICE (service), NULL, cancellable, NULL, NULL, NULL,
+ async_ready_callback, async_data);
+} G_STMT_END,
+G_STMT_START {
+ GDataFeed *comments_feed;
+
+ comments_feed = gdata_commentable_query_comments_finish (GDATA_COMMENTABLE (obj), async_result, &error);
+
+ if (error == NULL) {
+ assert_comments_feed (comments_feed);
+
+ g_object_unref (comments_feed);
+ } else {
+ g_assert (comments_feed == NULL);
+ }
+} G_STMT_END);
+
+/* Test that the progress callbacks from gdata_commentable_query_comments_async() are called correctly.
+ * We take a CommentData so that we can guarantee the video exists, but we don't use it much as we don't actually care about the specific
+ * video. */
+static void
+test_comment_query_async_progress_closure (CommentData *query_data, gconstpointer service)
+{
+ GDataAsyncProgressClosure *data = g_slice_new0 (GDataAsyncProgressClosure);
+
+ gdata_test_mock_server_start_trace (mock_server, "comment-query-async-progress-closure");
+
+ data->main_loop = g_main_loop_new (NULL, TRUE);
+
+ gdata_commentable_query_comments_async (GDATA_COMMENTABLE (query_data->video), GDATA_SERVICE (service), NULL, NULL,
+ (GDataQueryProgressCallback) gdata_test_async_progress_callback,
+ data, (GDestroyNotify) gdata_test_async_progress_closure_free,
+ (GAsyncReadyCallback) gdata_test_async_progress_finish_callback, data);
+
+ g_main_loop_run (data->main_loop);
+ g_main_loop_unref (data->main_loop);
+
+ /* Check that both callbacks were called exactly once */
+ g_assert_cmpuint (data->progress_destroy_notify_count, ==, 1);
+ g_assert_cmpuint (data->async_ready_notify_count, ==, 1);
+
+ g_slice_free (GDataAsyncProgressClosure, data);
+
+ uhm_server_end_trace (mock_server);
+}
+
+typedef struct {
+ CommentData parent;
+ GDataYouTubeComment *comment;
+} InsertCommentData;
+
+static void
+set_up_insert_comment (InsertCommentData *data, gconstpointer service)
+{
+ set_up_comment ((CommentData*) data, service);
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-insert-comment");
+
+ /* Create a test comment to be inserted. */
+ data->comment = gdata_youtube_comment_new (NULL);
+ g_assert (GDATA_IS_YOUTUBE_COMMENT (data->comment));
+
+ gdata_entry_set_content (GDATA_ENTRY (data->comment), "This is a test comment.");
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+tear_down_insert_comment (InsertCommentData *data, gconstpointer service)
+{
+ gdata_test_mock_server_start_trace (mock_server, "teardown-insert-comment");
+
+ if (data->comment != NULL) {
+ g_object_unref (data->comment);
+ }
+
+ tear_down_comment ((CommentData*) data, service);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+assert_comments_equal (GDataComment *new_comment,
+ GDataYouTubeComment *original_comment,
+ gboolean allow_empty)
+{
+ GList *authors;
+ GDataAuthor *author;
+
+ g_assert (GDATA_IS_YOUTUBE_COMMENT (new_comment));
+ g_assert (GDATA_IS_YOUTUBE_COMMENT (original_comment));
+ g_assert (GDATA_YOUTUBE_COMMENT (new_comment) != original_comment);
+
+ /* Comments can be "" if they’ve just been inserted and are pending
+ * moderation. Not much we can do about that without waiting a few
+ * minutes, which would suck in a unit test. */
+ if (g_strcmp0 (gdata_entry_get_content (GDATA_ENTRY (new_comment)), "") != 0) {
+ g_assert_cmpstr (gdata_entry_get_content (GDATA_ENTRY (new_comment)), ==,
+ gdata_entry_get_content (GDATA_ENTRY (original_comment)));
+ } else {
+ g_assert (allow_empty);
+ }
+
+ g_assert_cmpstr (gdata_youtube_comment_get_parent_comment_uri (GDATA_YOUTUBE_COMMENT (new_comment)), ==,
+ gdata_youtube_comment_get_parent_comment_uri (original_comment));
+
+ /* Check the author of the new comment. */
+ authors = gdata_entry_get_authors (GDATA_ENTRY (new_comment));
+ g_assert_cmpuint (g_list_length (authors), ==, 1);
+
+ author = GDATA_AUTHOR (authors->data);
+
+ g_assert_cmpstr (gdata_author_get_name (author), ==, "GDataTest");
+ g_assert_cmpstr (gdata_author_get_uri (author), ==, "http://www.youtube.com/user/GDataTest");
+}
+
+static void
+test_comment_insert (InsertCommentData *data, gconstpointer service)
+{
+ GDataComment *new_comment;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "comment-insert");
+
+ new_comment = gdata_commentable_insert_comment (GDATA_COMMENTABLE (data->parent.video), GDATA_SERVICE (service), GDATA_COMMENT (data->comment),
+ NULL, &error);
+ g_assert_no_error (error);
+ g_clear_error (&error);
+
+ assert_comments_equal (new_comment, data->comment, TRUE);
+
+ g_object_unref (new_comment);
+
+ uhm_server_end_trace (mock_server);
+}
+
+GDATA_ASYNC_CLOSURE_FUNCTIONS (insert_comment, InsertCommentData);
+
+GDATA_ASYNC_TEST_FUNCTIONS (comment_insert, InsertCommentData,
+G_STMT_START {
+ gdata_commentable_insert_comment_async (GDATA_COMMENTABLE (data->parent.video), GDATA_SERVICE (service),
+ GDATA_COMMENT (data->comment), cancellable, async_ready_callback, async_data);
+} G_STMT_END,
+G_STMT_START {
+ GDataComment *new_comment;
+
+ new_comment = gdata_commentable_insert_comment_finish (GDATA_COMMENTABLE (obj), async_result, &error);
+
+ if (error == NULL) {
+ assert_comments_equal (new_comment, data->comment, TRUE);
+
+ g_object_unref (new_comment);
+ } else {
+ g_assert (new_comment == NULL);
+ }
+} G_STMT_END);
+
+static void
+test_comment_delete (InsertCommentData *data, gconstpointer service)
+{
+ gboolean success;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "comment-delete");
+
+ /* We attempt to delete a comment which hasn't been inserted here, but that doesn't matter as the function should always immediately
+ * return an error because deleting YouTube comments isn't allowed. */
+ success = gdata_commentable_delete_comment (GDATA_COMMENTABLE (data->parent.video), GDATA_SERVICE (service), GDATA_COMMENT (data->comment),
+ NULL, &error);
+ g_assert_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_FORBIDDEN);
+ g_assert (success == FALSE);
+ g_clear_error (&error);
+
+ uhm_server_end_trace (mock_server);
+}
+
+GDATA_ASYNC_TEST_FUNCTIONS (comment_delete, InsertCommentData,
+G_STMT_START {
+ gdata_commentable_delete_comment_async (GDATA_COMMENTABLE (data->parent.video), GDATA_SERVICE (service),
+ GDATA_COMMENT (data->comment), cancellable, async_ready_callback, async_data);
+} G_STMT_END,
+G_STMT_START {
+ gboolean success;
+
+ success = gdata_commentable_delete_comment_finish (GDATA_COMMENTABLE (obj), async_result, &error);
+
+ g_assert (error != NULL);
+ g_assert (success == FALSE);
+
+ /* See the note above in test_comment_delete(). */
+ if (g_error_matches (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_FORBIDDEN) == TRUE) {
+ /* Pretend no error happened so that the test succeeds. */
+ g_clear_error (&error);
+ async_data->cancellation_timeout = 13;
+ }
+} G_STMT_END);
+
+static void
+test_parsing_video_id_from_uri (void)
+{
+ gchar *video_id;
+
+ video_id = gdata_youtube_video_get_video_id_from_uri ("http://www.youtube.com/watch?v=BH_vwsyCrTc&feature=featured");
+ g_assert_cmpstr (video_id, ==, "BH_vwsyCrTc");
+ g_free (video_id);
+
+ video_id = gdata_youtube_video_get_video_id_from_uri ("http://www.youtube.es/watch?v=foo");
+ g_assert_cmpstr (video_id, ==, "foo");
+ g_free (video_id);
+
+ video_id = gdata_youtube_video_get_video_id_from_uri ("http://foobar.com/watch?v=foo");
+ g_assert (video_id == NULL);
+
+ video_id = gdata_youtube_video_get_video_id_from_uri ("http://foobar.com/not/real");
+ g_assert (video_id == NULL);
+
+ video_id = gdata_youtube_video_get_video_id_from_uri ("http://www.youtube.com/watch#!v=ylLzyHk54Z0");
+ g_assert_cmpstr (video_id, ==, "ylLzyHk54Z0");
+ g_free (video_id);
+
+ video_id = gdata_youtube_video_get_video_id_from_uri ("http://www.youtube.com/watch#!foo=bar!v=ylLzyHk54Z0");
+ g_assert_cmpstr (video_id, ==, "ylLzyHk54Z0");
+ g_free (video_id);
+
+ video_id = gdata_youtube_video_get_video_id_from_uri ("http://www.youtube.com/watch#!foo=bar");
+ g_assert (video_id == NULL);
+
+ video_id = gdata_youtube_video_get_video_id_from_uri ("http://www.youtube.com/watch#random-fragment");
+ g_assert (video_id == NULL);
+}
+
+static void
+test_categories (gconstpointer service)
+{
+ GDataAPPCategories *app_categories;
+ GList *categories;
+ GError *error = NULL;
+ gchar *old_locale;
+ guint old_n_results;
+
+ gdata_test_mock_server_start_trace (mock_server, "categories");
+
+ app_categories = gdata_youtube_service_get_categories (GDATA_YOUTUBE_SERVICE (service), NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_APP_CATEGORIES (app_categories));
+ g_clear_error (&error);
+
+ categories = gdata_app_categories_get_categories (app_categories);
+ g_assert_cmpint (g_list_length (categories), >, 0);
+ g_assert (GDATA_IS_YOUTUBE_CATEGORY (categories->data));
+
+ /* Save the number of results for comparison against a different locale */
+ old_n_results = g_list_length (categories);
+
+ g_object_unref (app_categories);
+
+ /* Test with a different locale */
+ old_locale = g_strdup (gdata_service_get_locale (GDATA_SERVICE (service)));
+ gdata_service_set_locale (GDATA_SERVICE (service), "TR");
+
+ app_categories = gdata_youtube_service_get_categories (GDATA_YOUTUBE_SERVICE (service), NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_APP_CATEGORIES (app_categories));
+ g_clear_error (&error);
+
+ categories = gdata_app_categories_get_categories (app_categories);
+ g_assert_cmpint (g_list_length (categories), >, 0);
+ g_assert (GDATA_IS_YOUTUBE_CATEGORY (categories->data));
+
+ /* Compare the number of results */
+ g_assert_cmpuint (old_n_results, !=, g_list_length (categories));
+
+ g_object_unref (app_categories);
+
+ /* Reset the locale */
+ gdata_service_set_locale (GDATA_SERVICE (service), old_locale);
+ g_free (old_locale);
+
+ uhm_server_end_trace (mock_server);
+}
+
+GDATA_ASYNC_TEST_FUNCTIONS (categories, void,
+G_STMT_START {
+ gdata_youtube_service_get_categories_async (GDATA_YOUTUBE_SERVICE (service), cancellable, async_ready_callback, async_data);
+} G_STMT_END,
+G_STMT_START {
+ GDataAPPCategories *app_categories;
+ GList *categories;
+
+ app_categories = gdata_youtube_service_get_categories_finish (GDATA_YOUTUBE_SERVICE (obj), async_result, &error);
+
+ if (error == NULL) {
+ g_assert (GDATA_IS_APP_CATEGORIES (app_categories));
+
+ categories = gdata_app_categories_get_categories (app_categories);
+ g_assert_cmpint (g_list_length (categories), >, 0);
+ g_assert (GDATA_IS_YOUTUBE_CATEGORY (categories->data));
+
+ g_object_unref (app_categories);
+ } else {
+ g_assert (app_categories == NULL);
+ }
+} G_STMT_END);
+
+typedef struct {
+ GDataEntry *new_video;
+ GDataEntry *new_video2;
+} BatchData;
+
+static void
+setup_batch (BatchData *data, gconstpointer service)
+{
+ GDataEntry *video;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "setup-batch");
+
+ /* We can't insert new videos as they'd just hit the moderation queue and cause tests to fail. Instead, we rely on two videos already existing
+ * on the server with the given IDs. */
+ video = gdata_service_query_single_entry (GDATA_SERVICE (service), gdata_youtube_service_get_primary_authorization_domain (),
+ "tag:youtube.com,2008:video:RzR2k8yo4NY", NULL, GDATA_TYPE_YOUTUBE_VIDEO,
+ NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_YOUTUBE_VIDEO (video));
+
+ data->new_video = video;
+
+ video = gdata_service_query_single_entry (GDATA_SERVICE (service), gdata_youtube_service_get_primary_authorization_domain (),
+ "tag:youtube.com,2008:video:VppEcVz8qaI", NULL, GDATA_TYPE_YOUTUBE_VIDEO,
+ NULL, &error);
+ g_assert_no_error (error);
+ g_assert (GDATA_IS_YOUTUBE_VIDEO (video));
+
+ data->new_video2 = video;
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_batch (BatchData *data, gconstpointer service)
+{
+ GDataBatchOperation *operation;
+ GDataService *service2;
+ gchar *feed_uri;
+ guint op_id, op_id2;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "batch");
+
+ /* Here we hardcode the feed URI, but it should really be extracted from a video feed, as the GDATA_LINK_BATCH link.
+ * It looks like this feed is read-only, so we can only test querying. */
+ operation = gdata_batchable_create_operation (GDATA_BATCHABLE (service), gdata_youtube_service_get_primary_authorization_domain (),
+ "https://gdata.youtube.com/feeds/api/videos/batch");
+
+ /* Check the properties of the operation */
+ g_assert (gdata_batch_operation_get_service (operation) == service);
+ g_assert_cmpstr (gdata_batch_operation_get_feed_uri (operation), ==, "https://gdata.youtube.com/feeds/api/videos/batch");
+
+ g_object_get (operation,
+ "service", &service2,
+ "feed-uri", &feed_uri,
+ NULL);
+
+ g_assert (service2 == service);
+ g_assert_cmpstr (feed_uri, ==, "https://gdata.youtube.com/feeds/api/videos/batch");
+
+ g_object_unref (service2);
+ g_free (feed_uri);
+
+ /* Run a singleton batch operation to query one of the entries. This
+ * should now always fail, as batch operations were deprecated by v3
+ * of the YouTube API. */
+ gdata_test_batch_operation_query (operation, gdata_entry_get_id (data->new_video), GDATA_TYPE_YOUTUBE_VIDEO, data->new_video, NULL, NULL);
+
+ g_assert (!gdata_batch_operation_run (operation, NULL, &error));
+ g_assert_error (error, GDATA_SERVICE_ERROR,
+ GDATA_SERVICE_ERROR_WITH_BATCH_OPERATION);
+
+ g_clear_error (&error);
+ g_object_unref (operation);
+
+ /* Run another batch operation to query the two entries */
+ operation = gdata_batchable_create_operation (GDATA_BATCHABLE (service), gdata_youtube_service_get_primary_authorization_domain (),
+ "https://gdata.youtube.com/feeds/api/videos/batch");
+ op_id = gdata_test_batch_operation_query (operation, gdata_entry_get_id (data->new_video), GDATA_TYPE_YOUTUBE_VIDEO, data->new_video, NULL,
+ NULL);
+ op_id2 = gdata_test_batch_operation_query (operation, gdata_entry_get_id (data->new_video2), GDATA_TYPE_YOUTUBE_VIDEO, data->new_video2, NULL,
+ NULL);
+ g_assert_cmpuint (op_id, !=, op_id2);
+
+ g_assert (!gdata_batch_operation_run (operation, NULL, &error));
+ g_assert_error (error, GDATA_SERVICE_ERROR,
+ GDATA_SERVICE_ERROR_WITH_BATCH_OPERATION);
+
+ g_clear_error (&error);
+ g_object_unref (operation);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_batch_async_cb (GDataBatchOperation *operation, GAsyncResult *async_result, GMainLoop *main_loop)
+{
+ GError *error = NULL;
+
+ g_assert (!gdata_batch_operation_run_finish (operation, async_result, &error));
+ g_assert_error (error, GDATA_SERVICE_ERROR,
+ GDATA_SERVICE_ERROR_WITH_BATCH_OPERATION);
+ g_clear_error (&error);
+
+ g_main_loop_quit (main_loop);
+}
+
+static void
+test_batch_async (BatchData *data, gconstpointer service)
+{
+ GDataBatchOperation *operation;
+ GMainLoop *main_loop;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "batch-async");
+
+ /* Run an async query operation on the video */
+ operation = gdata_batchable_create_operation (GDATA_BATCHABLE (service), gdata_youtube_service_get_primary_authorization_domain (),
+ "https://gdata.youtube.com/feeds/api/videos/batch");
+ gdata_test_batch_operation_query (operation, gdata_entry_get_id (data->new_video), GDATA_TYPE_YOUTUBE_VIDEO, data->new_video, NULL, &error);
+
+ main_loop = g_main_loop_new (NULL, TRUE);
+
+ gdata_batch_operation_run_async (operation, NULL, (GAsyncReadyCallback) test_batch_async_cb, main_loop);
+
+ g_main_loop_run (main_loop);
+ g_main_loop_unref (main_loop);
+
+ g_assert_error (error, GDATA_SERVICE_ERROR,
+ GDATA_SERVICE_ERROR_WITH_BATCH_OPERATION);
+ g_clear_error (&error);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+test_batch_async_cancellation_cb (GDataBatchOperation *operation, GAsyncResult *async_result, GMainLoop *main_loop)
+{
+ GError *error = NULL;
+
+ g_assert (gdata_batch_operation_run_finish (operation, async_result, &error) == FALSE);
+ g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CANCELLED);
+ g_clear_error (&error);
+
+ g_main_loop_quit (main_loop);
+}
+
+static void
+test_batch_async_cancellation (BatchData *data, gconstpointer service)
+{
+ GDataBatchOperation *operation;
+ GMainLoop *main_loop;
+ GCancellable *cancellable;
+ GError *error = NULL;
+
+ gdata_test_mock_server_start_trace (mock_server, "batch-async-cancellation");
+
+ /* Run an async query operation on the video */
+ operation = gdata_batchable_create_operation (GDATA_BATCHABLE (service), gdata_youtube_service_get_primary_authorization_domain (),
+ "https://gdata.youtube.com/feeds/api/videos/batch");
+ gdata_test_batch_operation_query (operation, gdata_entry_get_id (data->new_video), GDATA_TYPE_YOUTUBE_VIDEO, data->new_video, NULL, &error);
+
+ main_loop = g_main_loop_new (NULL, TRUE);
+ cancellable = g_cancellable_new ();
+
+ gdata_batch_operation_run_async (operation, cancellable, (GAsyncReadyCallback) test_batch_async_cancellation_cb, main_loop);
+ g_cancellable_cancel (cancellable); /* this should cancel the operation before it even starts, as we haven't run the main loop yet */
+
+ g_main_loop_run (main_loop);
+
+ g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CANCELLED);
+ g_clear_error (&error);
+
+ g_main_loop_unref (main_loop);
+ g_object_unref (cancellable);
+ g_object_unref (operation);
+
+ uhm_server_end_trace (mock_server);
+}
+
+static void
+teardown_batch (BatchData *data, gconstpointer service)
+{
+ g_object_unref (data->new_video);
+ g_object_unref (data->new_video2);
+}
+
+static void
+mock_server_notify_resolver_cb (GObject *object, GParamSpec *pspec, gpointer user_data)
+{
+ UhmServer *server;
+ UhmResolver *resolver;
+
+ server = UHM_SERVER (object);
+
+ /* Set up the expected domain names here. This should technically be split up between
+ * the different unit test suites, but that's too much effort. */
+ resolver = uhm_server_get_resolver (server);
+
+ if (resolver != NULL) {
+ const gchar *ip_address = uhm_server_get_address (server);
+
+ uhm_resolver_add_A (resolver, "www.google.com", ip_address);
+ uhm_resolver_add_A (resolver, "www.googleapis.com", ip_address);
+ uhm_resolver_add_A (resolver, "accounts.google.com",
+ ip_address);
+ }
+}
+
+/* Set up a global GDataAuthorizer to be used for all the tests. Unfortunately,
+ * the YouTube API is limited to OAuth2 authorisation, so this requires user
+ * interaction when online.
+ *
+ * If not online, use a dummy authoriser. */
+static GDataAuthorizer *
+create_global_authorizer (void)
+{
+ GDataOAuth2Authorizer *authorizer = NULL; /* owned */
+ gchar *authentication_uri, *authorisation_code;
+ GError *error = NULL;
+
+ /* If not online, just return a dummy authoriser. */
+ if (!uhm_server_get_enable_online (mock_server)) {
+ return GDATA_AUTHORIZER (gdata_dummy_authorizer_new (GDATA_TYPE_YOUTUBE_SERVICE));
+ }
+
+ /* Otherwise, go through the interactive OAuth dance. */
+ gdata_test_mock_server_start_trace (mock_server, "global-authentication");
+ authorizer = gdata_oauth2_authorizer_new (CLIENT_ID, CLIENT_SECRET,
+ REDIRECT_URI,
+ GDATA_TYPE_YOUTUBE_SERVICE);
+
+ /* Get an authentication URI */
+ authentication_uri = gdata_oauth2_authorizer_build_authentication_uri (authorizer, NULL, FALSE);
+ g_assert (authentication_uri != NULL);
+
+ /* Get the authorisation code off the user. */
+ authorisation_code = gdata_test_query_user_for_verifier (authentication_uri);
+
+ g_free (authentication_uri);
+
+ if (authorisation_code == NULL) {
+ /* Skip tests. */
+ g_object_unref (authorizer);
+ authorizer = NULL;
+ goto skip_test;
+ }
+
+ /* Authorise the token */
+ g_assert (gdata_oauth2_authorizer_request_authorization (authorizer,
+ authorisation_code,
+ NULL, &error));
+ g_assert_no_error (error);
+
+skip_test:
+ g_free (authorisation_code);
+
+ uhm_server_end_trace (mock_server);
+
+ return GDATA_AUTHORIZER (authorizer);
+}
+
+int
+main (int argc, char *argv[])
+{
+ gint retval;
+ GDataAuthorizer *authorizer = NULL; /* owned */
+ GDataService *service = NULL; /* owned */
+ GFile *trace_directory = NULL; /* owned */
+ gchar *path = NULL;
+
+ gdata_test_init (argc, argv);
+
+ mock_server = gdata_test_get_mock_server ();
+ g_signal_connect (G_OBJECT (mock_server), "notify::resolver",
+ (GCallback) mock_server_notify_resolver_cb, NULL);
+ path = g_test_build_filename (G_TEST_DIST, "traces/youtube", NULL);
+ trace_directory = g_file_new_for_path (path);
+ g_free (path);
+ uhm_server_set_trace_directory (mock_server, trace_directory);
+ g_object_unref (trace_directory);
+
+ authorizer = create_global_authorizer ();
+ service = GDATA_SERVICE (gdata_youtube_service_new (DEVELOPER_KEY,
+ authorizer));
+
+ g_test_add_func ("/youtube/authentication", test_authentication);
+
+ g_test_add_data_func ("/youtube/query/standard_feeds", service, test_query_standard_feeds);
+ g_test_add_data_func ("/youtube/query/standard_feed", service, test_query_standard_feed);
+ g_test_add_data_func ("/youtube/query/standard_feed/with_query", service, test_query_standard_feed_with_query);
+ g_test_add_data_func ("/youtube/query/standard_feed/error", service, test_query_standard_feed_error);
+ g_test_add_data_func ("/youtube/query/standard_feed/timeout", service, test_query_standard_feed_timeout);
+ g_test_add ("/youtube/query/standard_feed/async", StandardFeedData,
+ service, set_up_standard_feed_async,
+ (void (*)(StandardFeedData *, const void *)) test_query_standard_feed_async,
+ tear_down_standard_feed_async);
+ g_test_add_data_func ("/youtube/query/standard_feed/async/progress_closure", service, test_query_standard_feed_async_progress_closure);
+ g_test_add ("/youtube/query/standard_feed/async/cancellation",
+ StandardFeedData, service, set_up_standard_feed_async,
+ (void (*)(StandardFeedData *, const void *)) test_query_standard_feed_async_cancellation,
+ tear_down_standard_feed_async);
+
+ g_test_add_data_func ("/youtube/query/related", service, test_query_related);
+ g_test_add ("/youtube/query/related/async", GDataAsyncTestData, service, gdata_set_up_async_test_data, test_query_related_async,
+ gdata_tear_down_async_test_data);
+ g_test_add_data_func ("/youtube/query/related/async/progress_closure", service, test_query_related_async_progress_closure);
+ g_test_add ("/youtube/query/related/async/cancellation", GDataAsyncTestData, service, gdata_set_up_async_test_data,
+ test_query_related_async_cancellation, gdata_tear_down_async_test_data);
+
+ g_test_add ("/youtube/upload/simple", UploadData, service, set_up_upload, test_upload_simple, tear_down_upload);
+ g_test_add ("/youtube/upload/async", GDataAsyncTestData, service, set_up_upload_async, test_upload_async, tear_down_upload_async);
+ g_test_add ("/youtube/upload/async/cancellation", GDataAsyncTestData, service, set_up_upload_async, test_upload_async_cancellation,
+ tear_down_upload_async);
+
+ g_test_add_data_func ("/youtube/query/single", service, test_query_single);
+ g_test_add ("/youtube/query/single/async", GDataAsyncTestData, service, gdata_set_up_async_test_data, test_query_single_async,
+ gdata_tear_down_async_test_data);
+ g_test_add ("/youtube/query/single/async/cancellation", GDataAsyncTestData, service, gdata_set_up_async_test_data,
+ test_query_single_async_cancellation, gdata_tear_down_async_test_data);
+
+ g_test_add ("/youtube/comment/query", CommentData, service, set_up_comment, test_comment_query, tear_down_comment);
+ g_test_add ("/youtube/comment/query/async", GDataAsyncTestData, service, set_up_comment_async, test_comment_query_async,
+ tear_down_comment_async);
+ g_test_add ("/youtube/comment/query/async/cancellation", GDataAsyncTestData, service, set_up_comment_async,
+ test_comment_query_async_cancellation, tear_down_comment_async);
+ g_test_add ("/youtube/comment/query/async/progress_closure", CommentData, service, set_up_comment,
+ test_comment_query_async_progress_closure, tear_down_comment);
+
+ g_test_add ("/youtube/comment/insert", InsertCommentData, service, set_up_insert_comment, test_comment_insert,
+ tear_down_insert_comment);
+ g_test_add ("/youtube/comment/insert/async", GDataAsyncTestData, service, set_up_insert_comment_async, test_comment_insert_async,
+ tear_down_insert_comment_async);
+ g_test_add ("/youtube/comment/insert/async/cancellation", GDataAsyncTestData, service, set_up_insert_comment_async,
+ test_comment_insert_async_cancellation, tear_down_insert_comment_async);
+
+ g_test_add ("/youtube/comment/delete", InsertCommentData, service, set_up_insert_comment, test_comment_delete,
+ tear_down_insert_comment);
+ g_test_add ("/youtube/comment/delete/async", GDataAsyncTestData, service, set_up_insert_comment_async, test_comment_delete_async,
+ tear_down_insert_comment_async);
+ g_test_add ("/youtube/comment/delete/async/cancellation", GDataAsyncTestData, service, set_up_insert_comment_async,
+ test_comment_delete_async_cancellation, tear_down_insert_comment_async);
+
+ g_test_add_data_func ("/youtube/categories", service, test_categories);
+ g_test_add ("/youtube/categories/async", GDataAsyncTestData, service, gdata_set_up_async_test_data, test_categories_async,
+ gdata_tear_down_async_test_data);
+ g_test_add ("/youtube/categories/async/cancellation", GDataAsyncTestData, service, gdata_set_up_async_test_data,
+ test_categories_async_cancellation, gdata_tear_down_async_test_data);
+
+ g_test_add ("/youtube/batch", BatchData, service, setup_batch, test_batch, teardown_batch);
+ g_test_add ("/youtube/batch/async", BatchData, service, setup_batch, test_batch_async, teardown_batch);
+ g_test_add ("/youtube/batch/async/cancellation", BatchData, service, setup_batch, test_batch_async_cancellation, teardown_batch);
+
+ g_test_add_func ("/youtube/service/properties", test_service_properties);
+
+ g_test_add_func ("/youtube/parsing/app:control", test_parsing_app_control);
+ g_test_add_func ("/youtube/parsing/yt:recorded", test_parsing_yt_recorded);
+ g_test_add_func ("/youtube/parsing/yt:accessControl", test_parsing_yt_access_control);
+ g_test_add_func ("/youtube/parsing/yt:category", test_parsing_yt_category);
+ g_test_add_func ("/youtube/parsing/video_id_from_uri", test_parsing_video_id_from_uri);
+ g_test_add_func ("/youtube/parsing/georss:where", test_parsing_georss_where);
+ g_test_add_func ("/youtube/parsing/ratings", test_parsing_ratings);
+
+ g_test_add_func ("/youtube/video/escaping", test_video_escaping);
+ g_test_add_func ("/youtube/video/location", test_video_location);
+
+ g_test_add_func ("/youtube/comment/get_json", test_comment_get_json);
+ g_test_add_func ("/youtube/comment/properties/parent-comment-id", test_comment_properties_parent_comment_uri);
+
+ g_test_add_func ("/youtube/query/uri", test_query_uri);
+ g_test_add_func ("/youtube/query/etag", test_query_etag);
+
+ retval = g_test_run ();
+
+ g_clear_object (&service);
+ g_clear_object (&authorizer);
+
+ return retval;
+}
--- /dev/null
+<Project xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:gnome="http://api.gnome.org/doap-extensions#" xmlns="http://usefulinc.com/ns/doap#">
+ <name xml:lang="en">libgdata</name>
+ <shortdesc xml:lang="en">GLib-based library for accessing online service APIs using the GData protocol</shortdesc>
+ <description xml:lang="en">libgdata is a GLib-based library for accessing online service APIs using the GData protocol — most notably, Google's services. It provides APIs to access the common Google services, and has full asynchronous support.</description>
+ <homepage rdf:resource="https://wiki.gnome.org/Projects/libgdata"/>
+ <license rdf:resource="http://usefulinc.com/doap/licenses/lgpl"/>
+ <download-page rdf:resource="http://download.gnome.org/sources/libgdata/"/>
+ <bug-database rdf:resource="https://gitlab.gnome.org/GNOME/libgdata/issues/" />
+ <category rdf:resource="http://api.gnome.org/doap-extensions#core" />
+ <programming-language>C</programming-language>
+ <maintainer>
+ <foaf:Person>
+ <foaf:name>Philip Withnall</foaf:name>
+ <foaf:mbox rdf:resource="mailto:philip@tecnocode.co.uk"/>
+ <gnome:userid>pwithnall</gnome:userid>
+ </foaf:Person>
+ </maintainer>
+</Project>
--- /dev/null
+project(
+ 'libgdata', 'c',
+ version: '0.17.13',
+ license: 'LGPL2.1+',
+ default_options: 'buildtype=debugoptimized',
+ meson_version: '>= 0.50.0',
+)
+
+gdata_name = meson.project_name()
+gdata_version = meson.project_version()
+
+ver_arr = gdata_version.split('.')
+gdata_version_major = ver_arr[0].to_int()
+gdata_version_minor = ver_arr[1].to_int()
+gdata_version_micro = ver_arr[2].to_int()
+
+# API version
+gdata_api_version_major = 0
+gdata_api_version_minor = 0
+
+# Define the install directories
+gdata_prefix = get_option('prefix')
+gdata_datadir = get_option('datadir')
+gdata_libexecdir = get_option('libexecdir')
+gdata_includedir = get_option('includedir')
+
+gdata_include_subdir = gdata_name / 'gdata'
+
+# Before making a release, the GDATA_LT_VERSION string should be modified. The string is of the form c:r:a. Follow these instructions sequentially:
+#
+# 1. If the library source code has changed at all since the last update, then increment revision (‘c:r:a’ becomes ‘c:r+1:a’).
+# 2. If any interfaces have been added, removed, or changed since the last update, increment current, and set revision to 0.
+# 3. If any interfaces have been added since the last public release, then increment age.
+# 4. If any interfaces have been removed or changed since the last public release, then set age to 0.
+#
+# Note that versioning started at 2:0:0 to ensure no conflicts with e-d-s' libgdata library, whose maximum version was 1:0:0
+current = 27
+revision = 2
+age = 5
+gdata_soversion = '@0@.@1@.@2@'.format(current - age, age, revision)
+
+top_inc_dir = include_directories('.')
+
+########################
+# Configuration begins #
+########################
+
+config_h = configuration_data()
+
+config_h.set_quoted('VERSION', gdata_version)
+
+# Globally define _GNU_SOURCE and therefore enable the GNU extensions
+config_h.set('_GNU_SOURCE', true)
+
+config_h.set_quoted('GETTEXT_PACKAGE', 'gdata')
+
+gnome = import('gnome')
+pkgconfig = import('pkgconfig')
+
+# Internationalisation support
+i18n = import('i18n')
+
+build_root = meson.current_build_dir()
+
+# FIXME: Work around the namespace being incorrectly detected
+# by glib-mkenums. This needs to be fixed by changing the
+# namespace in libgdata. See !6.
+sed = find_program('sed')
+enum_source_cmd = [sed, '-e', 's/-in//', '-e', 's/g_data/gdata/', build_root / '@INPUT@']
+enum_header_cmd = [sed, '-e', 's/g_data/gdata/', '-e', 's/G_TYPE_DATA/GDATA_TYPE/', build_root / '@INPUT@']
+
+top_inc_dir = include_directories('.')
+
+cc = meson.get_compiler('c')
+
+# Requirements
+gdata_deps = [
+ dependency('gobject-2.0'),
+ dependency('glib-2.0', version: '>= 2.44.0'),
+ dependency('gio-2.0', version: '>= 2.44.0'),
+ dependency('gio-unix-2.0'),
+ dependency('json-glib-1.0', version: '>= 0.15'),
+ dependency('libxml-2.0'),
+]
+
+common_c_args = [
+ '-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_44',
+ '-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_60',
+]
+
+# Private dependencies for libgdata (specifically used for pkgconfig)
+gdata_private_deps = [
+ dependency('gthread-2.0'),
+]
+
+oauth_dep = dependency('oauth', version: '>= 0.9.4', required: get_option('oauth1'))
+enable_oauth1 = oauth_dep.found()
+if enable_oauth1
+ gdata_private_deps += oauth_dep
+endif
+config_h.set('ENABLE_OAUTH1', enable_oauth1)
+
+libsoup_dep = dependency('libsoup-2.4', version: '>= 2.42.0')
+gdata_deps += libsoup_dep
+# libsoup 2.47.3 is needed for the new SoupServer API; but it contained a bug in
+# soup_server_set_ssl_cert_file() which was only fixed in 2.55.90.
+config_h.set('HAVE_LIBSOUP_2_55_90', libsoup_dep.version().version_compare('>= 2.55.90'))
+
+# Check for gtk
+gtk_dep_req_version = '>= 2.91.2'
+gtk_dep = dependency(
+ 'gtk+-3.0',
+ version: gtk_dep_req_version,
+ required: get_option('gtk'),
+ not_found_message: 'GTK+ support requested but gtk+-3.0 ' + gtk_dep_req_version + ' could not be found',
+)
+
+# GNOME support, which pulls in gcr-base-3 to provide non-pageable memory
+gcr_dep = dependency('gcr-base-3', required: get_option('gnome'))
+enable_gnome = gcr_dep.found()
+if enable_gnome
+ gdata_private_deps += dependency('gcr-base-3')
+endif
+config_h.set('HAVE_GNOME', enable_gnome)
+
+# Check for goa
+# GNOME Online Accounts support -- only used if GNOME support is also enabled
+# Pulls in gdata/gdata-goa-authorizer.[ch]
+goa_dep = dependency('goa-1.0', version: '>= 3.8', required: get_option('goa'))
+enable_goa = goa_dep.found()
+if enable_goa
+ gdata_deps += goa_dep
+endif
+
+# Enable always building tests (default: yes) enable_always_build_tests = get_option('always_build_tests')
+# Install test programs (default: no)
+always_build_tests = get_option('always_build_tests')
+install_tests = get_option('installed_tests')
+
+if always_build_tests
+ libuhttpmock_dep = dependency('libuhttpmock-0.0', version: '>= 0.5.0')
+
+ gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0', version: '>= 2.14')
+ config_h.set('HAVE_GDK_PIXBUF', gdk_pixbuf_dep.found())
+endif
+
+check_functions = [
+ 'memset',
+ 'setlocale',
+ 'strchr',
+ 'strstr',
+]
+
+check_functions += [
+ 'CFLocaleCopyCurrent',
+ 'CFPreferencesCopyAppValue',
+]
+
+foreach func: check_functions
+ cc.has_function(func)
+endforeach
+
+check_headers = [
+ 'arpa/inet.h',
+ 'locale.h',
+ 'memory.h',
+ 'netinet/in.h',
+ 'stdlib.h',
+ 'string.h',
+ 'strings.h',
+ 'sys/socket.h',
+ 'sys/time.h',
+ 'sys/types.h',
+ 'unistd.h',
+]
+
+foreach func: check_headers
+ cc.has_header(func)
+endforeach
+
+subdir('gdata')
+subdir('demos')
+subdir('po')
+if get_option('gtk_doc')
+ subdir('docs/reference')
+endif
+
+# Create the `config.h` file from the `config_h` data
+configure_file(output: 'config.h', configuration: config_h)
--- /dev/null
+option('gtk',
+ type: 'feature',
+ value: 'auto',
+ description: 'enable gtk+-3.0 support')
+
+option('gnome',
+ type: 'feature',
+ value: 'enabled',
+ description: 'enable GNOME support')
+
+option('goa',
+ type: 'feature',
+ value: 'enabled',
+ description: 'enable Gnome Online Accounts (goa) support')
+
+option('oauth1',
+ type: 'feature',
+ value: 'disabled',
+ description: 'enable OAuth 1.0 support (deprecated)')
+
+option('always_build_tests',
+ type: 'boolean',
+ value: true,
+ description: 'Enable always building tests')
+
+option('installed_tests',
+ type: 'boolean',
+ value: false,
+ description: 'Install test programs')
+
+option('man',
+ type: 'boolean',
+ value: false,
+ description: 'generate man pages')
+
+option('gtk_doc',
+ type: 'boolean',
+ value: false,
+ description: 'use gtk-doc to build documentation')
+
+option('introspection',
+ type: 'boolean',
+ value: true,
+ description: 'Enable creation of GObject Introspection files')
+
+option('vapi',
+ type: 'boolean',
+ value: true,
+ description: 'Enable creation of vapi files')
--- /dev/null
+ar
+as
+be
+bg
+bn_IN
+bs
+ca
+ca@valencia
+cs
+da
+de
+el
+en_GB
+eo
+es
+et
+eu
+fi
+fr
+fur
+gl
+gu
+he
+hi
+hr
+hu
+id
+it
+ja
+kn
+ko
+lt
+lv
+ml
+mr
+ms
+nb
+ne
+nl
+oc
+or
+pa
+pl
+pt
+pt_BR
+ro
+ru
+sl
+sk
+sr
+sr@latin
+sv
+ta
+te
+tg
+th
+tr
+ug
+uk
+vi
+zh_CN
+zh_HK
+zh_TW
--- /dev/null
+# List of source files containing translatable strings.
+# Please keep this file sorted alphabetically.
+gdata/gdata-access-handler.c
+gdata/gdata-batch-operation.c
+gdata/gdata-client-login-authorizer.c
+gdata/gdata-commentable.c
+gdata/gdata-download-stream.c
+gdata/gdata-entry.c
+gdata/gdata-feed.c
+gdata/gdata-oauth1-authorizer.c
+gdata/gdata-oauth2-authorizer.c
+gdata/gdata-parsable.c
+gdata/gdata-parser.c
+gdata/gdata-service.c
+gdata/gdata-upload-stream.c
+gdata/services/calendar/gdata-calendar-calendar.c
+gdata/services/calendar/gdata-calendar-event.c
+gdata/services/calendar/gdata-calendar-service.c
+gdata/services/contacts/gdata-contacts-service.c
+gdata/services/documents/gdata-documents-access-rule.c
+gdata/services/documents/gdata-documents-document.c
+gdata/services/documents/gdata-documents-entry.c
+gdata/services/documents/gdata-documents-feed.c
+gdata/services/documents/gdata-documents-service.c
+gdata/services/freebase/gdata-freebase-service.c
+gdata/services/picasaweb/gdata-picasaweb-service.c
+gdata/services/tasks/gdata-tasks-service.c
+gdata/services/youtube/gdata-youtube-service.c
+gdata/services/youtube/gdata-youtube-video.c
--- /dev/null
+# Arabic translation for libgdata.
+# Copyright (C) 2011 libgdata's COPYRIGHT HOLDER
+# This file is distributed under the same license as the libgdata package.
+# IBRAHIM <mradonadiego@hotmail.fr>, 2011.
+# Abderrahim Kitouni <a.kitouni@gmail.com>, 2012.
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=libgda"
+"ta&keywords=I18N+L10N&component=general\n"
+"POT-Creation-Date: 2011-12-20 23:35+0000\n"
+"PO-Revision-Date: 2012-03-20 08:51+0100\n"
+"Last-Translator: Abderrahim Kitouni <a.kitouni@gmail.com>\n"
+"Language-Team: Arabic <doc@arabeyes.org>\n"
+"Language: ar\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
+"&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n"
+"X-Generator: Virtaal 0.7.1\n"
+"X-Project-Style: gnome\n"
+
+#: ../gdata/gdata-client-login-authorizer.c:643
+#: ../gdata/gdata-oauth1-authorizer.c:839
+#: ../gdata/gdata-oauth1-authorizer.c:1111
+msgid "The server returned a malformed response."
+msgstr "أرجع الخادوم ردّا مشوّها."
+
+#: ../gdata/gdata-client-login-authorizer.c:663 ../gdata/gdata-service.c:320
+#, c-format
+msgid "Cannot connect to the service's server."
+msgstr "تعذَّر الاتصال بخادوم الخدمة."
+
+#: ../gdata/gdata-client-login-authorizer.c:668 ../gdata/gdata-service.c:325
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "تعذَّر الاتصال بالخادوم الوسيط."
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:674 ../gdata/gdata-service.c:331
+#, c-format
+#| msgid ""
+#| "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:680 ../gdata/gdata-service.c:337
+#, c-format
+msgid "Authentication required: %s"
+msgstr "الاستيثاق مطلوب: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:685 ../gdata/gdata-service.c:342
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "لم يعثر على المورد المطلوب: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:691 ../gdata/gdata-service.c:348
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "عُدّلت المدخلة منذ أن تم تحميلها: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:703 ../gdata/gdata-service.c:362
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "رمز الخطأ %u عند الاستيثاق: %s"
+
+#: ../gdata/gdata-client-login-authorizer.c:798
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "يجب ملأ CAPTCHA للولوج."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:836
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "يتطلب هذا الحساب كلمة سر لكل تطبيق. (%s)"
+
+#: ../gdata/gdata-client-login-authorizer.c:843
+msgid "Your username or password were incorrect."
+msgstr "اسم المستخدم أو كلمة السر غير صحيح."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:864
+#, c-format
+#| msgid "Your account's e-mail address has not been verified. (%s)"
+msgid "Your account's e-mail address has not been verified. (%s)"
+msgstr "لم يتم التحقق من عنوان البريد الإلكتروني لحسابك. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:869
+#, c-format
+msgid "You have not agreed to the service's terms and conditions. (%s)"
+msgstr "لم توافق على أحكام و شروط الخدمة. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:875
+#, c-format
+#| msgid ""
+#| "This account has been migrated. Please log in online to receive your new "
+#| "username and password. (%s)"
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "حُذف هذا الحساب. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "عُطّل هذا الحساب. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:890
+#, c-format
+msgid "This account's access to this service has been disabled. (%s)"
+msgstr "عُطّل نفاذ هذا الحساب إلى هذه الخدمة. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:895
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "هذه الخدمة غير متوفرة حاليا. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:262
+msgid "This entry does not support comments."
+msgstr "هذه المدخلة لا تدعم التعليقات."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#: ../gdata/gdata-commentable.c:349 ../gdata/gdata-commentable.c:435
+msgid "Comments may not be added to this entry."
+msgstr "لا يمكن إضافة تعليقات لهذه المدخلة."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:518 ../gdata/gdata-commentable.c:594
+msgid "This comment may not be deleted."
+msgstr "لا يمكن حذف هذا التعليق."
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:816
+msgid "Invalid seek request"
+msgstr "طلب سعي غير صالح"
+
+#: ../gdata/gdata-oauth1-authorizer.c:814
+msgid "The server rejected the temporary credentials request."
+msgstr ""
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1085
+msgid "Access was denied by the user or server."
+msgstr "رُفض النفاذ من طرف المستخدم أو الخادوم."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:245 ../gdata/gdata-parsable.c:256
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "خطأ في تحليل XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:258
+msgid "Empty document."
+msgstr "المستند فارغ."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:66
+#, c-format
+#| msgid "A %s element was missing required content."
+msgid "A %s element was missing required content."
+msgstr ""
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:82
+#, c-format
+#| msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+msgstr ""
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element ("00:01:42.500") was unknown.
+#: ../gdata/gdata-parser.c:102
+#, c-format
+#| msgid "The value of the %s property of a %s element (\"%s\") was unknown."
+msgid "The value of the %s property of a %s element (\"%s\") was unknown."
+msgstr ""
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element ("protected") was unknown.
+#: ../gdata/gdata-parser.c:120
+#, c-format
+#| msgid "The content of a %s element (\"%s\") was unknown."
+msgid "The content of a %s element (\"%s\") was unknown."
+msgstr ""
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:140
+#, c-format
+#| msgid "A required property of a %s element (%s) was not present."
+msgid "A required property of a %s element (%s) was not present."
+msgstr ""
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:163
+#, c-format
+#| msgid ""
+#| "Values were present for properties %s and %s of a %s element when only "
+#| "one of the two is allowed."
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:182
+#, c-format
+#| msgid "A required element (%s) was not present."
+msgid "A required element (%s) was not present."
+msgstr ""
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#: ../gdata/gdata-parser.c:197
+#, c-format
+#| msgid "A singleton element (%s) was duplicated."
+msgid "A singleton element (%s) was duplicated."
+msgstr ""
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:368
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "رمز الخطأ %u عند الاستعلام: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:374
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "رمز الخطأ %u عند إدراج مدخلة: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:380
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "رمز الخطأ %u عند تحديث مدخلة: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:386
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "رمز الخطأ %u عند حذف مدخلة: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:392
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "رمز الخطأ %u عند التنزيل: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:398
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "رمز الخطأ %u عند الرفع: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:404
+#, c-format
+#| msgid "Error code %u when running a batch operation: %s"
+msgid "Error code %u when running a batch operation: %s"
+msgstr "رمز الخطأ %u عند تنفيذ دُفعة عمليات: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:711
+#, c-format
+#| msgid "Invalid redirect URI: %s"
+msgid "Invalid redirect URI: %s"
+msgstr ""
+
+#: ../gdata/gdata-service.c:1363
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:624
+#: ../gdata/services/youtube/gdata-youtube-service.c:875
+msgid "The entry has already been inserted."
+msgstr "سبق إدراج المدخلة."
+
+#: ../gdata/gdata-upload-stream.c:889
+msgid "Stream is already closed"
+msgstr "التدفق سبق غلقه."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element ("00FG56") was not in hexadecimal RGB format.
+#: ../gdata/services/calendar/gdata-calendar-calendar.c:406
+#, c-format
+#| msgid ""
+#| "The content of a %s element (\"%s\") was not in hexadecimal RGB format."
+msgid "The content of a %s element (\"%s\") was not in hexadecimal RGB format."
+msgstr ""
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:315
+#: ../gdata/services/calendar/gdata-calendar-service.c:366
+msgid "You must be authenticated to query all calendars."
+msgstr "يجب أن تكون مستوثقا للاستعلام عن كل التقويمات."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:412
+#: ../gdata/services/calendar/gdata-calendar-service.c:463
+#: ../gdata/services/calendar/gdata-calendar-service.c:508
+#: ../gdata/services/calendar/gdata-calendar-service.c:568
+msgid "You must be authenticated to query your own calendars."
+msgstr "يجب أن تكون مستوثقا للاستعلام عن تقويماتك الخاصة."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:517
+#: ../gdata/services/calendar/gdata-calendar-service.c:581
+msgid "The calendar did not have a content URI."
+msgstr "التقويم لم يكن لديه محتوى URI."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:308
+msgid "You must be authenticated to query contacts."
+msgstr "يجب أن تكون مستوثقا للاستعلام عن المراسلين."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:424
+#: ../gdata/services/contacts/gdata-contacts-service.c:474
+msgid "You must be authenticated to query contact groups."
+msgstr "يجب أن تكون مستوثقا للاستعلام عن مجموعات المراسلين."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:514
+msgid "The group has already been inserted."
+msgstr "سبق إدراج المجموعة."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:521
+msgid "You must be authenticated to insert a group."
+msgstr "يجب أن تكون مستوثقا لإدراج مجموعة."
+
+#: ../gdata/services/documents/gdata-documents-document.c:274
+msgid "You must be authenticated to download documents."
+msgstr "يجب أن تكون مستوثقا لتنزيل المستندات."
+
+#: ../gdata/services/documents/gdata-documents-service.c:397
+#: ../gdata/services/documents/gdata-documents-service.c:452
+msgid "You must be authenticated to query documents."
+msgstr "يجب أن تكون مستوثقا للاستعلام عن المستندات."
+
+#: ../gdata/services/documents/gdata-documents-service.c:531
+msgid "You must be authenticated to upload documents."
+msgstr "يجب أن تكون مستوثقا لرفع المستندات."
+
+#: ../gdata/services/documents/gdata-documents-service.c:537
+msgid "The document has already been uploaded."
+msgstr "سبق رفع المستند."
+
+#: ../gdata/services/documents/gdata-documents-service.c:592
+msgid "You must be authenticated to update documents."
+msgstr "يجب أن تكون مستوثقا لتحديث المستندات."
+
+#: ../gdata/services/documents/gdata-documents-service.c:655
+#, c-format
+#| msgid ""
+#| "The content type of the supplied document ('%s') could not be recognized."
+msgid ""
+"The content type of the supplied document ('%s') could not be recognized."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-service.c:704
+#: ../gdata/services/documents/gdata-documents-service.c:889
+msgid "You must be authenticated to move documents and folders."
+msgstr "يجب أن تكون مستوثقا لنقل المستندات والمجلّدات."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr "يجب أن تحدّد اسم مستخدم أو أن تكون مستوثقا للاستعلام عن مستخدم."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:387
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "Query parameter not allowed for albums."
+msgstr "لا يُسمح بمُعامِل الاستعلام للألبومات."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:394
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:455
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr "يجب أن تحدد اسم مستخدم أو أن تكون مستوثقا للاستعلام عن كل الألبومات."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:476
+msgid "The album did not have a feed link."
+msgstr ""
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:631
+msgid "You must be authenticated to upload a file."
+msgstr "يجب أن تكون مستوثقا لرفع ملف."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:707
+msgid "The album has already been inserted."
+msgstr "سبق إدراج الألبوم."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:714
+msgid "You must be authenticated to insert an album."
+msgstr "يجب أن تكون مستوثقا لإدراج ألبوم."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:456
+#, c-format
+msgid "This service is not available at the moment."
+msgstr "الخدمة غير متوفرة حاليا."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:460
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "يجب أن تكون مستوثقا لقيام بهذا."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:465
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr "قمت بالعديد من استدعاءات API مؤخرا. انتظر قليلا ثم حاول مرة أخرى."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:468
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+
+#. Translators: the first parameter is an error code, which is a coded string.
+#. * The second parameter is an error domain, which is another coded string.
+#. * The third parameter is the location of the error, which is either a URI or an XPath.
+#: ../gdata/services/youtube/gdata-youtube-service.c:475
+#: ../gdata/services/youtube/gdata-youtube-service.c:481
+#, c-format
+#| msgid ""
+#| "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+msgid ""
+"Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+msgstr ""
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:499
+#, c-format
+msgid "Unknown and unparsable error received."
+msgstr ""
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:763
+#: ../gdata/services/youtube/gdata-youtube-service.c:820
+msgid "The video did not have a related videos <link>."
+msgstr ""
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:882
+msgid "You must be authenticated to upload a video."
+msgstr "يجب أن تكون مستوثقا لرفع فيديو."
--- /dev/null
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Nilamdyuti Goswami <ngoswami@redhat.com>, 2011, 2012, 2013, 2014.
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=libgdata&keywords=I18N+L10N&component=general\n"
+"POT-Creation-Date: 2014-08-19 09:23+0000\n"
+"PO-Revision-Date: 2014-08-19 22:30+0530\n"
+"Last-Translator: Nilamdyuti Goswami <ngoswami@redhat.com>\n"
+"Language-Team: Assamese <kde-i18n-doc@kde.org>\n"
+"Language: as\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Lokalize 1.5\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+
+#: ../gdata/gdata-client-login-authorizer.c:627
+#: ../gdata/gdata-oauth1-authorizer.c:839
+#: ../gdata/gdata-oauth1-authorizer.c:1115
+msgid "The server returned a malformed response."
+msgstr "চাৰ্ভাৰে এটা ক্ষতিগ্ৰস্থ প্ৰতিক্ৰিয়া দিছে।"
+
+#: ../gdata/gdata-client-login-authorizer.c:647 ../gdata/gdata-service.c:350
+#, c-format
+msgid "Cannot connect to the service's server."
+msgstr "সেৱাৰ চাৰ্ভাৰলে সংযোগ কৰিব নোৱাৰি।"
+
+#: ../gdata/gdata-client-login-authorizer.c:652 ../gdata/gdata-service.c:355
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "প্ৰক্সি চাৰ্ভাৰলে সংযোগ কৰিব নোৱাৰি।"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:658 ../gdata/gdata-service.c:361
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr "অবৈধ URI অনুৰোধ অথবা হেডাৰ, বা অসমৰ্থিত অপ্ৰামাণিক প্ৰাচল: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:664 ../gdata/gdata-service.c:367
+#, c-format
+msgid "Authentication required: %s"
+msgstr "প্ৰমাণীকৰণৰ প্ৰয়োজন: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:669 ../gdata/gdata-service.c:372
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "অনুৰোধ কৰা সম্পদ পোৱা নগল: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:675 ../gdata/gdata-service.c:378
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "প্ৰবিষ্টিটো ডাউনলোডৰ পিছত সলনি কৰা হৈছে: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:687 ../gdata/gdata-service.c:392
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "প্ৰমাণীকৰণৰ সময়ত ত্ৰুটি কোড %u: %s"
+
+#: ../gdata/gdata-client-login-authorizer.c:786
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "লগিন কৰিবলে এটা CAPTCHA পূৰ্ণ কৰিব লাগিব।"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:824
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "এই একাওন্টৰ এটা অনুপ্ৰয়োগ ধাৰ্য্য পাছৱৰ্ডৰ প্ৰয়োজন। (%s)"
+
+#: ../gdata/gdata-client-login-authorizer.c:831
+msgid "Your username or password were incorrect."
+msgstr "আপোনাৰ ব্যৱহাৰকাৰী নাম অথবা পাছৱৰ্ড ভুল আছিল।"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:852
+#, c-format
+msgid "Your account's e-mail address has not been verified. (%s)"
+msgstr "আপোনাৰ একাওন্টৰ ই-মেইল ঠিকনা সতা সত্য নিৰূপণ কৰা হোৱা নাই। (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:857
+#, c-format
+msgid "You have not agreed to the service's terms and conditions. (%s)"
+msgstr "আপুনি সেৱাৰ নিয়ম আৰু চুক্তিসমূহ মানি লোৱা নাই। (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:863
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"এই একাওন্ট প্ৰব্ৰজন কৰা হৈছে। আপোনাৰ নতুন ব্যৱহাৰকাৰী নাম আৰু পাছৱৰ্ডৰ বাবে "
+"অনুগ্ৰহ "
+"কৰি অনলাইন লগিন কৰক। (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:868
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "এই একাওন্ট মচি পেলোৱা হৈছে। (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:873
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "এই একাওন্ট অসামৰ্থবান কৰা হৈছে। (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:878
+#, c-format
+msgid "This account's access to this service has been disabled. (%s)"
+msgstr "এই একাওন্টৰ এই সেৱালে প্ৰবেশাধিকাৰ অসামৰ্থবান কৰা হৈছে। (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:883
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "এই সেৱা এই মূহুৰ্তে উপলব্ধ নহয়। (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:262
+msgid "This entry does not support comments."
+msgstr "এই প্ৰবিষ্টিয়ে মন্তব্যসমূহ সমৰ্থন নকৰে।"
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#: ../gdata/gdata-commentable.c:349 ../gdata/gdata-commentable.c:435
+msgid "Comments may not be added to this entry."
+msgstr "এই প্ৰবিষ্টিলে মন্তব্যসমূহ যোগ কৰা নহব পাৰে।"
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:518 ../gdata/gdata-commentable.c:594
+msgid "This comment may not be deleted."
+msgstr "এই মন্তব্য মচা নহব পাৰে।"
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:762
+msgid "Invalid seek request"
+msgstr "অবৈধ সন্ধান অনুৰোধ"
+
+#: ../gdata/gdata-oauth1-authorizer.c:814
+msgid "The server rejected the temporary credentials request."
+msgstr "চাৰ্ভাৰে অস্থায়ী তথ্যসমূহৰ অনুৰোধ নাকচ কৰিছে।"
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1089
+msgid "Access was denied by the user or server."
+msgstr "অভিগম ব্যৱহাৰকাৰী বা চাৰ্ভাৰ দ্বাৰা নাকচ কৰা হৈছিল।"
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:349 ../gdata/gdata-parsable.c:360
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "XML বিশ্লেষন কৰোতে ত্ৰুটি: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:362
+msgid "Empty document."
+msgstr "খালি দস্তাবেজ।"
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:480 ../gdata/gdata-parsable.c:518
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "JSON বিশ্লেষণ কৰোতে ত্ৰুটি: %s"
+
+#: ../gdata/gdata-parsable.c:519
+msgid "Outermost JSON node is not an object."
+msgstr "বহিৰ্তম JSON ন'ড এটা অবজেক্ট নহয়।"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "এটা %s উপাদানৰ প্ৰয়োজনীয় সমল সন্ধানহীন।"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+msgstr "এটা %s উপাদান (\"%s\") -ৰ সমল ISO ৮৬০১ বিন্যাসত নাছিল।"
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element ("00:01:42.500") was unknown.
+#: ../gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (\"%s\") was unknown."
+msgstr "এটা %s উপাদান (\"%s\") -ৰ %s বৈশিষ্টৰ মান অজ্ঞাত আছিল।"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element ("protected") was unknown.
+#: ../gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (\"%s\") was unknown."
+msgstr "এটা %s উপাদান (\"%s\") -ৰ সমল অজ্ঞাত আছিল।"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "এটা %s উপাদান (\"%s\") -ৰ এটা প্ৰয়োজনীয় বৈশিষ্ট উপস্থিত নাছিল।"
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"এটা %s উপাদানৰ বাবে বৈশিষ্টসমূহ %s আৰু %s -ৰ কাৰণে মানসমূহ উপস্থিত নাছিল "
+"যেতিয়া "
+"দুটাৰ যিকোনো এটাৰ হে অনুমতি আছে।"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "এটা প্ৰয়োজনীয় উপাদান (%s) উপস্থিত নাছিল।"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: ../gdata/gdata-parser.c:200 ../gdata/gdata-parser.c:305
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "এটা একক উপাদান (%s) প্ৰতিলিপিত হৈছিল।"
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A 'title' element was missing required content.
+#: ../gdata/gdata-parser.c:291
+#, c-format
+msgid "A '%s' element was missing required content."
+msgstr "এটা '%s' উপাদানত প্ৰয়োজনীয় সমল নাছিল।"
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a 'uploaded' element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:321
+#, c-format
+msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+msgstr "এটা '%s' উপাদান (\"%s\") ৰ সমল ISO 8601 বিন্যাসত নাছিল।"
+
+#. Translators: the parameter is an error message.
+#: ../gdata/gdata-parser.c:331
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "চাৰ্ভাৰৰ পৰা অবৈধ JSON প্ৰাপ্ত হৈছিল: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:398
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "প্ৰশ্ন কৰাৰ সময়ত ত্ৰুটি কোড %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:404
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "এটা প্ৰবিষ্টি সোমোৱাৰ সময়ত ত্ৰুটি কোড %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:410
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "এটা প্ৰবিষ্টি আপডেইট কৰাৰ সময়ত ত্ৰুটি কোড %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:416
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "এটা প্ৰবিষ্টি মচাৰ সময়ত ত্ৰুটি কোড %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:422
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "ডাউনলোড কৰাৰ সময়ত ত্ৰুটি কোড %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:428
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "আপলোড কৰাৰ সময়ত ত্ৰুটি কোড %u: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:434
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "এটা ছাম কাৰ্য্য চলোৱাৰ সময়ত ত্ৰুটি কোড %u: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:721
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "অবৈধ পুনৰদিশা URl: %s"
+
+#: ../gdata/gdata-service.c:1401
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:624
+#: ../gdata/services/youtube/gdata-youtube-service.c:888
+msgid "The entry has already been inserted."
+msgstr "প্ৰবিষ্টি ইতিমধ্যে সোমোৱা হৈছে।"
+
+#. Resumable upload error.
+#: ../gdata/gdata-upload-stream.c:748 ../gdata/gdata-upload-stream.c:830
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr "এটা চলাই নিব পৰা আপল'ড টুকুৰা আপল'ড কৰাত চাৰ্ভাৰত ত্ৰুটি দেখা দিলে।"
+
+#: ../gdata/gdata-upload-stream.c:896
+msgid "Stream is already closed"
+msgstr "স্ট্ৰিম ইতিমধ্যে বন্ধ"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element ("00FG56") was not in hexadecimal RGB format.
+#: ../gdata/services/calendar/gdata-calendar-calendar.c:406
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in hexadecimal RGB format."
+msgstr "এটা %s উপাদান (\"%s\") -ৰ সমল হেক্সাডেচিমেল RGB বিন্যাসত নাছিল।"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:315
+#: ../gdata/services/calendar/gdata-calendar-service.c:366
+msgid "You must be authenticated to query all calendars."
+msgstr "সকলো কেলেন্ডাৰ প্ৰশ্ন কৰিবলে আপোনাৰ প্ৰমাণিকৰণৰ প্ৰয়োজন।"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:412
+#: ../gdata/services/calendar/gdata-calendar-service.c:463
+#: ../gdata/services/calendar/gdata-calendar-service.c:508
+#: ../gdata/services/calendar/gdata-calendar-service.c:568
+msgid "You must be authenticated to query your own calendars."
+msgstr "আপোনাৰ সকলো কেলেন্ডাৰ প্ৰশ্ন কৰিবলে প্ৰমাণিকৰণৰ প্ৰয়োজন।"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:517
+#: ../gdata/services/calendar/gdata-calendar-service.c:581
+msgid "The calendar did not have a content URI."
+msgstr "কেলেন্ডাৰৰ এটা সমল URl নাছিল।"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:308
+msgid "You must be authenticated to query contacts."
+msgstr "আপুনি পৰিচয়সমুহ প্ৰশ্ন কৰিবলে প্ৰমাণীকৰণৰ প্ৰয়োজন।"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:424
+#: ../gdata/services/contacts/gdata-contacts-service.c:474
+msgid "You must be authenticated to query contact groups."
+msgstr "আপুনি পৰিচয় দলসমুহ প্ৰশ্ন কৰিবলে প্ৰমাণীকৰণৰ প্ৰয়োজন।"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:514
+msgid "The group has already been inserted."
+msgstr "দলটো ইতিমধ্যে সোমোৱা আছে।"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:521
+msgid "You must be authenticated to insert a group."
+msgstr "আপুনি এটা দল সোমাবলে প্ৰমাণীত হব লাগিব।"
+
+#: ../gdata/services/documents/gdata-documents-document.c:300
+msgid "You must be authenticated to download documents."
+msgstr "আপুনি দস্তাবেজসমূহ ডাউনলোড কৰিবলে প্ৰমাণীত হব লাগিব।"
+
+#: ../gdata/services/documents/gdata-documents-service.c:461
+#: ../gdata/services/documents/gdata-documents-service.c:511
+msgid "You must be authenticated to query documents."
+msgstr "আপুনি দস্তাবেজসমূহ প্ৰশ্ন কৰিবলে প্ৰমাণীত হব লাগিব।"
+
+#: ../gdata/services/documents/gdata-documents-service.c:556
+msgid "You must be authenticated to upload documents."
+msgstr "আপুনি দস্তাবেজসমুহ আপলোড কৰিবলে প্ৰমাণীত হব লাগিব।"
+
+#: ../gdata/services/documents/gdata-documents-service.c:562
+msgid "The document has already been uploaded."
+msgstr "দস্তাবেজটো ইতিমধ্যে আপলোড কৰা হৈছে।"
+
+#: ../gdata/services/documents/gdata-documents-service.c:706
+msgid "You must be authenticated to update documents."
+msgstr "আপুনি দস্তাবেজসমূহ আপলোড কৰিবলে প্ৰমাণীত হব লাগিব।"
+
+#: ../gdata/services/documents/gdata-documents-service.c:888
+#, c-format
+msgid ""
+"The content type of the supplied document ('%s') could not be recognized."
+msgstr "যোগান দিয়া দস্তাবেজ ('%s') -ৰ সমলৰ ধৰণ চিহ্নিত কৰিব নোৱাৰি।"
+
+#: ../gdata/services/documents/gdata-documents-service.c:928
+msgid "You must be authenticated to copy documents."
+msgstr "আপুনি দস্তাবেজসমূহ কপি কৰিবলে প্ৰমাণীত হব লাগিব।"
+
+#: ../gdata/services/documents/gdata-documents-service.c:1090
+#: ../gdata/services/documents/gdata-documents-service.c:1273
+msgid "You must be authenticated to move documents and folders."
+msgstr "আপুনি দস্তাবেজ আৰু ফোল্ডাৰসমূহ স্থানান্থৰ কৰিবলে প্ৰমাণীত হব লাগিব।"
+
+#: ../gdata/services/freebase/gdata-freebase-service.c:445
+#, c-format
+msgid "Property '%s' does not hold an image"
+msgstr "বৈশিষ্ট্য '%s' এ এটা ছবি ধৰি নথয়"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"আপুনি এজন ব্যৱহাৰকাৰীক প্ৰশ্ন কৰিবলে এটা ব্যৱহাৰকাৰী নাম ধাৰ্য্য কৰিব লাগিব "
+"নহলে "
+"আপোনাৰ প্ৰমাণীকৰণ হব লাগিব।"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:387
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "Query parameter not allowed for albums."
+msgstr "এলবামসমূহৰ কাৰণে প্ৰশ্ন প্ৰাচলৰ অনুমতি নাই।"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:394
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:455
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"আপুনি সকলো এলবামক প্ৰশ্ন কৰিবলে এটা ব্যৱহাৰকাৰী নাম ধাৰ্য্য কৰিব লাগিব নহলে "
+"আপোনাৰ "
+"প্ৰমাণীকৰণ হব লাগিব।"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:476
+msgid "The album did not have a feed link."
+msgstr "এলবামটোৰ এটা ফিড লিঙ্ক নাছিল।"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:631
+msgid "You must be authenticated to upload a file."
+msgstr "আপুনি এটা ফাইল আপলোড কৰিবলে প্ৰমাণীত হব লাগিব।"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:707
+msgid "The album has already been inserted."
+msgstr "এলবামটো ইতিমধ্যে সোমোৱা হৈছে।"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:714
+msgid "You must be authenticated to insert an album."
+msgstr "আপুনি এটা এলবাম সোমাবলে প্ৰমাণীত হব লাগিব।"
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:145
+#: ../gdata/services/tasks/gdata-tasks-service.c:196
+#| msgid "You must be authenticated to query all calendars."
+msgid "You must be authenticated to query all tasklists."
+msgstr "আপুনি সকলো কাৰ্য্যতালিকা প্ৰশ্ন কৰিবলে প্ৰমাণীত হব লাগিব।"
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:244
+#: ../gdata/services/tasks/gdata-tasks-service.c:300
+#| msgid "You must be authenticated to query your own calendars."
+msgid "You must be authenticated to query your own tasks."
+msgstr "আপুনি আপোনাৰ সকলো কাৰ্য্যক প্ৰশ্ন কৰিবলে প্ৰমাণীত হব লাগিব।"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:457
+#, c-format
+msgid "This service is not available at the moment."
+msgstr "এই সেৱা এই মূহুৰ্তে উপলব্ধ নহয়।"
+
+#. Translators: the parameter is a URI.
+#: ../gdata/services/youtube/gdata-youtube-service.c:462
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"এই কাৰ্য্য কৰিবলৈ আপোনাৰ Google একাওন্ট এটা YouTube চেনেলৰ সৈতে সংযুক্ত থাকিব "
+"লাগিব। এটা সৃষ্টি কৰিবলৈ %s ত যাওক।"
+
+#. Translators: the first parameter is an error code, which is a coded string.
+#. * The second parameter is an error domain, which is another coded string.
+#. * The third parameter is the location of the error, which is either a URI or an XPath.
+#: ../gdata/services/youtube/gdata-youtube-service.c:467
+#: ../gdata/services/youtube/gdata-youtube-service.c:488
+#: ../gdata/services/youtube/gdata-youtube-service.c:494
+#, c-format
+msgid ""
+"Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+msgstr "অৱস্থান \"%s\" -ৰ সৈতে প্ৰাপ্ত ডমেইন \"%s\" -ত অজ্ঞাত ত্ৰুটি \"%s\"।"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:473
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "আপুনি এইটো কৰিবলে প্ৰমাণীত হব লাগিব।"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:478
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"আপুনি শেহতীয়াকে কেইবাটাও API কল কৰিছে। অনুগ্ৰহ কৰি কিছু মিনিট অপেক্ষা কৰক আৰু "
+"পুনৰ "
+"চেষ্টা কৰক।"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:481
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"আপুনি আপোনাৰ প্ৰবিষ্টি কুটাৰ সীমা পাৰ হৈ কৰিছে। অনুগ্ৰহ কৰি কিছুমান প্ৰবিষ্টি "
+"মচি "
+"দিয়ক আৰু পুনৰ চেষ্টা কৰক।"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:512
+#, c-format
+msgid "Unknown and unparsable error received."
+msgstr "অজ্ঞাত আৰু অবিশ্লেষিত ত্ৰুটি প্ৰাপ্ত হৈছে।"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:776
+#: ../gdata/services/youtube/gdata-youtube-service.c:833
+msgid "The video did not have a related videos <link>."
+msgstr "ভিডিঅ'টোৰ আনুষংগিক ভিডিঅ'সমূহ <link> নাছিল।"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:895
+msgid "You must be authenticated to upload a video."
+msgstr "আপুনি এটা ভিডিঅ' আপলোড কৰিবলে প্ৰমাণীত হব লাগিব।"
+
--- /dev/null
+# Kasia Bondarava <kasia.bondarava@gmail.com>, 2012.
+# Ihar Hrachyshka <ihar.hrachyshka@gmail.com>, 2013.
+# Yuras Shumovich <shumovichy@gmail.com>, 2017.
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
+"product=libgdata&keywords=I18N+L10N&component=General\n"
+"POT-Creation-Date: 2017-02-24 23:45+0000\n"
+"PO-Revision-Date: 2017-04-16 12:12+0300\n"
+"Last-Translator: Yuras Shumovich <shumovichy@gmail.com>\n"
+"Language-Team: Belarusian <i18n-bel-gnome@googlegroups.com>\n"
+"Language: be\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+"X-Generator: Poedit 1.8.11\n"
+"X-Project-Style: gnome\n"
+
+#: ../gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Пакетныя аперацыі не падтрымліваюцца на гэтым серверы."
+
+#: ../gdata/gdata-client-login-authorizer.c:629
+#: ../gdata/gdata-oauth1-authorizer.c:840
+#: ../gdata/gdata-oauth1-authorizer.c:1116
+#: ../gdata/gdata-oauth2-authorizer.c:953
+#: ../gdata/gdata-oauth2-authorizer.c:964
+#: ../gdata/gdata-oauth2-authorizer.c:983
+#: ../gdata/gdata-oauth2-authorizer.c:999
+#: ../gdata/gdata-oauth2-authorizer.c:1064
+#: ../gdata/gdata-oauth2-authorizer.c:1076
+#: ../gdata/gdata-oauth2-authorizer.c:1087
+#: ../gdata/gdata-oauth2-authorizer.c:1102
+#: ../gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "Сервер вярнуў адказ няправільнага фармату."
+
+#: ../gdata/gdata-client-login-authorizer.c:649 ../gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Не ўдалося злучыцца з серверам паслугі."
+
+#: ../gdata/gdata-client-login-authorizer.c:654 ../gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Не ўдалося злучыцца з проксі-серверам."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: ../gdata/gdata-client-login-authorizer.c:660 ../gdata/gdata-service.c:372
+#: ../gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Хібны URI-адрас запыту ці загаловак, або параметр, які не падтрымліваецца і "
+"не адпавядае стандарту: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:666 ../gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Неабходна ідэнтыфікацыя: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:671 ../gdata/gdata-service.c:383
+#: ../gdata/services/calendar/gdata-calendar-service.c:313
+#: ../gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "Запатрабаваны рэсурс не знойдзены: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:677 ../gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Запіс быў мадыфікаваны з часоў апошняга сцягвання: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:689 ../gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Хібны код %u падчас ідэнтыфікацыі: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: ../gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "Каб увайсці, неабходна запоўніць CAPTCHA."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Гэты конт патрабуе асаблівы пароль для гэтай праграмы. (%s)"
+
+#: ../gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Пададзенае імя карыстальніка ці пароль хібныя."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "Адрас электроннай пошты для вашага конта не прайшоў праверку. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Вы не згадзіліся з умовамі карыстання паслугай. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Гэты конт быў перанесены. Пачніце сеціўны сеанс, каб атрымаць новыя імя "
+"карыстальніка і пароль. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Ваш конт быў выдалены. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Ваш конт быў выключаны. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "Доступ да конта гэтай паслугі быў выключаны. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "У дадзены момант гэта паслуга недаступна. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:262
+msgid "This entry does not support comments."
+msgstr "Гэты запіс не падтрымлівае каментарыяў."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: ../gdata/gdata-commentable.c:349 ../gdata/gdata-commentable.c:435
+msgid "Comments may not be added to this entry."
+msgstr "Да гэтага запісу нельга дадаваць каментарыі."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:518 ../gdata/gdata-commentable.c:594
+msgid "This comment may not be deleted."
+msgstr "Немагчыма выдаліць гэты каментарый."
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Хібны запыт пракруткі"
+
+#: ../gdata/gdata-oauth1-authorizer.c:815
+msgid "The server rejected the temporary credentials request."
+msgstr "Сервер адхіліў часовы запыт мандата."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1090
+#: ../gdata/gdata-oauth2-authorizer.c:1113
+#: ../gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "Доступ быў адхілены карыстальнікам ці серверам."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:352 ../gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Памылка разбору XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Пусты дакумент."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:483 ../gdata/gdata-parsable.c:521
+#: ../gdata/services/documents/gdata-documents-access-rule.c:144
+#: ../gdata/services/documents/gdata-documents-access-rule.c:154
+#: ../gdata/services/documents/gdata-documents-document.c:286
+#: ../gdata/services/documents/gdata-documents-entry.c:478
+#: ../gdata/services/documents/gdata-documents-entry.c:489
+#: ../gdata/services/documents/gdata-documents-entry.c:500
+#: ../gdata/services/documents/gdata-documents-entry.c:547
+#: ../gdata/services/documents/gdata-documents-entry.c:558
+#: ../gdata/services/documents/gdata-documents-entry.c:666
+#: ../gdata/services/documents/gdata-documents-entry.c:701
+#: ../gdata/services/documents/gdata-documents-entry.c:716
+#: ../gdata/services/documents/gdata-documents-entry.c:731
+#: ../gdata/services/documents/gdata-documents-entry.c:761
+#: ../gdata/services/documents/gdata-documents-entry.c:777
+#: ../gdata/services/documents/gdata-documents-feed.c:81
+#: ../gdata/services/documents/gdata-documents-feed.c:92
+#: ../gdata/services/documents/gdata-documents-feed.c:142
+#: ../gdata/services/documents/gdata-documents-feed.c:160
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Памылка разбору JSON: %s"
+
+#: ../gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Вонкавы JSON-вузел не з'яўляецца аб'ектам."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "У элеменце %s адсутнічае запатрабаванае змесціва."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "Змесціва элемента %s (\"%s\") не закадавана ў фармаце ISO 8601."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: ../gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "Значэнне ўласцівасці %s элемента %s (\"%s\") невядома."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: ../gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "Змесціва элемента %s (\"%s\") невядома."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Запатрабаваная ўласцівасць элемента %s (%s) не знойдзена."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Наяўныя значэнні для ўласцівасцяў %s і %s элемента %s, калі ёсць толькі адна "
+"з дзвюх."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Запатрабаваны элемент (%s) не знойдзены."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: ../gdata/gdata-parser.c:200 ../gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Быў створаны дублікат адзінкавага элемента (%s)."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: ../gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "У элеменце \"%s\" адсутнічае запатрабаванае змесціва."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "Змесціва элемента \"%s\" (\"%s\") не закадавана ў фармаце ISO 8601."
+
+#. Translators: the parameter is an error message.
+#: ../gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Сервер перадаў хібны JSON: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: ../gdata/gdata-parser.c:1179
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr "Змесціва элемента %s (\"%s\") не ў шаснаццаткавым фармаце RGB."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Памылковы код %u падчас запыту: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Памылковы код %u падчас устаўкі запісу: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Памылковы код %u падчас абнаўлення запісу: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Памылковы код %u падчас выдалення запісу: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Памылковы код %u падчас сцягвання: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Памылковы код %u падчас публікацыі на серверы: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Памылковы код %u падчас запуску групавой аперацыі: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "Хібны URI-адрас перанакіравання: %s"
+
+#: ../gdata/gdata-service.c:1466
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:626
+#: ../gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Запіс ужо ўстаўлены."
+
+#. Resumable upload error.
+#: ../gdata/gdata-upload-stream.c:794 ../gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr "Пасля пасылкі аднаўляльнага блока даных сервер вярнуў памылку."
+
+#: ../gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Струмень ужо закрыты"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:302
+#: ../gdata/services/tasks/gdata-tasks-service.c:195
+#: ../gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"У апошні час вы зрабілі надта шмат API-выклікаў. Пачакайце некалькі хвілін і "
+"паўтарыце спробу."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:334
+#: ../gdata/services/tasks/gdata-tasks-service.c:204
+#: ../gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Каб зрабіць гэта, вам трэба прайсці ідэнтыфікацыю."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:465
+#: ../gdata/services/calendar/gdata-calendar-service.c:516
+msgid "You must be authenticated to query all calendars."
+msgstr ""
+"Вам трэба прайсці ідэнтыфікацыю, каб мець магчымасць запыту ўсіх календароў."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:562
+#: ../gdata/services/calendar/gdata-calendar-service.c:613
+#: ../gdata/services/calendar/gdata-calendar-service.c:675
+#: ../gdata/services/calendar/gdata-calendar-service.c:734
+msgid "You must be authenticated to query your own calendars."
+msgstr ""
+"Вам трэба прайсці ідэнтыфікацыю, каб мець магчымасць запыту асабістых "
+"календароў."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:308
+msgid "You must be authenticated to query contacts."
+msgstr "Вам трэба прайсці ідэнтыфікацыю, каб мець магчымасць запыту кантактаў."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:424
+#: ../gdata/services/contacts/gdata-contacts-service.c:474
+msgid "You must be authenticated to query contact groups."
+msgstr ""
+"Вам трэба прайсці ідэнтыфікацыю, каб мець магчымасць запыту груп кантактаў."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:514
+msgid "The group has already been inserted."
+msgstr "Група ўжо ўстаўлена."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:521
+msgid "You must be authenticated to insert a group."
+msgstr "Вам трэба прайсці ідэнтыфікацыю, каб уставіць групу."
+
+#: ../gdata/services/documents/gdata-documents-document.c:392
+msgid "You must be authenticated to download documents."
+msgstr "Вам трэба прайсці ідэнтыфікацыю, каб сцягваць дакументы."
+
+#: ../gdata/services/documents/gdata-documents-document.c:401
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Фармат экспарту дакумента \"%s\" невядомы ці не падтрымліваецца."
+
+#: ../gdata/services/documents/gdata-documents-service.c:454
+#: ../gdata/services/documents/gdata-documents-service.c:504
+msgid "You must be authenticated to query documents."
+msgstr ""
+"Вам трэба прайсці ідэнтыфікацыю, каб мець магчымасць запыту дакументаў."
+
+#: ../gdata/services/documents/gdata-documents-service.c:569
+msgid "You must be authenticated to upload documents."
+msgstr "Вам трэба прайсці ідэнтыфікацыю, каб публікаваць дакументы."
+
+#: ../gdata/services/documents/gdata-documents-service.c:575
+msgid "The document has already been uploaded."
+msgstr "Дакумент ужо апублікаваны на серверы."
+
+#: ../gdata/services/documents/gdata-documents-service.c:720
+msgid "You must be authenticated to update documents."
+msgstr "Вам трэба прайсці ідэнтыфікацыю, каб абнаўляць дакументы."
+
+#: ../gdata/services/documents/gdata-documents-service.c:887
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr "Не ўдалося пазнаць тып змесціва пададзенага дакумента (\"%s\")."
+
+#: ../gdata/services/documents/gdata-documents-service.c:927
+msgid "You must be authenticated to copy documents."
+msgstr "Вам трэба прайсці ідэнтыфікацыю, каб магчы капіраваць дакументы."
+
+#: ../gdata/services/documents/gdata-documents-service.c:955
+msgid "Parent folder not found"
+msgstr "Бацькоўская папка не знойдзена"
+
+#: ../gdata/services/documents/gdata-documents-service.c:1102
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+"Вам трэба прайсці ідэнтыфікацыю, каб дадаваць ці перамяшчаць дакументы і "
+"папкі."
+
+#: ../gdata/services/documents/gdata-documents-service.c:1303
+msgid "You must be authenticated to move documents and folders."
+msgstr "Вам трэба прайсці ідэнтыфікацыю, каб перамяшчаць дакументы і папкі."
+
+#: ../gdata/services/freebase/gdata-freebase-service.c:479
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "Уласцівасць \"%s\" не змяшчае выявы"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Неабходна вызначыць імя карыстальніка ці прайсці ідэнтыфікацыю, каб мець "
+"магчымасць запыту інфармацыі аб карыстальніку."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:387
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "Query parameter not allowed for albums."
+msgstr "Запатрабаваны параметр забаронены для альбомаў."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:394
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:455
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Неабходна вызначыць імя карыстальніка ці прайсці ідэнтыфікацыю, каб мець "
+"магчымасць запыту ўсіх альбомаў."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:476
+msgid "The album did not have a feed link."
+msgstr "У альбома няма спасылкі на навінны канал."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:633
+msgid "You must be authenticated to upload a file."
+msgstr "Вам трэба прайсці ідэнтыфікацыю, каб апублікаваць файл на серверы."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:709
+msgid "The album has already been inserted."
+msgstr "Альбом ужо ўстаўлены."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:716
+msgid "You must be authenticated to insert an album."
+msgstr "Вам трэба прайсці ідэнтыфікацыю, каб уставіць альбом."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:330
+#: ../gdata/services/tasks/gdata-tasks-service.c:381
+msgid "You must be authenticated to query all tasklists."
+msgstr ""
+"Вам трэба прайсці ідэнтыфікацыю, каб мець магчымасць запыту ўсіх спісаў "
+"заданняў."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:430
+#: ../gdata/services/tasks/gdata-tasks-service.c:487
+msgid "You must be authenticated to query your own tasks."
+msgstr ""
+"Вам трэба прайсці ідэнтыфікацыю, каб мець магчымасць запыту ўласных заданняў."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Вы вычарпалі вашу квоту на запісы. Выдаліце некалькі запісаў і паўтарыце "
+"спробу."
+
+#. Translators: the parameter is a URI.
+#: ../gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Для гэтай аперацыі трэба, каб ваш конт Google быў звязаны з каналам YouTube. "
+"Наведайце %s, каб стварыць такі канал."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Вам трэба прайсці ідэнтыфікацыю, каб публікаваць відэа на серверы."
+
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "У элеменце \"%s\" адсутнічае запатрабаванае змесціва."
+
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr "Змесціва элемента \"%s\" (\"%s\") не закадавана ў фармаце ISO 8601."
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "Каляндар не мае URI-адрасу змесціва."
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "У дадзены момант гэта паслуга недаступна."
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr ""
+#~ "Невядомы код памылкі \"%s\" у дамене \"%s\" атрыманы для месцазнаходжання "
+#~ "\"%s\"."
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "Атрымана невядомая памылка, якую немагчыма разабраць."
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "Відэа не мае падобных відэафайлаў <link>."
--- /dev/null
+# Bulgarian translation of libgdata po-file.
+# Copyright (C) 2011, 2012, 2015 Free Software Foundation, Inc.
+# This file is distributed under the same license as the libgdata package.
+# Ivaylo Valkov <ivaylo@e-valkov.org>, 2011.
+# Alexander Shopov <ash@kambanaria.org>, 2011, 2012, 2015.
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-04-11 14:03+0300\n"
+"PO-Revision-Date: 2015-04-11 14:03+0300\n"
+"Last-Translator: Alexander Shopov <ash@kambanaria.org>\n"
+"Language-Team: Bulgarian <dict@fsa-bg.org>\n"
+"Language: bg\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../gdata/gdata-client-login-authorizer.c:629
+#: ../gdata/gdata-oauth1-authorizer.c:840
+#: ../gdata/gdata-oauth1-authorizer.c:1116
+#: ../gdata/gdata-oauth2-authorizer.c:915
+#: ../gdata/gdata-oauth2-authorizer.c:926
+#: ../gdata/gdata-oauth2-authorizer.c:945
+#: ../gdata/gdata-oauth2-authorizer.c:961
+#: ../gdata/gdata-oauth2-authorizer.c:1029
+#: ../gdata/gdata-oauth2-authorizer.c:1040
+#: ../gdata/gdata-oauth2-authorizer.c:1055
+#: ../gdata/gdata-oauth2-authorizer.c:1071
+msgid "The server returned a malformed response."
+msgstr "Сървърът върна неправилен отговор."
+
+#: ../gdata/gdata-client-login-authorizer.c:649 ../gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service's server."
+msgstr "Неуспешна връзка към сървъра за услугата."
+
+#: ../gdata/gdata-client-login-authorizer.c:654 ../gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Неуспешна връзка към сървъра-посредник."
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:660 ../gdata/gdata-service.c:372
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Неправилен адрес, заглавна част или неподдържан нестандартен параметър на "
+"заявката: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:666 ../gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Необходимо е удостоверяване: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:671 ../gdata/gdata-service.c:383
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "Заявеният ресурс не беше намерен: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:677 ../gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Записът се е променил от последното изтегляне: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:689 ../gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Получен е код за грешка „%u“ при удостоверяване: %s"
+
+#: ../gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "За да влезете, попълнете данните от CAPTCHA."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Следната регистрация изисква своя парола: %s"
+
+#: ../gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Потребителското име или паролата са грешни."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account's e-mail address has not been verified. (%s)"
+msgstr ""
+"Пощенският адрес към регистрацията ви не е бил потвърден. За повече "
+"информация посетете „%s“."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service's terms and conditions. (%s)"
+msgstr ""
+"Не сте приели правилата и условията на услугата. За повече информация "
+"посетете „%s“."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Тази регистрация е била обновена. За да получите новото си потребителско име "
+"и парола, влезте в услугата през браузър. За повече информация посетете „%s“."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Тази регистрация е била изтрита. За повече информация посетете „%s“."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Тази регистрация е била спряна. За повече информация посетете „%s“."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account's access to this service has been disabled. (%s)"
+msgstr ""
+"Достъпът до тази услуга е бил спрян за тази регистрация. За повече "
+"информация вижте „%s“."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "В момента тази услуга е недостъпна. За повече информация вижте „%s“."
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:262
+msgid "This entry does not support comments."
+msgstr "Този запис не поддържа коментари."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#: ../gdata/gdata-commentable.c:349 ../gdata/gdata-commentable.c:435
+msgid "Comments may not be added to this entry."
+msgstr "Към този запис не могат да бъдат добавяни коментари."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:518 ../gdata/gdata-commentable.c:594
+msgid "This comment may not be deleted."
+msgstr "Този коментар не може да бъде изтрит."
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:762
+msgid "Invalid seek request"
+msgstr "Неправилна заявка за търсене"
+
+#: ../gdata/gdata-oauth1-authorizer.c:815
+msgid "The server rejected the temporary credentials request."
+msgstr "Сървърът отхвърли заявката за временна акредитация."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1090
+#: ../gdata/gdata-oauth2-authorizer.c:1066
+msgid "Access was denied by the user or server."
+msgstr "Достъпът бе отказан от потребителя или сървъра."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:349 ../gdata/gdata-parsable.c:360
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Грешка при анализа на документа с XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:362
+msgid "Empty document."
+msgstr "Празен документ."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:480 ../gdata/gdata-parsable.c:518
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Грешка при анализа на JSON: %s"
+
+#: ../gdata/gdata-parsable.c:519
+msgid "Outermost JSON node is not an object."
+msgstr "Най-външният елемент в JSON не е обект."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Липсва задължителното съдържание за елемент „%s“."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+msgstr ""
+"Съдържанието („%2$s“) на елемент от вида %1$s не е във формат ISO 8601."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element ("00:01:42.500") was unknown.
+#: ../gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (\"%s\") was unknown."
+msgstr "Стойността („%3$s“) на атрибута %1$s на елемента %2$s беше неизвестна."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element ("protected") was unknown.
+#: ../gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (\"%s\") was unknown."
+msgstr "Съдържанието („%2$s“) на елемент от вида %1$s беше неизвестно."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Липсва задължителният атрибут („%2$s“) на елемент от вида „%1$s“."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Открит е eлемент от вида „%3$s“ с атрибути „%1$s“ и „%2$s“, но елементът "
+"може да има максимум един от двата атрибута."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Задължителният елемент „%s“ липсва."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: ../gdata/gdata-parser.c:200 ../gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Беше открит дубликат на уникалния елемент „%s“."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A 'title' element was missing required content.
+#: ../gdata/gdata-parser.c:273
+#, c-format
+msgid "A '%s' element was missing required content."
+msgstr "Липсва задължителното съдържание за елемент „%s“."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a 'uploaded' element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+msgstr ""
+"Съдържанието („%2$s“) на елемент от вида „%1$s“ не е във формат ISO 8601."
+
+#. Translators: the parameter is an error message.
+#: ../gdata/gdata-parser.c:313
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Получен е неправилен JSON от сървъра: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Получен е код за грешка „%u“ от заявката: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Получен е код за грешка „%u“ при добавяне на запис: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Получен е код за грешка „%u“ при обновяване на запис: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Получен е код за грешка „%u“ при изтриване на запис: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Получен е код за грешка „%u“ при изтегляне: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Получен е код за грешка „%u“ при качване: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Получен е код за грешка „%u“ при пакетна обработка: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:737
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "Неправилен адрес за пренасочване: %s"
+
+#: ../gdata/gdata-service.c:1449
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:624
+#: ../gdata/services/youtube/gdata-youtube-service.c:888
+msgid "The entry has already been inserted."
+msgstr "Записът вече е бил добавен."
+
+#. Resumable upload error.
+#: ../gdata/gdata-upload-stream.c:748 ../gdata/gdata-upload-stream.c:830
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"Получена е грешка от сървъра след качването на поредно парче данни от серия "
+"за възобновяемо качване."
+
+#: ../gdata/gdata-upload-stream.c:896
+msgid "Stream is already closed"
+msgstr "Потокът вече е затворен"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element ("00FG56") was not in hexadecimal RGB format.
+#: ../gdata/services/calendar/gdata-calendar-calendar.c:406
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in hexadecimal RGB format."
+msgstr ""
+"Съдържанието („%s“) на елемент от вида %s не беше в шестнадесетичен формат "
+"ЧЗС (RGB)."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:315
+#: ../gdata/services/calendar/gdata-calendar-service.c:366
+msgid "You must be authenticated to query all calendars."
+msgstr "Необходима е идентификация, за да правите заявки за всички календари."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:412
+#: ../gdata/services/calendar/gdata-calendar-service.c:463
+#: ../gdata/services/calendar/gdata-calendar-service.c:508
+#: ../gdata/services/calendar/gdata-calendar-service.c:568
+msgid "You must be authenticated to query your own calendars."
+msgstr ""
+"Необходима е идентификация, за да правите заявки за собствените си календари."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:517
+#: ../gdata/services/calendar/gdata-calendar-service.c:581
+msgid "The calendar did not have a content URI."
+msgstr "Липсва адрес за съдържанието на календара."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:308
+msgid "You must be authenticated to query contacts."
+msgstr "Необходима е идентификация, за да правите заявки за контакти."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:424
+#: ../gdata/services/contacts/gdata-contacts-service.c:474
+msgid "You must be authenticated to query contact groups."
+msgstr "Необходима е идентификация, за да правите заявки за групи от контакти."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:514
+msgid "The group has already been inserted."
+msgstr "Групата вече е била добавена."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:521
+msgid "You must be authenticated to insert a group."
+msgstr "Необходима е идентификация, за да добавяте групи."
+
+#: ../gdata/services/documents/gdata-documents-document.c:300
+msgid "You must be authenticated to download documents."
+msgstr "Необходима е идентификация, за да изтегляте документи."
+
+#: ../gdata/services/documents/gdata-documents-service.c:519
+#: ../gdata/services/documents/gdata-documents-service.c:569
+msgid "You must be authenticated to query documents."
+msgstr "Необходима е идентификация, за да правите заявки за документи."
+
+#: ../gdata/services/documents/gdata-documents-service.c:614
+msgid "You must be authenticated to upload documents."
+msgstr "Необходима е идентификация, за да качвате документи."
+
+#: ../gdata/services/documents/gdata-documents-service.c:620
+msgid "The document has already been uploaded."
+msgstr "Документът вече е бил качен."
+
+#: ../gdata/services/documents/gdata-documents-service.c:764
+msgid "You must be authenticated to update documents."
+msgstr "Необходима е идентификация, за да обновявате документи."
+
+#: ../gdata/services/documents/gdata-documents-service.c:946
+#, c-format
+msgid ""
+"The content type of the supplied document ('%s') could not be recognized."
+msgstr ""
+"Неуспешно разпознаване на вида на съдържанието на предоставения документ "
+"(„%s“)."
+
+#: ../gdata/services/documents/gdata-documents-service.c:986
+msgid "You must be authenticated to copy documents."
+msgstr "Необходима е идентификация, за да копирате документи."
+
+#: ../gdata/services/documents/gdata-documents-service.c:1148
+#: ../gdata/services/documents/gdata-documents-service.c:1331
+msgid "You must be authenticated to move documents and folders."
+msgstr "Необходима е идентификация, за да местите документи и папки."
+
+#: ../gdata/services/freebase/gdata-freebase-service.c:479
+#, c-format
+msgid "Property '%s' does not hold an image"
+msgstr "Свойството „%s“ не съдържа изображение"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr "Необходима е идентификация, за да правите заявки за потребител."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:387
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "Query parameter not allowed for albums."
+msgstr "Заявката за албуми не може да има параметър."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:394
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:455
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr "Необходима е идентификация, за да правите заявки за всички албуми."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:476
+msgid "The album did not have a feed link."
+msgstr "Липсва списък с емисии за албума."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:631
+msgid "You must be authenticated to upload a file."
+msgstr "Необходима е идентификация, за да качвате файлове."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:707
+msgid "The album has already been inserted."
+msgstr "Албумът вече е бил добавен."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:714
+msgid "You must be authenticated to insert an album."
+msgstr "Необходима е идентификация, за да добавяте албуми."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:195
+#: ../gdata/services/youtube/gdata-youtube-service.c:478
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Направили сте прекалено много заявки към програмния интерфейс (API) за много "
+"кратко време. Изчакайте няколко минути и опитайте отново."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:204
+#: ../gdata/services/youtube/gdata-youtube-service.c:473
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Необходима е идентификация, за да извършите действието."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:330
+#: ../gdata/services/tasks/gdata-tasks-service.c:381
+msgid "You must be authenticated to query all tasklists."
+msgstr ""
+"Необходима е идентификация, за да правите заявки за всички списъци със "
+"задачи."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:430
+#: ../gdata/services/tasks/gdata-tasks-service.c:487
+msgid "You must be authenticated to query your own tasks."
+msgstr ""
+"Необходима е идентификация, за да правите заявки за собствените си списъци "
+"със задачи."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:457
+#, c-format
+msgid "This service is not available at the moment."
+msgstr "В момента услугата е недостъпна."
+
+#. Translators: the parameter is a URI.
+#: ../gdata/services/youtube/gdata-youtube-service.c:462
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Регистрацията ви за Google трябва да е свързана с канала ви в YouTube. За да "
+"направите това, посетете „%s“."
+
+#. Translators: the first parameter is an error code, which is a coded string.
+#. * The second parameter is an error domain, which is another coded string.
+#. * The third parameter is the location of the error, which is either a URI or an XPath.
+#: ../gdata/services/youtube/gdata-youtube-service.c:467
+#: ../gdata/services/youtube/gdata-youtube-service.c:488
+#: ../gdata/services/youtube/gdata-youtube-service.c:494
+#, c-format
+msgid ""
+"Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+msgstr ""
+"Беше върнат неизвестен код за грешка „%1$s“ за местоположението „%3$s“ към "
+"домейна „%2$s“."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:481
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Превишили сте лимита си за записи. Изтрийте някои записи и опитайте отново."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:512
+#, c-format
+msgid "Unknown and unparsable error received."
+msgstr "Получи се неизвестна грешка, която не може да бъде обработена."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:776
+#: ../gdata/services/youtube/gdata-youtube-service.c:833
+msgid "The video did not have a related videos <link>."
+msgstr "Липсва връзка (<link>) за сходни видео клипове за клипа."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:895
+msgid "You must be authenticated to upload a video."
+msgstr "Необходима е идентификация, за да качвате видео клипове."
--- /dev/null
+# Bengali (India) translation for libgdata.
+# Copyright (C) 2011 libgdata's COPYRIGHT HOLDER
+# This file is distributed under the same license as the libgdata package.
+#
+# , 2011.
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug."
+"cgi?product=libgdata&component=general\n"
+"POT-Creation-Date: 2011-02-16 06:06+0000\n"
+"PO-Revision-Date: 2011-02-17 17:28+0530\n"
+"Last-Translator: \n"
+"Language-Team: Bengali (India) <bn_IN@li.org>\n"
+"Language: bn_IN\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Lokalize 1.1\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+
+#: ../gdata/gdata-download-stream.c:571 ../gdata/gdata-upload-stream.c:753
+msgid "Stream is already closed"
+msgstr "স্ট্রিম পূর্বেই বন্ধ করা হয়েছে"
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:245 ../gdata/gdata-parsable.c:256
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "XML পার্স করতে ত্রুটি: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:258
+msgid "Empty document."
+msgstr "ফাঁকা নথি।"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:66
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "একটি %s সামগ্রীর মধ্যে প্রয়োজনীয় তথ্য অনুপস্থিত রয়েছে।"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:82
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+msgstr "একটি %s সামগ্রীর তথ্য (\"%s\") ISO 8601 বিন্যাসে উপস্থিত করা হয়নি।"
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element ("00:01:42.500") was unknown.
+#: ../gdata/gdata-parser.c:102
+#, c-format
+msgid "The value of the %s property of a %s element (\"%s\") was unknown."
+msgstr ""
+"%s বৈশিষ্ট্যটি %s সামগ্রীর মধ্যে উপস্থিত রয়েছে, (\"%s\") কিন্তু এর মান অজানা।"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element ("protected") was unknown.
+#: ../gdata/gdata-parser.c:120
+#, c-format
+msgid "The content of a %s element (\"%s\") was unknown."
+msgstr "একটি %s সামগ্রীর তথ্য (\"%s\") অজানা ছিল।"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:140
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "একটি %s সামগ্রীর জন্য আবশ্যক বৈশিষ্ট্য (%s) উপস্থিত নেই।"
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:163
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"%s ও %s বৈশিষ্ট্যগুলির মান %s সামগ্রী জন্য উপস্থিত রয়েছে। এই ক্ষেত্রে "
+"শুধুমাত্র একটি মান ব্যবহার করা যাবে।"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:182
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "একটি আবশ্যক সামগ্রী (%s) উপস্থিত নেই।"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#: ../gdata/gdata-parser.c:197
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "একটি singleton সামগ্রীর (%s) প্রতিলিপী তৈরি করা হয়েছে।"
+
+#: ../gdata/gdata-service.c:430
+msgid "The server returned a malformed response."
+msgstr "সার্ভার থেকে ত্রুটিপূর্ণ প্রতিক্রিয়া প্রাপ্ত হয়েছে।"
+
+#: ../gdata/gdata-service.c:473
+#, c-format
+msgid "Cannot connect to the service's server."
+msgstr "পরিসেবার সার্ভারের সাথে সংযোগ স্থাপন করতে ব্যর্থ।"
+
+#: ../gdata/gdata-service.c:478
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "প্রক্সি সার্ভারের সাথে সংযোগ করতে ব্যর্থ।"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-service.c:484
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr "অবৈধ URI অথবা হেডার অথবা, অপ্রমিত পরামিতিটি সমর্থিত নয়: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-service.c:490
+#, c-format
+msgid "Authentication required: %s"
+msgstr "অনুমোদন আবশ্যক: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-service.c:495
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "অনুরোধ করা রিসোর্সটি পাওয়া যায়নি: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-service.c:501
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "ডাউনলোড করার পরে এনট্রিটি পরিবর্তন করা হয়েছে: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:515
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "অনুমোদনের সময় %u ত্রুটির কোড পাওয়া গিয়েছে: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:521
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "অনুসন্ধানের সময় %u ত্রুটির কোড প্রাপ্ত হয়েছে: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:527
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "এনট্রি সংযোজনের সময় %u ত্রুটির কোড প্রাপ্ত হয়েছে: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:533
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "একটি এনট্রি পরিবর্তনের সময় %u ত্রুটির কোড প্রাপ্ত হয়েছে: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:539
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "একটি এনট্রি মুছে ফেলার সময় %u ত্রুটির কোড প্রাপ্ত হয়েছে: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:545
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "ডাউনলোড করার সময় %u ত্রুটির কোড প্রাপ্ত হয়েছে: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:551
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "আপলোড করার সময় %u ত্রুটির কোড প্রাপ্ত হয়েছে: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:557
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "ব্যাচ অপারেশনের সময় %u ত্রুটির বার্তা প্রাপ্ত হয়েছে: %s"
+
+#: ../gdata/gdata-service.c:686
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "লগ-ইন করার উদ্দেশ্যে একটি CAPTCHA-র তথ্য পূর্ণ করা আবশ্যক।"
+
+#: ../gdata/gdata-service.c:710
+msgid "Your username or password were incorrect."
+msgstr "ব্যবহারকারী অ্যাকাউন্টের নাম অথবা পাসওয়ার্ড সঠিক নয়।"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-service.c:729
+#, c-format
+msgid "Your account's e-mail address has not been verified. (%s)"
+msgstr "অ্যাকাউন্টের ই-মেইল ঠিকানা যাচাই করা হয়নি। (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-service.c:734
+#, c-format
+msgid "You have not agreed to the service's terms and conditions. (%s)"
+msgstr "পরিসেবার শর্তাবলীতে আপনি সম্মতি জ্ঞাপন করেন নি। (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-service.c:740
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"এই অ্যাকাউন্টটি স্থানান্তর করা হয়েছে। নতুন ব্যবহারকারী অ্যাকাউন্টের নাম ও "
+"পাসওয়ার্ড (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-service.c:745
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "এই অ্যাকাউন্টটি মুছে ফেলা হয়েছে। (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-service.c:750
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "এই অ্যাকাউন্টটি নিষ্ক্রিয় করা হয়েছে। (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-service.c:755
+#, c-format
+msgid "This account's access to this service has been disabled. (%s)"
+msgstr ""
+"এই পরিসেবা ব্যবহারের জন্য অ্যাকাউন্টের অধিকার নিষ্ক্রিয় করা হয়েছে। (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-service.c:760
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "এই মুহূর্তে এই পরিসেবা উপলব্ধ নয়। (%s)"
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:1065
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "পুনঃনির্দেশের উদ্দেশ্যে উল্লিখিত URI বৈধ নয়: %s"
+
+#: ../gdata/gdata-service.c:1641
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:490
+#: ../gdata/services/youtube/gdata-youtube-service.c:778
+msgid "The entry has already been inserted."
+msgstr "একটি এনট্রি সংযোজন করা হয়েছে।"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element ("00FG56") was not in hexadecimal RGB format.
+#: ../gdata/services/calendar/gdata-calendar-calendar.c:385
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in hexadecimal RGB format."
+msgstr "%s সামগ্রীর তথ্য (\"%s\") হেক্সাডেসিমেল RGB বিন্যাসে উপলব্ধ নয়।"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:281
+#: ../gdata/services/calendar/gdata-calendar-service.c:326
+msgid "You must be authenticated to query all calendars."
+msgstr "সকল বর্ষপঞ্জির মধ্যে অনুসন্ধান করার জন্য অনুমোদন প্রাপ্ত হওয়া আবশ্যক।"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:368
+#: ../gdata/services/calendar/gdata-calendar-service.c:413
+#: ../gdata/services/calendar/gdata-calendar-service.c:454
+#: ../gdata/services/calendar/gdata-calendar-service.c:510
+msgid "You must be authenticated to query your own calendars."
+msgstr "নিজের বর্ষপঞ্জির মধ্যে অনুসন্ধান করার জন্য অনুমোদিত হওয়া আবশ্যক।"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:463
+#: ../gdata/services/calendar/gdata-calendar-service.c:519
+msgid "The calendar did not have a content URI."
+msgstr "বর্ষপঞ্জির মধ্যে তথ্যের URI উপস্থিত নেই।"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:229
+#: ../gdata/services/contacts/gdata-contacts-service.c:275
+msgid "You must be authenticated to query contacts."
+msgstr "পরিচিতিদের তালিকা অনুসন্ধানের জন্য অনুমোদিত হওয়া আবশ্যক।"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:384
+#: ../gdata/services/contacts/gdata-contacts-service.c:430
+msgid "You must be authenticated to query contact groups."
+msgstr "পরিচিতিদের দলের তালিকায় অনুসন্ধানের জন্য অনুমোদিত হওয়া আবশ্যক।"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:466
+msgid "The group has already been inserted."
+msgstr "এই দলটি পূর্বেই সংযোজন করা হয়েছে।"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:472
+msgid "You must be authenticated to insert a group."
+msgstr "দল সংযোজন করার জন্য অনুমোদিত হওয়া আবশ্যক।"
+
+#: ../gdata/services/documents/gdata-documents-document.c:274
+msgid "You must be authenticated to download documents."
+msgstr "নথিপত্র ডাউনলোড করার জন্য অনুমোদিত হওয়া আবশ্যক।"
+
+#: ../gdata/services/documents/gdata-documents-service.c:369
+#: ../gdata/services/documents/gdata-documents-service.c:420
+msgid "You must be authenticated to query documents."
+msgstr "নথিপত্র অনুসন্ধানের জন্য অনুমোদিত হওয়া আবশ্যক।"
+
+#: ../gdata/services/documents/gdata-documents-service.c:527
+msgid "You must be authenticated to upload documents."
+msgstr "নথিপত্র আপলোড করার জন্য অনুমোদিত হওয়া আবশ্যক।"
+
+#: ../gdata/services/documents/gdata-documents-service.c:533
+msgid "The document has already been uploaded."
+msgstr "নথিটি পূর্বেই আপলোড করা হয়েছে।"
+
+#: ../gdata/services/documents/gdata-documents-service.c:587
+msgid "You must be authenticated to update documents."
+msgstr "নথিপত্র আপডেট করার জন্য অনুমোদিত হওয়া আবশ্যক।"
+
+#: ../gdata/services/documents/gdata-documents-service.c:650
+#, c-format
+msgid ""
+"The content type of the supplied document ('%s') could not be recognized."
+msgstr "প্রস্তুত করা নথির ('%s') মধ্যে উপস্থিত তথ্যের ধরন সনাক্ত করা যায়নি।"
+
+#: ../gdata/services/documents/gdata-documents-service.c:698
+#: ../gdata/services/documents/gdata-documents-service.c:882
+msgid "You must be authenticated to move documents and folders."
+msgstr "নথিপত্র ও ফোল্ডার স্থানান্তরের জন্য অনুমোদিত হওয়া আবশ্যক।"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:210
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"কোনো ব্যবহারকারীর তথ্য অনুসন্ধানের জন্য ব্যবহারকারী অ্যাকাউন্টের নাম উল্লেখ "
+"করা অথবা অনুমোদিত হওয়া আবশ্যক।"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:264
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:319
+msgid "Query parameter not allowed for albums."
+msgstr "অ্যালবামের ক্ষেত্রে অনুসন্ধানের পরামিতির ব্যবহার অনুমোদিত নয়।"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:271
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:327
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"সকল অ্যালবামের মধ্যে অনুসন্ধানের জন্য ব্যবহারকারী অ্যাকাউন্টের নাম উল্লেখ "
+"করা অথবা অনুমোদিত হওয়া আবশ্যক।"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:345
+msgid "The album did not have a feed link."
+msgstr "অ্যালবামের মধ্যে ফিডের লিংক উপস্থিত নেই।"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:496
+msgid "You must be authenticated to upload a file."
+msgstr "ফাইল আপলোড করার জন্য অনুমোদিত হওয়া আবশ্যক।"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:573
+msgid "The album has already been inserted."
+msgstr "অ্যালবামটি পূর্বেই সংযোজন করা হয়েছে।"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:579
+msgid "You must be authenticated to insert an album."
+msgstr "অ্যালবাম সন্নিবেশ করার জন্য অনুমোদিত হওয়া আবশ্যক।"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:416
+#, c-format
+msgid "This service is not available at the moment."
+msgstr "এই পরিসেবাটি বর্তমানে উপলব্ধ নয়।"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:421
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "এই কাজের জন্য অনুমোদিত হওয়া আবশ্যক।"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:426
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"সম্প্রতি, অত্যাধিক API কল করা হয়েছে। অনুগ্রহ করে কিছু সময় অপেক্ষা করে পুনরায় "
+"প্রয়াস করুন।"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:429
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"এনট্রির সীমা উলঙ্ঘন করা হয়েছে। অনুগ্রহ করে কয়েকটি এনট্রি মুছে পুনরায় প্রয়াস "
+"করুন।"
+
+#. Translators: the first parameter is an error code, which is a coded string.
+#. * The second parameter is an error domain, which is another coded string.
+#. * The third parameter is the location of the error, which is either a URI or an XPath.
+#: ../gdata/services/youtube/gdata-youtube-service.c:436
+#: ../gdata/services/youtube/gdata-youtube-service.c:442
+#, c-format
+msgid ""
+"Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+msgstr ""
+"\"%s\" ত্রুটির কোডটি \"%s\" ডোমেইনের মধ্যে \"%s\" অবস্থান সহ প্রাপ্ত হয়েছে।"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:460
+#, c-format
+msgid "Unknown and unparsable error received."
+msgstr "অজানা ও পার্স করার অযোগ্য একটি ত্রুটি প্রাপ্ত হয়েছে।"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:682
+#: ../gdata/services/youtube/gdata-youtube-service.c:729
+msgid "The video did not have a related videos <link>."
+msgstr "এই ভিডিওর ক্ষেত্রে সমতূল্য ভিডিও চিহ্নিত হয়নি <link>।"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:784
+msgid "You must be authenticated to upload a video."
+msgstr "ভিডিও আপলোড করার জন্য অনুমোদিত হওয়া আবশ্যক।"
+
--- /dev/null
+# Bosnian translation for bosnianuniversetranslation
+# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
+# This file is distributed under the same license as the bosnianuniversetranslation package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: bosnianuniversetranslation\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=libgdata&keywords=I18N+L10N&component=general\n"
+"POT-Creation-Date: 2015-02-26 22:44+0000\n"
+"PO-Revision-Date: 2015-02-28 15:00+0100\n"
+"Last-Translator: Samir Ribić <megaribi@epn.ba>\n"
+"Language-Team: Bosnian <bs@li.org>\n"
+"Language: bs\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2015-02-05 06:45+0000\n"
+"X-Generator: Launchpad (build 17331)\n"
+
+#: ../gdata/gdata-client-login-authorizer.c:629
+#: ../gdata/gdata-oauth1-authorizer.c:840
+#: ../gdata/gdata-oauth1-authorizer.c:1116
+#: ../gdata/gdata-oauth2-authorizer.c:915
+#: ../gdata/gdata-oauth2-authorizer.c:926
+#: ../gdata/gdata-oauth2-authorizer.c:945
+#: ../gdata/gdata-oauth2-authorizer.c:961
+#: ../gdata/gdata-oauth2-authorizer.c:1029
+#: ../gdata/gdata-oauth2-authorizer.c:1040
+#: ../gdata/gdata-oauth2-authorizer.c:1055
+#: ../gdata/gdata-oauth2-authorizer.c:1071
+msgid "The server returned a malformed response."
+msgstr "Server je vratio deformiran odgovor."
+
+#: ../gdata/gdata-client-login-authorizer.c:649 ../gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service's server."
+msgstr "Ne može se konektovati na servisni server."
+
+#: ../gdata/gdata-client-login-authorizer.c:654 ../gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Ne može se konektovati na ovlašteni servis."
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:660 ../gdata/gdata-service.c:372
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Nevažeći zahtjev URI ili zaglavlje, ili nepodržani nestandardni parametar: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:666 ../gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Zahtjevana potvrda: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:671 ../gdata/gdata-service.c:383
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "Traženi izvor nije pronađen: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:677 ../gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Ulaz je promijenjen budući da je preuzet: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:689 ../gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Greška šife %u u toku provjeravanja: %s"
+
+#: ../gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "KAPČA mora biti popunjena kako biste se prijavili."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Ovaj nalog zahtijeva lozinku zavisnu od aplikacije. (%s)"
+
+#: ../gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Vaše korisničko ime ili šifra su netačni."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account's e-mail address has not been verified. (%s)"
+msgstr "Vaša korisnička e-mail adresa nije potvrđena. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service's terms and conditions. (%s)"
+msgstr "Niste se složili sa uslovima i zahtjevima servisa. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Ovaj nalog je premješten. Molimo Vas da se prijavite u mreži da primite vaše "
+"novo korisničko ime i lozinku. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Ova račun je izbrisan. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Ova račun je onemogućen. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account's access to this service has been disabled. (%s)"
+msgstr "Pristup ovog računa servisu je onemogućen. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Servis trenutno nije dostupan. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:262
+msgid "This entry does not support comments."
+msgstr "Ovaj element ne podržava komentare."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#: ../gdata/gdata-commentable.c:349 ../gdata/gdata-commentable.c:435
+msgid "Comments may not be added to this entry."
+msgstr "Komentari se ne mogu dodati ovom elementu."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:518 ../gdata/gdata-commentable.c:594
+msgid "This comment may not be deleted."
+msgstr "Ovaj komentar se ne može obrisati."
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:762
+msgid "Invalid seek request"
+msgstr "Zatražena je neispravna pretraga"
+
+#: ../gdata/gdata-oauth1-authorizer.c:815
+msgid "The server rejected the temporary credentials request."
+msgstr "Server je odbio privremene zahtjeve za povjerenjem."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1090
+#: ../gdata/gdata-oauth2-authorizer.c:1066
+msgid "Access was denied by the user or server."
+msgstr "Server ili korisnik su odbili pristup."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:349 ../gdata/gdata-parsable.c:360
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Greška raščlanjivanja XML: %s"
+
+#. Translators: this is a dummy error message to bje substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:362
+msgid "Empty document."
+msgstr "Prazan dokument."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:480 ../gdata/gdata-parsable.c:518
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Greška u analizi JSON: %s"
+
+#: ../gdata/gdata-parsable.c:519
+msgid "Outermost JSON node is not an object."
+msgstr "Krajnji JSON čvor nije objekt."
+
+#. Translators: the parameter is the nami of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Elementu %s nedostaje potrebni sadržaj."
+
+#. Translators: the first parameter is the nami of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+msgstr "Sadržaj od %s elementa (\"%s\") nije u ISO 8601 formatu."
+
+#. Translators: the first parameter is the nami of an XML property, the second is the nami of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element ("00:01:42.500") was unknown.
+#: ../gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (\"%s\") was unknown."
+msgstr "Vrijednost od %s svojstva od %s elementa (\"%s\") nije pronađena."
+
+#. Translators: the first parameter is the nami of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element ("protected") was unknown.
+#: ../gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (\"%s\") was unknown."
+msgstr "Sadržaj %s elementa (\"%s\") nije pronađen."
+
+#. Translators: the first parameter is the nami of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the nami of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Traženo svojstvo %s elementa (%s) nije prikazano."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Vrijednosti su prisutne za svojstva %s i %s od %s elementa kada je samo "
+"jedno od dva dopušteno."
+
+#. Translators: the parameter is the nami of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Traženi element (\"%s\") nije prikazan."
+
+#. Translators: the parameter is the nami of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the nami of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: ../gdata/gdata-parser.c:200 ../gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Jednočlani element (%s) je dupliciran."
+
+#. Translators: the parameter is the nami of an JSON element.
+#. *
+#. * For example:
+#. * A 'title' element was missing required content.
+#: ../gdata/gdata-parser.c:273
+#, c-format
+msgid "A '%s' element was missing required content."
+msgstr "Elementu „%s“ nedostaje potreban sadržaj."
+
+#. Translators: the first parameter is the nami of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a 'uploaded' element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+msgstr "Sadržaj elementa „%s“ („%s“) nije bio u zapisu ISO 8601."
+
+#. Translators: the parameter is an error message.
+#: ../gdata/gdata-parser.c:313
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Neispravan JSON je primljen sa servera: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Greška šifre %u u toku pretraživanja: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Greška šifre %u u toku umetanja ulaza: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Greška šifre %u u toku ažuriranja ulaza: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Greška šifre %u u toku brisanja ulaza: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Greška šifre %u u toku preuzimanja: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Greška šifre%u u toku učitavanja: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Kod greške %u pri izvršavanju grupne operacije: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:737
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "Nevažeće preusmjeravanje URI: %s"
+
+#: ../gdata/gdata-service.c:1449
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:624
+#: ../gdata/services/youtube/gdata-youtube-service.c:888
+msgid "The entry has already been inserted."
+msgstr "Ovaj ulaz je već umetnut."
+
+#. Resumable upload error.
+#: ../gdata/gdata-upload-stream.c:748 ../gdata/gdata-upload-stream.c:830
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr "Greška primljena s servera nakon slanja popravljivog komada za slanje."
+
+#: ../gdata/gdata-upload-stream.c:896
+msgid "Stream is already closed"
+msgstr "Tok je već zatvoren"
+
+#. Translators: the first parameter is the nami of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element ("00FG56") was not in hexadecimal RGB format.
+#: ../gdata/services/calendar/gdata-calendar-calendar.c:406
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in hexadecimal RGB format."
+msgstr "Sadržaj od %s elementa (\"%s\") nije u heksadecimalnom RGB formatu."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:315
+#: ../gdata/services/calendar/gdata-calendar-service.c:366
+msgid "You must be authenticated to query all calendars."
+msgstr "Morate biti potvrđeni da biste tražili kalendare."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:412
+#: ../gdata/services/calendar/gdata-calendar-service.c:463
+#: ../gdata/services/calendar/gdata-calendar-service.c:508
+#: ../gdata/services/calendar/gdata-calendar-service.c:568
+msgid "You must be authenticated to query your own calendars."
+msgstr "Morate biti potvrđeni da biste tražili vlastiti kalendar."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:517
+#: ../gdata/services/calendar/gdata-calendar-service.c:581
+msgid "The calendar did not have a content URI."
+msgstr "Kalendar nije imao URI sadržaja."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:308
+msgid "You must be authenticated to query contacts."
+msgstr "Morate biti potvrđeni kako biste tražili veze."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:424
+#: ../gdata/services/contacts/gdata-contacts-service.c:474
+msgid "You must be authenticated to query contact groups."
+msgstr "Morate potvrditi identitet za upit kontaktne grupe."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:514
+msgid "The group has already been inserted."
+msgstr "Grupa je već ubačena."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:521
+msgid "You must be authenticated to insert a group."
+msgstr "Morate potvrditi identitet da umetnite grupu."
+
+#: ../gdata/services/documents/gdata-documents-document.c:300
+msgid "You must be authenticated to download documents."
+msgstr "Morate biti potvrđeni da biste preuzeli dokumente."
+
+#: ../gdata/services/documents/gdata-documents-service.c:519
+#: ../gdata/services/documents/gdata-documents-service.c:569
+msgid "You must be authenticated to query documents."
+msgstr "Morate biti potvrđeni kako biste tražili dokumente."
+
+#: ../gdata/services/documents/gdata-documents-service.c:614
+msgid "You must be authenticated to upload documents."
+msgstr "Morate biti potvrđeni kako biste učitali dokumente."
+
+#: ../gdata/services/documents/gdata-documents-service.c:620
+msgid "The document has already been uploaded."
+msgstr "Dokument je već učitan."
+
+#: ../gdata/services/documents/gdata-documents-service.c:764
+msgid "You must be authenticated to update documents."
+msgstr "Morate biti potvrđeni kako biste ažurirali dokumente."
+
+#: ../gdata/services/documents/gdata-documents-service.c:946
+#, c-format
+msgid ""
+"The content type of the supplied document ('%s') could not be recognized."
+msgstr "Tip sadržaja navedenog dokumenta ('%s') se nemože prepoznati."
+
+#: ../gdata/services/documents/gdata-documents-service.c:986
+msgid "You must be authenticated to copy documents."
+msgstr "Morate imati prava da kopirate dokumente."
+
+#: ../gdata/services/documents/gdata-documents-service.c:1148
+#: ../gdata/services/documents/gdata-documents-service.c:1331
+msgid "You must be authenticated to move documents and folders."
+msgstr "Morate potvrditi identitet da premjestite dokumenate i direktorije."
+
+#: ../gdata/services/freebase/gdata-freebase-service.c:445
+#, c-format
+msgid "Property '%s' does not hold an image"
+msgstr "Svojstvo '%s' ne sadrži sliku"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Morate navesti korisničko ime ili biti potvrđeni kako biste tražili "
+"korisnika."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:387
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "Query parameter not allowed for albums."
+msgstr "Traženi parametar nije dozvoljen za albume."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:394
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:455
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Morate navesti korisničko ime ili biti potvrđeni kako biste tražili sve "
+"albume."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:476
+msgid "The album did not have a feed link."
+msgstr "Album nije imao usmjerenu vezu."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:631
+msgid "You must be authenticated to upload a file."
+msgstr "Morate biti potvrđeni kako bi učitali datoteku."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:707
+msgid "The album has already been inserted."
+msgstr "Album je već umetnut."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:714
+msgid "You must be authenticated to insert an album."
+msgstr "Morate biti potvrđeni da umetnite album."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:195
+#: ../gdata/services/youtube/gdata-youtube-service.c:478
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Napravili ste puno API poziva u posljednje vrijeme. Sačekajte nekoliko "
+"minuta i pokušajte ponovno."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:204
+#: ../gdata/services/youtube/gdata-youtube-service.c:473
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Da uradite ovo morate biti potvrđeni."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:330
+#: ../gdata/services/tasks/gdata-tasks-service.c:381
+msgid "You must be authenticated to query all tasklists."
+msgstr ""
+"Morate da potvrdite identitet da biste propitali sve spiskove zadataka."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:430
+#: ../gdata/services/tasks/gdata-tasks-service.c:487
+msgid "You must be authenticated to query your own tasks."
+msgstr "Morate da potvrdite identitet da biste propitali vaše lične zadatke."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:457
+#, c-format
+msgid "This service is not available at the moment."
+msgstr "Servis trenutno nije dostupan."
+
+#. Translators: the parameter is a URI.
+#: ../gdata/services/youtube/gdata-youtube-service.c:462
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Vaš Google mora biti povezan s YouTube kanalom da ovo uradite. Posjetite %s "
+"da ga kreirate."
+
+#. Translators: the first parameter is an error code, which is a coded string.
+#. * The second parameter is an error domain, which is another coded string.
+#. * The third parameter is the location of the error, which is either a URI or an XPath.
+#: ../gdata/services/youtube/gdata-youtube-service.c:467
+#: ../gdata/services/youtube/gdata-youtube-service.c:488
+#: ../gdata/services/youtube/gdata-youtube-service.c:494
+#, c-format
+msgid ""
+"Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+msgstr ""
+"Nepoznata greška šifre \"%s\" u području \"%s\" primljenom sa lokacijom \"%s"
+"\"."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:481
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Premašili ste vaš upis kvota. Molimo izbrišite neke upise i pokušajte "
+"ponovno."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:512
+#, c-format
+msgid "Unknown and unparsable error received."
+msgstr "Nepoznata greška je primljena."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:776
+#: ../gdata/services/youtube/gdata-youtube-service.c:833
+msgid "The video did not have a related videos <link>."
+msgstr "Snimak nema povezane snimke <link>."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:895
+msgid "You must be authenticated to upload a video."
+msgstr "Morate biti potvrđeni kako biste učitali snimak."
--- /dev/null
+# Traducció del libgdata de l'equip de Softcatalà.
+# Copyright © 2009 Free Software Foundation, Inc.
+# This file is distributed under the same license as the libgdata package.
+# Joan Duran <jodufi@gmail.com>, 2009-2012.
+# Gil Forcada <gilforcada@guifi.net>, 2011, 2013, 2014.
+# Jordi Serratosa <jordis@softcatala.cat>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-08-14 08:41+0000\n"
+"PO-Revision-Date: 2017-08-22 13:22+0200\n"
+"Last-Translator: Gil Forcada <gilforcada@guifi.net>\n"
+"Language-Team: Catalan <tradgnome@softcatala.org>\n"
+"Language: ca\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Poedit 1.8.11\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Les operacions massives no són compatibles amb aquest servei."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:840 gdata/gdata-oauth1-authorizer.c:1105
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "El servidor ha retornat una resposta mal formada."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "No es pot connectar al servidor del servei."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "No es pot connectar al servidor intermediari."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"L'URI de sol·licitud o la capçalera no són vàlids, o era un paràmetre no "
+"estàndard i no compatible: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Cal autenticació: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "No s'ha trobat el recurs sol·licitat: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "S'ha modificat l'entrada des que es va baixar: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Codi d'error %u en autenticar: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "S'ha d'emplenar un CAPTCHA per entrar."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr ""
+"Aquest compte requereix una contrasenya específica de l'aplicació. (%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "El nom d'usuari o la contrasenya eren incorrectes."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "No s'ha verificat la vostra adreça electrònica. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "No heu acceptat els termes i les condicions del servei. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Aquest compte s'ha migrat. Entreu en línia per rebre el nom d'usuari i la "
+"contrasenya nous. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Aquest compte s'ha suprimit. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Aquest compte s'ha inhabilitat. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "S'ha inhabilitat l'accés a aquest servei des d'aquest compte. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Aquest servei no està disponible actualment. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "Aquesta entrada no permet fer-hi comentaris."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "No podeu afegir comentaris a aquesta entrada."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "No podeu suprimir aquest missatge."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "La sol·licitud de cerca no és vàlida"
+
+#: gdata/gdata-oauth1-authorizer.c:815
+msgid "The server rejected the temporary credentials request."
+msgstr "El servidor ha rebutjat la sol·licitud de credencials temporal."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1079 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "S'ha denegat l'accés per l'usuari o el servidor."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "S'ha produït un error en analitzar l'XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Document buit."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "S'ha produït un error en analitzar el JSON: %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "El node JSON de primer nivell no és un objecte."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "A un element %s l'hi falta el contingut necessari."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "El contingut d'un element %s («%s») no estava en el format ISO 8601."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "Es desconeixia el valor de la propietat %s de l'element %s («%s»)."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "Es desconeixia el contingut de l'element %s («%s»)."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "No existia una propietat necessària d'un element %s (%s)."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Hi ha valors per a l'element %3$s a les propietats %1$s i %2$s, tot i que "
+"només se'n permet una d'elles."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "No existia un element necessari (%s)."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Un element únic (%s) estava duplicat."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "A un element %s l'hi falta el contingut necessari."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "El contingut d'un element %s («%s») no estava en el format ISO 8601."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "S'han rebut unes dades JSON no vàlides del servidor: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr ""
+"El contingut de l'element %s («%s») no estava en format RGB hexadecimal."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Codi d'error %u en consultar: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Codi d'error %u en inserir una entrada: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Codi d'error %u en actualitzar una entrada: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Codi d'error %u en suprimir una entrada: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Codi d'error %u en baixar: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Codi d'error %u en pujar: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Codi d'error %u en executar l'operació massiva: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "URI de redirecció no vàlid: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Aquesta entrada ja fou inserida."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"S'ha rebut un error del servidor després de pujar un fragment de pujada que "
+"es pot reprendre."
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "El flux ja està tancat"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Heu realitzat massa crides a l'API últimament. Espereu uns minuts i torneu-"
+"ho a intentar."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Heu d'estar autenticat per fer-ho."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "Heu d'estar autenticat per consultar tots els calendaris."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "Heu d'estar autenticat per consultar els vostres calendaris."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "Heu d'estar autenticat per consultar els contactes."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "Heu d'estar autenticat per consultar els grups de contactes."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "El grup ja fou inserit."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "Heu d'estar autenticat per inserir un grup."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "Heu d'estar autenticat per baixar documents."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "El format d'exportació «%s» del document no és conegut o compatible."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "Visibilitat no vàlida: valor no reconegut «%s»"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "Heu d'estar autenticat per consultar els documents."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "Heu d'estar autenticat per pujar documents."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "Aquest document ja s'ha pujat."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "Heu d'estar autenticat per actualitzar documents."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr ""
+"No s'ha pogut reconèixer el tipus de contingut del document subministrat "
+"(«%s»)."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "Heu d'estar autenticat per copiar els documents."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "No s'ha trobat la carpeta pare"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr "Heu d'estar autenticat per inserir o moure documents i carpetes."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr "Heu d'estar autenticat per moure documents i carpetes."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "En la propietat «%s» no hi ha cap imatge"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Heu d'especificar un nom d'usuari o estar autenticat per consultar un "
+"usuari."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "El paràmetre de consulta no és vàlid per als àlbums."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Heu d'especificar un nom d'usuari o estar autenticat per consultar tots els "
+"àlbums."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "L'àlbum no tenia cap enllaç de canal."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "Heu d'estar autenticat per pujar un fitxer."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "Ja s'ha inserit l'àlbum."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "Heu d'estar autenticat per inserir un àlbum."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr "Heu d'estar autenticat per consultar totes les llistes de tasques."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "Heu d'estar autenticat per consultar les vostres tasques."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Heu excedit la vostra quota d'entrades. Suprimiu-ne algunes i torneu-ho a "
+"intentar."
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Per poder fer això heu de vincular el vostre compte del Google amb un canal "
+"de YouTube. Aneu a %s per crear-ne un."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Heu d'estar autenticat per pujar un vídeo."
+
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "A un element «%s» l'hi falta el contingut necessari."
+
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr ""
+#~ "El contingut d'un element «%s» («%s») no estava en el format ISO 8601."
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "El calendari no tenia un URI de contingut."
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "Aquest servei no està disponible actualment."
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr ""
+#~ "S'ha rebut un codi d'error desconegut «%s» al domini «%s» amb la ubicació "
+#~ "«%s»."
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "S'ha rebut un error desconegut i que no es pot analitzar."
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "El vídeo no tenia vídeos relacionats <link>."
--- /dev/null
+# Traducció del libgdata de l'equip de Softcatalà.
+# Copyright © 2009 Free Software Foundation, Inc.
+# This file is distributed under the same license as the libgdata package.
+# Joan Duran <jodufi@gmail.com>, 2009-2012.
+# Gil Forcada <gilforcada@guifi.net>, 2011, 2013, 2014.
+# Jordi Serratosa <jordis@softcatala.cat>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata\n"
+"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
+"product=libgdata&keywords=I18N+L10N&component=General\n"
+"POT-Creation-Date: 2017-08-23 07:20+0000\n"
+"PO-Revision-Date: 2017-08-22 13:22+0200\n"
+"Last-Translator: Xavi Ivars <xavi.ivars@gmail.com>\n"
+"Language-Team: Catalan <tradgnome@softcatala.org>\n"
+"Language: ca-valencia\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Poedit 1.8.11\n"
+
+#: ../gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Les operacions massives no són compatibles amb este servei."
+
+#: ../gdata/gdata-client-login-authorizer.c:629
+#: ../gdata/gdata-oauth1-authorizer.c:840
+#: ../gdata/gdata-oauth1-authorizer.c:1105
+#: ../gdata/gdata-oauth2-authorizer.c:953
+#: ../gdata/gdata-oauth2-authorizer.c:964
+#: ../gdata/gdata-oauth2-authorizer.c:983
+#: ../gdata/gdata-oauth2-authorizer.c:999
+#: ../gdata/gdata-oauth2-authorizer.c:1064
+#: ../gdata/gdata-oauth2-authorizer.c:1076
+#: ../gdata/gdata-oauth2-authorizer.c:1087
+#: ../gdata/gdata-oauth2-authorizer.c:1102
+#: ../gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "El servidor ha retornat una resposta mal formada."
+
+#: ../gdata/gdata-client-login-authorizer.c:649 ../gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "No es pot connectar al servidor del servei."
+
+#: ../gdata/gdata-client-login-authorizer.c:654 ../gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "No es pot connectar al servidor intermediari."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: ../gdata/gdata-client-login-authorizer.c:660 ../gdata/gdata-service.c:372
+#: ../gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"L'URI de sol·licitud o la capçalera no són vàlids, o era un paràmetre no "
+"estàndard i no compatible: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:666 ../gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Cal autenticació: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:671 ../gdata/gdata-service.c:383
+#: ../gdata/services/calendar/gdata-calendar-service.c:313
+#: ../gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "No s'ha trobat el recurs sol·licitat: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:677 ../gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "S'ha modificat l'entrada des que es va baixar: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:689 ../gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Codi d'error %u en autenticar: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: ../gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "S'ha d'omplir un CAPTCHA per entrar."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr ""
+"Este compte requereix una contrasenya específica de l'aplicació. (%s)"
+
+#: ../gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "El nom d'usuari o la contrasenya eren incorrectes."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "No s'ha verificat la vostra adreça electrònica. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "No heu acceptat els termes i les condicions del servei. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Este compte s'ha migrat. Entreu en línia per rebre el nom d'usuari i la "
+"contrasenya nous. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Este compte s'ha suprimit. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Este compte s'ha inhabilitat. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "S'ha inhabilitat l'accés a este servei des d'este compte. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Este servei no està disponible actualment. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "Esta entrada no permet fer-hi comentaris."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: ../gdata/gdata-commentable.c:338 ../gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "No podeu afegir comentaris a esta entrada."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:494 ../gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "No podeu suprimir este missatge."
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "La sol·licitud de busca no és vàlida"
+
+#: ../gdata/gdata-oauth1-authorizer.c:815
+msgid "The server rejected the temporary credentials request."
+msgstr "El servidor ha rebutjat la sol·licitud de credencials temporal."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1079
+#: ../gdata/gdata-oauth2-authorizer.c:1113
+#: ../gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "S'ha denegat l'accés per l'usuari o el servidor."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:352 ../gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "S'ha produït un error en analitzar l'XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Document buit."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:483 ../gdata/gdata-parsable.c:521
+#: ../gdata/services/documents/gdata-documents-access-rule.c:144
+#: ../gdata/services/documents/gdata-documents-access-rule.c:154
+#: ../gdata/services/documents/gdata-documents-document.c:286
+#: ../gdata/services/documents/gdata-documents-entry.c:477
+#: ../gdata/services/documents/gdata-documents-entry.c:488
+#: ../gdata/services/documents/gdata-documents-entry.c:499
+#: ../gdata/services/documents/gdata-documents-entry.c:546
+#: ../gdata/services/documents/gdata-documents-entry.c:557
+#: ../gdata/services/documents/gdata-documents-entry.c:665
+#: ../gdata/services/documents/gdata-documents-entry.c:700
+#: ../gdata/services/documents/gdata-documents-entry.c:715
+#: ../gdata/services/documents/gdata-documents-entry.c:730
+#: ../gdata/services/documents/gdata-documents-entry.c:760
+#: ../gdata/services/documents/gdata-documents-entry.c:776
+#: ../gdata/services/documents/gdata-documents-feed.c:81
+#: ../gdata/services/documents/gdata-documents-feed.c:92
+#: ../gdata/services/documents/gdata-documents-feed.c:129
+#: ../gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "S'ha produït un error en analitzar el JSON: %s"
+
+#: ../gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "El node JSON de primer nivell no és un objecte."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "A un element %s l'hi falta el contingut necessari."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "El contingut d'un element %s («%s») no estava en el format ISO 8601."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: ../gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "Es desconeixia el valor de la propietat %s de l'element %s («%s»)."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: ../gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "Es desconeixia el contingut de l'element %s («%s»)."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "No existia una propietat necessària d'un element %s (%s)."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Hi ha valors per a l'element %3$s a les propietats %1$s i %2$s, tot i que "
+"només se'n permet una d'elles."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "No existia un element necessari (%s)."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: ../gdata/gdata-parser.c:200 ../gdata/gdata-parser.c:318
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Un element únic (%s) estava duplicat."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: ../gdata/gdata-parser.c:304
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "A un element %s l'hi falta el contingut necessari."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:334
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "El contingut d'un element %s («%s») no estava en el format ISO 8601."
+
+#. Translators: the parameter is an error message.
+#: ../gdata/gdata-parser.c:345
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "S'han rebut unes dades JSON no vàlides del servidor: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: ../gdata/gdata-parser.c:1210
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr ""
+"El contingut de l'element %s («%s») no estava en format RGB hexadecimal."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Codi d'error %u en consultar: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Codi d'error %u en inserir una entrada: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Codi d'error %u en actualitzar una entrada: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Codi d'error %u en suprimir una entrada: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Codi d'error %u en baixar: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Codi d'error %u en pujar: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Codi d'error %u en executar l'operació massiva: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "URI de redireccionament no vàlid: %s"
+
+#: ../gdata/gdata-service.c:1432
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: ../gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Esta entrada ja fou inserida."
+
+#. Resumable upload error.
+#: ../gdata/gdata-upload-stream.c:794 ../gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"S'ha rebut un error del servidor després de pujar un fragment de pujada que "
+"es pot reprendre."
+
+#: ../gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "El flux ja està tancat"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:302
+#: ../gdata/services/tasks/gdata-tasks-service.c:195
+#: ../gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Heu realitzat massa crides a l'API últimament. Espereu uns minuts i torneu-"
+"ho a intentar."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:334
+#: ../gdata/services/tasks/gdata-tasks-service.c:204
+#: ../gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Heu d'estar autenticat per fer-ho."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:465
+#: ../gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "Heu d'estar autenticat per consultar tots els calendaris."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:563
+#: ../gdata/services/calendar/gdata-calendar-service.c:617
+#: ../gdata/services/calendar/gdata-calendar-service.c:677
+#: ../gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "Heu d'estar autenticat per consultar els vostres calendaris."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "Heu d'estar autenticat per consultar els contactes."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:425
+#: ../gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "Heu d'estar autenticat per consultar els grups de contactes."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "El grup ja fou inserit."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "Heu d'estar autenticat per inserir un grup."
+
+#: ../gdata/services/documents/gdata-documents-document.c:392
+msgid "You must be authenticated to download documents."
+msgstr "Heu d'estar autenticat per baixar documents."
+
+#: ../gdata/services/documents/gdata-documents-document.c:401
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "El format d'exportació «%s» del document no és conegut o compatible."
+
+#: ../gdata/services/documents/gdata-documents-service.c:580
+#: ../gdata/services/documents/gdata-documents-service.c:633
+msgid "You must be authenticated to query documents."
+msgstr "Heu d'estar autenticat per consultar els documents."
+
+#: ../gdata/services/documents/gdata-documents-service.c:696
+msgid "You must be authenticated to upload documents."
+msgstr "Heu d'estar autenticat per pujar documents."
+
+#: ../gdata/services/documents/gdata-documents-service.c:702
+msgid "The document has already been uploaded."
+msgstr "Este document ja s'ha pujat."
+
+#: ../gdata/services/documents/gdata-documents-service.c:847
+msgid "You must be authenticated to update documents."
+msgstr "Heu d'estar autenticat per actualitzar documents."
+
+#: ../gdata/services/documents/gdata-documents-service.c:1014
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr ""
+"No s'ha pogut reconèixer el tipus de contingut del document subministrat "
+"(«%s»)."
+
+#: ../gdata/services/documents/gdata-documents-service.c:1054
+msgid "You must be authenticated to copy documents."
+msgstr "Heu d'estar autenticat per copiar els documents."
+
+#: ../gdata/services/documents/gdata-documents-service.c:1073
+#: ../gdata/services/documents/gdata-documents-service.c:1414
+msgid "Parent folder not found"
+msgstr "No s'ha trobat la carpeta pare"
+
+#: ../gdata/services/documents/gdata-documents-service.c:1206
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr "Heu d'estar autenticat per inserir o moure documents i carpetes."
+
+#: ../gdata/services/documents/gdata-documents-service.c:1392
+msgid "You must be authenticated to move documents and folders."
+msgstr "Heu d'estar autenticat per moure documents i carpetes."
+
+#: ../gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "En la propietat «%s» no hi ha cap imatge"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Heu d'especificar un nom d'usuari o estar autenticat per consultar un "
+"usuari.."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "El paràmetre de consulta no és vàlid per als àlbums."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Heu d'especificar un nom d'usuari o estar autenticat per consultar tots els "
+"àlbums."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "L'àlbum no tenia cap enllaç de canal."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "Heu d'estar autenticat per pujar un fitxer."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "Ja s'ha inserit l'àlbum."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "Heu d'estar autenticat per inserir un àlbum."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:330
+#: ../gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr "Heu d'estar autenticat per consultar totes les llistes de tasques."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:431
+#: ../gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "Heu d'estar autenticat per consultar les vostres tasques."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Heu excedit la vostra quota d'entrades. Suprimiu-ne algunes i torneu-ho a "
+"intentar."
+
+#. Translators: the parameter is a URI.
+#: ../gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Per poder fer això heu de vincular el vostre compte del Google amb un canal "
+"de YouTube. Aneu a %s per crear-ne un."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Heu d'estar autenticat per pujar un vídeo."
+
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "A un element «%s» l'hi falta el contingut necessari."
+
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr ""
+#~ "El contingut d'un element «%s» («%s») no estava en el format ISO 8601."
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "El calendari no tenia un URI de contingut."
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "Aquest servei no està disponible actualment."
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr ""
+#~ "S'ha rebut un codi d'error desconegut «%s» al domini «%s» amb la ubicació "
+#~ "«%s»."
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "S'ha rebut un error desconegut i que no es pot analitzar."
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "El vídeo no tenia vídeos relacionats <link>."
--- /dev/null
+# Czech translation for libgdata.
+# Copyright (C) 2009, 2010 the author(s) of libgdata.
+# This file is distributed under the same license as the libgdata package.
+#
+# Petr Kovar <pknbe@volny.cz>, 2010.
+# Andre Klapper <ak-47@gmx.net>, 2011.
+# Marek Černocký <marek@manet.cz>, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2019.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-09-03 09:39+0000\n"
+"PO-Revision-Date: 2019-09-03 18:38+0200\n"
+"Last-Translator: Marek Černocký <marek@manet.cz>\n"
+"Language-Team: čeština <gnome-cs-list@gnome.org>\n"
+"Language: cs\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
+"X-Generator: Gtranslator 2.91.7\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Tato služba nepodporuje dávkové operace."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "Server vrátil chybnou odpověď."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Nelze se připojit k serveru poskytujícímu službu."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Nelze se připojit k serveru proxy."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Neplatný požadavek URI nebo hlavička a nebo nepodporovaný nestandardní "
+"parametr: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Vyžadováno ověření: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "Vyžadovaný zdroj nebyl nalezen: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Záznam byl od doby svého stažení změněn: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Kód chyby %u při ověřování: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "Pro přihlášení se musí vyplnit CAPTCHA."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Tento účet vyžaduje heslo specifické pro aplikaci. (%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Vaše uživatelské jméno nebo heslo byly nesprávné."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "E-mailová adresa vašeho účtu nebyla ověřena. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Neodsouhlasili jste pravidla a podmínky služby. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Tento účet byl přesunut. Přihlaste se prosím on-line, abyste obdrželi své "
+"nové uživatelské jméno a heslo. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Tento účet byl smazán. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Tento účet byl zablokován. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "Účet pro přístup k této službě byl zablokován. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Tato služba není v tuto chvíli dostupná. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "Tento záznam nepodporuje komentáře."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "K tomuto záznamu nemohou být přidávány komentáře."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "Tento komentář nemůže být smazán."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Neplatný požadavek na hledání"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr "Server zamítl požadavek na dočasné pověření."
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "Podpora OAuth 1.0 je zakázaná."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "Přístup byl odepřen uživatelem nebo serverem."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Chyba rozboru XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Prázdný dokument."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Chyba rozboru JSON: %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Úplně vnější uzel JSON není objektem."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "V elementu %s schází vyžadovaný obsah."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "V elementu %s nebyl obsah („%s“) ve formátu ISO 8601."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "U elementu %2$s byla neznámá hodnota vlastnosti %1$s („%3$s“)."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "V elementu %s byl neznámý obsah („%s“)."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Pro element %s schází vyžadovaná vlastnost (%s)."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"U vlastností %s a %s prvku %s se nacházely hodnoty, ze kterých je povolena "
+"pouze jedna."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Schází vyžadovaný element (%s)."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Byl zdvojený element (%s), který se může vyskytovat jen jednou."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "V elementu %s schází vyžadovaný obsah."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "V elementu %s nebyl obsah („%s“) ve formátu ISO 8601."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Ze serveru byl obdržen neplatný JSON: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr "Obsah elementu %s („%s“) nebyl v šestnáctkovém formátu RGB."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Kód chyby %u při dotazu: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Kód chyby %u při vkládání záznamu: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Kód chyby %u při aktualizaci záznamu: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Kód chyby %u při mazání záznamu: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Kód chyby %u při stahování: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Kód chyby %u při odesílání: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Kód chyby %u při běhu dávkové operace: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "Neplatné přesměrované URI: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Záznam byl již vložen."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"Po odeslání bloku s možností zopakovatelného odeslání byla ze serveru "
+"obdržena chyba."
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Proud je již zavřen"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"V krátké době jste provedli příliš mnoho volání API. Počkejte prosím pár "
+"minut a zkuste to znovu."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Abyste mohli toto udělat, musíte projít ověřením."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "Abyste se mohli dotázat na všechny kalendáře, musíte projít ověřením."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "Abyste se mohli dotázat na vlastní kalendář, musíte projít ověřením."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "Abyste se mohli dotázat na kontakt, musíte projít ověřením."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "Abyste se mohli dotázat na kontaktní skupiny, musíte projít ověřením."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "Skupina již byla vložena."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "Abyste mohli vložit skupinu, musíte projít ověřením."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "Abyste mohli stáhnout dokument, musíte projít ověřením."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Neznámý nebo nepodporovaný exportní formát „%s“ pro dokument."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "Neplatná viditelnost: nerozpoznaná hodnota „%s“"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "Abyste se mohli dotázat na dokument, musíte projít ověřením."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "Abyste mohli odeslat dokument, musíte projít ověřením."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "Dokument byl již odeslán."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "Abyste mohli aktualizovat dokument, musíte projít ověřením."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr "Typ obsahu uvedeného dokumentu („%s“) nebyl rozpoznán."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "Abyste mohli kopírovat dokumenty, musíte projít ověřením."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "Rodičovská složka nebyla nalezena"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+"Abyste mohli vkládat nebo přesouvat dokumenty a složky, musíte projít "
+"ověřením."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr "Abyste mohli přesouvat dokumenty a složky, musíte projít ověřením."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "Vlastnost „%s“ neuchovává obrázek"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Abyste se mohli dotázat na uživatele, musíte zadat uživatelské jméno nebo "
+"projít ověřením."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "Parametr dotazu není možný pro album."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Abyste se mohli dotázat na všechna alba, musíte zadat uživatelské jméno nebo "
+"projít ověřením."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "Na album nevede přístupný odkaz."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "Abyste mohli odeslat soubor, musíte projít ověřením."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "Album již bylo vloženo."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "Abyste mohli vložit album, musíte projít ověřením."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr ""
+"Abyste se mohli dotázat na všechny seznamy úkolů, musíte projít ověřením."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "Abyste se mohli dotázat na své vlastní úkoly, musíte projít ověřením."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Překročili jste svoji kvótu. Smažte prosím nějaké záznamy a zkuste to znovu."
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Abyste tohle mohli provést, musí být váš účet Google provázaný s kanálem "
+"YouTube. Ten můžete vytvořit na %s."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Abyste mohli odesílat video, musíte projít ověřením."
--- /dev/null
+# Danish translation for libgdata.
+# Copyright (C) 2010 libgdata's COPYRIGHT HOLDER
+# This file is distributed under the same license as the libgdata package.
+# Kris Thomsen <lakristho@gmail.com>, 2010-2011.
+# Aputsiaq Niels Janussen <aj@isit.gl>, 2011.
+# scootergrisen, 2016.
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-09-03 09:39+0000\n"
+"PO-Revision-Date: 2019-10-02 05:08+0200\n"
+"Last-Translator: scootergrisen\n"
+"Language-Team: Danish <dansk@dansk-gruppen.dk>\n"
+"Language: da\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Virtaal 0.7.1\n"
+"X-Language: da_DK\n"
+"X-Source-Language: C\n"
+"X-Project-Style: gnome\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Batchhandlinger er ikke understøttet af denne tjeneste."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "Serveren returnerede et fejlbehæftet svar."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Kan ikke forbinde til tjenestens server."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Kan ikke forbinde til proxy-serveren."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Ugyldig forespørgselsadresse eller -teksthoved, eller uunderstøttet "
+"parameter der ikke er standard: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Godkendelse påkrævet: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "Den forespurgte ressource blev ikke fundet: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Elementet er blevet ændret, siden det sidst blev hentet ned: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Fejlkode %u under godkendelse: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "En CAPTCHA skal være udfyldt for at logge ind."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Denne konto kræver en programspecifik adgangskode. (%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Dit brugernavn eller adgangskode var forkert."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "Din kontos e-mail-adresse er ikke blevet verificeret. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Du har ikke accepteret tjenestens betingelser. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Denne konto er blevet migreret. Log venligst ind online for at modtage dit "
+"nye brugernavn og adgangskode. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Denne konto er blevet slettet. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Denne konto er blevet deaktiveret. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "Denne kontos adgang til denne tjeneste er blevet deaktiveret. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Denne tjeneste er ikke tilgængelig i øjeblikket. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "Dette element understøtter ikke kommentarer."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "Kommentarer kan ikke føjes til dette element."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "Denne kommentar må ikke slettes."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Ugyldig søgeforespørgsel"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr ""
+"Serveren afviste forespørgslen om midlertidige legitimationsoplysninger."
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "Understøttelse af OAuth 1.0 er slået fra."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "Adgang blev nægtet af brugeren eller serveren."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Kunne ikke fortolke XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Tomt dokument."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Fejl ved fortolkning af JSON: %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Yderste JSON-knude er ikke et objekt."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Et %s-element manglede nødvendigt indhold."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "Indholdet af et %s-element (“%s”) var ikke i ISO 8601-formatet."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "Værdien på %s-egenskaben af et %s-element (“%s”) var ukendt."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "Indholdet af et %s-element (“%s”) var ukendt."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "En nødvendig egenskab for et %s-element (%s) var ikke til stede."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Værdier var til stede for egenskaber %s og %s af %s-element, når kun én af "
+"de to er tilladt."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Et nødvendigt element (%s) var ikke til stede."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Et singleton-element (%s) blev duplikeret."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "Et “%s”-element manglede nødvendigt indhold."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "Indholdet af et “%s”-element (“%s”) var ikke i ISO 8601-formatet."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Der blev modtaget ugyldig JSON fra serveren: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr "Indholdet af et %s-element (“%s”) var ikke i hexadecimal-RGB-format."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Fejlkode %u under forespørgsel: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Fejlkode %u under indsættelse af et element: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Fejlkode %u under opdatering af et element: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Fejlkode %u under sletning af et element: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Fejlkode %u under nedhentning: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Fejlkode %u under oplægning: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Fejlkode %u under kørsel af batchhandling: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "Ugyldig omdirigeringsadresse: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Elementet er allerede blevet sat ind."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr "Fejl modtaget fra server efter genoptagelig upload af en databid."
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Strøm er allerede lukket"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Du har lavet for mange API-kald for nylig. Vent venligst et par minutter og "
+"prøv igen."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Du skal være godkendt for at gøre dette."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "Du skal være godkendt for at forespørge alle kalendere."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "Du skal være godkendt for at forespørge dine egne kalendere."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "Du skal være godkendt for at forespørge kontakter."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "Du skal være godkendt for at forespørge kontaktergrupper."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "Grupppen er allerede blevet sat ind."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "Du skal være godkendt for at indsætte en gruppe."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "Du skal være godkendt for at hente dokumenter ned."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Ukendt eller ikke understøttet dokument eksportformat “%s”."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "Ugyldig synlighed: ukendt værdi “%s”"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "Du skal være godkendt for at forespørge dokumenter."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "Du skal være godkendt for at lægge dokumenter op."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "Dokumentet er allerede blevet lagt op."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "Du skal være godkendt for at opdatere dokumenter."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr "Indholdstypen af det medfølgende dokument (“%s”) kunne ikke genkendes."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "Du skal være godkendt for at kopiere dokumenter."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "Forældermappe ikke fundet"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+"Du skal være godkendt for at kunne indsætte eller flytte dokumenter og "
+"mapper."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr "Du skal være godkendt for at flytte dokumenter og mapper."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "Egenskaben “%s” indeholder ikke et billede"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Du skal angive et brugernavn eller godkendes for at forespørge en bruger."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "Forespørgselsparameter er ikke tilladt for album."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Du skal angive et brugernavn eller godkendes for at forespørge alle album."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "Albummet havde ikke et feedhenvisning."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "Du skal være godkendt for at lægge en fil op."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "Albummet er allerede blevet sat ind."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "Du skal være godkendt for at indsætte et album."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr "Du skal være godkendt for at forespørge alle opgavelister."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "Du skal være godkendt for at forespørge dine egne opgaver."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Du har overskredet din elementkvote. Slet venligst nogen elementer og prøv "
+"igen."
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Din Google-brugerkonto skal være tilknyttet en YouTube-kanal for at kunne "
+"gøre dette. Besøg %s for at oprette en."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Du skal være godkendt for at lægge en video op."
+
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "Et “%s”-element manglede nødvendigt indhold."
+
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr "Indholdet af et “%s”-element (“%s”) var ikke i ISO 8601-formatet."
--- /dev/null
+# German translation of libgdata.
+# Mario Blättermann <mario.blaettermann@gmail.com>, 2009-2012, 2016.
+# Christian Kirbach <Christian.Kirbach@googlemail.com>, 2010.
+# Wolfgang Stöggl <c72578@yahoo.de>, 2011, 2015.
+# Benjamin Steinwender <b@stbe.at>, 2014.
+# Paul Seyfert <pseyfert@mathphys.fsk.uni-heidelberg.de>, 2015.
+# Tim Sabsch <tim@sabsch.com>, 2019.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-09-03 09:39+0000\n"
+"PO-Revision-Date: 2019-09-08 21:08+0200\n"
+"Last-Translator: Tim Sabsch <tim@sabsch.com>\n"
+"Language-Team: German <gnome-de@gnome.org>\n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Poedit 2.2.1\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Stapelverarbeitungen werden von diesem Dienst nicht unterstützt."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "Der Server gab eine verstümmelte Antwort zurück."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Es kann keine Verbindung zum Server des Dienstes hergestellt werden."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Es kann keine Verbindung zum Proxy-Server hergestellt werden."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Ungültige Anfrageadresse oder -kopfzeile, oder nicht unterstützter Nicht-"
+"Standardparameter: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Legitimierung erforderlich: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "Die angeforderte Ressource wurde nicht gefunden: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Seit dem Herunterladen wurde der Eintrag geändert: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Fehlercode %u beim Legitimieren: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "Ein CAPTCHA muss zum Anmelden ausgefüllt werden."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr ""
+"Für dieses Konto wird ein anwendungsspezifisches Passwort benötigt. (%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Ihr Benutzername oder Passwort waren nicht korrekt."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "Die E-Mail-Adresse Ihres Kontos wurde nicht bestätigt. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Sie haben den Bedingungen dieses Dienstes nicht zugestimmt. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Dieses Konto wurde migriert. Bitte melden Sie sich über das Internet an, um "
+"Ihren neuen Benutzernamen und das Kennwort zu erhalten. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Dieses Konto wurde entfernt. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Dieses Konto wurde deaktiviert. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr ""
+"Der Zugriff auf diesen Dienst über dieses Konto wurde deaktiviert. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Dieser Dienst ist derzeit nicht verfügbar. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "Dieser Eintrag unterstützt keine Kommentare."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "Kommentare dürfen zu diesem Eintrag nicht hinzugefügt werden."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "Dieser Kommentar darf nicht gelöscht werden."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Ungültige Suchanfrage"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr "Der Server hat die Anfrage nach temporären Anmeldedaten abgewiesen."
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "Unterstützung von OAuth-1.0 ist deaktiviert."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "Der Zugriff wurde vom Benutzer oder Server verweigert."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Fehler beim XML-Parsen: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Leeres Dokument."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Fehler beim Verarbeiten des JSON: %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Äußerster JSON-Knoten ist kein Objekt."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Ein %s-Element enthielt die benötigten Daten nicht."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "Der Inhalt eines %s-Elements (»%s«) lag nicht im ISO8601-Format vor."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "Der Wert einer Eigenschaft %s eines %s-Elements (»%s«) war unbekannt."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "Der Inhalt eines %s-Elements (»%s«) war unbekannt."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Eine benötigte Eigenschaft %s eines %s-Elements war nicht vorhanden."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Werte waren für Eigenschaften %s und %s eines %s-Elements vorhanden, wobei "
+"nur einer der zwei Werte erlaubt war."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Ein benötigtes Element (%s) war nicht vorhanden."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Ein Einzelelement (%s) war doppelt vorhanden."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "Ein %s-Element enthielt nicht die benötigten Daten."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "Der Inhalt eines %s-Elements (»%s«) lag nicht im ISO8601-Format vor."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Ungültiges JSON vom Server empfangen: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr ""
+"Der Inhalt eines %s-Elements (»%s«) lag nicht im hexadezimalen RGB-Format "
+"vor."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Fehlercode %u beim Abfragen: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Fehlercode %u beim Einfügen eines Eintrags: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Fehlercode %u beim Aktualisieren eines Eintrags: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Fehlercode %u beim Löschen eines Eintrags: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Fehlercode %u beim Herunterladen: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Fehlercode %u beim Hochladen: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Fehlercode %u beim Ausführen einer Stapelverarbeitung: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "Ungültige Weiterleitungsadresse: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Dieser Eintrag wurde bereits eingefügt."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"Nach dem Hochladen eines zur Wiederaufnahme der Übertragung fähigen Teiles "
+"wurde ein Fehler vom Server empfangen."
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Datenstrom wurde bereits geschlossen"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Sie haben derzeit zu viele API-Aufrufe ausgelöst. Bitte warten Sie einige "
+"Minuten und versuchen Sie es erneut."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Sie müssen legitimiert sein, um dies zu tun."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "Sie müssen legitimiert sein, um alle Kalender abzufragen."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "Sie müssen legitimiert sein, um Ihre eigenen Kalender abzufragen."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "Sie müssen legitimiert sein, um alle Kontakte abzufragen."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "Sie müssen legitimiert sein, um alle Kontaktgruppen abzufragen."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "Die Gruppe wurde bereits eingefügt."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "Sie müssen legitimiert sein, um eine Gruppe einzufügen."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "Sie müssen legitimiert sein, um Dokumente herunterzuladen."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr ""
+"Das Exportformat »%s« für Dokumente ist unbekannt oder wird nicht "
+"unterstützt."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "Ungültige Sichtbarkeit: unerkannter Wert »%s«"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "Sie müssen legitimiert sein, um Dokumente abzufragen."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "Sie müssen legitimiert sein, um Dokumente hochzuladen."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "Das Dokument wurde bereits hochgeladen."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "Sie müssen legitimiert sein, um Dokumente zu aktualisieren."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr ""
+"Der Inhaltstyp des übergebenen Dokuments (»%s«) konnte nicht ermittelt "
+"werden."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "Sie müssen legitimiert sein, um Dokumente zu kopieren."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "Übergeordneter Ordner wurde nicht gefunden"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+"Sie müssen legitimiert sein, um Dokumente und Ordner anzulegen oder zu "
+"verschieben."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr "Sie müssen legitimiert sein, um Dokumente und Ordner zu verschieben."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "Eigenschaft »%s« verfügt über kein Bild"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Sie müssen einen Benutzernamen angeben oder legitimiert sein, um einen "
+"Benutzer abzufragen."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "Abfrageparameter ist für Alben nicht erlaubt."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Sie müssen einen Benutzernamen angeben oder legitimiert sein, um alle Alben "
+"abzufragen."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "Für dieses Album gibt es keinen Feed-Link."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "Sie müssen legitimiert sein, um eine Datei hochzuladen."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "Das Album wurde bereits eingefügt."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "Sie müssen legitimiert sein, um ein Album einzufügen."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr "Sie müssen legitimiert sein, um alle Aufgabenlisten abzufragen."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "Sie müssen legitimiert sein, um Ihre eigenen Aufgaben abzufragen."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Sie haben die Anzahl der möglichen Einträge überschritten. Bitte entfernen "
+"Sie einige Einträge und versuchen Sie es erneut."
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Ihr Google-Konto muss dazu mit einem YouTube-Kanal verknüpft werden. "
+"Besuchen Sie %s, um einen zu erstellen."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Sie müssen legitimiert sein, um ein Video hochzuladen."
+
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "Ein »%s«-Element enthielt die benötigten Daten nicht."
+
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr ""
+#~ "Der Inhalt eines »%s«-Elements (»%s«) lag nicht im ISO 8601-Format vor."
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "Der Kalender hat keine Inhaltsadresse."
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "Dieser Dienst ist derzeit nicht verfügbar."
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr "Unbekannter Fehlercode »%s« in Domain »%s«, empfangen mit »%s«."
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "Unbekannter und nicht verarbeitbarer Fehler erhalten."
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "Für dieses Video gibt es keine ähnlichen Videos <link>."
--- /dev/null
+# Greek Translation of libgdata.master.po.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# Giannis Katsampirhs <juankatsampirhs@gmail.com>, 2009.
+# Γιώργος Στεφανάκης <george.stefanakis@gmail.com>, 2010.
+# Michael Kotsarinis <mk73628@gmail.com>, 2011.
+# Kostas Papadimas <pkst@gnome.org>, 2012.
+# Dimitris Spingos (Δημήτρης Σπίγγος) <dmtrs32@gmail.com>, 2013.
+# Efstathios Iosifidis <iosifidis@opensuse.org>, 2013.
+msgid ""
+msgstr ""
+"Project-Id-Version: Libgdata master\n"
+"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
+"product=libgdata&keywords=I18N+L10N&component=General\n"
+"POT-Creation-Date: 2017-02-24 23:45+0000\n"
+"PO-Revision-Date: 2017-04-07 13:36+0300\n"
+"Last-Translator: Tom Tryfonidis <tomtryf@gnome.org>\n"
+"Language-Team: team@gnome.gr\n"
+"Language: el\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Poedit 1.8.11\n"
+"X-Poedit-SourceCharset: utf-8\n"
+"X-Project-Style: gnome\n"
+
+#: ../gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Η ομαδική λειτουργία δεν υποστηρίζεται από την συσκευή."
+
+#: ../gdata/gdata-client-login-authorizer.c:629
+#: ../gdata/gdata-oauth1-authorizer.c:840
+#: ../gdata/gdata-oauth1-authorizer.c:1116
+#: ../gdata/gdata-oauth2-authorizer.c:953
+#: ../gdata/gdata-oauth2-authorizer.c:964
+#: ../gdata/gdata-oauth2-authorizer.c:983
+#: ../gdata/gdata-oauth2-authorizer.c:999
+#: ../gdata/gdata-oauth2-authorizer.c:1064
+#: ../gdata/gdata-oauth2-authorizer.c:1076
+#: ../gdata/gdata-oauth2-authorizer.c:1087
+#: ../gdata/gdata-oauth2-authorizer.c:1102
+#: ../gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "Ο διακομιστής επέστρεψε μια κακοδιατυπωμένη απάντηση."
+
+#: ../gdata/gdata-client-login-authorizer.c:649 ../gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Αδυναμία σύνδεσης με τον διακομιστή της υπηρεσίας."
+
+#: ../gdata/gdata-client-login-authorizer.c:654 ../gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Αδυναμία σύνδεσης με τον διακομιστή."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: ../gdata/gdata-client-login-authorizer.c:660 ../gdata/gdata-service.c:372
+#: ../gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Μη έγκυρη διαδρομή ή κεφαλίδα αίτησης, ή μη υποστηριζόμενη και μη τυπική "
+"παράμετρος: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:666 ../gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Απαιτείται πιστοποίηση: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:671 ../gdata/gdata-service.c:383
+#: ../gdata/services/calendar/gdata-calendar-service.c:313
+#: ../gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "Δε βρέθηκε η απαιτούμενη πηγή: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:677 ../gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Η καταχώρηση έχει τροποποιηθεί από τη στιγμή που λήφθηκε: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:689 ../gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Κωδικός σφάλματος %u κατά την ταυτοποίηση: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: ../gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "Για τη σύνδεση πρέπει να συμπληρωθεί το CAPTCHA."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr ""
+"Αυτός ο λογαριασμός απαιτεί ένα συγκεκριμένο κωδικό πρόσβασης για την "
+"εφαρμογή. (%s)"
+
+#: ../gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Ήταν ανακριβές το όνομα χρήστη ή ο κωδικός πρόσβασης σας."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "Η ηλεκτρονική διεύθυνση του λογαριασμού σας δεν έχει επαληθευτεί. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr ""
+"Δεν έχετε αποδεχτεί τους όρους και τις προϋποθέσεις της υπηρεσίας. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Αυτός ο λογαριασμός έχει μεταφερθεί. Παρακαλούμε συνδεθείτε για να λάβετε το "
+"νέο όνομα χρήστη καθώς και τον κωδικό πρόσβασης σας. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Έχει διαγραφεί αυτός ο λογαριασμός. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Έχει απενεργοποιηθεί αυτός ο λογαριασμός. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "Έχει απενεργοποιηθεί η πρόσβαση του λογαριασμού στην υπηρεσία. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Δεν είναι διαθέσιμη η υπηρεσία αυτή τη στιγμή. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:262
+msgid "This entry does not support comments."
+msgstr "Αυτή η καταχώρηση δεν υποστηρίζει σχόλια."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: ../gdata/gdata-commentable.c:349 ../gdata/gdata-commentable.c:435
+msgid "Comments may not be added to this entry."
+msgstr "Δεν είναι δυνατή η προσθήκη σχολίων για αυτή την καταχώρηση."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:518 ../gdata/gdata-commentable.c:594
+msgid "This comment may not be deleted."
+msgstr "Αυτό το σχόλιο μπορεί να μη διαγραφεί."
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Άκυρη αίτηση αναζήτησης"
+
+#: ../gdata/gdata-oauth1-authorizer.c:815
+msgid "The server rejected the temporary credentials request."
+msgstr "Ο διακομιστής απέρριψε την προσωρινή αίτηση διαπιστευτηρίων."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1090
+#: ../gdata/gdata-oauth2-authorizer.c:1113
+#: ../gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "Δεν επιτράπηκε η πρόσβαση από το χρήστη ή τον διακομιστή."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:352 ../gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Σφάλμα κατά τη φόρτωση του αρχείου XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Κενό έγγραφο."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:483 ../gdata/gdata-parsable.c:521
+#: ../gdata/services/documents/gdata-documents-access-rule.c:144
+#: ../gdata/services/documents/gdata-documents-access-rule.c:154
+#: ../gdata/services/documents/gdata-documents-document.c:286
+#: ../gdata/services/documents/gdata-documents-entry.c:478
+#: ../gdata/services/documents/gdata-documents-entry.c:489
+#: ../gdata/services/documents/gdata-documents-entry.c:500
+#: ../gdata/services/documents/gdata-documents-entry.c:547
+#: ../gdata/services/documents/gdata-documents-entry.c:558
+#: ../gdata/services/documents/gdata-documents-entry.c:666
+#: ../gdata/services/documents/gdata-documents-entry.c:701
+#: ../gdata/services/documents/gdata-documents-entry.c:716
+#: ../gdata/services/documents/gdata-documents-entry.c:731
+#: ../gdata/services/documents/gdata-documents-entry.c:761
+#: ../gdata/services/documents/gdata-documents-entry.c:777
+#: ../gdata/services/documents/gdata-documents-feed.c:81
+#: ../gdata/services/documents/gdata-documents-feed.c:92
+#: ../gdata/services/documents/gdata-documents-feed.c:142
+#: ../gdata/services/documents/gdata-documents-feed.c:160
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Σφάλμα κατά την ανάλυση JSON: %s"
+
+#: ../gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Ο εξώτατος κόμβος JSON δεν είναι αντικείμενο."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Το στοιχείο %s δεν έχει το απαιτούμενο περιεχόμενο."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "Το περιεχόμενο του στοιχείου %s («%s») δεν ήταν σε μορφή ISO 8601."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: ../gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "Οι τιμές της ιδιότητας %s του στοιχείου %s («%s») είναι άγνωστες."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: ../gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "Το περιεχόμενο του στοιχείου %s («%s») είναι άγνωστο."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Δεν παρουσιάστηκε η απαιτούμενη ιδιότητα του στοιχείου %s (%s)."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Οι παρούσες τιμές των ιδιοτήτων %s και %s του στοιχείου %s είναι παρούσες, "
+"ενώ μόνο μια από της δύο επιτρέπεται."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Δεν υπάρχει το απαιτούμενο στοιχείο (%s)."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: ../gdata/gdata-parser.c:200 ../gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Δημιουργήθηκε διπλότυπο για το στοιχείο singleton (%s)."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: ../gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "Το στοιχείο «%s» δεν έχει το απαιτούμενο περιεχόμενο."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "Το περιεχόμενο του στοιχείου %s («%s») δεν ήταν σε μορφή ISO 8601."
+
+#. Translators: the parameter is an error message.
+#: ../gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Άκυρο JSON ελήφθη από τον διακομιστή: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: ../gdata/gdata-parser.c:1179
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr ""
+"Το περιεχόμενο του στοιχείου %s («%s») δεν ήταν σε δεκαεξαδική RGB μορφή."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Κωδικός σφάλματος %u κατά την υποβολή ερωτήματος: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Κωδικός σφάλματος %u κατά την εισαγωγή μιας καταχώρησης: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Κωδικός σφάλματος %u κατά την ενημέρωση μιας καταχώρησης: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Κωδικός σφάλματος %u κατά τη διαγραφή μιας καταχώρησης: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Κωδικός σφάλματος %u κατά την διαδικασία της λήψης: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Κωδικός σφάλματος %u κατά την διαδικασία αποστολής: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Κωδικός σφάλματος %u κατά την εκτέλεση μιας ομαδικής λειτουργίας: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "Μη έγκυρη ανακατεύθυνση διαδρομής: %s"
+
+#: ../gdata/gdata-service.c:1466
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:626
+#: ../gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Έχει ήδη εισαχθεί η καταχώρηση "
+
+#. Resumable upload error.
+#: ../gdata/gdata-upload-stream.c:794 ../gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"Παρουσιάστηκε ένα σφάλμα από τον διακομιστή μετά την αποστολή ενός "
+"ανακτήσιμου κομματιού."
+
+#: ../gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Η ροή είναι ήδη κλειστή"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:302
+#: ../gdata/services/tasks/gdata-tasks-service.c:195
+#: ../gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Έχετε πραγματοποιήσει πάρα πολλές κλήσεις API πρόσφατα. Παρακαλούμε "
+"περιμένετε μερικά λεπτά και δοκιμάστε ξανά."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:334
+#: ../gdata/services/tasks/gdata-tasks-service.c:204
+#: ../gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Είναι απαραίτητη η πιστοποίησή σας για αυτήν την ενέργεια."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:465
+#: ../gdata/services/calendar/gdata-calendar-service.c:516
+msgid "You must be authenticated to query all calendars."
+msgstr ""
+"Είναι απαραίτητη η πιστοποίησή σας για την υποβολή ερωτήσεων σε όλα τα "
+"ημερολόγια."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:562
+#: ../gdata/services/calendar/gdata-calendar-service.c:613
+#: ../gdata/services/calendar/gdata-calendar-service.c:675
+#: ../gdata/services/calendar/gdata-calendar-service.c:734
+msgid "You must be authenticated to query your own calendars."
+msgstr ""
+"Είναι απαραίτητη η πιστοποίησή σας για την υποβολή ερωτήσεων στα ημερολόγια "
+"σας."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:308
+msgid "You must be authenticated to query contacts."
+msgstr "Είναι απαραίτητη η πιστοποίησή σας για τη διατύπωση επαφών."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:424
+#: ../gdata/services/contacts/gdata-contacts-service.c:474
+msgid "You must be authenticated to query contact groups."
+msgstr ""
+"Είναι απαραίτητη η πιστοποίησή για την υποβολή ερωτημάτων για τις ομάδες "
+"επαφών."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:514
+msgid "The group has already been inserted."
+msgstr "Η ομάδα έχει είδη εισαχθεί."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:521
+msgid "You must be authenticated to insert a group."
+msgstr "Είναι απαραίτητη η πιστοποίησή σας για να κάνετε εισαγωγή ομάδος."
+
+#: ../gdata/services/documents/gdata-documents-document.c:392
+msgid "You must be authenticated to download documents."
+msgstr "Είναι απαραίτητη η πιστοποίησή σας για να κάνετε λήψη εγγράφων."
+
+#: ../gdata/services/documents/gdata-documents-document.c:401
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Άγνωστη ή μη υποστηριζόμενη μορφή εξαγωγής εγγράφου ‘%s’."
+
+#: ../gdata/services/documents/gdata-documents-service.c:454
+#: ../gdata/services/documents/gdata-documents-service.c:504
+msgid "You must be authenticated to query documents."
+msgstr ""
+"Είναι απαραίτητη η πιστοποίησή σας για να πραγματοποιήσετε ερωτήματα για τα "
+"έγγραφα."
+
+#: ../gdata/services/documents/gdata-documents-service.c:569
+msgid "You must be authenticated to upload documents."
+msgstr "Είναι απαραίτητη η πιστοποίησή σας για την αποστολή εγγράφων."
+
+#: ../gdata/services/documents/gdata-documents-service.c:575
+msgid "The document has already been uploaded."
+msgstr "Αυτό το έγγραφο έχει ήδη αποσταλεί."
+
+#: ../gdata/services/documents/gdata-documents-service.c:720
+msgid "You must be authenticated to update documents."
+msgstr "Είναι απαραίτητη η πιστοποίησή σας για να ενημερώσετε τα έγγραφα."
+
+#: ../gdata/services/documents/gdata-documents-service.c:887
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr ""
+"Ο τύπος περιεχομένου του δοθέντος εγγράφου («%s») δεν μπορούσε να "
+"αναγνωρισθεί."
+
+#: ../gdata/services/documents/gdata-documents-service.c:927
+msgid "You must be authenticated to copy documents."
+msgstr "Είναι απαραίτητη η πιστοποίησή σας για να αντιγράψετε έγγραφα."
+
+#: ../gdata/services/documents/gdata-documents-service.c:955
+msgid "Parent folder not found"
+msgstr "Δεν βρέθηκε ο γονικός φάκελος"
+
+#: ../gdata/services/documents/gdata-documents-service.c:1102
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+"Είναι απαραίτητη η πιστοποίησή σας για την εισαγωγή ή μετακίνηση των "
+"εγγράφων και φακέλων."
+
+#: ../gdata/services/documents/gdata-documents-service.c:1303
+msgid "You must be authenticated to move documents and folders."
+msgstr ""
+"Είναι απαραίτητη η πιστοποίησή σας για την μετακίνηση των εγγράφων και "
+"φακέλων."
+
+#: ../gdata/services/freebase/gdata-freebase-service.c:479
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "Η ιδιότητα «%s» δεν περιέχει μια εικόνα"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Πρέπει να προσδιορίσετε ένα όνομα χρήστη ή να έχετε πιστοποιηθεί για να "
+"πραγματοποιήσετε ερωτήματα για έναν χρήστη."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:387
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "Query parameter not allowed for albums."
+msgstr "Παράμετροι ερωτημάτων δεν επιτρέπονται για τα άλμπουμ."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:394
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:455
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Θα πρέπει να προσδιορίσετε το όνομα χρήστη ή να έχετε πιστοποιηθεί για να "
+"πραγματοποιήσετε ερωτήματα για όλα τα άλμπουμ."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:476
+msgid "The album did not have a feed link."
+msgstr "Το άλμπουμ δεν έχει ένα σύνδεσμο ροών."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:633
+msgid "You must be authenticated to upload a file."
+msgstr "Είναι απαραίτητη η πιστοποίησή σας για να αποστείλετε ένα αρχείο."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:709
+msgid "The album has already been inserted."
+msgstr "Το άλμπουμ έχει είδη εισαχθεί."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:716
+msgid "You must be authenticated to insert an album."
+msgstr "Είναι απαραίτητη η πιστοποίησή σας για την εισαγωγή του άλμπουμ."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:330
+#: ../gdata/services/tasks/gdata-tasks-service.c:381
+msgid "You must be authenticated to query all tasklists."
+msgstr ""
+"Είναι απαραίτητη η πιστοποίησή σας για την υποβολή ερωτήσεων σε όλες τις "
+"λίστες εργασιών."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:430
+#: ../gdata/services/tasks/gdata-tasks-service.c:487
+msgid "You must be authenticated to query your own tasks."
+msgstr ""
+"Είναι απαραίτητη η πιστοποίησή σας για την υποβολή ερωτήσεων για τις "
+"εργασίες σας."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Έχετε ξεπεράσει την ποσοτική αναλογία της καταχώρησης σας. Παρακαλούμε "
+"διαγράψτε μερικές καταχωρήσεις και δοκιμάστε ξανά."
+
+#. Translators: the parameter is a URI.
+#: ../gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Ο λογαριασμός σας Google πρέπει να συσχετιστεί με ένα κανάλι YouTube για να "
+"το κάνετε αυτό. Επισκεφτείτε το %s για τη δημιουργία του."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Είναι απαραίτητη η πιστοποίησή σας για να αποστείλετε ένα βίντεο."
+
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "Το απαιτούμενο περιεχόμενο έλειπε από ένα στοιχείο '%s'."
+
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr ""
+#~ "Το περιεχόμενο ενός στοιχείου '%s' (\"%s\") δεν ήταν σε μορφή ISO 8601."
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "Το ημερολόγιο δεν έχει μία πηγή περιεχομένων."
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "Δεν είναι διαθέσιμη η υπηρεσία αυτή τη στιγμή."
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr ""
+#~ "Λήφθηκε άγνωστος κωδικός σφάλματος \"%s\" στο σύστημα \"%s\" με την "
+#~ "τοποθεσία \"%s\"."
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "Παρουσιάστηκε ένα άγνωστο σφάλμα και χωρίς θέμα."
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "Το βίντεο δεν έχει σχετικά αρχεία βίντεο <link>."
+
+#~ msgid "The supplied document had an invalid content type."
+#~ msgstr "Το παρεχόμενο του εγγράφου έχει λανθασμένο τύπο περιεχομένου."
+
+#~ msgid "Unhandled <%s:%s> element as a child of <%s>."
+#~ msgstr ""
+#~ "Δεν ήταν δυνατός ο χειρισμός του στοιχείου <%s:%s> ως συνέπεια του <%s>."
+
+#~ msgid "Unknown value \"%s\" of a <%s> @%s property."
+#~ msgstr "Άγνωστη τιμή \"%s\" μιας <%s> @%s ιδιότητας."
+
+#~ msgid ""
+#~ "The @time property (\"%s\") of a <media:thumbnail> could not be parsed."
+#~ msgstr ""
+#~ "Δεν ήταν δυνατή η φόρτωση της ιδιότητας @time (\"%s\") μίας <media:"
+#~ "thumbnail>."
--- /dev/null
+# Copyright (C) 2009
+# This file is distributed under the same license as the libgdata package.
+# Philip Withnall <philip@tecnocode.co.uk>, 2009, 2010, 2011, 2012, 2014.
+# Bruce Cowan <bruce@bcowan.me.uk>, 2011-2019.
+# Zander Brown <zbrown@gnome.org>, 2020.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-10-08 11:43+0000\n"
+"PO-Revision-Date: 2020-02-29 18:03+0000\n"
+"Last-Translator: Zander Brown <zbrown@gnome.org>\n"
+"Language-Team: English - United Kingdom <en_GB@li.org>\n"
+"Language: en_GB\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Gtranslator 3.34.0\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Batch operations are unsupported by this service."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "The server returned a malformed response."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Cannot connect to the service’s server."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Cannot connect to the proxy server."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Invalid request URI or header, or unsupported nonstandard parameter: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Authentication required: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "The requested resource was not found: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "The entry has been modified since it was downloaded: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Error code %u when authenticating: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "A CAPTCHA must be filled out to log in."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "This account requires an application-specific password. (%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Your username or password were incorrect."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "Your account’s e-mail address has not been verified. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "You have not agreed to the service’s terms and conditions. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "This account has been deleted. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "This account has been disabled. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "This account’s access to this service has been disabled. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "This service is not available at the moment. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "This entry does not support comments."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "Comments may not be added to this entry."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "This comment may not be deleted."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Invalid seek request"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr "The server rejected the temporary credentials request."
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "OAuth 1.0 support is disabled."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "Access was denied by the user or server."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Error parsing XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Empty document."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Error parsing JSON: %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Outermost JSON node is not an object."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "A %s element was missing required content."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "The content of a %s element (‘%s’) was not in ISO 8601 format."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "The value of the %s property of a %s element (‘%s’) was unknown."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "The content of a %s element (‘%s’) was unknown."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "A required property of a %s element (%s) was not present."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "A required element (%s) was not present."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "A singleton element (%s) was duplicated."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "A ‘%s’ element was missing required content."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Invalid JSON was received from the server: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Error code %u when querying: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Error code %u when inserting an entry: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Error code %u when updating an entry: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Error code %u when deleting an entry: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Error code %u when downloading: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Error code %u when uploading: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Error code %u when running a batch operation: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "Invalid redirect URI: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "The entry has already been inserted."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr "Error received from server after uploading a resumable upload chunk."
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Stream is already closed"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "You must be authenticated to do this."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "You must be authenticated to query all calendars."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "You must be authenticated to query your own calendars."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "You must be authenticated to query contacts."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "You must be authenticated to query contact groups."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "The group has already been inserted."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "You must be authenticated to insert a group."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "You must be authenticated to download documents."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Unknown or unsupported document export format ‘%s’."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "Invalid visibility: unrecognised value ‘%s’"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "You must be authenticated to query documents."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "You must be authenticated to upload documents."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "The document has already been uploaded."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "You must be authenticated to update documents."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr ""
+"The content type of the supplied document (‘%s’) could not be recognised."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "You must be authenticated to copy documents."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "Parent folder not found"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr "You must be authenticated to insert or move documents and folders."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr "You must be authenticated to move documents and folders."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "Property ‘%s’ does not hold an image"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr "You must specify a username or be authenticated to query a user."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "Query parameter not allowed for albums."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr "You must specify a username or be authenticated to query all albums."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "The album did not have a feed link."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "You must be authenticated to upload a file."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "The album has already been inserted."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "You must be authenticated to insert an album."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr "You must be authenticated to query all tasklists."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "You must be authenticated to query your own tasks."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "You must be authenticated to upload a video."
+
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "A '%s' element was missing required content."
+
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "The calendar did not have a content URI."
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "This service is not available at the moment."
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "Unknown and unparsable error received."
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "The video did not have a related videos <link>."
+
+#~ msgid "The supplied document had an invalid content type."
+#~ msgstr "The supplied document had an invalid content type."
+
+#~ msgid "Unhandled <%s:%s> element as a child of <%s>."
+#~ msgstr "Unhandled <%s:%s> element as a child of <%s>."
+
+#~ msgid "Unknown value \"%s\" of a <%s> @%s property."
+#~ msgstr "Unknown value \"%s\" of a <%s> @%s property."
+
+#~ msgid ""
+#~ "The @time property (\"%s\") of a <media:thumbnail> could not be parsed."
+#~ msgstr ""
+#~ "The @time property (\"%s\") of a <media:thumbnail> could not be parsed."
--- /dev/null
+# Esperanto translation for libgdata.
+# Copyright (C) 2011 Free Software Foundation, Inc.
+# This file is distributed under the same license as the libgdata package.
+# Kristjan SCHMIDT <kristjan.schmidt@googlemail.com>, 2011, 2019.
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2018-06-10 17:46+0000\n"
+"PO-Revision-Date: 2019-02-24 12:14+0200\n"
+"Last-Translator: Kristjan SCHMIDT <kristjan.schmidt@googlemail.com>\n"
+"Language-Team: Esperanto <gnome-eo-list@gnome.org>\n"
+"Language: eo\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Virtaal 0.7.1\n"
+
+#: gdata/gdata-batch-operation.c:635
+msgid "Batch operations are unsupported by this service."
+msgstr ""
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:840 gdata/gdata-oauth1-authorizer.c:1105
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "La servilo liveris misformitan respondon."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#| msgid "Cannot connect to the service's server."
+msgid "Cannot connect to the service’s server."
+msgstr "Ne eblas konekti al la servilo de la servo."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+msgid "Cannot connect to the proxy server."
+msgstr "Ne eblas konekti al la prokura servilo."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Aŭtentokontrolo bezonatas: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "Ne trovis la bezonatan risurcon: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "La elemento estas ŝanĝita ekde sia elŝuto: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Erarokodo %u dum aŭtentokontrolo: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr ""
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr ""
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Via uzantonomo aŭ pasvorto estis nekorekta."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+#| msgid "Your account's e-mail address has not been verified. (%s)"
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "La retpoŝtadreso de via konto ne estas kontrolita. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, fuzzy, c-format
+#| msgid "You have not agreed to the service's terms and conditions. (%s)"
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Vi ne aknoskis la kondiĉojn de la servo. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Tiu konto estas migrigite. Bonvole ensalutu per interreto por ricevi viajn "
+"novajn uzantonomon kaj pasvorton. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Tiu konto estas forigite. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Tiu konto estas elŝaltite. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+#| msgid "This account's access to this service has been disabled. (%s)"
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "La aliro de la konto al tiu servo estas elŝaltite. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Tiu servo nun ne estas disponebla. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr ""
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr ""
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "Tiu komento estas neforigebla."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Nevalida serĉpeto"
+
+#: gdata/gdata-oauth1-authorizer.c:815
+msgid "The server rejected the temporary credentials request."
+msgstr ""
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1079 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+msgid "Access was denied by the user or server."
+msgstr ""
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Eraro dum analizo de XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Malplena dokumento."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:478
+#: gdata/services/documents/gdata-documents-entry.c:489
+#: gdata/services/documents/gdata-documents-entry.c:500
+#: gdata/services/documents/gdata-documents-entry.c:547
+#: gdata/services/documents/gdata-documents-entry.c:558
+#: gdata/services/documents/gdata-documents-entry.c:666
+#: gdata/services/documents/gdata-documents-entry.c:701
+#: gdata/services/documents/gdata-documents-entry.c:716
+#: gdata/services/documents/gdata-documents-entry.c:731
+#: gdata/services/documents/gdata-documents-entry.c:761
+#: gdata/services/documents/gdata-documents-entry.c:777
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+#| msgid "Error parsing XML: %s"
+msgid "Error parsing JSON: %s"
+msgstr "Eraro dum analizo de JSON: %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr ""
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr ""
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr ""
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr ""
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr ""
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Bezonata eco de %s elemento (%s) ne ĉeestis."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Bezonata elemento (%s) ne ĉeestis."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr ""
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr ""
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr ""
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr ""
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr ""
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Erarkodo %u dum informpeto: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Erarkodo %u dum enigo de elemento: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Erarkodo %u dum ĝisdatigo de elemento: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Erarkodo %u dum forigo de elemento: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Erarkodo %u dum elŝuto: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Erarkodo %u dum alŝuto: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr ""
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "Nevalida alidirekta retadreso: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Tiu elemento jam estas enigita."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Fluo estas jam fermita"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+msgid "You must be authenticated to do this."
+msgstr "Vi estu aŭtentigita por fari tion."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "Vi estu aŭtentigita por informpeti ĉiujn kalendarojn."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "Vi estu aŭtentigita por informpeti vian propran kalendaron."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "Vi estu aŭtentigita por informpeti kontaktojn."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "Vi estu aŭtentigita por informpeti kontaktgrupojn."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "Tiu grupo jam estas enigita."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "Vi estu aŭtentigita por enigi grupon."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "Vi devas aŭtentigiti elŝuton de dokumentoj."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr ""
+
+#: gdata/services/documents/gdata-documents-service.c:580
+#: gdata/services/documents/gdata-documents-service.c:633
+msgid "You must be authenticated to query documents."
+msgstr "Vi estu aŭtentigita por informpeti dokumentojn."
+
+#: gdata/services/documents/gdata-documents-service.c:696
+msgid "You must be authenticated to upload documents."
+msgstr "Vi estu aŭtentigita por alŝuti dokumentojn."
+
+#: gdata/services/documents/gdata-documents-service.c:702
+msgid "The document has already been uploaded."
+msgstr "La dokumento jam estas alŝutita."
+
+#: gdata/services/documents/gdata-documents-service.c:847
+msgid "You must be authenticated to update documents."
+msgstr "Vi estu aŭtentigita por ĝisdatigi dokumentojn."
+
+#: gdata/services/documents/gdata-documents-service.c:1014
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr ""
+
+#: gdata/services/documents/gdata-documents-service.c:1054
+#| msgid "You must be authenticated to query documents."
+msgid "You must be authenticated to copy documents."
+msgstr "Vi estu aŭtentigita por kopii dokumentojn."
+
+#: gdata/services/documents/gdata-documents-service.c:1073
+#: gdata/services/documents/gdata-documents-service.c:1414
+msgid "Parent folder not found"
+msgstr ""
+
+#: gdata/services/documents/gdata-documents-service.c:1206
+#| msgid "You must be authenticated to move documents and folders."
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr "Vi estu aŭtentigita por enmeti aŭ movi dokumentojn kaj dosierujojn."
+
+#: gdata/services/documents/gdata-documents-service.c:1392
+msgid "You must be authenticated to move documents and folders."
+msgstr "Vi estu aŭtentigita por movi dokumentojn kaj dosierujojn."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr ""
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr "Vi specifu uzantonomon aŭ estu aŭtentigita por informpeti uzanton."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr ""
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Vi specifu uzantonomon aŭ estu aŭtentigita por informpeti ĉiujn albumojn."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr ""
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "Vi estu aŭtentigita por alŝuti dosieron."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "Tiu albumo jam estas enigita."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "Vi estu aŭtentigita por enigi albumon."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+#| msgid "You must be authenticated to query all calendars."
+msgid "You must be authenticated to query all tasklists."
+msgstr "Vi estu aŭtentigita por informpeti ĉiujn taskarojn."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+#| msgid "You must be authenticated to query your own calendars."
+msgid "You must be authenticated to query your own tasks."
+msgstr "Vi estu aŭtentigita por informpeti viajn proprajn taskojn."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Vi estu aŭtentigita por alŝuti videon."
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "La kalendaro ne havas enhavadreson"
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "Tiu servo nun ne estas disponeble."
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "Tiu video ne havas rilatajn videojn <link>."
--- /dev/null
+# Spanish translation for libgdata.master.es.po
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# Jorge González <jorgegonz@svn.gnome.org>, 2009, 2010, 2011.
+# Daniel Mustieles <daniel.mustieles@gmail.com>, 2011-2019.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata.master\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-09-03 09:39+0000\n"
+"PO-Revision-Date: 2019-09-03 15:11+0200\n"
+"Last-Translator: Daniel Mustieles <daniel.mustieles@gmail.com>\n"
+"Language-Team: Spanish - Spain <gnome-es-list@gnome.org>\n"
+"Language: es_ES\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Gtranslator 3.32.1\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Este servicio no soporta operaciones por lotes."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "El servidor devolvió una respuesta mal formada."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "No se puede conectar con el servicio del servidor."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "No se puede conectar con el servidor proxy."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"URI solicitada o cabecera no válida, o parámetro no estándar no soportado: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Se necesita autenticación: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "No se encontró el recurso solicitado: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "La entrada se ha modificado desde que se descargó: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Código de error %u al autenticar: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "Se debe rellenar un CAPTCHA para iniciar sesión."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Esta cuenta requiere una contraseña específica de la aplicación. (%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Su nombre de usuario o contraseña fueron incorrectas."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "Su dirección de correo-e no se ha verificado. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "No ha aceptado los términos del servicio y sus condiciones (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Se ha migrado esta cuenta. Inicie sesión en línea para recibir su nuevo "
+"nombre de usuario y contraseña. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Esta cuenta se ha eliminado. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Esta cuenta se ha desactivado. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "El acceso a este servicio de esta cuenta se ha desactivado. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "El servicio no está disponible por el momento. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "Esta entrada no soporta comentarios."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "Puede que los comentarios no se añadan en esta entrada."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "Puede que no se elimine este comentario."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Solicitud de búsqueda no válida"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr "El servidor rechazó la solicitud de credenciales temporales."
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "El soporte de OAuth 1.0 está desactivado."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "El servidor o el usuario denegaron el acceso."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Error al analizar el XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Documento vacío."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Error al analizar el JSON: %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "El nodo JSON más externo no es un objeto."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "A un elemento %s le faltaba el contenido requerido."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "El contenido del un elemento %s («%s») no está en formato ISO 8601."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "Se desconoce el valor de la propiedad %s de un elemento %s («%s»)."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "Se desconocía el contenido del elemento %s («%s»)."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Una propiedad necesaria de un elemento %s («%s») no estaba presente."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Existían valores presentes para las propiedades %s y %s del elemento %s "
+"cuando sólo se permite uno de los dos."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Un elemento necesario (%s) no estaba presente."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Un elemento (%s) estaba duplicado."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "A un elemento «%s» le faltaba el contenido requerido."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "El contenido de un elemento %s («%s») no está en formato ISO 8601."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Se ha recibido un JSON no válido del servidor: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr ""
+"El contenido de un elemento %s («%s») no está en formato RGB hexadecimal."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Código de error %u al consultar: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Código de error %u al introducir una entrada: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Código de error %u al actualizar una entrada: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Código de error %u al eliminar una entrada: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Código de error %u al descargar: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Código de error %u al subir: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Código de error %u al ejecutar una operación por lotes: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "URI de redirección no válida: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "La entrada ya se ha introducido."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr "Error del servidor después de subir un fragmento de carga reanudable."
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "El flujo ya está cerrado"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Recientemente ha realizado demasiadas consultas a la API. Espere unos "
+"minutos e inténtelo de nuevo."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Debe estar autenticado para esto."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "Debe estar autenticado para consultar todos los calendarios."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "Debe estar autenticado para consultar sus propios calendarios."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "Debe estar autenticado para consultar sus contactos."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "Debe estar autenticado para consultar sus grupos de contactos."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "Ya se ha introducido el grupo."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "Debe estar autenticado para introducir un grupo."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "Debe estar autenticado para descargar documentos."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Formato de exportación de documento «%s» desconocido o no soportado."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "Visibilidad no válida: valor «%s» no reconocido"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "Debe estar autenticado para consultar sus documentos."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "Debe estar autenticado para subir documentos."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "El documento ya se ha subido."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "Debe estar autenticado para actualizar documentos."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr ""
+"No se pudo reconocer el tipo de contenido del documento proporcionado («%s»)."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "Debe estar autenticado para copiar documentos."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "Carpeta padre no encontrada"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr "Debe estar autenticado para insertar o mover documentos y carpetas."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr "Debe estar autenticado para mover documentos y carpetas."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "La propiedad «%s» no contiene una imagen"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Debe especificar un nombre de usuario o estar autenticado para consultar "
+"todos los álbumes."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "El parámetro de la consulta no está permitido para álbumes."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Debe especificar un nombre de usuario o estar autenticado para consultar "
+"todos los álbumes."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "El álbum no tenía ningún enlace para proveedor."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "Debe estar autenticado para cargar un archivo."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "El álbum ya se ha introducido."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "Debe estar autenticado para introducir el álbum."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr "Debe estar autenticado para consultar todas las listas de tareas."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "Debe estar autenticado para consultar sus propias tareas."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Ha superado su cuota de entradas. Elimine algunas entradas e inténtelo de "
+"nuevo."
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Su cuenta de Google debe estar asociada a un canal de YouTube para hacer "
+"esto. Vaya a %s para crear una."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Debe estar autenticado para cargar un vídeo."
+
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "A un elemento «%s» le faltaba el contenido requerido."
+
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr ""
+#~ "El contenido del un elemento «%s» («%s») no está en formato ISO 8601."
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "El calendario no tenía un URI de contenido."
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "Este servicio no está disponible en este momento."
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr ""
+#~ "Código de error «%s» desconocido en el dominio «%s», recibido con la "
+#~ "ubicación «%s»."
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "Se recibió un error desconocido y no analizable."
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "El vídeo no tenía ningún vídeo relacionado <link>."
+
+#~ msgid "The supplied document had an invalid content type."
+#~ msgstr "El tipo de contenido del documento proporcionado no era válido."
+
+#~| msgid "Unhandled <%s:%s> element as a child of <%s>."
+#~ msgid "Unhandled %s element."
+#~ msgstr "Elemento %s no manejado."
+
+#~ msgid "Unknown value \"%s\" of a <%s> @%s property."
+#~ msgstr "Valor «%s» desconocido de un <%s> de una propiedad @%s."
+
+#~ msgid ""
+#~ "The @time property (\"%s\") of a <media:thumbnail> could not be parsed."
+#~ msgstr ""
+#~ "No se pudo analizar la propiedad @time («%s») de una <media:thumbnail>."
--- /dev/null
+# Estonian translation for libgdata.
+# Copyright (C) 2012 libgdata's COPYRIGHT HOLDER
+# This file is distributed under the same license as the libgdata package.
+#
+# Mattias Põldaru <mahfiaz@gmail.com>, 2012, 2015.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=libgdata&keywords=I18N+L10N&component=general\n"
+"POT-Creation-Date: 2015-03-14 22:39+0000\n"
+"PO-Revision-Date: 2015-03-15 09:42+0300\n"
+"Last-Translator: Mattias Põldaru <mahfiaz@gmail.com>\n"
+"Language-Team: Estonian <>\n"
+"Language: et\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n!=1);\n"
+"X-Generator: Poedit 1.5.4\n"
+
+msgid "The server returned a malformed response."
+msgstr "Server andis vigase vastuse."
+
+#, c-format
+msgid "Cannot connect to the service's server."
+msgstr "Selle teenuse serverisse ei suudetud ühenduda."
+
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Proksiserverisse ei suudetud ühenduda."
+
+#. Translators: the parameter is an error message returned by the server.
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Vigane päringu URI või päis või toetamata mittestandardne parameeter: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Autentimine on vajalik: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "Päritud allikat ei leitud: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Kirjet on muudetud pärast selle allalaadimist: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Autentimisel esines veakood %u: %s"
+
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "Sisselogimiseks tuleb CAPTCHA täita."
+
+#. Translators: the parameter is a URI for further information.
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Selle konto jaoks on vaja rakenduse-spetsiifilist parooli. (%s)"
+
+msgid "Your username or password were incorrect."
+msgstr "Kasutajanimi või parool olid valed."
+
+#. Translators: the parameter is a URI for further information.
+#, c-format
+msgid "Your account's e-mail address has not been verified. (%s)"
+msgstr "Sinu konto meiliaadress ei ole kinnitatud. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#, c-format
+msgid "You have not agreed to the service's terms and conditions. (%s)"
+msgstr "Sa ei ole nõustunud teenusetingimustega. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"See konto on üle kantud. Oma uue kasutajanime ja parooli saamiseks logi "
+"sisse veebis. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "See konto on kustutatud. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "See konto on keelatud. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#, c-format
+msgid "This account's access to this service has been disabled. (%s)"
+msgstr "Selle konto ligipääs sellele teenusele on keelatud. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "See teenus pole praegu saadaval. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+msgid "This entry does not support comments."
+msgstr "See kirje ei toeta kommentaare."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+msgid "Comments may not be added to this entry."
+msgstr "Sellele kirjele ei tohi kommentaare lisada."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+msgid "This comment may not be deleted."
+msgstr "Kommentaari pole võimalik kustutada."
+
+#. Tried to seek too far
+msgid "Invalid seek request"
+msgstr "Sobimatu kerimispäring"
+
+msgid "The server rejected the temporary credentials request."
+msgstr "Server keeldus ajutiste sisselogimisandmete päringust."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+msgid "Access was denied by the user or server."
+msgstr "Ligipääsu on keelanud kasutaja või server."
+
+#. Translators: the parameter is an error message
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Viga XML-i parsimisel: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+msgid "Empty document."
+msgstr "Tühi dokument."
+
+#. Translators: the parameter is an error message
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Viga JSON-i parsimisel: %s"
+
+msgid "Outermost JSON node is not an object."
+msgstr "Kõige välimine JSON sõlm ei ole objekt."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Elemendil %s puudus vajalik sisu."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+msgstr "Elemendi %s sisu (\"%s\") ei olnud ISO 8601 vormingus."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element ("00:01:42.500") was unknown.
+#, c-format
+msgid "The value of the %s property of a %s element (\"%s\") was unknown."
+msgstr "Omaduse %s väärtus elemendil %s (\"%s\") on tundmatu."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element ("protected") was unknown.
+#, c-format
+msgid "The content of a %s element (\"%s\") was unknown."
+msgstr "Elemendi %s (\"%s\") sisu on tundmatu."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Elemendi %s nõutud omadust ei olnud (%s)."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Mõlemale omadusele %s ja %s olid olemas väärtused elemendil %s, kuigi "
+"lubatud on määrata ainult emb-kumb."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Nõutud elementi (%s) ei olnud."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Singleton elemendist (%s) oli duplikaat."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A 'title' element was missing required content.
+#, c-format
+msgid "A '%s' element was missing required content."
+msgstr "Elemendil '%s' puudus vajalik sisu."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a 'uploaded' element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#, c-format
+msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+msgstr "Elemendi '%s' sisu (\"%s\") ei olnud ISO 8601 vormingus."
+
+#. Translators: the parameter is an error message.
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Server tagastas sobimatud JSON andmed: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Päringule vastati veakoodiga %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Kande sisestamisel vastati veakoodiga %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Kande uuendamisel vastati veakoodiga %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Kande kustutamisel vastati veakoodiga %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Allalaadimisel vastati veakoodiga %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Üleslaadimisel vastati veakoodiga %u: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Pakktöötluse toimingule vastati veakoodiga %u: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "Sobimatu edasisuunamise URI: %s"
+
+msgid "The entry has already been inserted."
+msgstr "Kanne on juba sisestatud."
+
+#. Resumable upload error.
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"Pärast jätkatava üleslaadimise osa ülesaadimist saadi serverist veateade."
+
+msgid "Stream is already closed"
+msgstr "Voog on juba suletud"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element ("00FG56") was not in hexadecimal RGB format.
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in hexadecimal RGB format."
+msgstr "Elemendi %s (\"%s\") sisu ei ole RGB kuueteistkümnendvormingus."
+
+msgid "You must be authenticated to query all calendars."
+msgstr "Kõigi kalendrite pärimiseks pead olema sisse loginud."
+
+msgid "You must be authenticated to query your own calendars."
+msgstr "Oma kalendrite pärimiseks pead olema sisse loginud."
+
+msgid "The calendar did not have a content URI."
+msgstr "Kalendril ei olnud sisu URI-d."
+
+msgid "You must be authenticated to query contacts."
+msgstr "Kontaktide pärimiseks pead olema sisse loginud."
+
+msgid "You must be authenticated to query contact groups."
+msgstr "Kontaktigruppide pärimiseks pead olema sisse loginud."
+
+msgid "The group has already been inserted."
+msgstr "Grupp on juba sisestatud."
+
+msgid "You must be authenticated to insert a group."
+msgstr "Grupi sisestamiseks pead olema sisse loginud."
+
+msgid "You must be authenticated to download documents."
+msgstr "Dokumentide allalaadimiseks pead olema sisse loginud."
+
+msgid "You must be authenticated to query documents."
+msgstr "Dokumentide pärimiseks pead olema sisse loginud."
+
+msgid "You must be authenticated to upload documents."
+msgstr "Dokumentide üleslaadimiseks pead olema sisse loginud."
+
+msgid "The document has already been uploaded."
+msgstr "See dokument on juba üles laaditud."
+
+msgid "You must be authenticated to update documents."
+msgstr "Dokumentide uuendamiseks pead olema sisse loginud."
+
+#, c-format
+msgid ""
+"The content type of the supplied document ('%s') could not be recognized."
+msgstr "Antud dokumendi ('%s') sisu tüüpi ei suudetud tuvastada."
+
+msgid "You must be authenticated to copy documents."
+msgstr "Dokumentide kopeerimiseks pead olema sisse loginud."
+
+msgid "You must be authenticated to move documents and folders."
+msgstr "Dokumentide ja kataloogide liigutamiseks pead olema sisse loginud."
+
+#, c-format
+msgid "Property '%s' does not hold an image"
+msgstr "Omadus '%s' ei tohi sisaldada pilti"
+
+msgid "You must specify a username or be authenticated to query a user."
+msgstr "Kasutaja pärimiseks pead määrama kasutajanime või olema sisse loginud."
+
+msgid "Query parameter not allowed for albums."
+msgstr "Päringu parameeter ei ole albumite jaoks lubatud."
+
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Kõigi albumite pärimiseks pead määrama kasutajanime või olema sisse loginud."
+
+msgid "The album did not have a feed link."
+msgstr "Albumil ei olnud voo linki."
+
+msgid "You must be authenticated to upload a file."
+msgstr "Faili üleslaadimiseks pead olema autenditud."
+
+msgid "The album has already been inserted."
+msgstr "Album on juba sisestatud."
+
+msgid "You must be authenticated to insert an album."
+msgstr "Albumi sisestamiseks pead olema sisse loginud."
+
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Sa oled teinud hiljuti liiga palju API päringuid. Oota mõni minut ja proovi "
+"uuesti."
+
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Selle tegemiseks pead olema sisse loginud."
+
+msgid "You must be authenticated to query all tasklists."
+msgstr "Kõigi ülesandeloetelude pärimiseks pead olema sisse loginud."
+
+msgid "You must be authenticated to query your own tasks."
+msgstr "Oma ülesannete pärimiseks pead olema sisse loginud."
+
+#, c-format
+msgid "This service is not available at the moment."
+msgstr "Teenus pole hetkel saadaval."
+
+#. Translators: the parameter is a URI.
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Sinu Google konto peab selle tegemiseks olema YouTube kanaliga seotud. Konto "
+"saad luua aadressil %s."
+
+#. Translators: the first parameter is an error code, which is a coded string.
+#. * The second parameter is an error domain, which is another coded string.
+#. * The third parameter is the location of the error, which is either a URI or an XPath.
+#, c-format
+msgid ""
+"Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+msgstr "Tundmatu veakood \"%s\" domeenilt \"%s\" kohast \"%s\"."
+
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Oled ületanud oma sissekannete kvoodi. Kustuta mõned sissekanded ja proovi "
+"uuesti."
+
+#, c-format
+msgid "Unknown and unparsable error received."
+msgstr "Saadi tundmatu viga, mida ei suudetud analüüsida."
+
+msgid "The video did not have a related videos <link>."
+msgstr "Videol ei olnud seonduvate videote <link>-i."
+
+msgid "You must be authenticated to upload a video."
+msgstr "Video üleslaadimiseks pead olema sisse loginud."
--- /dev/null
+# Basque translation of libgdata
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Iñaki Larrañaga Murgoitio <dooteo@zundan.com>, 2009, 2010, 2011.
+# Iñaki Larrañaga Murgoitio <dooteo@zundan.com>, 2013, 2014, 2015, 2016, 2017.
+# Asier Sarasua Garmendia <asier.sarasua@gmail.com>, 2019, 2020.
+#
+msgid ""
+msgstr "Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-09-25 10:37+0000\n"
+"PO-Revision-Date: 2020-02-15 10:00+0100\n"
+"Last-Translator: Asier Sarasua Garmendia <asier.sarasua@gmail.com>\n"
+"Language-Team: Basque <librezale@librezale.eus>\n"
+"Language: eu\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Zerbitzu honek ez ditu Batch motako eragiketarik onartzen."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "Zerbitzariak gaizki osatutako erantzuna itzuli du."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Ezin da zerbitzuaren zerbitzariarekin konektatu."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Ezin da proxy zerbitzariarekin konektatu."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr "Baliogabeko URI edo goiburuko eskaera, edo onartu gabeko parametro ez-estandarra: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Autentifikazioa behar da: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "Ez da eskatutako baliabidea aurkitu: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Sarrera deskargatu zenetik aldatu egin da: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Errorearen %u kodea autentifikatzean: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "CAPTCHA bete behar da saioa hasteko."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Kontu honek aplikazio zehatzaren pasahitza eskatzen du (%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Zure erabiltzaile-izena edo pasahitza oker dago."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "Zure kontuaren helbide elektronikoa ez da egiaztatu. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Ez zaude ados zerbitzuaren termino eta baldintzekin. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr "Kontu hau migratu egin da. Hasi ezazu saioa linean zure erabiltzaile-izen eta pasahitz berria jasotzeko. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Kontu hau ezabatu egin da. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Kontu hau desgaitu egin da. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "Kontu honen zerbitzuaren sarbidea desgaitu egin da. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Zerbitzu hau ez dago unean erabilgarri. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "Sarrera honek ez du iruzkinik onartzen."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "Ezin zaizkio iruzkinik gehitu sarrera honi."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "Iruzkin hau ezin da ezabatu."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Bilaketa-eskaera baliogabea"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr "Zerbitzariak uko egin dio aldi baterako kredentzialen eskaerari."
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "OAuth 1.0 euskarria desgaituta dago."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "Erabiltzaileak edo zerbitzariak sartzea debekatu du."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Errorea XML analizatzean: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Dokumentu hutsa."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Errorea JSON analizatzean: %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Kanpoen dagoen JSON nodoa ez da objektu bat."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "%s elementua bati beharrezko edukia falta zaio."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "%s elementu baten (“%s”) edukia ez dago ISO 8601 formatuan."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "%2$s elementu baten (“%3$s“) %1$s propietatea ezezaguna da."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "%s elementu baten (“%s”) edukia ezezaguna da."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "%s elementu baten (“%s”) beharrezko propietate bat ez dago."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr "%3$s elementuaren %1$s eta %2$s propietateen balioak agertu dira, bietatik bat soilik baimentzen denean."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Beharrezkoa den elementu bat (“%s”) ez dago."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Elementu bakun bat (%s) bikoiztuta dago."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "“%s” elementua bati beharrezko edukia falta zaio."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "“%s” elementu baten (“%s”) edukia ez dago ISO 8601 formatuan."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Baliogabeko JSON jaso da zerbitzaritik: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr "“%s” elementu baten (“%s”) edukia ez dago GBU formatu hamaseitarrean."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Errorearen %u kodea kontsultatzean: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Errorearen %u kodea sarrera bat txertatzean: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Errorearen %u kodea sarrera bat eguneratzean: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Errorearen %u kodea sarrera bat ezabatzean: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Errorearen %u kodea deskargatzean: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Errorearen %u kodea igotzean: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Errorearen %u kodea batch-eko eragiketa exekutatzean: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "Birbideratutako URIa ez da baliozkoa: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Sarrera jadanik txertatuta dago."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr "Errorea jaso da zerbitzaritik igoerako zati laburgarria igo ondoren."
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Korrontea jadanik itxita dago"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr "APIaren dei gehiegi egin dituzu azkienaldian. Itxaron minutu gutxi batzuk eta saiatu berriro."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Autentifikatu egin behar zara hori egiteko."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "Autentifikatu egin behar zara egutegi guztiak kontsultatzeko."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "Autentifikatu egin behar zara zure egutegiak kontsultatzeko."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "Autentifikatu egin behar zara kontaktuak kontsultatzeko."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "Autentifikatu egin behar zara kontaktuen taldeak kontsultatzeko."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "Taldea jadanik txertatuta dago."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "Autentifikatu egin behar zara talde bat txertatzeko."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "Autentifikatu egin behar zara dokumentuak deskargatzeko."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Dokumentua esportatzeko '%s' formatu ezezaguna edo onartu gabea."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "Baliogabeko ikusgaitasuna: ‘%s’ balio ezezaguna"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "Autentifikatu egin behar zara dokumentuak kontsultatzeko."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "Autentifikatu egin behar zara dokumentuak igotzeko."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "Dokumentua jadanik igo da."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "Autentifikatu egin behar zara dokumentuak igotzeko."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr "Emandako dokumentuaren (“%s”) eduki mota ezin izan da ezagutu."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "Autentifikatu egin behar zara dokumentuak kopiatzeko."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "Ez da karpeta gurasoa aurkitu"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr "Autentifikatu egin behar zara dokumentu eta karpetak txertatzeko edo lekuz aldatzeko."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr "Autentifikatu egin behar zara dokumentu eta karpetak lekuz aldatzeko."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "“%s” propietateak ez dauka irudirik"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr "Erabiltzaile-izena zehaztu behar duzu edo autentifikatutako erabiltzailea izan behar duzu."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "Kontsultaren parametroa ez da onartzen albumentzako."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr "Erabiltzaile-izena zehaztu behar duzu edo autentifikatu egin behar zara album guztiak kontsultatzeko."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "Albumak ez dauka jarioaren estekarik."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "Autentifikatu egin behar zara fitxategi bat igotzeko."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "Albuma jadanik txertatuta dago."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "Autentifikatu egin behar zara album bat txertatzeko."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr "Autentifikatu egin behar zara zereginen zerrenda guztiak kontsultatzeko."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "Autentifikatu egin behar zara zure zereginak kontsultatzeko."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr "Sarrerako kuota gainditu duzu. Ezabatu sarrera batzuk eta saiatu berriro."
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr "Zure Google Account esleitu egin behar da YouTube kanalarekin hau egiteko. Bisitatu '%s' bat sortzeko."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Autentifikatu egin behar zara bideo bat igotzeko."
+
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "'%s' elementua bati beharrezko edukia falta zaio."
+
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr "'%s' elementu baten (\"%s\") edukia ez dago ISO 8601 formatuan."
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "Egutegiak ez dauka edukiaren URIrik."
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "Zerbitzu hau ez dago erabilgarri unean."
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr ""
+#~ "Errorearen \"%s\" kodea ezezaguna da \"%s\" domeinuan, \"%s\" "
+#~ "kokalekuarekin hartutakoa."
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "Errore ezezaguna eta analizakaitza jaso da."
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "Bideoak ez dauka erlazionatutako bideorik <link>."
--- /dev/null
+# Finnish messages for libgdata
+# Copyright (C) 2011 Tommi Vainikainen
+# This file is distributed under the same license as the libgdata package.
+# Tommi Vainikainen <thv@iki.fi>, 2011.
+# Jiri Grönroos <jiri.gronroos+l10n@iki.fi>, 2013, 2016, 2017.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-09-25 10:37+0000\n"
+"PO-Revision-Date: 2020-02-22 21:39+0200\n"
+"Last-Translator: Jiri Grönroos <jiri.gronroos+l10n@iki.fi>\n"
+"Language-Team: suomi <lokalisointi-lista@googlegroups.com>\n"
+"Language: fi\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Poedit 2.3\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Eräajotoimenpiteet eivät ole tuettuja tämän palvelun toimesta."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "Palvelin palautti epämuodostuneen vastauksen."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Palvelun palvelimeen ei saatu yhteyttä."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Välityspalvelimeen ei saatu yhteyttä."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Virheellinen pyyntö-URI tai -otsake, tai ei-tuettu epästandardi parametri: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Tunnistautuminen vaaditaan: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "Pyydettyä resurssia ei löytynyt: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Merkintää on muokattu lataamisen jälkeen: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Virhekoodi %u todennettaessa: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "Sisäänkirjauduttaessa tulee vastata CAPTCHAan."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Tämä tunnus vaatii sovelluskohtaisen salasanan. (%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Käyttäjätunnus tai salasana on väärä."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "Tilisi sähköpostiosoitetta ei ole vahvistettu. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Et ole hyväksynyt palvelun käyttöehtoja. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Tämä tili on siirretty. Ole hyvä ja kirjaudu sisään yhteyden kanssa ja saat "
+"uuden käyttäjätunnuksesi sekä salasanan. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Tämä tili on poistettu. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Tämä tili on kytketty pois käytöstä. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "Tällä tilillä pääsy tähän palvelu on kytketty pois käytöstä. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Tämä palvelu ei ole saatavilla tällä hetkellä. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "Tämä merkintä ei tue kommentteja."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "Kommentteja ei välttämättä lisätty tähän merkintään."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "Tätä kommenttia ei välttämättä poistettu."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Virheellinen kelauspyyntö"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr "Palvelin hylkäsi tilapäisen valtuutuksen pyynnön."
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "OAuth 1.0 -tuki on poistettu käytöstä."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "Käyttäjä tai palvelin kielsi pääsyn."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Virhe jäsennettäessä XML:ää: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Tyhjä asiakirja."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Virhe jäsennettäessä JSONia: %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr ""
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Elementistä %s puuttuu vaadittu sisältö."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "Elementin %s sisältö (‘%s’) ei ole ISO 8601-muotoilun mukainen."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, fuzzy, c-format
+#| msgid "The value of the %s property of a %s element (\"%s\") was unknown."
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "Elementin %2$s ominaisuus %1$s arvo (”%3$s”) on tuntematon."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "Elementin %s sisältö (‘%s’) on tuntematon."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Elementin %s vaadittu ominaisuus (%s) ei ollut mukana."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Elementin %3$s ominaisuudet %1$s ja %2$s olivat mukana, mutta vain yksi "
+"näistä kahdesta on sallittu."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Vaadittu lementti (%s) ei ollut mukana."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Ainokaiselementti (%s) esiintyi kahdesti."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "Elementistä ‘%s’ puuttuu vaadittua sisältöä."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "Elementin %s sisältö (‘%s’) ei ole ISO 8601-muotoilun mukainen."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Vastaanotettiin virheellistä JSONia palvelimelta: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr "Elementin %s sisältö (‘%s’) ei ollut heksadesimaali-RGB-muodossa."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Virhekoodi %u kyselyssä: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Virhekoodi %u lisättäessä merkintää: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Virhekoodi %u päivitettäessä merkintää: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Virhekoodi %u poistettaessa merkintää: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Virhekoodi %u ladattaessa: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Virhekoodi %u lähetettäessä: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Virhekoodi %u suoritettaessa eräajo-operaatiota: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "Virheellinen uudelleenohjaus-URI: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Merkintä on lisätty jo aiemmin."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Virta on jo suljettu"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Olet tehnyt liian monta API-kutsua hiljattain. Ole hyvä ja yritä uudelleen "
+"muutaman minuutin kuluttua."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Sinut täytyy olla todennettu, jotta voit tehdä tämän."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "Sinut täytyy olla todennettu, jotta voit kysellä kaikkia kalentereita."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "Sinut täytyy olla todennettu, jotta voit kysellä omia kalentereitasi."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "Sinut täytyy olla todennettu, jotta voit kysellä yhteystietoja."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "Sinut täytyy olla todennettu, jotta voit kysellä yhteystietoryhmiä."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "Ryhmä on lisätty jo aiemmin."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "Sinut täytyy olla todennettu, jotta voit lisätä ryhmän."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "Sinut täytyy olla todennettu, jotta voit ladata asiakirjoja."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Tuntematon tai ei-tuettu asiakirjan vientimuoto ‘%s’."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr ""
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "Sinut täytyy olla todennettu, jotta voit kysellä asiakirjoja."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "Sinut täytyy olla todennettu, jotta voit lähettää asiakirjoja."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "Asiakirja on jo lähetetty."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "Sinut täytyy olla todennettu, jotta voit päivittää asiakirjoja."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr "Annetun asiakirjan (‘%s’) sisältötyyppiä ei tunnistettu."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "Tunnistaudu kopioidaksesi asiakirjoja."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "Ylätason kansiota ei löydy"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+"Sinut täytyy olla todennettu, jotta voit syöttää tai siirtää asiakirjoja ja "
+"kansioita."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr ""
+"Sinut täytyy olla todennettu, jotta voit siirtää asiakirjoja ja kansioita."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr ""
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Sinut täytyy antaa käyttäjätunnus tai olla todennettu, jotta voit kysellä "
+"käyttäjää."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "Kyselyparametri ei ole sallittu albumeille."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Sinut täytyy antaa käyttäjätunnus tai olla todennettu, jotta voit kysellä "
+"kaikkia albumeita."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "Albumilla ei ollut syötelinkkiä."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "Sinut täytyy olla todennettu, jotta voit lähettää tiedoston."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "Albumi on lisätty jo aiemmin."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "Sinut täytyy olla todennettu, jotta voit lisätä albumin."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr ""
+"Sinut täytyy olla todennettu, jotta voit kysellä kaikkia tehtävälistoja."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "Sinut täytyy olla todennettu, jotta voit kysellä omia tehtäviäsi."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Olet ylittänyt kiintiösi. Ole hyvä ja poista jotain merkintöjä ja yritä "
+"uudelleen."
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Google-tilisi täytyy olla liitetty YouTube-kanavaasi tehdäksesi tämän. "
+"Vieraile osoitteessa %s luodaksesi liitoksen."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Sinut täytyy olla todennettu, jotta voit lähettää videon."
+
+#, fuzzy
+#~| msgid "A %s element was missing required content."
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "Elementistä %s puuttuu vaadittu sisältö."
+
+#, fuzzy
+#~| msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr "Elementin %s sisältö (”%s”) ei ole ISO 8601-muotoilun mukainen."
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "Kalenterilla ei ollut sisältö-URIa."
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "Tämä palvelu ei ole saatavilla juuri tällä hetkellä."
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr ""
+#~ "Tuntematon virhekoodi ”%s” alueella ”%s” vastaanotettu sijainnissa ”%s”."
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "Tuntematon ja jäsentymätön virhe vastaanotettu."
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "Videolla ei ollut liittyviä videoita <link>-tagissa."
--- /dev/null
+# French translation of libgdata
+# Copyright (C) 2009-2010 Free Software Foundation, Inc.
+# This file is distributed under the same license as the libgdata package.
+#
+# Laurent Coudeur <laurentc@iol.ie>, 2009.
+# Claude Paroz <claude@2xlibre.net>, 2009-2010.
+# Nicolas Repentin <nicolas@shivaserv.fr>, 2009.
+# Julien Hardelin <jhardlin{AT}wanadoo{POINT}fr, 2010.
+# Bruno Brouard <annoa.b@gmail.com>, 2010-2011.
+# Charles Monzat <charles.monzat@free.fr>, 2018-2019.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-09-03 09:39+0000\n"
+"PO-Revision-Date: 2019-09-05 13:16+0200\n"
+"Last-Translator: Charles Monzat <charles.monzat@free.fr>\n"
+"Language-Team: GNOME French Team <gnomefr@traduc.org>\n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1)\n"
+"X-Generator: Gtranslator 3.32.1\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Les opérations par lots ne sont pas prises en charge par ce service."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "La réponse du serveur n’est pas conforme."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Impossible de se connecter au serveur du service."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Impossible de se connecter au serveur mandataire."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Requête URI ou en-tête non valide, ou paramètre anormal non pris en charge : "
+"%s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Authentification requise : %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "La ressource demandée n’a pas été trouvée : %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "L’entrée a été modifiée depuis son téléchargement : %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Code d’erreur %u lors de l’authentification : %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "Un CAPTCHA doit être complété pour se connecter."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Ce compte nécessite un mot de passe spécifique à l’application. (%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Nom d’utilisateur ou mot de passe incorrect."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "L’adresse électronique de votre compte n’est pas vérifiée (%s)."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Vous n’avez pas accepté les conditions générales du service (%s)."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Ce compte a été migré. Veuillez vous connecter en ligne pour recevoir votre "
+"nouveau nom d’utilisateur et votre nouveau mot de passe (%s)."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Ce compte a été supprimé (%s)."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Ce compte a été désactivé (%s)."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "L’accès à ce service est désactivé pour ce compte (%s)."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Ce service n’est pas disponible pour le moment (%s)."
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "Cette entrée ne gère pas les commentaires."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "Il n’est pas possible d’ajouter des commentaires à cette entrée."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "Ce commentaire ne peut pas être supprimé."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Requête de positionnement non valide"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr ""
+"Le serveur a rejeté la requête de données d’authentification provisoires."
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "La prise en charge d’OAuth 1.0 est désactivée."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "L’accès a été refusé par l’utilisateur ou le serveur."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Erreur lors de l’analyse XML : %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Document vide."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Erreur lors de l’analyse JSON : %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Le nœud JSON le plus à l’extérieur n’est pas un objet."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Un élément %s ne contient pas le contenu requis."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "Le contenu d’un élément %s (« %s ») n’est pas dans le format ISO 8601."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "La valeur de la propriété %s d’un élément %s (« %s ») est inconnue."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "Le contenu d’un élément %s (« %s ») est inconnu."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Une propriété requise d’un élément %s (%s) est manquante."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Des valeurs sont présentes pour les propriétés %s et %s d’un élément %s "
+"alors qu’une seule des deux est autorisée."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Un élément requis (%s) est manquant."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Un élément singleton (%s) est en double."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "Un élément « %s » ne contient pas le contenu requis."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "Le contenu d’un élément %s (« %s ») n’est pas dans le format ISO 8601."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "JSON non valide reçu du serveur : %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr ""
+"Le contenu d’un élément %s (« %s ») n’est pas dans le format RVB hexadécimal."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Code d’erreur %u lors de la requête : %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Code d’erreur %u lors de l’insertion d’une entrée : %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Code d’erreur %u lors de la mise à jour d’une entrée : %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Code d’erreur %u lors de la suppression d’une entrée : %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Code d’erreur %u lors du téléchargement : %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Code d’erreur %u lors de l’envoi : %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Code d’erreur %u lors du lancement d’un lot d’opérations : %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "L’URI redirigé n’est pas valide : %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "L’entrée a déjà été insérée."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr "Erreur reçue du serveur après un envoi qui peut être repris."
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Le flux est déjà fermé"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Vous avez effectué trop d’appels API en peu de temps. Veuillez patienter "
+"quelques minutes puis essayez de nouveau."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Vous devez vous authentifier pour faire cela."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "Vous devez vous authentifier pour interroger tous les calendriers."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "Vous devez vous authentifier pour interroger vos propres calendriers."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "Vous devez vous authentifier pour interroger des contacts."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "Vous devez vous authentifier pour interroger des groupes de contacts."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "Le groupe a déjà été inséré."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "Vous devez vous authentifier pour insérer un groupe."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "Vous devez vous authentifier pour télécharger des documents."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Format d’export de document « %s » inconnu ou non pris en charge."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "Visibilité non valide : valeur « %s » non reconnue"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "Vous devez vous authentifier pour interroger des documents."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "Vous devez vous authentifier pour envoyer des documents."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "Le document a déjà été envoyé."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "Vous devez vous authentifier pour mettre à jour des documents."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr ""
+"Le type de contenu du document fourni (« %s ») n’a pas pu être identifié."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "Vous devez vous authentifier pour copier des documents."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "Dossier parent introuvable"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+"Vous devez vous authentifier pour insérer ou déplacer des documents et des "
+"dossiers."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr ""
+"Vous devez vous authentifier pour déplacer des documents et des dossiers."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "La propriété « %s » ne contient pas une image"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Vous devez indiquer un nom d’utilisateur ou vous authentifier pour "
+"interroger un utilisateur."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "Paramètre de requête non autorisé pour les albums."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Vous devez indiquer un nom d’utilisateur ou vous authentifier pour "
+"interroger tous les albums."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "L’album ne possède pas de lien de flux."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "Vous devez vous authentifier pour envoyer un fichier."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "L’album a déjà été inséré."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "Vous devez vous authentifier pour insérer un album."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr ""
+"Vous devez vous authentifier pour interroger toutes les listes de tâches."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "Vous devez vous authentifier pour interroger vos propres tâches."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Vous avez dépassé votre quota d’entrées. Veuillez supprimer quelques entrées "
+"et essayez de nouveau."
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Votre compte Google doit être associé à une chaîne YouTube pour faire cela. "
+"Visitez %s pour en créer une."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Vous devez vous authentifier pour envoyer une vidéo."
--- /dev/null
+# Friulian translation for libgdata.
+# Copyright (C) 2016 libgdata's COPYRIGHT HOLDER
+# This file is distributed under the same license as the libgdata package.
+# Fabio Tomat <f.t.public@gmail.com>, 2016.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-09-03 09:39+0000\n"
+"PO-Revision-Date: 2019-09-03 12:06+0200\n"
+"Last-Translator: Fabio Tomat <f.t.public@gmail.com>\n"
+"Language-Team: Friulian <fur@li.org>\n"
+"Language: fur\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 2.2.3\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Lis operazions batch no son supuartadis a chest servizi."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "Il servidôr al à tornât une rispueste malformade."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Impussibil conetisi al servidôr dal servizi."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Impussibil conetisi al servidôr proxy."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"URI o header de domande no valit, opûr parametri fûr standard no supuartât: "
+"%s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Autenticazion necessarie: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "La risorse domandade no je stade cjatade: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "L'element al è stât modificât di cuant che al è stât scjariât: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Erôr codiç %u dulinvie la autenticazion: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "Un CAPTCHA al à di jessi jemplât par fâ l'acès."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Chest account al à bisugne di une password specifiche. (%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Il to non utent o password no jerin juscj."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "La tô direzion e-mail dal account no je stade verificade. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "No tu âs acetât i tiermins e lis condizions dal servizi. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Chest account al è stât migrât. Jentre dentri in rêt par ricevi il to gnûf "
+"non utent e password. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Chest account al è stât eliminât. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Chest account al è stât disabilitât. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "L'acès di chest account a chest servizi al è stât disabilitât. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Chest servizi nol è al moment disponibil. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "Chest element nol supuarte coments."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "I coments no podaressin jessi zontâts a chest element."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "Chest coment nol pues jessi eliminât."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Domande di ricercje no valide"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr "Il servidôr al à refudât la domande di credenziâi temporaniis."
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "Il supuart a OAuth 1.0 al è disabilitât."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "Acès dineât dal utent o dal servidôr."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Erôr tal analizâ XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Document vueit."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Erôr tal analizâ JSON: %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Il grop JSON plui esterni nol è un ogjet."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Un element %s nol veve il contignût domandât."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "Il contignût di un element %s (\"%s\") nol jere in formât ISO 8601."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr ""
+"Il valôr de proprietât %s di un element %s (\"%s\") nol jere cognossût."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "Il contignût di un element %s (\"%s\") nol jere cognossût."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Une proprietât di un element %s (%s) no jere presinte."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"A jerin presints valôrs pes proprietâts %s e %s di un element %s cuant che "
+"dome une des dôs e jere permetude."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Un element necessari (%s) nol jere present."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Un element singleton (%s) al jere dopleât."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "Un element %s nol veve il contignût domandât."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "Il contignût di un element %s (\"%s\") nol jere in formât ISO 8601."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Un JSON no valit al è stât ricevût dal servidôr: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr "Il contignût di un element %s (%s) nol jere in formât RGB esadecimâl."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Erôr codiç %u dulinvie la interogazion: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Erôr codiç %u dulinvie l'inseriment di un element: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Erôr codiç %u dulinvie l'inzornament di un element: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Erôr codiç %u dulinvie la eliminazion di un element: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Erôr codiç %u dulinvie il discjariament: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Erôr codiç %u dulinvie il cjariament: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Codiç di erôr %u dilunc la esecuzion di une operazion batch: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "URI di indreçament no valit: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "L'element al è za stât inserît."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"Ricevût erôr dal servidôr dopo ve cjariât un toc di cjariament ripristinabil."
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Flus za sierât"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Tu âs za fat masse clamadis API di recent. Spiete un pâr di minûts e torne "
+"prove."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Tu âs di jessi autenticât par fâ chest."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "Tu âs di jessi autenticât par interogâ ducj i calendaris."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "Tu âs di jessi autenticât par interogâ i tiei calendaris."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "Tu âs di jessi autenticât par interogâ i contats."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "Tu âs di jessi autenticât par interogâ i grups di contats."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "Il grup al è za stât inserît."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "Tu âs di jessi autenticât par inserî un grup."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "Tu âs di jessi autenticât par discjariâ documents."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Formât di esportazion ‘%s’ no cognossût o no supuartât."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "Visibilitât no valide: valôr ‘%s’ no ricognossût"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "Tu âs di jessi autenticât par interogâ i documents."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "Tu âs di jessi autenticât par cjariâ documents."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "Il document al è za stât cjariât."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "Tu âs di jessi autenticât par inzornâ documents."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr ""
+"Il gjenar di contignût dal document furnît ('%s') nol pues jessi ricognossût."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "Tu âs di jessi autenticât par copiâ documents."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "Cartele superiôr no cjatade"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr "Tu âs di jessi autenticât par inserî o movi documents e cartelis."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr "Tu âs di jessi autenticât par movi documents e cartelis."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "La proprietât '%s' no ten une imagjin"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Tu âs di specificâ un non utent o jessi autenticât par interogâ un utent."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "Parametri de interogazion no permetût pai album."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Tu âs di specificâ un non utent o jessi autenticât par interogâ ducj i album."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "L'album nol veve un leam di feed."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "Tu âs di jessi autenticât par cjariâ un file."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "L'album al è za stât inserît."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "Tu âs di jessi autenticât par inserî un album."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr "Tu âs di jessi autenticât par interogâ dutis lis listis di ativitâts."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "Tu âs di jessi autenticât par interogâ lis tôs ativitâts."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"La cuote dai elements a je stade superade. Elimine cualchi element e torne "
+"prove."
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Il to account Google al à di jessi associât cuntun canâl YouTube par fâ "
+"cheste robe. Visite %s par creâ un."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Tu âs di jessi autenticât par cjariâ un video."
+
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "Un element '%s' nol veve il contignût domandât."
+
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr ""
+#~ "Il contignût di un element '%s' (\"%s\") nol jere in formât ISO 8601."
--- /dev/null
+# Galician translation of libgdata.
+# Copyright (C) 2012 Leandro Regueiro
+# This file is distributed under the same license as the PACKAGE package.
+# Proxecto Trasno - Adaptación do software libre á lingua galega: Se desexas
+# colaborar connosco, podes atopar máis información en http://www.trasno.net
+# Antón Méixome <meixome@mancomun.org>, 2009.
+# Fran Diéguez <frandieguez@gnome.org>, 2009, 2010, 2011, 2012.
+# Leandro Regueiro <leandro.regueiro@gmail.com>, 2011, 2012.
+# Fran Dieguez <frandieguez@gnome.org>, 2013, 2014, 2015, 2016, 2017.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata-master-po-gl\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-09-25 10:37+0000\n"
+"PO-Revision-Date: 2019-12-27 13:43+0100\n"
+"Last-Translator: Fran Diéguez <frandieguez@gnome.org>\n"
+"Language-Team: Galician <gnome-l10n-gl@gnome.org>\n"
+"Language: gl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Poedit 2.2.4\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Este servizo non admite as operacións en lote."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "O servidor devolveu unha resposta mal formada."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Non é posíbel conectarse co servizo do servidor."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Non é posíbel conectar co servidor proxy."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"A URI ou a cabeceira da petición non é válida, ou o parámetro non estándar "
+"non é compatíbel: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Requírese autenticación: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "O recurso solicitado non foi atopado: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "A entrada modificouse desde que se descargou: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Código de erro %u ao autenticar: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "O CAPTCHA debe ser completado para iniciar sesión."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Esta conta require un contrasinal específico de aplicación. (%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "O seu nome de usuario ou contrasinal son incorrectos."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "O enderezo de correo da súa conta non foi verificado. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Non aceptou os termos e condicións do servizo . (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Migrouse esta conta. Inicie sesión en liña para recibir o seu novo nome de "
+"usuario e contrasinal. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Esta conta foi eliminada. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Esta conta foi desactivada. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "O acceso de esta conta a este servizo foi desactivado. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Este servizo non está dispoñíbel neste momento. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "Esta entrada non admite comentarios."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "Pode que os comentarios non se engadan nesta entrada."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "Pode que non se elimine este comentario."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Petición de busca non válida"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr "O servidor rexeitou a solicitude de credenciais temporais."
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "A compatiblidade con OAuth 1.0 está desactivada."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "O acceso foi denegado polo usuario ou o servidor."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Produciuse un erro ao analizar o XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Documento baleiro."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Produciuse un erro ao analizar o JSON: %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "O nodo externo de JSON non é un obxecto."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Perdeuse un elemento %s que requiría contido."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "O contido dun elemento %s («%s») non estaba no formato ISO 8601."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "O valor da propiedade %s dun elemento %s («%s») era descoñecido."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "O contido do elemento %s («%s») era descoñecido."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "A propiedade requirida do elemento %s (%s) non estaba presente."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Existían valores presentes para as propiedades %s e %s do elemento %s cando "
+"só se permite un dos dous."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Un elemento requirido (%s) non está presente."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Un elemento singleton (%s) estaba duplicado."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "Perdeuse un elemento «%s» que requiría contido."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "O contido dun elemento «%s» («%s») non estaba no formato ISO 8601."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Recibiuse JSON non válido do servidor: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr ""
+"O contido dun elemento %s de contido («%s») non estaba en formato "
+"hexadecimal RGB."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Código de erro %u ao facela consulta: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Código de erro %u ao inserir unha entrada: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Código de erro %u ao actualizar unha entrada: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Código de erro %u ao eliminar unha entrada: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Código de erro %u ao descargar: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Código de erro %u ao enviar: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Código de erro %u ao executar unha operación de lote: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "O URI de redirección non é válido: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "A entrada xa foi inserida."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"Recibiuse un erro do servidor despois de enviar un fragmento de carga "
+"reanudábel."
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "O fluxo xa está pechado"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Vostede fixo demasiadas chamadas á API recentemente. Agarde uns poucos "
+"minutos e ténteo de novo."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Debe autenticarse para facer isto."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "Debe autenticarse para consultar os tódolos calendarios."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "Debe autenticarse para consultar os seus propios calendarios."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "Debe autenticarse para consultar os contactos."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "Debe autenticarse para consultar os grupos de contactos."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "Xa se inseriu o grupo."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "Debe autenticarse para inserir un grupo."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "Debe autenticarse para facer descargar documentos."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr ""
+"Formato de exportación de documento «%s» non coñecido ou non compatíbel."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "Visibilidade non válida: valor non recoñecido «%s»"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "Debe autenticarse para consultar os documentos."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "Debe estar autenticado para enviar documentos."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "O documento xa se enviou."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "Debe autenticarse para actualizar os documentos."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr ""
+"Non foi posíbel recoñecer o tipo de contido do documento proporcionado "
+"(«%s»)."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "Debe autenticarse para poder copiar documentos."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "Non se atopou o cartafol pai"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr "Debe autenticarse para inserir e mover documentos e cartafoles."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr "Debe autenticarse para mover documentos e cartafoles."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "A propiedade «%s» non contén unha imaxe"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Debe especificar un nome de usuario ou autenticarse para consultar un "
+"usuario."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "Parámetro de consulta non permitido para os álbums."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Debe especificar un nome de usuario ou autenticarse para solicitar todos os "
+"álbums."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "O álbum non ten unha ligazón fonte."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "Debe estar autenticado para enviar un ficheiro."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "A álbum xa foi inserido."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "Debe autenticarse para inserir un álbum."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr "Debe autenticarse para consultar todas as listas de tarefas."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "Debe autenticarse para consultar as súas propias tarefas."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Excedeu a súa cota de entrada. Elimine algunhas entradas e ténteo de novo."
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"A súa conta de Google debe estar asociada con unha canle de YouTube para "
+"facer isto. Visite %s para crear unha."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Debe estar autenticado para enviar un vídeo."
--- /dev/null
+# translation of gu.po to Gujarati
+# Gujarati translation for libgdata.
+# Copyright (C) 2011 libgdata's COPYRIGHT HOLDER
+# This file is distributed under the same license as the libgdata package.
+#
+# Sweta Kothari <swkothar@redhat.com>, 2011, 2014.
+msgid ""
+msgstr ""
+"Project-Id-Version: gu\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug."
+"cgi?product=libgdata&keywords=I18N+L10N&component=general\n"
+"POT-Creation-Date: 2014-05-27 00:47+0000\n"
+"PO-Revision-Date: 2014-09-02 15:18+0530\n"
+"Last-Translator: \n"
+"Language-Team: American English <kde-i18n-doc@kde.org>\n"
+"Language: gu\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Lokalize 1.0\n"
+"Plural-Forms: nplurals=2; plural=(n!=1);\n"
+
+#: ../gdata/gdata-client-login-authorizer.c:627
+#: ../gdata/gdata-oauth1-authorizer.c:839
+#: ../gdata/gdata-oauth1-authorizer.c:1115
+msgid "The server returned a malformed response."
+msgstr ""
+
+#: ../gdata/gdata-client-login-authorizer.c:647 ../gdata/gdata-service.c:350
+#, c-format
+msgid "Cannot connect to the service's server."
+msgstr "સેવાનાં સર્વરને જોડી શકતા નથી."
+
+#: ../gdata/gdata-client-login-authorizer.c:652 ../gdata/gdata-service.c:355
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "પ્રોક્સી સર્વરને જોડી શકતા નથી."
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:658 ../gdata/gdata-service.c:361
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:664 ../gdata/gdata-service.c:367
+#, c-format
+msgid "Authentication required: %s"
+msgstr "સત્તાધિકરણ જરૂરી: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:669 ../gdata/gdata-service.c:372
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "સૂચિત સ્ત્રોત મળ્યો ન હતો: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:675 ../gdata/gdata-service.c:378
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr ""
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:687 ../gdata/gdata-service.c:392
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "ભૂલ કોડ %u જ્યારે સત્તાધિકરણ કરી રહ્યા હોય: %s"
+
+#: ../gdata/gdata-client-login-authorizer.c:786
+msgid "A CAPTCHA must be filled out to log in."
+msgstr ""
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:824
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "આ ખાતાને કાર્યક્રમ લગતા પાસવર્ડની જરૂર છે. (%s)"
+
+#: ../gdata/gdata-client-login-authorizer.c:831
+msgid "Your username or password were incorrect."
+msgstr "તમારો વપરાશકર્તાનામ અથવા પાસવર્ડ અયોગ્ય હતા."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:852
+#, c-format
+msgid "Your account's e-mail address has not been verified. (%s)"
+msgstr "તમારા ખાતાનાં ઇમેલ સરનામાંને ચકાસવામાં આવ્યુ નથી. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:857
+#, c-format
+msgid "You have not agreed to the service's terms and conditions. (%s)"
+msgstr ""
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:863
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:868
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "આ ખાતાને કાઢી નાખવામાં આવ્યુ છે. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:873
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "આ ખાતાને નિષ્ક્રિય કરી દેવામાં આવ્યુ છે. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:878
+#, c-format
+msgid "This account's access to this service has been disabled. (%s)"
+msgstr "આ સેવા માટે આ ખાતાનાં પ્રવેશને નિષ્ક્રિય કરી દેવામાં આવ્યુ છે. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:883
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "આ સેવા અત્યારે ઉપલબ્ધ નથી. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:262
+msgid "This entry does not support comments."
+msgstr "આ નોંધણી ટિપ્પણીઓને આધાર આપતુ નથી."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#: ../gdata/gdata-commentable.c:349 ../gdata/gdata-commentable.c:435
+msgid "Comments may not be added to this entry."
+msgstr "ટિપ્પણીઓ આ નોંધણીમાં ઉમેરી શકાતુ નથી."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:518 ../gdata/gdata-commentable.c:594
+#| msgid "This account has been deleted. (%s)"
+msgid "This comment may not be deleted."
+msgstr "આ ટિપ્પણીને કાઢી શકાતુ નથી."
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:762
+msgid "Invalid seek request"
+msgstr "અયોગ્ય પહોંચ અરજી"
+
+#: ../gdata/gdata-oauth1-authorizer.c:814
+msgid "The server rejected the temporary credentials request."
+msgstr ""
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1089
+msgid "Access was denied by the user or server."
+msgstr "પ્રવેશ વપરાશકર્તા અથવા સર્વર દ્દારા નામંજૂર થયેલ હતુ."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:349 ../gdata/gdata-parsable.c:360
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "XML ને પદચ્છેદન કરી રહ્યા હોય ત્યારે ભૂલ: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:362
+msgid "Empty document."
+msgstr "ખાલી દસ્તાવેજ."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:480 ../gdata/gdata-parsable.c:518
+#, fuzzy, c-format
+#| msgid "Error parsing XML: %s"
+msgid "Error parsing JSON: %s"
+msgstr "XML ને પદચ્છેદન કરી રહ્યા હોય ત્યારે ભૂલ: %s"
+
+#: ../gdata/gdata-parsable.c:519
+msgid "Outermost JSON node is not an object."
+msgstr ""
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "%s ઘટક જરૂરી સમાવિષ્ટને ગુમ થયેલ હતુ."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+msgstr ""
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element ("00:01:42.500") was unknown.
+#: ../gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (\"%s\") was unknown."
+msgstr ""
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element ("protected") was unknown.
+#: ../gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (\"%s\") was unknown."
+msgstr "%s ઘટના (\"%s\") નો સમાવિષ્ટ અજ્ઞાત હતો."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "%s ઘટક (%s) નો જરૂરી ગુણધર્મ હાજર ન હતો."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "જરૂરી ઘટક (%s) હાજર ન હતો."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: ../gdata/gdata-parser.c:200 ../gdata/gdata-parser.c:304
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "singleton ઘટક (%s) નકલી હતો."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A 'title' element was missing required content.
+#: ../gdata/gdata-parser.c:290
+#, c-format
+msgid "A '%s' element was missing required content."
+msgstr ""
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a 'uploaded' element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:320
+#, fuzzy, c-format
+#| msgid "The content of a %s element (\"%s\") was unknown."
+msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+msgstr "%s ઘટના (\"%s\") નો સમાવિષ્ટ અજ્ઞાત હતો."
+
+#. Translators: the parameter is an error message.
+#: ../gdata/gdata-parser.c:330
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "અયોગ્ય JSON સર્વરમાંથી પ્રાપ્ત થયેલ હતુ: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:398
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr ""
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:404
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "ભૂલ કોડ %u જ્યારે નોંધણીને દાખલ કરી રહ્યા હોય: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:410
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "ભૂલ કોડ %u જ્યારે નોંધણીને સુધારી રહ્યા હોય: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:416
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "ભૂલ કોડ %u જ્યારે નોંધણીને કાઢી રહ્યા હોય: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:422
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "ભૂલ કોડ %u જ્યારે ડાઉનલોડ કરી રહ્યા હોય: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:428
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "ભૂલ કોડ %u જ્યારે અપલોડ કરી રહ્યા હોય: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:434
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr ""
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:721
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "અયોગ્ય રિડાયરેક્ટ URI : %s"
+
+#: ../gdata/gdata-service.c:1399
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:624
+#: ../gdata/services/youtube/gdata-youtube-service.c:888
+msgid "The entry has already been inserted."
+msgstr "નોંધણી પહેલેથી જ દાખલ થયેલ છે."
+
+#. Resumable upload error.
+#: ../gdata/gdata-upload-stream.c:748 ../gdata/gdata-upload-stream.c:830
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+
+#: ../gdata/gdata-upload-stream.c:896
+msgid "Stream is already closed"
+msgstr "સ્ટ્રીમ પહેલેથી બંધ થયેલ છે"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element ("00FG56") was not in hexadecimal RGB format.
+#: ../gdata/services/calendar/gdata-calendar-calendar.c:406
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in hexadecimal RGB format."
+msgstr ""
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:315
+#: ../gdata/services/calendar/gdata-calendar-service.c:366
+msgid "You must be authenticated to query all calendars."
+msgstr ""
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:412
+#: ../gdata/services/calendar/gdata-calendar-service.c:463
+#: ../gdata/services/calendar/gdata-calendar-service.c:508
+#: ../gdata/services/calendar/gdata-calendar-service.c:568
+msgid "You must be authenticated to query your own calendars."
+msgstr ""
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:517
+#: ../gdata/services/calendar/gdata-calendar-service.c:581
+msgid "The calendar did not have a content URI."
+msgstr "કૅલેન્ડર પાસે સમાવિષ્ટ URI ન હતી."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:308
+msgid "You must be authenticated to query contacts."
+msgstr ""
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:424
+#: ../gdata/services/contacts/gdata-contacts-service.c:474
+msgid "You must be authenticated to query contact groups."
+msgstr ""
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:514
+msgid "The group has already been inserted."
+msgstr "જૂથને પહેલેથી જ દાખલ થયેલ છે."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:521
+msgid "You must be authenticated to insert a group."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-document.c:300
+msgid "You must be authenticated to download documents."
+msgstr "દસ્તાવેજોને ડાઉનલોડ કરવા માટે તમે સત્તાધિકરણ થયેલ હોવા જ જોઇએ."
+
+#: ../gdata/services/documents/gdata-documents-service.c:461
+#: ../gdata/services/documents/gdata-documents-service.c:511
+msgid "You must be authenticated to query documents."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-service.c:556
+msgid "You must be authenticated to upload documents."
+msgstr "દસ્તાવેજોને અપલોડ કરવા માટે તમે સત્તાધિકરણ થયેલ હોવા જ જોઇએ."
+
+#: ../gdata/services/documents/gdata-documents-service.c:562
+msgid "The document has already been uploaded."
+msgstr "દસ્તાવેજને પહેલેથી જ અપલોડ કરેલ છે."
+
+#: ../gdata/services/documents/gdata-documents-service.c:706
+msgid "You must be authenticated to update documents."
+msgstr "દસ્તાવેજોને સુધારવા માટે તમે સત્તાધિકરણ થયેલ હોવા જ જોઇએ."
+
+#: ../gdata/services/documents/gdata-documents-service.c:888
+#, c-format
+msgid ""
+"The content type of the supplied document ('%s') could not be recognized."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-service.c:928
+#| msgid "You must be authenticated to upload documents."
+msgid "You must be authenticated to copy documents."
+msgstr "તમે દસ્તાવેજોની નકલ કરવા માટે સત્તાધિકરણ હોવુ જ જોઇએ."
+
+#: ../gdata/services/documents/gdata-documents-service.c:1090
+#: ../gdata/services/documents/gdata-documents-service.c:1273
+msgid "You must be authenticated to move documents and folders."
+msgstr "દસ્તાવેજો અને ફોલ્ડરોને ખસેડવા માટે તમે સત્તાધિકરણ થયેલ હોવા જ જોઇએ."
+
+#: ../gdata/services/freebase/gdata-freebase-service.c:445
+#, c-format
+msgid "Property '%s' does not hold an image"
+msgstr ""
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:387
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "Query parameter not allowed for albums."
+msgstr "ક્વેરી પરિમાણ એ આલ્બમ માટે પરવાનગી મળેલ નથી."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:394
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:455
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:476
+msgid "The album did not have a feed link."
+msgstr ""
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:631
+msgid "You must be authenticated to upload a file."
+msgstr "ફાઇલને અપલોડ કરવા માટે તમે સત્તાધિકરણ થયેલ હોવા જ જોઇએ."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:707
+msgid "The album has already been inserted."
+msgstr "આલ્બમને પહેલેથી જ દાખલ થયેલ છે."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:714
+msgid "You must be authenticated to insert an album."
+msgstr "આલ્બમને દાખલ કરવા માટે તમે સત્તાધિકરણ થયેલ હોવા જ જોઇએ."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:145
+#: ../gdata/services/tasks/gdata-tasks-service.c:196
+#, fuzzy
+#| msgid "You must be authenticated to do this."
+msgid "You must be authenticated to query all tasklists."
+msgstr "આ કરવા માટે તમે સત્તાધિકરણ થયેલ હોવા જ જોઇએ."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:244
+#: ../gdata/services/tasks/gdata-tasks-service.c:300
+#, fuzzy
+#| msgid "You must be authenticated to update documents."
+msgid "You must be authenticated to query your own tasks."
+msgstr "દસ્તાવેજોને સુધારવા માટે તમે સત્તાધિકરણ થયેલ હોવા જ જોઇએ."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:457
+#, c-format
+msgid "This service is not available at the moment."
+msgstr "આ સેવા અત્યારે ઉપલબ્ધ નથી."
+
+#. Translators: the parameter is a URI.
+#: ../gdata/services/youtube/gdata-youtube-service.c:462
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+
+#. Translators: the first parameter is an error code, which is a coded string.
+#. * The second parameter is an error domain, which is another coded string.
+#. * The third parameter is the location of the error, which is either a URI or an XPath.
+#: ../gdata/services/youtube/gdata-youtube-service.c:467
+#: ../gdata/services/youtube/gdata-youtube-service.c:488
+#: ../gdata/services/youtube/gdata-youtube-service.c:494
+#, c-format
+msgid ""
+"Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+msgstr ""
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:473
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "આ કરવા માટે તમે સત્તાધિકરણ થયેલ હોવા જ જોઇએ."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:478
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:481
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:512
+#, c-format
+msgid "Unknown and unparsable error received."
+msgstr ""
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:776
+#: ../gdata/services/youtube/gdata-youtube-service.c:833
+msgid "The video did not have a related videos <link>."
+msgstr ""
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:895
+msgid "You must be authenticated to upload a video."
+msgstr "વિડિયો અપલોડ કરવા માટે તમે સત્તાધિકરણ થયેલ હોવા જ જોઇએ."
+
--- /dev/null
+# Hebrew translations for PACKAGE package.
+# Copyright (C) 2011 THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# Yaron Shahrabani <sh.yaron@gmail.com>, 2011.
+# Yosef Or Boczko <yoseforb@gmail.com>, 2014.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata 3.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-08-09 21:15+0300\n"
+"PO-Revision-Date: 2016-08-09 21:17+0300\n"
+"Last-Translator: Yosef Or Boczko <yoseforb@gmail.com>\n"
+"Language-Team: עברית <>\n"
+"Language: he\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Generator: Gtranslator 2.91.6\n"
+
+#: ../gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "פעולות אצווה אינן נתמכות על ידי שרת זה."
+
+#: ../gdata/gdata-client-login-authorizer.c:629
+#: ../gdata/gdata-oauth1-authorizer.c:840
+#: ../gdata/gdata-oauth1-authorizer.c:1116
+#: ../gdata/gdata-oauth2-authorizer.c:953
+#: ../gdata/gdata-oauth2-authorizer.c:964
+#: ../gdata/gdata-oauth2-authorizer.c:983
+#: ../gdata/gdata-oauth2-authorizer.c:999
+#: ../gdata/gdata-oauth2-authorizer.c:1064
+#: ../gdata/gdata-oauth2-authorizer.c:1076
+#: ../gdata/gdata-oauth2-authorizer.c:1087
+#: ../gdata/gdata-oauth2-authorizer.c:1102
+#: ../gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "השרת החזיר תגובה פגומה."
+
+#: ../gdata/gdata-client-login-authorizer.c:649 ../gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service's server."
+msgstr "לא ניתן להתחבר לשרת השירות."
+
+#: ../gdata/gdata-client-login-authorizer.c:654 ../gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "לא ניתן להתחבר לשרת המתווך."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: ../gdata/gdata-client-login-authorizer.c:660 ../gdata/gdata-service.c:372
+#: ../gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"הכותרת או הכתובת של הבקשה שגויים או שנוסף משתנה בלתי תקני שאינו נתמך: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:666 ../gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "נדרשת הזדהות: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:671 ../gdata/gdata-service.c:383
+#: ../gdata/services/calendar/gdata-calendar-service.c:313
+#: ../gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "המשאב המבוקש לא נמצא: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:677 ../gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "הרשומה עברה שינויים מאז שהתקבלה: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:689 ../gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "התקבל קוד השגיאה %u בעת ההזדהות: %s"
+
+#: ../gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "יש לעבור מבחן טיורינג כדי להיכנס."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "חשבון זה דורש ססמה ייעודית ליישום. (%s)"
+
+#: ../gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "שם המשתמש או הססמה שלך שגויים."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account's e-mail address has not been verified. (%s)"
+msgstr "כתובת הדוא״ל של החשבון שלך לא אומתה. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service's terms and conditions. (%s)"
+msgstr "הסכמת לתנאי השימוש בשירות. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"חשבון זה עבר הגירה. יש להיכנס אליו כדי לקבל את שם המשתמש והססמה החדשים שלך. "
+"(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "חשבון זה נמחק. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "חשבון זה נוטרל. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account's access to this service has been disabled. (%s)"
+msgstr "הגישה של חשבון זה לשירות נוטרלה. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "השירות אינו זמין לעת עתה. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:262
+msgid "This entry does not support comments."
+msgstr "רשומה זו אינה תומכת בתגובות."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#: ../gdata/gdata-commentable.c:349 ../gdata/gdata-commentable.c:435
+msgid "Comments may not be added to this entry."
+msgstr "לא ניתן להוסיף תגובות לרשומה זו."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:518 ../gdata/gdata-commentable.c:594
+msgid "This comment may not be deleted."
+msgstr "לא ניתן למחוק תגובה זו."
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:762
+msgid "Invalid seek request"
+msgstr "בקשת האיתור שגויה"
+
+#: ../gdata/gdata-oauth1-authorizer.c:815
+msgid "The server rejected the temporary credentials request."
+msgstr "השרת דחה את הבקשה לפרטי זיהוי זמניים."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1090
+#: ../gdata/gdata-oauth2-authorizer.c:1113
+#: ../gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "הגישה נדחתה על ידי המשתמש או השרת."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:352 ../gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "שגיאה בניתוח ה־XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "מסמך ריק."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:483 ../gdata/gdata-parsable.c:521
+#: ../gdata/services/documents/gdata-documents-access-rule.c:144
+#: ../gdata/services/documents/gdata-documents-access-rule.c:154
+#: ../gdata/services/documents/gdata-documents-document.c:286
+#: ../gdata/services/documents/gdata-documents-entry.c:458
+#: ../gdata/services/documents/gdata-documents-entry.c:469
+#: ../gdata/services/documents/gdata-documents-entry.c:480
+#: ../gdata/services/documents/gdata-documents-entry.c:527
+#: ../gdata/services/documents/gdata-documents-entry.c:538
+#: ../gdata/services/documents/gdata-documents-entry.c:636
+#: ../gdata/services/documents/gdata-documents-entry.c:671
+#: ../gdata/services/documents/gdata-documents-entry.c:686
+#: ../gdata/services/documents/gdata-documents-entry.c:701
+#: ../gdata/services/documents/gdata-documents-entry.c:731
+#: ../gdata/services/documents/gdata-documents-entry.c:747
+#: ../gdata/services/documents/gdata-documents-feed.c:81
+#: ../gdata/services/documents/gdata-documents-feed.c:92
+#: ../gdata/services/documents/gdata-documents-feed.c:142
+#: ../gdata/services/documents/gdata-documents-feed.c:160
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "שגיאה בניתוח ה־JSON: %s"
+
+#: ../gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "צומת JSON החיצונית ביותר אינה עצם."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "לרכיב מסוג %s חסר תוכן הכרחי."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+msgstr "התוכן של רכיב מסוג %s (\"%s\") לא היה במבנה ISO 8601."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element ("00:01:42.500") was unknown.
+#: ../gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (\"%s\") was unknown."
+msgstr "הערך של המאפיין %s של הרכיב %s (\"%s\") אינו ידוע."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element ("protected") was unknown.
+#: ../gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (\"%s\") was unknown."
+msgstr "התוכן של הרכיב מסוג %s (\"%s\") אינו ידוע."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "ערך הכרחי של רכיב מסוג %s (%s) לא נמצא."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"הופיעו ערכים עבור המאפיינים %s ו־%s של רכיב מסוג %s כאשר רק אחד מהשניים "
+"מורשה לשימוש."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "רכיב הכרחי (%s) לא נמצא."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: ../gdata/gdata-parser.c:200 ../gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "פריט יחידני (%s) שוחזר."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A 'title' element was missing required content.
+#: ../gdata/gdata-parser.c:273
+#, c-format
+msgid "A '%s' element was missing required content."
+msgstr "לרכיב '%s' חסר תוכן דרוש."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a 'uploaded' element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+msgstr "התוכן של רכיב '%s' (\"%s\") לא היה במבנה ISO 8601."
+
+#. Translators: the parameter is an error message.
+#: ../gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "התקבל מהשרת JSON לא תקף: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element ("00FG56") was not in hexadecimal RGB format.
+#: ../gdata/gdata-parser.c:1179
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in hexadecimal RGB format."
+msgstr "התוכן של רכיב מסוג %s (\"%s\") לא הופיעה במבנה RGB הקסדצימלי."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "התקבל קוד השגיאה %u בעת ביצוע השאילתה: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "התקבל קוד השגיאה %u בעת הוספת רשומה: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "התקבל קוד השגיאה %u בעת עדכון רשומה: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "התקבל קוד השגיאה %u בעת מחיקת רשומה: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "התקבל קוד השגיאה %u במהלך הורדה: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "התקבל קוד השגיאה %u במהלך העלאה: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "התקבל קוד השגיאה %u במהלך פעולה הכמותית: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:737
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "כתובת הפנייה שגויה: %s"
+
+#: ../gdata/gdata-service.c:1454
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:626
+#: ../gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "הרשומה כבר נוספה."
+
+#. Resumable upload error.
+#: ../gdata/gdata-upload-stream.c:788 ../gdata/gdata-upload-stream.c:870
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr "התקבלה שגיאה מהשרת לאחר העלאת חלק שניתן להעלאה בהמשכים."
+
+#: ../gdata/gdata-upload-stream.c:936
+msgid "Stream is already closed"
+msgstr "התזרים כבר נסגר"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:302
+#: ../gdata/services/tasks/gdata-tasks-service.c:195
+#: ../gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr "שלחת קריאות API רבות מדי לאחרונה. נא להמתין מספר דקות ולנסות שוב."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:334
+#: ../gdata/services/tasks/gdata-tasks-service.c:204
+#: ../gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "עליך להזדהות כדי לעשות זאת."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:465
+#: ../gdata/services/calendar/gdata-calendar-service.c:516
+msgid "You must be authenticated to query all calendars."
+msgstr "עליך להזדהות כדי לתשאל את כל היומנים."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:562
+#: ../gdata/services/calendar/gdata-calendar-service.c:613
+#: ../gdata/services/calendar/gdata-calendar-service.c:675
+#: ../gdata/services/calendar/gdata-calendar-service.c:734
+msgid "You must be authenticated to query your own calendars."
+msgstr "עליך להזדהות כדי לתשאל את היומנים שלך."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:308
+msgid "You must be authenticated to query contacts."
+msgstr "עליך להזדהות כדי לתשאל משתמשים."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:424
+#: ../gdata/services/contacts/gdata-contacts-service.c:474
+msgid "You must be authenticated to query contact groups."
+msgstr "עליך להזדהות כדי לתשאל קבוצות משתמשים."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:514
+msgid "The group has already been inserted."
+msgstr "הקבוצה כבר נוספה."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:521
+msgid "You must be authenticated to insert a group."
+msgstr "עליך להזדהות כדי להוסיף קבוצה."
+
+#: ../gdata/services/documents/gdata-documents-document.c:392
+msgid "You must be authenticated to download documents."
+msgstr "עליך להזדהות כדי להוריד מסמכים."
+
+#: ../gdata/services/documents/gdata-documents-document.c:401
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "תבנית קובץ לייבוא שאינה ידועה או שאינה נתמכת '%s'."
+
+#: ../gdata/services/documents/gdata-documents-service.c:513
+#: ../gdata/services/documents/gdata-documents-service.c:563
+msgid "You must be authenticated to query documents."
+msgstr "עליך להזדהות כדי לתשאל מסמכים."
+
+#: ../gdata/services/documents/gdata-documents-service.c:628
+msgid "You must be authenticated to upload documents."
+msgstr "עליך להזדהות כדי להעלות מסמכים."
+
+#: ../gdata/services/documents/gdata-documents-service.c:634
+msgid "The document has already been uploaded."
+msgstr "המסמך כבר הועלה."
+
+#: ../gdata/services/documents/gdata-documents-service.c:779
+msgid "You must be authenticated to update documents."
+msgstr "עליך להזדהות כדי להעלות מסמכים."
+
+#: ../gdata/services/documents/gdata-documents-service.c:946
+#, c-format
+msgid ""
+"The content type of the supplied document ('%s') could not be recognized."
+msgstr "לא ניתן לזהות את סוג התוכן של המסמך שסופק ('%s')."
+
+#: ../gdata/services/documents/gdata-documents-service.c:986
+msgid "You must be authenticated to copy documents."
+msgstr "עליך להזדהות כדי להעתיק מסמכים."
+
+#: ../gdata/services/documents/gdata-documents-service.c:1014
+msgid "Parent folder not found"
+msgstr "תיקיית הורה לא נמצאה"
+
+#: ../gdata/services/documents/gdata-documents-service.c:1160
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr "עליך להזדהות על מנת להכניס או להעביר תיקיות ומסמכים."
+
+#: ../gdata/services/documents/gdata-documents-service.c:1359
+msgid "You must be authenticated to move documents and folders."
+msgstr "עליך להזדהות כדי להעביר מסמכים ותיקיות."
+
+#: ../gdata/services/freebase/gdata-freebase-service.c:479
+#, c-format
+msgid "Property '%s' does not hold an image"
+msgstr "Property '%s' does not hold an image"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr "עליך לציין שם משתמש או להזדהות כדי לתשאל משתמש."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:387
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "Query parameter not allowed for albums."
+msgstr "משתנה בשאילתה לא מורשה עבור אלבומים."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:394
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:455
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr "עליך לציין שם משתמש או להזדהות כדי לבצע שאילתות מול כל האלבומים."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:476
+msgid "The album did not have a feed link."
+msgstr "לאלבום לא היה קישור להזנה."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:633
+msgid "You must be authenticated to upload a file."
+msgstr "עליך להזדהות כדי להעלות קובץ."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:709
+msgid "The album has already been inserted."
+msgstr "האלבום כבר נוסף."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:716
+msgid "You must be authenticated to insert an album."
+msgstr "עליך להזדהות כדי להוסיף אלבום."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:330
+#: ../gdata/services/tasks/gdata-tasks-service.c:381
+msgid "You must be authenticated to query all tasklists."
+msgstr "עליך להזדהות כדי לתשאל את כל רשימת המשימות שלך."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:430
+#: ../gdata/services/tasks/gdata-tasks-service.c:487
+msgid "You must be authenticated to query your own tasks."
+msgstr "עליך להזדהות כדי לתשאל את המשימות שלך."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr "חרגת ממכסת הרשומות שלך. נא למחוק כמה רשומות ולנסות שוב."
+
+#. Translators: the parameter is a URI.
+#: ../gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"עליך לשייך את חשבונך ב־Google לערוץ ב־YouTube כדי לעשות זאת. ניתן לבקר ב־%s "
+"כדי ליצור אחד."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "עליך להזדהות כדי להעלות וידאו."
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "ליומן לא הייתה כתובת לתוכן."
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "שירות זה אינו זמין לעת עתה."
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr "התקבל קוד שגיאה בלתי ידוע \"%s\" במתחם \"%s\" עם המיקום \"%s\"."
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "התקבלה שגיאה בלתי ידועה ובלתי ניתנת לפענוח."
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "לסרטון הווידאו לא היה <link> לסרטוני וידאו קשורים."
--- /dev/null
+# translation of libgdata.po.master.hi.po to Hindi
+# Hindi translation for libgdata.
+# Copyright (C) 2011 libgdata's COPYRIGHT HOLDER
+# This file is distributed under the same license as the libgdata package.
+# Rajesh Ranjan <rranjan@redhat.com>, 2011.
+# chandankumar(ciypro) <chandankumar.093047@gmail.com>, 2012.
+# rajesh <rajeshkajha@yahoo.com>, 2012.
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata.po.master.hi\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=libgdata&keywords=I18N+L10N&component=general\n"
+"POT-Creation-Date: 2012-07-15 10:02+0000\n"
+"PO-Revision-Date: 2012-09-19 17:31+0530\n"
+"Last-Translator: rajesh <rajeshkajha@yahoo.com>\n"
+"Language-Team: Hindi <indlinux-hindi@lists.sourceforge.net>\n"
+"Language: hi\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Lokalize 1.2\n"
+
+#: ../gdata/gdata-client-login-authorizer.c:597
+#: ../gdata/gdata-oauth1-authorizer.c:804
+#: ../gdata/gdata-oauth1-authorizer.c:1076
+msgid "The server returned a malformed response."
+msgstr "सर्वर ने एक विरूपित अनुक्रिया दिया."
+
+#: ../gdata/gdata-client-login-authorizer.c:617 ../gdata/gdata-service.c:320
+#, c-format
+msgid "Cannot connect to the service's server."
+msgstr "सेवा सर्वर से जुड़ नहीं सकता है."
+
+#: ../gdata/gdata-client-login-authorizer.c:622 ../gdata/gdata-service.c:325
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "किसी प्रॉक्सी सर्वर से जुड़ नहीं सकता है."
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:628 ../gdata/gdata-service.c:331
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr "अवैध आग्रह URI या शीर्षक, या असमर्थित गैरमानक पैरामीटर: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:634 ../gdata/gdata-service.c:337
+#, c-format
+msgid "Authentication required: %s"
+msgstr "सत्यापन जरूरी: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:639 ../gdata/gdata-service.c:342
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "निवेदित संसाधन नहीं मिल पाया: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:645 ../gdata/gdata-service.c:348
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "प्रविष्टि को डाउनलोड होने के समय से बदला गया था: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:657 ../gdata/gdata-service.c:362
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "त्रुटि कोड %u जब सत्यापित किया गया: %s"
+
+#: ../gdata/gdata-client-login-authorizer.c:752
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "लॉग इन करने के लिए CAPTCHA भरना जरुरी है."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:790
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "इस खाते को अनुप्रयोग विशिष्ट कूटशब्द की जरुरत है. (%s)"
+
+#: ../gdata/gdata-client-login-authorizer.c:797
+msgid "Your username or password were incorrect."
+msgstr "आपका उपयोगकर्ता नाम या कूटशब्द गलत था."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:818
+#, c-format
+msgid "Your account's e-mail address has not been verified. (%s)"
+msgstr "आपके खाते के ई-मेल पते को सत्यापित नहीं किया गया है. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:823
+#, c-format
+msgid "You have not agreed to the service's terms and conditions. (%s)"
+msgstr "आप सेवा की नियम और शर्तों से सहमत नहीं है. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:829
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"इस खाते को माइग्रेट किया गया है. कृपया ऑनलाइन लॉग इन हो कर अपना नया "
+"उपयोगकर्ता नाम "
+"और कूटशब्द प्राप्त करें. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:834
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "खाता मिटाया गया है. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:839
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "खाता निष्क्रिय किया गया है. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:844
+#, c-format
+msgid "This account's access to this service has been disabled. (%s)"
+msgstr "इस खाते के पहुँच से इस सेवा को निष्क्रिय कर दिया गया है है. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:849
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "यह सेवा इस समय उपलब्ध नहीं है. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:262
+msgid "This entry does not support comments."
+msgstr "यह प्रविष्टि टिप्पणियों का समर्थन नहीं करता है."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#: ../gdata/gdata-commentable.c:349 ../gdata/gdata-commentable.c:435
+msgid "Comments may not be added to this entry."
+msgstr "इस प्रविष्टि के लिए टिप्पणियों नहीं जोड़ा जा सकता है."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:518 ../gdata/gdata-commentable.c:594
+msgid "This comment may not be deleted."
+msgstr "इस टिप्पणी को हटाया नहीं जा सकता है."
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:752
+msgid "Invalid seek request"
+msgstr "अवैध प्राप्ति आग्रह"
+
+#: ../gdata/gdata-oauth1-authorizer.c:779
+msgid "The server rejected the temporary credentials request."
+msgstr "सर्वर ने अस्थायी क्रेडेंशियल्स निवेदन को नकार दिया."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1050
+msgid "Access was denied by the user or server."
+msgstr "उपयोगकर्ता या सर्वर द्वारा पहुँच नकार दिया गया."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:245 ../gdata/gdata-parsable.c:256
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "XML विश्लेषण में त्रुटि: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:258
+msgid "Empty document."
+msgstr "रिक्त दस्तावेज़."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:67
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "एक %s तत्व में जरूरी सामग्री अनुपस्थित थी."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:83
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+msgstr "The content of a %s element (\"%s\") was not in ISO 8601 format."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element ("00:01:42.500") was unknown.
+#: ../gdata/gdata-parser.c:103
+#, c-format
+msgid "The value of the %s property of a %s element (\"%s\") was unknown."
+msgstr "%s गुण का मान किसी %s तत्व का (\"%s\") अज्ञात था."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element ("protected") was unknown.
+#: ../gdata/gdata-parser.c:121
+#, c-format
+msgid "The content of a %s element (\"%s\") was unknown."
+msgstr "किसी %s तत्व का (\"%s\") सामग्री अज्ञात था."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:141
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "किसी %s तत्व (%s) का जरूरी गुण मौजूद था."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:164
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"मान %s और %s गुण के लिए मौजूद था किसी %s तत्व के लिए जब दो में से कोई एक ही "
+"अनुमति "
+"प्राप्त था."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:183
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "जरूरी तत्व (%s) मौजूद नहीं था."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#: ../gdata/gdata-parser.c:198
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "एकल तत्व (%s) की अनुकृति ली गई."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:368
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "त्रुटि कोड %u जब प्रश्न किया गया: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:374
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "त्रुटि कोड %u जब प्रविष्टि डाला जा रहा है: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:380
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "त्रुटि कोड %u जब प्रविष्टि अद्यतन किया जा रहा है: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:386
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "त्रुटि कोड %u जब प्रविष्टि मिटाया जा रहा है: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:392
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "त्रुटि कोड %u जब डाउनलोड किया जा रहा है: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:398
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "त्रुटि कोड %u जब अपलोड किया जा रहा है: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:404
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "त्रुटि कोड %u जब बैच आपरेशन चलाया गया. %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:685
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "अवैध रिडाइरेक्ट URI: %s"
+
+#: ../gdata/gdata-service.c:1337
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:624
+#: ../gdata/services/youtube/gdata-youtube-service.c:875
+msgid "The entry has already been inserted."
+msgstr "प्रविष्टि पहले से डाली गई है."
+
+#. Resumable upload error.
+#: ../gdata/gdata-upload-stream.c:744 ../gdata/gdata-upload-stream.c:826
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr "सर्वर से पुनर्बहाली अपलोड चंक अपलोड करने के बाद त्रुटि आयी."
+
+#: ../gdata/gdata-upload-stream.c:892
+msgid "Stream is already closed"
+msgstr "धारा पहले से बंद है"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element ("00FG56") was not in hexadecimal RGB format.
+#: ../gdata/services/calendar/gdata-calendar-calendar.c:406
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in hexadecimal RGB format."
+msgstr "%s तत्व की विषयवस्तु (\"%s\") हेक्साडेसीमल RGB प्रारूप में नहीं था."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:315
+#: ../gdata/services/calendar/gdata-calendar-service.c:366
+msgid "You must be authenticated to query all calendars."
+msgstr "आपको सभी पंचांगों से प्रश्न करने के लिए जरूर सत्यापित किया जाना चाहिए."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:412
+#: ../gdata/services/calendar/gdata-calendar-service.c:463
+#: ../gdata/services/calendar/gdata-calendar-service.c:508
+#: ../gdata/services/calendar/gdata-calendar-service.c:568
+msgid "You must be authenticated to query your own calendars."
+msgstr "आपको अपने पंचांग से प्रश्न करने के लिए जरूर सत्यापित किया जाना चाहिए."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:517
+#: ../gdata/services/calendar/gdata-calendar-service.c:581
+msgid "The calendar did not have a content URI."
+msgstr "पंचांग का विषयवस्तु URI नहीं था."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:308
+msgid "You must be authenticated to query contacts."
+msgstr "आपको संपर्कों को प्रश्न करने के लिए जरूर सत्यापित किया जाना चाहिए."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:424
+#: ../gdata/services/contacts/gdata-contacts-service.c:474
+msgid "You must be authenticated to query contact groups."
+msgstr "आपको समूह संपर्क को प्रश्न करने के लिए जरूर सत्यापित किया जाना चाहिए."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:514
+msgid "The group has already been inserted."
+msgstr "समूह पहले से डाली गई है."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:521
+msgid "You must be authenticated to insert a group."
+msgstr "आपको समूह डालने के लिए जरूर सत्यापित किया जाना चाहिए."
+
+#: ../gdata/services/documents/gdata-documents-document.c:300
+msgid "You must be authenticated to download documents."
+msgstr "आपको दस्तावेज डाउनलोड करने के लिए जरूर सत्यापित किया जाना चाहिए."
+
+#: ../gdata/services/documents/gdata-documents-service.c:460
+#: ../gdata/services/documents/gdata-documents-service.c:510
+msgid "You must be authenticated to query documents."
+msgstr "आपको दस्तावेज को प्रश्न करने के लिए जरूर सत्यापित किया जाना चाहिए."
+
+#: ../gdata/services/documents/gdata-documents-service.c:555
+msgid "You must be authenticated to upload documents."
+msgstr "आपको दस्तावेज अपलोड करने के लिए जरूर सत्यापित किया जाना चाहिए."
+
+#: ../gdata/services/documents/gdata-documents-service.c:561
+msgid "The document has already been uploaded."
+msgstr "दस्तावेज़ को पहले ही अपलोड कर दिया गया है."
+
+#: ../gdata/services/documents/gdata-documents-service.c:705
+msgid "You must be authenticated to update documents."
+msgstr "दस्तावेज़ों को अद्यतन करने के लिए आपको सत्यापित किया जाना चाहिए."
+
+#: ../gdata/services/documents/gdata-documents-service.c:885
+#, c-format
+msgid ""
+"The content type of the supplied document ('%s') could not be recognized."
+msgstr "आपूर्ति दस्तावेज़ के विषयवस्तु प्रकार ('%s') को पहचान नहीं सका."
+
+#: ../gdata/services/documents/gdata-documents-service.c:925
+#| msgid "You must be authenticated to query documents."
+msgid "You must be authenticated to copy documents."
+msgstr "आपको दस्तावेज़ की नक़ल के लिए जरूर सत्यापित किया जाना चाहिए."
+
+#: ../gdata/services/documents/gdata-documents-service.c:1087
+#: ../gdata/services/documents/gdata-documents-service.c:1270
+msgid "You must be authenticated to move documents and folders."
+msgstr ""
+"दस्तावेज़ों और फ़ोल्डर्स को स्थानांतरित करने के लिए आपको सत्यापित करना जरुरी "
+"हैं."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"आप उपयोगकर्ता नाम निर्दिष्ट करें या उपयोगकर्ता के क्वेरी को सत्यापित करें."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:387
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "Query parameter not allowed for albums."
+msgstr "एलबम के लिए क्वेरी पैरामीटर स्वीकार्य नहीं है."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:394
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:455
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"आप उपयोगकर्ता नाम निर्दिष्ट करें या सभी एल्बमों के क्वेरी को सत्यापित करें."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:476
+msgid "The album did not have a feed link."
+msgstr "एलबम के फ़ीड लिंक नहीं है."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:631
+msgid "You must be authenticated to upload a file."
+msgstr "आपको फाइल अपलोड करने के लिए जरूर सत्यापित किया जाना चाहिए."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:707
+msgid "The album has already been inserted."
+msgstr "एल्बम पहले से डाली गई है."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:714
+msgid "You must be authenticated to insert an album."
+msgstr "आपको एल्बम डालने के लिए जरूर सत्यापित किया जाना चाहिए."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:456
+#, c-format
+msgid "This service is not available at the moment."
+msgstr "यह सेवा इस समय उपलब्ध नहीं है."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:460
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "आपको इसे करने के लिए सत्यापित करना जरुरी है."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:465
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"आपने हाल ही में कई एपीआई कॉल किये हैं. कृपया कुछ मिनट रुके और फिर कोशिश करें."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:468
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"आपने अपनी प्रविष्टि कोटा को पार कर लिया है.कृपया कुछ प्रविष्टियों को हटा दें "
+"और फिर "
+"कोशिश करें."
+
+#. Translators: the first parameter is an error code, which is a coded string.
+#. * The second parameter is an error domain, which is another coded string.
+#. * The third parameter is the location of the error, which is either a URI or an XPath.
+#: ../gdata/services/youtube/gdata-youtube-service.c:475
+#: ../gdata/services/youtube/gdata-youtube-service.c:481
+#, c-format
+msgid ""
+"Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+msgstr "अज्ञात त्रुटि कोड \"%s\" डोमेन \"%s\" में स्थान\"%s\" के साथ प्राप्त."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:499
+#, c-format
+msgid "Unknown and unparsable error received."
+msgstr "अज्ञात और गैर-विश्लेषित त्रुटि प्राप्त किया."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:763
+#: ../gdata/services/youtube/gdata-youtube-service.c:820
+msgid "The video did not have a related videos <link>."
+msgstr "विडियो में कोई संबधित वीडियो <link> नहीं है."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:882
+msgid "You must be authenticated to upload a video."
+msgstr "आपको विडियो अपलोड करने के लिए जरूर सत्यापित किया जाना चाहिए."
+
--- /dev/null
+# Croatian translation for libgdata.
+# Copyright (C) 2018 libgdata's COPYRIGHT HOLDER
+# This file is distributed under the same license as the libgdata package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-09-03 09:39+0000\n"
+"PO-Revision-Date: 2019-09-03 18:06+0200\n"
+"Last-Translator: gogo <linux.hr@protonmail.com>\n"
+"Language-Team: Croatian <hr@li.org>\n"
+"Language: hr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"X-Generator: Poedit 2.2.1\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Skupne radnje su nepodržane na ovom uređaju."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "Poslužitelj je vratio pogrešan odgovor."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Nemoguće povezivanje s poslužiteljem usluge."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Nemoguće povezivanje s proxy poslužiteljem."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Neispravan zahtjev URI-ja ili zaglavalja, ili nepodržani nestandardni "
+"parametar: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Potrebna je ovjera: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "Zatraženi resurs nije pronađen: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Unos je promijenjen od kada je preuzet: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Kôd greške %u pri ovjeri: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "CAPTCHA mora biti ispunjena za prijavu."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Račun zahtijeva lozinku određenu aplikacijom. (%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Vaše korisničko ime ili lozinka su netočni."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "Adresa e-pošte vašeg računa nije potvrđena. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Niste pristali na uvjete i odredbe usluge. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Ovaj račun je premješten. Prijavite se putem interneta kako bi primili vaše "
+"novo korisničko ime i lozinku. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Ovaj račun je obrisan. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Ovaj račun je onemogućen. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "Pristup računa ovoj usluzi je onemogućen. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Usluga trenutno nije dostupna. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "Unos ne podržava komentare."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "Komentari se ne mogu dodati ovom unosu."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "Komentar se možda ne može obrisati."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Neispravan zahtjev traženja"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr "Poslužitelj je odbio zahtjev privremenih vjerodajnica."
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "OAuth 1.0 podrška je onemogućena."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "Pristup je odbijen od strane korisnika ili poslužitelja."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Greška XML obrade: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Prazan dokument"
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Greška JSON obrade: %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Najudaljeniji JSON čvor nije objekt."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "%s elementu nedostaje potreban sadržaj."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "Sadržaj %s elementa (‘%s’) nije u ISO 8601 formatu."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "Vrijednost %s svojstva %s elementa (‘%s’) je nepoznata."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "Sadržaj %s elementa (‘%s’) je nepoznat."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Potrebno svojstvo %s elementa (%s) nije prisutno."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Vrijednosti su bile prisutne za svojstvo %s i %s od %s elementa kada je samo "
+"jedan od dvoje dopušten."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Potrebno element (%s) nije prisutan."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Jedan element (%s) je udvostručen."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "‘%s’ elementu nedostaje potreban sadržaj."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "Sadržaj '%s' elementa (‘%s’) nije u ISO 8601 formatu."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Neispravan JSON je primljen s poslužitelja: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr "Sadržaj %s elementa (‘%s’) nije u heksadecimalnom RGB formatu."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Kôd greške %u pri zahtjevu: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Kôd greške %u pri umetanju unosa: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Kôd greške %u pri nadopuni unosa: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Kôd greške %u pri brisanju unosa: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Kôd greške %u pri preuzimanju: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Kôd greške %u pri slanju: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Kôd greške %u pri pokretanju skupnih radnji: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "Neispravno preusmjeravanje URI-ja: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Unos je je već umetnut."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"Greška je primljena s poslužitelja nakon slanja razumnog dijelića slanja."
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Strujanje je već zatvoreno"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Napravili ste previše API poziva nedavno. Pričekajte nekoliko minuta i "
+"pokušajte ponovno."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Morate se ovjeriti kako bi ovo mogli učiniti."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "Morate se ovjeriti kako bi mogli zatražiti sve kalendare."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "Morate se ovjeriti kako bi mogli zatražiti vlastite kalendare."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "Morate se ovjeriti kako bi mogli zatražiti kontakte."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "Morate se ovjeriti kako bi mogli zatražiti grupe kontakata."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "Grupa je već umetnuta."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "Morate se ovjeriti kako bi mogli umetnuti grupu."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "Morate se ovjeriti kako bi mogli preuzeti dokumente."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Nepoznat ili nepodržan format izvoza dokumenta ‘%s’."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "Neispravna vidljivost: neprepoznata vrijednost ‘%s’"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "Morate se ovjeriti kako bi mogli zatražiti dokumente."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "Morate se ovjeriti kako bi mogli poslati dokumente."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "Dokument je već poslan."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "Morate se ovjeriti kako bi mogli nadopuniti dokumente."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr "Vrsta sadržaja isporučenog dokumenta (‘%s’) se ne može prepoznati."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "Morate se ovjeriti kako bi mogli kopirati dokumente."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "Sadržajna mapa nije pronađena"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+"Morate se ovjeriti kako bi mogli umetnuti ili premjestiti dokumente ili mape."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr "Morate se ovjeriti kako bi mogli premjestiti dokumente ili mape."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "Svojstvo ‘%s’ ne sadrži sliku"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Morate navesti korisničko ime ili se ovjeriti kako bi mogli zatražiti "
+"korisnika."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "Parametar zahtjeva nije dopušten za ovaj album."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Morate navesti korisničko ime ili se ovjeriti kako bi mogli zatražiti sve "
+"albume."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "Album nije imao povratnu poveznicu."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "Morate se ovjeriti kako bi mogli poslati datoteku."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "Album je već umetnut."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "Morate se ovjeriti kako bi mogli umetnuti album."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr "Morate se ovjeriti kako bi mogli zatražiti sve popise zadatka."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "Morate se ovjeriti kako bi mogli zatražiti vlastite popise zadatka."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr "Premašili ste ulaznu kvotu. Obrišite neke unose i pokušajte ponovno."
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Vaš Google račun mora biti pridružen YouTube kanalu kako bi se ovo učinilo. "
+"Posjetite %s kako bi stvorili jednog."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Morate se ovjeriti kako bi mogli poslati video snimku."
--- /dev/null
+# Hungarian translation for libgdata.
+# Copyright 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2019 Free Software Foundation, Inc.
+# This file is distributed under the same license as the libgdata package.
+#
+# Gabor Kelemen <kelemeng at gnome dot hu>, 2009, 2010, 2011, 2012, 2013, 2016.
+# Balázs Úr <ur.balazs at fsf dot hu> 2014, 2015, 2019.
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-09-03 09:39+0000\n"
+"PO-Revision-Date: 2019-09-04 13:43+0200\n"
+"Last-Translator: Meskó Balázs <mesko.balazs@fsf.hu>\n"
+"Language-Team: Hungarian <gnome-hu-list at gnome dot org>\n"
+"Language: hu\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 2.2.3\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Ez a szolgáltatás nem támogatja a kötegelt műveleteket."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "A kiszolgáló rosszul formált választ adott vissza."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Nem lehet kapcsolódni a szolgáltatás kiszolgálójához."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Nem lehet kapcsolódni a proxykiszolgálóhoz."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Érvénytelen kérés URI vagy -fejléc, vagy nem támogatott nem szabványos "
+"paraméter: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Hitelesítés szükséges: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "A kért erőforrás nem található: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "A bejegyzés módosítva lett letöltése óta: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "%u hibakód hitelesítés közben: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "A bejelentkezéshez ki kell tölteni a Captchat."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Ez a fiók alkalmazásspecifikus jelszót igényel (%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "A felhasználónév vagy jelszó helytelen."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "A fiók e-mail címe nincs ellenőrizve. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Nem fogadta el a szolgáltatás feltételeit. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Ez a fiók át lett költöztetve. Jelentkezzen be online az új felhasználónév "
+"és jelszó megkapásához. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "A fiókot törölték. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "A fiókot letiltották. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "A fiók hozzáférését ehhez a szolgáltatáshoz letiltották. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Ez a szolgáltatás pillanatnyilag nem érhető el. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "A bejegyzés nem támogatja a hozzászólásokat."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "Nem szólhat hozzá ehhez a bejegyzéshez."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "A hozzászólás nem törölhető."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Érvénytelen keresési kérés"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr ""
+"A kiszolgáló visszautasította az ideiglenes hitelesítési adatokra vonatkozó "
+"kérést."
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "Az OAuth 1.0 támogatás le van tiltva."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "A felhasználó vagy a kiszolgáló megtagadta a hozzáférést."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Hiba az XML feldolgozásakor: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Üres dokumentum."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Hiba a JSON feldolgozásakor: %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "A legkülső JSON csomópont nem objektum."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Egy %s elemből hiányzik a szükséges tartalom."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "Egy %s elem tartalma („%s”) nem ISO 8601 formátumú."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "Egy %s elem %s tulajdonságának tartalma („%s”) ismeretlen."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "Egy %s elem tartalma („%s”) ismeretlen."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Egy %s elem szükséges tulajdonsága (%s) nincs jelen."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Értékek találhatók egy %3$s elem %1$s és %2$s tulajdonságaihoz, de csak az "
+"egyik engedélyezett."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Egy szükséges elem („%s”) nincs jelen."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Egy egyke elem (%s) megkettőzve."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "Egy „%s” elemből hiányzik a szükséges tartalom."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "Egy „%s” elem tartalma („%s”) nem ISO 8601 formátumú."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "A kiszolgálótól érvénytelen JSON érkezett: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr "Egy %s elem tartalma („%s”) nem hexadecimális RGB formátumú."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "%u hibakód lekérdezés közben: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "%u hibakód bejegyzés beszúrása közben: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "%u hibakód bejegyzés frissítése közben: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "%u hibakód bejegyzés törlése közben: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "%u hibakód letöltés közben: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "%u hibakód feltöltés közben: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "%u hibakód csoportos művelet futtatása közben: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "Érvénytelen átirányítási URI: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "A bejegyzés már be van szúrva."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"Hiba érkezett a kiszolgálótól egy folytatható feltöltési darab feltöltése "
+"után."
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Az adatfolyam már le van zárva"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"A közelmúltban túl sok API kérést hajtott végre. Várjon pár percet és "
+"próbálja újra."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Ehhez be kell jelentkeznie."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "Az összes naptár lekérdezéséhez be kell jelentkeznie."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "A saját naptárjainak lekérdezéséhez be kell jelentkeznie."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "A névjegyek lekérdezéséhez be kell jelentkeznie."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "A névjegycsoportok lekérdezéséhez be kell jelentkeznie."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "A csoport már be van szúrva."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "Csoport beszúrásához be kell jelentkeznie."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "Dokumentumok letöltéséhez be kell jelentkeznie."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Ismeretlen vagy nem támogatott dokumentum exportálási formátum: „%s”."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "Érvénytelen láthatóság: felismerhetetlen érték: „%s”"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "Dokumentumok lekéréséhez be kell jelentkeznie."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "Dokumentumok feltöltéséhez be kell jelentkeznie."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "A dokumentum már fel lett töltve."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "Dokumentumok feltöltéséhez be kell jelentkeznie."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr "A megadott dokumentum („%s”) tartalomtípusa nem ismerhető fel."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "Dokumentumok másolásához be kell jelentkeznie."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "A szülőmappa nem található"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+"Dokumentumok és mappák beszúrásához vagy áthelyezéséhez be kell jelentkeznie."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr "Dokumentumok és mappák áthelyezéséhez be kell jelentkeznie."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "A(z) „%s” tulajdonság nem rendelkezik képpel"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Felhasználó lekérdezéséhez meg kell adnia egy felhasználónevet vagy be kell "
+"jelentkeznie."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "A lekérdezés paramétere nem engedélyezett albumokhoz."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Az összes album lekérdezéséhez meg kell adnia egy felhasználónevet vagy be "
+"kell jelentkeznie."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "Az album nem tartalmazott forráshivatkozást."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "Fájl feltöltéséhez be kell jelentkeznie."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "Az album már be van szúrva."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "Album beszúrásához be kell jelentkeznie."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr "Az összes feladatlista lekérdezéséhez be kell jelentkeznie."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "A saját feladatainak lekérdezéséhez be kell jelentkeznie."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Túllépte bejegyzéskvótáját. Töröljön néhány bejegyzést és próbálja újra."
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Ehhez a Google fiókját társítani kell egy YouTube csatornához. A "
+"létrehozásához keresse fel a következő oldalt: %s."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Videó feltöltéséhez be kell jelentkeznie."
--- /dev/null
+# Indonesian translation of libgdata
+# Copyright (C) 2010 THE libgdata'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the libgdata package.
+# Andika Triwidada <andika@gmail.com>, 2010-2013, 2015.
+# Kukuh Syafaat <kukuhsyafaat@gnome.org>, 2017, 2019.
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-09-03 09:39+0000\n"
+"PO-Revision-Date: 2019-09-03 17:51+0700\n"
+"Last-Translator: Kukuh Syafaat <kukuhsyafaat@gnome.org>\n"
+"Language-Team: GNOME Indonesian Translation Team <gnome@i15n.org>\n"
+"Language: id\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 2.2.3\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Operasi batch tak didukung oleh layanan ini."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "Server mengembalikan jawaban yang salah bentuk."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Tak bisa menyambung ke layanan server."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Tak bisa menyambung ke server proksi."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"URI atau header permintaan tak valid, atau parameter tak standar yang tak "
+"didukung: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Perlu autentikasi: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "Sumber daya yang diminta tak ditemukan: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Entri telah diubah semenjak itu diunduh: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Kode galat %u ketika autentikasi: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "Suatu CAPTCHA mesti diisi untuk log masuk."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Akun ini memerlukan sandi spesifik aplikasi. (%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Nama pengguna atau kata sandi Anda salah."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "Alamat surel akun Anda belum diverifikasi. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Anda belum menyetujui syarat dan ketentuan layanan. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Akun ini telah dimigrasi. Silakan log masuk daring untuk menerima nama "
+"pengguna dan kata sandi Anda. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Akun ini telah dihapus. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Akun ini telah dimatikan. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "Akses akun terhadap layanan ini telah dimatikan. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Layanan ini sedang tak tersedia saat ini. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "Entri ini tak mendukung komentar."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "Komentar tak dapat ditambahkan ke entri ini."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "Komentar ini tak boleh dihapus."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Permintaan seek yang tak valid"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr "Server menolak permintaan kredensial sementara."
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "Dukungan OAuth 1.0 dinonaktifkan."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "Akses ditolak oleh pengguna atau server."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Galat mengurai XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Dokumen kosong."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Galat mengurai JSON: %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Node JSON terluar bukan suatu objek."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Suatu elemen %s kehilangan isi yang diperlukan."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "Isi dari suatu elemen %s ('%s') bukan dalam format ISO 8601."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "Nilai properti %s dari suatu elemen %s ('%s') tak diketahui."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "Isi suatu elemen %s ('%s') tak diketahui."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Properti yang diperlukan dari suatu elemen %s (%s) tak ada."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Ada nilai bagi properti %s dan %s dari suatu elemen %s padahal hanya satu "
+"dari dua yang diijinkan."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Suatu elemen yang diperlukan (%s) tak ada."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Elemen singleton (%s) punya duplikat."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "Suatu elemen '%s' kehilangan isi yang diperlukan."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "Isi dari suatu elemen '%s' ('%s') bukan dalam format ISO 8601."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "JSON yang tak valid diterima dari server: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr "Isi dari suatu elemen %s ('%s') bukan dalam bentuk RGB heksadesimal."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Kode galat %u ketika kuiri: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Kode galat %u ketika menyisipkan suatu entri: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Kode galat %u ketika memutakhirkan suatu entri: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Kode galat %u ketika menghapus suatu entri: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Kode galat %u ketika mengunduh: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Kode galat %u ketika mengunggah: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Kode galat %u ketika menjalankan suatu operasi batch: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "URI pengalihan tak valid: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Entri telah pernah disisipkan."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"Galat diterima dari server setelah mengunggah suatu chunk unggah yang dapat "
+"dilanjutkan."
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Stream telah ditutup"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Anda telah membuat terlalu banyak panggilan API baru-baru ini. Silakan "
+"tunggu beberapa menit dan coba lagi."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Anda mesti terautentikasi untuk melakukan ini."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "Anda mesti terautentikasi untuk mengkuiri semua kalender."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "Anda mesti terautentikasi untuk mengkuiri kalendermu sendiri."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "Anda mesti terautentikasi untuk mengkuiri kontak."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "Anda mesti terautentikasi untuk mengkuiri grup kontak."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "Grup telah pernah disisipkan."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "Anda mesti terautentikasi untuk menyisipkan suatu grup."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "Anda mesti terautentikasi untuk mengunduh dokumen."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Format ekspor dokumen '%s' yang tak dikenal atau tak didukung."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "Visibilitas tidak valid: nilai tidak dikenal ‘%s’"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "Anda mesti terautentikasi untuk mengkuiri dokumen."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "Anda mesti terautentikasi untuk mengunggah dokumen."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "Dokumen telah pernah diunggah."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "Anda mesti terautentikasi untuk memutakhirkan dokumen."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr "Jenis isi dari dokumen yang diberikan ('%s') tak bisa dikenali."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "Anda mesti terautentikasi untuk menyalin dokumen."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "Folder induk tidak ditemukan"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+"Anda mesti terautentikasi untuk menyisipkan atau memindah dokumen dan folder."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr "Anda mesti terautentikasi untuk memindah dokumen dan folder."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "Properti '%s' tak menyimpan suatu citra"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Anda mesti menyatakan suatu nama pengguna atau terautentikasi untuk "
+"mengkuiri suatu pengguna."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "Parameter kuiri tak diijinkan bagi album."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Anda mesti menyatakan suatu nama pengguna atau terautentikasi untuk "
+"mengkuiri semua album."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "Album tak memiliki suatu taut feed."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "Anda mesti terautentikasi untuk mengunggah suatu berkas."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "Album telah pernah disisipkan."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "Anda mesti terautentikasi untuk menyisipkan suatu album."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr "Anda mesti terautentikasi untuk mengkuiri semua daftar tugas."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "Anda mesti terautentikasi untuk mengkuiri tugasmu sendiri."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Anda telah melebihi quota entri Anda. Silakan hapus beberapa entri dan coba "
+"lagi."
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Akun Google Anda mesti terasosiasi dengan suatu kanal YouTube untuk "
+"melakukan hal ini. Kunjungi %s untuk membuatnya."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Anda mesti terautentikasi untuk mengunggah suatu video."
+
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "Suatu elemen '%s' kehilangan isi yang diperlukan."
+
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr "Isi dari suatu elemen '%s' (\"%s\") bukan dalam format ISO 8601."
--- /dev/null
+# Italian translation of libgdata.
+# Copyright (C) 2009, 2010, 2011 the libgdata copyright holder
+# Copyright (C) 2012, 2013, 2014, 2015, 2016, 2019 the Free Software Foundation, Inc.
+# This file is distributed under the same license as the libgdata package.
+# Rita Bandiera <rbandiera@email.it>, 2009
+# Milo Casagrande <milo@ubuntu.com>, 2010, 2012, 2013, 2016, 2019.
+# Claudio Arseni <claudio.arseni@ubuntu.com>, 2011, 2013, 2014, 2015.
+# Gianvito Cavasoli <gianvito@gmx.it>, 2016.
+# Daniele Medri <dmedri@gmail.com>, 2019
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ligbdata\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-09-03 09:39+0000\n"
+"PO-Revision-Date: 2019-09-04 11:42+0200\n"
+"Last-Translator: Milo Casagrande <milo@milo.name>\n"
+"Language-Team: Italiano <gnome-it-list@gnome.org>\n"
+"Language: it\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Poedit 2.2.3\n"
+"X-Poedit-SourceCharset: utf-8\n"
+"X-Project-Style: gnome\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr ""
+"Le operazioni sequenziali (batch) non sono supportate da questo servizio."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "Il server ha dato una risposta malformata."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Impossibile collegarsi al server del servizio."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Impossibile collegarsi al server proxy."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"URI o header della richiesta non valido, oppure parametro non standard non "
+"supportato: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Richiesta autenticazione: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "La risorsa richiesta non è stata trovata: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "L'elemento è stato modificato da quando è stato scaricato: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Codice d'errore %u durante l'autenticazione: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "È necessario compilare un CAPTCHA per accedere."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Questo account richiede una password specifica. (%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Nome utente o password non erano esatti."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr ""
+"L'indirizzo di posta elettronica dell'account non è stato verificato. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "I termini e le condizioni del servizio non sono stati accettati. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"L'account è stato migrato. Eseguire l'accesso in rete per ricevere nome "
+"utente e password nuovi. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Questo account è stato eliminato. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Questo account è stato disabilitato. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr ""
+"L'accesso di questo account a questo servizio è stato disabilitato. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Questo servizio non è al momento disponibile. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "Questo elemento non supporta i commenti."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "I commenti non possono essere aggiunti a questo elemento."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "Questo commento non può essere eliminato."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Richiesta temporale non valida"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr "Il server ha respinto la richieste di credenziali temporanee."
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "Supporto OAuth 1.0 disabilitato."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "L'accesso è stato negato dall'utente o dal server."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Errore nell'analizzare l'XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Documento vuoto."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Errore nell'analizzare JSON: %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Il nodo JSON più esterno non è un oggetto."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Un elemento %s era privo del contenuto richiesto."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "Il contenuto di un elemento %s («%s») non era in formato ISO 8601."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "Il valore della proprietà %s di un elemento %s («%s») era sconosciuto."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "Il contenuto di un elemento %s («%s») era sconosciuto."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Una proprietà richiesta di un elemento %s (%s) non era presente."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Erano presenti valori per le proprietà %s e %s di un elemento %s quando solo "
+"una delle due è consentita."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Un elemento richiesto (%s) non era presente."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Un elemento singleton (%s) era duplicato."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "Un elemento %s era privo del contenuto richiesto."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "Il contenuto di un elemento %s («%s») non era in formato ISO 8601."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "È stato ricevuto dal server un JSON non valido: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr ""
+"Il contenuto di un elemento %s («%s») non era in formato RGB esadecimale."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Codice d'errore %u durante l'interrogazione: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Codice d'errore %u durante l'inserimento di un elemento: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Codice d'errore %u durante l'aggiornamento di un elemento: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Codice d'errore %u durante l'eliminazione di un elemento: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Codice d'errore %u durante lo scaricamento: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Codice d'errore %u durante il caricamento: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Codice d'errore %u durante l'esecuzione di un'operazione batch: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "URI di reindirizzo non valido: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "L'elemento è già stato inserito."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"Errore ricevuto dal server dopo il caricamento di un segmento ripristinabile."
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Il flusso è già chiuso"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Sono state fatte troppe chiamate API ultimamente. Attendere qualche minuto e "
+"riprovare."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "È necessario autenticarsi per fare questa azione."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "È necessario autenticarsi per interrogare tutti i calendari."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "È necessario autenticarsi per interrogare i propri calendari."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "È necessario autenticarsi per interrogare i contatti."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "È necessario autenticarsi per interrogare i gruppi di contatti."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "Il gruppo è già stato inserito."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "È necessario autenticarsi per inserire un gruppo."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "È necessario autenticarsi per scaricare i documenti."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Formato di esportazione «%s» sconosciuto o non supportato."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "Visibilità non valida: valore «%s» non riconosciuto."
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "È necessario autenticarsi per interrogare i documenti."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "È necessario autenticarsi per caricare i documenti."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "Il documento è già stato caricato."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "È necessario autenticarsi per aggiornare i documenti."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr ""
+"Il tipo di contenuto del documento fornito («%s») non può essere "
+"riconosciuto."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "È necessario autenticarsi per copiare i documenti."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "Cartella superiore non trovata"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+"È necessario autenticarsi per inserire o spostare documenti e cartelle."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr "È necessario autenticarsi per spostare documenti e cartelle."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "La proprietà «%s» non contiene un'immagine"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"È necessario specificare un nome utente o autenticarsi per interrogare un "
+"utente."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "Parametro dell'interrogazione non consentito per gli album."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"È necessario specificare un nome utente o autenticarsi per interrogare tutti "
+"gli album."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "L'album non aveva un collegamento feed."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "È necessario autenticarsi per caricare un file."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "L'album è già stato inserito."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "È necessario autenticarsi per inserire un album."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr "È necessario autenticarsi per interrogare tutti gli elenchi attività."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "È necessario autenticarsi per interrogare le proprie attività."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"La quota degli elementi è stata superata. Eliminare qualche elemento e "
+"riprovare."
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"L'account Google deve essere associato a un canale YouTube per completare "
+"questa azione. Visitare %s per crearne uno."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "È necessario autenticarsi per caricare un video."
--- /dev/null
+# libgdata ja.po.
+# Copyright (C) 2009-2010, 2013, 2020 Free Software Foundation, Inc.
+# This file is distributed under the same license as the libgdata package.
+# Takeshi AIHANA <takeshi.aihana@gmail.com>, 2009.
+# Nishio Futoshi <futoshi@momonga-linux.org>, 2009.
+# Takayuki KUSANO <AE5T-KSN@asahi-net.or.jp>, 2010.
+# Jiro Matsuzawa <jmatsuzawa@gnome.org>, 2013.
+# sicklylife <translation@sicklylife.jp>, 2020.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-09-25 10:37+0000\n"
+"PO-Revision-Date: 2020-01-28 21:00+0900\n"
+"Last-Translator: sicklylife <translation@sicklylife.jp>\n"
+"Language-Team: Japanese <gnome-translation@gnome.gr.jp>\n"
+"Language: ja\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "このサービスはバッチ処理をサポートしていません。"
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "サーバーがおかしな応答を返してきました。"
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "このサービスのサーバーに接続できません。"
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "プロキシサーバーに接続できません。"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"不正な URI またはヘッダー、またはサポートされていない非標準なパラメーター: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "認証が必要です: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "要求したリソースが見つかりませんでした: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "その項目は、ダウンロード後に変更が加えられています: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "認証エラー (コード %u): %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "ログインするには CAPTCHA の内容を入力してください。"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "このアカウントにはアプリケーション固有のパスワードが必要です。(%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "ユーザー名またはパスワードが違います。"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "アカウントのメールアドレスを照合できませんでした。(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "サービスの利用条件に同意していません。(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"このアカウントは移行されました。オンライン上でサインインして新しいユーザー名"
+"とパスワードを受け取ってください。(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "このアカウントはすでに削除されています。(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "このアカウントは無効になっています。(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "このアカウントを使用したサービスへのアクセスは無効になっています。(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "しばらくの間、このサービスは利用できません。(%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "この項目ではコメントをサポートしていません。"
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "この項目にはコメントを追加できません。"
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "このコメントは削除できません。"
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "不正なシーク要求"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr "サーバーは資格情報の要求を一時的に拒否しています。"
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "OAuth 1.0 サポートが無効になっています。"
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "ユーザーまたはサーバーによりアクセスが拒否されました。"
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "XMLの解析エラー: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "空のドキュメント。"
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "JSON の解析エラー: %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "最も外側の JSON ノードはオブジェクトではありません。"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "%s 要素は、必須の内容が足りません。"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "%s 要素の内容 (‘%s’) は ISO 8601 の書式ではありません。"
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "%2$s 要素の %1$s 属性 (‘%3$s’) を解析できませんでした。"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "%s 要素の内容 (‘%s’) を解析できませんでした。"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "%s 要素の必須属性 (%s) が見つかりませんでした。"
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"プロパティ %s 及び %s の値が %s 要素に存在しましたが、許可されているのはどち"
+"らか片方だけです。"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "必須要素 (%s) が存在しません。"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "シングルトンであるべき要素 (%s) が重複していました。"
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "‘%s’要素は、必須の内容が足りません。"
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "‘%s’要素の内容 (‘%s’) は、ISO 8601 の書式ではありません。"
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "不正な JSON をサーバーから受け取りました: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr "%s 要素の内容 (‘%s’) が 16 進表記の RGB データではありません。"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "問い合わせエラー (コード %u): %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "エントリの挿入エラー (コード %u): %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "エントリの更新エラー (コード %u): %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "エントリの削除エラー (コード %u): %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "ダウンロードエラー (コード %u): %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "アップロードエラー (コード %u): %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "バッチ処理実行エラー (コード %u): %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "リダイレクト先の URI が間違っています: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "すでにそのエントリは挿入済みです。"
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"レジュームに対応したアップロードの実行後にサーバーからエラーを受け取りまし"
+"た。"
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "ストリームはすでに閉じられています"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr "API 呼び出しが多すぎます。数分待ってから再試行してください。"
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "この処理を実行するには認証が必要です。"
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "すべてのカレンダーにアクセスするには認証が必要です。"
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "自分のカレンダーにアクセスするには認証が必要です。"
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "連絡先にアクセスするには認証が必要です。"
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "連絡先グループにアクセスするには認証が必要です。"
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "すでにそのグループは挿入済みです。"
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "グループを挿入するには認証が必要です。"
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "ドキュメントをダウンロードするには認証が必要です。"
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "‘%s’は不正なエクスポート形式です。"
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "不正な可視性: ‘%s’は認識できない値です"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "ドキュメントにアクセスするには認証が必要です。"
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "ドキュメントをアップロードするには認証が必要です。"
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "そのドキュメントはすでにアップロードされています。"
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "ドキュメントを更新するには認証が必要です。"
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr ""
+"提供されたドキュメントの Content-Type (‘%s’) を認識できませんでした。"
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "ドキュメントをコピーするには認証が必要です。"
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "親フォルダーが見つかりませんでした"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr "ドキュメントやフォルダーを挿入したり移動したりするには認証が必要です。"
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr "ドキュメントやフォルダーを移動するには認証が必要です。"
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr ""
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"ユーザーを問い合わせるにはユーザー名を指定するか、または認証が必要です。"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "アルバムに対する問い合わせでは引数を指定できません。"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"すべてのアルバムにアクセスするにはユーザー名を指定するか、または認証が必要です。"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "そのアルバムにはフィードのリンクが含まれていませんでした。"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "ファイルをアップロードするには認証が必要です。"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "そのアルバムはすでに挿入済みです。"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "アルバムを挿入するには認証が必要です。"
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr "すべてのタスクリストにアクセスするには認証が必要です。"
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "自分のタスクにアクセスするには認証が必要です。"
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr "容量が超過しています。何か削除してから再試行してください。"
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"これを行うには、この Google アカウントを YouTube チャンネルと結びつける必要が"
+"あります。%s にアクセスしてアカウントを作成してください。"
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "動画をアップロードするには認証が必要です。"
+
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "%s要素は、必須の内容が足りません。"
+
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr "%s要素の内容(\"%s\")は、ISO 8601の書式ではありません。"
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "そのカレンダーには内容の URI はありませんでした。"
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "しばらくの間、このサービスは利用できません。"
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr "不明なエラー: code は\"%s\"、domainは\"%s\"、locationは\"%s\"。"
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "不明で解析できないエラーを受け取りました。"
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "その動画には、関連する動画の<link>要素がありません。"
+
+#~ msgid "The supplied document had an invalid content type."
+#~ msgstr "提供したドキュメントの Content-Type が間違っています。"
--- /dev/null
+# Kannada translation for libgdata.
+# Copyright (C) 2011 libgdata's COPYRIGHT HOLDER
+# This file is distributed under the same license as the libgdata package.
+#
+# Shankar Prasad <svenkate@redhat.com>, 2011.
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=libgdata&keywords=I18N+L10N&component=general\n"
+"POT-Creation-Date: 2011-07-10 11:51+0000\n"
+"PO-Revision-Date: 2011-08-24 13:56+0530\n"
+"Last-Translator: Shankar Prasad <svenkate@redhat.com>\n"
+"Language-Team: Kannada <kn@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: kn\n"
+"X-Generator: Lokalize 1.2\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+
+#: ../gdata/gdata-client-login-authorizer.c:575
+#: ../gdata/gdata-oauth1-authorizer.c:770
+#: ../gdata/gdata-oauth1-authorizer.c:1029
+msgid "The server returned a malformed response."
+msgstr ""
+
+#: ../gdata/gdata-client-login-authorizer.c:595 ../gdata/gdata-service.c:316
+#, c-format
+msgid "Cannot connect to the service's server."
+msgstr "ಸೇವೆಯ ಪರಿಚಾರಕದೊಂದಿಗೆ ಸಂಪರ್ಕ ಸಾಧಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ."
+
+#: ../gdata/gdata-client-login-authorizer.c:600 ../gdata/gdata-service.c:321
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "ಪ್ರಾಕ್ಸಿ ಪರಿಚಾರಕದೊಂದಿಗೆ ಸಂಪರ್ಕ ಸಾಧಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ."
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:606 ../gdata/gdata-service.c:327
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:612 ../gdata/gdata-service.c:333
+#, c-format
+msgid "Authentication required: %s"
+msgstr "ದೃಢೀಕರಣದ ಅಗತ್ಯವಿದೆ: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:617 ../gdata/gdata-service.c:338
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "ಮನವಿ ಸಲ್ಲಿಸಲಾದ ಸಂಪನ್ಮೂಲವು ಕಂಡುಬಂದಿಲ್ಲ: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:623 ../gdata/gdata-service.c:344
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "ಡೌನ್ಲೋಡ್ ಮಾಡಿದ ನಂತರ ನಮೂದನ್ನು ಬದಲಾಯಿಸಲಾಗಿದೆ: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:635 ../gdata/gdata-service.c:358
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "ದೃಢೀಕರಿಸುವಾಗ %u ಎಂಬ ದೋಷ ಸಂಕೇತವು ಎದುರಾಗಿದೆ: %s"
+
+#: ../gdata/gdata-client-login-authorizer.c:728
+msgid "A CAPTCHA must be filled out to log in."
+msgstr ""
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:766
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr ""
+
+#: ../gdata/gdata-client-login-authorizer.c:773
+msgid "Your username or password were incorrect."
+msgstr "ನಿಮ್ಮ ಬಳಕೆದಾರಹೆಸರು ಅಥವ ಗುಪ್ತಪದ ಸರಿಯಾಗಿಲ್ಲ."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:794
+#, c-format
+msgid "Your account's e-mail address has not been verified. (%s)"
+msgstr ""
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:799
+#, c-format
+msgid "You have not agreed to the service's terms and conditions. (%s)"
+msgstr ""
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:805
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:810
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "ಈ ಖಾತೆಯನ್ನು ಅಳಿಸಲಾಗಿದೆ. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:815
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "ಈ ಖಾತೆಯನ್ನು ಅಶಕ್ತಗೊಳಿಸಲಾಗಿದೆ. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:820
+#, c-format
+msgid "This account's access to this service has been disabled. (%s)"
+msgstr ""
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:825
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr ""
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:262
+msgid "This entry does not support comments."
+msgstr ""
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#: ../gdata/gdata-commentable.c:349 ../gdata/gdata-commentable.c:435
+msgid "Comments may not be added to this entry."
+msgstr ""
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:518 ../gdata/gdata-commentable.c:594
+msgid "This comment may not be deleted."
+msgstr ""
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:751
+msgid "Invalid seek request"
+msgstr ""
+
+#: ../gdata/gdata-oauth1-authorizer.c:745
+msgid "The server rejected the temporary credentials request."
+msgstr ""
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1007
+msgid "Access was denied by the user or server."
+msgstr ""
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:245 ../gdata/gdata-parsable.c:256
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "XML ಅನ್ನು ಪಾರ್ಸ್ ಮಾಡುವಲ್ಲಿ ದೋಷ: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:258
+msgid "Empty document."
+msgstr "ಖಾಲಿ ದಸ್ತಾವೇಜು."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:66
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "%s ಘಟಕದಲ್ಲಿ ಅಗತ್ಯವಿರುವ ಅಂಶವು ಕಾಣೆಯಾಗಿದೆ."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:82
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+msgstr ""
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element ("00:01:42.500") was unknown.
+#: ../gdata/gdata-parser.c:102
+#, c-format
+msgid "The value of the %s property of a %s element (\"%s\") was unknown."
+msgstr ""
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element ("protected") was unknown.
+#: ../gdata/gdata-parser.c:120
+#, c-format
+msgid "The content of a %s element (\"%s\") was unknown."
+msgstr ""
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:140
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr ""
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:163
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:182
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr ""
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#: ../gdata/gdata-parser.c:197
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr ""
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:364
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "ಮನವಿ ಸಲ್ಲಿಸುವಾಗ %u ಎಂಬ ದೋಷ ಸಂಕೇತವು ಎದುರಾಗಿದೆ: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:370
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr ""
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:376
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr ""
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:382
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr ""
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:388
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr ""
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:394
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr ""
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:400
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr ""
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:674
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr ""
+
+#: ../gdata/gdata-service.c:1325
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:624
+#: ../gdata/services/youtube/gdata-youtube-service.c:836
+msgid "The entry has already been inserted."
+msgstr ""
+
+#: ../gdata/gdata-upload-stream.c:785
+msgid "Stream is already closed"
+msgstr "ಸ್ಟ್ರೀಮ್ ಅನ್ನು ಮುಚ್ಚಲಾಗಿದೆ"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element ("00FG56") was not in hexadecimal RGB format.
+#: ../gdata/services/calendar/gdata-calendar-calendar.c:406
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in hexadecimal RGB format."
+msgstr ""
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:315
+#: ../gdata/services/calendar/gdata-calendar-service.c:366
+msgid "You must be authenticated to query all calendars."
+msgstr ""
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:412
+#: ../gdata/services/calendar/gdata-calendar-service.c:463
+#: ../gdata/services/calendar/gdata-calendar-service.c:508
+#: ../gdata/services/calendar/gdata-calendar-service.c:568
+msgid "You must be authenticated to query your own calendars."
+msgstr ""
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:517
+#: ../gdata/services/calendar/gdata-calendar-service.c:581
+msgid "The calendar did not have a content URI."
+msgstr ""
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:308
+msgid "You must be authenticated to query contacts."
+msgstr ""
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:424
+#: ../gdata/services/contacts/gdata-contacts-service.c:474
+msgid "You must be authenticated to query contact groups."
+msgstr ""
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:514
+msgid "The group has already been inserted."
+msgstr ""
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:521
+msgid "You must be authenticated to insert a group."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-document.c:274
+msgid "You must be authenticated to download documents."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-service.c:357
+#: ../gdata/services/documents/gdata-documents-service.c:412
+msgid "You must be authenticated to query documents."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-service.c:491
+msgid "You must be authenticated to upload documents."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-service.c:497
+msgid "The document has already been uploaded."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-service.c:552
+msgid "You must be authenticated to update documents."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-service.c:615
+#, c-format
+msgid ""
+"The content type of the supplied document ('%s') could not be recognized."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-service.c:664
+#: ../gdata/services/documents/gdata-documents-service.c:849
+msgid "You must be authenticated to move documents and folders."
+msgstr ""
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:387
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "Query parameter not allowed for albums."
+msgstr ""
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:394
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:455
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:476
+msgid "The album did not have a feed link."
+msgstr ""
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:631
+msgid "You must be authenticated to upload a file."
+msgstr ""
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:707
+msgid "The album has already been inserted."
+msgstr ""
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:714
+msgid "You must be authenticated to insert an album."
+msgstr ""
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:417
+#, c-format
+msgid "This service is not available at the moment."
+msgstr ""
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:421
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr ""
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:426
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:429
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+
+#. Translators: the first parameter is an error code, which is a coded string.
+#. * The second parameter is an error domain, which is another coded string.
+#. * The third parameter is the location of the error, which is either a URI or an XPath.
+#: ../gdata/services/youtube/gdata-youtube-service.c:436
+#: ../gdata/services/youtube/gdata-youtube-service.c:442
+#, c-format
+msgid ""
+"Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+msgstr ""
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:460
+#, c-format
+msgid "Unknown and unparsable error received."
+msgstr ""
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:724
+#: ../gdata/services/youtube/gdata-youtube-service.c:781
+msgid "The video did not have a related videos <link>."
+msgstr ""
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:843
+msgid "You must be authenticated to upload a video."
+msgstr ""
+
--- /dev/null
+# Korean translation for libgdata.
+# Copyright (C) 2011 libgdata's COPYRIGHT HOLDER
+# This file is distributed under the same license as the libgdata package.
+#
+# Changwoo Ryu <cwryu@debian.org>, 2011-2017, 2019.
+#
+#
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-09-03 09:39+0000\n"
+"PO-Revision-Date: 2019-09-05 17:14+0900\n"
+"Last-Translator: Changwoo Ryu <cwryu@debian.org>\n"
+"Language-Team: Korean <gnome-kr@googlegroups.com>\n"
+"Language: ko\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "이 서비스에서는 일괄 작업을 지원하지 않습니다."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "서버의 응답 형식이 잘못되었습니다."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "서비스 서버에 연결할 수 없습니다."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "프록시 서버에 연결할 수 없습니다."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"URI나 헤더가 올바르지 않거나, 지원하지 않는 표준에서 벗어난 파라미터입니다: "
+"%s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "인증이 필요합니다: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "요청한 리소스가 없습니다: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "해당 항목은 다운로드한 후에 수정되었습니다.: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "인증할 때 오류 코드 %u번: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "로그인하려면 CAPTCHA를 작성해야 합니다."
+
+# 구글 비밀번호를 말하는 것이므로 비밀번호라고 번역
+# 구글 애플리케이션을 말하는 것이므로 애플리케이션이라고 번역
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "이 계정은 애플리케이션별 비밀번호가 필요합니다. (%s)"
+
+# 구글 비밀번호를 말하는 것이므로 비밀번호라고 번역
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "사용자 이름과 비밀번호가 틀렸습니다."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "계정의 전자메일 주소를 확인하지 못했습니다. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "서비스 약관에 동의하지 않았습니다. (%s)"
+
+# 구글 비밀번호를 말하는 것이므로 비밀번호라고 번역
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"계정을 옮겨졌습니다. 사용자 이름과 비밀번호를 새로 받으려면 온라인에서 로그인"
+"하십시오. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "이 계정은 삭제되었습니다. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "이 계정은 제한되었습니다. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "이 계정의 이 서비스 접근이 제한되었습니다. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "현재 서비스를 사용할 수 없습니다. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "이 항목은 댓글을 지원하지 않습니다."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "이 항목에는 댓글을 추가할 수 없습니다."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "이 댓글은 삭제할 수 없습니다."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "잘못된 seek 요청"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr "서버에서 임시 비밀글 요청을 거부했습니다."
+
+# 빌드에서 OAuth 1.0 빠졌을 때
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "OAuth 1.0 지원 기능이 빠져 있습니다."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "사용자나 서버가 접근을 거부했습니다."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "XML 파싱에 오류: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "빈 문서입니다."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "JSON 파싱에 오류: %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "가장 바깥의 JSON 노드가 오브젝트가 아닙니다."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "%s 엘리먼트에 필요한 내용이 없습니다."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "%s 엘리먼트의 내용이 (‘%s’) ISO 8601 형식이 아닙니다."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "%s 프로퍼티의 (%s 엘리먼트) 값을 (‘%s’) 알 수 없습니다."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "%s 엘리먼트의 내용을 (‘%s’) 알 수 없습니다."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "%s 엘리먼트의 필요한 프로퍼티가(%s) 없습니다."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"%s 및 %s 프로퍼티가 모두 %s 엘리먼트에 있습니다. 둘 중의 하나만 들어 있을 수 "
+"있습니다."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "필요한 엘리먼트가(%s) 없습니다."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "하나만 쓸 수 있는 엘리먼트가(%s) 중복되었습니다."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "‘%s’ 엘리먼트에 필요한 내용이 없습니다."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "‘%s’ 엘리먼트의 내용이 (‘%s’) ISO 8601 형식이 아닙니다."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "서버에서 잘못된 JSON을 받았습니다: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr "%s 엘리먼트의 내용이 (‘%s’) RGB 16진수 형식이 아닙니다."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "질의할 때 오류 코드 %u번: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "항목을 추가할 때 오류 코드 %u번: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "항목을 업데이트할 때 오류 코드 %u번: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "항목을 삭제할 때 오류 코드 %u번: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "다운로드할 때 오류 코드 %u번: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "업로드할 때 오류 코드 %u번: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "일괄 작업을 실행할 때 오류 코드 %u번: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "리다이렉트 URI이 올바르지 않습니다: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "해당 항목을 이미 추가했습니다."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"재시작 가능한 업로드 청크를 업로드한 후 서버에서 오류 메시지를 받았습니다."
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "스트림을 이미 닫았습니다"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr "최근에 API 호출을 너무 많이 했습니다. 몇 분 뒤에 다시 시도하십시오."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "이 일을 하려면 인증해야 합니다."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "모든 달력을 요청하려면 인증해야 합니다."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "자기 달력을 요청하려면 인증해야 합니다."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "연락처를 요청하려면 인증해야 합니다."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "연락처 그룹을 요청하려면 인증해야 합니다."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "해당 그룹을 이미 추가했습니다."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "그룹을 추가하려면 인증해야 합니다."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "문서를 다운로드하려면 인증해야 합니다."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "알 수 없거나 지원하지 않는 문서 내보내기 형식 '%s'."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "가시성 설정이 잘못되었습니다: 알 수 없는 값 ‘%s’"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "문서를 요청하려면 인증해야 합니다."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "문서를 업로드하려면 인증해야 합니다."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "문서를 이미 업로드했습니다."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "문서를 업데이트하려면 인증해야 합니다."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr "제공한 문서의 content type이 (‘%s’) 알 수 없는 형식입니다."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "문서를 복사하려면 인증해야 합니다."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "상위 폴더가 없습니다"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr "문서와 폴더를 넣거나 옮기려면 인증해야 합니다."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr "문서와 폴더를 옮기려면 인증해야 합니다."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "‘%s’ 속성에는 그림이 들어 있지 않습니다"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr "사용자를 요청하려면 사용자 이름을 지정하거나 인증해야 합니다."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "앨범에 대해 요청 파라미터를 허용하지 않습니다."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr "앨범을 요청하려면 사용자 이름을 지정하거나 인증해야 합니다."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "앨범에 피드 링크가 없습니다."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "파일을 업로드하려면 인증해야 합니다."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "해당 앨범을 이미 추가했습니다."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "앨범을 추가하려면 인증해야 합니다."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr "모든 작업 목록을 요청하려면 인증해야 합니다."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "자기 작업을 요청하려면 인증해야 합니다."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr "항목의 제한을 초과했습니다. 지운 다음 다시 시도하십시오."
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"구글 계정을 유튜브 채널과 연결해야 합니다. 유튜브 채널을 만드려면 %s 사이트"
+"를 보십시오."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "영상을 업로드하려면 인증해야 합니다."
--- /dev/null
+# Lithuanian translation for libgdata.
+# Copyright (C) 2010 libgdata's COPYRIGHT HOLDER
+# This file is distributed under the same license as the libgdata package.
+# Žygimantas Beručka <zygis@gnome.org>, 2011.
+# Aurimas Černius <aurisc4@gmail.com>, 2010-2019.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-09-03 09:39+0000\n"
+"PO-Revision-Date: 2019-09-11 22:38+0300\n"
+"Last-Translator: Aurimas Černius <aurisc4@gmail.com>\n"
+"Language-Team: Lietuvių <gnome-lt@lists.akl.lt>\n"
+"Language: lt\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n"
+"%100<10 || n%100>=20) ? 1 : 2)\n"
+"X-Generator: Gtranslator 3.32.1\n"
+"X-Project-Style: gnome\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Ši tarnyba nepalaiko masinių veiksmų."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "Serveris grąžino netinkamai suformuotą atsakymą."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Nepavyko prisijungti prie paslaugos serverio."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Nepavyko prisijungti prie proxy serverio."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Netinkama užklausos URI, antraštė arba nepalaikomas nestandartinis "
+"parametras: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Reikia patvirtinti tapatybę: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "Užklaustas išteklius nerastas: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Įrašas nuo tada, kai buvo atsiųstas, buvo pakeistas: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Tapatybės patvirtinimo metu grąžintas klaidos kodas %u: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "Norint prisijungti, reikia įrašyti CAPTCHA."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Ši paskyra reikalauja konkrečios programos slaptažodžio. (%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Neteisingas naudotojo vardas arba slaptažodis."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "Jūsų paskyros el. pašto adresas nebuvo patikrintas. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Jūs nesutikote su paslaugos naudojimo sąlygomis. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Ši paskyra buvo perkelta. Prisijunkite internetu naujam naudotojo vardui ir "
+"slaptažodžiui gauti. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Ši paskyra buvo ištrinti. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Ši paskyra buvo uždrausta. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "Šiai paskyrai prieiga prie paslaugos buvo išjungta. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Ši paslauga šiuo metu nepasiekiama. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "Įrašas nepalaiko komentarų."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "Negalima pridėti komentarų šiam įrašui."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "Šis komentaras negali būti ištrintas."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Netinkama paieškos užklausa"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr "Serveris atmetė laikinos akreditacijos užklausą."
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "OAuth 1.0 palaikymas yra išjungtas."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "Prieiga buvo uždrausta naudotojo arba serverio."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Klaida skaitant XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Tuščias dokumentas"
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Klaida skaitant JSON: %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Išorinė JSON viršūnė nėra objektas."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Elementui %s trūksta privalomo turinio."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "Elemento %s turinys („%s“) yra ne ISO 8601 formato."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "Savybės %s elemente %s reikšmė („%s“) nežinoma."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "Elemento %s turinys („%s“) nežinomas."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Elemento %s privaloma savybė (%s) nerasta."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Reikšmės savybėms %s ir %s elemente %s pateiktos abiems, nors leidžiama tik "
+"viena iš dviejų."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Privalomas elementas (%s) nerastas."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Vienetinis elementas (%s) buvo dubliuotas."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "Elementui %s trūksta privalomo turinio."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "Elemento %s turinys („%s“) yra ne ISO 8601 formato."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Iš serverio gauti netinkami JSON duomenys: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr "Elemento %s turinys („%s“) ne šešioliktainio RGB formato."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Užklausos klaidos kodas %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Įrašo įterpimo klaidos kodas %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Įrašo atnaujinimo klaidos kodas %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Įrašo trynimo klaidos kodas %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Atsisiuntimo klaidos kodas %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Nusiuntimo klaidos kodas %u: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Klaidos kodas %u vykdant masinę operacija: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "Netinkamas nukreipimo URI: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Įrašas buvo įterptas."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr "Iš serverio gauta klaida po pratęsiamo įkėlimo dalies nusiuntimo."
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Srautas jau užvertas"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Jūs neseniai padarėte per daug API kreipinių. Palaukite keletą minučių ir "
+"bandykite vėl."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Turite prisijungti šio veiksmo atlikimui."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "Turite prisijungti, jei norite peržiūrėti visus kalendorius."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "Turite prisijungti, jei norite peržiūrėti savo kalendorius."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "Turite prisijungti, jei norite peržiūrėti kontaktus."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "Turite prisijungti, jei norite peržiūrėti adresatų grupes."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "Grupė jau įterpta."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "Turite prisijungti, jei norite įterpti grupę."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "Turite prisijungti, jei norite atsisiųsti dokumentus."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Nežinomas ar nepalaikomas dokumento eksporto formatas „%s“."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "Netinkamas matomumas: neatpažinta vertė „%s“"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "Turite prisijungti, jei norite peržiūrėti dokumentus."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "Turite prisijungti, jei norite nusiųsti dokumentus."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "Dokumentas jau nusiųstas."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "Turite prisijungti, jei norite atnaujinti dokumentus."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr "Pateikto dokumento turinio tipas („%s“) neatpažintas."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "Turite prisijungti, jei norite kopijuoti dokumentus."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "Tėvinis aplankas nerastas"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+"Turite prisijungti, jei norite įterpti ar perkelti dokumentus ir aplankus."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr "Turite prisijungti, jei norite perkelti dokumentus ir aplankus."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "Savybėje „%s“ nėra paveikslėlio"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Turite nurodyti naudotojo vartą arba būti prisijungęs, norėdami peržiūrėti "
+"naudotoją."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "Užklausos parametras neleidžiamas albumams."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Turite nurodyti naudotojo vardą arba būti prisijungęs, norėdami peržiūrėti "
+"albumus."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "Albumas neturi atgalinio ryšio saito."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "Turite prisijungti, jei norite nusiųsti failą."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "Albumas jau įterptas."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "Turite prisijungti, jei norite įterpti albumą."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr "Turite prisijungti, jei norite peržiūrėti visus užduočių sąrašus."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "Turite prisijungti, jei norite peržiūrėti savo užduotis."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Jūs perkopėte savo įrašų kvotą. Ištrinkite keletą įrašų ir bandykite vėl."
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Šiam veiksmui atlikti jūsų Google paskyra turi būti susieta su YouTube "
+"kanalu. Apsilankykite %s sukūrimui."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Turite prisijungti, jei norite nusiųsti vaizdo įrašą."
+
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "Elementui „%s“ trūksta privalomo turinio."
+
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr "Elemento „%s“ turinys („%s“) yra ne ISO 8601 formato."
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "Kalendorius neturi turinio URI."
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "Ši paslauga šiuo metu nepasiekiama."
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr "Nežinomas klaidos kodas „%s“ srityje „%s“, vietoje „%s“."
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "Gauta nežinoma ir neperskaitoma klaida."
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "Vaizdos įrašas neturi susijusių vaizdo įrašų <link>."
--- /dev/null
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+#
+# Rudolfs <rudolfs.mazurs@gmail.com>, 2011.
+# Rūdofls Mazurs <rudolfs.mazurs@gmail.com>, 2011.
+# Rūdolfs Mazurs <rudolfs.mazurs@gmail.com>, 2012, 2013, 2014, 2015, 2016, 2019, 2020.
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2020-04-03 17:00+0000\n"
+"PO-Revision-Date: 2020-04-04 18:31+0300\n"
+"Last-Translator: Rūdolfs Mazurs <rudolfs.mazurs@gmail.com>\n"
+"Language-Team: Latvian <lata-l10n@googlegroups.com>\n"
+"Language: lv\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Lokalize 19.12.3\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 :"
+" 2);\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Šis pakalpojums neatbalsta pakešu darbības."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "Serveris atgrieza slikti formatētu atbildi."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Nevar savienoties ar servisa serveri."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Nevar savienoties ar starpniekserveri."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Nederīgs pieprasītais URI vai galvene, vai neatbalstīts nestandarta "
+"parametrs — %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Nepieciešama autentifikācija — %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "Pieprasītais resurs netika atrasts — %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Ieraksts ir mainījies kopš tas tika lejupielādēts — %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Kļūdas kods %u, kad autentificējas — %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "Lai pieteiktos, jāaizpilda CAPTCHA."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Šim kontam vajag lietotnei specifisku paroli. (%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Jūsu lietotājvārds un parole ir nepareizi."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "Jūsu konta e-pasta adrese nav pārbaudīta. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Jūs neesat piekritis pakalpojuma nosacījumiem. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Konts tika pārcelts. Lūdzu, piesakieties tiešsaistē, lai saņemtu savu jauno "
+"lietotājvārdu un paroli. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Kons tika izdzēsts. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Konts tika deaktivēts. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "Šī konta piekļuve pakalpojumam tika deaktivēta. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Pašlaik pakalpojums nav pieejams. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "Šis ieraksts neatbalsta komentārus."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "Šim ierakstam nevar pievienot komentārus."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "Šo komentāru nevar dzēst."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Nederīgs meklēšanas pieprasījums"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr "Serveris noraidīja pagaidu akreditācijas pieprasījumu."
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "OAuth 1.0 atbalsts ir izslēgts."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "Pieeju liedza lietotājs vai serveris."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Kļūda, apstrādājot XML — %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Tukšs dokuments."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Kļūda, apstrādājot JSON — %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Ārējais JSON mezgls nav objekts."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "%s elementam nebija vajadzīgā satura."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "%s elementa saturs (“%s”) nebija ISO 8601 formātā."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "%s īpašības vērtība %s elementam (“%s”) ir nezināma."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "%s elementa saturs (“%s”) ir nezināms."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "%s elementa nepieciešamā īpašība (%s) nebija uz vietas."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Vērtības bija klāt esošas īpašībām %s un %s elementam %s, bet tikai vien no "
+"divām ir atļauta."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Nepieciešamais elements (%s) nebija klātesošs."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Vienpatīgs elements (%s) tika dublēts."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "“%s” elementam nebija vajadzīgā satura."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "“%s” elementa saturs (“%s”) nebija ISO 8601 formātā."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "No servera saņēma nederīgu JSON — %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr "%s elementa saturs (“%s”) nav heksadecimālā RGB formātā."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Kļūdas kods %u, kad vaicā — %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Kļūdas kods %u, kad ievieto vaicājumu — %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Kļūdas kods %u, kad atjaunina ierakstu — %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Kļūdas kods %u, kad dzēš ierakstu — %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Kļūdas kods %u, kad lejupielādē — %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Kļūdas kods %u, kad augšupielādē — %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Kļūdas kods %u, kad izpilda paketes darbību — %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "Nederīgs pāradresēšanas URI — %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Ieraksts jau tika ievietots."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"No servera saņemts kļūdas ziņojums pēc turpināma augšupielādes fragmenta "
+"augšupielādēšanas."
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Plūsma jau ir aizvērta"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Jūs pēdējā laikā esat veicis pārāk daudz API izsaukumu. Lūdzu, pagaidiet "
+"pāris minūtes un mēģiniet vēlreiz."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Jums jāautentificējas, lai to izdarītu."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "Jums jāautentificējas, lai vaicātu visus kalendārus."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "Jums jāautentificējas, lai vaicātu savus kalendārus."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "Jums jāautentificējas, lai vaicātu kontaktus."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "Jums jāautentificējas, lai vaicātu kontaktu grupas."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "Grupa jau ir ievietota."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "Jums jāautentificējas, lai ievietotu grupu."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "Jums jāautentificējas, lai lejupielādētu dokumentus."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Nezināms vai neatbalstīts dokumenta eksportēšanas formāts “%s”."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "Nederīga redzamība: neatpazīta vērtība “%s”"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "Jums jāautentificējas, lai vaicātu dokumentus."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "Jums jāautentificējas, lai augšupielādētu dokumentus."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "Dokuments jau ir augšupielādēts."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "Jums jāautentificējas, lai atjauninātu dokumentus."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr "Piegādātā dokumenta (“%s”) satura tips netika atpazīts."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "Jums jāautentificējas, lai kopētu dokumentus."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "Nav atrasta vecāka mape"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+"Jums jāautentificējas, lai ievietotu vai pārvietotu dokumentus un mapes."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr "Jums jāautentificējas, lai pārvietotu dokumentus un mapes."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "Īpašība “%s” nesatur attēlu"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr "Jums jānorāda lietotājvārds vai jāautorizējas, lai vaicātu lietotāju."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "Vaicājuma parametrs nav atļaut albumiem."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Jums jānorāda lietotājvārds vai jāautentificējas, lai vaicātu visus albumus."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "Albumam nebija plūsmas saites."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "Jums jāautentificējas, lai augšupielādētu datni."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "Albums jau tika ievietots."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "Jums jāautentificējas, lai ievietotu albumu."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr "Jums jāautentificējas, lai vaicātu visus uzdevumu sarakstus."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "Jums jāautentificējas, lai vaicātu savus uzdevumus."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Jūs esat pārsniedzis savu ierakstu kvotu. Lūdzu, izdzēsiet dažus ierakstus "
+"un mēģiniet vēlreiz."
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Lai šo izdarītu, Google kontam ir jābūt asociētam ar YouTube kanālu. Lai to "
+"izdarītu, apmeklējiet %s."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Jums jāautentificējas, lai augšupielādētu video."
+
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "“%s” elementam nebija vajadzīgā satura."
+
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr "“%s” elementa saturs (“%s”) nebija ISO 8601 formātā."
--- /dev/null
+i18n.gettext('gdata', preset: 'glib')
--- /dev/null
+# Malayalam translation for libgdata.
+# Copyright (C) 2012 libgdata's COPYRIGHT HOLDER
+# This file is distributed under the same license as the libgdata package.
+# Anish A <aneesh.nl@gmail.com>, 2012.
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=libgdata&keywords=I18N+L10N&component=general\n"
+"POT-Creation-Date: 2012-09-22 11:37+0000\n"
+"PO-Revision-Date: 2012-09-22 22:25+0530\n"
+"Last-Translator: Anish A <aneesh.nl@gmail.com>\n"
+"Language-Team: Swatantra Malayalam Computing\n"
+"Language: ml\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Virtaal 0.6.1\n"
+"X-Project-Style: gnome\n"
+
+#: ../gdata/gdata-client-login-authorizer.c:597
+#: ../gdata/gdata-oauth1-authorizer.c:804
+#: ../gdata/gdata-oauth1-authorizer.c:1076
+msgid "The server returned a malformed response."
+msgstr "സേവകന് സാധുതയില്ലാത്ത മറുപടി അയച്ചു."
+
+#: ../gdata/gdata-client-login-authorizer.c:617 ../gdata/gdata-service.c:321
+#, c-format
+msgid "Cannot connect to the service's server."
+msgstr "അവസ്ഥ പാലകനുമായ് ബന്ധപ്പെടാന് കഴിയുന്നില്ല."
+
+#: ../gdata/gdata-client-login-authorizer.c:622 ../gdata/gdata-service.c:326
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "പ്രോക്സി സേവകനുമായി ബന്ധപ്പെടാന് കഴിയുന്നില്ല."
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:628 ../gdata/gdata-service.c:332
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:634 ../gdata/gdata-service.c:338
+#, c-format
+msgid "Authentication required: %s"
+msgstr "തിരിച്ചറിയല് ആവശ്യമാണു്: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:639 ../gdata/gdata-service.c:343
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "അപേക്ഷിച്ച വിഭവം കാണുന്നില്ല: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:645 ../gdata/gdata-service.c:349
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "ഡൌണ്ലോഡ് ചെയ്ത ശേഷം ഈ എന്ട്രി മാറ്റി: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:657 ../gdata/gdata-service.c:363
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "അധികാരപ്പെടുത്തുമ്പോള് %u പിഴവ് : %s"
+
+#: ../gdata/gdata-client-login-authorizer.c:752
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "പ്രവേശിക്കുവാന് ക്യാപ്ച പൂരിപ്പിക്കണം."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:790
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "ഈ അക്കൌണ്ടിന് ഒരു പ്രയോഗത്തിന് അധിഷ്ഠിതമായ രഹസ്യ വാക്ക് വേണം. (%s)"
+
+#: ../gdata/gdata-client-login-authorizer.c:797
+msgid "Your username or password were incorrect."
+msgstr "താങ്കളുടെ ഉപയോക്തൃനാമം അല്ലെങ്കില് രഹസ്യവാക്ക് തെറ്റാണ്."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:818
+#, c-format
+msgid "Your account's e-mail address has not been verified. (%s)"
+msgstr "താങ്കളുടെ അക്കൌണ്ടിന്റെ ഇമെയില് വിലാസം സ്ഥിരികരിച്ചില്ല. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:823
+#, c-format
+msgid "You have not agreed to the service's terms and conditions. (%s)"
+msgstr "ഈ സേവനത്തിന്റെ ഉപയോഗ വ്യവസ്തകള് താങ്കള് അംഗീകരിച്ചിട്ടില്ല. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:829
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:834
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "ഈ അക്കൌണ്ട് നീക്കം ചെയ്തിരിക്കുന്നു. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:839
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "ഈ അക്കൌണ്ട് പ്രവര്ത്തന രഹിതമാക്കിയിരിക്കുന്നു. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:844
+#, c-format
+msgid "This account's access to this service has been disabled. (%s)"
+msgstr "ഈ സേവനത്തിലേക്കുള്ള ഈ അക്കൌണ്ടിന്റെ പ്രവേശനം തടഞ്ഞിരിക്കുന്നു . (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:849
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "ഇപ്പോള്ഈ സേവനം ലഭ്യമല്ല. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:262
+msgid "This entry does not support comments."
+msgstr "ഈ കളത്തില് കുറിപ്പെഴുതുന്നതിനു് പിന്തുണയില്ല."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#: ../gdata/gdata-commentable.c:349 ../gdata/gdata-commentable.c:435
+msgid "Comments may not be added to this entry."
+msgstr ""
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:518 ../gdata/gdata-commentable.c:594
+msgid "This comment may not be deleted."
+msgstr "ഈ കുറിപ്പു് നീക്കം ചെയ്യുവാന് പാടില്ല."
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:752
+msgid "Invalid seek request"
+msgstr "അസാധുവായ seek ആവശ്യപ്പെട്ടിരിക്കുന്നു"
+
+#: ../gdata/gdata-oauth1-authorizer.c:779
+msgid "The server rejected the temporary credentials request."
+msgstr ""
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1050
+msgid "Access was denied by the user or server."
+msgstr "സേവകനോ ഉപയോക്താവോ പ്രവേശനം തടഞ്ഞു"
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:245 ../gdata/gdata-parsable.c:256
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "XML പാഴ്സ് ചെയ്യുന്നതില് പിഴവ്: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:258
+msgid "Empty document."
+msgstr "ഒഴിഞ്ഞ പ്രമാണം."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:67
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "%s ല് ആവശ്യമായ ഉള്ളടക്കം ഇല്ല."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:83
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+msgstr ""
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element ("00:01:42.500") was unknown.
+#: ../gdata/gdata-parser.c:103
+#, fuzzy, c-format
+msgid "The value of the %s property of a %s element (\"%s\") was unknown."
+msgstr "<%s> എന്ന എലമെന്റില് \"%s\" ആട്ട്രിബ്യൂട്ടിന് \"%s\" എന്ന അപരിചിതമായ മൂല്ല്യം"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element ("protected") was unknown.
+#: ../gdata/gdata-parser.c:121
+#, fuzzy, c-format
+msgid "The content of a %s element (\"%s\") was unknown."
+msgstr "അപരിചിതമായ നിര %d-ല് മാറ്റം വരുത്തിയിരിക്കുന്നു"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:141
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr ""
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:164
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:183
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "(%s) എന്ന ആവശ്യമുള്ള കാര്യം ഇല്ല."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#: ../gdata/gdata-parser.c:198
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr ""
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:369
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "ചോദിക്കുമ്പോള് പിഴവ് കോഡ് %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:375
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr ""
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:381
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr ""
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:387
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr ""
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:393
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "ഡൌണ്ലോഡ് ചെയ്യുമ്പോള് പിഴവ് കോഡ് %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:399
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "അപ്ലോഡ് ചെയ്യുമ്പോള് പിഴവ് കോഡ് %u: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:405
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr ""
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:686
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "തെറ്റായ തിരിച്ച്വിടല് URI: %s"
+
+#: ../gdata/gdata-service.c:1338
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:624
+#: ../gdata/services/youtube/gdata-youtube-service.c:875
+msgid "The entry has already been inserted."
+msgstr ""
+
+#. Resumable upload error.
+#: ../gdata/gdata-upload-stream.c:744 ../gdata/gdata-upload-stream.c:826
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+
+#: ../gdata/gdata-upload-stream.c:892
+msgid "Stream is already closed"
+msgstr "സ്ട്രീം നിലവില് അടച്ചിരിക്കുന്നു"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element ("00FG56") was not in hexadecimal RGB format.
+#: ../gdata/services/calendar/gdata-calendar-calendar.c:406
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in hexadecimal RGB format."
+msgstr ""
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:315
+#: ../gdata/services/calendar/gdata-calendar-service.c:366
+msgid "You must be authenticated to query all calendars."
+msgstr ""
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:412
+#: ../gdata/services/calendar/gdata-calendar-service.c:463
+#: ../gdata/services/calendar/gdata-calendar-service.c:508
+#: ../gdata/services/calendar/gdata-calendar-service.c:568
+msgid "You must be authenticated to query your own calendars."
+msgstr ""
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:517
+#: ../gdata/services/calendar/gdata-calendar-service.c:581
+msgid "The calendar did not have a content URI."
+msgstr ""
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:308
+msgid "You must be authenticated to query contacts."
+msgstr ""
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:424
+#: ../gdata/services/contacts/gdata-contacts-service.c:474
+msgid "You must be authenticated to query contact groups."
+msgstr ""
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:514
+msgid "The group has already been inserted."
+msgstr ""
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:521
+msgid "You must be authenticated to insert a group."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-document.c:300
+msgid "You must be authenticated to download documents."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-service.c:460
+#: ../gdata/services/documents/gdata-documents-service.c:510
+msgid "You must be authenticated to query documents."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-service.c:555
+msgid "You must be authenticated to upload documents."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-service.c:561
+msgid "The document has already been uploaded."
+msgstr "പ്രമാണം നേരത്തേ തന്നെ അപ്ലോഡ് ചെയ്തു."
+
+#: ../gdata/services/documents/gdata-documents-service.c:705
+msgid "You must be authenticated to update documents."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-service.c:885
+#, c-format
+msgid ""
+"The content type of the supplied document ('%s') could not be recognized."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-service.c:925
+msgid "You must be authenticated to copy documents."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-service.c:1087
+#: ../gdata/services/documents/gdata-documents-service.c:1270
+msgid "You must be authenticated to move documents and folders."
+msgstr ""
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:387
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "Query parameter not allowed for albums."
+msgstr ""
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:394
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:455
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:476
+msgid "The album did not have a feed link."
+msgstr ""
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:631
+msgid "You must be authenticated to upload a file."
+msgstr ""
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:707
+msgid "The album has already been inserted."
+msgstr ""
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:714
+msgid "You must be authenticated to insert an album."
+msgstr ""
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:456
+#, c-format
+msgid "This service is not available at the moment."
+msgstr ""
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:460
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr ""
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:465
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:468
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+
+#. Translators: the first parameter is an error code, which is a coded string.
+#. * The second parameter is an error domain, which is another coded string.
+#. * The third parameter is the location of the error, which is either a URI or an XPath.
+#: ../gdata/services/youtube/gdata-youtube-service.c:475
+#: ../gdata/services/youtube/gdata-youtube-service.c:481
+#, c-format
+msgid ""
+"Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+msgstr ""
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:499
+#, c-format
+msgid "Unknown and unparsable error received."
+msgstr ""
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:763
+#: ../gdata/services/youtube/gdata-youtube-service.c:820
+msgid "The video did not have a related videos <link>."
+msgstr ""
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:882
+msgid "You must be authenticated to upload a video."
+msgstr ""
--- /dev/null
+# translation of mr.po to Marathi
+# Marathi translation for libgdata.
+# Copyright (C) 2011 libgdata's COPYRIGHT HOLDER
+# This file is distributed under the same license as the libgdata package.
+#
+# Sandeep Shedmake <sshedmak@redhat.com>, 2011, 2012.
+msgid ""
+msgstr ""
+"Project-Id-Version: mr\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=libgdata&keywords=I18N+L10N&component=general\n"
+"POT-Creation-Date: 2011-07-10 11:51+0000\n"
+"PO-Revision-Date: 2012-03-20 12:44+0530\n"
+"Last-Translator: Sandeep Shedmake <sshedmak@redhat.com>\n"
+"Language-Team: Marathi <fedora-trans-mr@redhat.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Lokalize 1.2\n"
+"Plural-Forms: nplurals=2; plural=(n!=1);\n"
+"Language: mr\n"
+
+#: ../gdata/gdata-client-login-authorizer.c:575
+#: ../gdata/gdata-oauth1-authorizer.c:770
+#: ../gdata/gdata-oauth1-authorizer.c:1029
+msgid "The server returned a malformed response."
+msgstr "सर्व्हरने सदोषीत प्रतिसाद पुरवला."
+
+#: ../gdata/gdata-client-login-authorizer.c:595 ../gdata/gdata-service.c:316
+#, c-format
+msgid "Cannot connect to the service's server."
+msgstr "सर्व्हिसेस् सर्वरशी जोडणी करणे अशक्य."
+
+#: ../gdata/gdata-client-login-authorizer.c:600 ../gdata/gdata-service.c:321
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "प्रॉक्सी सर्व्हरशी जोडणी करणे अशक्य."
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:606 ../gdata/gdata-service.c:327
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr "अवैध रिक्वेस्ट URI किंवा हेड्डर, किंवा असमर्थीत घटक: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:612 ../gdata/gdata-service.c:333
+#, c-format
+msgid "Authentication required: %s"
+msgstr "ओळख पटवणे आवश्यक: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:617 ../gdata/gdata-service.c:338
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "विनंती केलेले स्रोत आढळले नाही: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:623 ../gdata/gdata-service.c:344
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "डाऊनलोड केल्यापासून नोंद संपादित केली आहे: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:635 ../gdata/gdata-service.c:358
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "ओळख पटवतेवेळी एरर कोड %u: %s"
+
+#: ../gdata/gdata-client-login-authorizer.c:728
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "प्रवेश करण्यासाठी CAPTCHA भरणे आवश्यक."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:766
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "या खात्याला ॲप्लिकेशन-निर्देशीत पासवर्ड आवश्यक आहे. (%s)"
+
+#: ../gdata/gdata-client-login-authorizer.c:773
+msgid "Your username or password were incorrect."
+msgstr "तुमचे वापकर्तानाव किंवा पासवर्ड चुकिचे आहे."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:794
+#, c-format
+msgid "Your account's e-mail address has not been verified. (%s)"
+msgstr "खात्याशी संबंधित ईमेल पत्ता तपासले नाही. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:799
+#, c-format
+msgid "You have not agreed to the service's terms and conditions. (%s)"
+msgstr "तुम्ही सर्व्हिसच्या अटी व परिस्थिती मान्य करण्यास नकार दिला आहे. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:805
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"हे खाते स्थानांतरीत केले आहे. कृपया नवीन वापरकर्तानाव व पासवर्ड प्राप्त "
+"करण्यासाठी ऑनलाइन "
+"प्रवेश करा. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:810
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "हे खाते नष्ट केले आहे. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:815
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "हे खाते बंद केले आहे. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:820
+#, c-format
+msgid "This account's access to this service has been disabled. (%s)"
+msgstr "या सर्व्हिसकरीता या खात्याचे प्रवेश बंद केले आहे. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:825
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "हि सर्व्हिस याक्षणी उपलब्ध नाही. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:262
+msgid "This entry does not support comments."
+msgstr "हि नोंदणी टिपण्णींकरीता समर्थन पुरवत नाही."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#: ../gdata/gdata-commentable.c:349 ../gdata/gdata-commentable.c:435
+msgid "Comments may not be added to this entry."
+msgstr "टिपण्णीला ह्या नोंदणीमध्ये समाविष्ट करणे अशक्य."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:518 ../gdata/gdata-commentable.c:594
+#| msgid "This account has been deleted. (%s)"
+msgid "This comment may not be deleted."
+msgstr "या टिपण्णीला नष्ट करणे अशक्य."
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:751
+msgid "Invalid seek request"
+msgstr "अवैध सीक विनंती"
+
+#: ../gdata/gdata-oauth1-authorizer.c:745
+msgid "The server rejected the temporary credentials request."
+msgstr "सर्व्हरने तात्पुर्ती श्रेय विनंती नकारली."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1007
+msgid "Access was denied by the user or server."
+msgstr "वापरकर्ता किंवा सर्व्हरतर्फे प्रवेश नकारले."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:245 ../gdata/gdata-parsable.c:256
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "XML वाचतेवेळी त्रुटी: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:258
+msgid "Empty document."
+msgstr "रिकामे दस्तऐवज."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:66
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "%s घटकात आवश्यक अंतर्भूत माहिती आढळली नाही."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:82
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+msgstr "%s घटकाची (\"%s\") अंतर्भूत माहिती ISO 8601 स्वरूपात नाही."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element ("00:01:42.500") was unknown.
+#: ../gdata/gdata-parser.c:102
+#, c-format
+msgid "The value of the %s property of a %s element (\"%s\") was unknown."
+msgstr "%2$s घटकाचे %1$s गुणधर्माचे मूल्य (\"%3$s\") अपरिचीत होते."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element ("protected") was unknown.
+#: ../gdata/gdata-parser.c:120
+#, c-format
+msgid "The content of a %s element (\"%s\") was unknown."
+msgstr "%s घटकाची (\"%s\") अंतर्भूत माहिती अपरिचीत होती."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:140
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "%s घटकाचे आवश्यक गुणधर्म (%s) उपलब्ध नाही."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:163
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"दोन पैकी एकच घटक स्वीकार्य असल्यावर गुणधर्म %1$s व %3$s पैकी %2$s घटकांकरीता "
+"लागू "
+"होण्याजोगी मूल्ये."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:182
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "आवश्यक घटक (%s) आढळले नाही."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#: ../gdata/gdata-parser.c:197
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "एक घटक (%s) याचे हुबेहुब प्रत बनवले."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:364
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "चौकशीकरतेवेळी एरर कोड %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:370
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "नोंद समाविष्ट करतेवेळी एरर कोड %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:376
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "नोंद सुधारित करतेवेळी एरर कोड %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:382
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "नोंदणी नष्ट करतेवेळी एरर कोड %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:388
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "डाऊनलोड करतेवेळी एरर कोड %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:394
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "अपलोड करतेवेळी एरर कोड %u: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:400
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "बॅच् कार्य चालवतेवेळी एरर कोड %u: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:674
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "अवैध रिडायरेक्ट URI: %s"
+
+#: ../gdata/gdata-service.c:1325
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:624
+#: ../gdata/services/youtube/gdata-youtube-service.c:836
+msgid "The entry has already been inserted."
+msgstr "नोंदणी आधिपासूनच समाविष्ट केली आहे."
+
+#: ../gdata/gdata-upload-stream.c:785
+msgid "Stream is already closed"
+msgstr "श्रृंखला आधिपासूनच बंद आहे"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element ("00FG56") was not in hexadecimal RGB format.
+#: ../gdata/services/calendar/gdata-calendar-calendar.c:406
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in hexadecimal RGB format."
+msgstr "%s घटक (\"%s\") मधील अंतर्भूत माहिती हेक्जाडेसिमल RGB स्वरूपात नाही."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:315
+#: ../gdata/services/calendar/gdata-calendar-service.c:366
+msgid "You must be authenticated to query all calendars."
+msgstr "सर्व दिनदर्शिकांची चौकशी करण्यासाठी ओळख पटवणे आवश्यक आहे."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:412
+#: ../gdata/services/calendar/gdata-calendar-service.c:463
+#: ../gdata/services/calendar/gdata-calendar-service.c:508
+#: ../gdata/services/calendar/gdata-calendar-service.c:568
+msgid "You must be authenticated to query your own calendars."
+msgstr "सर्व दिनदर्शिकांची चौकशी करण्यासाठी ओळख पटवणे आवश्यक आहे."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:517
+#: ../gdata/services/calendar/gdata-calendar-service.c:581
+msgid "The calendar did not have a content URI."
+msgstr "दिनदर्शिकामध्ये अंतर्भूतमाहिती URI समाविष्टीत नाही."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:308
+msgid "You must be authenticated to query contacts."
+msgstr "संपर्कांची चौकशी करण्यासाठी ओळख पटवणे आवश्यक आहे."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:424
+#: ../gdata/services/contacts/gdata-contacts-service.c:474
+msgid "You must be authenticated to query contact groups."
+msgstr "संपर्क गटांची चौकशीकरीता ओळख पटवणे आवश्यक आहे."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:514
+msgid "The group has already been inserted."
+msgstr "गट आधिपासूनच समाविष्ट केले आहे."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:521
+msgid "You must be authenticated to insert a group."
+msgstr "गट समाविष्ट करण्यासाठी ओळख पटवणे आवश्यक आहे."
+
+#: ../gdata/services/documents/gdata-documents-document.c:274
+msgid "You must be authenticated to download documents."
+msgstr "दस्तऐवज डाऊनलोड करण्यासाठी ओळख पटवणे आवश्यक आहे."
+
+#: ../gdata/services/documents/gdata-documents-service.c:357
+#: ../gdata/services/documents/gdata-documents-service.c:412
+msgid "You must be authenticated to query documents."
+msgstr "दस्तऐवजांची चौकशी करण्यासाठी ओळख पटवणे आवश्यक आहे."
+
+#: ../gdata/services/documents/gdata-documents-service.c:491
+msgid "You must be authenticated to upload documents."
+msgstr "दस्तऐवज अपलोड करण्यासाठी ओळख पटवणे आवश्यक आहे."
+
+#: ../gdata/services/documents/gdata-documents-service.c:497
+msgid "The document has already been uploaded."
+msgstr "दस्तऐवज आधिपासूनच अपलोड केले आहे."
+
+#: ../gdata/services/documents/gdata-documents-service.c:552
+msgid "You must be authenticated to update documents."
+msgstr "दस्तऐवज सुधारित करण्यासाठी ओळख पटवणे आवश्यक आहे."
+
+#: ../gdata/services/documents/gdata-documents-service.c:615
+#, c-format
+msgid ""
+"The content type of the supplied document ('%s') could not be recognized."
+msgstr "पुरवलेल्या दस्तऐवजाची अंतर्भूत माहिती ('%s') ओळखणे अशक्य."
+
+#: ../gdata/services/documents/gdata-documents-service.c:664
+#: ../gdata/services/documents/gdata-documents-service.c:849
+msgid "You must be authenticated to move documents and folders."
+msgstr "दस्तऐवज व फोल्डर्स हलवण्याकरीता ओळख पटवणे आवश्यक आहे."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr "वापरकर्त्याची चौकशी करण्यसाठी वापरकर्तानाव किंवा ओळख पटवणे आवश्यक आहे."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:387
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "Query parameter not allowed for albums."
+msgstr "अल्बम्सकरीता चौकशी घटक स्वीकारले जात नाही."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:394
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:455
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"सर्व अल्बम्स्ची चौकशी करण्यासाठी वापरकर्तानाव निर्देशीत करणे किंवा ओळख पटवणे "
+"आवश्यक आहे."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:476
+msgid "The album did not have a feed link."
+msgstr "अल्बममध्ये फीड दुवा आढळली नाही."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:631
+msgid "You must be authenticated to upload a file."
+msgstr "फाइल अपलोड करण्यासाठी ओळख पटवणे आवश्यक आहे."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:707
+msgid "The album has already been inserted."
+msgstr "अल्बम आधिपासूनच समाविष्ट केले आहे."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:714
+msgid "You must be authenticated to insert an album."
+msgstr "अल्बम समाविष्ट करण्यासाठी ओळख पटवणे आवश्यक आहे."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:417
+#, c-format
+msgid "This service is not available at the moment."
+msgstr "ही सेवा याक्षणी उपलब्ध नाही."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:421
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "असे करण्यासाठी ओळख पटवणे आवश्यक आहे."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:426
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"तुम्ही नुकतेच एकापेक्षाजास्त API कॉल्स् केले. कृपया काहिक मिनिटे थांबा व "
+"पुनःप्रयत्न करा."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:429
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"नोंदणी कोटाची मर्यादा पोहचली. कृपया काहिक नोंदणी नष्ट करा व पुनः प्रयत्न करा."
+
+#. Translators: the first parameter is an error code, which is a coded string.
+#. * The second parameter is an error domain, which is another coded string.
+#. * The third parameter is the location of the error, which is either a URI or an XPath.
+#: ../gdata/services/youtube/gdata-youtube-service.c:436
+#: ../gdata/services/youtube/gdata-youtube-service.c:442
+#, c-format
+msgid ""
+"Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+msgstr "ठिकाण \"%3$s\" सह डोमेन \"%2$s\" मध्ये अपरिचीत त्रुटी कोड \"%1$s\"."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:460
+#, c-format
+msgid "Unknown and unparsable error received."
+msgstr "अपरिचीत व वाचनअशक्य त्रुटी प्राप्त झाले."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:724
+#: ../gdata/services/youtube/gdata-youtube-service.c:781
+msgid "The video did not have a related videos <link>."
+msgstr "व्हिडीओसह संबंधित व्हिडीओज आढळले नाही <link>."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:843
+msgid "You must be authenticated to upload a video."
+msgstr "व्हिडीओ अपलोड करण्यासाठी ओळख पटवणे आवश्यक आहे."
+
--- /dev/null
+# Malay translation for libgdata.
+# Copyright (C) 2019 libgdata's COPYRIGHT HOLDER
+# This file is distributed under the same license as the libgdata package.
+# abuyop <abuyop@gmail.com>, 2019.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-10-28 18:36+0000\n"
+"PO-Revision-Date: 2019-12-25 13:54+0800\n"
+"Language-Team: Malay <ms@li.org>\n"
+"Language: ms\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Last-Translator: abuyop <abuyop@gmail.com>\n"
+"X-Generator: Poedit 2.0.6\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Operasi kelompok tidak disokong oleh perkhidmatan ini."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "Pelayan mengembalikan satu respons cacat."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Tidak dapat bersambung dengan pelayan perkhidmatan."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Tidak dapat bersambung dengan pelayan proksi."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"URI atau pengepala permintaan tidak sah, atau parameter bukan-piawai tidak "
+"disokong: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Pengesahihan diperlukan: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "Sumber dipinta tidak ditemui: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Masukan telah diubah suai semenjak ia telah dimuat turun: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Kod ralat %u ketika mengesahihkan: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "Satu CAPTCHA mesti diisi untuk mendaftar keluar."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Akaun ini memerlukan satu kata laluan khusus-aplikasi. (%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Nama pengguna atau kata laluan anda tidak betul."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "Alamat e-mel akaun anda belum disahkan. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Anda tidak menyetujui terma dan syarat perkhidmatan. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Akaun ini telah dipindahkan. Sila daftar masuk secara dalam talian untuk "
+"menerima nama pengguna dan kata laluan baharu anda. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Akaun ini telah dipadamkan. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Akaun ini telah dilumpuhkan. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "Capaian akaun ini ke perkhidmatan ini telah dilumpuhkan. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Perkhidmatan ini tidak tersedia buat masa ini. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "Masukan ini tidak menyokong ulasan."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "Ulasan-ulasan tidak ditambah ke dalam masukan ini."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "Ulasan ini mungkin tidak dipadamkan."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Permintaan jangkau tidak sah"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr "Pelayan menolak permintaan kelayakan sementara."
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "Sokongan OAuth 1.0 dilumpuhkan."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "Capaian telah dinafikan oleh pengguna atau pelayan."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Ralat menghurai XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Dokumen kosong."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Ralat menghurai JSON: %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Nod JSON paling luar bukanlah satu objek."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Satu unsur %s telah hilang kandungan yang diperlukan."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "Kandungan bagi unsur %s ('%s') bukan dalam format ISO 8601."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "Nilai bagi sifat %s pada unsur %s ('%s') tidak diketahui."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "Kandungan bagi unsur %s ('%s') tidak diketahui."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Sifat yang diperlukan bagi unrus %s (%s) tidak hadir."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Nilai yang hadir untuk sifat %s dan %s bagi unsur %s hanya satu daripada dua "
+"dibenarkan."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Satu unsur (%s) diperlukan tidak hadir."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Satu unsur tunggal (%s) mempunyai pendua."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "Satu unsur '%s' telah kehilangan kandungan yang diperlukan."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "Kandungan bagi satu unsur '%s' ('%s') bukan dalam format ISO 8601."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "JSON tidak sah telah diterima melalui pelayan: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr ""
+"Kandungan bagi satu unsur %s ('%s') bukan dalam format RGB heksadesimal."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Kod ralat %u bila dipinta: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Kod ralat %u ketika menyisip satu masukan: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Kod ralat %u ketika mengemas kini satu masukan: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Kod ralat %u ketika memadam satu masukan: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Kod ralat %u ketika memuat turun: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Kod ralat %u ketika memuat naik: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Kod ralat %u ketika menjalankan satu operasi kelompok: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "URI arah-semula tidak sah: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Masukan sudah disisipkan."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"Ralat ketika menerima daripada pelayan selepas memuat naik satu cebisan muat "
+"naik boleh-sambung-semula."
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Strim sudah ditutup"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Anda telah membuat terlalu banyak panggilan API baru-baru ini. Tunggu "
+"sebentar beberapa minit dan cuba lagi."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Anda mesti disahihkan untuk membuatnya."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "Anda mesti disahihkan untuk menanya semua kalendar."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "Anda mesti disahihkan untuk menanya kalendar anda sendiri."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "Anda mesti disahihkan untuk menanya hubungan."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "Anda mesti disahihkan untuk menanya sekumpulan hubungan."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "Kumpulan sudah disisipkan."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "Anda mesti disahihkan untuk menyisip satu kumpulan."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "Anda mesti disahihkan untuk memuat turun dokumen-dokumen."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Format eksport dokumen '%s' tidak diketahui atau tidak disokong."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "Ketampakan tidak sah: nilai '%s' tidak dikenali"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "Anda mesti disahihkan untuk menanya dokumen-dokumen."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "Anda mesti disahihkan untuk memuat naik dokumen."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "Dokumen sudah dimuat naik."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "Anda mesti disahihkan untuk mengemas kini dokumen-dokumen."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr "Jenis kandungan bagi dokumen yang dibekal ('%s') tidak dikenal pasti."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "Anda mesti disahihkan untuk menyalin dokumen-dokumen."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "Folder induk tidak ditemui"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+"Anda mesti disahihkan untuk menyisip atau mengalih dokumen-dokumen dan "
+"folder-folder."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr ""
+"Anda mesti disahihkan untuk mengalih dokumen-dokumen dan folder-folder."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "Sifat '%s' tidak memegang satu imej"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Anda mesti nyatakan satu nama pengguna atau disahihkan untuk menanya seorang "
+"pengguna."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "Parameter tanya tidak dibenarkan untuk album."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Anda mesti nyatakan satu nama pengguna atau disahihkan untuk menanya semua "
+"album."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "Album tidak mempunyai satu pautan suapan."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "Anda mesti disahihkan untuk memuat naik satu fail."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "Album sudah disisipkan."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "Anda mesti disahihkan untuk menyisip satu album."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr "Anda mesti disahihkan untuk menanya semua senarai tugas."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "Anda mesti disahihkan untuk menanya tugas anda sendiri."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Anda telah melangkaui kuota masukan anda. Sila padam beberapa masukan dan "
+"cuba lagi."
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Akaun Google anda mesti dikaitkan dengan satu saluran YouTube supaya dapat "
+"membuatnya. Lawati %s untuk cipta satu."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Anda mesti disahihkan untuk memuat naik satu video."
--- /dev/null
+# Norwegian bokmål translation of libgdata.
+# Copyright (C) 1998-2004, 2005 Free Software Foundation, Inc.
+# Kjartan Maraas <kmaraas@gnome.org>, 1998-2016.
+# Terance Edward Sola <terance@lyse.net>, 2005.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata 0.17.x\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-10-16 17:56+0200\n"
+"PO-Revision-Date: 2016-10-16 17:59+0200\n"
+"Last-Translator: Kjartan Maraas <kmaraas@gnome.org>\n"
+"Language-Team: Norwegian Bokmål <i18n-nb@lister.ping.uio.no>\n"
+"Language: nb\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: ../gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Batch-operasjoner er ikke støttet av denne tjenesten."
+
+#: ../gdata/gdata-client-login-authorizer.c:629
+#: ../gdata/gdata-oauth1-authorizer.c:840
+#: ../gdata/gdata-oauth1-authorizer.c:1116
+#: ../gdata/gdata-oauth2-authorizer.c:953
+#: ../gdata/gdata-oauth2-authorizer.c:964
+#: ../gdata/gdata-oauth2-authorizer.c:983
+#: ../gdata/gdata-oauth2-authorizer.c:999
+#: ../gdata/gdata-oauth2-authorizer.c:1064
+#: ../gdata/gdata-oauth2-authorizer.c:1076
+#: ../gdata/gdata-oauth2-authorizer.c:1087
+#: ../gdata/gdata-oauth2-authorizer.c:1102
+#: ../gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "Tjeneren returnerte et feilutformet svar."
+
+#: ../gdata/gdata-client-login-authorizer.c:649 ../gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Kan ikke koble til tjenestens tjener."
+
+#: ../gdata/gdata-client-login-authorizer.c:654 ../gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Kan ikke koble til proxy-tjener."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: ../gdata/gdata-client-login-authorizer.c:660 ../gdata/gdata-service.c:372
+#: ../gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Ugyldig URI for forespørsel eller topptekst, eller ikke støttet og ikke "
+"standardisert parameter: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:666 ../gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Autentisering kreves: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:671 ../gdata/gdata-service.c:383
+#: ../gdata/services/calendar/gdata-calendar-service.c:313
+#: ../gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "Forespurt ressurs ble ikke funnet: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:677 ../gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Oppføringen er endret siden den ble lastet ned: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:689 ../gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Feilkode %u under autentisering: %s"
+
+#: ../gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "En CAPTCHA må fylles ut for å logge inn."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Denne kontoen krever et programspesifikt passord. (%s)"
+
+#: ../gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Feil brukernavn eller passord."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "E-postadressen for din konto er ikke verifisert. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Du har ikke godtatt betingelsene for tjenesten. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Denne kontoen har blitt migrert. Vennligst logg inn på nettet for å motta "
+"ditt nye brukernavn og passord. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Denne kontoen er slettet. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Denne kontoen er deaktivert. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "Denne kontoens tilgang til denne tjenesten er deaktivert. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Denne tjenesten er ikke tilgjengelig nå. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:262
+msgid "This entry does not support comments."
+msgstr "Denne oppføringen støtter ikke kommentarer."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#: ../gdata/gdata-commentable.c:349 ../gdata/gdata-commentable.c:435
+msgid "Comments may not be added to this entry."
+msgstr "Kommentarer kan ikke legges til i denne oppføringen."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:518 ../gdata/gdata-commentable.c:594
+msgid "This comment may not be deleted."
+msgstr "Denne kommentaren kan ikke slettes."
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Ugyldig søkeforespørsel"
+
+#: ../gdata/gdata-oauth1-authorizer.c:815
+msgid "The server rejected the temporary credentials request."
+msgstr "Tjener avviste midlertidig forespørsel om påloggingsinformasjon."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1090
+#: ../gdata/gdata-oauth2-authorizer.c:1113
+#: ../gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "Tilgang ble nektet av bruker eller tjener."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:352 ../gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Feil under tolking av XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Tomt dokument."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:483 ../gdata/gdata-parsable.c:521
+#: ../gdata/services/documents/gdata-documents-access-rule.c:144
+#: ../gdata/services/documents/gdata-documents-access-rule.c:154
+#: ../gdata/services/documents/gdata-documents-document.c:286
+#: ../gdata/services/documents/gdata-documents-entry.c:456
+#: ../gdata/services/documents/gdata-documents-entry.c:467
+#: ../gdata/services/documents/gdata-documents-entry.c:478
+#: ../gdata/services/documents/gdata-documents-entry.c:525
+#: ../gdata/services/documents/gdata-documents-entry.c:536
+#: ../gdata/services/documents/gdata-documents-entry.c:631
+#: ../gdata/services/documents/gdata-documents-entry.c:666
+#: ../gdata/services/documents/gdata-documents-entry.c:681
+#: ../gdata/services/documents/gdata-documents-entry.c:696
+#: ../gdata/services/documents/gdata-documents-entry.c:726
+#: ../gdata/services/documents/gdata-documents-entry.c:742
+#: ../gdata/services/documents/gdata-documents-feed.c:81
+#: ../gdata/services/documents/gdata-documents-feed.c:92
+#: ../gdata/services/documents/gdata-documents-feed.c:142
+#: ../gdata/services/documents/gdata-documents-feed.c:160
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Feil under tolking av JSON: %s"
+
+#: ../gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Ytterste JSON-node er ikke et objekt."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Et %s-element manglet nødvendig innhold."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "Innhold av et %s-element («%s») var ikke i ISO-8601-format."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: ../gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "Verdien av %s-egenskapen av %s-element («%s») var ukjent."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: ../gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "Innhold av et %s-element («%s») var ukjent."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "En obligatorisk egenskap av et %s-element (%s) var ikke tilstede."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Verdier var tilstede for egenskaper %s og %s av et %s-element nå kun en av "
+"de to tillates."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Et nødvendig element (%s) var ikke tilstede."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: ../gdata/gdata-parser.c:200 ../gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Et enkelt element (%s) var duplisert."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: ../gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "Et %s-element manglet nødvendig innhold."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "Innhold av et %s-element («%s») var ikke i ISO-8601-format."
+
+#. Translators: the parameter is an error message.
+#: ../gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Ugyldig JSON ble mottatt fra tjener: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: ../gdata/gdata-parser.c:1179
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr "Innhold av et %s-element («%s» var ikke i heksadesimalt RGB-format."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Feilkode %u under spørring: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Feilkode %u under innsetting av en oppføring: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Feilkode %u under oppdatering av en oppføring: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Feilkode %u under sletting av en oppføring: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Feilkode %u under nedlasting: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Feilkode %u under opplasting: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Feilkode %u under kjøring av en batch-operasjon: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "Ugyldig URI for omdirigering: %s"
+
+#: ../gdata/gdata-service.c:1456
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:626
+#: ../gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Oppføringen er allerede satt inn."
+
+#. Resumable upload error.
+#: ../gdata/gdata-upload-stream.c:794 ../gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"Feil mottatt fra tjener etter opplasting av en gjenopptagbar del av en "
+"opplasting."
+
+#: ../gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Strømmen er allerede lukket"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:302
+#: ../gdata/services/tasks/gdata-tasks-service.c:195
+#: ../gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Du har gjort for mange API-kall. Vennligst vent et par minutter og prøv "
+"igjen."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:334
+#: ../gdata/services/tasks/gdata-tasks-service.c:204
+#: ../gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Du må være autentisert for å gjøre dette."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:465
+#: ../gdata/services/calendar/gdata-calendar-service.c:516
+msgid "You must be authenticated to query all calendars."
+msgstr "Du må være autentiest for å spørre på alle kalendere."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:562
+#: ../gdata/services/calendar/gdata-calendar-service.c:613
+#: ../gdata/services/calendar/gdata-calendar-service.c:675
+#: ../gdata/services/calendar/gdata-calendar-service.c:734
+msgid "You must be authenticated to query your own calendars."
+msgstr "Du må være autentisert for å spørre på dine egne kalendere."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:308
+msgid "You must be authenticated to query contacts."
+msgstr "Du må være autentisert for å spørre på kontakter."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:424
+#: ../gdata/services/contacts/gdata-contacts-service.c:474
+msgid "You must be authenticated to query contact groups."
+msgstr "Du må være autentisert for å spørre på kontaktgrupper."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:514
+msgid "The group has already been inserted."
+msgstr "Gruppen er allerede satt inn."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:521
+msgid "You must be authenticated to insert a group."
+msgstr "Du må være autentisert for å sette inn en gruppe."
+
+#: ../gdata/services/documents/gdata-documents-document.c:392
+msgid "You must be authenticated to download documents."
+msgstr "Du må være autentisert for å laste ned dokumenter."
+
+#: ../gdata/services/documents/gdata-documents-document.c:401
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Ukjent eller ustøttet format for eksport av dokument «%s»."
+
+#: ../gdata/services/documents/gdata-documents-service.c:513
+#: ../gdata/services/documents/gdata-documents-service.c:563
+msgid "You must be authenticated to query documents."
+msgstr "Du må være autentisert for å spørre på dokumenter."
+
+#: ../gdata/services/documents/gdata-documents-service.c:628
+msgid "You must be authenticated to upload documents."
+msgstr "Du må være autentisert for å laste opp dokumenter."
+
+#: ../gdata/services/documents/gdata-documents-service.c:634
+msgid "The document has already been uploaded."
+msgstr "Dokumentet er allerede lastet opp."
+
+#: ../gdata/services/documents/gdata-documents-service.c:779
+msgid "You must be authenticated to update documents."
+msgstr "Du må være autentisert for å oppdatere dokumenter."
+
+#: ../gdata/services/documents/gdata-documents-service.c:946
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr "Innholdstype av oppgitt dokument («%s») ble ikke gjenkjent."
+
+#: ../gdata/services/documents/gdata-documents-service.c:986
+msgid "You must be authenticated to copy documents."
+msgstr "Du må være autentisert for å kopiere dokumenter."
+
+#: ../gdata/services/documents/gdata-documents-service.c:1014
+msgid "Parent folder not found"
+msgstr "Opphavsmappe ble ikke funnet"
+
+#: ../gdata/services/documents/gdata-documents-service.c:1161
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+"Du må være autentisert for å legge inn eller flytte dokumenter og mapper."
+
+#: ../gdata/services/documents/gdata-documents-service.c:1362
+msgid "You must be authenticated to move documents and folders."
+msgstr "Du må være autentisert for å flytte dokumenter og mapper."
+
+#: ../gdata/services/freebase/gdata-freebase-service.c:479
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "Egenskap «%s» inneholder ikke et bilde"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Du må oppgi et brukernavn eller være autentisert for å spørre på en bruker."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:387
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "Query parameter not allowed for albums."
+msgstr "Spørreparameter er ikke tillatt for album."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:394
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:455
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Du må oppgi et brukernavn eller være autentisert for å spørre på alle album."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:476
+msgid "The album did not have a feed link."
+msgstr "Album-ID hadde ikke en lenke til en strøm."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:633
+msgid "You must be authenticated to upload a file."
+msgstr "Du må være autentisert for å laste opp en fil."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:709
+msgid "The album has already been inserted."
+msgstr "Albumet er allerede satt inn."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:716
+msgid "You must be authenticated to insert an album."
+msgstr "Du må være autentisert for å sette inn et album."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:330
+#: ../gdata/services/tasks/gdata-tasks-service.c:381
+msgid "You must be authenticated to query all tasklists."
+msgstr "Du må være autentiest for å spørre på alle oppgavelister."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:430
+#: ../gdata/services/tasks/gdata-tasks-service.c:487
+msgid "You must be authenticated to query your own tasks."
+msgstr "Du må være autentisert for å spørre på dine egne oppgaver."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Du har oversteget din kvote for oppføringer. Vennligst slett noen "
+"oppføringer og prøv igjen."
+
+#. Translators: the parameter is a URI.
+#: ../gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Google-kontoen din må være assosiert med en YouTube-kanal for å gjøre dette. "
+"Besøk %s for å lage en."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Du må være autentisert for å laste opp en video."
--- /dev/null
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Gnome Nepali Translation Project\n"
+"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
+"product=libgdata&keywords=I18N+L10N&component=General\n"
+"POT-Creation-Date: 2017-09-20 11:28+0000\n"
+"PO-Revision-Date: 2017-09-25 18:13+0545\n"
+"Language-Team: Nepali Translation Team <chautari@gmail.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 2.0.4\n"
+"Last-Translator: Pawan Chitrakar <chautari@gmail.com>\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Language: ne\n"
+
+#: ../gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "यस सेवा द्वारा ब्याच सञ्चालन असमर्थित छन्।"
+
+#: ../gdata/gdata-client-login-authorizer.c:629
+#: ../gdata/gdata-oauth1-authorizer.c:840
+#: ../gdata/gdata-oauth1-authorizer.c:1105
+#: ../gdata/gdata-oauth2-authorizer.c:953
+#: ../gdata/gdata-oauth2-authorizer.c:964
+#: ../gdata/gdata-oauth2-authorizer.c:983
+#: ../gdata/gdata-oauth2-authorizer.c:999
+#: ../gdata/gdata-oauth2-authorizer.c:1064
+#: ../gdata/gdata-oauth2-authorizer.c:1076
+#: ../gdata/gdata-oauth2-authorizer.c:1087
+#: ../gdata/gdata-oauth2-authorizer.c:1102
+#: ../gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "सर्भरले विकृत प्रतिक्रिया फर्कायो।"
+
+#: ../gdata/gdata-client-login-authorizer.c:649 ../gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "सेवा सर्भरमा जडान गर्न सकिँदैन।"
+
+#: ../gdata/gdata-client-login-authorizer.c:654 ../gdata/gdata-service.c:366
+#, fuzzy, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "प्रोक्सी सर्भर जडान गर्न सक्दैन"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: ../gdata/gdata-client-login-authorizer.c:660 ../gdata/gdata-service.c:372
+#: ../gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr "अवैध अनुरोध यूआरआई वा हेडर, वा असमर्थित गैर मानक मान्य: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:666 ../gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "%s प्रमाणिकरण आवश्यक छ ।"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:671 ../gdata/gdata-service.c:383
+#: ../gdata/services/calendar/gdata-calendar-service.c:313
+#: ../gdata/services/youtube/gdata-youtube-video.c:1013
+#, fuzzy, c-format
+msgid "The requested resource was not found: %s"
+msgstr "`%s' URI सँग हालै प्रयोग भएका संसाधन फेला परेन"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:677 ../gdata/gdata-service.c:389
+#, fuzzy, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "फाइल%s पढेर यसलाई परिमार्जन गरिएको छ"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:689 ../gdata/gdata-service.c:403
+#, fuzzy, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "सहायक प्रक्रिया %s ले एउटा त्रुटि कोड फर्कायो (%u)"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: ../gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "लग इन गर्न क्याप्चा पुरा हुनुपर्छ।."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "यस खाताको लागि अनुप्रयोग-विशिष्ट पासवर्ड चाहिन्छ।. (%s)"
+
+#: ../gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "तपाईको प्रयोगकर्ता नाम वा पासवर्ड गलत थियो।"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "तपाईंको खाताको इमेल ठेगाना प्रमाणित गरिएको छैन।. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "तपाइँ सेवा सर्तहरू र सर्तहरूमा सहमत हुनुहुन्न।. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"यो खाता स्थानान्तरण गरिएको छ। कृपया आफ्नो नयाँ प्रयोगकर्तानाम र पासवर्ड प्राप्त गर्न "
+"कृपया अनलाइन लग इन गर्नुहोस्। . (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:870
+#, fuzzy, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "मुद्रणयन्त्र “%s” मेटियो"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:875
+#, fuzzy, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "%sलाई फ्यालिएको छ"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "यस खाताको लागि यस खाताको पहुँच अक्षम गरिएको छ।. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:885
+#, fuzzy, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "सेवा उपलब्ध छैन"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:258
+#, fuzzy
+msgid "This entry does not support comments."
+msgstr "यो ढाँचाले पढ्न समर्थन गर्दैन"
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: ../gdata/gdata-commentable.c:338 ../gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "यो प्रविष्टिमा टिप्पणीहरू थप्न सकिँदैन।"
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:494 ../gdata/gdata-commentable.c:563
+#, fuzzy
+msgid "This comment may not be deleted."
+msgstr "मेटिएको"
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "अवैध खोजी अनुरोध"
+
+#: ../gdata/gdata-oauth1-authorizer.c:815
+msgid "The server rejected the temporary credentials request."
+msgstr "सर्भरले अस्थायी प्रमाणपत्र अनुरोध अस्वीकार गर्यो।"
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1079
+#: ../gdata/gdata-oauth2-authorizer.c:1113
+#: ../gdata/services/calendar/gdata-calendar-service.c:340
+#, fuzzy, c-format
+msgid "Access was denied by the user or server."
+msgstr "su बाट त्यो खातामा पहुँच गर्न अस्वीकार गरियो ।\n"
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:352 ../gdata/gdata-parsable.c:363
+#, fuzzy, c-format
+msgid "Error parsing XML: %s"
+msgstr "फिल्टर पदवर्णन गर्दा त्रुटि: %s: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:365
+#, fuzzy
+msgid "Empty document."
+msgstr "`%s' कागजात खाली छ?\n"
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:483 ../gdata/gdata-parsable.c:521
+#: ../gdata/services/documents/gdata-documents-access-rule.c:144
+#: ../gdata/services/documents/gdata-documents-access-rule.c:154
+#: ../gdata/services/documents/gdata-documents-document.c:286
+#: ../gdata/services/documents/gdata-documents-entry.c:477
+#: ../gdata/services/documents/gdata-documents-entry.c:488
+#: ../gdata/services/documents/gdata-documents-entry.c:499
+#: ../gdata/services/documents/gdata-documents-entry.c:546
+#: ../gdata/services/documents/gdata-documents-entry.c:557
+#: ../gdata/services/documents/gdata-documents-entry.c:665
+#: ../gdata/services/documents/gdata-documents-entry.c:700
+#: ../gdata/services/documents/gdata-documents-entry.c:715
+#: ../gdata/services/documents/gdata-documents-entry.c:730
+#: ../gdata/services/documents/gdata-documents-entry.c:760
+#: ../gdata/services/documents/gdata-documents-entry.c:776
+#: ../gdata/services/documents/gdata-documents-feed.c:81
+#: ../gdata/services/documents/gdata-documents-feed.c:92
+#: ../gdata/services/documents/gdata-documents-feed.c:129
+#: ../gdata/services/documents/gdata-documents-feed.c:147
+#, fuzzy, c-format
+msgid "Error parsing JSON: %s"
+msgstr "पद वर्णन विकल्पमा त्रुटि %s"
+
+#: ../gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "बाह्य JSON नोड वस्तु होइन।"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:69
+#, fuzzy, c-format
+msgid "A %s element was missing required content."
+msgstr "'%s' को लागि आवश्यक मान हराइरहेछ"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "%s तत्व ('%s') को सामग्री ISO ८६०१ ढाँचामा थिएन।"
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: ../gdata/gdata-parser.c:105
+#, fuzzy, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "<%s> तत्वमा \"%s\" विशेषताको लागि \"%s\"अज्ञात मान"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: ../gdata/gdata-parser.c:123
+#, fuzzy, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "<%s> तत्वमा अज्ञात विशेषता \"%s\"=\"%s\""
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr ""
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:185
+#, fuzzy, c-format
+msgid "A required element (%s) was not present."
+msgstr "विषयवस्तुमा प्रतिमा '%s' उपस्थित छैन"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: ../gdata/gdata-parser.c:200 ../gdata/gdata-parser.c:287
+#, fuzzy, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "<%s>तत्वमा विशेषता \"%s\" छैन"
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: ../gdata/gdata-parser.c:273
+#, fuzzy, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "'%s' को लागि आवश्यक मान हराइरहेछ"
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr ""
+
+#. Translators: the parameter is an error message.
+#: ../gdata/gdata-parser.c:314
+#, fuzzy, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "%s बाट अवैध सन्देश प्रवाह प्राप्त भयो: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: ../gdata/gdata-parser.c:1179
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr ""
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:409
+#, fuzzy, c-format
+msgid "Error code %u when querying: %s"
+msgstr "सहायक प्रक्रिया %s ले एउटा त्रुटि कोड फर्कायो (%u)"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr ""
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr ""
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr ""
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:433
+#, fuzzy, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "सहायक प्रक्रिया %s ले एउटा त्रुटि कोड फर्कायो (%u)"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:439
+#, fuzzy, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "सहायक प्रक्रिया %s ले एउटा त्रुटि कोड फर्कायो (%u)"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr ""
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:739
+#, fuzzy, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "URI “%s” अवैध"
+
+#: ../gdata/gdata-service.c:1432
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: ../gdata/services/youtube/gdata-youtube-service.c:1022
+#, fuzzy
+msgid "The entry has already been inserted."
+msgstr "किरिङ अघिबाटै खोलिएको छ ।"
+
+#. Resumable upload error.
+#: ../gdata/gdata-upload-stream.c:794 ../gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+
+#: ../gdata/gdata-upload-stream.c:942
+#, fuzzy
+msgid "Stream is already closed"
+msgstr "नेटवर्कको प्रवाह अकस्मात रूपमा बन्द भयो"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:302
+#: ../gdata/services/tasks/gdata-tasks-service.c:195
+#: ../gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:334
+#: ../gdata/services/tasks/gdata-tasks-service.c:204
+#: ../gdata/services/youtube/gdata-youtube-service.c:557
+#, fuzzy, c-format
+msgid "You must be authenticated to do this."
+msgstr "तपाईँ घटनाको एउटा सहभागी हुनुपर्दछ ।"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:465
+#: ../gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "तपाइँलाई सबै क्यालेन्डरहरू प्रश्नको लागि प्रमाणीकरण गर्न अनिवार्य छ। "
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:563
+#: ../gdata/services/calendar/gdata-calendar-service.c:617
+#: ../gdata/services/calendar/gdata-calendar-service.c:677
+#: ../gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "तपाइँलाई आफ्नो क्यालेन्डरहरू प्रश्नको लागि प्रमाणीकरण गर्न अनिवार्य छ। "
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "तपाइँलाई सम्पर्कहरू प्रश्नको लागि प्रमाणीकरण गर्न अनिवार्य छ।"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:425
+#: ../gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "तपाइँलाई सम्पर्क समूह हरू प्रश्नको लागि प्रमाणीकरण गर्न अनिवार्य छ।"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:516
+#, fuzzy
+msgid "The group has already been inserted."
+msgstr "किरिङ अघिबाटै खोलिएको छ ।"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "समूह "
+
+#: ../gdata/services/documents/gdata-documents-document.c:392
+msgid "You must be authenticated to download documents."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-document.c:401
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-service.c:580
+#: ../gdata/services/documents/gdata-documents-service.c:633
+msgid "You must be authenticated to query documents."
+msgstr "तपाइँलाई कागजातहरू प्रश्नको लागि प्रमाणीकरण गर्न अनिवार्य छ। "
+
+#: ../gdata/services/documents/gdata-documents-service.c:696
+msgid "You must be authenticated to upload documents."
+msgstr "तपाइँलाई कागजातहरू अपलोड लागि प्रमाणीकरण गर्न अनिवार्य छ। "
+
+#: ../gdata/services/documents/gdata-documents-service.c:702
+#, fuzzy
+msgid "The document has already been uploaded."
+msgstr "किरिङ अघिबाटै खोलिएको छ ।"
+
+#: ../gdata/services/documents/gdata-documents-service.c:847
+msgid "You must be authenticated to update documents."
+msgstr "तपाइँलाई कागजातहरू अद्यावधिक लागि प्रमाणीकरण गर्न अनिवार्य छ। "
+
+#: ../gdata/services/documents/gdata-documents-service.c:1014
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-service.c:1054
+msgid "You must be authenticated to copy documents."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-service.c:1073
+#: ../gdata/services/documents/gdata-documents-service.c:1414
+msgid "Parent folder not found"
+msgstr "प्रमूल फोल्डर फेला पार्न सकिएन"
+
+#: ../gdata/services/documents/gdata-documents-service.c:1206
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-service.c:1392
+msgid "You must be authenticated to move documents and folders."
+msgstr ""
+
+#: ../gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr ""
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:432
+#, fuzzy
+msgid "Query parameter not allowed for albums."
+msgstr "क्वेरी कार्यन्वयन गर्न परामिति '%s' हराइरहेको छ"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr ""
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:619
+#, fuzzy
+msgid "You must be authenticated to upload a file."
+msgstr "तपाईँले फाइल निर्दिष्ट गर्नु पर्दछ, डाइरेक्टरी होइन।\n"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:695
+#, fuzzy
+msgid "The album has already been inserted."
+msgstr "किरिङ अघिबाटै खोलिएको छ ।"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr ""
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:330
+#: ../gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr ""
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:431
+#: ../gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr ""
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+
+#. Translators: the parameter is a URI.
+#: ../gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr ""
--- /dev/null
+# Dutch translation for libgdata.
+# This file is distributed under the same license as the libgdata package.
+# Willem Heppe <heppew@yahoo.com>, 2012
+# Wouter Bolsterlee <wbolster@gnome.org>, 2012
+# Reinout van Schouwen <reinouts@gnome.org>, 2013.
+# Justin van Steijn <jvs@fsfe.org>, 2016.
+# Nathan Follens <nthn@unseen.is>, 2015, 2017, 2019.
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-09-03 09:39+0000\n"
+"PO-Revision-Date: 2019-09-25 12:35+0200\n"
+"Last-Translator: Nathan Follens <nthn@unseen.is>\n"
+"Language-Team: Dutch <vertaling@vrijschrift.org>\n"
+"Language: nl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Poedit 2.2.3\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Batch-bewerkingen worden niet ondersteund door deze dienst."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "De server gaf een onjuist antwoord."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Kan geen verbinding maken met de server van deze dienst."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Kan geen verbinding maken met de proxyserver."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"URI of header van request ongeldig, of niet-ondersteunde niet-standaard "
+"parameter: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Authenticatie verplicht: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "De gevraagde resource is niet gevonden: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Het item is gewijzigd sinds de download: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Foutcode %u bij authenticatie: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "Om in te loggen moet een CAPTCHA ingevuld worden."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Voor dit account is een toepassingsspecifiek wachtwoord nodig. (%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Gebruikersnaam of wachtwoord is onjuist."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "Het e-mailadres van dit account is niet geverifieerd. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr ""
+"U bent niet akkoord gegaan met de gebruiksvoorwaarden van de dienst. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Dit account is gemigreerd. Log online in om een nieuwe gebruikersnaam en "
+"wachtwoord te ontvangen. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Dit account is verwijderd. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Dit account is uitgeschakeld. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "Toegang tot deze dienst is uitgeschakeld voor dit account. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Deze dienst is op dit moment niet beschikbaar. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "Dit item ondersteunt geen commentaar."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "Er kan geen toegevoegd worden bij dit item."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "Dit commentaar kan niet worden verwijderd."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Ongeldige seek-aanvraag"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr "De server verwierp de tijdelijke toegangsaanvraag."
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "OAuth 1.0-ondersteuning is uitgeschakeld."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "De gebruiker of server heeft geen toegang verleend."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Fout bij parsen XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Leeg document."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Fout bij parsen JSON: %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Buitenste JSON-knooppunt is geen object."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Een element ‘%s’ miste verplichte inhoud."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "De inhoud van een element ‘%s’ (‘%s’) was niet in ISO 8601-formaat."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr ""
+"De waarde van de eigenschap ‘%s’ van een element ‘%s’ (‘%s’) was onbekend."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "De inhoud van een element ‘%s’ (‘%s’) was onbekend."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Een verplichte eigenschap van een element ‘%s’ (%s) ontbrak."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Waarden voor eigenschappen ‘%s’ en ‘%s’ van een element ‘%s’ waren aanwezig "
+"terwijl alleen één van de twee is toegestaan."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Een verplicht element (%s) was niet aanwezig."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Een singleton element (%s) kwam meermaals voor."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "Een element ‘%s’ miste verplichte inhoud."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "De inhoud van een element ‘%s’ (‘%s’) was niet in ISO 8601-formaat."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Ongeldige JSON ontvangen van de server: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr ""
+"De inhoud van een element ‘%s’ (‘%s’) was niet in hexadecimaal RGB-formaat."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Foutcode %u bij opvragen: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Foutcode %u bij invoegen van een item: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Foutcode %u bij bijwerken van een item: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Foutcode %u bij verwijderen van een item: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Foutcode %u bij downloaden: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Foutcode %u bij uploaden: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Foutcode %u bij draaien van een batch-bewerking: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "Ongeldige doorverwijzing-URI: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Het item is al ingevoerd."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"Serverfout ontvangen na uploaden van een te hervatten gedeeltelijke upload."
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Stroom is al gesloten"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"U heeft de laatste tijd te veel API-aanroepen uitgevoerd. Wacht een paar "
+"minuten en probeer opnieuw."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "U moet zich authenticeren om dit te doen."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "U moet zich authenticeren om alle agenda's te bevragen."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "U moet zich authenticeren om uw eigen agenda's op te vragen."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "U moet zich authenticeren om contacten op te vragen."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "U moet zich authenticeren om contactgroepen op te vragen."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "De groep is al ingevoerd."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "U moet zich authenticeren om een groep in te voeren."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "U moet zich authenticeren om documenten te downloaden."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Onbekend of niet ondersteund document-exportformaat ‘%s’."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "Ongeldige zichtbaarheid: onbekende waarde ‘%s’"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "U moet zich authenticeren om documenten op te vragen."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "U moet zich authenticeren om documenten te uploaden."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "Het document is al geüpload."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "U moet zich authenticeren om documenten bij te werken."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr "Het type van het aangeleverde document (‘%s’) werd niet herkend."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "U moet zich authenticeren om documenten te kopiëren."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "Bovenliggende map niet gevonden"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+"U moet zich authenticeren om documenten en folders te verplaatsen of in te "
+"voegen."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr "U moet zich authenticeren om documenten en folders te verplaatsen."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "Eigenschap ‘%s’ bevat geen afbeelding"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"U moet een gebruikersnaam geven of zich authenticeren om een gebruiker op te "
+"vragen."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "Query-parameter niet toegestaan voor albums."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"U moet een gebruikersnaam opgeven of zich authenticeren om alle albums te "
+"bevragen."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "Het album bevatte geen verwijzing naar een feed."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "U moet zich authenticeren om een bestand te uploaden."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "Het album is al ingevoerd."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "U moet zich authenticeren om een album in te voegen."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr "U moet zich authenticeren om alle takenlijsten te bevragen."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "U moet zich authenticeren om uw eigen taken op te vragen."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Uw heeft het item-quota overschreden. Verwijder enkele items en probeer dan "
+"opnieuw."
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Uw Google-account moet geassocieerd zijn met een YouTube-kanaal om dit te "
+"doen. Bezoek %s om er een aan te maken."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "U moet zich authenticeren om een video te uploaden."
+
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "Een element ‘%s’ miste verplichte inhoud."
+
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr ""
+#~ "De inhoud van een element ‘%s’ (\"%s\") was niet in ISO 8601-formaat."
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "De agenda heeft geen inhoud-URI."
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "Deze service is op dit moment niet beschikbaar."
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr "Onbekende foutcode ‘%s’ in domein ‘%s’ ontvangen met locatie ‘%s’."
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "Onbekende en niet-verwerkbare fout ontvangen."
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "De video heeft geen <link> naar gerelateerde video's."
--- /dev/null
+# Occitan (post 1500) translation for libgdata
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the libgdata package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
+# Cédric Valmary (Tot en òc) <cvalmary@yahoo.fr>, 2015.
+# Cédric Valmary (totenoc.eu) <cvalmary@yahoo.fr>, 2016.
+# Cédric VALMARY <cvalmary@yahoo.fr>, 2017.
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata\n"
+"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?product=libgda"
+"ta&keywords=I18N+L10N&component=General\n"
+"POT-Creation-Date: 2017-02-24 23:45+0000\n"
+"PO-Revision-Date: 2017-04-12 09:57+0200\n"
+"Last-Translator: Cédric VALMARY <cvalmary@yahoo.fr>\n"
+"Language-Team: Tot en òc (totenoc.eu)\n"
+"Language: oc\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+"X-Generator: Virtaal 0.7.1\n"
+"X-Launchpad-Export-Date: 2015-05-21 17:56+0000\n"
+"X-Project-Style: gnome\n"
+
+#: ../gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Las operacions per lòts son pas presas en carga per aqueste servici."
+
+#: ../gdata/gdata-client-login-authorizer.c:629
+#: ../gdata/gdata-oauth1-authorizer.c:840
+#: ../gdata/gdata-oauth1-authorizer.c:1116
+#: ../gdata/gdata-oauth2-authorizer.c:953
+#: ../gdata/gdata-oauth2-authorizer.c:964
+#: ../gdata/gdata-oauth2-authorizer.c:983
+#: ../gdata/gdata-oauth2-authorizer.c:999
+#: ../gdata/gdata-oauth2-authorizer.c:1064
+#: ../gdata/gdata-oauth2-authorizer.c:1076
+#: ../gdata/gdata-oauth2-authorizer.c:1087
+#: ../gdata/gdata-oauth2-authorizer.c:1102
+#: ../gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "La responsa del servidor es pas confòrma"
+
+#: ../gdata/gdata-client-login-authorizer.c:649 ../gdata/gdata-service.c:361
+#, c-format, c-format
+#| msgid "Cannot connect to the service's server."
+msgid "Cannot connect to the service’s server."
+msgstr "Impossible de se connectar al servidor del servici."
+
+#: ../gdata/gdata-client-login-authorizer.c:654 ../gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Impossible de se connectar al servidor mandatari."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: ../gdata/gdata-client-login-authorizer.c:660 ../gdata/gdata-service.c:372
+#: ../gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Requèsta URI o entèsta invalida, o paramètre anormal pas pres en carga : %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:666 ../gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Autentificacion requesida : %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:671 ../gdata/gdata-service.c:383
+#: ../gdata/services/calendar/gdata-calendar-service.c:313
+#: ../gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "La ressorsa demandada es pas estada trobada : %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:677 ../gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "L'entrada es estada modificada dempuèi son telecargament : %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:689 ../gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Còdi d'error %u al moment de l'autentificacion : %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: ../gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "Un CAPTCHA deu èsser completat per se connectar."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Aqueste compte necessita un senhal especific a l'aplicacion. (%s)"
+
+#: ../gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Nom d'utilizaire o senhal incorrècte."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:854
+#, c-format, c-format
+#| msgid "Your account's e-mail address has not been verified. (%s)"
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "L'adreça electronica de vòstre compte es pas verificada (%s)."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:859
+#, c-format, c-format
+#| msgid "You have not agreed to the service's terms and conditions. (%s)"
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Avètz pas acceptat las condicions generalas del servici (%s)."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Aqueste compte es estat migrat. Connectatz-vos en linha per recebre vòstre "
+"novèl nom d'utilizaire e vòstre novèl senhal (%s)."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Aqueste compte es estat suprimit (%s)."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Aqueste compte es estat desactivat (%s)."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:880
+#, c-format, c-format
+#| msgid "This account's access to this service has been disabled. (%s)"
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "L'accès a aqueste servici es desactivat per aqueste compte (%s)."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Aqueste servici es pas disponible pel moment (%s)."
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:262
+msgid "This entry does not support comments."
+msgstr "Aquesta entrada gerís pas los comentaris."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: ../gdata/gdata-commentable.c:349 ../gdata/gdata-commentable.c:435
+msgid "Comments may not be added to this entry."
+msgstr "Es pas possible d'apondre de comentaris a aquesta entrada."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:518 ../gdata/gdata-commentable.c:594
+msgid "This comment may not be deleted."
+msgstr "Aqueste comentari pòt pas èsser suprimit."
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Requèsta « seek » invalida"
+
+#: ../gdata/gdata-oauth1-authorizer.c:815
+msgid "The server rejected the temporary credentials request."
+msgstr ""
+"Lo servidor a regetat la requèsta de donadas d'autentificacion provisòria."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1090
+#: ../gdata/gdata-oauth2-authorizer.c:1113
+#: ../gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "L'accès es estat refusat per l'utilizaire o lo servidor."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:352 ../gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Error al moment de l'analisi XML : %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Document void."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:483 ../gdata/gdata-parsable.c:521
+#: ../gdata/services/documents/gdata-documents-access-rule.c:144
+#: ../gdata/services/documents/gdata-documents-access-rule.c:154
+#: ../gdata/services/documents/gdata-documents-document.c:286
+#: ../gdata/services/documents/gdata-documents-entry.c:478
+#: ../gdata/services/documents/gdata-documents-entry.c:489
+#: ../gdata/services/documents/gdata-documents-entry.c:500
+#: ../gdata/services/documents/gdata-documents-entry.c:547
+#: ../gdata/services/documents/gdata-documents-entry.c:558
+#: ../gdata/services/documents/gdata-documents-entry.c:666
+#: ../gdata/services/documents/gdata-documents-entry.c:701
+#: ../gdata/services/documents/gdata-documents-entry.c:716
+#: ../gdata/services/documents/gdata-documents-entry.c:731
+#: ../gdata/services/documents/gdata-documents-entry.c:761
+#: ../gdata/services/documents/gdata-documents-entry.c:777
+#: ../gdata/services/documents/gdata-documents-feed.c:81
+#: ../gdata/services/documents/gdata-documents-feed.c:92
+#: ../gdata/services/documents/gdata-documents-feed.c:142
+#: ../gdata/services/documents/gdata-documents-feed.c:160
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Error al moment de l'analisi JSON : %s"
+
+#: ../gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Lo nosèl JSON lo mai a l'exterior es pas un objècte."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Un element %s conten pas lo contengut requesit."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:85
+#, c-format, c-format
+#| msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "Lo contengut d'un element %s (« %s ») es pas dins lo format ISO 8601."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: ../gdata/gdata-parser.c:105
+#, c-format, c-format
+#| msgid "The value of the %s property of a %s element (\"%s\") was unknown."
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "La valor de la proprietat %s d'un element %s (« %s ») es desconeguda."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: ../gdata/gdata-parser.c:123
+#, c-format, c-format
+#| msgid "The content of a %s element (\"%s\") was unknown."
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "Lo contengut d'un element %s (« %s ») es desconegut."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Una proprietat requesida d'un element %s (%s) es mancanta."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"De valors son presentas per las proprietats %s e %s d'un element %s mentre "
+"qu'una sola de las doas es autorizada."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Un element requesit (%s) es mancant."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: ../gdata/gdata-parser.c:200 ../gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Un element singleton (%s) es a doble."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: ../gdata/gdata-parser.c:273
+#, c-format, c-format
+#| msgid "A %s element was missing required content."
+msgid "A ‘%s’ element was missing required content."
+msgstr "Un element « %s » conten pas lo contengut requesit."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:303
+#, c-format, c-format
+#| msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "Lo contengut d'un element %s (« %s ») es pas dins lo format ISO 8601."
+
+#. Translators: the parameter is an error message.
+#: ../gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "JSON invalid recebut del servidor : %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: ../gdata/gdata-parser.c:1179
+#, c-format, c-format
+#| msgid ""
+#| "The content of a %s element (\"%s\") was not in hexadecimal RGB format."
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr ""
+"Lo contengut d'un element %s (« %s ») es pas dins lo format RVB exadecimal."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Còdi d'error %u al moment de la requèsta : %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Còdi d'error %u al moment de l'insercion d'una entrada : %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Còdi d'error %u al moment de la mesa a jorn d'una entrada : %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Còdi d'error %u al moment de la supression d'una entrada : %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Còdi d'error %u al moment del telecargament : %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Còdi d'error %u al moment del mandadís : %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Còdi d'error %u al moment de l'aviada d'un lòt d'operacions : %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "L'URI redirigit es pas valid : %s"
+
+#: ../gdata/gdata-service.c:1466
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:626
+#: ../gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "L'entrada es estat inserida ja."
+
+#. Resumable upload error.
+#: ../gdata/gdata-upload-stream.c:794 ../gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr "Error recebuda del servidor aprèp un mandadís que pòt èsser représ."
+
+#: ../gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Lo flux es tampat ja"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:302
+#: ../gdata/services/tasks/gdata-tasks-service.c:195
+#: ../gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Avètz efectuat tròp d'apèls API en pauc de temps. Pacientatz qualques "
+"minutas puèi ensajatz tornamai."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:334
+#: ../gdata/services/tasks/gdata-tasks-service.c:204
+#: ../gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Vos cal vos autentificar per far aquò."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:465
+#: ../gdata/services/calendar/gdata-calendar-service.c:516
+msgid "You must be authenticated to query all calendars."
+msgstr "Vos cal vos autentificar per interrogar totes los calendièrs."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:562
+#: ../gdata/services/calendar/gdata-calendar-service.c:613
+#: ../gdata/services/calendar/gdata-calendar-service.c:675
+#: ../gdata/services/calendar/gdata-calendar-service.c:734
+msgid "You must be authenticated to query your own calendars."
+msgstr "Vos cal vos autentificar per interrogar vòstres pròpris calendièrs."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:308
+msgid "You must be authenticated to query contacts."
+msgstr "Vos cal vos autentificar per interrogar de contactes."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:424
+#: ../gdata/services/contacts/gdata-contacts-service.c:474
+msgid "You must be authenticated to query contact groups."
+msgstr "Vos cal vos autentificar per interrogar de gropes de contactes."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:514
+msgid "The group has already been inserted."
+msgstr "Lo grop es ja estat inserit."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:521
+msgid "You must be authenticated to insert a group."
+msgstr "Vos cal vos autentificar per inserir un grop."
+
+#: ../gdata/services/documents/gdata-documents-document.c:392
+msgid "You must be authenticated to download documents."
+msgstr "Vos cal vos autentificar per telecargar de documents."
+
+#: ../gdata/services/documents/gdata-documents-document.c:401
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Format d'expòrt de document « %s » desconegut o pas pres en carga."
+
+#: ../gdata/services/documents/gdata-documents-service.c:454
+#: ../gdata/services/documents/gdata-documents-service.c:504
+msgid "You must be authenticated to query documents."
+msgstr "Vos cal vos autentificar per interrogar de documents."
+
+#: ../gdata/services/documents/gdata-documents-service.c:569
+msgid "You must be authenticated to upload documents."
+msgstr "Vos cal vos autentificar per mandar de documents."
+
+#: ../gdata/services/documents/gdata-documents-service.c:575
+msgid "The document has already been uploaded."
+msgstr "Lo document es estat mandat ja"
+
+#: ../gdata/services/documents/gdata-documents-service.c:720
+msgid "You must be authenticated to update documents."
+msgstr "Vos cal vos autentificar per metre a jorn de documents."
+
+#: ../gdata/services/documents/gdata-documents-service.c:887
+#, c-format, c-format
+#| msgid ""
+#| "The content type of the supplied document ('%s') could not be recognized."
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr ""
+"Lo tipe de contengut del document provesit (« %s ») a pas pogut èsser "
+"identificat."
+
+#: ../gdata/services/documents/gdata-documents-service.c:927
+msgid "You must be authenticated to copy documents."
+msgstr "Vos cal vos autentificar per copiar de documents."
+
+#: ../gdata/services/documents/gdata-documents-service.c:955
+msgid "Parent folder not found"
+msgstr "Dorsièr parent introbable"
+
+#: ../gdata/services/documents/gdata-documents-service.c:1102
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+"Vos cal vos autentificar per inserir o suprimir de documents e de dorsièrs."
+
+#: ../gdata/services/documents/gdata-documents-service.c:1303
+msgid "You must be authenticated to move documents and folders."
+msgstr "Vos cal vos autentificar per desplaçar de documents e de dorsièrs."
+
+#: ../gdata/services/freebase/gdata-freebase-service.c:479
+#, c-format, c-format
+#| msgid "Property '%s' does not hold an image"
+msgid "Property ‘%s’ does not hold an image"
+msgstr "La proprietat « %s » conten pas un imatge"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Vos cal indicar un nom d'utilizaire o vos autentificar per interrogar un "
+"utilizaire."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:387
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "Query parameter not allowed for albums."
+msgstr "Paramètre de requèsta pas autorizat pels albums."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:394
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:455
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Vos cal indicar un nom d'utilizaire o vos autentificar per interrogar totes "
+"los albums."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:476
+msgid "The album did not have a feed link."
+msgstr "L'album possedís pas de ligam de flux."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:633
+msgid "You must be authenticated to upload a file."
+msgstr "Vos cal vos autentificar per mandar un fichièr."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:709
+msgid "The album has already been inserted."
+msgstr "L'album es ja estat inserit."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:716
+msgid "You must be authenticated to insert an album."
+msgstr "Vos cal vos autentificar per inserir un album."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:330
+#: ../gdata/services/tasks/gdata-tasks-service.c:381
+msgid "You must be authenticated to query all tasklists."
+msgstr "Vos cal vos autentificar per interrogar totas las listas de prètzfaits."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:430
+#: ../gdata/services/tasks/gdata-tasks-service.c:487
+msgid "You must be authenticated to query your own tasks."
+msgstr "Vos cal vos autentificar per interrogar vòstres pròpris prètzfaits."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Avètz depassat vòstre quota d'entradas. Suprimissètz qualques entradas e "
+"ensajatz tornamai."
+
+#. Translators: the parameter is a URI.
+#: ../gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Vòstre compte Google deu èsser associat a una cadena YouTube per far aquò. "
+"Visitatz %s per ne crear una."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Vos cal vos autentificar per mandar una vidèo."
+
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "Un element « %s » conten pas lo contengut requesit."
+
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr ""
+#~ "Lo contengut (« %2$s ») de l'element « %1$s » es pas dins lo format ISO "
+#~ "8601."
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "Lo calendièr possedís pas cap d'URI de contengut."
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "Aqueste servici es pas disponible pel moment."
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr ""
+#~ "Còdi d'error desconegut « %s » dins lo domeni « %s » recebut a "
+#~ "l'emplaçament « %s »."
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "Error recebuda desconeguda o pas analisabla."
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "La vidèo a pas de vidèo connèxa <link>."
--- /dev/null
+# Oriya translation for libgdata.
+# Copyright (C) 2011 libgdata's COPYRIGHT HOLDER
+# This file is distributed under the same license as the libgdata package.
+#
+# Manoj Kumar Giri <mgiri@redhat.com>, 2011.
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug."
+"cgi?product=libgdata&keywords=I18N+L10N&component=general\n"
+"POT-Creation-Date: 2011-07-10 11:51+0000\n"
+"PO-Revision-Date: 2011-09-23 11:01+0530\n"
+"Last-Translator: Manoj Kumar Giri <mgiri@redhat.com>\n"
+"Language-Team: Oriya <or@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Lokalize 1.2\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"Language: or\n"
+
+#: ../gdata/gdata-client-login-authorizer.c:575
+#: ../gdata/gdata-oauth1-authorizer.c:770
+#: ../gdata/gdata-oauth1-authorizer.c:1029
+msgid "The server returned a malformed response."
+msgstr "ସର୍ଭରଟି ଗୋଟିଏ ତ୍ରୁଟିଯୁକ୍ତ ଉତ୍ତର ଦେଇଥିଲା।"
+
+#: ../gdata/gdata-client-login-authorizer.c:595 ../gdata/gdata-service.c:316
+#, c-format
+msgid "Cannot connect to the service's server."
+msgstr "ସର୍ଭିସର ସର୍ଭର ସହିତ ସଂୟୋଗ କରିପାରିବେ ନାହିଁ।"
+
+#: ../gdata/gdata-client-login-authorizer.c:600 ../gdata/gdata-service.c:321
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "ପ୍ରକ୍ସି ସର୍ଭର ସହିତ ସଂୟୋଗ କରିପାରିବେ ନାହିଁ।"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:606 ../gdata/gdata-service.c:327
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr "ଅବୈଧ ଅନୁରୋଧ URI କିମ୍ବା ଶୀର୍ଷକ, ଅଥବା ଅସମର୍ଥିତ ମାନ୍ୟତାହୀନ ପ୍ରାଚଳ: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:612 ../gdata/gdata-service.c:333
+#, c-format
+msgid "Authentication required: %s"
+msgstr "ବୈଧିକରଣ ଆବଶ୍ଯକ: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:617 ../gdata/gdata-service.c:338
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "ଅନୁରୋଧ କରାଯାଇଥିବା ଉତ୍ସଟି ମିଳିଲା ନାହିଁ: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:623 ../gdata/gdata-service.c:344
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "ଭରଣଟିକୁ ପରିବର୍ତ୍ତନ କରାଯାଇଛି ଯେହେତୁ ଏହାକୁ ଆହରଣ କରାଯାଇଥିଲା: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:635 ../gdata/gdata-service.c:358
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "ବୈଧିକରଣ କରିବା ସମୟରେ ତ୍ରୁଟି ସଂକେତ %u: %s"
+
+#: ../gdata/gdata-client-login-authorizer.c:728
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "ଗୋଟିଏ CAPTCHA ଲଗଇନ ହେବା ପାଇଁ ନିଶ୍ଚିତ ଭାବରେ ପୁରଣ ହେବା ଉଚିତ।"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:766
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "ଏହି ଖାତାଟି ଗୋଟିଏ ପ୍ରୟୋଗ ନିର୍ଦ୍ଦିଷ୍ଟ ପ୍ରବେଶ ସଂକେତ ଆବଶ୍ୟକ କରିଥାଏ। (%s)"
+
+#: ../gdata/gdata-client-login-authorizer.c:773
+msgid "Your username or password were incorrect."
+msgstr "ଆପଣଙ୍କର ଚାଳକନାମ କିମ୍ବା ପ୍ରବେଶ ସଂକେତ ଭୁଲ ଥିଲା।"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:794
+#, c-format
+msgid "Your account's e-mail address has not been verified. (%s)"
+msgstr "ଆପଣଙ୍କର ଖାତାର ଇ-ମେଲ ଠିକଣାକୁ ଯାଞ୍ଚ କରାଯାଇନାହିଁ। (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:799
+#, c-format
+msgid "You have not agreed to the service's terms and conditions. (%s)"
+msgstr "ଆପଣ ସର୍ଭିସର ନିତୀ ନିୟମକୁ ଗ୍ରହଣ କରିନାହାନ୍ତି। (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:805
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"ଏହି ଖାତାକୁ ସ୍ଥାନାନ୍ତରିତ କରାଯାଇଛି। ଆପଣଙ୍କର ନୂତନ ଚାଳକନାମ ଏବଂ ପ୍ରବେଶ ସଂକେତକୁ "
+"ଗ୍ରହଣ କରିବା "
+"ପାଇଁ ଲଗଇନ କରନ୍ତୁ। (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:810
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "ଏହି ଖାତାକୁ ଅପସାରଣ କରାଯାଇଛି। (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:815
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "ଏହି ଖାତାକୁ ନିଷ୍କ୍ରିୟ କରାଯାଇଛି। (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:820
+#, c-format
+msgid "This account's access to this service has been disabled. (%s)"
+msgstr "ଏହି ସର୍ଭିସ ପାଇଁ ଖାତାର ଅଭିଗମ୍ୟତାକୁ ନିଷ୍କ୍ରିୟ କରାଯାଇଛି। (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:825
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "ବର୍ତ୍ତମାନ ସର୍ଭିସ ଉପଲବ୍ଧ ନାହିଁ। (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:262
+msgid "This entry does not support comments."
+msgstr "ଏହି ନିବେଶଟି ଟିପ୍ପଣୀଗୁଡ଼ିକୁ ସହାୟତା କରେ ନାହିଁ।"
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#: ../gdata/gdata-commentable.c:349 ../gdata/gdata-commentable.c:435
+msgid "Comments may not be added to this entry."
+msgstr "ଟିପ୍ପଣୀଗୁଡ଼ିକ ଏହି ନିବେଶରେ ଯୋଗ ହୋଇଥାଇ ନପାରେ।"
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:518 ../gdata/gdata-commentable.c:594
+#| msgid "This account has been deleted. (%s)"
+msgid "This comment may not be deleted."
+msgstr "ଏହି ଟିପ୍ପଣୀକୁ ଅପସାରଣ କରାଯାଇନପାରେ।"
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:751
+msgid "Invalid seek request"
+msgstr "ଅବୈଧ ଅନୁସନ୍ଧାନ ଅନୁରୋଧ"
+
+#: ../gdata/gdata-oauth1-authorizer.c:745
+msgid "The server rejected the temporary credentials request."
+msgstr "ସର୍ଭରଟି ଅସ୍ଥାୟୀ ଅଧିକାର ଅନୁରୋଧକୁ ପ୍ରତ୍ୟାଖାନ କରିଛି।"
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1007
+msgid "Access was denied by the user or server."
+msgstr "ଚାଳକ କିମ୍ବା ସର୍ଭର ଦ୍ୱାରା ପ୍ରବେଶାନୁମତି ଦିଆଯାଇନଥିଲା।"
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:245 ../gdata/gdata-parsable.c:256
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "XML ବିଶ୍ଳେଷଣ କରିବା ସମୟରେ ତୃଟି: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:258
+msgid "Empty document."
+msgstr "ଖାଲି ଦଲିଲ।"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:66
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "ଗୋଟିଏ %s ଉପାଦାନରେ ଆବଶ୍ୟକୀୟ ବିଷୟବସ୍ତୁ ଅନୁପସ୍ଥିତ ଥିଲା।"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:82
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+msgstr "%s ଉପାଦାନର ଗୋଟିଏ ବିଷୟବସ୍ତୁ (\"%s\") ISO 8601 ଶୈଳୀରେ ନଥିଲା।"
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element ("00:01:42.500") was unknown.
+#: ../gdata/gdata-parser.c:102
+#, c-format
+msgid "The value of the %s property of a %s element (\"%s\") was unknown."
+msgstr "%s ଉପାଦାନର %s ଗୁଣଧର୍ମର ମୂଲ୍ୟ (\"%s\") ଜଣାନଥିଲା।"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element ("protected") was unknown.
+#: ../gdata/gdata-parser.c:120
+#, c-format
+msgid "The content of a %s element (\"%s\") was unknown."
+msgstr "%s ଉପାଦାନର ଗୋଟିଏ ବିଷୟବସ୍ତୁ (\"%s\") ଜଣା ନଥିଲା।"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:140
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "%s ଉପାଦାନ (%s) ର ଗୋଟିଏ ଆବଶ୍ୟକୀୟ ଉପାଦାନ ଉପସ୍ଥିତ ନଥିଲା।"
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:163
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"%s ଉପାଦାନର ଗୁଣଧର୍ମ %s ଏବଂ %s ଉପସ୍ଥିତ ଥିଲା ଯେତେବେଳେ କେବଳ ଏହି ଦୁଇଟି ମଧ୍ଯରୁ "
+"ଗୋଟିକୁ ଅନୁମତି "
+"ଦିଆଯାଇଥିଲା।"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:182
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "ଗୋଟିଏ ଆବଶ୍ୟକୀୟ ଉପାଦାନ (%s) ଉପସ୍ଥିତ ନଥିଲା।"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#: ../gdata/gdata-parser.c:197
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "ଗୋଟିଏ ଏକୁଟିଆ ଉପାଦାନ (%s) କୁ ନକଲ କରାଯାଇଥିଲା।"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:364
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "ପ୍ରଶ୍ନ ପଚାରିବା ସମୟରେ ତ୍ରୁଟି ସଂକେତ %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:370
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "ଗୋଟିଏ ଭରଣକୁ ଭର୍ତ୍ତି କରିବା ସମୟରେ %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:376
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "ଗୋଟିଏ ଭରଣକୁ ଅଦ୍ୟତନ କରିବା ସମୟରେ %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:382
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "ଗୋଟିଏ ଭରଣକୁ ଅପସାରଣ କରିବା ସମୟରେ %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:388
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "ଆହରଣ କରିବା ସମୟରେ ତ୍ରୁଟି ସଂକେତ %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:394
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "ଧାରଣ କରିବା ସମୟରେ ତ୍ରୁଟି ସଂକେତ %u: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:400
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "ଗୋଟିଏ ସମୂହ ପ୍ରୟୋଗ ଚାଲିଥିବା ସମୟରେ ତ୍ରୁଟି ସଂକେତ %u: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:674
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "ଅବୈଧ ପୁନଃ ନିର୍ଦ୍ଦିଷ୍ଟ URI: %s"
+
+#: ../gdata/gdata-service.c:1325
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:624
+#: ../gdata/services/youtube/gdata-youtube-service.c:836
+msgid "The entry has already been inserted."
+msgstr "ଏହି ଭରଣକୁ ପୂର୍ବରୁ ଭର୍ତ୍ତି କରାସରିଛି।"
+
+#: ../gdata/gdata-upload-stream.c:785
+msgid "Stream is already closed"
+msgstr "ଧାରାଟି ପୂର୍ବରୁ ବନ୍ଦ ଅଛି"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element ("00FG56") was not in hexadecimal RGB format.
+#: ../gdata/services/calendar/gdata-calendar-calendar.c:406
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in hexadecimal RGB format."
+msgstr "%s ଉପାଦାନର ଗୋଟିଏ ବିଷୟବସ୍ତୁ (\"%s\") ଶୋହଳମିକ RGB ଶୈଳୀରେ ନଥିଲା।"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:315
+#: ../gdata/services/calendar/gdata-calendar-service.c:366
+msgid "You must be authenticated to query all calendars."
+msgstr ""
+"ସମସ୍ତ କ୍ୟାଲେଣ୍ଡରଗୁଡ଼ିକୁ ପଚାରିବା ପାଇଁ ଆପଣ ନିଶ୍ଚିତ ଭାବରେ ବୈଧିକୃତ ହୋଇଥିବା ଉଚିତ।"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:412
+#: ../gdata/services/calendar/gdata-calendar-service.c:463
+#: ../gdata/services/calendar/gdata-calendar-service.c:508
+#: ../gdata/services/calendar/gdata-calendar-service.c:568
+msgid "You must be authenticated to query your own calendars."
+msgstr ""
+"ଆପଣଙ୍କ ନିଜର କ୍ୟାଲେଣ୍ଡରଗୁଡ଼ିକୁ ପଚାରିବା ପାଇଁ ଆପଣ ନିଶ୍ଚିତ ଭାବରେ ବୈଧିକୃତ ହୋଇଥିବା "
+"ଉଚିତ।"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:517
+#: ../gdata/services/calendar/gdata-calendar-service.c:581
+msgid "The calendar did not have a content URI."
+msgstr "କ୍ୟାଲେଣ୍ଡରରେ ବିଷୟବସ୍ତୁ URI ନଥିଲା।"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:308
+msgid "You must be authenticated to query contacts."
+msgstr "ସମ୍ପର୍କଗୁଡ଼ିକୁ ପଚାରିବା ପାଇଁ ଆପଣ ନିଶ୍ଚିତ ଭାବରେ ବୈଧିକୃତ ହୋଇଥିବା ଉଚିତ।"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:424
+#: ../gdata/services/contacts/gdata-contacts-service.c:474
+msgid "You must be authenticated to query contact groups."
+msgstr ""
+"ସମ୍ପର୍କ ଶ୍ରେଣୀଗୁଡ଼ିକୁ ପଚାରିବା ପାଇଁ ଆପଣ ନିଶ୍ଚିତ ଭାବରେ ବୈଧିକୃତ ହୋଇଥିବା ଉଚିତ।"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:514
+msgid "The group has already been inserted."
+msgstr "ଏହି ସମୂହକୁ ପୂର୍ବରୁ ଭର୍ତ୍ତି କରାସରିଛି।"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:521
+msgid "You must be authenticated to insert a group."
+msgstr "ଗୋଟିଏ ଶ୍ରେଣୀକୁ ଭର୍ତ୍ତି ପାଇଁ ଆପଣ ନିଶ୍ଚିତ ଭାବରେ ବୈଧିକୃତ ହୋଇଥିବା ଉଚିତ।"
+
+#: ../gdata/services/documents/gdata-documents-document.c:274
+msgid "You must be authenticated to download documents."
+msgstr "ଦଲିଲ ଆହରଣ କରିବା ପାଇଁ ଆପଣ ନିଶ୍ଚିତ ଭାବରେ ବୈଧିକୃତ ହୋଇଥିବା ଉଚିତ।"
+
+#: ../gdata/services/documents/gdata-documents-service.c:357
+#: ../gdata/services/documents/gdata-documents-service.c:412
+msgid "You must be authenticated to query documents."
+msgstr "ଦଲିଲଗୁଡ଼ିକ ବିଷୟରେ ପଚାରିବା ପାଇଁ ଆପଣ ନିଶ୍ଚିତ ଭାବରେ ବୈଧିକୃତ ହୋଇଥିବା ଉଚିତ।"
+
+#: ../gdata/services/documents/gdata-documents-service.c:491
+msgid "You must be authenticated to upload documents."
+msgstr "ଦଲିଲଗୁଡ଼ିକୁ ଧାରଣ କରିବା ପାଇଁ ଆପଣ ନିଶ୍ଚିତ ଭାବରେ ବୈଧିକୃତ ହୋଇଥିବା ଉଚିତ।"
+
+#: ../gdata/services/documents/gdata-documents-service.c:497
+msgid "The document has already been uploaded."
+msgstr "ଏହି ଦଲିଲକୁ ପୂର୍ବରୁ ଧାରଣ କରାସରିଛି।"
+
+#: ../gdata/services/documents/gdata-documents-service.c:552
+msgid "You must be authenticated to update documents."
+msgstr "ଦଲିଲଗୁଡ଼ିକୁ ଅଦ୍ୟତନ କରିବା ପାଇଁ ଆପଣ ନିଶ୍ଚିତ ଭାବରେ ବୈଧିକୃତ ହୋଇଥିବା ଉଚିତ।"
+
+#: ../gdata/services/documents/gdata-documents-service.c:615
+#, c-format
+msgid ""
+"The content type of the supplied document ('%s') could not be recognized."
+msgstr "ପ୍ରଦତ୍ତ ଦଲିଲ ('%s') ର ବିଷୟବସ୍ତୁ ପ୍ରକାରକୁ ଚିହ୍ନି ହେଲା ନାହିଁ।"
+
+#: ../gdata/services/documents/gdata-documents-service.c:664
+#: ../gdata/services/documents/gdata-documents-service.c:849
+msgid "You must be authenticated to move documents and folders."
+msgstr ""
+"ଦଲିଲ ଏବଂ ଫୋଲଡରଗୁଡ଼ିକୁ ଘୁଞ୍ଚାଇବା ପାଇଁ ଆପଣ ନିଶ୍ଚିତ ଭାବରେ ବୈଧିକୃତ ହୋଇଥିବା ଉଚିତ।"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"ଆପଣ ନିଶ୍ଚିତ ଭାବରେ ଗୋଟିଏ ଚାଳକନାମ ଉଲ୍ଲେଖ କରିବା ଉଚିତ କିମ୍ବା ଗୋଟିଏ ଚାଳକକୁ ପଚାରିବା "
+"ପାଇଁ ବୈଧିକୃତ "
+"ହୋଇଥିବା ଉଚିତ।"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:387
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "Query parameter not allowed for albums."
+msgstr "ଆଲବମଗୁଡ଼ିକ ପାଇଁ ପ୍ରଶ୍ନ ପ୍ରାଚଳ ଅନୁମୋଦିତ ନୁହଁ।"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:394
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:455
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"ଆପଣ ନିଶ୍ଚିତ ଭାବରେ ଗୋଟିଏ ଚାଳକନାମ ଉଲ୍ଲେଖ କରିବା ଉଚିତ କିମ୍ବା ସମସ୍ତ ଆଲବମଗୁଡ଼ିକୁ "
+"ପଚାରିବା ପାଇଁ "
+"ବୈଧିକୃତ ହୋଇଥିବା ଉଚିତ।"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:476
+msgid "The album did not have a feed link."
+msgstr "ଆଲବମରେ ପ୍ରବେଶ ସଂଯୋଗିକୀ ନଥିଲା।"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:631
+msgid "You must be authenticated to upload a file."
+msgstr "ଗୋଟିଏ ଫାଇଲକୁ ଧାରଣ କରିବା ପାଇଁ ଆପଣ ନିଶ୍ଚିତ ଭାବରେ ବୈଧିକୃତ ହୋଇଥିବା ଉଚିତ।"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:707
+msgid "The album has already been inserted."
+msgstr "ଏହି ଆଲବମକୁ ପୂର୍ବରୁ ଭର୍ତ୍ତି କରାସରିଛି।"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:714
+msgid "You must be authenticated to insert an album."
+msgstr "ଗୋଟିଏ ଆଲବମକୁ ଭର୍ତ୍ତି ପାଇଁ ଆପଣ ନିଶ୍ଚିତ ଭାବରେ ବୈଧିକୃତ ହୋଇଥିବା ଉଚିତ।"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:417
+#, c-format
+msgid "This service is not available at the moment."
+msgstr "ବର୍ତ୍ତମାନ ସର୍ଭିସ ଉପଲବ୍ଧ ନାହିଁ।"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:421
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "ଏହାକୁ କରିବା ପାଇଁ ଆପଣ ନିଶ୍ଚିତ ଭାବରେ ବୈଧିକୃତ ହୋଇଥିବା ଉଚିତ।"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:426
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"ଆପଣ ନିକଟରେ ଅତ୍ୟଧିକ API ଡ଼ାକରା ଦେଇଛନ୍ତି। ଦୟାକରି କିଛି ସମୟ ଅପେକ୍ଷା କରନ୍ତୁ ଏବଂ "
+"ପୁଣିଥରେ "
+"ଚେଷ୍ଟାକରନ୍ତୁ।"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:429
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"ଆପଣ ନିଜର ଭରଣ ଭାଗକୁ ଅତିକ୍ରମ କରିସାରିଛନ୍ତି। ଦୟାକରି ସେଥିରୁ କିଛି ଭରଣକୁ ଅପସାରଣ "
+"କରନ୍ତୁ ଏବଂ ପୁଣିଥରେ "
+"ଚେଷ୍ଟା କରନ୍ତୁ।"
+
+#. Translators: the first parameter is an error code, which is a coded string.
+#. * The second parameter is an error domain, which is another coded string.
+#. * The third parameter is the location of the error, which is either a URI or an XPath.
+#: ../gdata/services/youtube/gdata-youtube-service.c:436
+#: ../gdata/services/youtube/gdata-youtube-service.c:442
+#, c-format
+msgid ""
+"Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+msgstr ""
+"ଡମେନ \"%s\" ରେ ଅବସ୍ଥାନ \"%s\" ସହିତ ଅଜଣା ତ୍ରୁଟି ସଂକେତ \"%s\" ଗ୍ରହଣ କରାଯାଇଛି।"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:460
+#, c-format
+msgid "Unknown and unparsable error received."
+msgstr "ଅଜଣା ଏବଂ ବିଶ୍ଳେଷଣ ହୋଇନଥିବା ତ୍ରୁଟି ଗ୍ରହଣ କରାଯାଇଛି।"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:724
+#: ../gdata/services/youtube/gdata-youtube-service.c:781
+msgid "The video did not have a related videos <link>."
+msgstr "ଏହି ଭିଡିଓରେ ସମ୍ପୃକ୍ତ ଭିଡିଓଗୁଡ଼ିକ ନଥିଲା <link>."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:843
+msgid "You must be authenticated to upload a video."
+msgstr "ଗୋଟିଏ ଭିଡିଓକୁ ଧାରଣ କରିବା ପାଇଁ ଆପଣ ନିଶ୍ଚିତ ଭାବରେ ବୈଧିକୃତ ହୋଇଥିବା ଉଚିତ।"
+
--- /dev/null
+# Punjabi translation of libgdata.
+# Copyright (C) 2009 libgdata's COPYRIGHT HOLDER
+# This file is distributed under the same license as the libgdata package.
+#
+# A S Alam <aalam@users.sf.net>, 2009, 2011, 2012, 2013, 2014.
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=libgdata&keywords=I18N+L10N&component=general\n"
+"POT-Creation-Date: 2014-09-21 09:20+0000\n"
+"PO-Revision-Date: 2014-09-21 08:42-0500\n"
+"Last-Translator: A S Alam <aalam@users.sf.net>\n"
+"Language-Team: Punjabi/Panjabi <punjabi-users@lists.sf.net>\n"
+"Language: pa\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Lokalize 1.5\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+
+#: ../gdata/gdata-client-login-authorizer.c:627
+#: ../gdata/gdata-oauth1-authorizer.c:839
+#: ../gdata/gdata-oauth1-authorizer.c:1115
+msgid "The server returned a malformed response."
+msgstr "ਸਰਵਰ ਨੇ ਨਿਕਾਰਾ ਜਵਾਬ ਦਿੱਤਾ ਹੈ।"
+
+#: ../gdata/gdata-client-login-authorizer.c:647 ../gdata/gdata-service.c:350
+#, c-format
+msgid "Cannot connect to the service's server."
+msgstr "ਸਰਵਿਸ ਦੇ ਸਰਵਰ ਨਾਲ ਕੁਨੈਕਟ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਦਾ।"
+
+#: ../gdata/gdata-client-login-authorizer.c:652 ../gdata/gdata-service.c:355
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "ਪਰਾਕਸੀ ਸਰਵਰ ਨਾਲ ਕੁਨੈਕਟ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਦਾ।"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:658 ../gdata/gdata-service.c:361
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr "ਗਲਤ ਮੰਗਿਆ URI ਜਾਂ ਹੈੱਡਰ ਹੈ, ਜਾਂ ਨਾ-ਸਹਾਇਕ ਗ਼ੈਰ-ਸਟੈਂਡਰਡ ਪੈਰਾਮੀਟਰ: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:664 ../gdata/gdata-service.c:367
+#, c-format
+msgid "Authentication required: %s"
+msgstr "ਪਰਮਾਣਕਿਤਾ ਲੋੜੀਦੀ: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:669 ../gdata/gdata-service.c:372
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "ਮੰਗਿਆ ਸਰੋਤ ਨਹੀਂ ਲੱਭਿਆ: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:675 ../gdata/gdata-service.c:378
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "ਡਾਊਨਲੋਡ ਕਰਨ ਦੇ ਬਾਅਦ ਐਂਟਰੀ ਨੂੰ ਬਦਲਿਆ ਗਿਆ ਹੈ: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:687 ../gdata/gdata-service.c:392
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "ਪਰਮਾਣਿਤ ਹੋਣ ਦੌਰਾਨ ਗਲਤੀ ਕੋਡ %u : %s"
+
+#: ../gdata/gdata-client-login-authorizer.c:786
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "ਲਾਗਇਨ ਕਰਨ ਲਈ CAPTCHA ਭਰਨਾ ਲਾਜ਼ਮੀ ਹੈ।"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:824
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "ਇਹ ਅਕਾਊਂਟ ਲਈ ਐਪਲੀਕੇਸ਼ਨ ਲਈ ਪਾਸਵਰਡ ਚਾਹੀਦਾ ਹੈ। (%s)"
+
+#: ../gdata/gdata-client-login-authorizer.c:831
+msgid "Your username or password were incorrect."
+msgstr "ਤੁਹਾਡਾ ਯੂਜ਼ਰ-ਨਾਂ ਜਾਂ ਪਾਸਵਰਡ ਠੀਕ ਨਹੀਂ ਹੈ।"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:852
+#, c-format
+msgid "Your account's e-mail address has not been verified. (%s)"
+msgstr "ਤੁਹਾਡਾ ਅਕਾਊਂਟ ਦੇ ਈਮੇਲ ਐਡਰੈੱਸ ਨੂੰ ਜਾਂਚਿਆ ਨਹੀਂ ਜਾ ਚੁੱਕਿਆ ਹੈ। (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:857
+#, c-format
+msgid "You have not agreed to the service's terms and conditions. (%s)"
+msgstr "ਤੁਸੀਂ ਸਰਵਿਸ ਦੀਆਂ ਸ਼ਰਤਾਂ ਅਤੇ ਇਕਰਾਰਨਾਮੇ ਨਾਲ ਸਹਿਮਤ ਨਹੀਂ ਹੋਏ ਹੋ। (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:863
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"ਇਹ ਅਕਾਊਂਟ ਮਾਈਗਰੇਟ ਕੀਤਾ ਜਾ ਚੁੱਕਾ ਹੈ। ਆਪਣਾ ਨਵਾਂ ਯੂਜ਼ਰ ਨਾਂ ਅਤੇ ਪਾਸਵਰਡ ਲੈਣ ਲਈ "
+"ਆਨਲਾਈਨ ਲਾਗ ਇਨ "
+"ਕਰੋ ਜੀ। (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:868
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "ਇਹ ਅਕਾਊਂਟ ਹਟਾਇਆ ਗਿਆ (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:873
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "ਇਹ ਅਕਾਊਂਟ ਆਯੋਗ ਹੈ। (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:878
+#, c-format
+msgid "This account's access to this service has been disabled. (%s)"
+msgstr "ਇਸ ਅਕਾਊਂਟ ਲਈ ਇਸ ਸਰਵਿਸ ਲਈ ਪਹੁੰਚ ਆਯੋਗ ਕੀਤੀ ਜਾ ਚੁੱਕੀ ਹੈ। (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:883
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "ਇਹ ਸਰਵਿਸ ਇਸ ਸਮੇਂ ਉਪਲੱਬਧ ਨਹੀਂ ਹੈ। (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:262
+msgid "This entry does not support comments."
+msgstr "ਇਹ ਐਂਟਰੀ ਟਿੱਪਣੀਆਂ ਲਈ ਸਹਾਇਕ ਨਹੀਂ ਹੈ।"
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#: ../gdata/gdata-commentable.c:349 ../gdata/gdata-commentable.c:435
+msgid "Comments may not be added to this entry."
+msgstr "ਇਹ ਐਂਟਰੀ ਲਈ ਟਿੱਪਣੀਆਂ ਸ਼ਾਇਦ ਨਹੀਂ ਜੋੜੀਆਂ ਜਾ ਸਕਦੀਆਂ।"
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:518 ../gdata/gdata-commentable.c:594
+msgid "This comment may not be deleted."
+msgstr "ਇਹ ਟਿੱਪਣੀ ਸ਼ਾਇਦ ਹਟਾਈ ਨਹੀਂ ਜਾ ਸਕਦੀ ਹੈ।"
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:762
+msgid "Invalid seek request"
+msgstr "ਸੀਕ ਮੰਗ ਗਲਤ ਹੈ"
+
+#: ../gdata/gdata-oauth1-authorizer.c:814
+msgid "The server rejected the temporary credentials request."
+msgstr "ਸਰਵਰ ਨੇ ਆਰਜ਼ੀ ਸਨਦ (credentials) ਮੰਗ ਨੂੰ ਰੱਦ ਕਰ ਦਿੱਤਾ ਹੈ।"
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1089
+msgid "Access was denied by the user or server."
+msgstr "ਯੂਜ਼ਰ ਜਾਂ ਸਰਵਰ ਵਲੋਂ ਅਸੈਸ ਤੋਂ ਇਨਕਾਰ ਕੀਤਾ ਗਿਆ ਸੀ।"
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:349 ../gdata/gdata-parsable.c:360
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "XML ਪਾਰਸਿੰਗ ਗਲਤੀ: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:362
+msgid "Empty document."
+msgstr "ਖਾਲੀ ਡੌਕੂਮੈਂਟ ਹੈ। "
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:480 ../gdata/gdata-parsable.c:518
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "JSON ਵਜੋਂ ਪਾਰਸਿੰਗ ਗਲਤੀ: %s"
+
+#: ../gdata/gdata-parsable.c:519
+msgid "Outermost JSON node is not an object."
+msgstr "ਸਭ ਤੋਂ ਬਾਹਰੀ JSON ਨੋਡ ਆਬਜੈਕਟ ਨਹੀਂ ਹੈ।"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "%s ਐਲੀਮੈਂਟ ਲੋੜੀਦੀ ਸਮੱਗਰੀ ਵਿੱਚੋਂ ਗੁੰਮ ਹੈ।"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+msgstr "%s ਐਲੀਮੈਂਟ (\"%s\") ਦੀ ਸਮੱਗਰੀ ISO 8601 ਫਾਰਮੈਟ ਵਿੱਚ ਨਹੀਂ ਹੈ।"
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element ("00:01:42.500") was unknown.
+#: ../gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (\"%s\") was unknown."
+msgstr "%2$s ਐਲੀਮੈਂਟ (\"%3$s\") ਦੀ ਵਿਸ਼ੇਸ਼ਤਾ %1$s ਦਾ ਮੁੱਲ ਅਣਜਾਣ ਹੈ।"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element ("protected") was unknown.
+#: ../gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (\"%s\") was unknown."
+msgstr "%s ਐਲੀਮੈਂਟ (\"%s\") ਦੀ ਸਮੱਗਰੀ ਅਣਜਾਣ ਹੈ।"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "%s ਐਲੀਮੈਂਟ (%s) ਦੀ ਲੋੜੀਦੀ ਵਿਸ਼ੇਸ਼ਤਾ ਮੌਜੂਦ ਨਹੀਂ ਸੀ।"
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"ਵਿਸ਼ੇਸ਼ਤਾ %1$s ਅਤੇ %3$s ਐਲੀਮੈਂਟ ਦੀ %2$s ਲਈ ਮੁੱਲ ਮੌਜੂਦ ਸਨ, ਜਦੋਂ ਕਿ ਇਹਨਾਂ ਦੋ "
+"ਵਿੱਚੋਂ ਇੱਕ ਹੀ ਮਨਜ਼ੂਰ "
+"ਹੈ।"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "ਲੋੜੀਦਾ ਐਲੀਮੈਂਟ (%s) ਮੌਜੂਦ ਨਹੀਂ ਸੀ।"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: ../gdata/gdata-parser.c:200 ../gdata/gdata-parser.c:305
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "ਸਿਗਲਟੋਨ ਐਲੀਮੈਂਟ (%s) ਡੁਪਲੀਕੇਟ ਸੀ।"
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A 'title' element was missing required content.
+#: ../gdata/gdata-parser.c:291
+#, c-format
+msgid "A '%s' element was missing required content."
+msgstr "'%s' ਐਲੀਮੈਂਟ ਲੋੜੀਦੀ ਸਮੱਗਰੀ ਵਿੱਚੋਂ ਗੁੰਮ ਹੈ।"
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a 'uploaded' element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:321
+#, c-format
+msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+msgstr "'%s' ਐਲੀਮੈਂਟ (\"%s\") ਦੀ ਸਮੱਗਰੀ ISO 8601 ਫਾਰਮੈਟ ਵਿੱਚ ਨਹੀਂ ਹੈ।"
+
+#. Translators: the parameter is an error message.
+#: ../gdata/gdata-parser.c:331
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "ਸਰਵਰ ਤੋਂ ਗਲਤੀ JSON ਮਿਲਿਆ: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:398
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "ਕਿਊਰੀ ਕਰਨ ਦੌਰਾਨ ਗਲਤੀ ਕੋਡ %u : %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:404
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "ਐਂਟਰੀ ਸ਼ਾਮਲ ਕਰਨ ਦੌਰਾਨ ਗਲਤੀ ਕੋਡ %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:410
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "ਐਂਟਰੀ ਅੱਪਡੇਟ ਕਰਨ ਦੌਰਾਨ ਗਲਤੀ ਕੋਡ %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:416
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "ਐਂਟਰੀ ਹਟਾਉਣ ਦੌਰਾਨ ਗਲਤੀ ਕੋਡ %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:422
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "ਅੱਪਲੋਡ ਕਰਨ ਦੌਰਾਨ ਗਲਤੀ ਕੋਡ %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:428
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "ਅੱਪਲੋਡ ਕਰਨ ਦੌਰਾਨ ਗਲਤੀ ਕੋਡ %u : %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:434
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "ਬੈਂਚ ਕਾਰਵਾਈ ਚਲਾਉਣ ਦੌਰਾਨ ਗਲਤੀ ਕੋਡ %u ਮਿਲਿਆ: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:726
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "ਅਢੁੱਕਵਾਂ ਰੀਡਾਇਰੈਕਟ URI: %s"
+
+#: ../gdata/gdata-service.c:1406
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:624
+#: ../gdata/services/youtube/gdata-youtube-service.c:888
+msgid "The entry has already been inserted."
+msgstr "ਐਂਟਰੀ ਪਹਿਲਾਂ ਹੀ ਸ਼ਾਮਲ ਕੀਤੀ ਗਈ।"
+
+#. Resumable upload error.
+#: ../gdata/gdata-upload-stream.c:748 ../gdata/gdata-upload-stream.c:830
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"ਮੁੜ-ਪ੍ਰਾਪਤੀ ਯੋਗ ਅੱਪਲੋਡ ਭਾਗ ਅੱਪਲੋਡ ਕਰਨ ਦੇ ਬਾਅਦ ਸਰਵਰ ਤੋਂ ਗਲਤੀ ਪ੍ਰਾਪਤ ਹੋਈ।"
+
+#: ../gdata/gdata-upload-stream.c:896
+msgid "Stream is already closed"
+msgstr "ਸਟਰੀਮ ਪਹਿਲਾਂ ਹੀ ਬੰਦ ਹੈ"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element ("00FG56") was not in hexadecimal RGB format.
+#: ../gdata/services/calendar/gdata-calendar-calendar.c:406
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in hexadecimal RGB format."
+msgstr "%s ਐਲੀਮੈਂਟ (\"%s\") ਦੀ ਸਮੱਗਰੀ ਹੈਕਾਡੈਸੀਮਲ RGB ਫਾਰਮੈਟ ਵਿੱਚ ਨਹੀਂ ਹੈ।"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:315
+#: ../gdata/services/calendar/gdata-calendar-service.c:366
+msgid "You must be authenticated to query all calendars."
+msgstr "ਸਭ ਕੈਲੰਡਰਾਂ ਬਾਰੇ ਜਾਣਕਾਰੀ ਲਈ ਤੁਹਾਨੂੰ ਪਰਮਾਣਿਤ ਹੋਣਾ ਪਵੇਗਾ।"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:412
+#: ../gdata/services/calendar/gdata-calendar-service.c:463
+#: ../gdata/services/calendar/gdata-calendar-service.c:508
+#: ../gdata/services/calendar/gdata-calendar-service.c:568
+msgid "You must be authenticated to query your own calendars."
+msgstr "ਤੁਹਾਨੂੰ ਆਪਣੇ ਕੈਲੰਡਰ ਨਾਲ ਜਾਣਕਾਰੀ ਲੈਣ ਲਈ ਪਰਮਾਣਿਤ ਹੋਣਾ ਪਵੇਗਾ।"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:517
+#: ../gdata/services/calendar/gdata-calendar-service.c:581
+msgid "The calendar did not have a content URI."
+msgstr "ਕੈਲੰਡਰ ਕੋਲ ਸਮੱਗਰੀ URI ਨਹੀਂ ਹੈ।"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:308
+msgid "You must be authenticated to query contacts."
+msgstr "ਸੰਪਰਕਾਂ ਬਾਰੇ ਜਾਣਕਾਰੀ ਲਈ ਤੁਹਾਨੂੰ ਪਰਮਾਣਿਤ ਹੋਣਾ ਪਵੇਗਾ।"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:424
+#: ../gdata/services/contacts/gdata-contacts-service.c:474
+msgid "You must be authenticated to query contact groups."
+msgstr "ਸੰਪਰਕਾਂ ਬਾਰੇ ਜਾਣਕਾਰੀ ਲਈ ਤੁਹਾਨੂੰ ਪਰਮਾਣਿਤ ਹੋਣਾ ਪਵੇਗਾ।"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:514
+msgid "The group has already been inserted."
+msgstr "ਗਰੁੱਪ ਪਹਿਲਾਂ ਹੀ ਸ਼ਾਮਲ ਕੀਤਾ ਜਾ ਚੁੱਕਾ ਹੈ।"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:521
+msgid "You must be authenticated to insert a group."
+msgstr "ਤੁਹਾਨੂੰ ਗਰੁੱਪ ਸ਼ਾਮਲ ਕਰਨ ਲਈ ਪਰਮਾਣਿਤ ਹੋਵੇਗਾ।"
+
+#: ../gdata/services/documents/gdata-documents-document.c:300
+msgid "You must be authenticated to download documents."
+msgstr "ਤੁਹਾਨੂੰ ਡੌਕੂਮੈਂਟ ਡਾਊਨਲੋਡ ਕਰਨ ਲਈ ਪਰਮਾਣਿਤ ਹੋਵੇਗਾ।"
+
+#: ../gdata/services/documents/gdata-documents-service.c:461
+#: ../gdata/services/documents/gdata-documents-service.c:511
+msgid "You must be authenticated to query documents."
+msgstr "ਡੌਕੂਮੈਂਟ ਬਾਰੇ ਜਾਣਕਾਰੀ ਲਈ ਤੁਹਾਨੂੰ ਪਰਮਾਣਿਤ ਹੋਣਾ ਪਵੇਗਾ।"
+
+#: ../gdata/services/documents/gdata-documents-service.c:556
+msgid "You must be authenticated to upload documents."
+msgstr "ਤੁਹਾਨੂੰ ਡੌਕੂਮੈਂਟ ਅੱਪਲੋਡ ਕਰਨ ਲਈ ਪਰਮਾਣਿਤ ਹੋਣਾ ਪਵੇਗਾ।"
+
+#: ../gdata/services/documents/gdata-documents-service.c:562
+msgid "The document has already been uploaded."
+msgstr "ਡੌਕੂਮੈਂਟ ਪਹਿਲਾਂ ਹੀ ਅੱਪਲੋਡ ਕੀਤਾ ਚੁੱਕਾ ਹੈ।"
+
+#: ../gdata/services/documents/gdata-documents-service.c:706
+msgid "You must be authenticated to update documents."
+msgstr "ਡੌਕੂਮੈਂਟ ਅੱਪਡੇਟ ਕਰਨ ਲਈ ਤੁਹਾਨੂੰ ਪਰਮਾਣਿਤ ਹੋਣਾ ਪਵੇਗਾ।"
+
+#: ../gdata/services/documents/gdata-documents-service.c:888
+#, c-format
+msgid ""
+"The content type of the supplied document ('%s') could not be recognized."
+msgstr "ਦਿੱਤੇ ਡੌਕੂਮੈਂਟ ('%s') ਦੀ ਸਮੱਗਰੀ ਕਿਸਮ ਦੀ ਪਛਾਣ ਨਹੀਂ ਕੀਤੀ ਜਾ ਸਕੀ।"
+
+#: ../gdata/services/documents/gdata-documents-service.c:928
+msgid "You must be authenticated to copy documents."
+msgstr "ਡੌਕੂਮੈਂਟ ਕਾਪੀ ਕਰਨ ਲਈ ਤੁਹਾਨੂੰ ਪਰਮਾਣਿਤ ਹੋਣਾ ਪਵੇਗਾ।"
+
+#: ../gdata/services/documents/gdata-documents-service.c:1090
+#: ../gdata/services/documents/gdata-documents-service.c:1273
+msgid "You must be authenticated to move documents and folders."
+msgstr "ਤੁਹਾਨੂੰ ਡੌਕੂਮੈਂਟ ਅਤੇ ਫੋਲਡਰ ਹਿਲਾਉਣ ਲਈ ਪਰਮਾਣਿਤ ਹੋਣਾ ਪਵੇਗਾ।"
+
+#: ../gdata/services/freebase/gdata-freebase-service.c:445
+#, c-format
+msgid "Property '%s' does not hold an image"
+msgstr "ਵਿਸ਼ੇਸ਼ਤਾ '%s' ਵਿੱਚ ਚਿੱਤਰ ਨਹੀਂ ਹੈ"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"ਤੁਹਾਨੂੰ ਇੱਕ ਯੂਜ਼ਰ-ਨਾਂ ਦੇਣਾ ਚਾਹੀਦਾ ਹੈ ਜਾਂ ਯੂਜ਼ਰ ਬਾਰੇ ਜਾਣਕਾਰੀ ਲੈਣ ਲਈ ਪਰਮਾਣਿਤ "
+"ਹੋਣਾ ਪਵੇਗਾ।"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:387
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "Query parameter not allowed for albums."
+msgstr "ਐਲਬਮ ਲਈ ਕਿਊਰੀ ਪੈਰਾਮੀਟਰ ਮਨਜ਼ੂਰ ਨਹੀਂ ਹਨ।"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:394
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:455
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"ਤੁਹਾਨੂੰ ਇੱਕ ਯੂਜ਼ਰ-ਨਾਂ ਦੇਣਾ ਚਾਹੀਦਾ ਹੈ ਜਾਂ ਸਭ ਐਲਬਮਾਂ ਬਾਰੇ ਜਾਣਕਾਰੀ ਲੈਣ ਲਈ "
+"ਪਰਮਾਣਿਤ ਹੋਣਾ ਪਵੇਗਾ।"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:476
+msgid "The album did not have a feed link."
+msgstr "ਐਲਬਮ ਲਈ ਫੀਡ ਲਿੰਕ ਨਹੀਂ ਸੀ।"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:631
+msgid "You must be authenticated to upload a file."
+msgstr "ਤੁਹਾਨੂੰ ਫਾਇਲ ਅੱਪਲੋਡ ਕਰਨ ਲਈ ਪਰਮਾਣਿਤ ਹੋਣਾ ਪਵੇਗਾ।"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:707
+msgid "The album has already been inserted."
+msgstr "ਐਲਬਮ ਪਹਿਲਾਂ ਹੀ ਸ਼ਾਮਲ ਕੀਤੀ ਜਾ ਚੁੱਕੀ ਹੈ।"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:714
+msgid "You must be authenticated to insert an album."
+msgstr "ਤੁਹਾਨੂੰ ਐਲਬਮ ਸ਼ਾਮਲ ਕਰਨ ਲਈ ਪਰਮਾਣਿਤ ਹੋਵੇਗਾ।"
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:195
+#: ../gdata/services/youtube/gdata-youtube-service.c:478
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"ਤੁਸੀਂ ਹੁਣੇ ਹੁਣੇ ਬਹੁਤ ਜ਼ਿਆਦਾ API ਕਾਲ ਕੀਤੀਆਂ ਹਨ। ਕੁਝ ਮਿੰਟ ਲਈ ਉਡੀਕ ਕਰਨ ਦੇ ਬਾਅਦ "
+"ਮੁੜ-ਕੋਸ਼ਿਸ਼ ਕਰੋ।"
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:203
+#: ../gdata/services/youtube/gdata-youtube-service.c:473
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "ਤੁਹਾਨੂੰ ਇਹ ਕਰਨ ਲਈ ਪਰਮਾਣਿਤ ਹੋਵੇਗਾ।"
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:329
+#: ../gdata/services/tasks/gdata-tasks-service.c:380
+#| msgid "You must be authenticated to query all calendars."
+msgid "You must be authenticated to query all tasklists."
+msgstr "ਸਭ ਟਾਸਕ-ਸੂਚੀਆਂ ਬਾਰੇ ਜਾਣਕਾਰੀ ਲੈਣ ਲਈ ਤੁਹਾਨੂੰ ਪਰਮਾਣਿਤ ਹੋਣਾ ਪਵੇਗਾ।"
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:428
+#: ../gdata/services/tasks/gdata-tasks-service.c:484
+#| msgid "You must be authenticated to query your own calendars."
+msgid "You must be authenticated to query your own tasks."
+msgstr "ਤੁਹਾਨੂੰ ਆਪਣੇ ਟਾਸਕ ਲਈ ਜਾਣਕਾਰੀ ਲੈਣ ਲਈ ਪਰਮਾਣਿਤ ਹੋਣਾ ਪਵੇਗਾ।"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:457
+#, c-format
+msgid "This service is not available at the moment."
+msgstr "ਇਹ ਸਰਵਿਸ ਇਸ ਸਮੇਂ ਉਪਲੱਬਧ ਨਹੀਂ ਹੈ।"
+
+#. Translators: the parameter is a URI.
+#: ../gdata/services/youtube/gdata-youtube-service.c:462
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"ਇਹ ਕਰਨ ਲਈ ਤੁਹਾਡਾ ਗੂਗਲ ਖਾਤਾ ਯੂਟਿਊਬ ਚੈਨਲ ਨਾਲ ਸਬੰਧਿਤ ਹੋਣਾ ਚਾਹੀਦਾ ਹੈ। ਬਣਾਉਣ ਲਈ %s "
+"ਵੇਖੋ।"
+
+#. Translators: the first parameter is an error code, which is a coded string.
+#. * The second parameter is an error domain, which is another coded string.
+#. * The third parameter is the location of the error, which is either a URI or an XPath.
+#: ../gdata/services/youtube/gdata-youtube-service.c:467
+#: ../gdata/services/youtube/gdata-youtube-service.c:488
+#: ../gdata/services/youtube/gdata-youtube-service.c:494
+#, c-format
+msgid ""
+"Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+msgstr "\"%3$s\" ਟਿਕਾਣੇ ਨਾਲ ਡੋਮੇਨ \"%2$s\" ਵਿੱਚ ਅਣਜਾਣ ਗਲਤੀ ਕੋਡ \"%1$s\" ਮਿਲਿਆ"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:481
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"ਤੁਸੀਂ ਆਪਣੇ ਐਂਟਰੀ ਸੀਮਾ (ਕੋਟੇ) ਤੋਂ ਵੱਧ ਗਏ ਹੋ। ਕੁਝ ਐਂਟਰੀਆਂ ਹਟਾ ਕੇ ਫੇਰ ਕੋਸ਼ਿਸ਼ "
+"ਕਰੋ ਜੀ।"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:512
+#, c-format
+msgid "Unknown and unparsable error received."
+msgstr "ਅਣਜਾਣ ਅਤੇ ਨਾ-ਪਾਰਸ ਕਰਨ ਯੋਗ ਗਲਤੀ ਮਿਲੀ।"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:776
+#: ../gdata/services/youtube/gdata-youtube-service.c:833
+msgid "The video did not have a related videos <link>."
+msgstr "ਵਿਡੀਓ ਨਾਲ ਸਬੰਧਿਤ ਵਿਡੀਓ ਨਹੀਂ ਹਨ<link>।"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:895
+msgid "You must be authenticated to upload a video."
+msgstr "ਤੁਹਾਨੂੰ ਵਿਡੀਓ ਅੱਪਲੋਡ ਕਰਨ ਲਈ ਪਰਮਾਣਿਤ ਹੋਣਾ ਪਵੇਗਾ।"
+
--- /dev/null
+# Polish translation for libgdata.
+# Copyright © 2009-2019 the libgdata authors.
+# This file is distributed under the same license as the libgdata package.
+# Piotr Drąg <piotrdrag@gmail.com>, 2009-2019.
+# Aviary.pl <community-poland@mozilla.org>, 2009-2019.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-09-03 09:39+0000\n"
+"PO-Revision-Date: 2019-09-03 18:35+0200\n"
+"Last-Translator: Piotr Drąg <piotrdrag@gmail.com>\n"
+"Language-Team: Polish <community-poland@mozilla.org>\n"
+"Language: pl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
+"|| n%100>=20) ? 1 : 2);\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Działania wsadowe nie są obsługiwane przez tę usługę."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "Serwer zwrócił błędnie sformatowaną odpowiedź."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Nie można połączyć z serwerem usługi."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Nie można połączyć z serwerem pośrednika."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Nieprawidłowy adres URI żądania lub nagłówek, albo nieobsługiwany "
+"i niestandardowy parametr: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Uwierzytelnienie jest wymagane: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "Nie znaleziono żądanego zasobu: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Wpis został zmodyfikowany po pobraniu: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Kod błędu %u podczas uwierzytelniania: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "Pole CAPTCHA musi zostać wypełnione, aby się zalogować."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "To konto wymaga hasła dla konkretnego programu. (%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Nazwa użytkownika lub hasło jest nieprawidłowe."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "Adres e-mail konta nie został sprawdzony. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Nie wyrażono zgody na warunki usługi. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"To konto zostało migrowane. Proszę się zalogować online, aby otrzymać nową "
+"nazwę użytkownika i hasło. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "To konto zostało usunięte. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "To konto zostało wyłączone. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "Dostęp tego konta do tej usługi został wyłączony. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Ta usługa nie jest dostępna w tej chwili. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "Ten wpis nie obsługuje komentarzy."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "Komentarze nie mogą być dodawane do tego wpisu."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "Ten komentarz nie może zostać usunięty."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Nieprawidłowe żądanie przewinięcia"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr "Serwer odrzucił żądanie tymczasowych danych uwierzytelniających."
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "Obsługa OAuth 1.0 jest wyłączona."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "Dostęp został odmówiony przez użytkownika lub serwer."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Błąd podczas przetwarzania kodu XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Pusty dokument."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Błąd podczas przetwarzania kodu JSON: %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Najbardziej zewnętrzny węzeł JSON nie jest obiektem."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Brak wymaganej zawartości w elemencie %s."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "Zawartość elementu %s („%s”) nie jest w formacie ISO 8601."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "Wartość właściwości %s elementu %s („%s”) jest nieznana."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "Zawartość elementu %s („%s”) jest nieznana."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Wymagana właściwość elementu %s (%s) nie była obecna."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Wartości są przedstawiane dla właściwości %s i %s elementu %s, a tylko jedna "
+"z nich jest dozwolona."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Wymagany element (%s) nie był obecny."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Pojedynczy element (%s) występuje dwa razy."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "Brak wymaganej zawartości w elemencie „%s”."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "Zawartość elementu „%s” („%s”) nie jest w formacie ISO 8601."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Otrzymano nieprawidłowy kod JSON z serwera: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr "Zawartość elementu %s („%s”) nie jest w szesnastkowym formacie RGB."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Kod błędu %u podczas odpytywania: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Kod błędu %u podczas umieszczania wpisu: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Kod błędu %u podczas aktualizowania wpisu: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Kod błędu %u podczas usuwania wpisu: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Kod błędu %u podczas pobierania: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Kod błędu %u podczas wysyłania: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Kod błędu %u podczas wykonywania działania wsadowego: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "Nieprawidłowy adres URI przekierowania: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Wpis został już umieszczony."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr "Odebrano błąd z serwera po wysłaniu wznawialnego fragmentu."
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Strumień został już zamknięty"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Ostatnio wykonano za dużo wywołań API. Proszę poczekać kilka minut "
+"i spróbować ponownie."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Należy się uwierzytelnić, aby to zrobić."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "Należy się uwierzytelnić, aby odpytać wszystkie kalendarze."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "Należy się uwierzytelnić, aby odpytać własne kalendarze."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "Należy się uwierzytelnić, aby odpytać kontakty."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "Należy się uwierzytelnić, aby odpytać grupy kontaktów."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "Grupa została już umieszczona."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "Należy się uwierzytelnić, aby umieścić grupę."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "Należy się uwierzytelnić, aby pobrać dokumenty."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Nieznany lub nieobsługiwany format eksportu dokumentów „%s”."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "Nieprawidłowa widoczność: nieznana wartość „%s”"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "Należy się uwierzytelnić, aby odpytać dokumenty."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "Należy się uwierzytelnić, aby wysłać dokumenty."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "Dokument został już wysłany."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "Należy się uwierzytelnić, aby zaktualizować dokumenty."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr ""
+"Typ zawartości dostarczonego dokumentu („%s”) nie może zostać rozpoznany."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "Należy się uwierzytelnić, aby skopiować dokumenty."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "Nie odnaleziono nadrzędnego katalogu"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+"Należy się uwierzytelnić, aby wstawić lub przenieść dokumenty i katalogi."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr "Należy się uwierzytelnić, aby przenieść dokumenty i katalogi."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "Właściwość „%s” nie przechowuje obrazu"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Należy wprowadzić nazwę użytkownika lub się uwierzytelnić, aby odpytać "
+"użytkownika."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "Parametr odpytania nie jest dozwolony dla albumów."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Należy wprowadzić nazwę użytkownika lub się uwierzytelnić, aby odpytać "
+"wszystkie albumy."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "Album nie ma odnośnika do kanału."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "Należy się uwierzytelnić, aby wysłać plik."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "Album został już umieszczony."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "Należy się uwierzytelnić, aby umieścić album."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr "Należy się uwierzytelnić, aby odpytać wszystkie listy zadań."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "Należy się uwierzytelnić, aby odpytać własne zadania."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Przekroczono przydział wpisów. Proszę usunąć kilka wpisów i spróbować "
+"ponownie."
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Aby to zrobić, konto Google musi być powiązane z kanałem YouTube. Pod "
+"adresem %s można go utworzyć."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Należy się uwierzytelnić, aby wysłać nagranie wideo."
--- /dev/null
+# Portuguese translation for libgdata.
+# Copyright © 2009, 2010, 2011, 2013 libgdata
+# This file is distributed under the same license as the libgdata package.
+# António Lima <amrlima@gmail.com>, 2009, 2010, 2011, 2012, 2013.
+# Pedro Albuquerque <palbuquerque73@gmail.com>, 2015.
+# Sérgio Cardeira <cardeira.sergio@gmail.com>, 2016.
+# Tiago Santos <tiagofsantos81@sapo.pt>, 2014 - 2016.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=libgdata&keywords=I18N+L10N&component=General\n"
+"POT-Creation-Date: 2016-10-11 15:48+0000\n"
+"PO-Revision-Date: 2016-10-13 16:46+0100\n"
+"Last-Translator: Tiago Santos <tiagofsantos81@sapo.pt>\n"
+"Language-Team: Português <gnome_pt@yahoogroups.com>\n"
+"Language: pt\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Poedit 1.8.7.1\n"
+"X-Project-Style: gnome\n"
+
+#: ../gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Este serviço não suporta operações em lote."
+
+#: ../gdata/gdata-client-login-authorizer.c:629
+#: ../gdata/gdata-oauth1-authorizer.c:840
+#: ../gdata/gdata-oauth1-authorizer.c:1116
+#: ../gdata/gdata-oauth2-authorizer.c:953
+#: ../gdata/gdata-oauth2-authorizer.c:964
+#: ../gdata/gdata-oauth2-authorizer.c:983
+#: ../gdata/gdata-oauth2-authorizer.c:999
+#: ../gdata/gdata-oauth2-authorizer.c:1064
+#: ../gdata/gdata-oauth2-authorizer.c:1076
+#: ../gdata/gdata-oauth2-authorizer.c:1087
+#: ../gdata/gdata-oauth2-authorizer.c:1102
+#: ../gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "O servidor devolveu uma resposta mal formada."
+
+#: ../gdata/gdata-client-login-authorizer.c:649 ../gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Impossível ligar ao serviço do servidor."
+
+#: ../gdata/gdata-client-login-authorizer.c:654 ../gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Impossível ligar ao servidor proxy."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: ../gdata/gdata-client-login-authorizer.c:660 ../gdata/gdata-service.c:372
+#: ../gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Pedido de URI ou cabeçalho inválido, ou parâmetro não padrão não suportado: "
+"%s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:666 ../gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Autenticação requerida: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:671 ../gdata/gdata-service.c:383
+#: ../gdata/services/calendar/gdata-calendar-service.c:313
+#: ../gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "O recurso requerido não foi encontrado: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:677 ../gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "A entrada foi modificada desde que foi transferida: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:689 ../gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Código de erro %u ao autenticar: %s"
+
+#: ../gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "É necessário preencher um CAPTCHA para iniciar sessão."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Esta conta requer uma senha específica da aplicação. (%s)"
+
+#: ../gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "O seu nome de utilizador ou senha estavam incorretos."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "O endereço de email da sua conta não foi verificado. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Não concordou com os termos e condições do serviço. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Esta conta foi migrada. Por favor, inicie sessão online para receber o seu "
+"novo nome de utilizador e senha. (% s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Esta conta foi eliminada. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Esta conta foi desativada. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "O acesso desta conta a este serviço foi desativado. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Este serviço não se encontra disponível de momento. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:262
+msgid "This entry does not support comments."
+msgstr "Esta entrada não suporta comentários."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#: ../gdata/gdata-commentable.c:349 ../gdata/gdata-commentable.c:435
+msgid "Comments may not be added to this entry."
+msgstr "Não podem ser adicionados comentários a esta entrada."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:518 ../gdata/gdata-commentable.c:594
+msgid "This comment may not be deleted."
+msgstr "Este comentário não pode ser eliminado."
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Pedido de procura inválido"
+
+#: ../gdata/gdata-oauth1-authorizer.c:815
+msgid "The server rejected the temporary credentials request."
+msgstr "O servidor rejeitou o pedido de credenciais temporárias."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1090
+#: ../gdata/gdata-oauth2-authorizer.c:1113
+#: ../gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "O acesso foi negado pelo utilizador ou servidor."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:352 ../gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Erro ao processar XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Documento vazio."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:483 ../gdata/gdata-parsable.c:521
+#: ../gdata/services/documents/gdata-documents-access-rule.c:144
+#: ../gdata/services/documents/gdata-documents-access-rule.c:154
+#: ../gdata/services/documents/gdata-documents-document.c:286
+#: ../gdata/services/documents/gdata-documents-entry.c:456
+#: ../gdata/services/documents/gdata-documents-entry.c:467
+#: ../gdata/services/documents/gdata-documents-entry.c:478
+#: ../gdata/services/documents/gdata-documents-entry.c:525
+#: ../gdata/services/documents/gdata-documents-entry.c:536
+#: ../gdata/services/documents/gdata-documents-entry.c:631
+#: ../gdata/services/documents/gdata-documents-entry.c:666
+#: ../gdata/services/documents/gdata-documents-entry.c:681
+#: ../gdata/services/documents/gdata-documents-entry.c:696
+#: ../gdata/services/documents/gdata-documents-entry.c:726
+#: ../gdata/services/documents/gdata-documents-entry.c:742
+#: ../gdata/services/documents/gdata-documents-feed.c:81
+#: ../gdata/services/documents/gdata-documents-feed.c:92
+#: ../gdata/services/documents/gdata-documents-feed.c:142
+#: ../gdata/services/documents/gdata-documents-feed.c:160
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Erro ao processar JSON: %s"
+
+#: ../gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "O nó JSON mais exterior não é um objeto."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Um elemento %s tinha conteúdo requerido em falta."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "O conteúdo de um elemento %s (\"%s\") não estava no formato ISO 8601."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: ../gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "O valor da propriedade %s de um elemento %s (\"%s\") era desconhecido."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: ../gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "O conteúdo de um elemento %s (\"%s\") era desconhecido."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Uma propriedade requerida de um elemento %s (%s) não estava presente."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Estavam presentes valores para as propriedades %s e %s de um elemento %s "
+"quando apenas um dos dois é permitido"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Um elemento requerido (%s) não estava presente."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: ../gdata/gdata-parser.c:200 ../gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Um elemento singleton (%s) estava duplicado."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: ../gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "Um elemento %s tinha conteúdo requerido em falta."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "O conteúdo de um elemento %s (\"%s\") não estava no formato ISO 8601."
+
+#. Translators: the parameter is an error message.
+#: ../gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "JSON inválido recebido do servidor: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: ../gdata/gdata-parser.c:1179
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr ""
+"O conteúdo de um elemento %s (\"%s\") não estava no formato hexadecimal RGB."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Código de erro %u ao consultar: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Código de erro %u ao inserir uma entrada: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Código de erro %u ao atualizar uma entrada: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Código de erro %u ao eliminar uma entrada: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Código de erro %u ao transferir: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Código de erro %u ao enviar: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Código de erro %u ao executar uma operação em lote: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "URI de redirecionamento inválido: %s"
+
+#: ../gdata/gdata-service.c:1456
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:626
+#: ../gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "A entrada já foi inserida."
+
+#. Resumable upload error.
+#: ../gdata/gdata-upload-stream.c:794 ../gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"Erro recebido do servidor após o envio de um pedaço de envio retomável."
+
+#: ../gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Fluxo já se encontra fechado"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:302
+#: ../gdata/services/tasks/gdata-tasks-service.c:195
+#: ../gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Fez demasiadas chamadas à API recentemente. Por favor, aguarde alguns "
+"minutos e tente novamente."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:334
+#: ../gdata/services/tasks/gdata-tasks-service.c:204
+#: ../gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Tem de estar autenticado para fazer isto."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:465
+#: ../gdata/services/calendar/gdata-calendar-service.c:516
+msgid "You must be authenticated to query all calendars."
+msgstr "Tem de estar autenticado para consultar todos os calendários."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:562
+#: ../gdata/services/calendar/gdata-calendar-service.c:613
+#: ../gdata/services/calendar/gdata-calendar-service.c:675
+#: ../gdata/services/calendar/gdata-calendar-service.c:734
+msgid "You must be authenticated to query your own calendars."
+msgstr "Tem de estar autenticado para consultar os seus calendários."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:308
+msgid "You must be authenticated to query contacts."
+msgstr "Tem de estar autenticado para consultar contactos."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:424
+#: ../gdata/services/contacts/gdata-contacts-service.c:474
+msgid "You must be authenticated to query contact groups."
+msgstr "Tem de estar autenticado para consultar grupos."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:514
+msgid "The group has already been inserted."
+msgstr "O grupo já foi inserido."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:521
+msgid "You must be authenticated to insert a group."
+msgstr "Tem de estar autenticado para inserir um grupo."
+
+#: ../gdata/services/documents/gdata-documents-document.c:392
+msgid "You must be authenticated to download documents."
+msgstr "Tem de estar autenticado para transferir documentos."
+
+#: ../gdata/services/documents/gdata-documents-document.c:401
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr ""
+"Formato '%s' de exportação do documento desconhecido ou não suportador."
+
+#: ../gdata/services/documents/gdata-documents-service.c:513
+#: ../gdata/services/documents/gdata-documents-service.c:563
+msgid "You must be authenticated to query documents."
+msgstr "Tem de estar autenticado para consultar documentos."
+
+#: ../gdata/services/documents/gdata-documents-service.c:628
+msgid "You must be authenticated to upload documents."
+msgstr "Tem de estar autenticado para enviar documentos."
+
+#: ../gdata/services/documents/gdata-documents-service.c:634
+msgid "The document has already been uploaded."
+msgstr "O documento já foi enviado."
+
+#: ../gdata/services/documents/gdata-documents-service.c:779
+msgid "You must be authenticated to update documents."
+msgstr "Tem de estar autenticado para atualizar documentos."
+
+#: ../gdata/services/documents/gdata-documents-service.c:946
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr ""
+"Não foi possível reconhecer o tipo de conteúdo do documento fornecido (\"%s"
+"\")."
+
+#: ../gdata/services/documents/gdata-documents-service.c:986
+msgid "You must be authenticated to copy documents."
+msgstr "Tem de estar autenticado para copiar documentos."
+
+#: ../gdata/services/documents/gdata-documents-service.c:1014
+msgid "Parent folder not found"
+msgstr "Pasta-mãe não encontrada"
+
+#: ../gdata/services/documents/gdata-documents-service.c:1161
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr "Tem de estar autenticado para inserir ou mover documentos e pastas."
+
+#: ../gdata/services/documents/gdata-documents-service.c:1362
+msgid "You must be authenticated to move documents and folders."
+msgstr "Tem de estar autenticado para mover documentos e pastas."
+
+#: ../gdata/services/freebase/gdata-freebase-service.c:479
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "A propriedade \"%s\" não contém uma imagem"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Tem de especificar um nome de utilizador ou estar autenticado para consultar "
+"um utilizador."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:387
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "Query parameter not allowed for albums."
+msgstr "Parâmetro de consulta não autorizado para álbuns."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:394
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:455
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Tem de especificar um nome de utilizador ou estar autenticado para consultar "
+"todos os álbuns."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:476
+msgid "The album did not have a feed link."
+msgstr "O álbum não tinha uma ligação de fonte."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:633
+msgid "You must be authenticated to upload a file."
+msgstr "Tem de estar autenticado para enviar um ficheiro."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:709
+msgid "The album has already been inserted."
+msgstr "O álbum já foi inserido."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:716
+msgid "You must be authenticated to insert an album."
+msgstr "Tem de estar autenticado para inserir um álbum."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:330
+#: ../gdata/services/tasks/gdata-tasks-service.c:381
+msgid "You must be authenticated to query all tasklists."
+msgstr "Tem de estar autenticado para consultar todas as listas de tarefas."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:430
+#: ../gdata/services/tasks/gdata-tasks-service.c:487
+msgid "You must be authenticated to query your own tasks."
+msgstr "Tem de estar autenticado para consultar as suas tarefas."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Excedeu a sua cota de entradas. Por favor, apague algumas entradas e tente "
+"novamente."
+
+#. Translators: the parameter is a URI.
+#: ../gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"A sua Conta Google deve estar associada a um associada a um canal do YouTube "
+"para realizar esta ação. Visite %s para criar um."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Tem de estar autenticado para enviar um vídeo."
+
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "Um elemento \"%s\" tinha conteúdo requerido em falta."
+
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr ""
+#~ "O conteúdo de um elemento \"%s\" (\"%s\") não estava no formato ISO 8601."
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "O calendário não tinha um URI de conteúdo."
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "Este serviço não está disponível de momento."
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr ""
+#~ "Código de erro desconhecido \"%s\" no domínio \"%s\" recebido com "
+#~ "localização \"%s\"."
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "Erro desconhecido e não analisável recebido."
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "O vídeo não tinha vídeos relacionados <link>."
+
+#~ msgid "The supplied document had an invalid content type."
+#~ msgstr "O documento fornecido possui um tipo de conteúdo inválido."
--- /dev/null
+# Brazilian Portuguese translation of libgdata.
+# Copyright (C) 2019 Philip Withnall.
+# This file is distributed under the same license as the libgdata package.
+# Leonardo Ferreira Fontenelle <leonardof@gnome.org>, 2009.
+# Og Maciel <ogmaciel@gnome.org>, 2009.
+# Djavan Fagundes <djavanf@gnome.org>, 2010.
+# Flamarion Jorge <jorge.flamarion@gmail.com>, 2009, 2011.
+# Enrico Nicoletto <liverig@gmail.com>, 2013, 2014, 2015.
+# Rafael Fontenelle <rafaelff@gnome.org>, 2013-2019.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-09-03 09:39+0000\n"
+"PO-Revision-Date: 2019-09-03 14:40-0300\n"
+"Last-Translator: Rafael Fontenelle <rafaelff@gnome.org>\n"
+"Language-Team: Brazilian Portuguese <gnome-pt_br-list@gnome.org>\n"
+"Language: pt_BR\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1)\n"
+"X-Generator: Gtranslator 3.32.0\n"
+"X-Project-Style: gnome\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Este serviço possui suporte às operações em lote."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "O servidor retornou uma resposta malformada."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Não é possível conectar ao servidor do serviço."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Não é possível conectar ao servidor de proxy."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Requisição de URI ou cabeçalho inválidos, ou parâmetro atípico sem suporte: "
+"%s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Autenticação requerida: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "O recurso requisitado não foi localizado: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "A entrada foi modificada desde que foi baixada: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Código de erro %u ao autenticar: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "Um CAPTCHA deve ser preenchido para a autenticação."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Esta conta requer uma senha especifica da aplicação. (%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Seu nome de usuário ou senha estavam incorretos."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "O endereço de e-mail da sua conta não foi verificado. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Você não aceitou os temos de serviços e condições. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Esta conta foi migrada. Por favor, conecte-se para receber seu nome de "
+"usuário e senha. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Esta conta foi excluída. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Esta conta foi desabilitada. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "O acesso desta conta para este serviço foi desabilitada. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "O serviço não está disponível no momento. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "Esta entrada não suporta comentários."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "Comentários não podem ser adicionados a esta entrada."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "Este comentários não pode ser apagado."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Pedido de procura inválido"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr "O servidor rejeitou a solicitação de credenciais temporárias."
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "Suporte a OAuth está desabilitado."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "Acesso foi negado pelo usuário ou servidor."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Erro ao analisar XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Documento vazio."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Erro ao analisar JSON: %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "O nó JSON mais externo não é um objeto."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Um elemento %s estava sem o conteúdo obrigatório."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "O conteúdo de um elemento %s (“%s”) não estava no formato ISO 8601."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "O valor da propriedade %s de um elemento %s (“%s”) era desconhecido."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "O conteúdo de um elemento %s (“%s”) era desconhecido."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Uma propriedade necessária de um elemento %s (%s) não estava presente."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Valores presentes para propriedades %s e %s de um elemento %s quando somente "
+"um de dois é permitido."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Um elemento necessário (%s) não estava presente."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Um elemento único (%s) estava duplicado."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "Um elemento “%s” estava sem o conteúdo obrigatório."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "O conteúdo de um elemento “%s” (“%s”) não estava no formato ISO 8601."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Foi recebido do servidor um JSON inválido: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr ""
+"O conteúdo de um elemento %s (“%s”) não estava em formato hexadecimal RGB."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Código de erro %u ao consultar: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Código de erro %u ao inserir uma entrada: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Código de erro %u ao atualizar uma entrada: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Código de erro %u ao excluir uma entrada: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Código de erro %u ao baixar: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Código de erro %u ao enviar: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Código de erro %u ao executar uma operação em lote: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "URI de redirecionamento inválida: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "A entrada já foi inserida."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr "Erro recebido do servidor após enviar um bloco de envio retomável."
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Fluxo já foi fechado"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Você fez muitas chamadas à API recentemente. Por favor, aguarde alguns "
+"minutos e tente novamente."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Você deve estar autenticado para fazer isto."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "Você deve estar autenticado para consultar todos os calendários."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "Você deve estar autenticado para consultar seus calendários."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "Você deve estar autenticado para consultar contatos."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "Você deve estar autenticado para consultar grupos de contato."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "O grupo já foi inserido."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "Você deve estar autenticado para inserir um grupo."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "Você deve estar autenticado para baixar documentos."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Formato de exportação de documento “%s” sem suporte ou desconhecido."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "Visibilidade inválida: valor não reconhecido “%s”"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "Você deve estar autenticado para consultar documentos."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "Você deve estar autenticado para enviar documentos."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "O documento já foi enviado."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "Você deve estar autenticado para atualizar documentos."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr ""
+"O tipo de conteúdo fornecido pelo documento (“%s”) não pôde ser reconhecido."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "Você deve estar autenticado para copiar documentos."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "Pasta pai não localizada"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+"Você precisa estar autenticado para inserir ou mover documentos e pastas."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr "Você deve estar autenticado para mover documentos e pastas."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "A propriedade “%s” não contém uma imagem"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Você deve especificar um nome de usuário ou estar autenticado para consultar "
+"um usuário."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "Parâmetro de consulta não é permitido para álbuns."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Você deve especificar um nome de usuário o estar autenticado para consultar "
+"todos os álbuns."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "O álbum não tinha um link de fonte de notícia (“feed”)."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "Você deve estar autenticado para enviar um arquivo."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "O álbum já foi inserido."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "Você deve estar autenticado para inserir um álbum."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr "Você deve estar autenticado para consultar todas as listas de tarefas."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "Você deve estar autenticado para consultar suas próprias tarefas."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Você excedeu sua cota entradas. Por favor, exclua algumas entradas e tente "
+"novamente."
+
+# Segui o padrão de nomenclatura de "Google Account" do próprio Google. Vide título em https://accounts.google.com/Login?hl=pt-br
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Sua Conta do Google deve estar associada a um canal YouTube para fazer isso. "
+"Visite %s para criar uma."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Você deve estar autenticado para enviar um vídeo."
+
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "Um elemento \"%s\" estava sem o conteúdo obrigatório."
+
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr ""
+#~ "O conteúdo de um elemento \"%s\" (\"%s\") não estava no formato ISO 8601."
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "O calendário não tinha uma URI de conteúdo."
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "O serviço não está disponível no momento."
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr ""
+#~ "Código de erro \"%s\" desconhecido no domínio \"%s\" recebido com "
+#~ "localização \"%s\"."
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "Erro não-manipulável ou desconhecido recebido."
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "O vídeo não tem um vídeo relacionado <link>."
--- /dev/null
+# Romanian translation for libgdata.
+# Copyright (C) 2010 libgdata's COPYRIGHT HOLDER
+# This file is distributed under the same license as the libgdata package.
+# Daniel Șerbănescu <cyber19rider@gmail.com>, 2010.
+# Lucian Adrian Grijincu <lucian.grijincu@gmail.com>, 2010, 2011.
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-09-03 09:39+0000\n"
+"PO-Revision-Date: 2019-09-03 20:16+0200\n"
+"Last-Translator: Daniel Șerbănescu <daniel [at] serbanescu [dot] dk>\n"
+"Language-Team: Romanian Gnome Team <gnomero-list@lists.sourceforge.net>\n"
+"Language: ro\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < "
+"20)) ? 1 : 2);;\n"
+"X-Generator: Poedit 2.2.3\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Operațiile în serie nu sunt suportate de acest serviciu."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "Serverul a întors un răspuns deteriorat."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Nu se poate conecta la serverul serviciului."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Nu se poate conecta la serverul proxy."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr "URI sau antet cerere nevalid sau parametru non-standard neacceptat: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Autentificare necesară: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "Resursa cerută nu a fost găsită: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Înregistrarea a fost modificată de când a fost descărcată: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Codul de eroare %u a intervenit în timpul autentificării: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "Un CAPTCHA trebuie completat pentru autentificare."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Acest cont necesită o parolă specifică de aplicație. (%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Numele de utilizator sau parola au fost incorecte."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "Adresa contului de email nu a fost verificată. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Nu ați fost de acord cu termenii și condițiile serviciului. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Acest cont a fost migrat. Autentificați-vă pentru a primi noul nume de "
+"utilizator și parola. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Acest cont a fost șters. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Acest cont a fost dezactivat. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "Accesul acestui cont la acest serviciu a fost dezactivat. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Acest serviciu este momentan indisponibil. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "Această intrare nu suportă comentarii."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "Nu se pot adăuga comentarii la această intrare."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "Este posibil ca acest comentariu să nu fie șters."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Cerere de căutare nevalidă"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr "Serverul a respins cererea de autorizări temporare."
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "Suportul pentru OAuth 1.0 a fost dezactivat."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "Accesul a fost respins de către utilizator sau server."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Eroare la parsarea XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Document gol."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Eroare la parsarea JSON: %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Cel mai îndepărtat nod JSON nu este un obiect."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Unui element %s îi lipsește conținutul necesar."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "Conținutul unui element %s („%s”) nu a fost în formatul ISO 8601."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "Valoarea proprietății %s a unui element %s („%s”) a fost necunoscută."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "Conținutul unui element %s („%s”) a fost necunoscut."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "O proprietate necesară a unui element %s (%s) nu a fost prezentă."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Au fost prezente valori pentru proprietățile %s și %s ale unui element %s "
+"când doar una dintre cele două este permisă."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Un element necesar (%s) nu a fost prezent."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Un element singleton (%s) a fost duplicat."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "Unui element „%s” îi lipsea conținutul necesar."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "Conținutul unui element „%s” („%s”) nu a fost în formatul ISO 8601."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "S-a primit un JSON nevalid de la serverul: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr "Conținutul unui element %s („%s”) nu a fost în format RGB hexazecimal."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Codul de eroare %u a interveni în timpul solicitării: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr ""
+"Codul de eroare %u a intervenit în timpul introducerii unei înregistrări: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr ""
+"Codul de eroare %u a intervenit în timpul actualizării unei înregistrări: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Codul de eroare %u a intervenit în timpul ștergerii înregistrării: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Codul de eroare %u a intervenit în timpul descărcării: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Codul de eroare %u a intervenit în timpul încărcării: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr ""
+"Codul de eroare %u a intervenit în timpul rulării unei operații pe loturi: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "URI de redirecționare nevalid: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Înregistrarea a fost deja introdusă."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"S-a primit o eroare de la server după încărcarea unei bucăți de încărcare "
+"care se poate relua."
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Fluxul este deja închis"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Recent ați apelat de prea multe ori interfața API. Așteptați câteva minute "
+"și încercați din nou."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Trebuie să fiți autentificat pentru a face asta."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "Trebuie să fiți autentificat pentru a interoga toate calendarele."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "Trebuie să fiți autentificat pentru a interoga propriile calendare."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "Trebuie să fiți autentificat pentru a interoga contactele."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "Trebuie să fiți autentificat pentru a interoga grupurile de contacte."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "Grupul a fost deja introdus."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "Trebuie să fiți autentificat pentru a introduce un grup."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "Trebuie să fiți autentificat pentru a descărca documente."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Format de exportare de document necunoscut sau nesuportat „%s”."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "Vizibilitate nevalidă: valoare nerecunoscută „%s”"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "Trebuie să fiți autentificat pentru a interoga documentele."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "Trebuie să fiți autentificat pentru a încărca documente."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "Documentul a fost deja încărcat."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "Trebuie să fiți autentificat pentru a actualiza documentele."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr ""
+"Tipul de conținut al documentului furnizat („%s”) nu a putut fi recunoscut."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "Trebuie să fiți autentificat pentru a copia documente."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "Nu s-a găsit dosarul superior"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+"Trebuie să fiți autentificat pentru a introduce sau muta documente și dosare."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr "Trebuie să fiți autentificat pentru a muta documente și dosare."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "Proprietatea „%s” nu ține o imagine"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Trebuie să specificați un nume de utilizator sau să fiți autentificat pentru "
+"a interoga un utilizator."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "Parametrul de interogare nu este permis pentru albume."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Trebuie să specificați un nume de utilizator sau să fiți autentificat pentru "
+"a interoga toate albumele."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "Albumul nu a avut o legătură către un flux."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "Trebuie să fiți autentificat pentru a încărca un fișier."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "Albumul a fost deja introdus."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "Trebuie să fiți autentificat pentru a introduce un album."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr "Trebuie să fiți autentificat pentru a interoga listele de activități."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "Trebuie să fiți autentificat pentru a interoga propriile activități."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Ați depășit cota de intrări. Ștergeți unele intrări și încercați din nou."
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Contul Google trebuie să fie asociat cu un canal Youtube pentru a face asta. "
+"Vizitați %s pentru a crea unul."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Trebuie să fiți autentificat pentru a încărca un film."
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "Calendarul nu a avut un URI către conținut."
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "Acest serviciu este momentan indisponibil."
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr ""
+#~ "Cod de eroare necunoscut „%s” în domeniul „%s” primit la adresa „%s”."
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "S-a primit o eroare necunoscută sau care nu poate fi prelucrată."
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "Acest film nu are un <link> către filme asemănătoare."
+
+#~ msgid "The supplied document had an invalid content type."
+#~ msgstr "Documentul furnizat a avut un tip de conținut nevalid."
--- /dev/null
+# translation of libgdata.master.ru.po to Russian
+# Russian translation for libgdata.
+# This file is distributed under the same license as the libgdata package.
+#
+# Alexandr Andrushchenko <diesel594@gmail.com>, 2009.
+# Andrew Grigorev <andrew@ei-grad.ru>, 2010.
+# Yuri Kozlov <yuray@komyakino.ru>, 2010, 2011, 2012.
+# Stas Solovey <whats_up@tut.by>, 2015, 2016.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
+"product=libgdata&keywords=I18N+L10N&component=General\n"
+"POT-Creation-Date: 2017-02-24 23:45+0000\n"
+"PO-Revision-Date: 2017-03-18 10:49+0400\n"
+"Last-Translator: Yuri Myasoedov <ymyasoedov@yandex.ru>\n"
+"Language-Team: Русский <gnome-cyr@gnome.org>\n"
+"Language: ru\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"X-Generator: Poedit 1.8.7.1\n"
+
+#: ../gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Пакетные операции не поддерживаются этой службой."
+
+#: ../gdata/gdata-client-login-authorizer.c:629
+#: ../gdata/gdata-oauth1-authorizer.c:840
+#: ../gdata/gdata-oauth1-authorizer.c:1116
+#: ../gdata/gdata-oauth2-authorizer.c:953
+#: ../gdata/gdata-oauth2-authorizer.c:964
+#: ../gdata/gdata-oauth2-authorizer.c:983
+#: ../gdata/gdata-oauth2-authorizer.c:999
+#: ../gdata/gdata-oauth2-authorizer.c:1064
+#: ../gdata/gdata-oauth2-authorizer.c:1076
+#: ../gdata/gdata-oauth2-authorizer.c:1087
+#: ../gdata/gdata-oauth2-authorizer.c:1102
+#: ../gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "Сервер вернул искажённый ответ."
+
+#: ../gdata/gdata-client-login-authorizer.c:649 ../gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Не удалось подключиться к серверу службы."
+
+#: ../gdata/gdata-client-login-authorizer.c:654 ../gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Не удалось подключиться к прокси-серверу."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: ../gdata/gdata-client-login-authorizer.c:660 ../gdata/gdata-service.c:372
+#: ../gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Неверный запрос URI или заголовок, или неподдерживаемый нестандартный "
+"параметр: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:666 ../gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Требуется аутентификация: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:671 ../gdata/gdata-service.c:383
+#: ../gdata/services/calendar/gdata-calendar-service.c:313
+#: ../gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "Запрошенный ресурс не найден: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:677 ../gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Запись была изменена с момента последней загрузки: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:689 ../gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Произошла ошибка %u при аутентификации: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: ../gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "Чтобы войти, необходимо заполнить поле CAPTCHA."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Эта учётная запись требует пароль, специфичный для приложения. (%s)"
+
+#: ../gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Ваше имя пользователя или пароль неверны."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "Адрес эл. почты вашей учётной записи не был проверен. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Вы не одобрили лицензионное соглашение. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Эта учётная запись была перенесена. Чтобы получить новое имя пользователя и "
+"пароль, выполните вход. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Учётная запись удалена. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Учётная запись отключена. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "Доступ учётной записи к этой службе отключён. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "В данный момент служба недоступна. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:262
+msgid "This entry does not support comments."
+msgstr "Для данного элемента комментарии не поддерживаются."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: ../gdata/gdata-commentable.c:349 ../gdata/gdata-commentable.c:435
+msgid "Comments may not be added to this entry."
+msgstr "Для этого элемента комментарии добавить нельзя."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:518 ../gdata/gdata-commentable.c:594
+msgid "This comment may not be deleted."
+msgstr "Данный комментарий не может быть удалён."
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Недопустимый запрос на переход"
+
+#: ../gdata/gdata-oauth1-authorizer.c:815
+msgid "The server rejected the temporary credentials request."
+msgstr "Сервер отклонил запрос временных учётных данных."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1090
+#: ../gdata/gdata-oauth2-authorizer.c:1113
+#: ../gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "В доступе отказано со стороны пользователя или сервера."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:352 ../gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Ошибка разбора XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Пустой документ."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:483 ../gdata/gdata-parsable.c:521
+#: ../gdata/services/documents/gdata-documents-access-rule.c:144
+#: ../gdata/services/documents/gdata-documents-access-rule.c:154
+#: ../gdata/services/documents/gdata-documents-document.c:286
+#: ../gdata/services/documents/gdata-documents-entry.c:478
+#: ../gdata/services/documents/gdata-documents-entry.c:489
+#: ../gdata/services/documents/gdata-documents-entry.c:500
+#: ../gdata/services/documents/gdata-documents-entry.c:547
+#: ../gdata/services/documents/gdata-documents-entry.c:558
+#: ../gdata/services/documents/gdata-documents-entry.c:666
+#: ../gdata/services/documents/gdata-documents-entry.c:701
+#: ../gdata/services/documents/gdata-documents-entry.c:716
+#: ../gdata/services/documents/gdata-documents-entry.c:731
+#: ../gdata/services/documents/gdata-documents-entry.c:761
+#: ../gdata/services/documents/gdata-documents-entry.c:777
+#: ../gdata/services/documents/gdata-documents-feed.c:81
+#: ../gdata/services/documents/gdata-documents-feed.c:92
+#: ../gdata/services/documents/gdata-documents-feed.c:142
+#: ../gdata/services/documents/gdata-documents-feed.c:160
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Ошибка разбора JSON: %s"
+
+#: ../gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Первый узел JSON не является объектом."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Внутри элемента %s пропущено требуемое содержимое."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "Содержимое элемента %s («%s») не соответствует формату ISO 8601."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: ../gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "Неизвестное значение свойства %s элемента %s («%s»)."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: ../gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "Неизвестное содержимое элемента %s («%s»)."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Отсутствует требуемое свойство элемента %s (%s)."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"У элемента %3$s указано два свойства %1$s и %2$s, но одновременно может быть "
+"только одно из них."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Отсутствует требуемый элемент (%s)."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: ../gdata/gdata-parser.c:200 ../gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Повторение единичного элемента (%s)."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: ../gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "Внутри элемента %s пропущено требуемое содержимое."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "Содержимое элемента %s («%s») не соответствует формату ISO 8601."
+
+#. Translators: the parameter is an error message.
+#: ../gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "От сервера был получен некорректный объект JSON: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: ../gdata/gdata-parser.c:1179
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr ""
+"Содержимое элемента %s («%s») не соответствует шестнадцатеричному формату "
+"RGB."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Произошла ошибка %u при выполнении запроса: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Произошла ошибка %u при добавлении записи: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Произошла ошибка %u при обновлении записи: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Произошла ошибка %u при удалении записи: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Произошла ошибка %u при загрузке: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Произошла ошибка %u при загрузке: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "При выполнении групповой операции получен код ошибки %u: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "Неверное перенаправление URI: %s"
+
+#: ../gdata/gdata-service.c:1466
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:626
+#: ../gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Запись уже вставлена."
+
+#. Resumable upload error.
+#: ../gdata/gdata-upload-stream.c:794 ../gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"Получена ошибка от сервера после отправки возобновляющей отправленной части."
+
+#: ../gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Поток уже закрыт"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:302
+#: ../gdata/services/tasks/gdata-tasks-service.c:195
+#: ../gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"За короткий промежуток времени сделано слишком много API-запросов. Подождите "
+"несколько минут и повторите попытку снова."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:334
+#: ../gdata/services/tasks/gdata-tasks-service.c:204
+#: ../gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Чтобы сделать это, необходимо пройти аутентификацию."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:465
+#: ../gdata/services/calendar/gdata-calendar-service.c:516
+msgid "You must be authenticated to query all calendars."
+msgstr "Для доступа ко всем календарям необходимо пройти аутентификацию."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:562
+#: ../gdata/services/calendar/gdata-calendar-service.c:613
+#: ../gdata/services/calendar/gdata-calendar-service.c:675
+#: ../gdata/services/calendar/gdata-calendar-service.c:734
+msgid "You must be authenticated to query your own calendars."
+msgstr "Для доступа к личным календарям необходимо пройти аутентификацию."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:308
+msgid "You must be authenticated to query contacts."
+msgstr "Для доступа к контактам необходимо пройти аутентификацию."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:424
+#: ../gdata/services/contacts/gdata-contacts-service.c:474
+msgid "You must be authenticated to query contact groups."
+msgstr "Для запроса групп контактов необходимо пройти аутентификацию."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:514
+msgid "The group has already been inserted."
+msgstr "Группа уже добавлена."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:521
+msgid "You must be authenticated to insert a group."
+msgstr "Для добавления группы необходимо пройти аутентификацию."
+
+#: ../gdata/services/documents/gdata-documents-document.c:392
+msgid "You must be authenticated to download documents."
+msgstr "Для загрузки документов необходимо пройти аутентификацию."
+
+#: ../gdata/services/documents/gdata-documents-document.c:401
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Неизвестный или неподдерживаемый формат экспорта документов «%s»."
+
+#: ../gdata/services/documents/gdata-documents-service.c:454
+#: ../gdata/services/documents/gdata-documents-service.c:504
+msgid "You must be authenticated to query documents."
+msgstr "Для доступа к документам необходимо пройти аутентификацию."
+
+#: ../gdata/services/documents/gdata-documents-service.c:569
+msgid "You must be authenticated to upload documents."
+msgstr "Для загрузки документов необходимо пройти аутентификацию."
+
+#: ../gdata/services/documents/gdata-documents-service.c:575
+msgid "The document has already been uploaded."
+msgstr "Документ уже загружен."
+
+#: ../gdata/services/documents/gdata-documents-service.c:720
+msgid "You must be authenticated to update documents."
+msgstr "Для обновления документов необходимо пройти аутентификацию."
+
+#: ../gdata/services/documents/gdata-documents-service.c:887
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr ""
+"Не удалось распознать тип содержимого предоставленного документа («%s»)."
+
+#: ../gdata/services/documents/gdata-documents-service.c:927
+msgid "You must be authenticated to copy documents."
+msgstr "Для копирования документов необходимо пройти аутентификацию."
+
+#: ../gdata/services/documents/gdata-documents-service.c:955
+msgid "Parent folder not found"
+msgstr "Родительский каталог не найден"
+
+#: ../gdata/services/documents/gdata-documents-service.c:1102
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+"Для вставки или перемещения документов и папок необходимо пройти "
+"аутентификацию."
+
+#: ../gdata/services/documents/gdata-documents-service.c:1303
+msgid "You must be authenticated to move documents and folders."
+msgstr "Для перемещения документов и папок необходимо пройти аутентификацию."
+
+#: ../gdata/services/freebase/gdata-freebase-service.c:479
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "Свойство «%s» не содержит изображения"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Для доступа к пользователю необходимо указать имя пользователя или пройти "
+"аутентификацию."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:387
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "Query parameter not allowed for albums."
+msgstr "Параметр запроса недопустим для альбомов."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:394
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:455
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Для доступа ко всем альбомам необходимо указать имя пользователя или пройти "
+"аутентификацию."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:476
+msgid "The album did not have a feed link."
+msgstr "У альбома отсутствует лента новостей."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:633
+msgid "You must be authenticated to upload a file."
+msgstr "Для загрузки файла необходимо пройти аутентификацию."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:709
+msgid "The album has already been inserted."
+msgstr "Альбом уже добавлен."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:716
+msgid "You must be authenticated to insert an album."
+msgstr "Для добавления альбома необходимо пройти аутентификацию."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:330
+#: ../gdata/services/tasks/gdata-tasks-service.c:381
+msgid "You must be authenticated to query all tasklists."
+msgstr "Для доступа ко всем спискам задач необходимо пройти аутентификацию."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:430
+#: ../gdata/services/tasks/gdata-tasks-service.c:487
+msgid "You must be authenticated to query your own tasks."
+msgstr "Для доступа к личным задачам необходимо пройти аутентификацию."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Достигнуто максимальное количество записей. Удалите несколько записей и "
+"повторите попытку."
+
+#. Translators: the parameter is a URI.
+#: ../gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Чтобы это сделать, ваша учётная запись Google должна быть связана с каналом "
+"YouTube. Откройте %s для её создания."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Для загрузки видео, необходимо пройти аутентификацию."
+
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "В элементе «%s» отсутствует необходимое содержимое."
+
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr "Содержимое элемента %s («%s») не соответствует формату ISO 8601."
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "У календаря нет содержимого URI."
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "В данный момент служба недоступна."
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr "Неизвестный код ошибки «%s» в домене «%s» по адресу «%s»."
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "Принята неизвестная ошибка или она не поддаётся анализу."
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "Видео не содержит связанных видео <link>."
--- /dev/null
+# Slovak translation for libgdata.
+# Copyright (C) 2013 libgdata's COPYRIGHT HOLDER
+# This file is distributed under the same license as the libgdata package.
+# Jan Kyselica <kyselica.jan@gmail.com>, 2013.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=libgdata&keywords=I18N+L10N&component=General\n"
+"POT-Creation-Date: 2016-10-11 15:48+0000\n"
+"PO-Revision-Date: 2016-10-12 19:59+0200\n"
+"Last-Translator: Dušan Kazik <prescott66@gmail.com>\n"
+"Language-Team: Slovak <gnome-sk-list@gnome.org>\n"
+"Language: sk\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 1 : (n>=2 && n<=4) ? 2 : 0;\n"
+"X-Generator: Poedit 1.8.9\n"
+
+#: ../gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Hromadné operácie nie sú podporované touto službou."
+
+#: ../gdata/gdata-client-login-authorizer.c:629
+#: ../gdata/gdata-oauth1-authorizer.c:840
+#: ../gdata/gdata-oauth1-authorizer.c:1116
+#: ../gdata/gdata-oauth2-authorizer.c:953
+#: ../gdata/gdata-oauth2-authorizer.c:964
+#: ../gdata/gdata-oauth2-authorizer.c:983
+#: ../gdata/gdata-oauth2-authorizer.c:999
+#: ../gdata/gdata-oauth2-authorizer.c:1064
+#: ../gdata/gdata-oauth2-authorizer.c:1076
+#: ../gdata/gdata-oauth2-authorizer.c:1087
+#: ../gdata/gdata-oauth2-authorizer.c:1102
+#: ../gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "Server vrátil chybnú odpoveď."
+
+#: ../gdata/gdata-client-login-authorizer.c:649 ../gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Nedá sa pripojiť k serveru poskytujúcemu služby."
+
+#: ../gdata/gdata-client-login-authorizer.c:654 ../gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Nedá sa pripojiť k serveru proxy."
+
+# PM: Tento text sa zobrazuje ked nastane stav Bad request. Nie je to teda tak, že request obsahuje neplatnú URI alebo hlavičku poprípade neštandardné parametre?
+# JK: Toto by mali byť okolnosti, pri ktorých server vráti 400 - Bad Request: 1. Neplatná požiadavka na získanie URI, 2. Neplatná požiadavka na získanie záhlavia, 3. Príjem nepodporovaného neštandarného parametru.
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: ../gdata/gdata-client-login-authorizer.c:660 ../gdata/gdata-service.c:372
+#: ../gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Neplatná požiadavka na získanie URI alebo záhlavia, prípadne príjem "
+"nepodporovaného neštandardného parametra: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:666 ../gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Požaduje sa overenie totožnosti: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:671 ../gdata/gdata-service.c:383
+#: ../gdata/services/calendar/gdata-calendar-service.c:313
+#: ../gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "Požadovaný zdroj sa nenašiel: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:677 ../gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Záznam bol zmenený od doby posledného prevzatia: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:689 ../gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Kód chyby %u počas overovania totožnosti: %s"
+
+#: ../gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "Aby sa vykonalo prihlásenie, musí byť vyplnený test CAPTCHA."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Tento účet vyžaduje heslo špecifické pre aplikáciu. (%s)"
+
+#: ../gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Vaše používateľské meno alebo heslo bolo nesprávne."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "E-mailová adresa vášho účtu nebola overená. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Nepotvrdili ste, že súhlasíte s pravidlami a podmienkami služby. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Tento účet bol presunutý. Nové používateľské meno a heslo získate po online "
+"prihlásení. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Tento účet bol odstránený. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Tento účet bol zakázaný. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "Prístup k službe prostredníctvom tohto účtu bol zakázaný. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Táto služba nie je momentálne dostupná. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:262
+msgid "This entry does not support comments."
+msgstr "Tento záznam nepodporuje komentáre."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#: ../gdata/gdata-commentable.c:349 ../gdata/gdata-commentable.c:435
+msgid "Comments may not be added to this entry."
+msgstr "Komentáre možno nebudú pridané do tejto položky."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:518 ../gdata/gdata-commentable.c:594
+msgid "This comment may not be deleted."
+msgstr "Tento komentár možno nebude odstránený."
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Neplatná požiadavka na posun"
+
+# PM: nemá tu byť množné číslo?
+# JK: Podľa mňa nemá, keby áno tak by tam bolo requests.
+#: ../gdata/gdata-oauth1-authorizer.c:815
+msgid "The server rejected the temporary credentials request."
+msgstr "Server odmietol požiadavku na dočasné poverenie."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1090
+#: ../gdata/gdata-oauth2-authorizer.c:1113
+#: ../gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "Prístup bol odmietnutý používateľom alebo serverom."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:352 ../gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Chyba analýzy XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Prázdny dokument."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:483 ../gdata/gdata-parsable.c:521
+#: ../gdata/services/documents/gdata-documents-access-rule.c:144
+#: ../gdata/services/documents/gdata-documents-access-rule.c:154
+#: ../gdata/services/documents/gdata-documents-document.c:286
+#: ../gdata/services/documents/gdata-documents-entry.c:456
+#: ../gdata/services/documents/gdata-documents-entry.c:467
+#: ../gdata/services/documents/gdata-documents-entry.c:478
+#: ../gdata/services/documents/gdata-documents-entry.c:525
+#: ../gdata/services/documents/gdata-documents-entry.c:536
+#: ../gdata/services/documents/gdata-documents-entry.c:631
+#: ../gdata/services/documents/gdata-documents-entry.c:666
+#: ../gdata/services/documents/gdata-documents-entry.c:681
+#: ../gdata/services/documents/gdata-documents-entry.c:696
+#: ../gdata/services/documents/gdata-documents-entry.c:726
+#: ../gdata/services/documents/gdata-documents-entry.c:742
+#: ../gdata/services/documents/gdata-documents-feed.c:81
+#: ../gdata/services/documents/gdata-documents-feed.c:92
+#: ../gdata/services/documents/gdata-documents-feed.c:142
+#: ../gdata/services/documents/gdata-documents-feed.c:160
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Chyba analýzy JSON: %s"
+
+#: ../gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Vonkajší uzol JSON nie je objekt."
+
+# MČ: ostatné reťazce máš písané v minulom čase. Nevadí mi to, ale asi by to malo byť zjednotené.
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Prvku %s chýbal požadovaný obsah."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "V prvku %s nebol obsah („%s“) vo formáte ISO 8601."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: ../gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "Vlastnosť %s prvku %s mala neznámu hodnotu („%s“)."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: ../gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "V prvku %s bol neznámy obsah („%s“)."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Pre prvok %s nebola poskytnutá požadovaná vlastnosť („%s“)."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Boli poskytnuté hodnoty pre vlastnosti %s a %s prvku %s, avšak len jedna z "
+"nich je povolená."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Požadovaný prvok (%s) nebol poskytnutý."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: ../gdata/gdata-parser.c:200 ../gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Prvok typu singleton (%s) bol skopírovaný."
+
+# MČ: ostatné reťazce máš písané v minulom čase. Nevadí mi to, ale asi by to malo byť zjednotené.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: ../gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "Prvku „%s“ chýbal požadovaný obsah."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "V prvku %s nebol obsah („%s“) vo formáte ISO 8601."
+
+#. Translators: the parameter is an error message.
+#: ../gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Zo servera bol prijatý neplatný JSON: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: ../gdata/gdata-parser.c:1179
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr "V prvku %s nebol obsah („%s“) v šestnástkovom formáte RGB."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Kód chyby %u pri dopytovaní: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Kód chyby %u pri vkladaní záznamu: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Kód chyby %u pri aktualizovaní záznamu: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Kód chyby %u pri odstraňovaní záznamu: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Kód chyby %u pri preberaní: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Kód chyby %u pri odovzdávaní: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Kód chyby %u pri behu dávkovej operácie: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "Neplatné presmerovanie URI: %s"
+
+#: ../gdata/gdata-service.c:1456
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:626
+#: ../gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Záznam bol už vložený."
+
+#. Resumable upload error.
+#: ../gdata/gdata-upload-stream.c:794 ../gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"Pri odovzdaní nadväzujúceho bloku odovzdávania bola obdržaná chyba zo "
+"servera."
+
+#: ../gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Prúd je už uzatvorený"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:302
+#: ../gdata/services/tasks/gdata-tasks-service.c:195
+#: ../gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Vykonali ste príliš veľa volaní API. Počkajte, prosím, pár minút a skúste to "
+"znova."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:334
+#: ../gdata/services/tasks/gdata-tasks-service.c:204
+#: ../gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Vykonanie operácie je možné až po overení totožnosti."
+
+# PM: znie mi to neprirodzene; Dopytovanie vo všetkých kalendároch je možné až po overení totožnosti. Nejdem to všetko fuzziovať, oprav si to vo všetkých podobných reťazcoch
+#: ../gdata/services/calendar/gdata-calendar-service.c:465
+#: ../gdata/services/calendar/gdata-calendar-service.c:516
+msgid "You must be authenticated to query all calendars."
+msgstr "Dopytovanie vo všetkých kalendároch je možné až po overení totožnosti."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:562
+#: ../gdata/services/calendar/gdata-calendar-service.c:613
+#: ../gdata/services/calendar/gdata-calendar-service.c:675
+#: ../gdata/services/calendar/gdata-calendar-service.c:734
+msgid "You must be authenticated to query your own calendars."
+msgstr ""
+"Dopytovanie vo vlastných kalendároch je možné až po overení totožnosti."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:308
+msgid "You must be authenticated to query contacts."
+msgstr "Dopytovanie v kontaktoch je možné až po overení totožnosti."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:424
+#: ../gdata/services/contacts/gdata-contacts-service.c:474
+msgid "You must be authenticated to query contact groups."
+msgstr "Dopytovanie v skupinách kontaktov je možné až po overení totožnosti."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:514
+msgid "The group has already been inserted."
+msgstr "Skupina bola už vložená."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:521
+msgid "You must be authenticated to insert a group."
+msgstr "Vloženie skupiny je možné až po overení totožnosti."
+
+#: ../gdata/services/documents/gdata-documents-document.c:392
+msgid "You must be authenticated to download documents."
+msgstr "Prevzatie dokumentov je možné až po overení totožnosti."
+
+#: ../gdata/services/documents/gdata-documents-document.c:401
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Neznámy alebo nepodporovaný formát pre export dokumentu „%s“."
+
+#: ../gdata/services/documents/gdata-documents-service.c:513
+#: ../gdata/services/documents/gdata-documents-service.c:563
+msgid "You must be authenticated to query documents."
+msgstr "Dopytovanie v dokumentoch je možné až po overení totožnosti."
+
+#: ../gdata/services/documents/gdata-documents-service.c:628
+msgid "You must be authenticated to upload documents."
+msgstr "Odoslanie dokumentov je možné až po overení totožnosti."
+
+#: ../gdata/services/documents/gdata-documents-service.c:634
+msgid "The document has already been uploaded."
+msgstr "Dokument bol už odoslaný."
+
+#: ../gdata/services/documents/gdata-documents-service.c:779
+msgid "You must be authenticated to update documents."
+msgstr "Aktualizovanie dokumentov je možné až po overení totožnosti."
+
+#: ../gdata/services/documents/gdata-documents-service.c:946
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr "Typ obsahu („%s“) dodaného dokumentu nie je možné rozoznať."
+
+#: ../gdata/services/documents/gdata-documents-service.c:986
+msgid "You must be authenticated to copy documents."
+msgstr "Kopírovanie dokumentov je možné až po overení totožnosti."
+
+#: ../gdata/services/documents/gdata-documents-service.c:1014
+msgid "Parent folder not found"
+msgstr "Nenašiel sa nadradený priečinok"
+
+#: ../gdata/services/documents/gdata-documents-service.c:1161
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+"Vkladanie alebo presúvanie dokumentov a adresárov je možné až po overení "
+"totožnosti."
+
+#: ../gdata/services/documents/gdata-documents-service.c:1362
+msgid "You must be authenticated to move documents and folders."
+msgstr "Presúvanie dokumentov a adresárov je možné až po overení totožnosti."
+
+#: ../gdata/services/freebase/gdata-freebase-service.c:479
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "Vlastnosť „%s“ nedrží obrázok"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Dopytovanie používateľa je možné až po zadaní používateľského mena alebo po "
+"overení totožnosti."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:387
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "Query parameter not allowed for albums."
+msgstr "Parameter dopytu nie je povolený pre albumy."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:394
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:455
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Dopytovanie všetkých albumov je možné až po zadaní používateľského mena "
+"alebo po overení totožnosti."
+
+# PM: chýba preklad feed - prekladáme ako kanál
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:476
+msgid "The album did not have a feed link."
+msgstr "K albumu neexistuje odkaz."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:633
+msgid "You must be authenticated to upload a file."
+msgstr "Odoslanie súboru je možné až po overení totožnosti."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:709
+msgid "The album has already been inserted."
+msgstr "Album bol už vložený."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:716
+msgid "You must be authenticated to insert an album."
+msgstr "Vloženie albumu je možné až po overení totožnosti."
+
+# PM: znie mi to neprirodzene; Dopytovanie vo všetkých kalendároch je možné až po overení totožnosti. Nejdem to všetko fuzziovať, oprav si to vo všetkých podobných reťazcoch
+#: ../gdata/services/tasks/gdata-tasks-service.c:330
+#: ../gdata/services/tasks/gdata-tasks-service.c:381
+msgid "You must be authenticated to query all tasklists."
+msgstr ""
+"Dopytovanie vo všetkých zoznamoch úloh je možné až po overení totožnosti."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:430
+#: ../gdata/services/tasks/gdata-tasks-service.c:487
+msgid "You must be authenticated to query your own tasks."
+msgstr "Dopytovanie vo vlastných úlohách je možné až po overení totožnosti."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Prekročili ste svoju kvótu pre záznamy. Odstráňte, prosím, niektoré záznamy "
+"a skúste to znova."
+
+#. Translators: the parameter is a URI.
+#: ../gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Na vykonanie akcie musí byť váš účet Google pridružený ku kanálu Youtube. Ak "
+"chcete jeden vytvoriť, navštívte %s."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Odoslanie videa je možné až po overení totožnosti."
+
+# MČ: ostatné reťazce máš písané v minulom čase. Nevadí mi to, ale asi by to malo byť zjednotené.
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "Prvku „%s“ chýbal požadovaný obsah."
+
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr "V prvku „%s“ nebol obsah („%s“) vo formáte ISO 8601."
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "Kalendár nemal URI obsahu."
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "Služba nie je momentálne dostupná."
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr "Neznámy kód chyby „%s“ domény „%s“ bol obdržaný z lokality „%s“."
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "Bola obdržaná neznáma a nespracovateľná chyba."
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "Video nemalo súvisiace odkazy <link>."
--- /dev/null
+# Slovenian translations for libgdata.
+# Copyright (C) 2009 libgdata's COPYRIGHT HOLDER
+# This file is distributed under the same license as the libgdata package.
+#
+# Matej Urbančič <mateju@svn.gnome.org>, 2009–2019.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-09-25 10:37+0000\n"
+"PO-Revision-Date: 2019-09-26 20:56+0200\n"
+"Last-Translator: Matej Urbančič <mateju@svn.gnome.org>\n"
+"Language-Team: Slovenian <gnome-si@googlegroups.com>\n"
+"Language: sl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n"
+"%100==4 ? 3 : 0);\n"
+"X-Poedit-SourceCharset: utf-8\n"
+"X-Generator: Poedit 2.2.1\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Paketni ukazi s to storitvijo niso podprti."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "Strežnik je vrnil nepravilno oblikovan odgovor."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Ni se mogoče povezati s strežnikom storitev."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Ni se mogoče povezati s posredniškim strežnikom."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Neveljavna zahteva naslova URI, glave ali pa neobičajen parameter ni podprt: "
+"%s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Zahtevana je overitev: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "Zahtevanega vira ni mogoče najti: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Vnos je bil spremenjen odkar je bil prejet: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Koda napake %u med overitvijo: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "Vnosno polje vprašanja CAPTCHA mora biti izpolnjeno pred prijavo."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Račun zahteva vnos posebnega programskega gesla. (%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Uporabniško ime ali geslo ni vpisano pravilno."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "Elektronski naslov ni overjen. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr ""
+"Za nadaljevanje je treba potrditi strinjanje z določili in s pogoji "
+"storitve. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Račun je premaknjen. S prijavo preko povezave, je mogoče pridobiti novo "
+"uporabniško ime in geslo. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Račun je bil izbrisan. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Račun je onemogočen. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "Dostop računa do storitve je onemogočen. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Storitev trenutno ni na voljo. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "Predmet ne podpira dodajanja opomb."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "Temu predmetu opomb ni mogoče dodajati."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "Opombe ni dovoljeno izbrisati."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Neveljavna zahteva iskanja"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr "Strežnik je zavrnil začasno zahtevo overitve."
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "Podpora za OAuth 1.0 je onemogočena."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "Dostop je bil zavrnjen s strani uporabnika ali pa strežnika."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Napaka med razčlenjevanjem XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Prazen dokument."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Napaka razčlenjevanja vrednosti JSON: %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Najbolj zunanje vozlišče JSON ni predmet."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Predmetu %s manjka zahtevana vsebina."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "Vsebina predmeta %s (»%s«) ni v ustreznem ISO 8601 zapisu."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "Vrednost lastnosti %s predmeta %s (»%s«) ni prepoznana."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "Vsebina predmeta %s (»%s«) ni prepoznana."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Zahtevana lastnost predmeta %s (%s) ni prisotna."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Predstavljene so vrednosti za lastnosti %s in %s predmeta %s, dovoljeno pa "
+"je določiti le eno izmed obeh vrednost."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Zahtevan predmet (%s) ni prisoten."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Enkratni predmet (%s) je podvojen."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "Predmetu »%s« manjka zahtevana vsebina."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "Vsebina predmeta »%s« (»%s«) ni v ustreznem zapisu ISO 8601."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Prejeta je neveljavna vrednost JSON s strežnika: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr "Vsebina predmeta %s (»%s«) ni v osmiškem RGB zapisu."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Koda napake %u med poizvedovanjem vnosa: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Koda napake %u med vstavljanjem vnosa: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Koda napake %u med posodabljanjem vnosa: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Koda napake %u med brisanjem vnosa: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Koda napake %u med prejemanjem vnosa: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Koda napake %u med pošiljanjem vnosa: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Koda napake %u med izvajanjem paketnih ukazov: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "Neveljaven preusmeritveni naslov URI: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Vnos je že vstavljen."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr "S strežnika je prejeta napaka po pošiljanju podatkov."
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Pretok je že zaprt"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr "Preveč je klicev API. Počakajte nekaj minut in poskusite znova."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Dovoljenje za to dejanje imajo le pooblaščene osebe."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr ""
+"Dovoljenje za poizvedovanje po vnosih vseh koledarjev imajo le pooblaščene "
+"osebe."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr ""
+"Dovoljenje za poizvedovanje po vnosih koledarjev imajo le pooblaščene osebe."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr ""
+"Dovoljenje za poizvedovanje med podatki stikov imajo le pooblaščene osebe."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr ""
+"Dovoljenje za poizvedovanje med skupinami stikov imajo le pooblaščene osebe."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "Skupina je že vstavljena."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "Dovoljenje za vstavljanje skupin imajo le pooblaščene osebe."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "Dovoljenje za prejemanje dokumentov imajo le pooblaščene osebe."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Neznan ali nepodprt zapis dokumenta za izvoz ‘%s’."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "Neveljavna vidnost: neprepoznana vrednost »%s«"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "Dovoljenje za poizvedovanje dokumentov imajo le pooblaščene osebe."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "Dovoljenje za pošiljanje dokumentov imajo le pooblaščene osebe."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "Dokument je že poslan."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "Dovoljenje za posodabljanje dokumentov imajo le pooblaščene osebe."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr "Vsebinske vrste dokumenta (»%s«) ni mogoče določiti."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "Dovoljenje za kopiranje dokumentov imajo le pooblaščene osebe."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "Nadrejene mape ni mogoče najti"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+"Za premikanje ali vstavljanje dokumentov in map je zahtevana prijava z "
+"ustreznimi dovoljenji."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr "Dovoljenje za premikanje dokumentov in map imajo le pooblaščene osebe."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "Lastnost »%s« nima določila slike"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Dovoljenje za poizvedovanje o uporabniku imajo le pooblaščene osebe in "
+"osebe, ki navedejo uporabniško ime."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "Parametri poizvedbe niso dovoljeni za albume."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Dovoljenje za poizvedovanje o vsebini albumov imajo le pooblaščene osebe in "
+"osebe, ki navedejo uporabniško ime."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "Album nima povezave vira."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "Dovoljenje za pošiljanje datotek imajo le pooblaščene osebe."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "Album je že vstavljen."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "Dovoljenje za vstavljanje albuma imajo le pooblaščene osebe."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr ""
+"Za poizvedovanje po seznamih nalog imajo dovoljenje le pooblaščene osebe."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "Za poizvedovanje po nalogah imajo dovoljenje le pooblaščene osebe."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Prekoračili ste dovoljeno omejitev velikosti. Izbrišite nekaj vnosov in "
+"poskusite znova."
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Možnost zahteva povezavo kanala Youtube z računom Google. Povezavo je mogoče "
+"vzpostaviti preko %s."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Dovoljenje za pošiljanje video posnetkov imajo le pooblaščene osebe."
+
+#~ msgid "Cannot connect to the service's server."
+#~ msgstr "Ni se mogoče povezati s strežnikom storitev."
+
+#~ msgid "Your account's e-mail address has not been verified. (%s)"
+#~ msgstr "Vaš elektronski naslov ni overjen. (%s)"
+
+#~ msgid "You have not agreed to the service's terms and conditions. (%s)"
+#~ msgstr ""
+#~ "Za nadaljevanje je treba potrditi strinjanje z določili in s pogoji "
+#~ "storitve. (%s)"
+
+#~ msgid "This account's access to this service has been disabled. (%s)"
+#~ msgstr "Dostop računa do storitve je onemogočen. (%s)"
+
+#~ msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+#~ msgstr "Vsebina predmeta %s (\"%s\") ni v ustreznem ISO 8601 zapisu."
+
+#~ msgid "The value of the %s property of a %s element (\"%s\") was unknown."
+#~ msgstr "Vrednost lastnosti %s predmeta %s (\"%s\") ni prepoznana."
+
+#~ msgid "The content of a %s element (\"%s\") was unknown."
+#~ msgstr "Vsebina predmeta %s (\"%s\") ni prepoznana."
+
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "Predmetu '%s' manjka zahtevana vsebina."
+
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr "Vsebina predmeta '%s' (\"%s\") ni v ustreznem zapisu ISO 8601."
+
+#~ msgid ""
+#~ "The content of a %s element (\"%s\") was not in hexadecimal RGB format."
+#~ msgstr "Vsebina predmeta %s (\"%s\") ni v osmiškem RGB zapisu."
+
+#~ msgid ""
+#~ "The content type of the supplied document ('%s') could not be recognized."
+#~ msgstr "Vsebinske vrste dokumenta ('%s') ni mogoče določiti."
+
+#~ msgid "Property '%s' does not hold an image"
+#~ msgstr "Lastnost '%s' nima določila slike"
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "Koledar nima naslova URI vsebine."
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "Storitev trenutno ni na voljo."
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr "Neznana napaka kode \"%s\" v domeni \"%s\" prejeti z mesta \"%s\"."
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "Prejeta neznana in nerazčlenljiva napaka."
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "Posnetek nima <povezave> do sorodnih posnetkov."
+
+#~ msgid "The supplied document had an invalid content type."
+#~ msgstr "Ponujeni dokument ima neveljavno vrsto vsebine."
--- /dev/null
+# Serbian translation of libgdata.
+# Courtesy of Prevod.org team (http://prevod.org/) -- 2011—2016.
+# This file is distributed under the same license as the package.
+# Мирослав Николић <miroslavnikolic@rocketmail.com>, 2011—2016.
+# Марко М. Костић <marko.m.kostic@gmail.com>, 2016.
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-09-03 09:39+0000\n"
+"PO-Revision-Date: 2019-09-13 22:02+0200\n"
+"Last-Translator: Марко М. Костић <marko.m.kostic@gmail.com>\n"
+"Language-Team: Serbian <gnom@prevod.org>\n"
+"Language: sr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Project-Style: gnome\n"
+"X-Generator: Poedit 2.2.3\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Серијске радње нису подржане од стране ове услуге."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "Сервер је вратио неисправан одговор."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Не могу да се повежем на сервер услуге."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Не могу да се повежем на посреднички сервер."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Неисправна адреса или заглавље захтева, или неподржан нестандардан "
+"параметар: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Потребно је потврђивање идентитета: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "Тражени ресурс није пронађен: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Унос је измењена од када је преузет: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Кôд грешке %u приликом потврђивања идентитета: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "СТОПКА мора бити попуњена да бисте се пријавили."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Овај налог захтева различиту лозинку у зависности од програма. (%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Ваше корисничко име или лозинка су нетачни."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "Адреса е-поште вашег налога није проверена. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Нисте се сложили са одредбама и условима услуге. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Овај налог је премештен. Пријавите се на мрежи да примите ваше ново "
+"корисничко име и лозинку. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Овај налог је избрисан. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Овај налог је онемогућен. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "Приступ овог налога овом сервису је онемогућен. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Тражена услуга није доступна у овом тренутку. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "Овај унос не подржава коментаре."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "Коментари не могу да се додају овом уносу."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "Овај налог не може бити избрисан."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Неисправан захтев претраге"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr "Сервер је одбацио привремени захтев за акредитивима."
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "Подршка за О-Аут (OAuth) 1.0 је онемогућена."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "Корисник или сервер су забранили приступ."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Грешка у анализи ИксМЛa: „%s“"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Празан документ."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Грешка у анализи ЈСОН-a: „%s“"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Најудаљенији ЈСОН чвор није предмет."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Елементу „%s“ недостаје потребан садржај."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "Садржај елемента „%s“ („%s“) није био у формату ИСО 8601."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "Вредност својства „%s“ елемента „%s“ („%s“) је непозната."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "Садржај елемента „%s“ („%s“) је непознат."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Потребно својство елемента „%s“ („%s“) није било присутно."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Биле су присутне вредности за својства „%s“ и „%s“ елемента „%s“ када је "
+"само једна дозвољена."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Потребан елемент (%s) није био присутан."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Синглетон елемент (%s) је дуплирани."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "Елементу „%s“ недостаје потребан садржај."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "Садржај елемента „%s“ („%s“) није био у формату ИСО 8601."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Неисправан ЈСОН је примљен са сервера: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr "Садржај елемента „%s“ („%s“) није у хексадецималном РГБ формату."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Кôд грешке %u приликом пропитивања: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Кôд грешке %u приликом уметања уноса: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Кôд грешке %u приликом ажурирања уноса: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Кôд грешке %u приликом брисања уноса: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Кôд грешке %u приликом преузимања: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Кôд грешке %u приликом слања: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Кд грешке %u приликом покретања серијске операције: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "Неисправна адреса преусмеравања: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Унос је већ уметнут."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"Примљена је грешка са сервера након слања комада са могућношћу настављања "
+"након прекида."
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Ток је већ затворен"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Направили сте превише АПИ позива недавно. Сачекајте неколико минута и "
+"покушајте поново."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Морате да потврдите идентитет да бисте урадили ово."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "Морате да потврдите идентитет да бисте пропитали све календаре."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "Морате да потврдите идентитет да бисте пропитали ваше личне календаре."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "Морате да потврдите идентитет да бисте пропитали контакте."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "Морате да потврдите идентитет да бисте пропитали групе контакта."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "Група је већ уметнута."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "Морате да потврдите идентитет да бисте уметнули групу."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "Морате да потврдите идентитет да бисте преузели документа."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Непознат или неподржан запис извоза документа „%s“."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "Неисправна видљивост: непозната вредност „%s“"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "Морате да потврдите идентитет да бисте пропитали документа."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "Морате да потврдите идентитет да бисте послали документа."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "Документ је већ отпремљен."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "Морате да потврдите идентитет да бисте ажурирали документа."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr "Не могу препознати врсту садржаја датог документа („%s“)."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "Морате да потврдите идентитет да бисте умножили документа."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "Нисам нашао родитељску фасциклу"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+"Морате да се пријавите да бисте убацивали или премештали документа и "
+"фасцикле."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr ""
+"Морате да потврдите идентитет да бисте премештали документа и фасцикле."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "Својство „%s“ не садржи слику"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Морате да наведете корисничко име или да потврдите идентитет да бисте "
+"пропитали корисника."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "Параметар упита није дозвољен за албуме."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Морате да наведете корисничко име или да потврдите идентитет да бисте "
+"пропитали све албуме."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "Албум није имао везу напајања."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "Морате да потврдите идентитет да бисте послали датотеку."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "Албум је већ уметнут."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "Морате да потврдите идентитет да бисте уметнули албум."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr ""
+"Морате да потврдите идентитет да бисте пропитали све спискове задатака."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "Морате да потврдите идентитет да бисте пропитали ваше личне задатке."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Прекорачили сте вашу квоту уноса. Избришите неке ставке и покушајте поново."
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Ваш Гугл налог мора бити придружен каналу Јутуба да бисте урадили ово. "
+"Посетите „%s“ да направите један."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Морате да потврдите идентитет да бисте послали видео снимак."
+
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "Елементу „%s“ недостаје потребан садржај."
+
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr "Садржај елемента „%s“ („%s“) није био у запису ИСО 8601."
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "Календар нема адресу садржаја."
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "Ова услуга није доступна у овом тренутку."
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr ""
+#~ "Примио сам непознат кôд грешке „%s“ у домену „%s“ са локацијом „%s“."
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "Примио сам непознату и нерашчлањиву грешку."
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "Видео није имало одговарајуће видео снимке <link>."
--- /dev/null
+# Serbian translation of libgdata.
+# Courtesy of Prevod.org team (http://prevod.org/) -- 2011—2016.
+# This file is distributed under the same license as the package.
+# Miroslav Nikolić <miroslavnikolic@rocketmail.com>, 2011—2016.
+# Marko M. Kostić <marko.m.kostic@gmail.com>, 2016.
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=libgdata&keywords=I18N+L10N&component=General\n"
+"POT-Creation-Date: 2016-11-06 18:19+0000\n"
+"PO-Revision-Date: 2016-10-30 11:19+0100\n"
+"Last-Translator: Marko M. Kostić <marko.m.kostic@gmail.com>\n"
+"Language-Team: Serbian <gnom@prevod.org>\n"
+"Language: sr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Project-Style: gnome\n"
+"X-Generator: Poedit 1.8.8\n"
+
+#: ../gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Serijske radnje nisu podržane od strane ove usluge."
+
+#: ../gdata/gdata-client-login-authorizer.c:629
+#: ../gdata/gdata-oauth1-authorizer.c:840
+#: ../gdata/gdata-oauth1-authorizer.c:1116
+#: ../gdata/gdata-oauth2-authorizer.c:953
+#: ../gdata/gdata-oauth2-authorizer.c:964
+#: ../gdata/gdata-oauth2-authorizer.c:983
+#: ../gdata/gdata-oauth2-authorizer.c:999
+#: ../gdata/gdata-oauth2-authorizer.c:1064
+#: ../gdata/gdata-oauth2-authorizer.c:1076
+#: ../gdata/gdata-oauth2-authorizer.c:1087
+#: ../gdata/gdata-oauth2-authorizer.c:1102
+#: ../gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "Server je vratio neispravan odgovor."
+
+#: ../gdata/gdata-client-login-authorizer.c:649 ../gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Ne mogu da se povežem na server usluge."
+
+#: ../gdata/gdata-client-login-authorizer.c:654 ../gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Ne mogu da se povežem na posrednički server."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: ../gdata/gdata-client-login-authorizer.c:660 ../gdata/gdata-service.c:372
+#: ../gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Neispravna adresa ili zaglavlje zahteva, ili nepodržan nestandardan "
+"parametar: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:666 ../gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Potrebno je potvrđivanje identiteta: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:671 ../gdata/gdata-service.c:383
+#: ../gdata/services/calendar/gdata-calendar-service.c:313
+#: ../gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "Traženi resurs nije pronađen: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:677 ../gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Unos je izmenjena od kada je preuzet: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:689 ../gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Kôd greške %u prilikom potvrđivanja identiteta: %s"
+
+#: ../gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "STOPKA mora biti popunjena da biste se prijavili."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Ovaj nalog zahteva različitu lozinku u zavisnosti od programa. (%s)"
+
+#: ../gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Vaše korisničko ime ili lozinka su netačni."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "Adresa e-pošte vašeg naloga nije proverena. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Niste se složili sa odredbama i uslovima usluge. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Ovaj nalog je premešten. Prijavite se na mreži da primite vaše novo "
+"korisničko ime i lozinku. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Ovaj nalog je izbrisan. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Ovaj nalog je onemogućen. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "Pristup ovog naloga ovom servisu je onemogućen. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Tražena usluga nije dostupna u ovom trenutku. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:262
+msgid "This entry does not support comments."
+msgstr "Ovaj unos ne podržava komentare."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#: ../gdata/gdata-commentable.c:349 ../gdata/gdata-commentable.c:435
+msgid "Comments may not be added to this entry."
+msgstr "Komentari ne mogu da se dodaju ovom unosu."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:518 ../gdata/gdata-commentable.c:594
+msgid "This comment may not be deleted."
+msgstr "Ovaj nalog ne može biti izbrisan."
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Neispravan zahtev pretrage"
+
+#: ../gdata/gdata-oauth1-authorizer.c:815
+msgid "The server rejected the temporary credentials request."
+msgstr "Server je odbacio privremeni zahtev za akreditivima."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1090
+#: ../gdata/gdata-oauth2-authorizer.c:1113
+#: ../gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "Korisnik ili server su zabranili pristup."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:352 ../gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Greška u analizi IksMLa: „%s“"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Prazan dokument."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:483 ../gdata/gdata-parsable.c:521
+#: ../gdata/services/documents/gdata-documents-access-rule.c:144
+#: ../gdata/services/documents/gdata-documents-access-rule.c:154
+#: ../gdata/services/documents/gdata-documents-document.c:286
+#: ../gdata/services/documents/gdata-documents-entry.c:478
+#: ../gdata/services/documents/gdata-documents-entry.c:489
+#: ../gdata/services/documents/gdata-documents-entry.c:500
+#: ../gdata/services/documents/gdata-documents-entry.c:547
+#: ../gdata/services/documents/gdata-documents-entry.c:558
+#: ../gdata/services/documents/gdata-documents-entry.c:666
+#: ../gdata/services/documents/gdata-documents-entry.c:701
+#: ../gdata/services/documents/gdata-documents-entry.c:716
+#: ../gdata/services/documents/gdata-documents-entry.c:731
+#: ../gdata/services/documents/gdata-documents-entry.c:761
+#: ../gdata/services/documents/gdata-documents-entry.c:777
+#: ../gdata/services/documents/gdata-documents-feed.c:81
+#: ../gdata/services/documents/gdata-documents-feed.c:92
+#: ../gdata/services/documents/gdata-documents-feed.c:142
+#: ../gdata/services/documents/gdata-documents-feed.c:160
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Greška u analizi JSON-a: „%s“"
+
+#: ../gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Najudaljeniji JSON čvor nije predmet."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Elementu „%s“ nedostaje potreban sadržaj."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "Sadržaj elementa „%s“ („%s“) nije bio u formatu ISO 8601."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: ../gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "Vrednost svojstva „%s“ elementa „%s“ („%s“) je nepoznata."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: ../gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "Sadržaj elementa „%s“ („%s“) je nepoznat."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Potrebno svojstvo elementa „%s“ („%s“) nije bilo prisutno."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Bile su prisutne vrednosti za svojstva „%s“ i „%s“ elementa „%s“ kada je "
+"samo jedna dozvoljena."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Potreban element (%s) nije bio prisutan."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: ../gdata/gdata-parser.c:200 ../gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Singleton element (%s) je duplirani."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: ../gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "Elementu „%s“ nedostaje potreban sadržaj."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "Sadržaj elementa „%s“ („%s“) nije bio u formatu ISO 8601."
+
+#. Translators: the parameter is an error message.
+#: ../gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Neispravan JSON je primljen sa servera: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: ../gdata/gdata-parser.c:1179
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr "Sadržaj elementa „%s“ („%s“) nije u heksadecimalnom RGB formatu."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Kôd greške %u prilikom propitivanja: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Kôd greške %u prilikom umetanja unosa: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Kôd greške %u prilikom ažuriranja unosa: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Kôd greške %u prilikom brisanja unosa: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Kôd greške %u prilikom preuzimanja: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Kôd greške %u prilikom slanja: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Kd greške %u prilikom pokretanja serijske operacije: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "Neispravna adresa preusmeravanja: %s"
+
+#: ../gdata/gdata-service.c:1456
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:626
+#: ../gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Unos je već umetnut."
+
+#. Resumable upload error.
+#: ../gdata/gdata-upload-stream.c:794 ../gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"Primljena je greška sa servera nakon slanja komada sa mogućnošću nastavljanja "
+"nakon prekida."
+
+#: ../gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Tok je već zatvoren"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:302
+#: ../gdata/services/tasks/gdata-tasks-service.c:195
+#: ../gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Napravili ste previše API poziva nedavno. Sačekajte nekoliko minuta i "
+"pokušajte ponovo."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:334
+#: ../gdata/services/tasks/gdata-tasks-service.c:204
+#: ../gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Morate da potvrdite identitet da biste uradili ovo."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:465
+#: ../gdata/services/calendar/gdata-calendar-service.c:516
+msgid "You must be authenticated to query all calendars."
+msgstr "Morate da potvrdite identitet da biste propitali sve kalendare."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:562
+#: ../gdata/services/calendar/gdata-calendar-service.c:613
+#: ../gdata/services/calendar/gdata-calendar-service.c:675
+#: ../gdata/services/calendar/gdata-calendar-service.c:734
+msgid "You must be authenticated to query your own calendars."
+msgstr "Morate da potvrdite identitet da biste propitali vaše lične kalendare."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:308
+msgid "You must be authenticated to query contacts."
+msgstr "Morate da potvrdite identitet da biste propitali kontakte."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:424
+#: ../gdata/services/contacts/gdata-contacts-service.c:474
+msgid "You must be authenticated to query contact groups."
+msgstr "Morate da potvrdite identitet da biste propitali grupe kontakta."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:514
+msgid "The group has already been inserted."
+msgstr "Grupa je već umetnuta."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:521
+msgid "You must be authenticated to insert a group."
+msgstr "Morate da potvrdite identitet da biste umetnuli grupu."
+
+#: ../gdata/services/documents/gdata-documents-document.c:392
+msgid "You must be authenticated to download documents."
+msgstr "Morate da potvrdite identitet da biste preuzeli dokumenta."
+
+#: ../gdata/services/documents/gdata-documents-document.c:401
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Nepoznat ili nepodržan zapis izvoza dokumenta „%s“."
+
+#: ../gdata/services/documents/gdata-documents-service.c:513
+#: ../gdata/services/documents/gdata-documents-service.c:563
+msgid "You must be authenticated to query documents."
+msgstr "Morate da potvrdite identitet da biste propitali dokumenta."
+
+#: ../gdata/services/documents/gdata-documents-service.c:628
+msgid "You must be authenticated to upload documents."
+msgstr "Morate da potvrdite identitet da biste poslali dokumenta."
+
+#: ../gdata/services/documents/gdata-documents-service.c:634
+msgid "The document has already been uploaded."
+msgstr "Dokument je već otpremljen."
+
+#: ../gdata/services/documents/gdata-documents-service.c:779
+msgid "You must be authenticated to update documents."
+msgstr "Morate da potvrdite identitet da biste ažurirali dokumenta."
+
+#: ../gdata/services/documents/gdata-documents-service.c:946
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr "Ne mogu prepoznati vrstu sadržaja datog dokumenta („%s“)."
+
+#: ../gdata/services/documents/gdata-documents-service.c:986
+msgid "You must be authenticated to copy documents."
+msgstr "Morate da potvrdite identitet da biste umnožili dokumenta."
+
+#: ../gdata/services/documents/gdata-documents-service.c:1014
+msgid "Parent folder not found"
+msgstr "Nisam našao roditeljsku fasciklu"
+
+#: ../gdata/services/documents/gdata-documents-service.c:1161
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+"Morate da se prijavite da biste ubacivali ili premeštali dokumenta i "
+"fascikle."
+
+#: ../gdata/services/documents/gdata-documents-service.c:1362
+msgid "You must be authenticated to move documents and folders."
+msgstr ""
+"Morate da potvrdite identitet da biste premeštali dokumenta i fascikle."
+
+#: ../gdata/services/freebase/gdata-freebase-service.c:479
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "Svojstvo „%s“ ne sadrži sliku"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Morate da navedete korisničko ime ili da potvrdite identitet da biste "
+"propitali korisnika."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:387
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "Query parameter not allowed for albums."
+msgstr "Parametar upita nije dozvoljen za albume."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:394
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:455
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Morate da navedete korisničko ime ili da potvrdite identitet da biste "
+"propitali sve albume."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:476
+msgid "The album did not have a feed link."
+msgstr "Album nije imao vezu napajanja."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:633
+msgid "You must be authenticated to upload a file."
+msgstr "Morate da potvrdite identitet da biste poslali datoteku."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:709
+msgid "The album has already been inserted."
+msgstr "Album je već umetnut."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:716
+msgid "You must be authenticated to insert an album."
+msgstr "Morate da potvrdite identitet da biste umetnuli album."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:330
+#: ../gdata/services/tasks/gdata-tasks-service.c:381
+msgid "You must be authenticated to query all tasklists."
+msgstr ""
+"Morate da potvrdite identitet da biste propitali sve spiskove zadataka."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:430
+#: ../gdata/services/tasks/gdata-tasks-service.c:487
+msgid "You must be authenticated to query your own tasks."
+msgstr "Morate da potvrdite identitet da biste propitali vaše lične zadatke."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Prekoračili ste vašu kvotu unosa. Izbrišite neke stavke i pokušajte ponovo."
+
+#. Translators: the parameter is a URI.
+#: ../gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Vaš Gugl nalog mora biti pridružen kanalu Jutuba da biste uradili ovo. "
+"Posetite „%s“ da napravite jedan."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Morate da potvrdite identitet da biste poslali video snimak."
+
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "Elementu „%s“ nedostaje potreban sadržaj."
+
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr "Sadržaj elementa „%s“ („%s“) nije bio u zapisu ISO 8601."
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "Kalendar nema adresu sadržaja."
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "Ova usluga nije dostupna u ovom trenutku."
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr ""
+#~ "Primio sam nepoznat kôd greške „%s“ u domenu „%s“ sa lokacijom „%s“."
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "Primio sam nepoznatu i neraščlanjivu grešku."
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "Video nije imalo odgovarajuće video snimke <link>."
--- /dev/null
+# Swedish translation for libgdata.
+# Copyright © 2009-2019 Free Software Foundation, Inc.
+# This file is distributed under the same license as the libgdata package.
+# Daniel Nylander <po@danielnylander.se>, 2009, 2010, 2011, 2012.
+# Anders Jonsson <anders.jonsson@norsjovallen.se>, 2014, 2015, 2016, 2019.
+# Mattias Eriksson <snaggen@gmail.com>, 2014.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-09-03 09:39+0000\n"
+"PO-Revision-Date: 2019-09-03 16:59+0200\n"
+"Last-Translator: Anders Jonsson <anders.jonsson@norsjovallen.se>\n"
+"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
+"Language: sv\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 2.2.3\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Satsoperationer stöds inte av denna tjänst."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "Servern returnerade ett felformulerat svar."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Kan inte ansluta till tjänstens server."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Kan inte ansluta till proxyservern."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Ogiltig URI-begäran eller rubrik, eller icke-standardparameter som inte "
+"stöds: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Autentisering krävs: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "Den begärda resursen kunde inte hittas: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Objektet har ändrats sedan det hämtades: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Felkod %u vid autentisering: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "En CAPTCHA måste fyllas i för att logga in."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Detta konto kräver ett programspecifikt lösenord. (%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Ditt användarnamn eller lösenord var felaktigt."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "E-postadressen för ditt konto har ännu inte verifierats. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Du har inte godkänt tjänstens villkor. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Detta konto har migrerats. Logga in på nätet för att få ditt nya "
+"användarnamn och lösenord. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Detta konto har tagits bort. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Detta konto har inaktiverats. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "Åtkomsten för detta konto till denna tjänst har inaktiverats. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Denna tjänst är inte tillgänglig för tillfället. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "Detta objekt saknar stöd för kommentarer."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "Kommentarer kan inte läggas till i detta objekt."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "Denna kommentar kan inte tas bort."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Ogiltig sökbegäran"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr "Servern nekade temporär behörighetsbegäran."
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "OAuth 1.0-stöd är inaktiverat."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "Åtkomst nekades av användaren eller servern."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Fel vid tolkning av XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Tomt dokument."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Fel vid tolkning av JSON: %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Yttersta JSON-noden är inte ett objekt."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Ett %s-element saknade nödvändigt innehåll."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "Innehållet för ett %s-element (”%s”) var inte i ISO 8601-format."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "Värdet för %s-egenskapen för ett %s-element (”%s”) var okänt."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "Innehållet för ett %s-element (”%s”) var okänt."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "En nödvändig egenskap för ett %s-element (%s) hittades inte."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Värden presenterades för egenskaperna %s och %s av ett %s-element när endast "
+"ett av de två tillåts."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Ett nödvändigt element (%s) hittades inte."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Ett singleton-element (%s) var duplicerat."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "Ett ”%s”-element saknade nödvändigt innehåll."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "Innehållet för ett ”%s”-element (”%s”) var inte i ISO 8601-format."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Ogiltig JSON mottogs från servern: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr ""
+"Innehållet för ett %s-element (”%s”) var inte i hexadecimalt RGB-format."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Felkod %u vid fråga: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Felkod %u vid infogning av ett objekt: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Felkod %u vid uppdatering av ett objekt: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Felkod %u vid borttagning av ett objekt: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Felkod %u vid hämtning: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Felkod %u vid sändning: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Felkod %u vid körning av en satsoperation: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "Ogiltig URI för omdirigering: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Objektet har redan infogats."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr "Fel mottogs från servern efter sändning av en återupptagningsbar del."
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Strömmen är redan stängd"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Du har gjort för många API-anrop senaste tiden. Vänta ett par minuter och "
+"försök igen."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Du måste vara autentiserad för att göra detta."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "Du måste vara autentiserad för att söka i alla kalendrar."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "Du måste vara autentiserad för att söka i dina egna kalendrar."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "Du måste vara autentiserad för att fråga efter kontakter."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "Du måste vara autentiserad för att fråga efter kontaktgrupper."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "Gruppen har redan infogats."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "Du måste vara autentiserad för att infoga en grupp."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "Du måste vara autentiserad för att hämta dokument."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Dokumentexportformatet ”%s” är okänt eller stöds inte."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "Ogiltig synlighet: okänt värde ”%s”"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "Du måste vara autentiserad för att fråga efter dokument."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "Du måste vara autentiserad för att skicka upp dokument."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "Dokumentet har redan skickats upp."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "Du måste vara autentiserad för att uppdatera dokument."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr ""
+"Innehållstypen för det angivna dokumentet (”%s”) gick inte att känna igen."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "Du måste vara autentiserad för att kopiera dokument."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "Överordnad mapp kunde inte hittas"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+"Du måste vara autentiserad för att infoga eller flytta dokument och mappar."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr "Du måste vara autentiserad för att flytta dokument och mappar."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "Egenskap ”%s” innehåller ingen bild"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Du måste ange ett användarnamn eller vara autentiserad för att söka efter en "
+"användare."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "Frågeparametern tillåts inte för album."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Du måste ange ett användarnamn eller vara autentiserad för att söka i alla "
+"album."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "Albumet saknade en webbkanalslänk."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "Du måste vara autentiserad för att skicka upp en fil."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "Albumet har redan infogats."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "Du måste vara autentiserad för att infoga ett album."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr "Du måste vara autentiserad för att söka i alla uppgiftslistor."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "Du måste vara autentiserad för att söka i dina egna uppgifter."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Du har överstigit din objektkvota. Ta bort några objekt och försök igen."
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Ditt Google-konto måste vara associerat med en YouTube-kanal för att göra "
+"detta. Besök %s för att skapa en."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Du måste vara autentiserad för att skicka upp en video."
+
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "Ett ”%s”-element saknade nödvändigt innehåll."
+
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr "Innehållet för ett ”%s”-element (”%s”) var inte i ISO 8601-format."
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "Kalendern saknade en innehålls-URI."
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "Denna tjänst är inte tillgänglig för tillfället."
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr "Okänd felkod ”%s” i domänen ”%s” togs emot på platsen ”%s”."
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "Okänt och ej tolkningsbart fel mottogs."
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "Videoklippet hade inga relaterade videoklipp <link>."
+
+#~ msgid "The supplied document had an invalid content type."
+#~ msgstr "Det angivna dokumentet hade en ogiltig innehållstyp."
--- /dev/null
+# Tamil translation for libgdata.
+# Copyright (C) 2011 libgdata's COPYRIGHT HOLDER
+# This file is distributed under the same license as the libgdata package.
+#
+# I Felix <ifelix@redhat.com>, 2011.
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=libgdata&keywords=I18N+L10N&component=general\n"
+"POT-Creation-Date: 2011-09-04 16:33+0000\n"
+"PO-Revision-Date: 2011-09-11 07:07+0530\n"
+"Last-Translator: I Felix <ifelix@redhat.com>\n"
+"Language-Team: Tamil <ta@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: ta\n"
+"X-Generator: Lokalize 1.2\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+
+#: ../gdata/gdata-client-login-authorizer.c:575
+#: ../gdata/gdata-oauth1-authorizer.c:770
+#: ../gdata/gdata-oauth1-authorizer.c:1029
+msgid "The server returned a malformed response."
+msgstr "ஒரு தவறான பதிலில் சேவையகம் திரும்பியது."
+
+#: ../gdata/gdata-client-login-authorizer.c:595 ../gdata/gdata-service.c:319
+#, c-format
+msgid "Cannot connect to the service's server."
+msgstr "சேவையின் சேவையகத்திற்கு இணைக்க முடியவில்லை."
+
+#: ../gdata/gdata-client-login-authorizer.c:600 ../gdata/gdata-service.c:324
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "ப்ராக்ஸி சேவையகத்திற்கு இணைக்க முடியவில்லை."
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:606 ../gdata/gdata-service.c:330
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"தவறான கோரிக்கை URI அல்லது தலைப்பு, அல்லது துணைப்புரியாத நிலையில்லா அளவுரு: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:612 ../gdata/gdata-service.c:336
+#, c-format
+msgid "Authentication required: %s"
+msgstr "அங்கீகாரம் தேவைப்பட்டது: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:617 ../gdata/gdata-service.c:341
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "கோரப்பட்ட மறுமூலம் காணப்படவில்லை: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:623 ../gdata/gdata-service.c:347
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "உள்ளீடு பதிவிறக்கப்படும் வரை மாற்றியமைக்கப்படலாம்: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:635 ../gdata/gdata-service.c:361
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "அங்கீகரிக்கும் போது பிழை குறியீடு %u : %s"
+
+#: ../gdata/gdata-client-login-authorizer.c:728
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "உள்நுழைவிற்கு ஒரு CAPTCHA ஆனது நிரப்பப்படும்."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:766
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "இந்த பயன்பாடானது ஒரு பயன்பாடு-குறிப்பிட்ட கடவுச்சொல்லை கோருகிறது. (%s)"
+
+#: ../gdata/gdata-client-login-authorizer.c:773
+msgid "Your username or password were incorrect."
+msgstr "உங்கள் கயனர்பெயர் அல்லது கடவுச்சொல் தவறானது."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:794
+#, c-format
+msgid "Your account's e-mail address has not been verified. (%s)"
+msgstr "உங்கள் கணக்கின் மின்னஞ்சல் முகவரி சரிபார்க்கப்படவில்லை. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:799
+#, c-format
+msgid "You have not agreed to the service's terms and conditions. (%s)"
+msgstr "சேவையின் நிபந்தனைகள் மற்றும் விதிமுறைகளை நீங்கள் ஏற்கவில்லை. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:805
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"இந்த கணக்கு மாற்றப்படும். உங்கள் புதிய பயனர்பெயர் மற்றும் கடவுச்சொல்லை "
+"பெறுவதற்கு ஆன்லைனில் உள்நுழையவும். (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:810
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "இந்த கணக்கு அழிக்கப்படும். (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:815
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "இந்த கணக்கு செயல்நீக்கப்படும். (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:820
+#, c-format
+msgid "This account's access to this service has been disabled. (%s)"
+msgstr "இந்த சேவைக்கான கணிக்கின் அணுகல் செயல்நீக்கப்படும். (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:825
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "இத்தருணத்தில் இந்த சேவை இல்லை. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:262
+msgid "This entry does not support comments."
+msgstr "கருத்துக்களை இந்த உள்ளிடு துணைபுரியாது."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#: ../gdata/gdata-commentable.c:349 ../gdata/gdata-commentable.c:435
+msgid "Comments may not be added to this entry."
+msgstr "இந்த உள்ளிட்டில் கருத்துகள் சேர்க்கப்படவில்லை."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:518 ../gdata/gdata-commentable.c:594
+msgid "This comment may not be deleted."
+msgstr "இந்த கருத்து அழிக்கப்படாது."
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:751
+msgid "Invalid seek request"
+msgstr "தவறான தேடும் கோரிக்கை"
+
+#: ../gdata/gdata-oauth1-authorizer.c:745
+msgid "The server rejected the temporary credentials request."
+msgstr "சேவையகமானது தற்காலிக சான்றுகளின் கோரிக்கை புறக்கணித்தது."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1007
+msgid "Access was denied by the user or server."
+msgstr "பயனர் அல்லது சேவையகத்தினால் அணுகல் மறுக்கப்பட்டது."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:245 ../gdata/gdata-parsable.c:256
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "பிழை பகுக்கும் உள்ளாய்வு XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:258
+msgid "Empty document."
+msgstr "காலி ஆவணம்"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:66
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "ஒருA %s உருப்படியாது தேவைப்படும் உள்ளடக்கத்தை விடுத்தது."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:82
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+msgstr "ஒரு %s உருப்படியின் உள்ளடக்கம் (\"%s\") ஆனது ISO 8601 வடிவில் இல்லை."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element ("00:01:42.500") was unknown.
+#: ../gdata/gdata-parser.c:102
+#, c-format
+msgid "The value of the %s property of a %s element (\"%s\") was unknown."
+msgstr "ஒரு %s பண்பின் மதிப்பானது %s உருப்படியில் (\"%s\") தெரியாதது."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element ("protected") was unknown.
+#: ../gdata/gdata-parser.c:120
+#, c-format
+msgid "The content of a %s element (\"%s\") was unknown."
+msgstr "ஒரு %s உருப்படியின் உள்ளடக்கம் (\"%s\") தெரியாதது."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:140
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "ஒரு தேவைப்படும் பண்பான %s இல் உருப்படி (%s) இல்லை."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:163
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"பண்புகள் %s க்கான மதிப்பு உள்ளது மற்றும் %s இல் ஒரு %s உருப்படி இரண்டில் "
+"ஒன்று மட்டும் அனுமதிக்கப்பட்டன."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:182
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "ஒரு தேவையான உருப்படி (%s) இல்லை."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#: ../gdata/gdata-parser.c:197
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "ஒரு ஒற்றைடோன் உருப்படி (%s) நகலெடுக்கப்பட்டது."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:367
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "வினவும் போதான பிழை குறியீடு %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:373
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "ஒரு உள்ளிடுவை நுழைக்கும் போதான பிழை குறியீடு %u : %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:379
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "ஒரு உள்ளிடுவை புதுப்பிக்கும் போதான பிழை குறியீடு %u : %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:385
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "ஒரு உள்ளிடுவை அழிக்கும் போதான பிழை குறியீடு %u : %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:391
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "பதிவிறக்கும் போது பிழை குறியீடு %u : %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:397
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "பதிவேற்றும் போதான பிழை குறியீடு %u : %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "ஒரு பிரிவு செயல்பாட்டை இயக்கும் போதான பிழை குறியீடு %u: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:683
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "தவறான திருப்பிவிடல் URI: %s"
+
+#: ../gdata/gdata-service.c:1334
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:624
+#: ../gdata/services/youtube/gdata-youtube-service.c:836
+msgid "The entry has already been inserted."
+msgstr "இந்த உள்ளிடு ஏற்கனவே நுழைக்கப்பட்டது."
+
+#: ../gdata/gdata-upload-stream.c:785
+msgid "Stream is already closed"
+msgstr "ஸ்ட்ரெம் ஏற்கனவே மூடப்பட்டது"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element ("00FG56") was not in hexadecimal RGB format.
+#: ../gdata/services/calendar/gdata-calendar-calendar.c:406
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in hexadecimal RGB format."
+msgstr ""
+"ஒரு %s உருப்படியின் உள்ளடக்கம் (\"%s\") ஆனது ஹெக்சாதசம RGB வடிவில் இல்லை."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:315
+#: ../gdata/services/calendar/gdata-calendar-service.c:366
+msgid "You must be authenticated to query all calendars."
+msgstr "அனைத்து நாள்காட்டிகளையும் வினவ நீங்கள் அங்கீகரிக்கப்பட்டுள்ளீர்கள்."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:412
+#: ../gdata/services/calendar/gdata-calendar-service.c:463
+#: ../gdata/services/calendar/gdata-calendar-service.c:508
+#: ../gdata/services/calendar/gdata-calendar-service.c:568
+msgid "You must be authenticated to query your own calendars."
+msgstr "உங்கள் சொந்த நாள்காட்டிகளை வினவ நீங்கள் அங்கீகரிக்கப்பட்டுள்ளீர்கள்."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:517
+#: ../gdata/services/calendar/gdata-calendar-service.c:581
+msgid "The calendar did not have a content URI."
+msgstr "நாள்காட்டியானது ஒரு உள்ளடக்க URI ஐ கொண்டிருக்கவில்லை."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:308
+msgid "You must be authenticated to query contacts."
+msgstr "கேள்வி தொடர்புகளுக்கு நீங்கள் அங்கீகரிக்க வேண்டும்."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:424
+#: ../gdata/services/contacts/gdata-contacts-service.c:474
+msgid "You must be authenticated to query contact groups."
+msgstr "கேள்வி தொடர்பு குழுக்களுக்கு நீங்கள் அங்கீகரிக்க வேண்டும்."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:514
+msgid "The group has already been inserted."
+msgstr "குழு ஏற்கனவே நுழைக்கப்பட்டது."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:521
+msgid "You must be authenticated to insert a group."
+msgstr "ஒரு குழுவை நுழைக்க நீங்கள் அங்கீகரிக்கப்பட வேண்டும்."
+
+#: ../gdata/services/documents/gdata-documents-document.c:274
+msgid "You must be authenticated to download documents."
+msgstr "ஆவணங்களை பதிவிறக்க நீங்கள் அங்கீகரிக்கப்பட வேண்டும்."
+
+#: ../gdata/services/documents/gdata-documents-service.c:357
+#: ../gdata/services/documents/gdata-documents-service.c:412
+msgid "You must be authenticated to query documents."
+msgstr "கேள்வி ஆவணங்களை நீங்கள் அங்கீகரிக்க வேண்டும்."
+
+#: ../gdata/services/documents/gdata-documents-service.c:491
+msgid "You must be authenticated to upload documents."
+msgstr "ஆவணங்களை பதிவேற்ற நீங்கள் அங்கீகரிக்கப்பட வேண்டும்."
+
+#: ../gdata/services/documents/gdata-documents-service.c:497
+msgid "The document has already been uploaded."
+msgstr "ஆவணம் ஏற்கனவே பதிவேற்றப்பட்டது."
+
+#: ../gdata/services/documents/gdata-documents-service.c:552
+msgid "You must be authenticated to update documents."
+msgstr "ஆவணங்களை புதுப்பிக்க நீங்கள் அங்கீகரிக்கப்பட வேண்டும்."
+
+#: ../gdata/services/documents/gdata-documents-service.c:615
+#, c-format
+msgid ""
+"The content type of the supplied document ('%s') could not be recognized."
+msgstr "வழங்கப்பட்ட ஆவண ('%s') உள்ளடக்க வகையால் கண்டறிய முடியவில்லை."
+
+#: ../gdata/services/documents/gdata-documents-service.c:664
+#: ../gdata/services/documents/gdata-documents-service.c:849
+msgid "You must be authenticated to move documents and folders."
+msgstr "ஆவணங்களை கோப்புறைக்கு நகர்த்த நீங்கள் அங்கீகரிக்க வேண்டும்."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"நீங்கள் ஒரு பயனர்பெயரை குறிப்பிட வேண்டும் அல்லது ஒரு பயனரை வினவ "
+"அங்கீகரிக்கப்பட வேண்டும்."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:387
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "Query parameter not allowed for albums."
+msgstr "ஆல்பங்களுக்கு கேள்வி அளவுரு அனுமதிக்கப்படவில்லை."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:394
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:455
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"நீங்கள் ஒரு பயனர்பெயரை குறிப்பிட வேண்டும் அல்லது அனைத்து ஆல்பங்களுக்கு வினவ "
+"அங்கீகரிக்க வேண்டும்."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:476
+msgid "The album did not have a feed link."
+msgstr "இந்த ஆல்பம் ஒரு பீட் இணைப்பை கொண்டிருக்கவில்லை."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:631
+msgid "You must be authenticated to upload a file."
+msgstr "ஒரு கோப்பினை பதிவேற்ற நீங்கள் அங்கீகரிக்க வேண்டும்."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:707
+msgid "The album has already been inserted."
+msgstr "இந்த ஆல்பம் ஏற்கனவே நுழைக்கப்பட்டது."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:714
+msgid "You must be authenticated to insert an album."
+msgstr "ஒரு ஆல்பத்தை நுழைக்க நீங்கள் அங்கீகரிக்கப்பட வேண்டும்."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:417
+#, c-format
+msgid "This service is not available at the moment."
+msgstr "இத்தருணத்தில் இந்த சேவை இல்லை. "
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:421
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "இதை செய்வதற்கு நீங்கள் அங்கீகரிக்கப்பட வேண்டும்."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:426
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"நீங்கள் சமீபத்தில் API க்கு அதிக அழைப்புகளை செய்துள்ளீர்கள். ஒரு சில "
+"நிமிடங்கள் காத்திருந்து மீண்டும் முயற்சிக்கவும்."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:429
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"உங்கள் உள்ளிடு பங்கை தாண்டிவிட்டீர்கள். சில உள்ளிடுகளை அழித்து மீண்டும் "
+"முயற்சிக்கவும்."
+
+#. Translators: the first parameter is an error code, which is a coded string.
+#. * The second parameter is an error domain, which is another coded string.
+#. * The third parameter is the location of the error, which is either a URI or an XPath.
+#: ../gdata/services/youtube/gdata-youtube-service.c:436
+#: ../gdata/services/youtube/gdata-youtube-service.c:442
+#, c-format
+msgid ""
+"Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+msgstr ""
+"தெரியாத பிழை குறியீடு \"%s\" செயற்களத்தில் \"%s\" இடத்துடன் \"%s\"ஐ பெற்றது."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:460
+#, c-format
+msgid "Unknown and unparsable error received."
+msgstr "தெரியாத மற்றும் பகுக்கமுடியாத பிழை பெறப்பட்டது."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:724
+#: ../gdata/services/youtube/gdata-youtube-service.c:781
+msgid "The video did not have a related videos <link>."
+msgstr "இந்த வீடியோ ஒரு தொடர்புடைய வீடியோக்களை <link> கொண்டிருக்கவில்லை."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:843
+msgid "You must be authenticated to upload a video."
+msgstr "ஒரு வீடியோவை பதிவேற்ற நீங்கள் அங்கீகரிக்க வேண்டும்."
+
+
--- /dev/null
+# Telugu translation for libgdata.
+# Copyright (C) 2011, 2012 Swecha Localisation Team <localization@swecha.net>
+# This file is distributed under the same license as the libgdata package.
+# Hari krishna <hari@swecha.net>, 2011.
+# Sasi Bhushan Boddepalli <sasi@swecha.net>, 2012.
+# Krishnababu Krothapalli <kkrothap@redhat.com>, 2012.
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=libgdata&keywords=I18N+L10N&component=general\n"
+"POT-Creation-Date: 2012-07-15 10:02+0000\n"
+"PO-Revision-Date: 2012-09-19 01:06+0530\n"
+"Last-Translator: Krishnababu Krothapalli <kkrothap@redhat.com>\n"
+"Language-Team: Telugu <Fedora-trans-te@redhat.com>\n"
+"Language: te\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n!=1);\n"
+"X-Generator: Lokalize 1.4\n"
+
+#: ../gdata/gdata-client-login-authorizer.c:597
+#: ../gdata/gdata-oauth1-authorizer.c:804
+#: ../gdata/gdata-oauth1-authorizer.c:1076
+msgid "The server returned a malformed response."
+msgstr "వైకల్య ఉత్తరమును సర్వరు తిరుగి పంపినది."
+
+#: ../gdata/gdata-client-login-authorizer.c:617 ../gdata/gdata-service.c:320
+#, c-format
+msgid "Cannot connect to the service's server."
+msgstr "సర్వీసు యొక్క సర్వరునకు అనుబంధించుట కుదురుటలేదు."
+
+#: ../gdata/gdata-client-login-authorizer.c:622 ../gdata/gdata-service.c:325
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "ప్రాక్సీ సర్వరునకు అనుసంధానించుట కుదురుటలేదు."
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:628 ../gdata/gdata-service.c:331
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"నిస్సారమైన అభ్యర్దించిన URI లేదా హెడ్డర్, లేదా సహకరించని ప్రమాణములేని "
+"పారామీటరు: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:634 ../gdata/gdata-service.c:337
+#, c-format
+msgid "Authentication required: %s"
+msgstr "ధ్రువీకరణ అవసరము: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:639 ../gdata/gdata-service.c:342
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "అభ్యర్ధించిన వనరు దొరకలేదు: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:645 ../gdata/gdata-service.c:348
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "దిగుమతి చేయబదినది కాబట్టీ ప్రవేశము మార్పుచేయబడినది: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:657 ../gdata/gdata-service.c:362
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "ధ్రువీకరించునపుడు %u దొషము సంకేతం : %s"
+
+#: ../gdata/gdata-client-login-authorizer.c:752
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "లాగిన్ అవుటకు క్యాప్ చా ను నింపవలెను."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:790
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "ఈ ఖాతాకు అనువర్తన సంబంధిత సంకేతపదం అవసరం. (%s)"
+
+#: ../gdata/gdata-client-login-authorizer.c:797
+msgid "Your username or password were incorrect."
+msgstr "మీ వినియోగదారునినామము లేదా రహస్య పదము తప్పు."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:818
+#, c-format
+msgid "Your account's e-mail address has not been verified. (%s)"
+msgstr "మీ ఖాతా యొక్క ఈ మేయిల్ చిరునామా సరిచూడ లేదు. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:823
+#, c-format
+msgid "You have not agreed to the service's terms and conditions. (%s)"
+msgstr "మీరు సేవయొక్క నిబంధనలు మరియు షరుతులను అంగీకరించలేదు. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:829
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"ఈ అకౌంట్ తరలించబడినది. మీ కొత్త సంకేతపదము మరియు రహస్యపదము పొందుటకు దయచేసి "
+"ఆంలైన్ లాగిన్ అవ్వండి."
+"(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:834
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "ఈ ఖాతా తొలగించబడినది.(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:839
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "ఈ ఖాతాను నిరుపయోగము చెయబడినది. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:844
+#, c-format
+msgid "This account's access to this service has been disabled. (%s)"
+msgstr "ఈ సేవకు ఈ ఖాతా యొక్క సాంగిత్యమును తొలగించబడినది. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:849
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "ప్రస్తుతము ఈ సేవ అందుబాటులో లేదు. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:262
+msgid "This entry does not support comments."
+msgstr "ఈ నమోదు వాఖ్యానములను సహకరించదు."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#: ../gdata/gdata-commentable.c:349 ../gdata/gdata-commentable.c:435
+msgid "Comments may not be added to this entry."
+msgstr "ఈ నమోదునకు వాఖ్యానములను జతపరుచుట కుదరకపోవచ్చును."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:518 ../gdata/gdata-commentable.c:594
+msgid "This comment may not be deleted."
+msgstr "ఈ వాఖ్యానము తొలగించకపోవచ్చు."
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:752
+msgid "Invalid seek request"
+msgstr "అర్ధించు అభ్యర్ధన నిస్సారం "
+
+#: ../gdata/gdata-oauth1-authorizer.c:779
+msgid "The server rejected the temporary credentials request."
+msgstr "సర్వరు తాత్కాలికమైన అధికారముల మనవిని తిరస్కరించినది."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1050
+msgid "Access was denied by the user or server."
+msgstr "వినియోగదారుడు లేదా సర్వరు వలన సాగత్యము తిరస్కరించబడినది."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:245 ../gdata/gdata-parsable.c:256
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "XML పార్సగుటలో దోషము: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:258
+msgid "Empty document."
+msgstr "ఖాళీ పత్రము."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:67
+#, c-format
+msgid "A %s element was missing required content."
+msgstr " %s మూలకములో కావలసిన సారము తప్పినది."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:83
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+msgstr "%s మూలకములోని సారము(\"%s\") ISO 8601 రూపములలొ లేదు."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element ("00:01:42.500") was unknown.
+#: ../gdata/gdata-parser.c:103
+#, c-format
+msgid "The value of the %s property of a %s element (\"%s\") was unknown."
+msgstr "%s ఎలిమెంట్ యొక్క %s గుణం యొక్క విలువ (\"%s\") తెలియలేదు."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element ("protected") was unknown.
+#: ../gdata/gdata-parser.c:121
+#, c-format
+msgid "The content of a %s element (\"%s\") was unknown."
+msgstr "%s మూలకము యొక్క సారము (\"%s\") తెలియదు."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:141
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "%s ఎలిమెంట్ యొక్క గుణం (%s) లేదు."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:164
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"%s ఎలిమెంట్ యొక్క %s మరియు %s అభీష్టాలు రెండిటిలో ఒకటి అనుమతించినపుడు వాటిలో "
+"విలువలు ఉన్నవి."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:183
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "ఒక అవసరమైన మూలకము (%s) దొరకలేదు."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#: ../gdata/gdata-parser.c:198
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "సింగల్ టన్ ఎలిమెంట్ (%s) నకలు చేయబడినది."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:368
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "క్వయరీ జరుగుతుండగా దోష సంకేతము %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:374
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "ఎంట్రీని చేరుస్తుండగా దోష సంకేతము %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:380
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "ఎంట్రీని అప్ డేట్ చేస్తుండగా దోష సంకేతము %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:386
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "ఎంట్రీని తోలగిస్తుండగా దోష సంకేతము %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:392
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "డౌన్ లోడ్ జరుగుతుండగా దోష సంకేతము %u: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:398
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "అప్ లోడ్ జరుగుతుండగా దోష సంకేతము %u: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:404
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "బ్యాచ్ ఆపరేషన్ జరుగుతుండగా దోష సంకేతము %u: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:685
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "URI రీడైరక్ట్: %s"
+
+#: ../gdata/gdata-service.c:1337
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:624
+#: ../gdata/services/youtube/gdata-youtube-service.c:875
+msgid "The entry has already been inserted."
+msgstr "కొత్త నమోదు అప్పటికే ప్రవేశపెట్టబడినది."
+
+#. Resumable upload error.
+#: ../gdata/gdata-upload-stream.c:744 ../gdata/gdata-upload-stream.c:826
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr " ఒక అప్లోడ్ భాగం ఈ అప్లోడ్ తర్వాత సర్వర్ నుండి దోషమును పొందింది."
+
+#: ../gdata/gdata-upload-stream.c:892
+msgid "Stream is already closed"
+msgstr "ప్రవాహము మూసివెయబడినది"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element ("00FG56") was not in hexadecimal RGB format.
+#: ../gdata/services/calendar/gdata-calendar-calendar.c:406
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in hexadecimal RGB format."
+msgstr "%s మూలకం యొక్క విషయం (\"%s\") హెక్సాడెసిమల్ RGB ఫార్మేటులో లేదు."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:315
+#: ../gdata/services/calendar/gdata-calendar-service.c:366
+msgid "You must be authenticated to query all calendars."
+msgstr "అన్నీ క్యాలెండర్ లపై క్వయరీ చేయుటకు మీరు ధ్రువీకరించబడి ఉండాలి."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:412
+#: ../gdata/services/calendar/gdata-calendar-service.c:463
+#: ../gdata/services/calendar/gdata-calendar-service.c:508
+#: ../gdata/services/calendar/gdata-calendar-service.c:568
+msgid "You must be authenticated to query your own calendars."
+msgstr "మీ స్వంత క్యాలెండర్ లను క్వయరీ చేయుటకు మీరు ధ్రువీకరించబడి ఉండాలి."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:517
+#: ../gdata/services/calendar/gdata-calendar-service.c:581
+msgid "The calendar did not have a content URI."
+msgstr "క్యాలెండరులో URI సారము లేదు"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:308
+msgid "You must be authenticated to query contacts."
+msgstr "సంపర్కములను క్వయరీ చేయుటకు మీరు ధ్రువీకరించబడి ఉండాలి"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:424
+#: ../gdata/services/contacts/gdata-contacts-service.c:474
+msgid "You must be authenticated to query contact groups."
+msgstr "సంపర్క గుంపులను క్వయరీ చేయుటకు మీరు ధ్రువీకరించబడి ఉండాలి"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:514
+msgid "The group has already been inserted."
+msgstr "గుంపు ముందే ప్రవేశింపబడినది."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:521
+msgid "You must be authenticated to insert a group."
+msgstr "ఒక గుంపును ప్రవేశపెట్టుటకు మీరు ధ్రువీకరించబడి ఉండాలి"
+
+#: ../gdata/services/documents/gdata-documents-document.c:300
+msgid "You must be authenticated to download documents."
+msgstr "పత్రములను దిగిమతి చేసుకొనుటకు మీరు ధ్రువీకరించబడి ఉండాలి"
+
+#: ../gdata/services/documents/gdata-documents-service.c:460
+#: ../gdata/services/documents/gdata-documents-service.c:510
+msgid "You must be authenticated to query documents."
+msgstr "పత్రములను క్వయరీ చేయుటకు మీరు ధ్రువీకరించబడి ఉండాలి"
+
+#: ../gdata/services/documents/gdata-documents-service.c:555
+msgid "You must be authenticated to upload documents."
+msgstr "పత్రములను ఎగుమతి చేయుటకు మీరు ధ్రువీకరించబడి ఉండాలి"
+
+#: ../gdata/services/documents/gdata-documents-service.c:561
+msgid "The document has already been uploaded."
+msgstr "పత్రము ముందే ఎగుమతి చేయబడినది."
+
+#: ../gdata/services/documents/gdata-documents-service.c:705
+msgid "You must be authenticated to update documents."
+msgstr "పత్రములను ఎగుమతి చేయుటకు మీరు ధ్రువీకరించబడి ఉండాలి"
+
+#: ../gdata/services/documents/gdata-documents-service.c:885
+#, c-format
+msgid ""
+"The content type of the supplied document ('%s') could not be recognized."
+msgstr "('%s')పత్రము యొక్క సమాచార రకము గుర్తించబడలేదు."
+
+#: ../gdata/services/documents/gdata-documents-service.c:925
+#| msgid "You must be authenticated to query documents."
+msgid "You must be authenticated to copy documents."
+msgstr "పత్రములను నకలుతీయుటకు మీరు తప్పక దృవీకరించబడాలి."
+
+#: ../gdata/services/documents/gdata-documents-service.c:1087
+#: ../gdata/services/documents/gdata-documents-service.c:1270
+msgid "You must be authenticated to move documents and folders."
+msgstr "పత్రములు మరియు సంచయములను కదుపుటకు మీరు ధ్రువీకరించబడి ఉండాలి"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"ఒక వినియోగదారుడిని క్వయరీ చేయుటకు మీరు వినియోగదారునినామము తెలియచేయాలి లేదా "
+"ధ్రువీకరించబడి ఉండాలి "
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:387
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "Query parameter not allowed for albums."
+msgstr "ఆల్బములకు క్వయరీ పారామీటరు అనుమతించబడలేదు"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:394
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:455
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"అన్నీ ఆల్బములను క్వయరీ చేయుటకు మీరు వినియోగదారునినామము తెలియచేయాలి లేదా "
+"ధ్రువీకరించబడి ఉండాలి."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:476
+msgid "The album did not have a feed link."
+msgstr "ఆల్బములో ఫీడు లింక్ లేదు."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:631
+msgid "You must be authenticated to upload a file."
+msgstr "ఈ దస్త్రముఏయుటకు మీరు ధ్రువీకరించబడి ఉండాలి."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:707
+msgid "The album has already been inserted."
+msgstr "ఈ ఆల్బము ముందే ప్రవేశించబడినది."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:714
+msgid "You must be authenticated to insert an album."
+msgstr "ఈ ఆల్బమును ప్రవేశపెట్టుటకు మీరు ధ్రువీకరించబడి ఉండాలి."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:456
+#, c-format
+msgid "This service is not available at the moment."
+msgstr "ప్రస్తుతము ఈ సేవ లభించుటలేదు."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:460
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "మీరు ఇది చేయుటకు ధ్రువీకరించబడి ఉండాలి."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:465
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"మీరు ఈమధ్య కాలములో API కు చాలా ఎక్కువ కాల్స్ చేశారు.దయచేసి కొంచం సేపు ఆగి "
+"ప్రయత్నించండి."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:468
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"మీ నమోదు కోటాను అతిక్రమించినారు. దయచేసి కొన్ని నమోదులను తొలగించి మరల "
+"ప్రయత్నించండి."
+
+#. Translators: the first parameter is an error code, which is a coded string.
+#. * The second parameter is an error domain, which is another coded string.
+#. * The third parameter is the location of the error, which is either a URI or an XPath.
+#: ../gdata/services/youtube/gdata-youtube-service.c:475
+#: ../gdata/services/youtube/gdata-youtube-service.c:481
+#, c-format
+msgid ""
+"Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+msgstr ""
+"\"%s\" అధికారక్షేత్రము నందలి \"%s\" స్థానమున తెలియని దోష సంకేతము \"%s\" "
+"దొరికినది."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:499
+#, c-format
+msgid "Unknown and unparsable error received."
+msgstr "తెలియని మరియు పార్స్ చేయలేని దోషము అందినది."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:763
+#: ../gdata/services/youtube/gdata-youtube-service.c:820
+msgid "The video did not have a related videos <link>."
+msgstr "సంబంధించిన వీడియోలు ఈ వీడియోలో లేవు<link>."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:882
+msgid "You must be authenticated to upload a video."
+msgstr "ఒక వీడియోను ఎగుమతి చేయుటకు మీరు ధ్రువీకరించబడి ఉండాలి."
+
--- /dev/null
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# Victor Ibragimov <victor.ibragimov@gmail.com>, 2013.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Tajik Gnome\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=libgdata&keywords=I18N+L10N&component=general\n"
+"POT-Creation-Date: 2013-02-16 16:20+0000\n"
+"PO-Revision-Date: 2013-01-21 18:12+0500\n"
+"Last-Translator: Victor Ibragimov <victor.ibragimov@gmail.com>\n"
+"Language-Team: \n"
+"Language: tg\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.5.4\n"
+
+#: ../gdata/gdata-client-login-authorizer.c:597
+#: ../gdata/gdata-oauth1-authorizer.c:804
+#: ../gdata/gdata-oauth1-authorizer.c:1076
+msgid "The server returned a malformed response."
+msgstr ""
+
+#: ../gdata/gdata-client-login-authorizer.c:617 ../gdata/gdata-service.c:321
+#, c-format
+msgid "Cannot connect to the service's server."
+msgstr ""
+
+#: ../gdata/gdata-client-login-authorizer.c:622 ../gdata/gdata-service.c:326
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr ""
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:628 ../gdata/gdata-service.c:332
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:634 ../gdata/gdata-service.c:338
+#, c-format
+msgid "Authentication required: %s"
+msgstr ""
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:639 ../gdata/gdata-service.c:343
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr ""
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:645 ../gdata/gdata-service.c:349
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr ""
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:657 ../gdata/gdata-service.c:363
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr ""
+
+#: ../gdata/gdata-client-login-authorizer.c:752
+msgid "A CAPTCHA must be filled out to log in."
+msgstr ""
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:790
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr ""
+
+#: ../gdata/gdata-client-login-authorizer.c:797
+msgid "Your username or password were incorrect."
+msgstr ""
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:818
+#, c-format
+msgid "Your account's e-mail address has not been verified. (%s)"
+msgstr ""
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:823
+#, c-format
+msgid "You have not agreed to the service's terms and conditions. (%s)"
+msgstr ""
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:829
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:834
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr ""
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:839
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr ""
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:844
+#, c-format
+msgid "This account's access to this service has been disabled. (%s)"
+msgstr ""
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:849
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr ""
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:262
+msgid "This entry does not support comments."
+msgstr ""
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#: ../gdata/gdata-commentable.c:349 ../gdata/gdata-commentable.c:435
+msgid "Comments may not be added to this entry."
+msgstr ""
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:518 ../gdata/gdata-commentable.c:594
+msgid "This comment may not be deleted."
+msgstr ""
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:750
+msgid "Invalid seek request"
+msgstr ""
+
+#: ../gdata/gdata-oauth1-authorizer.c:779
+msgid "The server rejected the temporary credentials request."
+msgstr ""
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1050
+msgid "Access was denied by the user or server."
+msgstr ""
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:245 ../gdata/gdata-parsable.c:256
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr ""
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:258
+msgid "Empty document."
+msgstr ""
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:67
+#, c-format
+msgid "A %s element was missing required content."
+msgstr ""
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:83
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+msgstr ""
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element ("00:01:42.500") was unknown.
+#: ../gdata/gdata-parser.c:103
+#, c-format
+msgid "The value of the %s property of a %s element (\"%s\") was unknown."
+msgstr ""
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element ("protected") was unknown.
+#: ../gdata/gdata-parser.c:121
+#, c-format
+msgid "The content of a %s element (\"%s\") was unknown."
+msgstr ""
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:141
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr ""
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:164
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:183
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr ""
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#: ../gdata/gdata-parser.c:198
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr ""
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:369
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr ""
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:375
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr ""
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:381
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr ""
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:387
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr ""
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:393
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr ""
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:399
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr ""
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:405
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr ""
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:686
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr ""
+
+#: ../gdata/gdata-service.c:1338
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:624
+#: ../gdata/services/youtube/gdata-youtube-service.c:875
+msgid "The entry has already been inserted."
+msgstr ""
+
+#. Resumable upload error.
+#: ../gdata/gdata-upload-stream.c:744 ../gdata/gdata-upload-stream.c:826
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+
+#: ../gdata/gdata-upload-stream.c:892
+msgid "Stream is already closed"
+msgstr ""
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element ("00FG56") was not in hexadecimal RGB format.
+#: ../gdata/services/calendar/gdata-calendar-calendar.c:406
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in hexadecimal RGB format."
+msgstr ""
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:315
+#: ../gdata/services/calendar/gdata-calendar-service.c:366
+msgid "You must be authenticated to query all calendars."
+msgstr ""
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:412
+#: ../gdata/services/calendar/gdata-calendar-service.c:463
+#: ../gdata/services/calendar/gdata-calendar-service.c:508
+#: ../gdata/services/calendar/gdata-calendar-service.c:568
+msgid "You must be authenticated to query your own calendars."
+msgstr ""
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:517
+#: ../gdata/services/calendar/gdata-calendar-service.c:581
+msgid "The calendar did not have a content URI."
+msgstr ""
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:308
+msgid "You must be authenticated to query contacts."
+msgstr ""
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:424
+#: ../gdata/services/contacts/gdata-contacts-service.c:474
+msgid "You must be authenticated to query contact groups."
+msgstr ""
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:514
+msgid "The group has already been inserted."
+msgstr ""
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:521
+msgid "You must be authenticated to insert a group."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-document.c:300
+msgid "You must be authenticated to download documents."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-service.c:461
+#: ../gdata/services/documents/gdata-documents-service.c:511
+msgid "You must be authenticated to query documents."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-service.c:556
+msgid "You must be authenticated to upload documents."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-service.c:562
+msgid "The document has already been uploaded."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-service.c:706
+msgid "You must be authenticated to update documents."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-service.c:888
+#, c-format
+msgid ""
+"The content type of the supplied document ('%s') could not be recognized."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-service.c:928
+msgid "You must be authenticated to copy documents."
+msgstr ""
+
+#: ../gdata/services/documents/gdata-documents-service.c:1090
+#: ../gdata/services/documents/gdata-documents-service.c:1273
+msgid "You must be authenticated to move documents and folders."
+msgstr ""
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:387
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "Query parameter not allowed for albums."
+msgstr ""
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:394
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:455
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:476
+msgid "The album did not have a feed link."
+msgstr "Албом дорои пайванди навори навсозӣ набуд."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:631
+msgid "You must be authenticated to upload a file."
+msgstr "Барои бор кардани файл, шумо бояд ворид шавед."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:707
+msgid "The album has already been inserted."
+msgstr "Албом аллакай дарҷ карда шудааст."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:714
+msgid "You must be authenticated to insert an album."
+msgstr "Барои дарҷ кардани албом шумо бояд ворид шавед."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:456
+#, c-format
+msgid "This service is not available at the moment."
+msgstr "Ин хидмат дар айни ҳол дастнорас аст."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:460
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Барои иҷро кардани ин амал шумо бояд ворид шавед."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:465
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Шумо маротибаи охирин миқдори аз ҳад зиёди зангҳои API-ро иҷро кардед. "
+"Лутфан, якчанд дақиқа интизор шуда, амалро такрор кунед."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:468
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Шумо аз квотаи вуруди худ гузаштед. Лутфан, баъзе воридаҳоро нест карда, "
+"амалро такрор кунед."
+
+#. Translators: the first parameter is an error code, which is a coded string.
+#. * The second parameter is an error domain, which is another coded string.
+#. * The third parameter is the location of the error, which is either a URI or an XPath.
+#: ../gdata/services/youtube/gdata-youtube-service.c:475
+#: ../gdata/services/youtube/gdata-youtube-service.c:481
+#, c-format
+msgid ""
+"Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+msgstr ""
+"Рамзи номаълуми хатогии \"%s\" дар домени \"%s\", ки бо ҷойгиршавии \"%s\" "
+"қабул шудааст."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:499
+#, c-format
+msgid "Unknown and unparsable error received."
+msgstr "Хатогии номаълум ва таҷзиянашаванда қабул шудааст."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:763
+#: ../gdata/services/youtube/gdata-youtube-service.c:820
+msgid "The video did not have a related videos <link>."
+msgstr "Видео ягон видеои марбутро надошт <link>."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:882
+msgid "You must be authenticated to upload a video."
+msgstr "Барои бор кардани видео, шумо бояд дароед."
--- /dev/null
+# Thai translation for libgdata.
+# Copyright (C) 2011-2016 Free Software Foundation, Inc.
+# This file is distributed under the same license as the libgdata package.
+# Akom Chotiphantawanon <knight2000@gmail.com>, 2011-2013, 2015-2016.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=libgdata&keywords=I18N+L10N&component=General\n"
+"POT-Creation-Date: 2016-08-22 19:38+0000\n"
+"PO-Revision-Date: 2016-08-26 11:33+0700\n"
+"Last-Translator: Akom Chotiphantawanon <knight2000@gmail.com>\n"
+"Language-Team: Thai <thai-l10n@googlegroups.com>\n"
+"Language: th\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Gtranslator 2.91.6\n"
+
+#: ../gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "ไม่รองรับการทำงานแบบแบตช์ในบริการนี้"
+
+#: ../gdata/gdata-client-login-authorizer.c:629
+#: ../gdata/gdata-oauth1-authorizer.c:840
+#: ../gdata/gdata-oauth1-authorizer.c:1116
+#: ../gdata/gdata-oauth2-authorizer.c:953
+#: ../gdata/gdata-oauth2-authorizer.c:964
+#: ../gdata/gdata-oauth2-authorizer.c:983
+#: ../gdata/gdata-oauth2-authorizer.c:999
+#: ../gdata/gdata-oauth2-authorizer.c:1064
+#: ../gdata/gdata-oauth2-authorizer.c:1076
+#: ../gdata/gdata-oauth2-authorizer.c:1087
+#: ../gdata/gdata-oauth2-authorizer.c:1102
+#: ../gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "เซิร์ฟเวอร์คืนค่าตอบสนองผิดรูปแบบ"
+
+#: ../gdata/gdata-client-login-authorizer.c:649 ../gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service's server."
+msgstr "ไม่สามารถเชื่อมต่อกับเซิรฟ์เวอร์บริการได้"
+
+#: ../gdata/gdata-client-login-authorizer.c:654 ../gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "ไม่สามารถเชื่อมต่อกับเซิร์ฟเวอร์พร็อกซีได้"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: ../gdata/gdata-client-login-authorizer.c:660 ../gdata/gdata-service.c:372
+#: ../gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr "URI หรือข้อมูลส่วนหัวของคำร้องไม่ถูกต้อง หรือเป็นพารามิเตอร์ไม่มาตรฐานที่ไม่รองรับ: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:666 ../gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "ต้องยืนยันตัวบุคคล: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:671 ../gdata/gdata-service.c:383
+#: ../gdata/services/calendar/gdata-calendar-service.c:313
+#: ../gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "ไม่พบทรัพยากรที่ร้องขอ: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:677 ../gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "ข้อมูลมีการเปลี่ยนแปลงหลังจากที่ดาวน์โหลดมา: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:689 ../gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "เกิดข้อผิดพลาดรหัส %u ขณะยืนยันตัวบุคคล: %s"
+
+#: ../gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "ต้องกรอก CAPTCHA เพื่อเข้าระบบ"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "บัญชีนี้ต้องใช้รหัสผ่านเฉพาะของโปรแกรม (%s)"
+
+#: ../gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "ชื่อผู้ใช้หรือรหัสผ่านของคุณไม่ถูกต้อง"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account's e-mail address has not been verified. (%s)"
+msgstr "ที่อยู่อีเมลของบัญชีของคุณไม่ผ่านการตรวจสอบ (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service's terms and conditions. (%s)"
+msgstr "คุณไม่ได้ยอมรับข้อตกลงและเงื่อนไขของบริการ (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr "บัญชีนี้ถูกย้ายข้อมูลไปแล้ว กรุณาเข้าระบบออนไลน์เพื่อรับชื่อผู้ใช้และรหัสผ่านใหม่ของคุณ (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "บัญชีนี้ถูกลบไปแล้ว (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "บัญชีนี้ถูกปิดใช้งานไปแล้ว (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account's access to this service has been disabled. (%s)"
+msgstr "บัญชีนี้ถูกระงับการเข้าถึงบริการนี้ไปแล้ว (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "บริการนี้ไม่เปิดอยู่ในขณะนี้ (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:262
+msgid "This entry does not support comments."
+msgstr "รายการนี้ไม่รองรับคำอธิบาย"
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#: ../gdata/gdata-commentable.c:349 ../gdata/gdata-commentable.c:435
+msgid "Comments may not be added to this entry."
+msgstr "ไม่สามารถเพิ่มคำอธิบายในรายการนี้ได้"
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:518 ../gdata/gdata-commentable.c:594
+msgid "This comment may not be deleted."
+msgstr "ไม่สามารถลบคำอธิบายนี้ได้"
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:762
+msgid "Invalid seek request"
+msgstr "การร้องขอเลื่อนตำแหน่งอ่านไม่ถูกต้อง"
+
+#: ../gdata/gdata-oauth1-authorizer.c:815
+msgid "The server rejected the temporary credentials request."
+msgstr "เซิร์ฟเวอร์ปฏิเสธการร้องขอข้อมูลลับชั่วคราว"
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1090
+#: ../gdata/gdata-oauth2-authorizer.c:1113
+#: ../gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "การเข้าถึงถูกปฏิเสธโดยผู้ใช้หรือเซิร์ฟเวอร์"
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:352 ../gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "เกิดข้อผิดพลาดขณะแจง XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "เอกสารเปล่า"
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:483 ../gdata/gdata-parsable.c:521
+#: ../gdata/services/documents/gdata-documents-access-rule.c:144
+#: ../gdata/services/documents/gdata-documents-access-rule.c:154
+#: ../gdata/services/documents/gdata-documents-document.c:286
+#: ../gdata/services/documents/gdata-documents-entry.c:458
+#: ../gdata/services/documents/gdata-documents-entry.c:469
+#: ../gdata/services/documents/gdata-documents-entry.c:480
+#: ../gdata/services/documents/gdata-documents-entry.c:527
+#: ../gdata/services/documents/gdata-documents-entry.c:538
+#: ../gdata/services/documents/gdata-documents-entry.c:636
+#: ../gdata/services/documents/gdata-documents-entry.c:671
+#: ../gdata/services/documents/gdata-documents-entry.c:686
+#: ../gdata/services/documents/gdata-documents-entry.c:701
+#: ../gdata/services/documents/gdata-documents-entry.c:731
+#: ../gdata/services/documents/gdata-documents-entry.c:747
+#: ../gdata/services/documents/gdata-documents-feed.c:81
+#: ../gdata/services/documents/gdata-documents-feed.c:92
+#: ../gdata/services/documents/gdata-documents-feed.c:142
+#: ../gdata/services/documents/gdata-documents-feed.c:160
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "เกิดข้อผิดพลาดขณะแจง JSON: %s"
+
+#: ../gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "โหนด JSON นอกสุดไม่เป็นออบเจกต์"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "อิลิเมนต์ %s ขาดเนื้อหาที่จำเป็น"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+msgstr "เนื้อหาของอิลิเมนต์ %s (\"%s\") ไม่อยู่ในรูปแบบ ISO 8601"
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element ("00:01:42.500") was unknown.
+#: ../gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (\"%s\") was unknown."
+msgstr "ค่าของคุณสมบัติ %s ของอิลิเมนต์ %s (\"%s\") เป็นค่าที่ไม่รู้จัก"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element ("protected") was unknown.
+#: ../gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (\"%s\") was unknown."
+msgstr "เนื้อหาของอิลิเมนต์ %s (\"%s\") เป็นเนื้อหาที่ไม่รู้จัก"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "คุณสมบัติที่จำเป็นของอิลิเมนต์ %s (%s) ขาดหายไป"
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr "มีค่าสำหรับคุณสมบัติ %s และ %s ของอิลิเมนต์ %s ในขณะที่มีค่าได้เพียงคุณสมบัติเดียวเท่านั้น"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "อิลิเมนต์ที่จำเป็น (%s) ขาดหายไป"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: ../gdata/gdata-parser.c:200 ../gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "มีอิลิเมนต์ที่อนุญาตให้มีแค่ตัวเดียว (%s) ซ้ำเกิดขึ้น"
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A 'title' element was missing required content.
+#: ../gdata/gdata-parser.c:273
+#, c-format
+msgid "A '%s' element was missing required content."
+msgstr "อิลิเมนต์ '%s' ขาดเนื้อหาที่จำเป็น"
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a 'uploaded' element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+msgstr "เนื้อหาของอิลิเมนต์ '%s' (\"%s\") ไม่อยู่ในรูปแบบ ISO 8601"
+
+#. Translators: the parameter is an error message.
+#: ../gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "ได้รับ JSON ที่ไม่ถูกต้องจากเซิร์ฟเวอร์: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element ("00FG56") was not in hexadecimal RGB format.
+#: ../gdata/gdata-parser.c:1179
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in hexadecimal RGB format."
+msgstr "เนื้อหาของอิลิเมนต์ %s (\"%s\") ไม่ได้อยู่ในรูปแบบ RGB ฐานสิบหก"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "เกิดข้อผิดพลาดรหัส %u ขณะสืบค้น: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "เกิดข้อผิดพลาดรหัส %u ขณะแทรกรายการ: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "เกิดข้อผิดพลาดรหัส %u ขณะปรับข้อมูลรายการ: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "เกิดข้อผิดพลาดรหัส %u ขณะลบรายการ: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "เกิดข้อผิดพลาดรหัส %u ขณะดาวน์โหลด: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "เกิดข้อผิดพลาดรหัส %u ขณะอัปโหลด: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "เกิดข้อผิดพลาดรหัส %u ขณะทำงานแบบแบตช์: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:737
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "URI สำหรับเปลี่ยนเส้นทางไม่ถูกต้อง: %s"
+
+#: ../gdata/gdata-service.c:1454
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:626
+#: ../gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "รายการนี้ถูกแทรกอยู่ก่อนแล้ว"
+
+#. Resumable upload error.
+#: ../gdata/gdata-upload-stream.c:788 ../gdata/gdata-upload-stream.c:870
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr "ได้รับข้อผิดพลาดจากเซิร์ฟเวอร์หลังจากอัปโหลดก้อนข้อมูลแบบทำต่อจากเดิมได้"
+
+#: ../gdata/gdata-upload-stream.c:936
+msgid "Stream is already closed"
+msgstr "สตรีมปิดแล้ว"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:302
+#: ../gdata/services/tasks/gdata-tasks-service.c:195
+#: ../gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr "คุณมีการเรียก API มากเกินไป กรุณารอสัก 2-3 นาที แล้วค่อยลองอีกครั้ง"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:334
+#: ../gdata/services/tasks/gdata-tasks-service.c:204
+#: ../gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "คุณต้องยืนยันตัวบุคคลเพื่อจะทำสิ่งนี้"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:465
+#: ../gdata/services/calendar/gdata-calendar-service.c:516
+msgid "You must be authenticated to query all calendars."
+msgstr "คุณต้องยืนยันบุคคลเพื่อจะสืบค้นปฏิทินทั้งหมด"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:562
+#: ../gdata/services/calendar/gdata-calendar-service.c:613
+#: ../gdata/services/calendar/gdata-calendar-service.c:675
+#: ../gdata/services/calendar/gdata-calendar-service.c:734
+msgid "You must be authenticated to query your own calendars."
+msgstr "คุณต้องยืนยันบุคคลเพื่อจะสืบค้นปฏิทินของคุณเอง"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:308
+msgid "You must be authenticated to query contacts."
+msgstr "คุณต้องยืนยันบุคคลเพื่อจะสืบค้นที่อยู่ติดต่อ"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:424
+#: ../gdata/services/contacts/gdata-contacts-service.c:474
+msgid "You must be authenticated to query contact groups."
+msgstr "คุณต้องยืนยันบุคคลเพื่อจะสืบค้นกลุ่มของที่อยู่ติดต่อ"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:514
+msgid "The group has already been inserted."
+msgstr "กลุ่มนี้ถูกแทรกอยู่ก่อนแล้ว"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:521
+msgid "You must be authenticated to insert a group."
+msgstr "คุณต้องยืนยันบุคคลเพื่อจะแทรกกลุ่ม"
+
+#: ../gdata/services/documents/gdata-documents-document.c:392
+msgid "You must be authenticated to download documents."
+msgstr "คุณต้องยืนยันบุคคลเพื่อจะดาวน์โหลดเอกสาร"
+
+#: ../gdata/services/documents/gdata-documents-document.c:401
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "ไม่รู้จักหรือไม่รองรับการส่งออกเอกสารรูปแบบ ‘%s’"
+
+#: ../gdata/services/documents/gdata-documents-service.c:513
+#: ../gdata/services/documents/gdata-documents-service.c:563
+msgid "You must be authenticated to query documents."
+msgstr "คุณต้องยืนยันบุคคลเพื่อจะสืบค้นเอกสาร"
+
+#: ../gdata/services/documents/gdata-documents-service.c:628
+msgid "You must be authenticated to upload documents."
+msgstr "คุณต้องยืนยันบุคคลเพื่อจะอัปโหลดเอกสาร"
+
+#: ../gdata/services/documents/gdata-documents-service.c:634
+msgid "The document has already been uploaded."
+msgstr "เอกสารได้อัปโหลดไว้อยู่ก่อนแล้ว"
+
+#: ../gdata/services/documents/gdata-documents-service.c:779
+msgid "You must be authenticated to update documents."
+msgstr "คุณต้องยืนยันบุคคลเพื่อจะปรับข้อมูลเอกสาร"
+
+#: ../gdata/services/documents/gdata-documents-service.c:946
+#, c-format
+msgid ""
+"The content type of the supplied document ('%s') could not be recognized."
+msgstr "ชนิดของเนื้อหาเอกสารที่จัดให้ ('%s') ไม่สามารถจำแนกได้"
+
+#: ../gdata/services/documents/gdata-documents-service.c:986
+msgid "You must be authenticated to copy documents."
+msgstr "คุณต้องยืนยันบุคคลเพื่อจะคัดลอกเอกสาร"
+
+#: ../gdata/services/documents/gdata-documents-service.c:1014
+msgid "Parent folder not found"
+msgstr "ไม่พบโฟลเดอร์แม่"
+
+#: ../gdata/services/documents/gdata-documents-service.c:1160
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr "คุณต้องยืนยันบุคคลเพื่อจะเพิ่มหรือย้ายเอกสารและโฟลเดอร์"
+
+#: ../gdata/services/documents/gdata-documents-service.c:1359
+msgid "You must be authenticated to move documents and folders."
+msgstr "คุณต้องยืนยันบุคคลเพื่อจะย้ายเอกสารและโฟลเดอร์"
+
+#: ../gdata/services/freebase/gdata-freebase-service.c:479
+#, c-format
+msgid "Property '%s' does not hold an image"
+msgstr "คุณสมบัติ '%s' ไม่ได้มีเนื้อหาเป็นรูปภาพ"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr "คุณต้องระบุชื่อผู้ใช้หรือยืนยันตัวบุคคลเพื่อจะสืบค้นหาผู้ใช้"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:387
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "Query parameter not allowed for albums."
+msgstr "ไม่อนุญาตให้ใช้พารามิเตอร์สืบค้นสำหรับอัลบั้ม"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:394
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:455
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr "คุณต้องระบุชื่อผู้ใช้หรือยืนยันตัวบุคคลเพื่อจะสืบค้นอัลบั้มทั้งหมด"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:476
+msgid "The album did not have a feed link."
+msgstr "อัลบั้มนี้ไม่มีลิงก์ข่าวป้อน"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:633
+msgid "You must be authenticated to upload a file."
+msgstr "คุณต้องยืนยันตัวบุคคลเพื่อจะอัปโหลดแฟ้ม"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:709
+msgid "The album has already been inserted."
+msgstr "อัลบั้มนี้ถูกแทรกอยู่ก่อนแล้ว"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:716
+msgid "You must be authenticated to insert an album."
+msgstr "คุณต้องยืนยันตัวบุคคลเพื่อจะแทรกอัลบั้ม"
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:330
+#: ../gdata/services/tasks/gdata-tasks-service.c:381
+msgid "You must be authenticated to query all tasklists."
+msgstr "คุณต้องยืนยันบุคคลเพื่อจะสืบค้นรายการภารกิจทั้งหมด"
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:430
+#: ../gdata/services/tasks/gdata-tasks-service.c:487
+msgid "You must be authenticated to query your own tasks."
+msgstr "คุณต้องยืนยันบุคคลเพื่อจะสืบค้นภารกิจของคุณเอง"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr "คุณมีรายการเกินโควต้าของคุณแล้ว กรุณาลบบางรายการแล้วลองอีกครั้ง"
+
+#. Translators: the parameter is a URI.
+#: ../gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"บัญชี Google ของคุณต้องเชื่อมโยงกับช่อง YouTube ข่องหนึ่งเพื่อจะทำสิ่งนี้ได้ กรุณาไปที่ %s "
+"เพื่อสร้างช่อง"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "คุณต้องยืนยันตัวบุคคลเพื่อจะอัปโหลดวีดิทัศน์"
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "ปฏิทินไม่มี URI ของเนื้อหา"
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "บริการนี้ยังไม่เปิดในขณะนี้"
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr "ได้รับรหัสข้อผิดพลาด \"%s\" ซึ่งไม่รู้จัก ในโดเมน \"%s\" จากตำแหน่ง \"%s\""
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "ได้รับข้อผิดพลาดที่ไม่รู้จักและไม่สามารถแจงได้"
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "วีดิทัศน์ไม่มี <link> วีดิทัศน์ที่เกี่ยวข้อง"
--- /dev/null
+# Turkish translation for libgdata.
+# Copyright (C) 2011 libgdata's COPYRIGHT HOLDER
+# This file is distributed under the same license as the libgdata package.
+# Senol Korkmaz <mail@senolkorkmaz.info>, 2011.
+# Yaşar Şentürk <yasarix@gmail.com>, 2014.
+# Muhammet Kara <muhammetk@gmail.com>, 2011, 2012, 2014, 2015.
+# Emin Tufan Çetin <etcetin@gmail.com>, 2017, 2019.
+# Sabri Ünal <libreajans@gmail.com>, 2019.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-09-05 09:59+0000\n"
+"PO-Revision-Date: 2019-09-05 17:38+0300\n"
+"Last-Translator: Sabri Ünal <libreajans@gmail.com>\n"
+"Language-Team: Türkçe <gnome-turk@gnome.org>\n"
+"Language: tr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Poedit 2.0.6\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Toplu işlemler bu hizmet tarafından desteklenmiyor."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "Sunucu bozuk bir yanıt döndürdü."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "Hizmetin sunucusuna bağlanılamıyor."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Vekil sunucuya bağlanılamıyor."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Geçersiz istek URI veya başlığı, ya da desteklenmeyen standart dışı "
+"parametre: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Kimlik doğrulaması gerekli: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "İstenen kaynak bulunamadı: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Girdi indirildiği zamandan bu yana değişikliğe uğradı: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Kimlik doğrulama esnasında %u kodlu hata: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "Kullanıcı girişi yapmak için bir CAPTCHA doldurulmalı."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Bu hesap, uygulamaya özgü bir parola gerektirir. (%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Kullanıcı adınız ya da parolanız yanlış."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "Hesabınıza ait e-posta adresi doğrulanmadı. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Bu hizmetin hüküm ve koşullarını kabul etmediniz. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Bu hesap taşındı. Yeni kullanıcı adınızı ve parolanızı almak için lütfen "
+"çevrim içi giriş yapın. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Bu hesap silindi. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Bu hesap devre dışı bırakıldı. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "Bu hesabın bu hizmete erişimi devre dışı bırakıldı. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Bu hizmet şu anda kullanılabilir durumda değil. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "Bu girdi, yorumları desteklemiyor."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "Bu girdiye yorum eklenemez."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "Bu yorum silinemez."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Geçersiz arama isteği"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr "Sunucu, geçici kimlik bilgileri isteğini reddetti."
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "OAuth 1.0 desteği devre dışı bırakıldı."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "Kullanıcı ya da sunucu tarafından erişim engellendi."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "XML ayrıştırma hatası: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Boş belge."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "JSON ayrıştırma hatası: %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "En dıştaki JSON düğümü bir nesne değil."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Gerekli içerikte bir %s ögesi eksik."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "Bir %s ögesinin içeriği olan (‘%s’), ISO 8601 biçiminde değil."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "%2$s ögesindeki %1$s özelliğinin değeri (‘%3$s’) tanınmıyor."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "%s ögesinin içeriği (‘%s‘) tanınmıyor."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "%s ögesinin gerekli özelliği (%s) yok."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Sadece birine değer atanması gereken, %3$s ögesine ait %1$s ve %2$s "
+"özelliklerinin ikisine birden değer atandı."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Gerekli ögelerden biri (%s) yok."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Bir tekiz öge (%s) çoğaltıldı."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "Gerekli içerikte bir ‘%s’ ögesi eksik."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "Bir ‘%s’ ögesinin içeriği olan (‘%s’), ISO 8601 biçiminde değil."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Sunucudan geçersiz bir JSON verisi alındı: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr "%s ögesinin içeriği (‘%s’), onaltılık RGB biçiminde değil."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Sorgulama esnasında %u kodlu hata: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Bir girdi eklenmesi esnasında %u kodlu hata: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Bir girdinin güngellenmesi esnasında %u kodlu hata: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Bir girdinin silinmesi esnasında %u kodlu hata: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "İndirme esnasında %u kodlu hata: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Yükleme esnasında %u kodlu hata: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Bir toplu işlemin yürütülmesi esnasında %u kodlu hata: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "Geçersiz yönlendirme URI’si: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Girdi daha önceden eklenmiş."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"Devam ettirilebilir bir yükleme yığınının karşıya yüklenmesinden sonra "
+"sunucudan hata alındı."
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Akış zaten kapalı"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Son zamanda çok fazla API çağrısında bulundunuz. Lütfen birkaç dakika "
+"bekleyin ve yeniden deneyin."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Bu işlem için kimliğinizi doğrulatmalısınız."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "Tüm takvimleri sorgulamak için kimliğinizi doğrulatmalısınız."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "Kendi takviminizi sorgulamak için kimliğinizi doğrulatmalısınız."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "Bağlantı sorgulamak için kimliğinizi doğrulatmalısınız."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "Bağlantı kümelerini sorgulamak için kimliğinizi doğrulatmalısınız."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "Küme daha önceden eklenmiş."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "Küme eklemek için kimliğinizi doğrulatmalısınız."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "Belge indirmek için kimliğinizi doğrulatmalısınız."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Bilinmeyen veya desteklenmeyen belge dışa aktarma biçimi ‘%s’."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "Geçersiz görünürlük: tanınmayan değer ‘%s’"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "Belge sorgulamak için kimliğinizi doğrulatmalısınız."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "Belge yüklemek için kimliğinizi doğrulatmalısınız."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "Belge daha önceden yüklenmiş."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "Belgeleri güncellemek için kimliğinizi doğrulatmalısınız."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr "Sunulan (‘%s’) belgesinin içerik türü tanınamadı."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "Belgeleri kopyalamak için kimliğinizi doğrulatmalısınız."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "Üst klasör bulunamadı"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr ""
+"Dosya ve klasörleri eklemek ya da taşımak için kimliğinizi doğrulatmalısınız."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr "Dosya ve klasörleri taşımak için kimliğinizi doğrulatmalısınız."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "‘%s’ herhangi bir görüntü içermiyor"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Bir kullanıcı sorgulamak için kullanıcı adı belirtmeli ya da kimliğinizi "
+"doğrulatmalısınız."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "Sorgu parametresini albümler için kullanamazsınız."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Tüm albümleri sorgulamak için kullanıcı adı belirtmeli ya da kimliğinizi "
+"doğrulatmalısınız."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "Albüm bir besleme bağlantısı içermiyor."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "Dosya yüklemek için kimliğinizi doğrulatmalısınız."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "Bu albüm daha önceden eklenmiş."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "Albüm eklemek için kimliğinizi doğrulatmalısınız."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr "Tüm görev listelerini sorgulamak için kimliğinizi doğrulatmalısınız."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "Kendi görevlerinizi sorgulamak için kimliğinizi doğrulatmalısınız."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Girdi kotanızı aştınız. Lütfen girdilerinizden bazılarını silip yeniden "
+"deneyiniz."
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Bu işlemi gerçekleştirmek için Google hesabınızı bir YouTube kanalıyla "
+"ilişkilendirmelisiniz. Bunu yapmak için %s adresini ziyaret edin."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Video yüklemek için kimliğinizi doğrulatmalısınız."
+
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "Bir '%s' ögesinde gerekli içerik eksik."
+
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr "Bir %s öğesinin içeriği olan (\"%s\"), ISO 8601 biçiminde değil."
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "Takvim, içerik URI'sine sahip değil."
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "Bu hizmet şu anda kullanılabilir durumda değil."
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr ""
+#~ "\"%2$s\" etki alanının \"%3$s\" konumundan \"%1$s\" kodlu bilinmeyen bir "
+#~ "hata alındı."
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "Bilinmeyen ve ayrıştırılamayan bir hata alındı."
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "Bu videonun ilgili olduğu başka video yok <link>."
--- /dev/null
+# Uyghur translation for libgdata.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# Gheyret Kenji <gheyret@yahoo.com>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=libgdata&keywords=I18N+L10N&component=general\n"
+"POT-Creation-Date: 2012-07-15 10:02+0000\n"
+"PO-Revision-Date: 2013-02-02 12:37+0900\n"
+"Last-Translator: Gheyret Kenji <gheyret@gmail.com>\n"
+"Language-Team: Uyghur Computer Science Association <UKIJ@yahoogroups.com>\n"
+"Language: ug\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../gdata/gdata-client-login-authorizer.c:597
+#: ../gdata/gdata-oauth1-authorizer.c:804
+#: ../gdata/gdata-oauth1-authorizer.c:1076
+msgid "The server returned a malformed response."
+msgstr "مۇلازىمېتىر تورغا بولمىغان ئىنكاس قايتۇردى."
+
+#: ../gdata/gdata-client-login-authorizer.c:617 ../gdata/gdata-service.c:320
+#, c-format
+msgid "Cannot connect to the service's server."
+msgstr "مۇلازىمەتنىڭ مۇلازىمېتىرىغا باغلىنالمىدى."
+
+#: ../gdata/gdata-client-login-authorizer.c:622 ../gdata/gdata-service.c:325
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "ۋاكالەتچى مۇلازىمېتىرغا باغلىنالمىدى."
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:628 ../gdata/gdata-service.c:331
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr "ئىلتىماس قىلغان URI ياكى باش ئىناۋەتسىز ۋە ياكى قوللىمايدىغان ئۆلچەمسىز پارامېتىر: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:634 ../gdata/gdata-service.c:337
+#, c-format
+msgid "Authentication required: %s"
+msgstr "دەلىللەش تەلەپ قىلىنىدۇ: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:639 ../gdata/gdata-service.c:342
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "تەلەپ قىلىنغان مەنبە تېپىلمىدى: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:645 ../gdata/gdata-service.c:348
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "بۇ مەزمۇن چۈشۈرۈلگەندىن كېيىن ئۆزگەرتىلىپتۇ: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:657 ../gdata/gdata-service.c:362
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "دەلىللەۋاتقاندا %u دېگەن خاتالىق كودى چىقتى: %s"
+
+#: ../gdata/gdata-client-login-authorizer.c:752
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "تىزىمغا كىرىش ئۈچۈن CAPTCHA چوقۇم تولدۇرۇلۇشى كېرەك."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:790
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "بۇ ھېسابات قوللىنىشچان پروگرامما مەخسۇس ئىشلىتىدىغان ئىمغا ئېھتىياجلىق. (%s)"
+
+#: ../gdata/gdata-client-login-authorizer.c:797
+msgid "Your username or password were incorrect."
+msgstr "ئاتىڭىز ياكى ئىمىڭىز توغرا بولمىغان."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:818
+#, c-format
+msgid "Your account's e-mail address has not been verified. (%s)"
+msgstr "ھېساباتىڭىزنىڭ ئېلخەت ئادرېسى تەكشۈرۈلمىگەن.(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:823
+#, c-format
+msgid "You have not agreed to the service's terms and conditions. (%s)"
+msgstr "مۇلازىمەت ماددىلىرى ۋە شەرتلىرىگە قوشۇلمىدىڭىز.(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:829
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr "مەزكۇر ھېسابات يۆتكەلگەن. توردا تىزىمغا كىرىپ ئۆزىڭىزنىڭ يېڭى ئاتى ۋە ئىمىنى تاپشۇرۇپ ئېلىڭ. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:834
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "مەزكۇر ھېسابات ئۆچۈرۈلگەن. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:839
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "مەزكۇر ھېسابات چەكلەنگەن. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:844
+#, c-format
+msgid "This account's access to this service has been disabled. (%s)"
+msgstr "مەزكۇر ھېساباتنىڭ بۇ مۇلازىمەتنى زىيارەت قىلىشى(ئىشلىتىشى) چەكلەنگەن. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:849
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "بۇ مۇلازىمەتنى ھازىرقى پەيتتە ئىشلەتكىلى بولمايدۇ.(%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:262
+msgid "This entry does not support comments."
+msgstr "بۇ كىرگۈ ئىزاھاتنى قوللىمايدۇ."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#: ../gdata/gdata-commentable.c:349 ../gdata/gdata-commentable.c:435
+msgid "Comments may not be added to this entry."
+msgstr "ئىزاھاتلار بۇ كىرگۈگە قوشۇلمىغان بولۇشى مۇمكىن."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:518 ../gdata/gdata-commentable.c:594
+msgid "This comment may not be deleted."
+msgstr "بۇ ئىزاھات ئۆچۈرۈلمىگەن بولۇشى مۇمكىن."
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:752
+msgid "Invalid seek request"
+msgstr "ئىناۋەتسىز ئىزدەش ئىلتىماسى"
+
+#: ../gdata/gdata-oauth1-authorizer.c:779
+msgid "The server rejected the temporary credentials request."
+msgstr "مۇلازىمېتىر ۋاقىتلىق ئىسپاتنامە ئىلتىماسىنى رەت قىلدى."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1050
+msgid "Access was denied by the user or server."
+msgstr "زىيارەت ئىشلەتكۈچى ياكى مۇلازىمېتىر تەرىپىدىن رەت قىلىندى."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:245 ../gdata/gdata-parsable.c:256
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "XML نى يېشىشتە خاتالىق كۆرۈلدى: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:258
+msgid "Empty document."
+msgstr "قۇرۇق پۈتۈك."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:67
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "مەلۇم %s ئېلېمېنت تەلەپ قىلغان مەزمۇننى يوقاتتى."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:83
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+msgstr "ئېلېمېنت %s نىڭ مەزمۇنىدىكى («%s») ISO 8601 فورماتىدا ئەمەس."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element ("00:01:42.500") was unknown.
+#: ../gdata/gdata-parser.c:103
+#, c-format
+msgid "The value of the %s property of a %s element (\"%s\") was unknown."
+msgstr "مەلۇم %2$s ئېلېمېنت(\"%3$s\") نىڭ خاسلىقىنىڭ %1$s قىممىتى نامەلۇم"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element ("protected") was unknown.
+#: ../gdata/gdata-parser.c:121
+#, c-format
+msgid "The content of a %s element (\"%s\") was unknown."
+msgstr "ئېلېمېنت %s نىڭ مەزمۇنىدىكى («%s») نامەلۇم."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:141
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "ئېلېمېنت %s نىڭدىكى تەلەپ قىلىنغان خاسلىق (%s) يوق."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:164
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr "%3$s ئېلېمېنتنىڭ %1$s ۋە %2$s خاسلىقى ئوخشاش بولمىغان ئىناۋەتلىك ئەھۋالدىلا ئاندىن قىممەتنىڭ مەنىسى بولىدۇ."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:183
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "تەلەپ قىلىنغان ئېلېمېنت (%s) يوق."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#: ../gdata/gdata-parser.c:198
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "singleton ئېلېمېنت (%s) تەكرارلانغان."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:368
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "سۈرۈشتۈرۈۋاتقاندا %u دېگەن خاتالىق كودى چىقتى: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:374
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "مەزمۇن قىستۇرۇۋاتقاندا %u دېگەن خاتالىق كودى چىقتى: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:380
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "يېڭىلاۋاتقاندا %u دېگەن خاتالىق كودى چىقتى: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:386
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "ئۆچۈرۈۋاتقاندا %u دېگەن خاتالىق كودى چىقتى: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:392
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "چۈشۈرۈۋاتقاندا %u دېگەن خاتالىق كودى چىقتى: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:398
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "يۈكلەۋاتقاندا %u دېگەن خاتالىق كودى چىقتى: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:404
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "توپ مەشغۇلات ئېلىپ بېرىۋاتقاندا %u دېگەن خاتالىق كودى چىقتى: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:685
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "ئىناۋەتسىز قايتا نىشانلانغان URI: %s"
+
+#: ../gdata/gdata-service.c:1337
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:624
+#: ../gdata/services/youtube/gdata-youtube-service.c:875
+msgid "The entry has already been inserted."
+msgstr "مەزمۇن ئاللىقاچان قىستۇرۇلغان."
+
+#. Resumable upload error.
+#: ../gdata/gdata-upload-stream.c:744 ../gdata/gdata-upload-stream.c:826
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr "مۇلازىمېتىرغا resumable upload chunk نى يۈكلىگەندىن كېيىن مۇلازىمېتىردىن خاتالىق تاپشۇرۇپ ئالدى."
+
+#: ../gdata/gdata-upload-stream.c:892
+msgid "Stream is already closed"
+msgstr "ئېقىم ئاللىقاچان تاقالغان"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element ("00FG56") was not in hexadecimal RGB format.
+#: ../gdata/services/calendar/gdata-calendar-calendar.c:406
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in hexadecimal RGB format."
+msgstr "ئېلېمېنت %s نىڭ مەزمۇنىدىكى («%s») 16 لىك سىستېمىدىكى RGB فورماتىدا ئەمەس."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:315
+#: ../gdata/services/calendar/gdata-calendar-service.c:366
+msgid "You must be authenticated to query all calendars."
+msgstr "بارلىق يىلنامىلەرنى سۈرۈشتۈرۈش ئۈچۈن، سىز چوقۇم سالاھىيىتىڭىزنى دەلىللەشتىن ئۆتكۈزۈشىڭىز كېرەك."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:412
+#: ../gdata/services/calendar/gdata-calendar-service.c:463
+#: ../gdata/services/calendar/gdata-calendar-service.c:508
+#: ../gdata/services/calendar/gdata-calendar-service.c:568
+msgid "You must be authenticated to query your own calendars."
+msgstr "ئۆزىڭىزنىڭ يىلنامىلىرىنى سۈرۈشتۈرۈش ئۈچۈن، سىز چوقۇم سالاھىيىتىڭىزنى دەلىللەشتىن ئۆتكۈزۈشىڭىز كېرەك."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:517
+#: ../gdata/services/calendar/gdata-calendar-service.c:581
+msgid "The calendar did not have a content URI."
+msgstr "يىلنامىدە مەزمۇن URI يوق."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:308
+msgid "You must be authenticated to query contacts."
+msgstr "ئالاقەداشلارنى سۈرۈشتۈرۈش ئۈچۈن، سىز چوقۇم سالاھىيىتىڭىزنى دەلىللەشتىن ئۆتكۈزۈشىڭىز كېرەك."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:424
+#: ../gdata/services/contacts/gdata-contacts-service.c:474
+msgid "You must be authenticated to query contact groups."
+msgstr "ئالاقەداشلار گۇرۇپپىسىنى سۈرۈشتۈرۈش ئۈچۈن، سىز چوقۇم سالاھىيىتىڭىزنى دەلىللەشتىن ئۆتكۈزۈشىڭىز كېرەك."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:514
+msgid "The group has already been inserted."
+msgstr "گۇرۇپپا ئاللىقاچان قىستۇرۇلغان."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:521
+msgid "You must be authenticated to insert a group."
+msgstr "گۇرۇپپا قىستۇرۇش ئۈچۈن، سىز چوقۇم سالاھىيىتىڭىزنى دەلىللەشتىن ئۆتكۈزۈشىڭىز كېرەك."
+
+#: ../gdata/services/documents/gdata-documents-document.c:300
+msgid "You must be authenticated to download documents."
+msgstr "پۈتۈكلەرنى چۈشۈرۈش ئۈچۈن، سىز چوقۇم سالاھىيىتىڭىزنى دەلىللەشتىن ئۆتكۈزۈشىڭىز كېرەك."
+
+#: ../gdata/services/documents/gdata-documents-service.c:460
+#: ../gdata/services/documents/gdata-documents-service.c:510
+msgid "You must be authenticated to query documents."
+msgstr "پۈتۈكلەرنى سۈرۈشتۈرۈش ئۈچۈن، سىز چوقۇم سالاھىيىتىڭىزنى دەلىللەشتىن ئۆتكۈزۈشىڭىز كېرەك."
+
+#: ../gdata/services/documents/gdata-documents-service.c:555
+msgid "You must be authenticated to upload documents."
+msgstr "پۈتۈكلەرنى يۈكلەش ئۈچۈن، سىز چوقۇم سالاھىيىتىڭىزنى دەلىللەشتىن ئۆتكۈزۈشىڭىز كېرەك."
+
+#: ../gdata/services/documents/gdata-documents-service.c:561
+msgid "The document has already been uploaded."
+msgstr "پۈتۈك ئاللىقاچان يۈكلەنگەن."
+
+#: ../gdata/services/documents/gdata-documents-service.c:705
+msgid "You must be authenticated to update documents."
+msgstr "پۈتۈكلەرنى يېڭىلاش ئۈچۈن، سىز چوقۇم سالاھىيىتىڭىزنى دەلىللەشتىن ئۆتكۈزۈشىڭىز كېرەك."
+
+#: ../gdata/services/documents/gdata-documents-service.c:885
+#, c-format
+msgid ""
+"The content type of the supplied document ('%s') could not be recognized."
+msgstr "تەمىنلەنگەن پۈتۈك (‹%s›) نىڭ مەزمۇنىنىڭ تىپىنى بىلگىلى بولمىدى."
+
+#: ../gdata/services/documents/gdata-documents-service.c:925
+#| msgid "You must be authenticated to query documents."
+msgid "You must be authenticated to copy documents."
+msgstr "پۈتۈكلەرنى كۆچۈرۈش ئۈچۈن، سىز چوقۇم سالاھىيىتىڭىزنى دەلىللەشتىن ئۆتكۈزۈشىڭىز كېرەك."
+
+#: ../gdata/services/documents/gdata-documents-service.c:1087
+#: ../gdata/services/documents/gdata-documents-service.c:1270
+msgid "You must be authenticated to move documents and folders."
+msgstr "پۈتۈك ۋە مۇندەرىجىلەرنى يۆتكەش ئۈچۈن، سىز چوقۇم سالاھىيىتىڭىزنى دەلىللەشتىن ئۆتكۈزۈشىڭىز كېرەك."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr "ئىشلەتكۈچىنى سۈرۈشتۈرۈش ئۈچۈن، سىز چوقۇم ئاتىڭىزنى بەلگىلىشىڭىز ياكى سالاھىيىتىڭىزنى دەلىللەشتىن ئۆتكۈزۈشىڭىز كېرەك."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:387
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "Query parameter not allowed for albums."
+msgstr "سۈرۈشتۈرۈش پارامېتىرى ئالبومغا يول قويمايدۇ."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:394
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:455
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr "بارلىق ئالبوملارنى سۈرۈشتۈرۈش ئۈچۈن، سىز چوقۇم ئاتىڭىزنى بەلگىلىشىڭىز ياكى سالاھىيىتىڭىزنى دەلىللەشتىن ئۆتكۈزۈشىڭىز كېرەك."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:476
+msgid "The album did not have a feed link."
+msgstr "ئالبومنىڭ feed ئۇلانمىسى يوق."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:631
+msgid "You must be authenticated to upload a file."
+msgstr "پۈتۈكنى يۈكلەش ئۈچۈن، سىز چوقۇم سالاھىيىتىڭىزنى دەلىللەشتىن ئۆتكۈزۈشىڭىز كېرەك."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:707
+msgid "The album has already been inserted."
+msgstr "ئالبوم ئاللىقاچان قىستۇرۇلغان."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:714
+msgid "You must be authenticated to insert an album."
+msgstr "ئالبومنى قىستۇرۇش ئۈچۈن، سىز چوقۇم سالاھىيىتىڭىزنى دەلىللەشتىن ئۆتكۈزۈشىڭىز كېرەك."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:456
+#, c-format
+msgid "This service is not available at the moment."
+msgstr "بۇ مۇلازىمەتنى ھازىرقى پەيتتە ئىشلەتكىلى بولمايدۇ."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:460
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "بۇنى قىلىش ئۈچۈن، سىز چوقۇم سالاھىيىتىڭىزنى دەلىللەشتىن ئۆتكۈزۈشىڭىز كېرەك."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:465
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr "يېقىندا سىز نۇرغۇن قېتىم API چاقىردىڭىز. بىر نەچچە مىنۇت ساقلاپ ئاندىن قايتا سىناڭ."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:468
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr "نورمىدىن ئېشىپ كەتتى. بەزى نەرسىلەرنى ئۆچۈرۈپ قايتا سىناڭ."
+
+#. Translators: the first parameter is an error code, which is a coded string.
+#. * The second parameter is an error domain, which is another coded string.
+#. * The third parameter is the location of the error, which is either a URI or an XPath.
+#: ../gdata/services/youtube/gdata-youtube-service.c:475
+#: ../gdata/services/youtube/gdata-youtube-service.c:481
+#, c-format
+msgid ""
+"Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+msgstr "دائىرە «%2$s» دىكى نامەلۇم خاتالىق كودى «%1$s» نى تاپشۇرۇۋالدى ئورنى «%3$s»"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:499
+#, c-format
+msgid "Unknown and unparsable error received."
+msgstr "بىلگىلى ۋە يەشكىلى بولمايدىغان خاتالىق تاپشۇرۇۋالدى."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:763
+#: ../gdata/services/youtube/gdata-youtube-service.c:820
+msgid "The video did not have a related videos <link>."
+msgstr "بۇ سىنغا مۇناسىۋەتلىك سىنلار يوق <link>"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:882
+msgid "You must be authenticated to upload a video."
+msgstr "سىننى يۈكلەش ئۈچۈن، سىز چوقۇم سالاھىيىتىڭىزنى دەلىللەشتىن ئۆتكۈزۈشىڭىز كېرەك."
--- /dev/null
+# Ukrainian translation to libgdata.
+# Copyright (C) Free Software foundation, 2003
+# This file is distributed under the same license as the libgdata package.
+# Maxim Dziumanenko <dziumanenko@gmail.com>, 2009.
+# Korostil Daniel <ted.korostiled@gmail.com>, 2011, 2012.
+# Yuri Chornoivan <yurchor@ukr.net>, 2020.
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-09-25 10:37+0000\n"
+"PO-Revision-Date: 2020-03-12 19:48+0200\n"
+"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
+"Language-Team: Ukrainian <kde-i18n-uk@kde.org>\n"
+"Language: uk\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<"
+"=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"X-Generator: Lokalize 20.03.70\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "У цій службі не передбачено можливості пакетної обробки."
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "Сервер повернув помилкову або нерозпізнану відповідь."
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+#| msgid "Cannot connect to the service's server."
+msgid "Cannot connect to the service’s server."
+msgstr "Неможливо зв'язатись зі службою сервера."
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Неможливо з'єднатись з проксі-сервером."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"Неправильний запит URI або заголовок, або непідтримуваний нестандартний "
+"параметр: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Потрібна автентифікація: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "Потрібний ресурс не знайдено: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Елемент змінено з моменту останнього завантаження: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Помилка з кодом %u при автентифікації: %s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "Для входу треба заповнити поле CAPTCHA."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Цей обліковий запис потребує окремий пароль. (%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Неправильний пароль або невідомий користувача."
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+#| msgid "Your account's e-mail address has not been verified. (%s)"
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr ""
+"Адресу електронної пошти вашого облікового запису не було перевірено. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+#| msgid "You have not agreed to the service's terms and conditions. (%s)"
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "Ви підтвердили згоду з термінами та умовами обслуговування. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Цей обліковий запис перенесено. Будь ласка, зареєструйтесь у мережі, щоб "
+"отримати дані для входу. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Цей обліковий запис вилучено. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Цей обліковий запис вимкнено. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+#| msgid "This account's access to this service has been disabled. (%s)"
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "Доступ цього облікового запису до цієї служби вимкнено. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Ця служба наразі недоступна. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "Цей запис не підтримує коментарів."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "Коментарі не можуть бути додані до цього запису."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "Цей коментар неможливо вилучити."
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "Неправильний запит пошуку"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr "Сервер відмовляється від запиту тимчасових облікових даних."
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "Підтримку OAuth 1.0 вимкнено."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "Відмовлено в доступі користувачем або сервером."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Помилка аналізування XML: '%s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Порожній документ."
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+#| msgid "Error parsing XML: %s"
+msgid "Error parsing JSON: %s"
+msgstr "Помилка аналізування JSON: %s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Найбільш зовнішній вузол JSON не є об'єктом."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "У елементі %s пропущено обов'язковий зміст."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+#| msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "Вміст елемента %s («%s») не відповідає формату ISO 8601."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+#| msgid "The value of the %s property of a %s element (\"%s\") was unknown."
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "Значення властивості %s елемента %s («%s») є невідомим."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+#| msgid "The content of a %s element (\"%s\") was unknown."
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "Вміст елемента %s («%s») є невідомим."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Нема обов'язкової властивості елементу %s (%s)."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Наявні значення для властивостей %s і %s елементу %s, коли допустимий лише "
+"один із них."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Не вказано обов'язковий елемент (%s)."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "Дубльований одиночний елемент (%s)."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+#| msgid "A %s element was missing required content."
+msgid "A ‘%s’ element was missing required content."
+msgstr "У елементі «%s» пропущено обов'язковий вміст."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+#| msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "Зміст елемента «%s» («%s») не відповідає формату ISO 8601."
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Від сервера було отримано некоректний JSON: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+#| msgid ""
+#| "The content of a %s element (\"%s\") was not in hexadecimal RGB format."
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr "Зміст елементу %s (\"%s\") не у шістнадцятковому форматі RGB."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Помилка з кодом %u при очікуванні: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Помилка з кодом %u при вставленні елементу: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Помилка з кодом %u при оновленні елементу: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Помилка з кодом %u при вилученні елементу: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Помилка з кодом %u при звантаженні: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Помилка з кодом %u при вивантаженні: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Помилка з кодом %u при виконанні пакетної дії: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "Неправильний URI перенаправлення: %s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Елемент вже вставлено."
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr ""
+"Після вивантаження придатного до доповнення фрагмента від сервера було"
+" отримано повідомлення про помилку."
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "Потік уже закрито"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Ви зробили надто багато викликів API останнім часом. Зачекайте декілька "
+"хвилин та спробуйте ще раз."
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Щоб це зробити, слід пройти розпізнавання."
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "Щоб робити запити до усіх календарів, слід пройти розпізнавання."
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "Щоб робити запити до власного календаря, слід пройти розпізнавання."
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "Щоб робити запити до контактів, слід пройти розпізнавання."
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "Щоб робити запити до контактів, слід пройти розпізнавання."
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "Групу вже вставлено."
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "Щоб це вставити групу, слід пройти розпізнавання."
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "Щоб це звантажити документи, слід пройти розпізнавання."
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Невідомий або непідтримуваний формат експортування документів «%s»."
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "Некоректне значення видимості: нерозпізнане значення «%s»"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "Щоб робити запити документів, слід пройти розпізнавання."
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "Щоб вивантажувати документи, слід пройти розпізнавання."
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "Документ вже було вивантажено."
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "Щоб оновити документи, слід пройти розпізнавання."
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+#| msgid ""
+#| "The content type of the supplied document ('%s') could not be recognized."
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr "Тип вмісту документа («%s») неможливо розпізнати."
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+#| msgid "You must be authenticated to query documents."
+msgid "You must be authenticated to copy documents."
+msgstr "Щоб копіювати документи, слід пройти розпізнавання."
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "Не знайдено батьківської теки"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+#| msgid "You must be authenticated to move documents and folders."
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr "Щоб вставляти або переміщати файли й теки, слід пройти розпізнавання."
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr "Щоб переміщати файли й теки, слід пройти розпізнавання."
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "У властивості «%s» не міститься зображення"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Щоб робити запити, треба вказати користувача або пройти автентифікацію."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "Параметр запиту не дозволено для альбомів."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Щоб робити запити до усіх альбомів, треба вказати користувача або пройти "
+"автентифікацію."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "Для альбому не встановлено посилання джерела."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "Щоб вивантажувати файли, слід пройти розпізнавання."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "Альбом уже вставлено."
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "Щоб вставити альбом, слід пройти розпізнавання."
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+#| msgid "You must be authenticated to query all calendars."
+msgid "You must be authenticated to query all tasklists."
+msgstr ""
+"Щоб надсилати запити до усіх списків завдань, слід пройти розпізнавання."
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+#| msgid "You must be authenticated to query your own calendars."
+msgid "You must be authenticated to query your own tasks."
+msgstr "Щоб надсилати запити до власних завдань, слід пройти розпізнавання."
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr ""
+"Ви перевищили вашу квоту записів. Будь ласка, вилучіть деякі записи та "
+"спробуйте ще раз."
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Для виконання цієї дії ваш обліковий запис Google має бути пов'язано із"
+" каналом YouTube. "
+"Відвідайте %s для створення такого каналу."
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Щоб вивантажувати відео, слід пройти розпізнавання."
--- /dev/null
+# Vietnamese translation for libgdata.
+# Bản dịch tiếng Việt dành cho libgdata.
+# Copyright (C) 2011 libgdata's COPYRIGHT HOLDER
+# This file is distributed under the same license as the libgdata package.
+# Nguyễn Thái Ngọc Duy <pclouds@gmail.com>, 2011.
+# Trần Ngọc Quân <vnwildman@gmail.com>, 2016.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=libgdata&keywords=I18N+L10N&component=general\n"
+"POT-Creation-Date: 2016-01-18 19:49+0000\n"
+"PO-Revision-Date: 2016-01-19 08:21+0700\n"
+"Last-Translator: Trần Ngọc Quân <vnwildman@gmail.com>\n"
+"Language-Team: Vietnamese <gnome-vi-list@gnome.org>\n"
+"Language: vi\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Gtranslator 2.91.7\n"
+
+#: ../gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "Các thao tác bó lệnh không được hỗ trợ bởi dịch vụ này."
+
+#: ../gdata/gdata-client-login-authorizer.c:629
+#: ../gdata/gdata-oauth1-authorizer.c:840
+#: ../gdata/gdata-oauth1-authorizer.c:1116
+#: ../gdata/gdata-oauth2-authorizer.c:953
+#: ../gdata/gdata-oauth2-authorizer.c:964
+#: ../gdata/gdata-oauth2-authorizer.c:983
+#: ../gdata/gdata-oauth2-authorizer.c:999
+#: ../gdata/gdata-oauth2-authorizer.c:1064
+#: ../gdata/gdata-oauth2-authorizer.c:1076
+#: ../gdata/gdata-oauth2-authorizer.c:1087
+#: ../gdata/gdata-oauth2-authorizer.c:1102
+#: ../gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "Máy chủ trả lời không đúng định dạng."
+
+#: ../gdata/gdata-client-login-authorizer.c:649 ../gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service's server."
+msgstr "Không thể kết nối đến máy chủ của dịch vụ."
+
+#: ../gdata/gdata-client-login-authorizer.c:654 ../gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "Không thể kết nối đến máy ủy nhiệm."
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: ../gdata/gdata-client-login-authorizer.c:660 ../gdata/gdata-service.c:372
+#: ../gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr ""
+"URI hoặc dòng đầu của yêu cầu không hợp lệ, hoặc tham số không chuẩn, không "
+"được hỗ trợ: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:666 ../gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "Cần xác thực: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:671 ../gdata/gdata-service.c:383
+#: ../gdata/services/calendar/gdata-calendar-service.c:313
+#: ../gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "Không tìm thấy tài nguyên yêu cầu: %s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:677 ../gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "Mục tin đã bị sửa đổi từ lần tải về cuối cùng: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:689 ../gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "Mã lỗi %u khi xác thực: %s"
+
+#: ../gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "Phải điền CAPTCHA trước khi đăng nhập."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "Tài khoản này cần mật khẩu riêng của ứng dụng. (%s)"
+
+#: ../gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "Tên người dùng hoặc mật khẩu không đúng."
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account's e-mail address has not been verified. (%s)"
+msgstr "Địa chỉ thư điện tử của tài khoản của bạn chưa được xác minh. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service's terms and conditions. (%s)"
+msgstr "Bạn chưa đồng ý với các điều khoản của dịch vụ. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr ""
+"Dịch vụ này đã di dời. Vui lòng đăng nhập trực tuyến để nhận tên người dùng "
+"và mật khẩu mới. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "Tài khoản này đã bị xóa. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "Tài khoản này đã bị tắt. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account's access to this service has been disabled. (%s)"
+msgstr "Truy cập vào dịch vụ của tài khoản này đã bị tắt. (%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "Dịch vụ tạm thời không sẵn sàng. (%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:262
+msgid "This entry does not support comments."
+msgstr "Mục này không hỗ trợ bình luận."
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#: ../gdata/gdata-commentable.c:349 ../gdata/gdata-commentable.c:435
+msgid "Comments may not be added to this entry."
+msgstr "Không thể thêm bình luận vào mục này."
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:518 ../gdata/gdata-commentable.c:594
+msgid "This comment may not be deleted."
+msgstr "Bình luận không thể bị xóa."
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:762
+msgid "Invalid seek request"
+msgstr "Yêu cầu di chuyển (seek) không hợp lệ."
+
+#: ../gdata/gdata-oauth1-authorizer.c:815
+msgid "The server rejected the temporary credentials request."
+msgstr "Máy chủ từ chối yêu cầu giấy ủy nhiệm tạm thời."
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1090
+#: ../gdata/gdata-oauth2-authorizer.c:1113
+#: ../gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "Truy cập bị từ chối bởi máy chủ hoặc người dùng."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:352 ../gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "Lỗi phân tích XML: %s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "Tài liệu rỗng."
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:483 ../gdata/gdata-parsable.c:521
+#: ../gdata/services/documents/gdata-documents-access-rule.c:144
+#: ../gdata/services/documents/gdata-documents-access-rule.c:154
+#: ../gdata/services/documents/gdata-documents-document.c:286
+#: ../gdata/services/documents/gdata-documents-entry.c:458
+#: ../gdata/services/documents/gdata-documents-entry.c:469
+#: ../gdata/services/documents/gdata-documents-entry.c:480
+#: ../gdata/services/documents/gdata-documents-entry.c:527
+#: ../gdata/services/documents/gdata-documents-entry.c:538
+#: ../gdata/services/documents/gdata-documents-entry.c:636
+#: ../gdata/services/documents/gdata-documents-entry.c:671
+#: ../gdata/services/documents/gdata-documents-entry.c:686
+#: ../gdata/services/documents/gdata-documents-entry.c:701
+#: ../gdata/services/documents/gdata-documents-entry.c:731
+#: ../gdata/services/documents/gdata-documents-entry.c:747
+#: ../gdata/services/documents/gdata-documents-feed.c:81
+#: ../gdata/services/documents/gdata-documents-feed.c:92
+#: ../gdata/services/documents/gdata-documents-feed.c:142
+#: ../gdata/services/documents/gdata-documents-feed.c:160
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "Gặp lỗi khi phân tích JSON: %s"
+
+#: ../gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "Nút JSON ngoài cùng nhất không phải là một đối tượng."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "Thẻ %s thiếu nội dung cần có."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+msgstr "Nội dung của thẻ %s (\"%s\") không theo định dạng ISO 8601."
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element ("00:01:42.500") was unknown.
+#: ../gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (\"%s\") was unknown."
+msgstr "Giá trị của thuộc tính %s, thẻ %s (\"%s\") không được hỗ trợ."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element ("protected") was unknown.
+#: ../gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (\"%s\") was unknown."
+msgstr "Nội dung của thẻ %s (\"%s\") không được hỗ trợ."
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "Thuộc tính bắt buộc %s của thẻ (%s) không có."
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr ""
+"Có giá trị cho cả thuộc tính %s và %s của thẻ %s trong khi chỉ một trong hai "
+"thuộc tính được phép."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "Thẻ (%s) bắt buộc nhưng lại không có."
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: ../gdata/gdata-parser.c:200 ../gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "The duy nhất (%s) bị trùng lắp."
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A 'title' element was missing required content.
+#: ../gdata/gdata-parser.c:273
+#, c-format
+msgid "A '%s' element was missing required content."
+msgstr "Phần tử “%s” thiếu nội dung cần có."
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a 'uploaded' element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+msgstr "Nội dung của phần tử “%s” (\"%s\") không theo định dạng ISO 8601."
+
+#. Translators: the parameter is an error message.
+#: ../gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "Đã nhận được JSON không hợp lệ từ máy phục vụ: %s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element ("00FG56") was not in hexadecimal RGB format.
+#: ../gdata/gdata-parser.c:1179
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in hexadecimal RGB format."
+msgstr "Nội dung thẻ %s (\"%s\") không phải định dạng RGB thập lục phân."
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "Mã lỗi %u khi truy vấn: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "Mã lỗi %u khi thêm một mục: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "Mã lỗi %u khi cập nhật một mục: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "Mã lỗi %u khi xóa một mục: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "Mã lỗi %u khi tải về: %s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "Mã lỗi %u khi tải lên: %s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "Mã lỗi %u khi thực hiện hành động theo gói: %s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:737
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "URI tái định hướng không hợp lệ: %s"
+
+#: ../gdata/gdata-service.c:1454
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:624
+#: ../gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "Mục này đã được thêm rồi."
+
+#. Resumable upload error.
+#: ../gdata/gdata-upload-stream.c:788 ../gdata/gdata-upload-stream.c:870
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr "Lỗi nhận từ máy chủ sau khi đưa lên một đoạn có thể đưa lên từng phần."
+
+#: ../gdata/gdata-upload-stream.c:936
+msgid "Stream is already closed"
+msgstr "Luồng đã đóng"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:302
+#: ../gdata/services/tasks/gdata-tasks-service.c:195
+#: ../gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr ""
+"Bạn thực hiện lời gọi API quá thường xuyên. Vui lòng chờ vài phút và thử lại."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:334
+#: ../gdata/services/tasks/gdata-tasks-service.c:204
+#: ../gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "Bạn phải xác thực để thực hiện hành động này."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:465
+#: ../gdata/services/calendar/gdata-calendar-service.c:516
+msgid "You must be authenticated to query all calendars."
+msgstr "Bạn phải xác thực để truy vấn toàn bộ các lịch."
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:562
+#: ../gdata/services/calendar/gdata-calendar-service.c:613
+#: ../gdata/services/calendar/gdata-calendar-service.c:675
+#: ../gdata/services/calendar/gdata-calendar-service.c:734
+msgid "You must be authenticated to query your own calendars."
+msgstr "Bạn phải xác thực để truy vấn lịch của mình."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:308
+msgid "You must be authenticated to query contacts."
+msgstr "Bạn phải xác thực để truy vấn liên lạc."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:424
+#: ../gdata/services/contacts/gdata-contacts-service.c:474
+msgid "You must be authenticated to query contact groups."
+msgstr "Bạn phải xác thực để truy vấn nhóm liên lạc."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:514
+msgid "The group has already been inserted."
+msgstr "Nhóm đã được thêm rồi."
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:521
+msgid "You must be authenticated to insert a group."
+msgstr "Bạn phải xác thực để thêm một nhóm."
+
+#: ../gdata/services/documents/gdata-documents-document.c:392
+msgid "You must be authenticated to download documents."
+msgstr "Bạn phải xác thực để tải tài liệu về."
+
+#: ../gdata/services/documents/gdata-documents-document.c:401
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "Định dạng tài liệu xuất chưa biết hoặc không được hỗ trợ “%s”."
+
+#: ../gdata/services/documents/gdata-documents-service.c:513
+#: ../gdata/services/documents/gdata-documents-service.c:563
+msgid "You must be authenticated to query documents."
+msgstr "Bạn phải xác thực để truy vấn tài liệu."
+
+#: ../gdata/services/documents/gdata-documents-service.c:628
+msgid "You must be authenticated to upload documents."
+msgstr "Bạn phải xác thực để tải tài liệu lên."
+
+#: ../gdata/services/documents/gdata-documents-service.c:634
+msgid "The document has already been uploaded."
+msgstr "Tài liệu đã được đưa lên rồi."
+
+#: ../gdata/services/documents/gdata-documents-service.c:779
+msgid "You must be authenticated to update documents."
+msgstr "Bạn phải xác thực để cập nhật tài liệu."
+
+#: ../gdata/services/documents/gdata-documents-service.c:946
+#, c-format
+msgid ""
+"The content type of the supplied document ('%s') could not be recognized."
+msgstr "Nội dung tài liệu bổ sung (“%s”) không nhận dạng được."
+
+#: ../gdata/services/documents/gdata-documents-service.c:986
+msgid "You must be authenticated to copy documents."
+msgstr "Bạn phải xác thực để chép tài liệu."
+
+#: ../gdata/services/documents/gdata-documents-service.c:1014
+msgid "Parent folder not found"
+msgstr "Không tìm thấy thư mục cha"
+
+#: ../gdata/services/documents/gdata-documents-service.c:1160
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr "Bạn phải xác thực để chèn hay di chuyển tài liệu và thư mục."
+
+#: ../gdata/services/documents/gdata-documents-service.c:1359
+msgid "You must be authenticated to move documents and folders."
+msgstr "Bạn phải xác thực để di chuyển tài liệu và thư mục."
+
+#: ../gdata/services/freebase/gdata-freebase-service.c:479
+#, c-format
+msgid "Property '%s' does not hold an image"
+msgstr "Thuộc tính “%s” không chứa một ảnh"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr ""
+"Bạn phải xác định tên người dùng hoặc phải xác thực để truy vấn người dùng."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:387
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "Query parameter not allowed for albums."
+msgstr "Tham số truy vấn không được phép cho tập ảnh."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:394
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:455
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr ""
+"Bạn phải xác định tên người dùng hoặc phải xác thực để truy vấn tất cả tập "
+"ảnh."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:476
+msgid "The album did not have a feed link."
+msgstr "Tập ảnh không có liên kết feed."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:631
+msgid "You must be authenticated to upload a file."
+msgstr "Bạn phải xác thực để đưa tập tin lên."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:707
+msgid "The album has already been inserted."
+msgstr "Tập ảnh đã được thêm rồi."
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:714
+msgid "You must be authenticated to insert an album."
+msgstr "Bạn phải xác thực để thêm tập ảnh."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:330
+#: ../gdata/services/tasks/gdata-tasks-service.c:381
+msgid "You must be authenticated to query all tasklists."
+msgstr "Bạn phải xác thực để truy vấn toàn bộ các danh sách công việc."
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:430
+#: ../gdata/services/tasks/gdata-tasks-service.c:487
+msgid "You must be authenticated to query your own tasks."
+msgstr "Bạn phải xác thực để truy vấn lịch của mình."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr "Bạn đã đạt định mức cho phép. Vui lòng xóa bớt và thử lại."
+
+#. Translators: the parameter is a URI.
+#: ../gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"Tài khoản Google của bạn phải liên kết với một kênh YouTube để thực thi việc "
+"này. Truy cập %s để tạo một cái cho mình."
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "Bạn phải xác thực để có thể tải phim lên mạng."
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "Lịch không có URI dữ liệu."
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "Dịch vụ không sẵn sàng ở thời điểm này."
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr "Nhận mã lỗi lạ \"%s\" trong vùng \"%s\" với vị trí \"%s\"."
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "Nhận mã lỗi lạ và không thể phân tích."
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "Phim không có <link> phim liên quan."
--- /dev/null
+# Chinese (China) translation for libgdata.
+# Copyright (C) 2009 libgdata's COPYRIGHT HOLDER
+# This file is distributed under the same license as the libgdata package.
+# weitao <weitao1979@gmail.com>, 2009.
+# QAed by Eleanor Chen <chenyueg@gmail.com>, 2010
+# Yinghua Wang <wantinghard@gmail.com>, 2010
+# ben <benbenhappy2008@gmail.com>, 2011
+# YunQiang Su <wzssyqa@gmail.com>, 2010, 2011.
+# 甘露(Gan Lu) <rhythm.gan@gmail.com>, 2013
+# Jeff Bai <jeffbai@aosc.xyz>, 2015.
+# Dingzhong Chen <wsxy162@gmail.com>, 2016.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata master\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2020-06-18 12:58+0000\n"
+"PO-Revision-Date: 2020-08-15 10:09+0800\n"
+"Last-Translator: Qizhi Zhou <zhouqz@yahoo.com>\n"
+"Language-Team: Chinese (China) <i18n-zh@googlegroups.com>\n"
+"Language: zh_CN\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Poedit 2.4.1\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "该服务不支持批量操作。"
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "服务器返回了一个错误的回应。"
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "无法连接到该服务的服务器。"
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "无法连接到代理服务器。"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr "无效的请求 URI 或头,或不支持的非标准参数:%s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "要求认证:%s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "要求的资源未找到:%s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "下载之后,此条目更改过:%s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "认证时的错误代码 %u:%s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "要登录,必须填写验证码。"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "此帐号需要一个应用程序专用口令。(%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "您的用户名和口令错误。"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "您账户的电子邮件地址尚未验证。(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "您尚未同意服务条款和条件。(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr "此账户已移动。请登录上线来接收您的新用户和密码。(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "此账户已被删除。(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "此账户已被禁用。(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "此账户被禁止访问此服务。(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "此服务此时不可用。(%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "此项不支持注释。"
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "不能向此项添加注释。"
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "此注释不可以被删除。"
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "无效的定位请求"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr "服务器拒绝对临时证书的请求。"
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "已禁用 OAuth 1.0 支持。"
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "访问被用户或服务器拒绝。"
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "解析 XML 错误:%s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "空的文档。"
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "解析 JSON 时出错:%s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "最外面的 JSON 节点不是一个对象。"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "某个 %s 元素丢失了要求的内容。"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "某个 %s 元素(“%s”)的内容不是 ISO 8601 格式的。"
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "某个 %2$s 元素(“%3$s”)的 %1$s 属性的值未知。"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "某个 %s 元素(“%s”)的内容未知。"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "某个 %s 元素(%s)必需的属性不存在。"
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr "%3$s 元素的 %1$s 和 %2$s 属性只在不同时有效的情况下值才有意义。"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "一个必需的元素(%s)不存在。"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "一个单独元素(%s)重复了。"
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "某个 “%s” 元素缺失必须的内容。"
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "某个 “%s” 元素(“%s”)的内容不是 ISO 8601 格式的。"
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "从服务器处接收到无效的 JSON:%s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr "某个 %s 元素(“%s”)的内容不是以十六进制 RGB 格式。"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "请求时的错误代码 %u:%s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "插入条目时的错误代码 %u:%s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "更新条目时的错误代码 %u:%s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "删除条目时的错误代码 %u:%s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "下载时的错误代码 %u:%s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "上传时的错误代码 %u:%s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "在进行批处理操作时的错误代码 %u:%s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "无效的重定向:%s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "此条目已经被插入。"
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr "在上传了可续传的上传块后从服务器处接收到错误"
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "流已关闭"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr "您最近已经产生了太多 API 呼叫。请等待几分钟,然后再重新尝试。"
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "您必须通过认证才能这样做。"
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "要查询所有的日历您必须通过认证。"
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "要查询您自己的日历您必须通过认证。"
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "您必须通过认证才能查询联系人。"
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "您必须通过认证才能查询联系组。"
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "该组已经被插入。"
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "您必须通过认证才能插入组。"
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "您必须通过认证才能下载文档。"
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "未知或不支持的文档导出格式“%s”。"
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "可见性无效:无法识别值“%s”"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "要查询文档您必须通过认证。"
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "要上传文档您必须通过认证。"
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "这个文档已经被上传了。"
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "要更新文档您必须通过认证。"
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr "所提供文档 (\"%s\") 内容类型不能识别"
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "您必须通过认证才能复制文档。"
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "未找到上级文件夹"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr "认证后才能插入或移动文档和目录。"
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr "认证后才能移动文档和目录。"
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "属性 “%s” 没有存有图片"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr "您必须指定一个用户名或者通过认证才能查询一个用户。"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "查询参数不允许专辑。"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr "您必须指定一个用户名或者通过认证来查询所有专辑。"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "专辑没有反馈链接。"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "您必须通过认证才能上传一个文件。"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "专辑已经插入。"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "您必须通过认证才能插入专辑。"
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr "您必须通过认证才能查询全部任务列表。"
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "您必须通过认证才能查询您自己的任务。"
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr "您已经超过了您的条目数限额。请先删除一些条目然后重新尝试。"
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr ""
+"要这样做,您的谷歌帐号必须与某个 YouTube 频道关联。访问 %s 来创建一个。"
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "您必须通过认证才能上传视频。"
+
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "某个 %s 元素丢失了要求的内容。"
+
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr "某个 %s 元素(“%s”)的内容不是 ISO 8601 格式的。"
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "日历不包括内容 URI 。"
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "服务当前不可用。"
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr "接收到域 “%2$s” 中未知的错误代码 “%1$s”,并带有位置 “%3$s”。"
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "接收到未知的不可解析错误。"
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "此视频没有相关的视频 <link>。"
+
+#~ msgid "The supplied document had an invalid content type."
+#~ msgstr "提交的文档包含无效的内容类型。"
--- /dev/null
+# Chinese (Hong Kong) translation of libgdata.
+# 2008. Free Software Foundation, Inc.
+# This file is distributed under the same license as the libgdata package.
+# Chao-Hsiung Liao <j_h_liau@yahoo.com.tw>, 2009.
+# Tryneeds translation team, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata 0.9.0\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=libgdata&keywords=I18N+L10N&component=general\n"
+"POT-Creation-Date: 2014-08-25 21:24+0000\n"
+"PO-Revision-Date: 2014-08-30 18:42+0800\n"
+"Last-Translator: Chao-Hsiung Liao <j_h_liau@yahoo.com.tw>\n"
+"Language-Team: Chinese (Hong Kong) <community@linuxhall.org>\n"
+"Language: zh_HK\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Poedit 1.6.5\n"
+
+#: ../gdata/gdata-client-login-authorizer.c:627
+#: ../gdata/gdata-oauth1-authorizer.c:839
+#: ../gdata/gdata-oauth1-authorizer.c:1115
+msgid "The server returned a malformed response."
+msgstr "伺服器傳回格式錯誤的回應。"
+
+#: ../gdata/gdata-client-login-authorizer.c:647 ../gdata/gdata-service.c:350
+#, c-format
+msgid "Cannot connect to the service's server."
+msgstr "無法連接服務的伺服器。"
+
+#: ../gdata/gdata-client-login-authorizer.c:652 ../gdata/gdata-service.c:355
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "無法連接代理伺服器。"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:658 ../gdata/gdata-service.c:361
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr "要求無效的 URI 或標頭,或不支援的非標準參數:%s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:664 ../gdata/gdata-service.c:367
+#, c-format
+msgid "Authentication required: %s"
+msgstr "要求核對:%s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:669 ../gdata/gdata-service.c:372
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "找不到要求的資源:%s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:675 ../gdata/gdata-service.c:378
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "此項目從上次下載後已被修改過:%s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-client-login-authorizer.c:687 ../gdata/gdata-service.c:392
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "在核對時出現錯誤代碼 %u:%s"
+
+#: ../gdata/gdata-client-login-authorizer.c:786
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "必須填入 CAPTCHA 才能登入。"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:824
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "這個帳號需要應用程式指定的密碼。(%s)"
+
+#: ../gdata/gdata-client-login-authorizer.c:831
+msgid "Your username or password were incorrect."
+msgstr "你的使用者名稱或密碼錯誤。"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:852
+#, c-format
+msgid "Your account's e-mail address has not been verified. (%s)"
+msgstr "你帳號的電子郵件位址尚未驗證。(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:857
+#, c-format
+msgid "You have not agreed to the service's terms and conditions. (%s)"
+msgstr "你尚未同意此服務的條款和條件。(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:863
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr "這個帳號已經被轉移了。請在網上登入後接收你的新使用者名稱與密碼。(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:868
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "這個帳號已刪除。(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:873
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "這個帳號已停用。(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:878
+#, c-format
+msgid "This account's access to this service has been disabled. (%s)"
+msgstr "這個帳號對此服務的存取已被停用。(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: ../gdata/gdata-client-login-authorizer.c:883
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "這個服務現在無法使用。(%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#: ../gdata/gdata-commentable.c:172 ../gdata/gdata-commentable.c:262
+msgid "This entry does not support comments."
+msgstr "這個項目不支援評論。"
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#: ../gdata/gdata-commentable.c:349 ../gdata/gdata-commentable.c:435
+msgid "Comments may not be added to this entry."
+msgstr "不能在這個項目中加入評論。"
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: ../gdata/gdata-commentable.c:518 ../gdata/gdata-commentable.c:594
+msgid "This comment may not be deleted."
+msgstr "這個評論不能刪除。"
+
+#. Tried to seek too far
+#: ../gdata/gdata-download-stream.c:762
+msgid "Invalid seek request"
+msgstr "無效的搜尋要求"
+
+#: ../gdata/gdata-oauth1-authorizer.c:814
+msgid "The server rejected the temporary credentials request."
+msgstr "伺服器拒絕了暫時性證書要求。"
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: ../gdata/gdata-oauth1-authorizer.c:1089
+msgid "Access was denied by the user or server."
+msgstr "存取被使用者或伺服器拒絕。"
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:349 ../gdata/gdata-parsable.c:360
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "分析 XML 時發生錯誤:%s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: ../gdata/gdata-parsable.c:362
+msgid "Empty document."
+msgstr "文件是空白的。"
+
+#. Translators: the parameter is an error message
+#: ../gdata/gdata-parsable.c:480 ../gdata/gdata-parsable.c:518
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "解析 JSON 時發生錯誤:%s"
+
+#: ../gdata/gdata-parsable.c:519
+msgid "Outermost JSON node is not an object."
+msgstr "最外層 JSON 節點不是物件。"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: ../gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "必要的內容中缺少了 %s 元素。"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in ISO 8601 format."
+msgstr "%s 元素(\"%s\")的內容不是 ISO 8601 格式。"
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element ("00:01:42.500") was unknown.
+#: ../gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (\"%s\") was unknown."
+msgstr "%2$s 元素(\"%3$s\") %1$s 屬性的數值是不明的。"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element ("protected") was unknown.
+#: ../gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (\"%s\") was unknown."
+msgstr "%s 元素 (\"%s\") 的內容不明。"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: ../gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "%s 元素 (%s) 要求的屬性並未顯現。"
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: ../gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr "屬性 %s 和 %s 的數值同時出現在 %s 元素中,但是只能允許其中一個數值。"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: ../gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "要求的 (%s) 元素並未顯現。"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: ../gdata/gdata-parser.c:200 ../gdata/gdata-parser.c:305
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "singleton 元素 (%s) 已重複。"
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A 'title' element was missing required content.
+#: ../gdata/gdata-parser.c:291
+#, c-format
+msgid "A '%s' element was missing required content."
+msgstr "必要的內容中缺少了「%s」元素。"
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a 'uploaded' element ("2009-05-06 26:30Z") was not in ISO 8601 format.
+#: ../gdata/gdata-parser.c:321
+#, c-format
+msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+msgstr "%s 元素(\"%s\")的內容不是 ISO 8601 格式。"
+
+#. Translators: the parameter is an error message.
+#: ../gdata/gdata-parser.c:331
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "從伺服器收到無效的 JSON:%s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:398
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "在查詢時出現錯誤代碼 %u:%s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:404
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "在插入項目時出現錯誤代碼 %u:%s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:410
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "在更新項目時出現錯誤代碼 %u:%s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:416
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "在刪除項目時出現錯誤代碼 %u:%s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:422
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "下載時出現錯誤代碼 %u:%s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:428
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "上傳時出現錯誤代碼 %u:%s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: ../gdata/gdata-service.c:434
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "在執行批次操作時出現錯誤代碼 %u:%s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: ../gdata/gdata-service.c:721
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "無效的重新導向 URI:%s"
+
+#: ../gdata/gdata-service.c:1401
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:624
+#: ../gdata/services/youtube/gdata-youtube-service.c:888
+msgid "The entry has already been inserted."
+msgstr "該項目已經插入了。"
+
+#. Resumable upload error.
+#: ../gdata/gdata-upload-stream.c:748 ../gdata/gdata-upload-stream.c:830
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr "在上傳可繼續上傳區塊後從伺服器收到錯誤。"
+
+#: ../gdata/gdata-upload-stream.c:896
+msgid "Stream is already closed"
+msgstr "串流已經關閉"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element ("00FG56") was not in hexadecimal RGB format.
+#: ../gdata/services/calendar/gdata-calendar-calendar.c:406
+#, c-format
+msgid "The content of a %s element (\"%s\") was not in hexadecimal RGB format."
+msgstr "%s 元素(\"%s\") 的內容不是十六進位 RGB 格式。"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:315
+#: ../gdata/services/calendar/gdata-calendar-service.c:366
+msgid "You must be authenticated to query all calendars."
+msgstr "你必須被核對才能查詢所有的日曆。"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:412
+#: ../gdata/services/calendar/gdata-calendar-service.c:463
+#: ../gdata/services/calendar/gdata-calendar-service.c:508
+#: ../gdata/services/calendar/gdata-calendar-service.c:568
+msgid "You must be authenticated to query your own calendars."
+msgstr "你必須被核對才能查詢自己的日曆。"
+
+#: ../gdata/services/calendar/gdata-calendar-service.c:517
+#: ../gdata/services/calendar/gdata-calendar-service.c:581
+msgid "The calendar did not have a content URI."
+msgstr "該日曆沒有內容 URI。"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:258
+#: ../gdata/services/contacts/gdata-contacts-service.c:308
+msgid "You must be authenticated to query contacts."
+msgstr "你必須被核對才能查詢聯絡人。"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:424
+#: ../gdata/services/contacts/gdata-contacts-service.c:474
+msgid "You must be authenticated to query contact groups."
+msgstr "你必須被核對才能查詢聯絡人羣組。"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:514
+msgid "The group has already been inserted."
+msgstr "該羣組已經插入了。"
+
+#: ../gdata/services/contacts/gdata-contacts-service.c:521
+msgid "You must be authenticated to insert a group."
+msgstr "你必須被核對才能插入羣組。"
+
+#: ../gdata/services/documents/gdata-documents-document.c:300
+msgid "You must be authenticated to download documents."
+msgstr "你必須被核對才能下載文件。"
+
+#: ../gdata/services/documents/gdata-documents-service.c:461
+#: ../gdata/services/documents/gdata-documents-service.c:511
+msgid "You must be authenticated to query documents."
+msgstr "你必須被核對才能查詢文件。"
+
+#: ../gdata/services/documents/gdata-documents-service.c:556
+msgid "You must be authenticated to upload documents."
+msgstr "你必須被核對才能上傳文件。"
+
+#: ../gdata/services/documents/gdata-documents-service.c:562
+msgid "The document has already been uploaded."
+msgstr "該文件已經更新。"
+
+#: ../gdata/services/documents/gdata-documents-service.c:706
+msgid "You must be authenticated to update documents."
+msgstr "你必須被核對才能更新文件。"
+
+#: ../gdata/services/documents/gdata-documents-service.c:888
+#, c-format
+msgid ""
+"The content type of the supplied document ('%s') could not be recognized."
+msgstr "無法辨識提供文件 ('%s') 的內容類型。"
+
+#: ../gdata/services/documents/gdata-documents-service.c:928
+msgid "You must be authenticated to copy documents."
+msgstr "你必須被核對才能複製文件。"
+
+#: ../gdata/services/documents/gdata-documents-service.c:1090
+#: ../gdata/services/documents/gdata-documents-service.c:1273
+msgid "You must be authenticated to move documents and folders."
+msgstr "你必須被核對才能移動文件和資料夾。"
+
+#: ../gdata/services/freebase/gdata-freebase-service.c:445
+#, c-format
+msgid "Property '%s' does not hold an image"
+msgstr "屬性「%s」並未保有影像"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr "你必須使用者名稱或通過核對以查詢使用者。"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:387
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "Query parameter not allowed for albums."
+msgstr "查詢引數不適用於相簿。"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:394
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:455
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr "你必須指定用來核對的使用者名稱才能查詢所有的相簿。"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:476
+msgid "The album did not have a feed link."
+msgstr "該相簿沒有餵送連結。"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:631
+msgid "You must be authenticated to upload a file."
+msgstr "你必須被核對才能上傳檔案。"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:707
+msgid "The album has already been inserted."
+msgstr "這個相簿已被插入。"
+
+#: ../gdata/services/picasaweb/gdata-picasaweb-service.c:714
+msgid "You must be authenticated to insert an album."
+msgstr "你必須被核對才能插入相簿。"
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:145
+#: ../gdata/services/tasks/gdata-tasks-service.c:196
+msgid "You must be authenticated to query all tasklists."
+msgstr "你必須被核對才能查詢所有的工作清單。"
+
+#: ../gdata/services/tasks/gdata-tasks-service.c:244
+#: ../gdata/services/tasks/gdata-tasks-service.c:300
+msgid "You must be authenticated to query your own tasks."
+msgstr "你必須被核對才能查詢自己的工作。"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:457
+#, c-format
+msgid "This service is not available at the moment."
+msgstr "這個服務現在無法使用。"
+
+#. Translators: the parameter is a URI.
+#: ../gdata/services/youtube/gdata-youtube-service.c:462
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr "你的 Google 帳號必須與 YouTube 關聯才能這麼做。請參訪 %s 以建立一個。"
+
+#. Translators: the first parameter is an error code, which is a coded string.
+#. * The second parameter is an error domain, which is another coded string.
+#. * The third parameter is the location of the error, which is either a URI or an XPath.
+#: ../gdata/services/youtube/gdata-youtube-service.c:467
+#: ../gdata/services/youtube/gdata-youtube-service.c:488
+#: ../gdata/services/youtube/gdata-youtube-service.c:494
+#, c-format
+msgid ""
+"Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+msgstr "在位置「%3$s」接收到網域「%2$s」中不明的錯誤代碼「%1$s」。"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:473
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "你必須被核對才能這麼做。"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:478
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr "你最近進行太多次 API 呼叫。請稍等幾分鐘後再試一次。"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:481
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr "你已經超過了你的項目配額。請刪除一些項目後再試一次。"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:512
+#, c-format
+msgid "Unknown and unparsable error received."
+msgstr "接收到不明且無法解析的錯誤。"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:776
+#: ../gdata/services/youtube/gdata-youtube-service.c:833
+msgid "The video did not have a related videos <link>."
+msgstr "此影片沒有相關的影片 <link>。"
+
+#: ../gdata/services/youtube/gdata-youtube-service.c:895
+msgid "You must be authenticated to upload a video."
+msgstr "你必須被核對才能上傳影片。"
+
+#~ msgid "The supplied document had an invalid content type."
+#~ msgstr "支援的文件具有無效的內容類型。"
--- /dev/null
+# Chinese (Taiwan) translation of libgdata.
+# 2008. Free Software Foundation, Inc.
+# This file is distributed under the same license as the libgdata package.
+#
+# Chao-Hsiung Liao <j_h_liau@yahoo.com.tw>, 2009.
+# Tryneeds translation team, 2009.
+# pan93412 <pan93412@gmail.com>, 2019.
+msgid ""
+msgstr ""
+"Project-Id-Version: libgdata 0.9.0\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgdata/issues\n"
+"POT-Creation-Date: 2019-09-25 10:37+0000\n"
+"PO-Revision-Date: 2019-10-08 18:59+0800\n"
+"Last-Translator: pan93412 <pan93412@gmail.com>\n"
+"Language-Team: Chinese <zh-l10n@linux.org.tw>\n"
+"Language: zh_TW\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Lokalize 19.08.1\n"
+
+#: gdata/gdata-batch-operation.c:635
+#, c-format
+msgid "Batch operations are unsupported by this service."
+msgstr "這個服務不支援批次操作。"
+
+#: gdata/gdata-client-login-authorizer.c:629
+#: gdata/gdata-oauth1-authorizer.c:850 gdata/gdata-oauth1-authorizer.c:1128
+#: gdata/gdata-oauth2-authorizer.c:953 gdata/gdata-oauth2-authorizer.c:964
+#: gdata/gdata-oauth2-authorizer.c:983 gdata/gdata-oauth2-authorizer.c:999
+#: gdata/gdata-oauth2-authorizer.c:1064 gdata/gdata-oauth2-authorizer.c:1076
+#: gdata/gdata-oauth2-authorizer.c:1087 gdata/gdata-oauth2-authorizer.c:1102
+#: gdata/gdata-oauth2-authorizer.c:1118
+msgid "The server returned a malformed response."
+msgstr "伺服器傳回格式錯誤的回應。"
+
+#: gdata/gdata-client-login-authorizer.c:649 gdata/gdata-service.c:361
+#, c-format
+msgid "Cannot connect to the service’s server."
+msgstr "無法連接服務的伺服器。"
+
+#: gdata/gdata-client-login-authorizer.c:654 gdata/gdata-service.c:366
+#, c-format
+msgid "Cannot connect to the proxy server."
+msgstr "無法連接代理伺服器。"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#: gdata/gdata-client-login-authorizer.c:660 gdata/gdata-service.c:372
+#: gdata/services/calendar/gdata-calendar-service.c:325
+#, c-format
+msgid "Invalid request URI or header, or unsupported nonstandard parameter: %s"
+msgstr "要求無效的 URI 或標頭,或不支援的非標準參數:%s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:666 gdata/gdata-service.c:378
+#, c-format
+msgid "Authentication required: %s"
+msgstr "要求核對:%s"
+
+#. Translators: the parameter is an error message returned by the server.
+#. Translators: the parameter is an
+#. * error message returned by the
+#. * server.
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:671 gdata/gdata-service.c:383
+#: gdata/services/calendar/gdata-calendar-service.c:313
+#: gdata/services/youtube/gdata-youtube-video.c:1013
+#, c-format
+msgid "The requested resource was not found: %s"
+msgstr "找不到要求的資源:%s"
+
+#. Translators: the parameter is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:677 gdata/gdata-service.c:389
+#, c-format
+msgid "The entry has been modified since it was downloaded: %s"
+msgstr "此項目從上次下載後已被修改過:%s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-client-login-authorizer.c:689 gdata/gdata-service.c:403
+#, c-format
+msgid "Error code %u when authenticating: %s"
+msgstr "在核對時出現錯誤代碼 %u:%s"
+
+#. Translators: see http://en.wikipedia.org/wiki/CAPTCHA for information about CAPTCHAs
+#: gdata/gdata-client-login-authorizer.c:788
+msgid "A CAPTCHA must be filled out to log in."
+msgstr "必須填入 CAPTCHA 才能登入。"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:826
+#, c-format
+msgid "This account requires an application-specific password. (%s)"
+msgstr "這個帳號需要應用程式指定的密碼。(%s)"
+
+#: gdata/gdata-client-login-authorizer.c:833
+msgid "Your username or password were incorrect."
+msgstr "您的使用者名稱或密碼錯誤。"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:854
+#, c-format
+msgid "Your account’s e-mail address has not been verified. (%s)"
+msgstr "您帳號的電子郵件位址尚未驗證。(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:859
+#, c-format
+msgid "You have not agreed to the service’s terms and conditions. (%s)"
+msgstr "您尚未同意此服務的條款和細則。(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:865
+#, c-format
+msgid ""
+"This account has been migrated. Please log in online to receive your new "
+"username and password. (%s)"
+msgstr "這個帳號已經被轉移了。請在線上登入後接收您的新使用者名稱與密碼。(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:870
+#, c-format
+msgid "This account has been deleted. (%s)"
+msgstr "這個帳號已刪除。(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:875
+#, c-format
+msgid "This account has been disabled. (%s)"
+msgstr "這個帳號已停用。(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:880
+#, c-format
+msgid "This account’s access to this service has been disabled. (%s)"
+msgstr "這個帳號對此服務的存取已被停用。(%s)"
+
+#. Translators: the parameter is a URI for further information.
+#: gdata/gdata-client-login-authorizer.c:885
+#, c-format
+msgid "This service is not available at the moment. (%s)"
+msgstr "這個服務現在無法使用。(%s)"
+
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry (such as a video) which doesn't
+#. * support comments.
+#. Translators: This is an error message for if a user attempts to retrieve comments from an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:172 gdata/gdata-commentable.c:258
+msgid "This entry does not support comments."
+msgstr "這個項目不支援評論。"
+
+#. Translators: This is an error message for if a user attempts to add a comment to an entry (such as a video) which doesn't support
+#. * comments.
+#. Translators: This is an error message for if a user attempts to add a comment to an entry
+#. * (such as a video) which doesn't support comments.
+#: gdata/gdata-commentable.c:338 gdata/gdata-commentable.c:420
+msgid "Comments may not be added to this entry."
+msgstr "不能在這個項目中加入評論。"
+
+#. Translators: This is an error message for if a user attempts to delete a comment they're not allowed to delete.
+#: gdata/gdata-commentable.c:494 gdata/gdata-commentable.c:563
+msgid "This comment may not be deleted."
+msgstr "這個評論不能刪除。"
+
+#. Tried to seek too far
+#: gdata/gdata-download-stream.c:763
+msgid "Invalid seek request"
+msgstr "無效的搜尋要求"
+
+#: gdata/gdata-oauth1-authorizer.c:825
+msgid "The server rejected the temporary credentials request."
+msgstr "伺服器拒絕了暫時性憑證要求。"
+
+#: gdata/gdata-oauth1-authorizer.c:881 gdata/gdata-oauth1-authorizer.c:1154
+msgid "OAuth 1.0 support is disabled."
+msgstr "OAuth 1.0 支援已停用。"
+
+#. Server returned an error. This either means that there was a server error or, more likely, the server doesn't trust the client
+#. * or the user denied authorization to the token on the authorization web page.
+#: gdata/gdata-oauth1-authorizer.c:1102 gdata/gdata-oauth2-authorizer.c:1113
+#: gdata/services/calendar/gdata-calendar-service.c:340
+#, c-format
+msgid "Access was denied by the user or server."
+msgstr "存取被使用者或伺服器拒絕。"
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:352 gdata/gdata-parsable.c:363
+#, c-format
+msgid "Error parsing XML: %s"
+msgstr "分析 XML 時發生錯誤:%s"
+
+#. Translators: this is a dummy error message to be substituted into "Error parsing XML: %s".
+#: gdata/gdata-parsable.c:365
+msgid "Empty document."
+msgstr "文件是空白。"
+
+#. Translators: the parameter is an error message
+#: gdata/gdata-parsable.c:483 gdata/gdata-parsable.c:521
+#: gdata/services/documents/gdata-documents-access-rule.c:144
+#: gdata/services/documents/gdata-documents-access-rule.c:154
+#: gdata/services/documents/gdata-documents-document.c:289
+#: gdata/services/documents/gdata-documents-entry.c:483
+#: gdata/services/documents/gdata-documents-entry.c:494
+#: gdata/services/documents/gdata-documents-entry.c:506
+#: gdata/services/documents/gdata-documents-entry.c:546
+#: gdata/services/documents/gdata-documents-entry.c:557
+#: gdata/services/documents/gdata-documents-entry.c:568
+#: gdata/services/documents/gdata-documents-entry.c:615
+#: gdata/services/documents/gdata-documents-entry.c:626
+#: gdata/services/documents/gdata-documents-entry.c:734
+#: gdata/services/documents/gdata-documents-entry.c:769
+#: gdata/services/documents/gdata-documents-entry.c:784
+#: gdata/services/documents/gdata-documents-entry.c:799
+#: gdata/services/documents/gdata-documents-entry.c:829
+#: gdata/services/documents/gdata-documents-entry.c:845
+#: gdata/services/documents/gdata-documents-entry.c:884
+#: gdata/services/documents/gdata-documents-entry.c:901
+#: gdata/services/documents/gdata-documents-feed.c:81
+#: gdata/services/documents/gdata-documents-feed.c:92
+#: gdata/services/documents/gdata-documents-feed.c:129
+#: gdata/services/documents/gdata-documents-feed.c:147
+#, c-format
+msgid "Error parsing JSON: %s"
+msgstr "解析 JSON 時發生錯誤:%s"
+
+#: gdata/gdata-parsable.c:522
+msgid "Outermost JSON node is not an object."
+msgstr "最外層 JSON 節點不是物件。"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A <title> element was missing required content.
+#: gdata/gdata-parser.c:69
+#, c-format
+msgid "A %s element was missing required content."
+msgstr "必要的內容中缺少了 %s 元素。"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a <media:group/media:uploaded> element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:85
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in ISO 8601 format."
+msgstr "%s 元素(「%s」)的內容不是 ISO 8601 格式。"
+
+#. Translators: the first parameter is the name of an XML property, the second is the name of an XML element
+#. * (including the angle brackets ("<" and ">")) to which the property belongs, and the third is the unknown value.
+#. *
+#. * For example:
+#. * The value of the @time property of a <media:group/media:thumbnail> element (‘00:01:42.500’) was unknown.
+#: gdata/gdata-parser.c:105
+#, c-format
+msgid "The value of the %s property of a %s element (‘%s’) was unknown."
+msgstr "%2$s 元素(「%3$s」) %1$s 屬性的數值是不明的。"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second parameter is the unknown content of that element.
+#. *
+#. * For example:
+#. * The content of a <gphoto:access> element (‘protected’) was unknown.
+#: gdata/gdata-parser.c:123
+#, c-format
+msgid "The content of a %s element (‘%s’) was unknown."
+msgstr "%s 元素 (「%s」) 的內容不明。"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets ("<" and ">")),
+#. * and the second is the name of an XML property which it should have contained.
+#. *
+#. * For example:
+#. * A required property of a <entry/gAcl:role> element (@value) was not present.
+#: gdata/gdata-parser.c:143
+#, c-format
+msgid "A required property of a %s element (%s) was not present."
+msgstr "%s 元素 (%s) 要求的屬性並未顯現。"
+
+#. Translators: the first two parameters are the names of XML properties of an XML element given in the third
+#. * parameter (including the angle brackets ("<" and ">")).
+#. *
+#. * For example:
+#. * Values were present for properties @rel and @label of a <entry/gContact:relation> element when only one of the
+#. * two is allowed.
+#: gdata/gdata-parser.c:166
+#, c-format
+msgid ""
+"Values were present for properties %s and %s of a %s element when only one "
+"of the two is allowed."
+msgstr "屬性 %s 和 %s 的數值同時出現在 %s 元素中,但是只能允許其中一個數值。"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A required element (<entry/title>) was not present.
+#: gdata/gdata-parser.c:185
+#, c-format
+msgid "A required element (%s) was not present."
+msgstr "要求的 (%s) 元素並未顯現。"
+
+#. Translators: the parameter is the name of an XML element, including the angle brackets ("<" and ">").
+#. *
+#. * For example:
+#. * A singleton element (<feed/title>) was duplicated.
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A singleton element (title) was duplicated.
+#: gdata/gdata-parser.c:200 gdata/gdata-parser.c:287
+#, c-format
+msgid "A singleton element (%s) was duplicated."
+msgstr "singleton 元素 (%s) 已重複。"
+
+#. Translators: the parameter is the name of an JSON element.
+#. *
+#. * For example:
+#. * A ‘title’ element was missing required content.
+#: gdata/gdata-parser.c:273
+#, c-format
+msgid "A ‘%s’ element was missing required content."
+msgstr "必要的內容中缺少了「%s」元素。"
+
+#. Translators: the first parameter is the name of an JSON element,
+#. * and the second parameter is the erroneous value (which was not in ISO 8601 format).
+#. *
+#. * For example:
+#. * The content of a ‘uploaded’ element (‘2009-05-06 26:30Z’) was not in ISO 8601 format.
+#: gdata/gdata-parser.c:303
+#, c-format
+msgid "The content of a ‘%s’ element (‘%s’) was not in ISO 8601 format."
+msgstr "%s 元素(「%s」)的內容不是 ISO 8601 格式。"
+
+#. Translators: the parameter is an error message.
+#: gdata/gdata-parser.c:314
+#, c-format
+msgid "Invalid JSON was received from the server: %s"
+msgstr "從伺服器收到無效的 JSON:%s"
+
+#. Translators: the first parameter is the name of an XML element (including the angle brackets
+#. * ("<" and ">"), and the second parameter is the erroneous value (which was not in hexadecimal
+#. * RGB format).
+#. *
+#. * For example:
+#. * The content of a <entry/gCal:color> element (‘00FG56’) was not in hexadecimal RGB format.
+#: gdata/gdata-parser.c:1193
+#, c-format
+msgid "The content of a %s element (‘%s’) was not in hexadecimal RGB format."
+msgstr "%s 元素(「%s」) 的內容不是十六進位 RGB 格式。"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:409
+#, c-format
+msgid "Error code %u when querying: %s"
+msgstr "在查詢時出現錯誤代碼 %u:%s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:415
+#, c-format
+msgid "Error code %u when inserting an entry: %s"
+msgstr "在插入項目時出現錯誤代碼 %u:%s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:421
+#, c-format
+msgid "Error code %u when updating an entry: %s"
+msgstr "在更新項目時出現錯誤代碼 %u:%s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:427
+#, c-format
+msgid "Error code %u when deleting an entry: %s"
+msgstr "在刪除項目時出現錯誤代碼 %u:%s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:433
+#, c-format
+msgid "Error code %u when downloading: %s"
+msgstr "下載時出現錯誤代碼 %u:%s"
+
+#. Translators: the first parameter is an HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:439
+#, c-format
+msgid "Error code %u when uploading: %s"
+msgstr "上傳時出現錯誤代碼 %u:%s"
+
+#. Translators: the first parameter is a HTTP status,
+#. * and the second is an error message returned by the server.
+#: gdata/gdata-service.c:445
+#, c-format
+msgid "Error code %u when running a batch operation: %s"
+msgstr "在執行批次操作時出現錯誤代碼 %u:%s"
+
+#. Translators: the parameter is the URI which is invalid.
+#: gdata/gdata-service.c:739
+#, c-format
+msgid "Invalid redirect URI: %s"
+msgstr "無效的重新導向 URI:%s"
+
+#: gdata/gdata-service.c:1432
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:612
+#: gdata/services/youtube/gdata-youtube-service.c:1022
+msgid "The entry has already been inserted."
+msgstr "該項目已經插入了。"
+
+#. Resumable upload error.
+#: gdata/gdata-upload-stream.c:794 gdata/gdata-upload-stream.c:876
+#, c-format
+msgid "Error received from server after uploading a resumable upload chunk."
+msgstr "在上傳可繼續上載區塊後從伺服器收到錯誤。"
+
+#: gdata/gdata-upload-stream.c:942
+msgid "Stream is already closed"
+msgstr "串流已經關閉"
+
+#: gdata/services/calendar/gdata-calendar-service.c:302
+#: gdata/services/tasks/gdata-tasks-service.c:195
+#: gdata/services/youtube/gdata-youtube-service.c:541
+#, c-format
+msgid ""
+"You have made too many API calls recently. Please wait a few minutes and try "
+"again."
+msgstr "您最近進行太多次 API 呼叫。請稍等幾分鐘後再試一次。"
+
+#: gdata/services/calendar/gdata-calendar-service.c:334
+#: gdata/services/tasks/gdata-tasks-service.c:204
+#: gdata/services/youtube/gdata-youtube-service.c:557
+#, c-format
+msgid "You must be authenticated to do this."
+msgstr "您必須通過核對才能這麼做。"
+
+#: gdata/services/calendar/gdata-calendar-service.c:465
+#: gdata/services/calendar/gdata-calendar-service.c:519
+msgid "You must be authenticated to query all calendars."
+msgstr "您必須通過核對才能查詢所有的日曆。"
+
+#: gdata/services/calendar/gdata-calendar-service.c:563
+#: gdata/services/calendar/gdata-calendar-service.c:617
+#: gdata/services/calendar/gdata-calendar-service.c:677
+#: gdata/services/calendar/gdata-calendar-service.c:739
+msgid "You must be authenticated to query your own calendars."
+msgstr "您必須通過核對才能查詢自己的日曆。"
+
+#: gdata/services/contacts/gdata-contacts-service.c:258
+#: gdata/services/contacts/gdata-contacts-service.c:311
+msgid "You must be authenticated to query contacts."
+msgstr "您必須通過核對才能查詢連絡人。"
+
+#: gdata/services/contacts/gdata-contacts-service.c:425
+#: gdata/services/contacts/gdata-contacts-service.c:478
+msgid "You must be authenticated to query contact groups."
+msgstr "您必須通過核對才能查詢連絡人群組。"
+
+#: gdata/services/contacts/gdata-contacts-service.c:516
+msgid "The group has already been inserted."
+msgstr "該群組已經插入了。"
+
+#: gdata/services/contacts/gdata-contacts-service.c:523
+msgid "You must be authenticated to insert a group."
+msgstr "您必須通過核對才能插入群組。"
+
+#: gdata/services/documents/gdata-documents-document.c:412
+msgid "You must be authenticated to download documents."
+msgstr "您必須通過核對才能下載文件。"
+
+#: gdata/services/documents/gdata-documents-document.c:421
+#, c-format
+msgid "Unknown or unsupported document export format ‘%s’."
+msgstr "不明或不支援的文件匯出格式「%s」。"
+
+#. Translators: the parameter is the invalid value of visibility variable
+#: gdata/services/documents/gdata-documents-entry.c:919
+#, c-format
+msgid "Invalid visibility: unrecognized value ‘%s’"
+msgstr "可見度無效:無法識別的數值「%s」"
+
+#: gdata/services/documents/gdata-documents-service.c:581
+#: gdata/services/documents/gdata-documents-service.c:634
+msgid "You must be authenticated to query documents."
+msgstr "您必須通過核對才能查詢文件。"
+
+#: gdata/services/documents/gdata-documents-service.c:697
+msgid "You must be authenticated to upload documents."
+msgstr "您必須通過核對才能上傳文件。"
+
+#: gdata/services/documents/gdata-documents-service.c:703
+msgid "The document has already been uploaded."
+msgstr "該文件已經更新。"
+
+#: gdata/services/documents/gdata-documents-service.c:848
+msgid "You must be authenticated to update documents."
+msgstr "您必須通過核對才能更新文件。"
+
+#: gdata/services/documents/gdata-documents-service.c:1015
+#, c-format
+msgid ""
+"The content type of the supplied document (‘%s’) could not be recognized."
+msgstr "無法辨識提供文件 (「%s」) 的內容類型。"
+
+#: gdata/services/documents/gdata-documents-service.c:1055
+msgid "You must be authenticated to copy documents."
+msgstr "您必須通過核對才能複製文件。"
+
+#: gdata/services/documents/gdata-documents-service.c:1074
+#: gdata/services/documents/gdata-documents-service.c:1439
+msgid "Parent folder not found"
+msgstr "找不到上層資料夾"
+
+#: gdata/services/documents/gdata-documents-service.c:1208
+msgid "You must be authenticated to insert or move documents and folders."
+msgstr "您必須通過核對才能插入或移動文件和資料夾。"
+
+#: gdata/services/documents/gdata-documents-service.c:1412
+msgid "You must be authenticated to move documents and folders."
+msgstr "您必須通過核對才能移動文件和資料夾。"
+
+#: gdata/services/freebase/gdata-freebase-service.c:497
+#, c-format
+msgid "Property ‘%s’ does not hold an image"
+msgstr "屬性「%s」並未保有影像"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:244
+msgid "You must specify a username or be authenticated to query a user."
+msgstr "您必須指定使用者名稱或通過核對以查詢使用者。"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:372
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:432
+msgid "Query parameter not allowed for albums."
+msgstr "查詢參數不適用於相簿。"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:379
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:444
+msgid "You must specify a username or be authenticated to query all albums."
+msgstr "您必須指定用來核對的使用者名稱才能查詢所有的相簿。"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:463
+msgid "The album did not have a feed link."
+msgstr "該相簿沒有消息饋流連結。"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:619
+msgid "You must be authenticated to upload a file."
+msgstr "您必須通過核對才能上傳檔案。"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:695
+msgid "The album has already been inserted."
+msgstr "這個相簿已被插入。"
+
+#: gdata/services/picasaweb/gdata-picasaweb-service.c:702
+msgid "You must be authenticated to insert an album."
+msgstr "您必須通過核對才能插入相簿。"
+
+#: gdata/services/tasks/gdata-tasks-service.c:330
+#: gdata/services/tasks/gdata-tasks-service.c:384
+msgid "You must be authenticated to query all tasklists."
+msgstr "您必須通過核對才能查詢所有的工作清單。"
+
+#: gdata/services/tasks/gdata-tasks-service.c:431
+#: gdata/services/tasks/gdata-tasks-service.c:491
+msgid "You must be authenticated to query your own tasks."
+msgstr "您必須通過核對才能查詢自己的工作。"
+
+#: gdata/services/youtube/gdata-youtube-service.c:548
+#, c-format
+msgid ""
+"You have exceeded your entry quota. Please delete some entries and try again."
+msgstr "您已經超過了您的項目配額。請刪除一些項目後再試一次。"
+
+#. Translators: the parameter is a URI.
+#: gdata/services/youtube/gdata-youtube-service.c:565
+#, c-format
+msgid ""
+"Your Google Account must be associated with a YouTube channel to do this. "
+"Visit %s to create one."
+msgstr "您的 Google 帳號必須與 YouTube 關聯才能這麼做。請參訪 %s 以建立一個。"
+
+#: gdata/services/youtube/gdata-youtube-service.c:1031
+msgid "You must be authenticated to upload a video."
+msgstr "您必須通過核對才能上傳影片。"
+
+#~ msgid "A '%s' element was missing required content."
+#~ msgstr "必要的內容中缺少了「%s」元素。"
+
+#~ msgid "The content of a '%s' element (\"%s\") was not in ISO 8601 format."
+#~ msgstr "%s 元素(\"%s\")的內容不是 ISO 8601 格式。"
+
+#~ msgid "The calendar did not have a content URI."
+#~ msgstr "該日曆沒有內容 URI。"
+
+#~ msgid "This service is not available at the moment."
+#~ msgstr "這個服務現在無法使用。"
+
+#~ msgid ""
+#~ "Unknown error code \"%s\" in domain \"%s\" received with location \"%s\"."
+#~ msgstr "在位置「%3$s」接收到網域「%2$s」中不明的錯誤代碼「%1$s」。"
+
+#~ msgid "Unknown and unparsable error received."
+#~ msgstr "接收到不明且無法解析的錯誤。"
+
+#~ msgid "The video did not have a related videos <link>."
+#~ msgstr "此影片沒有相關的影片 <link>。"
+
+#~ msgid "The supplied document had an invalid content type."
+#~ msgstr "支援的文件具有無效的內容類型。"